id
int32
0
241k
repo
stringlengths
6
63
path
stringlengths
5
140
func_name
stringlengths
3
151
original_string
stringlengths
84
13k
language
stringclasses
1 value
code
stringlengths
84
13k
code_tokens
list
docstring
stringlengths
3
47.2k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
91
247
195,600
shgysk8zer0/core_api
traits/socket_common.php
Socket_Common.socketSend
final public function socketSend($buff, $len, $flags = MSG_OOB) { return socket_send( $this->socket, $buff, is_int($len) ? $len : strlen($buff), $flags ); }
php
final public function socketSend($buff, $len, $flags = MSG_OOB) { return socket_send( $this->socket, $buff, is_int($len) ? $len : strlen($buff), $flags ); }
[ "final", "public", "function", "socketSend", "(", "$", "buff", ",", "$", "len", ",", "$", "flags", "=", "MSG_OOB", ")", "{", "return", "socket_send", "(", "$", "this", "->", "socket", ",", "$", "buff", ",", "is_int", "(", "$", "len", ")", "?", "$",...
Sends data to a connected socket @param string $buff A buffer containing the data that will be sent @param int $len The number of bytes that will be sent @param int $flags MSG_(OOB|EOR|EOF|DOUNTROUTE) joined with the binary OR (|) operator @return int The number of bytes sent
[ "Sends", "data", "to", "a", "connected", "socket" ]
9e9b8baf761af874b95256ad2462e55fbb2b2e58
https://github.com/shgysk8zer0/core_api/blob/9e9b8baf761af874b95256ad2462e55fbb2b2e58/traits/socket_common.php#L163-L171
195,601
shgysk8zer0/core_api
traits/socket_common.php
Socket_Common.socketSendto
final public function socketSendto($buf, $len, $flags, $addr, $port = 0) { return socket_sendto($this->socket, $buf, $len, $flags, $addr, $port); }
php
final public function socketSendto($buf, $len, $flags, $addr, $port = 0) { return socket_sendto($this->socket, $buf, $len, $flags, $addr, $port); }
[ "final", "public", "function", "socketSendto", "(", "$", "buf", ",", "$", "len", ",", "$", "flags", ",", "$", "addr", ",", "$", "port", "=", "0", ")", "{", "return", "socket_sendto", "(", "$", "this", "->", "socket", ",", "$", "buf", ",", "$", "l...
Sends a message to a socket, whether it is connected or not @param string $buf The sent data @param int $len len bytes from buf will be sent @param int $flags MSG_(OOB|EOR|EOF|DONTROUTE) joined with the binary OR (|) operator @param int $addr IP address of the remote host @param int $port The re...
[ "Sends", "a", "message", "to", "a", "socket", "whether", "it", "is", "connected", "or", "not" ]
9e9b8baf761af874b95256ad2462e55fbb2b2e58
https://github.com/shgysk8zer0/core_api/blob/9e9b8baf761af874b95256ad2462e55fbb2b2e58/traits/socket_common.php#L195-L198
195,602
anime-db/catalog-bundle
src/Controller/StorageController.php
StorageController.listAction
public function listAction(Request $request) { $response = $this->getCacheTimeKeeper()->getResponse('AnimeDbCatalogBundle:Storage'); // response was not modified for this request if ($response->isNotModified($request)) { return $response; } /* @var $rep StorageRe...
php
public function listAction(Request $request) { $response = $this->getCacheTimeKeeper()->getResponse('AnimeDbCatalogBundle:Storage'); // response was not modified for this request if ($response->isNotModified($request)) { return $response; } /* @var $rep StorageRe...
[ "public", "function", "listAction", "(", "Request", "$", "request", ")", "{", "$", "response", "=", "$", "this", "->", "getCacheTimeKeeper", "(", ")", "->", "getResponse", "(", "'AnimeDbCatalogBundle:Storage'", ")", ";", "// response was not modified for this request"...
Storage list. @param Request $request @return Response
[ "Storage", "list", "." ]
631b6f92a654e91bee84f46218c52cf42bdb8606
https://github.com/anime-db/catalog-bundle/blob/631b6f92a654e91bee84f46218c52cf42bdb8606/src/Controller/StorageController.php#L42-L56
195,603
anime-db/catalog-bundle
src/Controller/StorageController.php
StorageController.changeAction
public function changeAction(Storage $storage, Request $request) { $response = $this->getCacheTimeKeeper()->getResponse($storage->getDateUpdate()); // response was not modified for this request if ($response->isNotModified($request)) { return $response; } /* @var...
php
public function changeAction(Storage $storage, Request $request) { $response = $this->getCacheTimeKeeper()->getResponse($storage->getDateUpdate()); // response was not modified for this request if ($response->isNotModified($request)) { return $response; } /* @var...
[ "public", "function", "changeAction", "(", "Storage", "$", "storage", ",", "Request", "$", "request", ")", "{", "$", "response", "=", "$", "this", "->", "getCacheTimeKeeper", "(", ")", "->", "getResponse", "(", "$", "storage", "->", "getDateUpdate", "(", "...
Change storage. @param Storage $storage @param Request $request @return Response
[ "Change", "storage", "." ]
631b6f92a654e91bee84f46218c52cf42bdb8606
https://github.com/anime-db/catalog-bundle/blob/631b6f92a654e91bee84f46218c52cf42bdb8606/src/Controller/StorageController.php#L66-L92
195,604
anime-db/catalog-bundle
src/Controller/StorageController.php
StorageController.addAction
public function addAction(Request $request) { $storage = new Storage(); /* @var $form Form */ $form = $this->createForm(new StorageForm(), $storage); if ($request->getMethod() == 'POST') { $form->handleRequest($request); if ($form->isValid()) { ...
php
public function addAction(Request $request) { $storage = new Storage(); /* @var $form Form */ $form = $this->createForm(new StorageForm(), $storage); if ($request->getMethod() == 'POST') { $form->handleRequest($request); if ($form->isValid()) { ...
[ "public", "function", "addAction", "(", "Request", "$", "request", ")", "{", "$", "storage", "=", "new", "Storage", "(", ")", ";", "/* @var $form Form */", "$", "form", "=", "$", "this", "->", "createForm", "(", "new", "StorageForm", "(", ")", ",", "$", ...
Add storage. @param Request $request @return Response
[ "Add", "storage", "." ]
631b6f92a654e91bee84f46218c52cf42bdb8606
https://github.com/anime-db/catalog-bundle/blob/631b6f92a654e91bee84f46218c52cf42bdb8606/src/Controller/StorageController.php#L101-L123
195,605
anime-db/catalog-bundle
src/Controller/StorageController.php
StorageController.deleteAction
public function deleteAction(Storage $storage) { $em = $this->getDoctrine()->getManager(); $em->remove($storage); $em->flush(); return $this->redirect($this->generateUrl('storage_list')); }
php
public function deleteAction(Storage $storage) { $em = $this->getDoctrine()->getManager(); $em->remove($storage); $em->flush(); return $this->redirect($this->generateUrl('storage_list')); }
[ "public", "function", "deleteAction", "(", "Storage", "$", "storage", ")", "{", "$", "em", "=", "$", "this", "->", "getDoctrine", "(", ")", "->", "getManager", "(", ")", ";", "$", "em", "->", "remove", "(", "$", "storage", ")", ";", "$", "em", "->"...
Delete storage. @param Storage $storage @return Response
[ "Delete", "storage", "." ]
631b6f92a654e91bee84f46218c52cf42bdb8606
https://github.com/anime-db/catalog-bundle/blob/631b6f92a654e91bee84f46218c52cf42bdb8606/src/Controller/StorageController.php#L132-L139
195,606
anime-db/catalog-bundle
src/Controller/StorageController.php
StorageController.getPathAction
public function getPathAction(Request $request) { /* @var $response JsonResponse */ $response = $this->getCacheTimeKeeper() ->getResponse('AnimeDbCatalogBundle:Storage', -1, new JsonResponse()); // response was not modified for this request if ($response->isNotModified($r...
php
public function getPathAction(Request $request) { /* @var $response JsonResponse */ $response = $this->getCacheTimeKeeper() ->getResponse('AnimeDbCatalogBundle:Storage', -1, new JsonResponse()); // response was not modified for this request if ($response->isNotModified($r...
[ "public", "function", "getPathAction", "(", "Request", "$", "request", ")", "{", "/* @var $response JsonResponse */", "$", "response", "=", "$", "this", "->", "getCacheTimeKeeper", "(", ")", "->", "getResponse", "(", "'AnimeDbCatalogBundle:Storage'", ",", "-", "1", ...
Get storage path. @param Request $request @return Response
[ "Get", "storage", "path", "." ]
631b6f92a654e91bee84f46218c52cf42bdb8606
https://github.com/anime-db/catalog-bundle/blob/631b6f92a654e91bee84f46218c52cf42bdb8606/src/Controller/StorageController.php#L148-L166
195,607
anime-db/catalog-bundle
src/Controller/StorageController.php
StorageController.scanAction
public function scanAction(Storage $storage) { $this->get('anime_db.storage.scan_executor')->export($storage); return $this->render('AnimeDbCatalogBundle:Storage:scan.html.twig', [ 'storage' => $storage, ]); }
php
public function scanAction(Storage $storage) { $this->get('anime_db.storage.scan_executor')->export($storage); return $this->render('AnimeDbCatalogBundle:Storage:scan.html.twig', [ 'storage' => $storage, ]); }
[ "public", "function", "scanAction", "(", "Storage", "$", "storage", ")", "{", "$", "this", "->", "get", "(", "'anime_db.storage.scan_executor'", ")", "->", "export", "(", "$", "storage", ")", ";", "return", "$", "this", "->", "render", "(", "'AnimeDbCatalogB...
Scan storage. @param Storage $storage @return Response
[ "Scan", "storage", "." ]
631b6f92a654e91bee84f46218c52cf42bdb8606
https://github.com/anime-db/catalog-bundle/blob/631b6f92a654e91bee84f46218c52cf42bdb8606/src/Controller/StorageController.php#L175-L182
195,608
anime-db/catalog-bundle
src/Controller/StorageController.php
StorageController.scanOutputAction
public function scanOutputAction(Storage $storage, Request $request) { $filename = $this->container->getParameter('anime_db.catalog.storage.scan_output'); $filename = sprintf($filename, $storage->getId()); if (!file_exists($filename)) { throw $this->createNotFoundException('Log f...
php
public function scanOutputAction(Storage $storage, Request $request) { $filename = $this->container->getParameter('anime_db.catalog.storage.scan_output'); $filename = sprintf($filename, $storage->getId()); if (!file_exists($filename)) { throw $this->createNotFoundException('Log f...
[ "public", "function", "scanOutputAction", "(", "Storage", "$", "storage", ",", "Request", "$", "request", ")", "{", "$", "filename", "=", "$", "this", "->", "container", "->", "getParameter", "(", "'anime_db.catalog.storage.scan_output'", ")", ";", "$", "filenam...
Get storage scan output. @param Storage $storage @param Request $request @return JsonResponse
[ "Get", "storage", "scan", "output", "." ]
631b6f92a654e91bee84f46218c52cf42bdb8606
https://github.com/anime-db/catalog-bundle/blob/631b6f92a654e91bee84f46218c52cf42bdb8606/src/Controller/StorageController.php#L192-L209
195,609
anime-db/catalog-bundle
src/Controller/StorageController.php
StorageController.scanProgressAction
public function scanProgressAction(Storage $storage) { $filename = $this->container->getParameter('anime_db.catalog.storage.scan_progress'); $filename = sprintf($filename, $storage->getId()); if (!file_exists($filename)) { throw $this->createNotFoundException('The progress status...
php
public function scanProgressAction(Storage $storage) { $filename = $this->container->getParameter('anime_db.catalog.storage.scan_progress'); $filename = sprintf($filename, $storage->getId()); if (!file_exists($filename)) { throw $this->createNotFoundException('The progress status...
[ "public", "function", "scanProgressAction", "(", "Storage", "$", "storage", ")", "{", "$", "filename", "=", "$", "this", "->", "container", "->", "getParameter", "(", "'anime_db.catalog.storage.scan_progress'", ")", ";", "$", "filename", "=", "sprintf", "(", "$"...
Get storage scan progress. @param Storage $storage @return JsonResponse
[ "Get", "storage", "scan", "progress", "." ]
631b6f92a654e91bee84f46218c52cf42bdb8606
https://github.com/anime-db/catalog-bundle/blob/631b6f92a654e91bee84f46218c52cf42bdb8606/src/Controller/StorageController.php#L237-L248
195,610
yii2module/yii2-offline
src/console/controllers/DefaultController.php
DefaultController.actionIndex
public function actionIndex($option = null) { if(!ConfigHelper::isDetected()) { Question::confirm('Config not detected! Restore?', 1); ConfigHelper::restoreConfig(); } $option = Question::displayWithQuit('Set offline state', ['Enable', 'Disable'], $option); $result = ConfigHelper::setState($option ...
php
public function actionIndex($option = null) { if(!ConfigHelper::isDetected()) { Question::confirm('Config not detected! Restore?', 1); ConfigHelper::restoreConfig(); } $option = Question::displayWithQuit('Set offline state', ['Enable', 'Disable'], $option); $result = ConfigHelper::setState($option ...
[ "public", "function", "actionIndex", "(", "$", "option", "=", "null", ")", "{", "if", "(", "!", "ConfigHelper", "::", "isDetected", "(", ")", ")", "{", "Question", "::", "confirm", "(", "'Config not detected! Restore?'", ",", "1", ")", ";", "ConfigHelper", ...
Set offline mode
[ "Set", "offline", "mode" ]
7fea792d704d1ba0b99c4428dd356dd94d32c3d4
https://github.com/yii2module/yii2-offline/blob/7fea792d704d1ba0b99c4428dd356dd94d32c3d4/src/console/controllers/DefaultController.php#L16-L34
195,611
kreta/SimpleApiDocBundle
src/Kreta/SimpleApiDocBundle/Extractor/ApiDocExtractor.php
ApiDocExtractor.buildInput
public function buildInput(ApiDoc $annotation, $data = null) { $annotationReflection = new \ReflectionClass('Nelmio\ApiDocBundle\Annotation\ApiDoc'); $inputReflection = $annotationReflection->getProperty('input'); $inputReflection->setAccessible(true); if (!(isset($data['input']) ||...
php
public function buildInput(ApiDoc $annotation, $data = null) { $annotationReflection = new \ReflectionClass('Nelmio\ApiDocBundle\Annotation\ApiDoc'); $inputReflection = $annotationReflection->getProperty('input'); $inputReflection->setAccessible(true); if (!(isset($data['input']) ||...
[ "public", "function", "buildInput", "(", "ApiDoc", "$", "annotation", ",", "$", "data", "=", "null", ")", "{", "$", "annotationReflection", "=", "new", "\\", "ReflectionClass", "(", "'Nelmio\\ApiDocBundle\\Annotation\\ApiDoc'", ")", ";", "$", "inputReflection", "=...
Method that adds the input property of ApiDoc getting the form type's fully qualified name. @param ApiDoc $annotation The annotation @param array|null $data The data given @return ApiDoc
[ "Method", "that", "adds", "the", "input", "property", "of", "ApiDoc", "getting", "the", "form", "type", "s", "fully", "qualified", "name", "." ]
786aa9310cdf087253f65f68165a0a0c8ad5c816
https://github.com/kreta/SimpleApiDocBundle/blob/786aa9310cdf087253f65f68165a0a0c8ad5c816/src/Kreta/SimpleApiDocBundle/Extractor/ApiDocExtractor.php#L106-L128
195,612
kreta/SimpleApiDocBundle
src/Kreta/SimpleApiDocBundle/Extractor/ApiDocExtractor.php
ApiDocExtractor.buildOutput
public function buildOutput(ApiDoc $annotation, $data = null) { $annotationReflection = new \ReflectionClass('Nelmio\ApiDocBundle\Annotation\ApiDoc'); $outputReflection = $annotationReflection->getProperty('output'); $outputReflection->setAccessible(true); if (!(isset($data['output']...
php
public function buildOutput(ApiDoc $annotation, $data = null) { $annotationReflection = new \ReflectionClass('Nelmio\ApiDocBundle\Annotation\ApiDoc'); $outputReflection = $annotationReflection->getProperty('output'); $outputReflection->setAccessible(true); if (!(isset($data['output']...
[ "public", "function", "buildOutput", "(", "ApiDoc", "$", "annotation", ",", "$", "data", "=", "null", ")", "{", "$", "annotationReflection", "=", "new", "\\", "ReflectionClass", "(", "'Nelmio\\ApiDocBundle\\Annotation\\ApiDoc'", ")", ";", "$", "outputReflection", ...
Method that adds the output property of ApiDoc getting the model's fully qualified name. @param ApiDoc $annotation The annotation @param array|null $data The data given @return ApiDoc
[ "Method", "that", "adds", "the", "output", "property", "of", "ApiDoc", "getting", "the", "model", "s", "fully", "qualified", "name", "." ]
786aa9310cdf087253f65f68165a0a0c8ad5c816
https://github.com/kreta/SimpleApiDocBundle/blob/786aa9310cdf087253f65f68165a0a0c8ad5c816/src/Kreta/SimpleApiDocBundle/Extractor/ApiDocExtractor.php#L139-L163
195,613
ddrv-test/firmapi-core
src/Object/Rubric.php
Rubric.checkExists
protected function checkExists($id) { $filter = array( 'fields' => array( array( 'field' => 'id', 'compare' => '=', 'value' => $id, ), ), ); $exists = $this->rubric-...
php
protected function checkExists($id) { $filter = array( 'fields' => array( array( 'field' => 'id', 'compare' => '=', 'value' => $id, ), ), ); $exists = $this->rubric-...
[ "protected", "function", "checkExists", "(", "$", "id", ")", "{", "$", "filter", "=", "array", "(", "'fields'", "=>", "array", "(", "array", "(", "'field'", "=>", "'id'", ",", "'compare'", "=>", "'='", ",", "'value'", "=>", "$", "id", ",", ")", ",", ...
Check for exists @param string $id @return boolean
[ "Check", "for", "exists" ]
8f8843f0fb134568e7764cabd5039e15c579976d
https://github.com/ddrv-test/firmapi-core/blob/8f8843f0fb134568e7764cabd5039e15c579976d/src/Object/Rubric.php#L94-L107
195,614
shgysk8zer0/core_api
traits/syntax_highlighter.php
Syntax_Highlighter.unhighlightString
final public function unhighlightString( $contents = '', $update_file = false, array $replacements = array('<br />' => PHP_EOL, '<br>' => PHP_EOL, '&nbsp;' => ' ') ) { $contents = str_replace(array_keys($replacements), array_values($replacements), $contents); $contents = strip_tags($content...
php
final public function unhighlightString( $contents = '', $update_file = false, array $replacements = array('<br />' => PHP_EOL, '<br>' => PHP_EOL, '&nbsp;' => ' ') ) { $contents = str_replace(array_keys($replacements), array_values($replacements), $contents); $contents = strip_tags($content...
[ "final", "public", "function", "unhighlightString", "(", "$", "contents", "=", "''", ",", "$", "update_file", "=", "false", ",", "array", "$", "replacements", "=", "array", "(", "'<br />'", "=>", "PHP_EOL", ",", "'<br>'", "=>", "PHP_EOL", ",", "'&nbsp;'", ...
Inverse of highlight function. Attempts to convert HTML to regular string @param string $contents HTML encoded, syntax-highlighted string @param bool $update_file Whether or not to update file's content @param array $replacements Associative array of things to replace @return string Non-HTML versi...
[ "Inverse", "of", "highlight", "function", ".", "Attempts", "to", "convert", "HTML", "to", "regular", "string" ]
9e9b8baf761af874b95256ad2462e55fbb2b2e58
https://github.com/shgysk8zer0/core_api/blob/9e9b8baf761af874b95256ad2462e55fbb2b2e58/traits/syntax_highlighter.php#L60-L74
195,615
chalasr/RCHCapistranoBundle
Generator/StagingGenerator.php
StagingGenerator.write
public function write() { foreach ($this->parameters as $prop => $value) { $placeHolders[] = sprintf('<%s>', $prop); $replacements[] = $value; } $content = str_replace($placeHolders, $replacements, self::$template); fwrite($this->file, $this->addHeaders($con...
php
public function write() { foreach ($this->parameters as $prop => $value) { $placeHolders[] = sprintf('<%s>', $prop); $replacements[] = $value; } $content = str_replace($placeHolders, $replacements, self::$template); fwrite($this->file, $this->addHeaders($con...
[ "public", "function", "write", "(", ")", "{", "foreach", "(", "$", "this", "->", "parameters", "as", "$", "prop", "=>", "$", "value", ")", "{", "$", "placeHolders", "[", "]", "=", "sprintf", "(", "'<%s>'", ",", "$", "prop", ")", ";", "$", "replacem...
Write staging in file. @param string $staging Generated staging
[ "Write", "staging", "in", "file", "." ]
c4a4cbaa2bc05f33bf431fd3afe6cac39947640e
https://github.com/chalasr/RCHCapistranoBundle/blob/c4a4cbaa2bc05f33bf431fd3afe6cac39947640e/Generator/StagingGenerator.php#L57-L67
195,616
KDF5000/EasyThink
src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php
FB.setObjectFilter
public static function setObjectFilter($Class, $Filter) { $instance = FirePHP::getInstance(true); $instance->setObjectFilter($Class, $Filter); }
php
public static function setObjectFilter($Class, $Filter) { $instance = FirePHP::getInstance(true); $instance->setObjectFilter($Class, $Filter); }
[ "public", "static", "function", "setObjectFilter", "(", "$", "Class", ",", "$", "Filter", ")", "{", "$", "instance", "=", "FirePHP", "::", "getInstance", "(", "true", ")", ";", "$", "instance", "->", "setObjectFilter", "(", "$", "Class", ",", "$", "Filte...
Specify a filter to be used when encoding an object Filters are used to exclude object members. @see FirePHP->setObjectFilter() @param string $Class The class name of the object @param array $Filter An array or members to exclude @return void
[ "Specify", "a", "filter", "to", "be", "used", "when", "encoding", "an", "object" ]
86efc9c8a0d504e01e2fea55868227fdc8928841
https://github.com/KDF5000/EasyThink/blob/86efc9c8a0d504e01e2fea55868227fdc8928841/src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php#L170-L174
195,617
KDF5000/EasyThink
src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php
FB.send
public static function send() { $instance = FirePHP::getInstance(true); $args = func_get_args(); return call_user_func_array(array($instance,'fb'),$args); }
php
public static function send() { $instance = FirePHP::getInstance(true); $args = func_get_args(); return call_user_func_array(array($instance,'fb'),$args); }
[ "public", "static", "function", "send", "(", ")", "{", "$", "instance", "=", "FirePHP", "::", "getInstance", "(", "true", ")", ";", "$", "args", "=", "func_get_args", "(", ")", ";", "return", "call_user_func_array", "(", "array", "(", "$", "instance", ",...
Log object to firebug @see http://www.firephp.org/Wiki/Reference/Fb @param mixed $Object @return true @throws Exception
[ "Log", "object", "to", "firebug" ]
86efc9c8a0d504e01e2fea55868227fdc8928841
https://github.com/KDF5000/EasyThink/blob/86efc9c8a0d504e01e2fea55868227fdc8928841/src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php#L209-L214
195,618
KDF5000/EasyThink
src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php
FB.group
public static function group($Name, $Options=null) { $instance = FirePHP::getInstance(true); return $instance->group($Name, $Options); }
php
public static function group($Name, $Options=null) { $instance = FirePHP::getInstance(true); return $instance->group($Name, $Options); }
[ "public", "static", "function", "group", "(", "$", "Name", ",", "$", "Options", "=", "null", ")", "{", "$", "instance", "=", "FirePHP", "::", "getInstance", "(", "true", ")", ";", "return", "$", "instance", "->", "group", "(", "$", "Name", ",", "$", ...
Start a group for following messages Options: Collapsed: [true|false] Color: [#RRGGBB|ColorName] @param string $Name @param array $Options OPTIONAL Instructions on how to log the group @return true
[ "Start", "a", "group", "for", "following", "messages" ]
86efc9c8a0d504e01e2fea55868227fdc8928841
https://github.com/KDF5000/EasyThink/blob/86efc9c8a0d504e01e2fea55868227fdc8928841/src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php#L227-L231
195,619
KDF5000/EasyThink
src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php
FirePHP.getInstance
public static function getInstance($AutoCreate = false) { if ($AutoCreate===true && !self::$instance) { self::init(); } return self::$instance; }
php
public static function getInstance($AutoCreate = false) { if ($AutoCreate===true && !self::$instance) { self::init(); } return self::$instance; }
[ "public", "static", "function", "getInstance", "(", "$", "AutoCreate", "=", "false", ")", "{", "if", "(", "$", "AutoCreate", "===", "true", "&&", "!", "self", "::", "$", "instance", ")", "{", "self", "::", "init", "(", ")", ";", "}", "return", "self"...
Gets singleton instance of FirePHP @param boolean $AutoCreate @return FirePHP
[ "Gets", "singleton", "instance", "of", "FirePHP" ]
86efc9c8a0d504e01e2fea55868227fdc8928841
https://github.com/KDF5000/EasyThink/blob/86efc9c8a0d504e01e2fea55868227fdc8928841/src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php#L557-L563
195,620
KDF5000/EasyThink
src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php
FirePHP.setLogToInsightConsole
public function setLogToInsightConsole($console) { if(is_string($console)) { if(get_class($this)!='FirePHP_Insight' && !is_subclass_of($this, 'FirePHP_Insight')) { throw new Exception('FirePHP instance not an instance or subclass of FirePHP_Insight!'); } $...
php
public function setLogToInsightConsole($console) { if(is_string($console)) { if(get_class($this)!='FirePHP_Insight' && !is_subclass_of($this, 'FirePHP_Insight')) { throw new Exception('FirePHP instance not an instance or subclass of FirePHP_Insight!'); } $...
[ "public", "function", "setLogToInsightConsole", "(", "$", "console", ")", "{", "if", "(", "is_string", "(", "$", "console", ")", ")", "{", "if", "(", "get_class", "(", "$", "this", ")", "!=", "'FirePHP_Insight'", "&&", "!", "is_subclass_of", "(", "$", "t...
Set an Insight console to direct all logging calls to @param object $console The console object to log to @return void
[ "Set", "an", "Insight", "console", "to", "direct", "all", "logging", "calls", "to" ]
86efc9c8a0d504e01e2fea55868227fdc8928841
https://github.com/KDF5000/EasyThink/blob/86efc9c8a0d504e01e2fea55868227fdc8928841/src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php#L592-L602
195,621
KDF5000/EasyThink
src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php
FirePHP.setOption
public function setOption($Name, $Value) { if (!isset($this->options[$Name])) { throw $this->newException('Unknown option: ' . $Name); } $this->options[$Name] = $Value; }
php
public function setOption($Name, $Value) { if (!isset($this->options[$Name])) { throw $this->newException('Unknown option: ' . $Name); } $this->options[$Name] = $Value; }
[ "public", "function", "setOption", "(", "$", "Name", ",", "$", "Value", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "options", "[", "$", "Name", "]", ")", ")", "{", "throw", "$", "this", "->", "newException", "(", "'Unknown option: '",...
Set an option for the library @param string $Name @param mixed $Value @throws Exception @return void
[ "Set", "an", "option", "for", "the", "library" ]
86efc9c8a0d504e01e2fea55868227fdc8928841
https://github.com/KDF5000/EasyThink/blob/86efc9c8a0d504e01e2fea55868227fdc8928841/src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php#L675-L681
195,622
KDF5000/EasyThink
src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php
FirePHP.getOption
public function getOption($Name) { if (!isset($this->options[$Name])) { throw $this->newException('Unknown option: ' . $Name); } return $this->options[$Name]; }
php
public function getOption($Name) { if (!isset($this->options[$Name])) { throw $this->newException('Unknown option: ' . $Name); } return $this->options[$Name]; }
[ "public", "function", "getOption", "(", "$", "Name", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "options", "[", "$", "Name", "]", ")", ")", "{", "throw", "$", "this", "->", "newException", "(", "'Unknown option: '", ".", "$", "Name", ...
Get an option from the library @param string $Name @throws Exception @return mixed
[ "Get", "an", "option", "from", "the", "library" ]
86efc9c8a0d504e01e2fea55868227fdc8928841
https://github.com/KDF5000/EasyThink/blob/86efc9c8a0d504e01e2fea55868227fdc8928841/src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php#L690-L696
195,623
KDF5000/EasyThink
src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php
FirePHP.errorHandler
public function errorHandler($errno, $errstr, $errfile, $errline, $errcontext) { // Don't throw exception if error reporting is switched off if (error_reporting() == 0) { return; } // Only throw exceptions for errors we are asking for if (error_reporting() & $errn...
php
public function errorHandler($errno, $errstr, $errfile, $errline, $errcontext) { // Don't throw exception if error reporting is switched off if (error_reporting() == 0) { return; } // Only throw exceptions for errors we are asking for if (error_reporting() & $errn...
[ "public", "function", "errorHandler", "(", "$", "errno", ",", "$", "errstr", ",", "$", "errfile", ",", "$", "errline", ",", "$", "errcontext", ")", "{", "// Don't throw exception if error reporting is switched off", "if", "(", "error_reporting", "(", ")", "==", ...
FirePHP's error handler Throws exception for each php error that will occur. @param int $errno @param string $errstr @param string $errfile @param int $errline @param array $errcontext
[ "FirePHP", "s", "error", "handler" ]
86efc9c8a0d504e01e2fea55868227fdc8928841
https://github.com/KDF5000/EasyThink/blob/86efc9c8a0d504e01e2fea55868227fdc8928841/src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php#L728-L744
195,624
KDF5000/EasyThink
src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php
FirePHP.exceptionHandler
function exceptionHandler($Exception) { $this->inExceptionHandler = true; header('HTTP/1.1 500 Internal Server Error'); try { $this->fb($Exception); } catch (Exception $e) { echo 'We had an exception: ' . $e; } $this->inException...
php
function exceptionHandler($Exception) { $this->inExceptionHandler = true; header('HTTP/1.1 500 Internal Server Error'); try { $this->fb($Exception); } catch (Exception $e) { echo 'We had an exception: ' . $e; } $this->inException...
[ "function", "exceptionHandler", "(", "$", "Exception", ")", "{", "$", "this", "->", "inExceptionHandler", "=", "true", ";", "header", "(", "'HTTP/1.1 500 Internal Server Error'", ")", ";", "try", "{", "$", "this", "->", "fb", "(", "$", "Exception", ")", ";",...
FirePHP's exception handler Logs all exceptions to your firebug console and then stops the script. @param Exception $Exception @throws Exception
[ "FirePHP", "s", "exception", "handler" ]
86efc9c8a0d504e01e2fea55868227fdc8928841
https://github.com/KDF5000/EasyThink/blob/86efc9c8a0d504e01e2fea55868227fdc8928841/src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php#L766-L779
195,625
KDF5000/EasyThink
src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php
FirePHP.registerAssertionHandler
public function registerAssertionHandler($convertAssertionErrorsToExceptions = true, $throwAssertionExceptions = false) { $this->convertAssertionErrorsToExceptions = $convertAssertionErrorsToExceptions; $this->throwAssertionExceptions = $throwAssertionExceptions; if ($throwAssertion...
php
public function registerAssertionHandler($convertAssertionErrorsToExceptions = true, $throwAssertionExceptions = false) { $this->convertAssertionErrorsToExceptions = $convertAssertionErrorsToExceptions; $this->throwAssertionExceptions = $throwAssertionExceptions; if ($throwAssertion...
[ "public", "function", "registerAssertionHandler", "(", "$", "convertAssertionErrorsToExceptions", "=", "true", ",", "$", "throwAssertionExceptions", "=", "false", ")", "{", "$", "this", "->", "convertAssertionErrorsToExceptions", "=", "$", "convertAssertionErrorsToException...
Register FirePHP driver as your assert callback @param boolean $convertAssertionErrorsToExceptions @param boolean $throwAssertionExceptions @return mixed Returns the original setting or FALSE on errors
[ "Register", "FirePHP", "driver", "as", "your", "assert", "callback" ]
86efc9c8a0d504e01e2fea55868227fdc8928841
https://github.com/KDF5000/EasyThink/blob/86efc9c8a0d504e01e2fea55868227fdc8928841/src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php#L788-L798
195,626
KDF5000/EasyThink
src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php
FirePHP.assertionHandler
public function assertionHandler($file, $line, $code) { if ($this->convertAssertionErrorsToExceptions) { $exception = new ErrorException('Assertion Failed - Code[ '.$code.' ]', 0, null, $file, $line); if ($this->throwAssertionExceptions) { throw $exception; ...
php
public function assertionHandler($file, $line, $code) { if ($this->convertAssertionErrorsToExceptions) { $exception = new ErrorException('Assertion Failed - Code[ '.$code.' ]', 0, null, $file, $line); if ($this->throwAssertionExceptions) { throw $exception; ...
[ "public", "function", "assertionHandler", "(", "$", "file", ",", "$", "line", ",", "$", "code", ")", "{", "if", "(", "$", "this", "->", "convertAssertionErrorsToExceptions", ")", "{", "$", "exception", "=", "new", "ErrorException", "(", "'Assertion Failed - Co...
FirePHP's assertion handler Logs all assertions to your firebug console and then stops the script. @param string $file File source of assertion @param int $line Line source of assertion @param mixed $code Assertion code
[ "FirePHP", "s", "assertion", "handler" ]
86efc9c8a0d504e01e2fea55868227fdc8928841
https://github.com/KDF5000/EasyThink/blob/86efc9c8a0d504e01e2fea55868227fdc8928841/src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php#L809-L824
195,627
KDF5000/EasyThink
src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php
FirePHP.group
public function group($Name, $Options = null) { if (!$Name) { throw $this->newException('You must specify a label for the group!'); } if ($Options) { if (!is_array($Options)) { throw $this->newException('Options must be defined as an arra...
php
public function group($Name, $Options = null) { if (!$Name) { throw $this->newException('You must specify a label for the group!'); } if ($Options) { if (!is_array($Options)) { throw $this->newException('Options must be defined as an arra...
[ "public", "function", "group", "(", "$", "Name", ",", "$", "Options", "=", "null", ")", "{", "if", "(", "!", "$", "Name", ")", "{", "throw", "$", "this", "->", "newException", "(", "'You must specify a label for the group!'", ")", ";", "}", "if", "(", ...
Start a group for following messages. Options: Collapsed: [true|false] Color: [#RRGGBB|ColorName] @param string $Name @param array $Options OPTIONAL Instructions on how to log the group @return true @throws Exception
[ "Start", "a", "group", "for", "following", "messages", "." ]
86efc9c8a0d504e01e2fea55868227fdc8928841
https://github.com/KDF5000/EasyThink/blob/86efc9c8a0d504e01e2fea55868227fdc8928841/src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php#L838-L855
195,628
KDF5000/EasyThink
src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php
FirePHP.dump
public function dump($Key, $Variable, $Options = array()) { if (!is_string($Key)) { throw $this->newException('Key passed to dump() is not a string'); } if (strlen($Key)>100) { throw $this->newException('Key passed to dump() is longer than 100 characters'); } ...
php
public function dump($Key, $Variable, $Options = array()) { if (!is_string($Key)) { throw $this->newException('Key passed to dump() is not a string'); } if (strlen($Key)>100) { throw $this->newException('Key passed to dump() is longer than 100 characters'); } ...
[ "public", "function", "dump", "(", "$", "Key", ",", "$", "Variable", ",", "$", "Options", "=", "array", "(", ")", ")", "{", "if", "(", "!", "is_string", "(", "$", "Key", ")", ")", "{", "throw", "$", "this", "->", "newException", "(", "'Key passed t...
Dumps key and variable to firebug server panel @see FirePHP::DUMP @param string $Key @param mixed $Variable @return true @throws Exception
[ "Dumps", "key", "and", "variable", "to", "firebug", "server", "panel" ]
86efc9c8a0d504e01e2fea55868227fdc8928841
https://github.com/KDF5000/EasyThink/blob/86efc9c8a0d504e01e2fea55868227fdc8928841/src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php#L933-L945
195,629
KDF5000/EasyThink
src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php
FirePHP.table
public function table($Label, $Table, $Options = array()) { return $this->fb($Table, $Label, FirePHP::TABLE, $Options); }
php
public function table($Label, $Table, $Options = array()) { return $this->fb($Table, $Label, FirePHP::TABLE, $Options); }
[ "public", "function", "table", "(", "$", "Label", ",", "$", "Table", ",", "$", "Options", "=", "array", "(", ")", ")", "{", "return", "$", "this", "->", "fb", "(", "$", "Table", ",", "$", "Label", ",", "FirePHP", "::", "TABLE", ",", "$", "Options...
Log a table in the firebug console @see FirePHP::TABLE @param string $Label @param string $Table @return true @throws Exception
[ "Log", "a", "table", "in", "the", "firebug", "console" ]
86efc9c8a0d504e01e2fea55868227fdc8928841
https://github.com/KDF5000/EasyThink/blob/86efc9c8a0d504e01e2fea55868227fdc8928841/src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php#L969-L972
195,630
KDF5000/EasyThink
src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php
FirePHP.to
public static function to() { $instance = self::getInstance(); if (!method_exists($instance, "_to")) { throw new Exception("FirePHP::to() implementation not loaded"); } $args = func_get_args(); return call_user_func_array(array($instance, '_to'), $args); }
php
public static function to() { $instance = self::getInstance(); if (!method_exists($instance, "_to")) { throw new Exception("FirePHP::to() implementation not loaded"); } $args = func_get_args(); return call_user_func_array(array($instance, '_to'), $args); }
[ "public", "static", "function", "to", "(", ")", "{", "$", "instance", "=", "self", "::", "getInstance", "(", ")", ";", "if", "(", "!", "method_exists", "(", "$", "instance", ",", "\"_to\"", ")", ")", "{", "throw", "new", "Exception", "(", "\"FirePHP::t...
Insight API wrapper @see Insight_Helper::to()
[ "Insight", "API", "wrapper" ]
86efc9c8a0d504e01e2fea55868227fdc8928841
https://github.com/KDF5000/EasyThink/blob/86efc9c8a0d504e01e2fea55868227fdc8928841/src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php#L979-L987
195,631
KDF5000/EasyThink
src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php
FirePHP.detectClientExtension
public function detectClientExtension() { // Check if FirePHP is installed on client via User-Agent header if (@preg_match_all('/\sFirePHP\/([\.\d]*)\s?/si',$this->getUserAgent(),$m) && version_compare($m[1][0],'0.0.6','>=')) { return true; } else // Check if F...
php
public function detectClientExtension() { // Check if FirePHP is installed on client via User-Agent header if (@preg_match_all('/\sFirePHP\/([\.\d]*)\s?/si',$this->getUserAgent(),$m) && version_compare($m[1][0],'0.0.6','>=')) { return true; } else // Check if F...
[ "public", "function", "detectClientExtension", "(", ")", "{", "// Check if FirePHP is installed on client via User-Agent header", "if", "(", "@", "preg_match_all", "(", "'/\\sFirePHP\\/([\\.\\d]*)\\s?/si'", ",", "$", "this", "->", "getUserAgent", "(", ")", ",", "$", "m", ...
Check if FirePHP is installed on client @return boolean
[ "Check", "if", "FirePHP", "is", "installed", "on", "client" ]
86efc9c8a0d504e01e2fea55868227fdc8928841
https://github.com/KDF5000/EasyThink/blob/86efc9c8a0d504e01e2fea55868227fdc8928841/src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php#L1009-L1022
195,632
KDF5000/EasyThink
src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php
FirePHP._escapeTrace
protected function _escapeTrace($Trace) { if (!$Trace) return $Trace; for( $i=0 ; $i<sizeof($Trace) ; $i++ ) { if (isset($Trace[$i]['file'])) { $Trace[$i]['file'] = $this->_escapeTraceFile($Trace[$i]['file']); } if (isset($Trace[$i]['args'])) { ...
php
protected function _escapeTrace($Trace) { if (!$Trace) return $Trace; for( $i=0 ; $i<sizeof($Trace) ; $i++ ) { if (isset($Trace[$i]['file'])) { $Trace[$i]['file'] = $this->_escapeTraceFile($Trace[$i]['file']); } if (isset($Trace[$i]['args'])) { ...
[ "protected", "function", "_escapeTrace", "(", "$", "Trace", ")", "{", "if", "(", "!", "$", "Trace", ")", "return", "$", "Trace", ";", "for", "(", "$", "i", "=", "0", ";", "$", "i", "<", "sizeof", "(", "$", "Trace", ")", ";", "$", "i", "++", "...
Escape trace path for windows systems @param array $Trace @return array
[ "Escape", "trace", "path", "for", "windows", "systems" ]
86efc9c8a0d504e01e2fea55868227fdc8928841
https://github.com/KDF5000/EasyThink/blob/86efc9c8a0d504e01e2fea55868227fdc8928841/src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php#L1360-L1372
195,633
KDF5000/EasyThink
src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php
FirePHP.getRequestHeader
protected function getRequestHeader($Name) { $headers = self::getAllRequestHeaders(); if (isset($headers[strtolower($Name)])) { return $headers[strtolower($Name)]; } return false; }
php
protected function getRequestHeader($Name) { $headers = self::getAllRequestHeaders(); if (isset($headers[strtolower($Name)])) { return $headers[strtolower($Name)]; } return false; }
[ "protected", "function", "getRequestHeader", "(", "$", "Name", ")", "{", "$", "headers", "=", "self", "::", "getAllRequestHeaders", "(", ")", ";", "if", "(", "isset", "(", "$", "headers", "[", "strtolower", "(", "$", "Name", ")", "]", ")", ")", "{", ...
Get a request header @return string|false
[ "Get", "a", "request", "header" ]
86efc9c8a0d504e01e2fea55868227fdc8928841
https://github.com/KDF5000/EasyThink/blob/86efc9c8a0d504e01e2fea55868227fdc8928841/src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php#L1456-L1463
195,634
KDF5000/EasyThink
src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php
FirePHP.jsonEncode
public function jsonEncode($Object, $skipObjectEncode = false) { if (!$skipObjectEncode) { $Object = $this->encodeObject($Object); } if (function_exists('json_encode') && $this->options['useNativeJsonEncode']!=false) { return json_encode($Obje...
php
public function jsonEncode($Object, $skipObjectEncode = false) { if (!$skipObjectEncode) { $Object = $this->encodeObject($Object); } if (function_exists('json_encode') && $this->options['useNativeJsonEncode']!=false) { return json_encode($Obje...
[ "public", "function", "jsonEncode", "(", "$", "Object", ",", "$", "skipObjectEncode", "=", "false", ")", "{", "if", "(", "!", "$", "skipObjectEncode", ")", "{", "$", "Object", "=", "$", "this", "->", "encodeObject", "(", "$", "Object", ")", ";", "}", ...
Encode an object into a JSON string Uses PHP's jeson_encode() if available @param object $Object The object to be encoded @return string The JSON string
[ "Encode", "an", "object", "into", "a", "JSON", "string" ]
86efc9c8a0d504e01e2fea55868227fdc8928841
https://github.com/KDF5000/EasyThink/blob/86efc9c8a0d504e01e2fea55868227fdc8928841/src/ThinkPHP/Library/Behavior/FireShowPageTraceBehavior.php#L1484-L1497
195,635
geniv/nette-identity-authorizator
src/Drivers/DibiDriver.php
DibiDriver.saveRole
public function saveRole(array $values): int { $result = $this->generalSave($values, $this->tableRole); $this->cache->clean([Cache::TAGS => ['DibiDriver']]); return $result; }
php
public function saveRole(array $values): int { $result = $this->generalSave($values, $this->tableRole); $this->cache->clean([Cache::TAGS => ['DibiDriver']]); return $result; }
[ "public", "function", "saveRole", "(", "array", "$", "values", ")", ":", "int", "{", "$", "result", "=", "$", "this", "->", "generalSave", "(", "$", "values", ",", "$", "this", "->", "tableRole", ")", ";", "$", "this", "->", "cache", "->", "clean", ...
Save role. @param array $values @return int @throws UniqueConstraintViolationException @throws \Dibi\Exception
[ "Save", "role", "." ]
f7db1cd589d022b6443f24a59432098a343d4639
https://github.com/geniv/nette-identity-authorizator/blob/f7db1cd589d022b6443f24a59432098a343d4639/src/Drivers/DibiDriver.php#L186-L191
195,636
geniv/nette-identity-authorizator
src/Drivers/DibiDriver.php
DibiDriver.saveResource
public function saveResource(array $values): int { $result = $this->generalSave($values, $this->tableResource); $this->cache->clean([Cache::TAGS => ['DibiDriver']]); return $result; }
php
public function saveResource(array $values): int { $result = $this->generalSave($values, $this->tableResource); $this->cache->clean([Cache::TAGS => ['DibiDriver']]); return $result; }
[ "public", "function", "saveResource", "(", "array", "$", "values", ")", ":", "int", "{", "$", "result", "=", "$", "this", "->", "generalSave", "(", "$", "values", ",", "$", "this", "->", "tableResource", ")", ";", "$", "this", "->", "cache", "->", "c...
Save resource. @param array $values @return int @throws UniqueConstraintViolationException @throws \Dibi\Exception
[ "Save", "resource", "." ]
f7db1cd589d022b6443f24a59432098a343d4639
https://github.com/geniv/nette-identity-authorizator/blob/f7db1cd589d022b6443f24a59432098a343d4639/src/Drivers/DibiDriver.php#L202-L207
195,637
geniv/nette-identity-authorizator
src/Drivers/DibiDriver.php
DibiDriver.savePrivilege
public function savePrivilege(array $values): int { $result = $this->generalSave($values, $this->tablePrivilege); $this->cache->clean([Cache::TAGS => ['DibiDriver']]); return $result; }
php
public function savePrivilege(array $values): int { $result = $this->generalSave($values, $this->tablePrivilege); $this->cache->clean([Cache::TAGS => ['DibiDriver']]); return $result; }
[ "public", "function", "savePrivilege", "(", "array", "$", "values", ")", ":", "int", "{", "$", "result", "=", "$", "this", "->", "generalSave", "(", "$", "values", ",", "$", "this", "->", "tablePrivilege", ")", ";", "$", "this", "->", "cache", "->", ...
Save privilege. @param array $values @return int @throws UniqueConstraintViolationException @throws \Dibi\Exception
[ "Save", "privilege", "." ]
f7db1cd589d022b6443f24a59432098a343d4639
https://github.com/geniv/nette-identity-authorizator/blob/f7db1cd589d022b6443f24a59432098a343d4639/src/Drivers/DibiDriver.php#L218-L223
195,638
porkchopsandwiches/doctrine-utilities
lib/src/PorkChopSandwiches/Doctrine/Utilities/DB.php
DB.buildInQueryBindings
public function buildInQueryBindings ($values, $prefix = "in_", &$bound_parameters = array()) { $sql = "()"; if (is_array($values) && count($values) > 0) { $sql = array(); $values = array_values($values); foreach ($values as $index => $value) { $label_name = $prefix . "_" . $index; $sql[] = ...
php
public function buildInQueryBindings ($values, $prefix = "in_", &$bound_parameters = array()) { $sql = "()"; if (is_array($values) && count($values) > 0) { $sql = array(); $values = array_values($values); foreach ($values as $index => $value) { $label_name = $prefix . "_" . $index; $sql[] = ...
[ "public", "function", "buildInQueryBindings", "(", "$", "values", ",", "$", "prefix", "=", "\"in_\"", ",", "&", "$", "bound_parameters", "=", "array", "(", ")", ")", "{", "$", "sql", "=", "\"()\"", ";", "if", "(", "is_array", "(", "$", "values", ")", ...
Builds a sub-query for an IN statement with bound values. @example buildInQueryBindings(array("a", "b", "c"), "ex") => "(:ex_0, :ex_1, :ex_2)", and adds keys for 'ex_0', 'ex_1' and 'ex_2' to the bound parameters @param array $values The values to bind. @param string [$prefix] A prefix to apply to the bound ...
[ "Builds", "a", "sub", "-", "query", "for", "an", "IN", "statement", "with", "bound", "values", "." ]
cc5e4268bac36c68af62d69d9512a0dd01ee310f
https://github.com/porkchopsandwiches/doctrine-utilities/blob/cc5e4268bac36c68af62d69d9512a0dd01ee310f/lib/src/PorkChopSandwiches/Doctrine/Utilities/DB.php#L42-L60
195,639
porkchopsandwiches/doctrine-utilities
lib/src/PorkChopSandwiches/Doctrine/Utilities/DB.php
DB.query
public function query ($sql, array $bound_parameters = array(), $fetch = true) { $statement = $this -> entity_manager -> getConnection() -> prepare($sql); foreach ($bound_parameters as $parameter => $value) { $statement -> bindValue($parameter, $value); } $statement -> execute(); if ($fetch) { retur...
php
public function query ($sql, array $bound_parameters = array(), $fetch = true) { $statement = $this -> entity_manager -> getConnection() -> prepare($sql); foreach ($bound_parameters as $parameter => $value) { $statement -> bindValue($parameter, $value); } $statement -> execute(); if ($fetch) { retur...
[ "public", "function", "query", "(", "$", "sql", ",", "array", "$", "bound_parameters", "=", "array", "(", ")", ",", "$", "fetch", "=", "true", ")", "{", "$", "statement", "=", "$", "this", "->", "entity_manager", "->", "getConnection", "(", ")", "->", ...
Performs an arbitrary SQL query. @author Cam Morrow @param string $sql @param array [$bound_parameters] @param bool [$fetch] @return array|null
[ "Performs", "an", "arbitrary", "SQL", "query", "." ]
cc5e4268bac36c68af62d69d9512a0dd01ee310f
https://github.com/porkchopsandwiches/doctrine-utilities/blob/cc5e4268bac36c68af62d69d9512a0dd01ee310f/lib/src/PorkChopSandwiches/Doctrine/Utilities/DB.php#L73-L88
195,640
porkchopsandwiches/doctrine-utilities
lib/src/PorkChopSandwiches/Doctrine/Utilities/DB.php
DB.queryDQL
public function queryDQL ($dql, array $bound_parameters = array()) { $statement = $this -> entity_manager -> createQuery($dql); foreach ($bound_parameters as $parameter => $value) { $statement -> setParameter($parameter, $value); } return $statement -> getResult(); }
php
public function queryDQL ($dql, array $bound_parameters = array()) { $statement = $this -> entity_manager -> createQuery($dql); foreach ($bound_parameters as $parameter => $value) { $statement -> setParameter($parameter, $value); } return $statement -> getResult(); }
[ "public", "function", "queryDQL", "(", "$", "dql", ",", "array", "$", "bound_parameters", "=", "array", "(", ")", ")", "{", "$", "statement", "=", "$", "this", "->", "entity_manager", "->", "createQuery", "(", "$", "dql", ")", ";", "foreach", "(", "$",...
Performs an arbitrary DQL query. @param string $dql @param array [$bound_parameters] @return array
[ "Performs", "an", "arbitrary", "DQL", "query", "." ]
cc5e4268bac36c68af62d69d9512a0dd01ee310f
https://github.com/porkchopsandwiches/doctrine-utilities/blob/cc5e4268bac36c68af62d69d9512a0dd01ee310f/lib/src/PorkChopSandwiches/Doctrine/Utilities/DB.php#L98-L106
195,641
linkeddatacenter/BOTK-rdf
library/BOTK/RDF/HttpClient.php
HttpClient.useIdentity
public static function useIdentity($username=null,$password=null,$timeout=null) { $httpClient = \EasyRdf_Http::getDefaultHttpClient(); // if current default http client does not provide setAuth use a new instance of HttpClient if (!($httpClient instanceof \Zend_Http_Client or $...
php
public static function useIdentity($username=null,$password=null,$timeout=null) { $httpClient = \EasyRdf_Http::getDefaultHttpClient(); // if current default http client does not provide setAuth use a new instance of HttpClient if (!($httpClient instanceof \Zend_Http_Client or $...
[ "public", "static", "function", "useIdentity", "(", "$", "username", "=", "null", ",", "$", "password", "=", "null", ",", "$", "timeout", "=", "null", ")", "{", "$", "httpClient", "=", "\\", "EasyRdf_Http", "::", "getDefaultHttpClient", "(", ")", ";", "/...
Just an helper to use HttPClient as default EastRdf_default_client)
[ "Just", "an", "helper", "to", "use", "HttPClient", "as", "default", "EastRdf_default_client", ")" ]
f89eb4bd8eddbce75b8ca83a1199bd1e7481fc69
https://github.com/linkeddatacenter/BOTK-rdf/blob/f89eb4bd8eddbce75b8ca83a1199bd1e7481fc69/library/BOTK/RDF/HttpClient.php#L19-L34
195,642
lassodatasystems/LassoMailParserBundle
ParseHelper.php
ParseHelper.hasHeader
protected function hasHeader(Part $part, $header) { if (count($part->getHeaders()) < 1) { return false; } return $part ->getHeaders() ->has($header); }
php
protected function hasHeader(Part $part, $header) { if (count($part->getHeaders()) < 1) { return false; } return $part ->getHeaders() ->has($header); }
[ "protected", "function", "hasHeader", "(", "Part", "$", "part", ",", "$", "header", ")", "{", "if", "(", "count", "(", "$", "part", "->", "getHeaders", "(", ")", ")", "<", "1", ")", "{", "return", "false", ";", "}", "return", "$", "part", "->", "...
The confusing zend API makes a custom function for header checking necessary. @param Part $part @param string $header @return bool
[ "The", "confusing", "zend", "API", "makes", "a", "custom", "function", "for", "header", "checking", "necessary", "." ]
c7d2bde3034462fd305e38481cfb737b50eede0a
https://github.com/lassodatasystems/LassoMailParserBundle/blob/c7d2bde3034462fd305e38481cfb737b50eede0a/ParseHelper.php#L33-L42
195,643
lassodatasystems/LassoMailParserBundle
ParseHelper.php
ParseHelper.getContentType
protected function getContentType(Part $part) { if (!$this->hasHeader($part, 'Content-Type')) { throw new Exception('This email does not have a content type. Check for that with hasContentType()'); } $zendContentType = $part ->getHeaders() ->get('Content-...
php
protected function getContentType(Part $part) { if (!$this->hasHeader($part, 'Content-Type')) { throw new Exception('This email does not have a content type. Check for that with hasContentType()'); } $zendContentType = $part ->getHeaders() ->get('Content-...
[ "protected", "function", "getContentType", "(", "Part", "$", "part", ")", "{", "if", "(", "!", "$", "this", "->", "hasHeader", "(", "$", "part", ",", "'Content-Type'", ")", ")", "{", "throw", "new", "Exception", "(", "'This email does not have a content type. ...
Returns the content type of the given part. Since zends API allows for four different return values, we need to handle every type differently. Multiple content-type headers can't be accounted for, in those cases we simply take the first one and hope for the best. If it doesn't work, there's not much that could be done ...
[ "Returns", "the", "content", "type", "of", "the", "given", "part", ".", "Since", "zends", "API", "allows", "for", "four", "different", "return", "values", "we", "need", "to", "handle", "every", "type", "differently", ".", "Multiple", "content", "-", "type", ...
c7d2bde3034462fd305e38481cfb737b50eede0a
https://github.com/lassodatasystems/LassoMailParserBundle/blob/c7d2bde3034462fd305e38481cfb737b50eede0a/ParseHelper.php#L64-L88
195,644
cloudtek/dynamodm
lib/Cloudtek/DynamoDM/Type/Type.php
Type.convertToDatabaseValue
public function convertToDatabaseValue($value, $marshal = true) { $converted = $value !== null ? $this->databaseValue($value) : null; if (!$marshal) { return $converted; } return $converted === null ? self::getNull() : [static::$dynamoKey => $converted]; }
php
public function convertToDatabaseValue($value, $marshal = true) { $converted = $value !== null ? $this->databaseValue($value) : null; if (!$marshal) { return $converted; } return $converted === null ? self::getNull() : [static::$dynamoKey => $converted]; }
[ "public", "function", "convertToDatabaseValue", "(", "$", "value", ",", "$", "marshal", "=", "true", ")", "{", "$", "converted", "=", "$", "value", "!==", "null", "?", "$", "this", "->", "databaseValue", "(", "$", "value", ")", ":", "null", ";", "if", ...
Converts a value from its PHP representation of this type to its serialized DynamoDB representation, optionally applying marshalling afterwards. @param mixed $value The PHP value to convert. @param bool $marshal @return array|string The serialized DynamoDB representation of the value.
[ "Converts", "a", "value", "from", "its", "PHP", "representation", "of", "this", "type", "to", "its", "serialized", "DynamoDB", "representation", "optionally", "applying", "marshalling", "afterwards", "." ]
119d355e2c5cbaef1f867970349b4432f5704fcd
https://github.com/cloudtek/dynamodm/blob/119d355e2c5cbaef1f867970349b4432f5704fcd/lib/Cloudtek/DynamoDM/Type/Type.php#L113-L122
195,645
cloudtek/dynamodm
lib/Cloudtek/DynamoDM/Type/Type.php
Type.convertToPHPValue
public function convertToPHPValue($value, $unmarshal = true) { if ($unmarshal) { $value = $value === self::getNull() ? null : $value[static::$dynamoKey]; } return $value === null ? null : $this->phpValue($value); }
php
public function convertToPHPValue($value, $unmarshal = true) { if ($unmarshal) { $value = $value === self::getNull() ? null : $value[static::$dynamoKey]; } return $value === null ? null : $this->phpValue($value); }
[ "public", "function", "convertToPHPValue", "(", "$", "value", ",", "$", "unmarshal", "=", "true", ")", "{", "if", "(", "$", "unmarshal", ")", "{", "$", "value", "=", "$", "value", "===", "self", "::", "getNull", "(", ")", "?", "null", ":", "$", "va...
Converts a value from its serialized DynamoDB representation to its PHP representation of this type, optionally unmarshalling it first. @param array|string $value The serialized DynamoDB value to convert. @param bool $unmarshal @return mixed The PHP representation of the value.
[ "Converts", "a", "value", "from", "its", "serialized", "DynamoDB", "representation", "to", "its", "PHP", "representation", "of", "this", "type", "optionally", "unmarshalling", "it", "first", "." ]
119d355e2c5cbaef1f867970349b4432f5704fcd
https://github.com/cloudtek/dynamodm/blob/119d355e2c5cbaef1f867970349b4432f5704fcd/lib/Cloudtek/DynamoDM/Type/Type.php#L133-L140
195,646
cloudtek/dynamodm
lib/Cloudtek/DynamoDM/Type/Type.php
Type.convertUnmappedToPHPValue
public static function convertUnmappedToPHPValue($value) { $type = key($value); $value = current($value); switch ($type) { case 'S': case 'B': case 'BOOL': return $value; case 'NULL': return null; c...
php
public static function convertUnmappedToPHPValue($value) { $type = key($value); $value = current($value); switch ($type) { case 'S': case 'B': case 'BOOL': return $value; case 'NULL': return null; c...
[ "public", "static", "function", "convertUnmappedToPHPValue", "(", "$", "value", ")", "{", "$", "type", "=", "key", "(", "$", "value", ")", ";", "$", "value", "=", "current", "(", "$", "value", ")", ";", "switch", "(", "$", "type", ")", "{", "case", ...
Child values of a list or map do not have an ODM type mapped, it must be inferred from the value and DynamoDB data type. Adapted from {@see \Aws\DynamoDb\Marshaler}. @param mixed $value @return mixed The PHP representation of the value.
[ "Child", "values", "of", "a", "list", "or", "map", "do", "not", "have", "an", "ODM", "type", "mapped", "it", "must", "be", "inferred", "from", "the", "value", "and", "DynamoDB", "data", "type", "." ]
119d355e2c5cbaef1f867970349b4432f5704fcd
https://github.com/cloudtek/dynamodm/blob/119d355e2c5cbaef1f867970349b4432f5704fcd/lib/Cloudtek/DynamoDM/Type/Type.php#L152-L188
195,647
dms-org/common.structure
src/Geo/Country.php
Country.fromName
public static function fromName(string $countryName): Country { self::getNameMap(); if (!isset(self::$alpha2CodeMap[$countryName])) { throw InvalidArgumentException::format( 'Invalid country short name supplied to %s: country \'%s\' is not a valid option', ...
php
public static function fromName(string $countryName): Country { self::getNameMap(); if (!isset(self::$alpha2CodeMap[$countryName])) { throw InvalidArgumentException::format( 'Invalid country short name supplied to %s: country \'%s\' is not a valid option', ...
[ "public", "static", "function", "fromName", "(", "string", "$", "countryName", ")", ":", "Country", "{", "self", "::", "getNameMap", "(", ")", ";", "if", "(", "!", "isset", "(", "self", "::", "$", "alpha2CodeMap", "[", "$", "countryName", "]", ")", ")"...
Builds a country enum from the supplied country short name. @param string $countryName @return Country @throws InvalidArgumentException
[ "Builds", "a", "country", "enum", "from", "the", "supplied", "country", "short", "name", "." ]
23f122182f60df5ec847047a81a39c8aab019ff1
https://github.com/dms-org/common.structure/blob/23f122182f60df5ec847047a81a39c8aab019ff1/src/Geo/Country.php#L310-L322
195,648
dms-org/common.structure
src/Geo/Country.php
Country.getNameMap
public static function getNameMap(): array { if (self::$nameMap === null) { self::$nameMap = []; $countries = self::getLoader()->all(); foreach ($countries as $country) { self::$nameMap[$country['alpha2']] = $country['name']; } ...
php
public static function getNameMap(): array { if (self::$nameMap === null) { self::$nameMap = []; $countries = self::getLoader()->all(); foreach ($countries as $country) { self::$nameMap[$country['alpha2']] = $country['name']; } ...
[ "public", "static", "function", "getNameMap", "(", ")", ":", "array", "{", "if", "(", "self", "::", "$", "nameMap", "===", "null", ")", "{", "self", "::", "$", "nameMap", "=", "[", "]", ";", "$", "countries", "=", "self", "::", "getLoader", "(", ")...
Returns an array the country short names indexed by their respective ISO 3166-1 alpha-2 country code. @return string[]
[ "Returns", "an", "array", "the", "country", "short", "names", "indexed", "by", "their", "respective", "ISO", "3166", "-", "1", "alpha", "-", "2", "country", "code", "." ]
23f122182f60df5ec847047a81a39c8aab019ff1
https://github.com/dms-org/common.structure/blob/23f122182f60df5ec847047a81a39c8aab019ff1/src/Geo/Country.php#L344-L358
195,649
nicmart/DomainSpecificQuery
src/Lucene/Compiler/Map/MapBuilder.php
MapBuilder.combine
public function combine($op, $map1/**, $transf2,... */) { $transformations = func_get_args(); array_shift($transformations); return function(Expression $expr, $compiler) use ($op, $transformations) { $tree = new SpanExpression(strtoupper($op)); foreach ($tra...
php
public function combine($op, $map1/**, $transf2,... */) { $transformations = func_get_args(); array_shift($transformations); return function(Expression $expr, $compiler) use ($op, $transformations) { $tree = new SpanExpression(strtoupper($op)); foreach ($tra...
[ "public", "function", "combine", "(", "$", "op", ",", "$", "map1", "/**, $transf2,... */", ")", "{", "$", "transformations", "=", "func_get_args", "(", ")", ";", "array_shift", "(", "$", "transformations", ")", ";", "return", "function", "(", "Expression", "...
Combine many maps to a single tree one @param string $op A boolean operator @param callable $map1, ... @return callable
[ "Combine", "many", "maps", "to", "a", "single", "tree", "one" ]
7c01fe94337afdfae5884809e8b5487127a63ac3
https://github.com/nicmart/DomainSpecificQuery/blob/7c01fe94337afdfae5884809e8b5487127a63ac3/src/Lucene/Compiler/Map/MapBuilder.php#L142-L157
195,650
nicmart/DomainSpecificQuery
src/Lucene/Compiler/Map/MapBuilder.php
MapBuilder.regexps
public function regexps(array $regexpsMap) { return function(FieldExpression $expr, $compiler) use ($regexpsMap) { $value = $expr->getValue(); foreach ($regexpsMap as $regexp => $transformation) { if (preg_match($regexp, $value)) return $t...
php
public function regexps(array $regexpsMap) { return function(FieldExpression $expr, $compiler) use ($regexpsMap) { $value = $expr->getValue(); foreach ($regexpsMap as $regexp => $transformation) { if (preg_match($regexp, $value)) return $t...
[ "public", "function", "regexps", "(", "array", "$", "regexpsMap", ")", "{", "return", "function", "(", "FieldExpression", "$", "expr", ",", "$", "compiler", ")", "use", "(", "$", "regexpsMap", ")", "{", "$", "value", "=", "$", "expr", "->", "getValue", ...
This map select the transformation with regexps on the exoression value @param callable[] $regexpsMap @return callable
[ "This", "map", "select", "the", "transformation", "with", "regexps", "on", "the", "exoression", "value" ]
7c01fe94337afdfae5884809e8b5487127a63ac3
https://github.com/nicmart/DomainSpecificQuery/blob/7c01fe94337afdfae5884809e8b5487127a63ac3/src/Lucene/Compiler/Map/MapBuilder.php#L165-L178
195,651
nicmart/DomainSpecificQuery
src/Lucene/Compiler/Map/MapBuilder.php
MapBuilder.conditional
public function conditional($condition1, $map1/*, $condition2, $map2*/) { $args = func_get_args(); return function(Expression $expr, $compiler) use ($args) { $numargs = count($args); for ($i = 0; $i + 1 < $numargs; $i += 2) { $condition = $args[$i]; ...
php
public function conditional($condition1, $map1/*, $condition2, $map2*/) { $args = func_get_args(); return function(Expression $expr, $compiler) use ($args) { $numargs = count($args); for ($i = 0; $i + 1 < $numargs; $i += 2) { $condition = $args[$i]; ...
[ "public", "function", "conditional", "(", "$", "condition1", ",", "$", "map1", "/*, $condition2, $map2*/", ")", "{", "$", "args", "=", "func_get_args", "(", ")", ";", "return", "function", "(", "Expression", "$", "expr", ",", "$", "compiler", ")", "use", "...
Build a map from a collection of condition and map couples. It will be used the map of the first matched condition. @param callable $condition1 @param callable $map1 , ... @return callable
[ "Build", "a", "map", "from", "a", "collection", "of", "condition", "and", "map", "couples", ".", "It", "will", "be", "used", "the", "map", "of", "the", "first", "matched", "condition", "." ]
7c01fe94337afdfae5884809e8b5487127a63ac3
https://github.com/nicmart/DomainSpecificQuery/blob/7c01fe94337afdfae5884809e8b5487127a63ac3/src/Lucene/Compiler/Map/MapBuilder.php#L189-L203
195,652
nicmart/DomainSpecificQuery
src/Lucene/Compiler/Map/MapBuilder.php
MapBuilder.attr
public function attr($map, array $attributes) { return function(Expression $expr, $compiler) use ($map, $attributes) { $luceneExpr = $map($expr, $compiler); foreach ($attributes as $name => $value) { $luceneExpr[$name] = $value; } ret...
php
public function attr($map, array $attributes) { return function(Expression $expr, $compiler) use ($map, $attributes) { $luceneExpr = $map($expr, $compiler); foreach ($attributes as $name => $value) { $luceneExpr[$name] = $value; } ret...
[ "public", "function", "attr", "(", "$", "map", ",", "array", "$", "attributes", ")", "{", "return", "function", "(", "Expression", "$", "expr", ",", "$", "compiler", ")", "use", "(", "$", "map", ",", "$", "attributes", ")", "{", "$", "luceneExpr", "=...
Set attributes in the resulting expression. @param $map @param array $attributes @return callable
[ "Set", "attributes", "in", "the", "resulting", "expression", "." ]
7c01fe94337afdfae5884809e8b5487127a63ac3
https://github.com/nicmart/DomainSpecificQuery/blob/7c01fe94337afdfae5884809e8b5487127a63ac3/src/Lucene/Compiler/Map/MapBuilder.php#L234-L246
195,653
AnonymPHP/Anonym-Route
Middleware.php
Middleware.middleware
public function middleware($name = '', $role = '', Closure $next = null) { if (!$this->accessDispatcher) { $this->accessDispatcher = new AccessDispatcher(); } $middleware = $this->accessDispatcher->process([ 'name' => $name, 'role' => $role, '...
php
public function middleware($name = '', $role = '', Closure $next = null) { if (!$this->accessDispatcher) { $this->accessDispatcher = new AccessDispatcher(); } $middleware = $this->accessDispatcher->process([ 'name' => $name, 'role' => $role, '...
[ "public", "function", "middleware", "(", "$", "name", "=", "''", ",", "$", "role", "=", "''", ",", "Closure", "$", "next", "=", "null", ")", "{", "if", "(", "!", "$", "this", "->", "accessDispatcher", ")", "{", "$", "this", "->", "accessDispatcher", ...
determine user authentication @param string $name the middleware name @param string|array $role the role of user, can be string or array @param Closure $next the callback for middleware @throws MiddlewareException @return bool
[ "determine", "user", "authentication" ]
bb7f8004fbbd2998af8b0061f404f026f11466ab
https://github.com/AnonymPHP/Anonym-Route/blob/bb7f8004fbbd2998af8b0061f404f026f11466ab/Middleware.php#L41-L58
195,654
Blipfoto/php-sdk
src/Blipfoto/Api/File.php
File.path
public function path() { $args = func_get_args(); if (count($args)) { $this->path = $this->verify($args[0]); } return $this->path; }
php
public function path() { $args = func_get_args(); if (count($args)) { $this->path = $this->verify($args[0]); } return $this->path; }
[ "public", "function", "path", "(", ")", "{", "$", "args", "=", "func_get_args", "(", ")", ";", "if", "(", "count", "(", "$", "args", ")", ")", "{", "$", "this", "->", "path", "=", "$", "this", "->", "verify", "(", "$", "args", "[", "0", "]", ...
Get or set the path. @param string $path (optional) @return string
[ "Get", "or", "set", "the", "path", "." ]
04f770ac7427e79d15f97b993c787651079cdeb4
https://github.com/Blipfoto/php-sdk/blob/04f770ac7427e79d15f97b993c787651079cdeb4/src/Blipfoto/Api/File.php#L29-L35
195,655
Blipfoto/php-sdk
src/Blipfoto/Api/File.php
File.verify
public function verify($path) { $full_path = realpath($path); $data = @getimagesize($full_path); if (!$data) { throw new FileException(sprintf('File "%s" cannot be read.', $path), 1); } if ($data[2] != IMG_JPG) { throw new FileException(sprintf('File "%s" is not a JPG.', $path), 240); } if ($data[0]...
php
public function verify($path) { $full_path = realpath($path); $data = @getimagesize($full_path); if (!$data) { throw new FileException(sprintf('File "%s" cannot be read.', $path), 1); } if ($data[2] != IMG_JPG) { throw new FileException(sprintf('File "%s" is not a JPG.', $path), 240); } if ($data[0]...
[ "public", "function", "verify", "(", "$", "path", ")", "{", "$", "full_path", "=", "realpath", "(", "$", "path", ")", ";", "$", "data", "=", "@", "getimagesize", "(", "$", "full_path", ")", ";", "if", "(", "!", "$", "data", ")", "{", "throw", "ne...
Verify the file at a path. @param string $path @return string @throws FileException
[ "Verify", "the", "file", "at", "a", "path", "." ]
04f770ac7427e79d15f97b993c787651079cdeb4
https://github.com/Blipfoto/php-sdk/blob/04f770ac7427e79d15f97b993c787651079cdeb4/src/Blipfoto/Api/File.php#L44-L57
195,656
eureka-framework/component-response
src/Response/Json/Json.php
Json.renderContent
public function renderContent() { $string = json_encode($this->getContent(), $this->option, $this->depth); if (json_last_error() !== JSON_ERROR_NONE) { throw new \RuntimeException('Json encode error ! (error: ' . json_last_error_msg() . ')'); } return $string; }
php
public function renderContent() { $string = json_encode($this->getContent(), $this->option, $this->depth); if (json_last_error() !== JSON_ERROR_NONE) { throw new \RuntimeException('Json encode error ! (error: ' . json_last_error_msg() . ')'); } return $string; }
[ "public", "function", "renderContent", "(", ")", "{", "$", "string", "=", "json_encode", "(", "$", "this", "->", "getContent", "(", ")", ",", "$", "this", "->", "option", ",", "$", "this", "->", "depth", ")", ";", "if", "(", "json_last_error", "(", "...
Encode content into json format & display it. @return string @throws \RuntimeException
[ "Encode", "content", "into", "json", "format", "&", "display", "it", "." ]
f34aea3a0aa67b88c5e7f8a3b86af29c550fa99a
https://github.com/eureka-framework/component-response/blob/f34aea3a0aa67b88c5e7f8a3b86af29c550fa99a/src/Response/Json/Json.php#L46-L55
195,657
Torann/skosh-generator
src/Content/Content.php
Content.load
protected function load(SplFileInfo $file) { // File info $this->filename = $file->getBasename(); $this->sourcePath = $file->getRelativePath(); // Load the file $data = $file->getContents(); list($content, $meta) = $this->splitContentMeta($data); // Parse m...
php
protected function load(SplFileInfo $file) { // File info $this->filename = $file->getBasename(); $this->sourcePath = $file->getRelativePath(); // Load the file $data = $file->getContents(); list($content, $meta) = $this->splitContentMeta($data); // Parse m...
[ "protected", "function", "load", "(", "SplFileInfo", "$", "file", ")", "{", "// File info", "$", "this", "->", "filename", "=", "$", "file", "->", "getBasename", "(", ")", ";", "$", "this", "->", "sourcePath", "=", "$", "file", "->", "getRelativePath", "...
Load and parse content from file. @param SplFileInfo $file @return void
[ "Load", "and", "parse", "content", "from", "file", "." ]
ea60e037d92398d7c146eb2349735d5692e3c48c
https://github.com/Torann/skosh-generator/blob/ea60e037d92398d7c146eb2349735d5692e3c48c/src/Content/Content.php#L98-L170
195,658
Torann/skosh-generator
src/Content/Content.php
Content.splitContentMeta
protected function splitContentMeta($data) { // Remove Byte Order Mark (BOM) $data = preg_replace('/\x{EF}\x{BB}\x{BF}/', '', $data); // Pattern for detecting a metadata separator (---) // Using ^ and $ in this way requires the PCRE_MULTILINE modifier $pattern = '/' // Patte...
php
protected function splitContentMeta($data) { // Remove Byte Order Mark (BOM) $data = preg_replace('/\x{EF}\x{BB}\x{BF}/', '', $data); // Pattern for detecting a metadata separator (---) // Using ^ and $ in this way requires the PCRE_MULTILINE modifier $pattern = '/' // Patte...
[ "protected", "function", "splitContentMeta", "(", "$", "data", ")", "{", "// Remove Byte Order Mark (BOM)", "$", "data", "=", "preg_replace", "(", "'/\\x{EF}\\x{BB}\\x{BF}/'", ",", "''", ",", "$", "data", ")", ";", "// Pattern for detecting a metadata separator (---)", ...
Parse metadata and content @param string $data @return array
[ "Parse", "metadata", "and", "content" ]
ea60e037d92398d7c146eb2349735d5692e3c48c
https://github.com/Torann/skosh-generator/blob/ea60e037d92398d7c146eb2349735d5692e3c48c/src/Content/Content.php#L178-L211
195,659
Torann/skosh-generator
src/Content/Content.php
Content.setTarget
protected function setTarget(SplFileInfo $file) { // Page extension $ext = $file->getExtension(); // Twig templates are HTML if (!$this->has('template') || $this->get('template') === 'none') { $targetExt = $ext; } else { $targetExt = 'html'; ...
php
protected function setTarget(SplFileInfo $file) { // Page extension $ext = $file->getExtension(); // Twig templates are HTML if (!$this->has('template') || $this->get('template') === 'none') { $targetExt = $ext; } else { $targetExt = 'html'; ...
[ "protected", "function", "setTarget", "(", "SplFileInfo", "$", "file", ")", "{", "// Page extension", "$", "ext", "=", "$", "file", "->", "getExtension", "(", ")", ";", "// Twig templates are HTML", "if", "(", "!", "$", "this", "->", "has", "(", "'template'"...
Determine the target path. @param SplFileInfo $file @return string
[ "Determine", "the", "target", "path", "." ]
ea60e037d92398d7c146eb2349735d5692e3c48c
https://github.com/Torann/skosh-generator/blob/ea60e037d92398d7c146eb2349735d5692e3c48c/src/Content/Content.php#L232-L251
195,660
zhaoxianfang/tools
src/Symfony/Component/DependencyInjection/Definition.php
Definition.setMethodCalls
public function setMethodCalls(array $calls = array()) { $this->calls = array(); foreach ($calls as $call) { $this->addMethodCall($call[0], $call[1]); } return $this; }
php
public function setMethodCalls(array $calls = array()) { $this->calls = array(); foreach ($calls as $call) { $this->addMethodCall($call[0], $call[1]); } return $this; }
[ "public", "function", "setMethodCalls", "(", "array", "$", "calls", "=", "array", "(", ")", ")", "{", "$", "this", "->", "calls", "=", "array", "(", ")", ";", "foreach", "(", "$", "calls", "as", "$", "call", ")", "{", "$", "this", "->", "addMethodC...
Sets the methods to call after service initialization. @return $this
[ "Sets", "the", "methods", "to", "call", "after", "service", "initialization", "." ]
d8fc8a9ecd75b5ce4236f0a2e9fdc055108573e7
https://github.com/zhaoxianfang/tools/blob/d8fc8a9ecd75b5ce4236f0a2e9fdc055108573e7/src/Symfony/Component/DependencyInjection/Definition.php#L323-L331
195,661
zhaoxianfang/tools
src/Symfony/Component/DependencyInjection/Definition.php
Definition.addAutowiringType
public function addAutowiringType($type) { @trigger_error(sprintf('Autowiring-types are deprecated since Symfony 3.3 and will be removed in 4.0. Use aliases instead for "%s".', $type), E_USER_DEPRECATED); $this->autowiringTypes[$type] = true; return $this; }
php
public function addAutowiringType($type) { @trigger_error(sprintf('Autowiring-types are deprecated since Symfony 3.3 and will be removed in 4.0. Use aliases instead for "%s".', $type), E_USER_DEPRECATED); $this->autowiringTypes[$type] = true; return $this; }
[ "public", "function", "addAutowiringType", "(", "$", "type", ")", "{", "@", "trigger_error", "(", "sprintf", "(", "'Autowiring-types are deprecated since Symfony 3.3 and will be removed in 4.0. Use aliases instead for \"%s\".'", ",", "$", "type", ")", ",", "E_USER_DEPRECATED", ...
Adds a type that will default to this definition. @param string $type @return $this @deprecated since version 3.3, to be removed in 4.0.
[ "Adds", "a", "type", "that", "will", "default", "to", "this", "definition", "." ]
d8fc8a9ecd75b5ce4236f0a2e9fdc055108573e7
https://github.com/zhaoxianfang/tools/blob/d8fc8a9ecd75b5ce4236f0a2e9fdc055108573e7/src/Symfony/Component/DependencyInjection/Definition.php#L879-L886
195,662
zhaoxianfang/tools
src/Symfony/Component/DependencyInjection/Definition.php
Definition.hasAutowiringType
public function hasAutowiringType($type) { @trigger_error(sprintf('Autowiring-types are deprecated since Symfony 3.3 and will be removed in 4.0. Use aliases instead for "%s".', $type), E_USER_DEPRECATED); return isset($this->autowiringTypes[$type]); }
php
public function hasAutowiringType($type) { @trigger_error(sprintf('Autowiring-types are deprecated since Symfony 3.3 and will be removed in 4.0. Use aliases instead for "%s".', $type), E_USER_DEPRECATED); return isset($this->autowiringTypes[$type]); }
[ "public", "function", "hasAutowiringType", "(", "$", "type", ")", "{", "@", "trigger_error", "(", "sprintf", "(", "'Autowiring-types are deprecated since Symfony 3.3 and will be removed in 4.0. Use aliases instead for \"%s\".'", ",", "$", "type", ")", ",", "E_USER_DEPRECATED", ...
Will this definition default for the given type? @param string $type @return bool @deprecated since version 3.3, to be removed in 4.0.
[ "Will", "this", "definition", "default", "for", "the", "given", "type?" ]
d8fc8a9ecd75b5ce4236f0a2e9fdc055108573e7
https://github.com/zhaoxianfang/tools/blob/d8fc8a9ecd75b5ce4236f0a2e9fdc055108573e7/src/Symfony/Component/DependencyInjection/Definition.php#L915-L920
195,663
stubbles/stubbles-peer
src/main/php/http/HttpResponse.php
HttpResponse.readHeader
private function readHeader(): self { if (null !== $this->statusLine) { return $this; } do { $this->parseStatusLine($this->socket->readLine()); $headers = ''; $line = ''; while (!$this->socket->eof() && Http::END_OF_LINE !== $li...
php
private function readHeader(): self { if (null !== $this->statusLine) { return $this; } do { $this->parseStatusLine($this->socket->readLine()); $headers = ''; $line = ''; while (!$this->socket->eof() && Http::END_OF_LINE !== $li...
[ "private", "function", "readHeader", "(", ")", ":", "self", "{", "if", "(", "null", "!==", "$", "this", "->", "statusLine", ")", "{", "return", "$", "this", ";", "}", "do", "{", "$", "this", "->", "parseStatusLine", "(", "$", "this", "->", "socket", ...
reads response headers @return \stubbles\peer\http\HttpResponse
[ "reads", "response", "headers" ]
dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc
https://github.com/stubbles/stubbles-peer/blob/dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc/src/main/php/http/HttpResponse.php#L173-L191
195,664
stubbles/stubbles-peer
src/main/php/http/HttpResponse.php
HttpResponse.parseStatusLine
private function parseStatusLine(string $statusLine) { $matches = []; if (preg_match("=^(HTTP/\d+\.\d+) (\d{3}) ([^\r]*)=", $statusLine, $matches) == false) { throw new ProtocolViolation( 'Received status line "' . addcslashes($statusLine, "\0..\37!\177..\377") ...
php
private function parseStatusLine(string $statusLine) { $matches = []; if (preg_match("=^(HTTP/\d+\.\d+) (\d{3}) ([^\r]*)=", $statusLine, $matches) == false) { throw new ProtocolViolation( 'Received status line "' . addcslashes($statusLine, "\0..\37!\177..\377") ...
[ "private", "function", "parseStatusLine", "(", "string", "$", "statusLine", ")", "{", "$", "matches", "=", "[", "]", ";", "if", "(", "preg_match", "(", "\"=^(HTTP/\\d+\\.\\d+) (\\d{3}) ([^\\r]*)=\"", ",", "$", "statusLine", ",", "$", "matches", ")", "==", "fal...
parses first line of response @param string $statusLine first line of response @throws ProtocolViolation when status line can not be parsed
[ "parses", "first", "line", "of", "response" ]
dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc
https://github.com/stubbles/stubbles-peer/blob/dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc/src/main/php/http/HttpResponse.php#L199-L213
195,665
stubbles/stubbles-peer
src/main/php/http/HttpResponse.php
HttpResponse.readBody
private function readBody(): self { if (null !== $this->body) { return $this; } if ($this->headers->get('Transfer-Encoding') === 'chunked') { $this->body = $this->readChunked(); } else { $this->body = $this->readDefault((int) $this->headers->get('...
php
private function readBody(): self { if (null !== $this->body) { return $this; } if ($this->headers->get('Transfer-Encoding') === 'chunked') { $this->body = $this->readChunked(); } else { $this->body = $this->readDefault((int) $this->headers->get('...
[ "private", "function", "readBody", "(", ")", ":", "self", "{", "if", "(", "null", "!==", "$", "this", "->", "body", ")", "{", "return", "$", "this", ";", "}", "if", "(", "$", "this", "->", "headers", "->", "get", "(", "'Transfer-Encoding'", ")", "=...
reads the response body @return \stubbles\peer\http\HttpResponse
[ "reads", "the", "response", "body" ]
dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc
https://github.com/stubbles/stubbles-peer/blob/dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc/src/main/php/http/HttpResponse.php#L230-L243
195,666
stubbles/stubbles-peer
src/main/php/http/HttpResponse.php
HttpResponse.readChunked
private function readChunked(): string { $readLength = 0; $chunksize = null; $extension = null; $body = ''; sscanf($this->socket->readLine(), '%x%s', $chunksize, $extension); while (0 < $chunksize) { $data = $this->socket->read($chunksize + ...
php
private function readChunked(): string { $readLength = 0; $chunksize = null; $extension = null; $body = ''; sscanf($this->socket->readLine(), '%x%s', $chunksize, $extension); while (0 < $chunksize) { $data = $this->socket->read($chunksize + ...
[ "private", "function", "readChunked", "(", ")", ":", "string", "{", "$", "readLength", "=", "0", ";", "$", "chunksize", "=", "null", ";", "$", "extension", "=", "null", ";", "$", "body", "=", "''", ";", "sscanf", "(", "$", "this", "->", "socket", "...
helper method to read chunked response body The method implements the pseudo code given in RFC 2616 section 19.4.6: Introduction of Transfer-Encoding. Chunk extensions are ignored. @return string
[ "helper", "method", "to", "read", "chunked", "response", "body" ]
dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc
https://github.com/stubbles/stubbles-peer/blob/dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc/src/main/php/http/HttpResponse.php#L253-L270
195,667
stubbles/stubbles-peer
src/main/php/http/HttpResponse.php
HttpResponse.readDefault
private function readDefault(int $readLength): string { $body = $buffer = ''; $read = 0; while ($read < $readLength && !$this->socket->eof()) { $buffer = $this->socket->read($readLength); $read += strlen($buffer); $body .= $buffer; } ...
php
private function readDefault(int $readLength): string { $body = $buffer = ''; $read = 0; while ($read < $readLength && !$this->socket->eof()) { $buffer = $this->socket->read($readLength); $read += strlen($buffer); $body .= $buffer; } ...
[ "private", "function", "readDefault", "(", "int", "$", "readLength", ")", ":", "string", "{", "$", "body", "=", "$", "buffer", "=", "''", ";", "$", "read", "=", "0", ";", "while", "(", "$", "read", "<", "$", "readLength", "&&", "!", "$", "this", ...
helper method for default reading of response body @param int $readLength expected length of response body @return string
[ "helper", "method", "for", "default", "reading", "of", "response", "body" ]
dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc
https://github.com/stubbles/stubbles-peer/blob/dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc/src/main/php/http/HttpResponse.php#L278-L289
195,668
OpenConext-Attic/OpenConext-engineblock-metadata
src/MetadataRepository/DoctrineMetadataRepository.php
DoctrineMetadataRepository.findReservedSchacHomeOrganizations
public function findReservedSchacHomeOrganizations() { $queryBuilder = $this->idpRepository ->createQueryBuilder('role') ->select('role.schacHomeOrganization') ->distinct() ->orderBy('role.schacHomeOrganization'); $this->compositeFilter->toQueryBuilde...
php
public function findReservedSchacHomeOrganizations() { $queryBuilder = $this->idpRepository ->createQueryBuilder('role') ->select('role.schacHomeOrganization') ->distinct() ->orderBy('role.schacHomeOrganization'); $this->compositeFilter->toQueryBuilde...
[ "public", "function", "findReservedSchacHomeOrganizations", "(", ")", "{", "$", "queryBuilder", "=", "$", "this", "->", "idpRepository", "->", "createQueryBuilder", "(", "'role'", ")", "->", "select", "(", "'role.schacHomeOrganization'", ")", "->", "distinct", "(", ...
Find all SchacHomeOrganizations that are reserved by Identity Providers. @return string[]
[ "Find", "all", "SchacHomeOrganizations", "that", "are", "reserved", "by", "Identity", "Providers", "." ]
236e2f52ef9cf28e71404544a1c4388f63ee535d
https://github.com/OpenConext-Attic/OpenConext-engineblock-metadata/blob/236e2f52ef9cf28e71404544a1c4388f63ee535d/src/MetadataRepository/DoctrineMetadataRepository.php#L93-L106
195,669
OpenConext-Attic/OpenConext-engineblock-metadata
src/MetadataRepository/DoctrineMetadataRepository.php
DoctrineMetadataRepository.synchronize
public function synchronize(array $roles) { $result = new SynchronizationResult(); $repository = $this; $this->entityManager->transactional(function (EntityManager $em) use ($roles, $repository, $result) { $idpsToBeRemoved = $repository->findAllIdentityProviderEntityIds(); ...
php
public function synchronize(array $roles) { $result = new SynchronizationResult(); $repository = $this; $this->entityManager->transactional(function (EntityManager $em) use ($roles, $repository, $result) { $idpsToBeRemoved = $repository->findAllIdentityProviderEntityIds(); ...
[ "public", "function", "synchronize", "(", "array", "$", "roles", ")", "{", "$", "result", "=", "new", "SynchronizationResult", "(", ")", ";", "$", "repository", "=", "$", "this", ";", "$", "this", "->", "entityManager", "->", "transactional", "(", "functio...
Synchronize the database with the provided roles. Any roles (idp or sp) already existing the database are updated. New roles are created. All identity- or service providers in the database which are NOT in the provided roles are deleted at the end of the synchronization process. @param AbstractRole[] $roles @return S...
[ "Synchronize", "the", "database", "with", "the", "provided", "roles", "." ]
236e2f52ef9cf28e71404544a1c4388f63ee535d
https://github.com/OpenConext-Attic/OpenConext-engineblock-metadata/blob/236e2f52ef9cf28e71404544a1c4388f63ee535d/src/MetadataRepository/DoctrineMetadataRepository.php#L244-L312
195,670
rollerworks/search-doctrine-orm
CachedDqlConditionGenerator.php
CachedDqlConditionGenerator.updateQuery
public function updateQuery(string $prependQuery = ' WHERE '): self { $whereCase = $this->getWhereClause($prependQuery); if ($whereCase !== '') { $this->query->setDQL($this->query->getDQL().$whereCase); $this->query->setHint( $this->conditionGenerator->getQue...
php
public function updateQuery(string $prependQuery = ' WHERE '): self { $whereCase = $this->getWhereClause($prependQuery); if ($whereCase !== '') { $this->query->setDQL($this->query->getDQL().$whereCase); $this->query->setHint( $this->conditionGenerator->getQue...
[ "public", "function", "updateQuery", "(", "string", "$", "prependQuery", "=", "' WHERE '", ")", ":", "self", "{", "$", "whereCase", "=", "$", "this", "->", "getWhereClause", "(", "$", "prependQuery", ")", ";", "if", "(", "$", "whereCase", "!==", "''", ")...
Updates the configured query object with the where-clause. @param string $prependQuery Prepends this string to the where-clause ("WHERE" or "AND" for example)
[ "Updates", "the", "configured", "query", "object", "with", "the", "where", "-", "clause", "." ]
d4d7e9cfc6591d34e9d00f084c35f109f971ac4f
https://github.com/rollerworks/search-doctrine-orm/blob/d4d7e9cfc6591d34e9d00f084c35f109f971ac4f/CachedDqlConditionGenerator.php#L116-L129
195,671
rollerworks/search-doctrine-orm
CachedDqlConditionGenerator.php
CachedDqlConditionGenerator.getQueryHintValue
public function getQueryHintValue(): SqlConversionInfo { if (null === $this->whereClause) { throw new BadMethodCallException( 'Unable to get query-hint value for ConditionGenerator. Call getWhereClause() before calling this method.' ); } return new Sq...
php
public function getQueryHintValue(): SqlConversionInfo { if (null === $this->whereClause) { throw new BadMethodCallException( 'Unable to get query-hint value for ConditionGenerator. Call getWhereClause() before calling this method.' ); } return new Sq...
[ "public", "function", "getQueryHintValue", "(", ")", ":", "SqlConversionInfo", "{", "if", "(", "null", "===", "$", "this", "->", "whereClause", ")", "{", "throw", "new", "BadMethodCallException", "(", "'Unable to get query-hint value for ConditionGenerator. Call getWhereC...
Returns the Query-hint value for the final query object. The Query hint is used for value-conversions. @return SqlConversionInfo
[ "Returns", "the", "Query", "-", "hint", "value", "for", "the", "final", "query", "object", "." ]
d4d7e9cfc6591d34e9d00f084c35f109f971ac4f
https://github.com/rollerworks/search-doctrine-orm/blob/d4d7e9cfc6591d34e9d00f084c35f109f971ac4f/CachedDqlConditionGenerator.php#L150-L163
195,672
karwana/php-messageformat
MessageFormat/MessageFormat.php
MessageFormat.get
public function get($message_key) { $this->ensureLoaded(); // Check for a section key, which uses a period as a separator. $separator = strpos($message_key, '.'); if (false === $separator) { if (isset($this->messages[$message_key])) { return $this->messages[$message_key]; } if (isset($this->link)...
php
public function get($message_key) { $this->ensureLoaded(); // Check for a section key, which uses a period as a separator. $separator = strpos($message_key, '.'); if (false === $separator) { if (isset($this->messages[$message_key])) { return $this->messages[$message_key]; } if (isset($this->link)...
[ "public", "function", "get", "(", "$", "message_key", ")", "{", "$", "this", "->", "ensureLoaded", "(", ")", ";", "// Check for a section key, which uses a period as a separator.", "$", "separator", "=", "strpos", "(", "$", "message_key", ",", "'.'", ")", ";", "...
Gets the raw value of a message. @param string $message_key @return string
[ "Gets", "the", "raw", "value", "of", "a", "message", "." ]
bf6a25ffb6ad99d1a67bdaa6b8ab029e6fa30e8f
https://github.com/karwana/php-messageformat/blob/bf6a25ffb6ad99d1a67bdaa6b8ab029e6fa30e8f/MessageFormat/MessageFormat.php#L142-L175
195,673
karwana/php-messageformat
MessageFormat/MessageFormat.php
MessageFormat.format
public function format($message_key, $args) { return \MessageFormatter::formatMessage($this->locale, $this->get($message_key), $args); }
php
public function format($message_key, $args) { return \MessageFormatter::formatMessage($this->locale, $this->get($message_key), $args); }
[ "public", "function", "format", "(", "$", "message_key", ",", "$", "args", ")", "{", "return", "\\", "MessageFormatter", "::", "formatMessage", "(", "$", "this", "->", "locale", ",", "$", "this", "->", "get", "(", "$", "message_key", ")", ",", "$", "ar...
Gets the formatted value of a message. @param string $message_key @param array $args @return string
[ "Gets", "the", "formatted", "value", "of", "a", "message", "." ]
bf6a25ffb6ad99d1a67bdaa6b8ab029e6fa30e8f
https://github.com/karwana/php-messageformat/blob/bf6a25ffb6ad99d1a67bdaa6b8ab029e6fa30e8f/MessageFormat/MessageFormat.php#L186-L188
195,674
SlaxWeb/View
src/AbstractLoader.php
AbstractLoader.setTemplate
public function setTemplate(string $template): self { $this->template = $template; $this->logger->debug("Template file set to loader.", ["template" => $this->template]); return $this; }
php
public function setTemplate(string $template): self { $this->template = $template; $this->logger->debug("Template file set to loader.", ["template" => $this->template]); return $this; }
[ "public", "function", "setTemplate", "(", "string", "$", "template", ")", ":", "self", "{", "$", "this", "->", "template", "=", "$", "template", ";", "$", "this", "->", "logger", "->", "debug", "(", "\"Template file set to loader.\"", ",", "[", "\"template\"...
Set the template Sets the template filename. @param string $template Name of the template file @return self
[ "Set", "the", "template" ]
f5dac7c5c7466a0ecd417f22c9da1308b7ce2eac
https://github.com/SlaxWeb/View/blob/f5dac7c5c7466a0ecd417f22c9da1308b7ce2eac/src/AbstractLoader.php#L121-L126
195,675
SlaxWeb/View
src/AbstractLoader.php
AbstractLoader.setTemplateDir
public function setTemplateDir(string $templateDir): self { $this->templateDir = rtrim($templateDir, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; $this->logger->debug("Template directory set to loader." , ["templateDir" => $this->templateDir]); return $this; }
php
public function setTemplateDir(string $templateDir): self { $this->templateDir = rtrim($templateDir, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; $this->logger->debug("Template directory set to loader." , ["templateDir" => $this->templateDir]); return $this; }
[ "public", "function", "setTemplateDir", "(", "string", "$", "templateDir", ")", ":", "self", "{", "$", "this", "->", "templateDir", "=", "rtrim", "(", "$", "templateDir", ",", "DIRECTORY_SEPARATOR", ")", ".", "DIRECTORY_SEPARATOR", ";", "$", "this", "->", "l...
Set the template directory Sets the template directory name. @param string $templateDir Name of the template directory @return self
[ "Set", "the", "template", "directory" ]
f5dac7c5c7466a0ecd417f22c9da1308b7ce2eac
https://github.com/SlaxWeb/View/blob/f5dac7c5c7466a0ecd417f22c9da1308b7ce2eac/src/AbstractLoader.php#L136-L141
195,676
OpenConext/Stepup-bundle
src/Request/RequestId.php
RequestId.set
public function set($requestId, $allowOverwrite = false) { if ($this->requestId !== null && !$allowOverwrite) { throw new \LogicException('May not overwrite request ID.'); } $this->requestId = $requestId; }
php
public function set($requestId, $allowOverwrite = false) { if ($this->requestId !== null && !$allowOverwrite) { throw new \LogicException('May not overwrite request ID.'); } $this->requestId = $requestId; }
[ "public", "function", "set", "(", "$", "requestId", ",", "$", "allowOverwrite", "=", "false", ")", "{", "if", "(", "$", "this", "->", "requestId", "!==", "null", "&&", "!", "$", "allowOverwrite", ")", "{", "throw", "new", "\\", "LogicException", "(", "...
We allow overwriting the RequestId so that we can inject a RequestId from a header when log statements already have been made - which would cause an exception otherwise. The use-case here is the Stepup-Middleware application, this application receives API-calls, but by then log messages have already been written. Howev...
[ "We", "allow", "overwriting", "the", "RequestId", "so", "that", "we", "can", "inject", "a", "RequestId", "from", "a", "header", "when", "log", "statements", "already", "have", "been", "made", "-", "which", "would", "cause", "an", "exception", "otherwise", "....
94178ddb421889df9e068109293a8da880793ed2
https://github.com/OpenConext/Stepup-bundle/blob/94178ddb421889df9e068109293a8da880793ed2/src/Request/RequestId.php#L70-L77
195,677
fridge-project/dbal
src/Fridge/DBAL/Schema/Diff/SchemaDiff.php
SchemaDiff.hasTableDifference
private function hasTableDifference() { return !empty($this->createdTables) || !empty($this->alteredTables) || !empty($this->droppedTables); }
php
private function hasTableDifference() { return !empty($this->createdTables) || !empty($this->alteredTables) || !empty($this->droppedTables); }
[ "private", "function", "hasTableDifference", "(", ")", "{", "return", "!", "empty", "(", "$", "this", "->", "createdTables", ")", "||", "!", "empty", "(", "$", "this", "->", "alteredTables", ")", "||", "!", "empty", "(", "$", "this", "->", "droppedTables...
Checks if the schema diff has table difference. @return boolean TRUE if the schema diff has table difference else FALSE.
[ "Checks", "if", "the", "schema", "diff", "has", "table", "difference", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Schema/Diff/SchemaDiff.php#L178-L181
195,678
freialib/hlin.security
src/Protocol.php
Protocol.matches
function matches($entity, array $context = null, $attribute = null) { // cycle though acceptable entities foreach ($this->entities as $name) { // found an entity if ($name === $entity) { if ($this->parameters !== null) { // we check if every paramter registered for this permission // definition...
php
function matches($entity, array $context = null, $attribute = null) { // cycle though acceptable entities foreach ($this->entities as $name) { // found an entity if ($name === $entity) { if ($this->parameters !== null) { // we check if every paramter registered for this permission // definition...
[ "function", "matches", "(", "$", "entity", ",", "array", "$", "context", "=", "null", ",", "$", "attribute", "=", "null", ")", "{", "// cycle though acceptable entities", "foreach", "(", "$", "this", "->", "entities", "as", "$", "name", ")", "{", "// found...
Relays are entities or routes, context is an array of values required for the match, among these values "owner" is a special idenfication value. For inpage elements you must provide attribute restrictions. An attribute is an element on the page. @return boolean
[ "Relays", "are", "entities", "or", "routes", "context", "is", "an", "array", "of", "values", "required", "for", "the", "match", "among", "these", "values", "owner", "is", "a", "special", "idenfication", "value", "." ]
7f6aea6a7eb64f1095e176ddfad64008eed68b2e
https://github.com/freialib/hlin.security/blob/7f6aea6a7eb64f1095e176ddfad64008eed68b2e/src/Protocol.php#L28-L114
195,679
wb-crowdfusion/crowdfusion
system/core/classes/libraries/utils/SlugUtils.php
SlugUtils.isSlug
public static function isSlug($string, $with_slash=true) { if ($with_slash) $match = '/'.self::SLUG_WITH_SLASH_MATCH.'/'; else $match = '/'.self::SLUG_MATCH.'/'; return preg_match($match, $string) > 0; }
php
public static function isSlug($string, $with_slash=true) { if ($with_slash) $match = '/'.self::SLUG_WITH_SLASH_MATCH.'/'; else $match = '/'.self::SLUG_MATCH.'/'; return preg_match($match, $string) > 0; }
[ "public", "static", "function", "isSlug", "(", "$", "string", ",", "$", "with_slash", "=", "true", ")", "{", "if", "(", "$", "with_slash", ")", "$", "match", "=", "'/'", ".", "self", "::", "SLUG_WITH_SLASH_MATCH", ".", "'/'", ";", "else", "$", "match",...
Determines if the string given is a slug or not. @param string $string The string to test @param boolean $with_slash If true, then slashes will be allowed in the slug @return boolean True if string is a slug
[ "Determines", "if", "the", "string", "given", "is", "a", "slug", "or", "not", "." ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/libraries/utils/SlugUtils.php#L215-L223
195,680
wb-crowdfusion/crowdfusion
system/core/classes/libraries/utils/SlugUtils.php
SlugUtils.createSlugFromCamelCase
public static function createSlugFromCamelCase($string, $allowSlashes = false) { $string = trim(preg_replace('/(([A-Z]|[0-9])[^A-Z])/',' $1',$string)); return SlugUtils::createSlug($string,$allowSlashes); }
php
public static function createSlugFromCamelCase($string, $allowSlashes = false) { $string = trim(preg_replace('/(([A-Z]|[0-9])[^A-Z])/',' $1',$string)); return SlugUtils::createSlug($string,$allowSlashes); }
[ "public", "static", "function", "createSlugFromCamelCase", "(", "$", "string", ",", "$", "allowSlashes", "=", "false", ")", "{", "$", "string", "=", "trim", "(", "preg_replace", "(", "'/(([A-Z]|[0-9])[^A-Z])/'", ",", "' $1'", ",", "$", "string", ")", ")", ";...
Creates a slug from the camel case text given. Adds space in between words starting with capital letters and acronyms. @param string $string A bit of camel case text that we will generate our slug from. @param boolean $allowSlashes If set to false, any slashes will be removed from the slug. Default: false @ret...
[ "Creates", "a", "slug", "from", "the", "camel", "case", "text", "given", ".", "Adds", "space", "in", "between", "words", "starting", "with", "capital", "letters", "and", "acronyms", "." ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/libraries/utils/SlugUtils.php#L235-L240
195,681
lasallecms/lasallecms-l5-lasallecmsemail-pkg
src/Processing/BaseInboundProcessing.php
BaseInboundProcessing.sendEmailNotificationToSender
public function sendEmailNotificationToSender($message, $mappedVars) { // Prep the email $data = $this->prepareNotificationEmailData($message, $mappedVars); // What blade file to use? $emailBladeFile = 'lasallecmsemail::email.notification_email_to_inbound_sender'; // Send da e...
php
public function sendEmailNotificationToSender($message, $mappedVars) { // Prep the email $data = $this->prepareNotificationEmailData($message, $mappedVars); // What blade file to use? $emailBladeFile = 'lasallecmsemail::email.notification_email_to_inbound_sender'; // Send da e...
[ "public", "function", "sendEmailNotificationToSender", "(", "$", "message", ",", "$", "mappedVars", ")", "{", "// Prep the email", "$", "data", "=", "$", "this", "->", "prepareNotificationEmailData", "(", "$", "message", ",", "$", "mappedVars", ")", ";", "// Wha...
Send an email notification to sender @param string $message Message to put in the body of the email @param array $mappedVars Inbound POST vars mapped to database fields @return void
[ "Send", "an", "email", "notification", "to", "sender" ]
95db5a59ab322105b9d3681cf9ab1f829c9fdb9f
https://github.com/lasallecms/lasallecms-l5-lasallecmsemail-pkg/blob/95db5a59ab322105b9d3681cf9ab1f829c9fdb9f/src/Processing/BaseInboundProcessing.php#L120-L135
195,682
lasallecms/lasallecms-l5-lasallecmsemail-pkg
src/Processing/BaseInboundProcessing.php
BaseInboundProcessing.prepareNotificationEmailData
public function prepareNotificationEmailData($message, $mappedVars) { $data = []; // Build the email data $data['site_name'] = config('lasallecmsfrontend.site_name'); $data['from_name'] = $data['site_name']; $data['from_email_address'] = config('lasalle...
php
public function prepareNotificationEmailData($message, $mappedVars) { $data = []; // Build the email data $data['site_name'] = config('lasallecmsfrontend.site_name'); $data['from_name'] = $data['site_name']; $data['from_email_address'] = config('lasalle...
[ "public", "function", "prepareNotificationEmailData", "(", "$", "message", ",", "$", "mappedVars", ")", "{", "$", "data", "=", "[", "]", ";", "// Build the email data", "$", "data", "[", "'site_name'", "]", "=", "config", "(", "'lasallecmsfrontend.site_name'", "...
Prepare the data needed to send out a notification email to the inbound email's sender NOTE! USING MAILGUN SPECIFIC POST VARS FOR THE "TO" EMAIL FIELDS! @param string $message Message to put in the body of the email @param array $mappedVars Inbound POST vars mapped to database fields @ret...
[ "Prepare", "the", "data", "needed", "to", "send", "out", "a", "notification", "email", "to", "the", "inbound", "email", "s", "sender" ]
95db5a59ab322105b9d3681cf9ab1f829c9fdb9f
https://github.com/lasallecms/lasallecms-l5-lasallecmsemail-pkg/blob/95db5a59ab322105b9d3681cf9ab1f829c9fdb9f/src/Processing/BaseInboundProcessing.php#L147-L162
195,683
lasallecms/lasallecms-l5-lasallecmsemail-pkg
src/Processing/BaseInboundProcessing.php
BaseInboundProcessing.buildDataForDatabaseInsert
public function buildDataForDatabaseInsert($mappedVars) { $data = []; $data['priority_id'] = null; $data['slug'] = $this->genericCreateSlug($mappedVars['subject']); $data['sent'] = 1; $data['sent_timestamp'] = Carbon::now(); $data[...
php
public function buildDataForDatabaseInsert($mappedVars) { $data = []; $data['priority_id'] = null; $data['slug'] = $this->genericCreateSlug($mappedVars['subject']); $data['sent'] = 1; $data['sent_timestamp'] = Carbon::now(); $data[...
[ "public", "function", "buildDataForDatabaseInsert", "(", "$", "mappedVars", ")", "{", "$", "data", "=", "[", "]", ";", "$", "data", "[", "'priority_id'", "]", "=", "null", ";", "$", "data", "[", "'slug'", "]", "=", "$", "this", "->", "genericCreateSlug",...
Build the data for the INSERT into email_messages. Some fields are already in the $data array. These are the db fields that are missing in the $data array. @param array $mappedVars Inbound POST vars mapped to database fields @return array
[ "Build", "the", "data", "for", "the", "INSERT", "into", "email_messages", "." ]
95db5a59ab322105b9d3681cf9ab1f829c9fdb9f
https://github.com/lasallecms/lasallecms-l5-lasallecmsemail-pkg/blob/95db5a59ab322105b9d3681cf9ab1f829c9fdb9f/src/Processing/BaseInboundProcessing.php#L189-L207
195,684
lasallecms/lasallecms-l5-lasallecmsemail-pkg
src/Processing/BaseInboundProcessing.php
BaseInboundProcessing.prepareAttachmentDataForInsert
public function prepareAttachmentDataForInsert($emailMessageID, $attachment, $attachmentPath, $data=null) { $data1 = []; $data1['email_messages_id'] = $emailMessageID; $data1['attachment_path'] = $attachmentPath; $data1['attachment_filename'] = $data['attachment-'.$attachment]->ge...
php
public function prepareAttachmentDataForInsert($emailMessageID, $attachment, $attachmentPath, $data=null) { $data1 = []; $data1['email_messages_id'] = $emailMessageID; $data1['attachment_path'] = $attachmentPath; $data1['attachment_filename'] = $data['attachment-'.$attachment]->ge...
[ "public", "function", "prepareAttachmentDataForInsert", "(", "$", "emailMessageID", ",", "$", "attachment", ",", "$", "attachmentPath", ",", "$", "data", "=", "null", ")", "{", "$", "data1", "=", "[", "]", ";", "$", "data1", "[", "'email_messages_id'", "]", ...
Prepare the data for the INSERT into the "email_attachments" db table. @param int $emailMessageID The ID of the just inserted "email_messages" record @param int $attachment What attachment number? eg, attachment-1. AKA, Mailgun's "attachment-x" post var @param string $attachmentPath Where are the...
[ "Prepare", "the", "data", "for", "the", "INSERT", "into", "the", "email_attachments", "db", "table", "." ]
95db5a59ab322105b9d3681cf9ab1f829c9fdb9f
https://github.com/lasallecms/lasallecms-l5-lasallecmsemail-pkg/blob/95db5a59ab322105b9d3681cf9ab1f829c9fdb9f/src/Processing/BaseInboundProcessing.php#L252-L278
195,685
lasallecms/lasallecms-l5-lasallecmsemail-pkg
src/Processing/BaseInboundProcessing.php
BaseInboundProcessing.manageTokenBasedLogin
public function manageTokenBasedLogin($user_id, $email) { //------------------------------------------------------------- // Create a Login Token so customer login bypasses login form //------------------------------------------------------------- $this->userTokenbasedloginRepository->c...
php
public function manageTokenBasedLogin($user_id, $email) { //------------------------------------------------------------- // Create a Login Token so customer login bypasses login form //------------------------------------------------------------- $this->userTokenbasedloginRepository->c...
[ "public", "function", "manageTokenBasedLogin", "(", "$", "user_id", ",", "$", "email", ")", "{", "//-------------------------------------------------------------", "// Create a Login Token so customer login bypasses login form", "//----------------------------------------------------------...
Create the token for token based login; and, send out the email with the token based login link, to a user @param int $user_id ID field of the "users" db table @param array $email Email fields for the outgoing email with the token login link @return void
[ "Create", "the", "token", "for", "token", "based", "login", ";", "and", "send", "out", "the", "email", "with", "the", "token", "based", "login", "link", "to", "a", "user" ]
95db5a59ab322105b9d3681cf9ab1f829c9fdb9f
https://github.com/lasallecms/lasallecms-l5-lasallecmsemail-pkg/blob/95db5a59ab322105b9d3681cf9ab1f829c9fdb9f/src/Processing/BaseInboundProcessing.php#L293-L306
195,686
phossa/phossa-route
src/Phossa/Route/Collector/CollectorAbstract.php
CollectorAbstract.setCollectorHandler
protected function setCollectorHandler(ResultInterface $result) { $status = $result->getStatus(); if (is_null($result->getHandler()) && $this->getHandler($status)) { // debug message $this->debug(Message::get( Message::DEBUG_SET_C_HANDLER, get_...
php
protected function setCollectorHandler(ResultInterface $result) { $status = $result->getStatus(); if (is_null($result->getHandler()) && $this->getHandler($status)) { // debug message $this->debug(Message::get( Message::DEBUG_SET_C_HANDLER, get_...
[ "protected", "function", "setCollectorHandler", "(", "ResultInterface", "$", "result", ")", "{", "$", "status", "=", "$", "result", "->", "getStatus", "(", ")", ";", "if", "(", "is_null", "(", "$", "result", "->", "getHandler", "(", ")", ")", "&&", "$", ...
Set collector level handler if result has no handler set yet @param ResultInterface $result desc @return self @access protected
[ "Set", "collector", "level", "handler", "if", "result", "has", "no", "handler", "set", "yet" ]
fdcc1c814b8b1692a60d433d3c085e6c7a923acc
https://github.com/phossa/phossa-route/blob/fdcc1c814b8b1692a60d433d3c085e6c7a923acc/src/Phossa/Route/Collector/CollectorAbstract.php#L150-L163
195,687
sndsgd/http
src/http/UploadedFile.php
UploadedFile.getContentType
public function getContentType(bool $allowUnverified = false): string { # always use the verified content type if it exists if ($this->contentType === null) { if ($allowUnverified) { return $this->unverifiedContentType; } $this->contentType = $this...
php
public function getContentType(bool $allowUnverified = false): string { # always use the verified content type if it exists if ($this->contentType === null) { if ($allowUnverified) { return $this->unverifiedContentType; } $this->contentType = $this...
[ "public", "function", "getContentType", "(", "bool", "$", "allowUnverified", "=", "false", ")", ":", "string", "{", "# always use the verified content type if it exists", "if", "(", "$", "this", "->", "contentType", "===", "null", ")", "{", "if", "(", "$", "allo...
Get the content type @param bool $allowUnverified @return string
[ "Get", "the", "content", "type" ]
e7f82010a66c6d3241a24ea82baf4593130c723b
https://github.com/sndsgd/http/blob/e7f82010a66c6d3241a24ea82baf4593130c723b/src/http/UploadedFile.php#L94-L104
195,688
sndsgd/http
src/http/UploadedFile.php
UploadedFile.isType
public function isType( array $mimeTypes, bool $allowUnverified = false ): bool { $contentType = $this->getContentType($allowUnverified); foreach ($mimeTypes as $type) { if (strtolower($type) === $contentType) { return true; } } ...
php
public function isType( array $mimeTypes, bool $allowUnverified = false ): bool { $contentType = $this->getContentType($allowUnverified); foreach ($mimeTypes as $type) { if (strtolower($type) === $contentType) { return true; } } ...
[ "public", "function", "isType", "(", "array", "$", "mimeTypes", ",", "bool", "$", "allowUnverified", "=", "false", ")", ":", "bool", "{", "$", "contentType", "=", "$", "this", "->", "getContentType", "(", "$", "allowUnverified", ")", ";", "foreach", "(", ...
Determine whether the file type matches any that are provided @param array<string> $mimeTypes Acceptable mime types @param bool $allowUnverified Whether to trust the client provided type @return bool
[ "Determine", "whether", "the", "file", "type", "matches", "any", "that", "are", "provided" ]
e7f82010a66c6d3241a24ea82baf4593130c723b
https://github.com/sndsgd/http/blob/e7f82010a66c6d3241a24ea82baf4593130c723b/src/http/UploadedFile.php#L124-L136
195,689
sndsgd/http
src/http/UploadedFile.php
UploadedFile.getFormattedSize
public function getFormattedSize( int $precision = 0, string $point = ".", string $sep = "," ): string { return \sndsgd\Fs::formatSize($this->size, $precision, $point, $sep); }
php
public function getFormattedSize( int $precision = 0, string $point = ".", string $sep = "," ): string { return \sndsgd\Fs::formatSize($this->size, $precision, $point, $sep); }
[ "public", "function", "getFormattedSize", "(", "int", "$", "precision", "=", "0", ",", "string", "$", "point", "=", "\".\"", ",", "string", "$", "sep", "=", "\",\"", ")", ":", "string", "{", "return", "\\", "sndsgd", "\\", "Fs", "::", "formatSize", "("...
Retrieve a human readable version of the size @param int $precision The number of decimal places to show @param string $point The decimal point @param string $sep The thousands separator @return string
[ "Retrieve", "a", "human", "readable", "version", "of", "the", "size" ]
e7f82010a66c6d3241a24ea82baf4593130c723b
https://github.com/sndsgd/http/blob/e7f82010a66c6d3241a24ea82baf4593130c723b/src/http/UploadedFile.php#L156-L163
195,690
sndsgd/http
src/http/UploadedFile.php
UploadedFile.toArray
public function toArray(): array { return [ "clientFilename" => $this->getClientFilename(), "unverifiedContentType" => $this->error ? "" : $this->getContentType(true), "verifiedContentType" => $this->error ? "" : $this->getContentType(), "size" => $this->error...
php
public function toArray(): array { return [ "clientFilename" => $this->getClientFilename(), "unverifiedContentType" => $this->error ? "" : $this->getContentType(true), "verifiedContentType" => $this->error ? "" : $this->getContentType(), "size" => $this->error...
[ "public", "function", "toArray", "(", ")", ":", "array", "{", "return", "[", "\"clientFilename\"", "=>", "$", "this", "->", "getClientFilename", "(", ")", ",", "\"unverifiedContentType\"", "=>", "$", "this", "->", "error", "?", "\"\"", ":", "$", "this", "-...
Get an array representation of this object @return array
[ "Get", "an", "array", "representation", "of", "this", "object" ]
e7f82010a66c6d3241a24ea82baf4593130c723b
https://github.com/sndsgd/http/blob/e7f82010a66c6d3241a24ea82baf4593130c723b/src/http/UploadedFile.php#L192-L202
195,691
cubicmushroom/valueobjects
src/Web/EmailAddress.php
EmailAddress.getDomainPart
public function getDomainPart() { $parts = \explode('@', $this->toNative()); $domain = \trim($parts[1], '[]'); return Domain::specifyType($domain); }
php
public function getDomainPart() { $parts = \explode('@', $this->toNative()); $domain = \trim($parts[1], '[]'); return Domain::specifyType($domain); }
[ "public", "function", "getDomainPart", "(", ")", "{", "$", "parts", "=", "\\", "explode", "(", "'@'", ",", "$", "this", "->", "toNative", "(", ")", ")", ";", "$", "domain", "=", "\\", "trim", "(", "$", "parts", "[", "1", "]", ",", "'[]'", ")", ...
Returns the domain part of the email address @return Domain
[ "Returns", "the", "domain", "part", "of", "the", "email", "address" ]
4554239ab75d65eeb9773219aa5b07e9fbfabb92
https://github.com/cubicmushroom/valueobjects/blob/4554239ab75d65eeb9773219aa5b07e9fbfabb92/src/Web/EmailAddress.php#L44-L50
195,692
randomhost/image
src/php/Text/Decorator/Border.php
Border.insertTextBorder
protected function insertTextBorder($xPosition, $yPosition, $text) { if (!$this->getBorderColor() instanceof Image\Color) { throw new \RuntimeException( 'Attempt to render text border without setting a color' ); } /* * Set the alpha transpare...
php
protected function insertTextBorder($xPosition, $yPosition, $text) { if (!$this->getBorderColor() instanceof Image\Color) { throw new \RuntimeException( 'Attempt to render text border without setting a color' ); } /* * Set the alpha transpare...
[ "protected", "function", "insertTextBorder", "(", "$", "xPosition", ",", "$", "yPosition", ",", "$", "text", ")", "{", "if", "(", "!", "$", "this", "->", "getBorderColor", "(", ")", "instanceof", "Image", "\\", "Color", ")", "{", "throw", "new", "\\", ...
Renders the given text border onto the image resource, using the given coordinates. @param int $xPosition The x-ordinate. @param int $yPosition The y-ordinate position of the fonts baseline. @param string $text The text string in UTF-8 encoding. @return $this; @throws \RuntimeException Thrown if $this->im...
[ "Renders", "the", "given", "text", "border", "onto", "the", "image", "resource", "using", "the", "given", "coordinates", "." ]
bd669ba6b50fd2bbbe50c4ef06235b111a8a30b0
https://github.com/randomhost/image/blob/bd669ba6b50fd2bbbe50c4ef06235b111a8a30b0/src/php/Text/Decorator/Border.php#L81-L121
195,693
Aviogram/Common
src/PHPClass/Element/ClassTrait.php
ClassTrait.resolveConflictInsteadOf
public function resolveConflictInsteadOf($trait, $method, $insteadOfTrait) { $fullClass = $this->classFile->getFullClassName($trait); if (method_exists($fullClass, $method) === false) { throw \Aviogram\Common\PHPClass\Exception\ClassTrait::undefinedMethod($trait, $method); } ...
php
public function resolveConflictInsteadOf($trait, $method, $insteadOfTrait) { $fullClass = $this->classFile->getFullClassName($trait); if (method_exists($fullClass, $method) === false) { throw \Aviogram\Common\PHPClass\Exception\ClassTrait::undefinedMethod($trait, $method); } ...
[ "public", "function", "resolveConflictInsteadOf", "(", "$", "trait", ",", "$", "method", ",", "$", "insteadOfTrait", ")", "{", "$", "fullClass", "=", "$", "this", "->", "classFile", "->", "getFullClassName", "(", "$", "trait", ")", ";", "if", "(", "method_...
Resolve method name conflict with ignoring one trait over the other @param string $trait The trait that will be used @param string $method The method of the trait which causes the conflict @param string $insteadOfTrait The trait which will be ignored @return $this @throws \Aviogram\Common\PHPClass\Ex...
[ "Resolve", "method", "name", "conflict", "with", "ignoring", "one", "trait", "over", "the", "other" ]
bcff2e409cccd4791a3f9bca0b2cdd70c25ddec5
https://github.com/Aviogram/Common/blob/bcff2e409cccd4791a3f9bca0b2cdd70c25ddec5/src/PHPClass/Element/ClassTrait.php#L58-L84
195,694
Aviogram/Common
src/PHPClass/Element/ClassTrait.php
ClassTrait.resolveConflictAlias
public function resolveConflictAlias($trait, $method, $alias) { $fullClass = $this->classFile->getFullClassName($trait); if (method_exists($fullClass, $method) === false) { throw \Aviogram\Common\PHPClass\Exception\ClassTrait::undefinedMethod($trait, $method); } $this->c...
php
public function resolveConflictAlias($trait, $method, $alias) { $fullClass = $this->classFile->getFullClassName($trait); if (method_exists($fullClass, $method) === false) { throw \Aviogram\Common\PHPClass\Exception\ClassTrait::undefinedMethod($trait, $method); } $this->c...
[ "public", "function", "resolveConflictAlias", "(", "$", "trait", ",", "$", "method", ",", "$", "alias", ")", "{", "$", "fullClass", "=", "$", "this", "->", "classFile", "->", "getFullClassName", "(", "$", "trait", ")", ";", "if", "(", "method_exists", "(...
Resolve method name conflict with aliasing the method name @param string $trait The trait that causing the conflict @param string $method The method of the trait that causing the conflict @param string $alias The alias for the method @return $this @throws \Aviogram\Common\PHPClass\Exception\ClassTrait When the tr...
[ "Resolve", "method", "name", "conflict", "with", "aliasing", "the", "method", "name" ]
bcff2e409cccd4791a3f9bca0b2cdd70c25ddec5
https://github.com/Aviogram/Common/blob/bcff2e409cccd4791a3f9bca0b2cdd70c25ddec5/src/PHPClass/Element/ClassTrait.php#L97-L115
195,695
t3v/t3v_datamapper
Classes/Service/PageService.php
PageService.getPageByUid
public function getPageByUid(int $uid, int $languageUid = null) { return $this->getPage($uid, $languageUid); }
php
public function getPageByUid(int $uid, int $languageUid = null) { return $this->getPage($uid, $languageUid); }
[ "public", "function", "getPageByUid", "(", "int", "$", "uid", ",", "int", "$", "languageUid", "=", "null", ")", "{", "return", "$", "this", "->", "getPage", "(", "$", "uid", ",", "$", "languageUid", ")", ";", "}" ]
Gets a page by UID. Alias for `getPage`. @param int $uid The UID of the page @param int $languageUid The optional language UID, defaults to the UID of the current system language @return array|null The row for the page or null if no page was found
[ "Gets", "a", "page", "by", "UID", "." ]
bab2de90f467936fbe4270cd133cb4109d1108eb
https://github.com/t3v/t3v_datamapper/blob/bab2de90f467936fbe4270cd133cb4109d1108eb/Classes/Service/PageService.php#L167-L169
195,696
t3v/t3v_datamapper
Classes/Service/PageService.php
PageService.getPages
public function getPages($uids, int $languageUid = null): array { $pages = []; if (is_string($uids)) { $uids = GeneralUtility::intExplode(',', $uids, true); } if ($uids) { foreach($uids as $uid) { $record = $this->getPage($uid, $languageUid); if ($record) { $page...
php
public function getPages($uids, int $languageUid = null): array { $pages = []; if (is_string($uids)) { $uids = GeneralUtility::intExplode(',', $uids, true); } if ($uids) { foreach($uids as $uid) { $record = $this->getPage($uid, $languageUid); if ($record) { $page...
[ "public", "function", "getPages", "(", "$", "uids", ",", "int", "$", "languageUid", "=", "null", ")", ":", "array", "{", "$", "pages", "=", "[", "]", ";", "if", "(", "is_string", "(", "$", "uids", ")", ")", "{", "$", "uids", "=", "GeneralUtility", ...
Gets pages. @param array|string $uids The UIDs as array or as string, seperated by `,` @param int $languageUid The optional language UID, defaults to the UID of the current system language @return array The pages or empty if no pages were found
[ "Gets", "pages", "." ]
bab2de90f467936fbe4270cd133cb4109d1108eb
https://github.com/t3v/t3v_datamapper/blob/bab2de90f467936fbe4270cd133cb4109d1108eb/Classes/Service/PageService.php#L178-L196
195,697
t3v/t3v_datamapper
Classes/Service/PageService.php
PageService.getSubpages
public function getSubpages(int $pid, int $recursion = 1, bool $exclude = true, int $languageUid = null): array { $subpages = []; $subpagesUids = $this->getSubpagesUids($pid, $recursion, $exclude); if ($subpagesUids) { foreach ($subpagesUids as $subpageUid) { $record = $this->getPage($sub...
php
public function getSubpages(int $pid, int $recursion = 1, bool $exclude = true, int $languageUid = null): array { $subpages = []; $subpagesUids = $this->getSubpagesUids($pid, $recursion, $exclude); if ($subpagesUids) { foreach ($subpagesUids as $subpageUid) { $record = $this->getPage($sub...
[ "public", "function", "getSubpages", "(", "int", "$", "pid", ",", "int", "$", "recursion", "=", "1", ",", "bool", "$", "exclude", "=", "true", ",", "int", "$", "languageUid", "=", "null", ")", ":", "array", "{", "$", "subpages", "=", "[", "]", ";",...
Gets the subpages of a page. @param int $pid The PID of the entry page to search from @param int $recursion The recursion, defaults to `1` @param bool $exclude If set, the entry page should be excluded, defaults to `true` @param int $languageUid The optional language UID, defaults to the UID of the current system lang...
[ "Gets", "the", "subpages", "of", "a", "page", "." ]
bab2de90f467936fbe4270cd133cb4109d1108eb
https://github.com/t3v/t3v_datamapper/blob/bab2de90f467936fbe4270cd133cb4109d1108eb/Classes/Service/PageService.php#L220-L235
195,698
t3v/t3v_datamapper
Classes/Service/PageService.php
PageService.getSubpagesUids
public function getSubpagesUids(int $pid, int $recursion = 1, bool $exclude = true): array { $subpagesUids = []; $treeList = $this->queryGenerator->getTreeList($pid, $recursion, 0, 1); $recordUids = GeneralUtility::intExplode(',', $treeList, true); if ($recordUids) { foreach ($recordUids as...
php
public function getSubpagesUids(int $pid, int $recursion = 1, bool $exclude = true): array { $subpagesUids = []; $treeList = $this->queryGenerator->getTreeList($pid, $recursion, 0, 1); $recordUids = GeneralUtility::intExplode(',', $treeList, true); if ($recordUids) { foreach ($recordUids as...
[ "public", "function", "getSubpagesUids", "(", "int", "$", "pid", ",", "int", "$", "recursion", "=", "1", ",", "bool", "$", "exclude", "=", "true", ")", ":", "array", "{", "$", "subpagesUids", "=", "[", "]", ";", "$", "treeList", "=", "$", "this", "...
Gets the subpages UIDs of a page. @param int $pid The PID of the entry page to search from @param int $recursion The recursion level, defaults to `1` @param bool $exclude If set, the entry page should be excluded, defaults to `true` @return array The subpages UIDs or empty if no subpages were found
[ "Gets", "the", "subpages", "UIDs", "of", "a", "page", "." ]
bab2de90f467936fbe4270cd133cb4109d1108eb
https://github.com/t3v/t3v_datamapper/blob/bab2de90f467936fbe4270cd133cb4109d1108eb/Classes/Service/PageService.php#L245-L263
195,699
squareproton/Bond
src/Bond/Normality.php
Normality.build
public function build() { $this->profiler->log('Build started'); $this->callbacks['log']( "normality entity builder start" ); $this->prepare(); $processing = $this->options->getMatchingRelations( $skipping ); $this->callbacks['log']( "skipping {$skipping->count()} ". $ski...
php
public function build() { $this->profiler->log('Build started'); $this->callbacks['log']( "normality entity builder start" ); $this->prepare(); $processing = $this->options->getMatchingRelations( $skipping ); $this->callbacks['log']( "skipping {$skipping->count()} ". $ski...
[ "public", "function", "build", "(", ")", "{", "$", "this", "->", "profiler", "->", "log", "(", "'Build started'", ")", ";", "$", "this", "->", "callbacks", "[", "'log'", "]", "(", "\"normality entity builder start\"", ")", ";", "$", "this", "->", "prepare"...
Build all entities @return int Number of jobs completed
[ "Build", "all", "entities" ]
a04ad9dd1a35adeaec98237716c2a41ce02b4f1a
https://github.com/squareproton/Bond/blob/a04ad9dd1a35adeaec98237716c2a41ce02b4f1a/src/Bond/Normality.php#L95-L160