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
204,300
slickframework/form
src/Input/AbstractInput.php
AbstractInput.createLabel
protected function createLabel($label) { if (!is_string($label)) { throw new InvalidArgumentException( "Provided label is not a string or an ElementInterface ". "interface object." ); } $element = class_exists($label) ? $th...
php
protected function createLabel($label) { if (!is_string($label)) { throw new InvalidArgumentException( "Provided label is not a string or an ElementInterface ". "interface object." ); } $element = class_exists($label) ? $th...
[ "protected", "function", "createLabel", "(", "$", "label", ")", "{", "if", "(", "!", "is_string", "(", "$", "label", ")", ")", "{", "throw", "new", "InvalidArgumentException", "(", "\"Provided label is not a string or an ElementInterface \"", ".", "\"interface object....
Creates label from string @param string $label @return ElementInterface|Label
[ "Creates", "label", "from", "string" ]
e7d536b3bad49194e246ff93587da2589e31a003
https://github.com/slickframework/form/blob/e7d536b3bad49194e246ff93587da2589e31a003/src/Input/AbstractInput.php#L194-L208
204,301
slickframework/form
src/Input/AbstractInput.php
AbstractInput.setRequired
public function setRequired($required) { $this->required = (boolean) $required; if ($this->isRequired()) { $this->setAttribute('required'); return $this; } if ($this->getAttributes()->containsKey('required')) { $this->getAttributes()->remove('...
php
public function setRequired($required) { $this->required = (boolean) $required; if ($this->isRequired()) { $this->setAttribute('required'); return $this; } if ($this->getAttributes()->containsKey('required')) { $this->getAttributes()->remove('...
[ "public", "function", "setRequired", "(", "$", "required", ")", "{", "$", "this", "->", "required", "=", "(", "boolean", ")", "$", "required", ";", "if", "(", "$", "this", "->", "isRequired", "(", ")", ")", "{", "$", "this", "->", "setAttribute", "("...
Sets the required flag for this input @param boolean $required @return $this|self|InputInterface
[ "Sets", "the", "required", "flag", "for", "this", "input" ]
e7d536b3bad49194e246ff93587da2589e31a003
https://github.com/slickframework/form/blob/e7d536b3bad49194e246ff93587da2589e31a003/src/Input/AbstractInput.php#L247-L259
204,302
slickframework/form
src/Input/AbstractInput.php
AbstractInput.getInstanceValue
public function getInstanceValue() { $value = $this->getValue(); if ( is_array($value) && array_key_exists($this->instances, $this->value) ) { $value = $value[$this->instances]; } return $value; }
php
public function getInstanceValue() { $value = $this->getValue(); if ( is_array($value) && array_key_exists($this->instances, $this->value) ) { $value = $value[$this->instances]; } return $value; }
[ "public", "function", "getInstanceValue", "(", ")", "{", "$", "value", "=", "$", "this", "->", "getValue", "(", ")", ";", "if", "(", "is_array", "(", "$", "value", ")", "&&", "array_key_exists", "(", "$", "this", "->", "instances", ",", "$", "this", ...
If input is multiple get the instance value of it @return mixed
[ "If", "input", "is", "multiple", "get", "the", "instance", "value", "of", "it" ]
e7d536b3bad49194e246ff93587da2589e31a003
https://github.com/slickframework/form/blob/e7d536b3bad49194e246ff93587da2589e31a003/src/Input/AbstractInput.php#L286-L296
204,303
slickframework/form
src/Input/AbstractInput.php
AbstractInput.updateInstance
protected function updateInstance() { $this->instances++; $id = $this->generateId(); $this->setAttribute($id, $id); if ($label = $this->getLabel()) { $label->setAttribute('for', $id); } return $this; }
php
protected function updateInstance() { $this->instances++; $id = $this->generateId(); $this->setAttribute($id, $id); if ($label = $this->getLabel()) { $label->setAttribute('for', $id); } return $this; }
[ "protected", "function", "updateInstance", "(", ")", "{", "$", "this", "->", "instances", "++", ";", "$", "id", "=", "$", "this", "->", "generateId", "(", ")", ";", "$", "this", "->", "setAttribute", "(", "$", "id", ",", "$", "id", ")", ";", "if", ...
Updates input id and link it to its label @return self|AbstractInput
[ "Updates", "input", "id", "and", "link", "it", "to", "its", "label" ]
e7d536b3bad49194e246ff93587da2589e31a003
https://github.com/slickframework/form/blob/e7d536b3bad49194e246ff93587da2589e31a003/src/Input/AbstractInput.php#L320-L330
204,304
romaricdrigon/OrchestraBundle
Core/Pool/RepositoryPool.php
RepositoryPool.addRepositoryDefinition
public function addRepositoryDefinition(RepositoryDefinitionInterface $repositoryDefinition) { $slug = $repositoryDefinition->getSlug(); if (isset($this->repositoriesBySlug[$slug])) { throw new DomainErrorException('Two repositories has the same "'.$slug.'" slug!'); } $...
php
public function addRepositoryDefinition(RepositoryDefinitionInterface $repositoryDefinition) { $slug = $repositoryDefinition->getSlug(); if (isset($this->repositoriesBySlug[$slug])) { throw new DomainErrorException('Two repositories has the same "'.$slug.'" slug!'); } $...
[ "public", "function", "addRepositoryDefinition", "(", "RepositoryDefinitionInterface", "$", "repositoryDefinition", ")", "{", "$", "slug", "=", "$", "repositoryDefinition", "->", "getSlug", "(", ")", ";", "if", "(", "isset", "(", "$", "this", "->", "repositoriesBy...
Add a repository definition to the pool @param RepositoryDefinitionInterface $repositoryDefinition @throws DomainErrorException
[ "Add", "a", "repository", "definition", "to", "the", "pool" ]
4abb9736fcb6b23ed08ebd14ab169867339a4785
https://github.com/romaricdrigon/OrchestraBundle/blob/4abb9736fcb6b23ed08ebd14ab169867339a4785/Core/Pool/RepositoryPool.php#L34-L43
204,305
lrezek/Arachnid
src/LRezek/Arachnid/Proxy/Factory.php
Factory.fromRelation
function fromRelation($relationship, $repository, \Closure $loadCallback) { //Get the class name from the node, and the meta from that class name $class = $relationship->getType(); //Create the proxy factory return $this->fromEntity($relationship, $class, $repository, $loadCallback)...
php
function fromRelation($relationship, $repository, \Closure $loadCallback) { //Get the class name from the node, and the meta from that class name $class = $relationship->getType(); //Create the proxy factory return $this->fromEntity($relationship, $class, $repository, $loadCallback)...
[ "function", "fromRelation", "(", "$", "relationship", ",", "$", "repository", ",", "\\", "Closure", "$", "loadCallback", ")", "{", "//Get the class name from the node, and the meta from that class name", "$", "class", "=", "$", "relationship", "->", "getType", "(", ")...
Creates a proxy object for an Everyman relationship. This creates a proxy object for a Everyman relationship, given the meta repository. @param \Everyman\Neo4j\Relationship $relationship The node to create a proxy of. @param \LRezek\Arachnid\Meta\Repository $repository The meta repository. @param callable $loadCallba...
[ "Creates", "a", "proxy", "object", "for", "an", "Everyman", "relationship", "." ]
fbfc2c6f9d1dbfeef6f677813c12c570d5ea750a
https://github.com/lrezek/Arachnid/blob/fbfc2c6f9d1dbfeef6f677813c12c570d5ea750a/src/LRezek/Arachnid/Proxy/Factory.php#L72-L79
204,306
lrezek/Arachnid
src/LRezek/Arachnid/Proxy/Factory.php
Factory.fromEntity
function fromEntity($entity, $class, $repository, $callback = null) { $meta = $repository->fromClass($class); //Create the proxy object and set the meta, node, and load callback $proxy = $this->createProxy($meta); $proxy->__setMeta($meta); $proxy->__setEntity($entity); ...
php
function fromEntity($entity, $class, $repository, $callback = null) { $meta = $repository->fromClass($class); //Create the proxy object and set the meta, node, and load callback $proxy = $this->createProxy($meta); $proxy->__setMeta($meta); $proxy->__setEntity($entity); ...
[ "function", "fromEntity", "(", "$", "entity", ",", "$", "class", ",", "$", "repository", ",", "$", "callback", "=", "null", ")", "{", "$", "meta", "=", "$", "repository", "->", "fromClass", "(", "$", "class", ")", ";", "//Create the proxy object and set th...
Creates a proxy object for a Everyman node or relationship. This creates a proxy object for a Everyman relationship, given the meta repository and class name @param \Everyman\Neo4j\Node|\Everyman\Neo4j\Relationship $entity The entity to create a proxy of. @param string $class The class name. @param \LRezek\Arachnid\M...
[ "Creates", "a", "proxy", "object", "for", "a", "Everyman", "node", "or", "relationship", "." ]
fbfc2c6f9d1dbfeef6f677813c12c570d5ea750a
https://github.com/lrezek/Arachnid/blob/fbfc2c6f9d1dbfeef6f677813c12c570d5ea750a/src/LRezek/Arachnid/Proxy/Factory.php#L92-L123
204,307
lrezek/Arachnid
src/LRezek/Arachnid/Proxy/Factory.php
Factory.createProxy
private function createProxy(GraphElement $meta) { //Get the proxy class name, as well as the regular class name $proxyClass = $meta->getProxyClass(); $className = $meta->getName(); //If the class already exists, just make an instance of it with the correct properties and return it....
php
private function createProxy(GraphElement $meta) { //Get the proxy class name, as well as the regular class name $proxyClass = $meta->getProxyClass(); $className = $meta->getName(); //If the class already exists, just make an instance of it with the correct properties and return it....
[ "private", "function", "createProxy", "(", "GraphElement", "$", "meta", ")", "{", "//Get the proxy class name, as well as the regular class name", "$", "proxyClass", "=", "$", "meta", "->", "getProxyClass", "(", ")", ";", "$", "className", "=", "$", "meta", "->", ...
Creates a proxy class for a graph element. This method will create a proxy class for an entity that extends the required class and implements LRezek\Arachnid\Proxy\Entity. This class will be generated and stored in the directory specified by the $proxyDir property of this class. This is done so that the object returne...
[ "Creates", "a", "proxy", "class", "for", "a", "graph", "element", "." ]
fbfc2c6f9d1dbfeef6f677813c12c570d5ea750a
https://github.com/lrezek/Arachnid/blob/fbfc2c6f9d1dbfeef6f677813c12c570d5ea750a/src/LRezek/Arachnid/Proxy/Factory.php#L137-L320
204,308
lrezek/Arachnid
src/LRezek/Arachnid/Proxy/Factory.php
Factory.newInstance
private function newInstance($proxyClass) { static $prototypes = array(); if(!array_key_exists($proxyClass, $prototypes)) { $prototypes[$proxyClass] = unserialize(sprintf('O:%d:"%s":0:{}', strlen($proxyClass), $proxyClass)); } return clone $prototypes[$proxyClas...
php
private function newInstance($proxyClass) { static $prototypes = array(); if(!array_key_exists($proxyClass, $prototypes)) { $prototypes[$proxyClass] = unserialize(sprintf('O:%d:"%s":0:{}', strlen($proxyClass), $proxyClass)); } return clone $prototypes[$proxyClas...
[ "private", "function", "newInstance", "(", "$", "proxyClass", ")", "{", "static", "$", "prototypes", "=", "array", "(", ")", ";", "if", "(", "!", "array_key_exists", "(", "$", "proxyClass", ",", "$", "prototypes", ")", ")", "{", "$", "prototypes", "[", ...
Create a new instance of a proxy class object. This creates an instance of a proxy class. If the class has already been created, it is retrieved from a static prototypes array. @param mixed $proxyClass The class to create an instance of. @return mixed The new instance of <code>$proxyclass</code>.
[ "Create", "a", "new", "instance", "of", "a", "proxy", "class", "object", "." ]
fbfc2c6f9d1dbfeef6f677813c12c570d5ea750a
https://github.com/lrezek/Arachnid/blob/fbfc2c6f9d1dbfeef6f677813c12c570d5ea750a/src/LRezek/Arachnid/Proxy/Factory.php#L331-L341
204,309
lrezek/Arachnid
src/LRezek/Arachnid/Proxy/Factory.php
Factory.methodProxy
private function methodProxy($method, $meta) { //Find out if the method is a property getter or setter $property = $meta->findProperty($method->getName()); //If it is not, don't need the proxy if(!$property) { return; } //If the method is a strai...
php
private function methodProxy($method, $meta) { //Find out if the method is a property getter or setter $property = $meta->findProperty($method->getName()); //If it is not, don't need the proxy if(!$property) { return; } //If the method is a strai...
[ "private", "function", "methodProxy", "(", "$", "method", ",", "$", "meta", ")", "{", "//Find out if the method is a property getter or setter", "$", "property", "=", "$", "meta", "->", "findProperty", "(", "$", "method", "->", "getName", "(", ")", ")", ";", "...
Creates proxy methods from the reflection method handle and meta information. @param $method @param $meta @return string The method code.
[ "Creates", "proxy", "methods", "from", "the", "reflection", "method", "handle", "and", "meta", "information", "." ]
fbfc2c6f9d1dbfeef6f677813c12c570d5ea750a
https://github.com/lrezek/Arachnid/blob/fbfc2c6f9d1dbfeef6f677813c12c570d5ea750a/src/LRezek/Arachnid/Proxy/Factory.php#L351-L429
204,310
kherge-abandoned/php-file
src/lib/KHerGe/File/Utility.php
Utility.remove
public static function remove($path) { if (is_dir($path)) { if (false === ($dir = opendir($path))) { throw FileException::removeFailed($path); } while (false !== ($item = readdir($dir))) { if (('.' === $item) || ('..' === $item)) { ...
php
public static function remove($path) { if (is_dir($path)) { if (false === ($dir = opendir($path))) { throw FileException::removeFailed($path); } while (false !== ($item = readdir($dir))) { if (('.' === $item) || ('..' === $item)) { ...
[ "public", "static", "function", "remove", "(", "$", "path", ")", "{", "if", "(", "is_dir", "(", "$", "path", ")", ")", "{", "if", "(", "false", "===", "(", "$", "dir", "=", "opendir", "(", "$", "path", ")", ")", ")", "{", "throw", "FileException"...
Recursively removes a path from the file system. @param string $path The path to remove. @throws FileException If the path could not be removed.
[ "Recursively", "removes", "a", "path", "from", "the", "file", "system", "." ]
d2f0f52b2da471c36cb567840852c5041bc4c196
https://github.com/kherge-abandoned/php-file/blob/d2f0f52b2da471c36cb567840852c5041bc4c196/src/lib/KHerGe/File/Utility.php#L21-L44
204,311
romeOz/rock-cache
src/Cache.php
Cache.serialize
protected function serialize($value) { if (!is_array($value)) { return $value; } return Serialize::serialize($value, $this->serializer); }
php
protected function serialize($value) { if (!is_array($value)) { return $value; } return Serialize::serialize($value, $this->serializer); }
[ "protected", "function", "serialize", "(", "$", "value", ")", "{", "if", "(", "!", "is_array", "(", "$", "value", ")", ")", "{", "return", "$", "value", ";", "}", "return", "Serialize", "::", "serialize", "(", "$", "value", ",", "$", "this", "->", ...
Serialize value. @param array $value @return array|string
[ "Serialize", "value", "." ]
bbd146ee323e8cc1fb11dc1803215c3656e02c57
https://github.com/romeOz/rock-cache/blob/bbd146ee323e8cc1fb11dc1803215c3656e02c57/src/Cache.php#L239-L245
204,312
romeOz/rock-cache
src/Cache.php
Cache.microtime
protected function microtime($microtime = null) { list($usec, $sec) = explode(" ", $microtime ?: microtime()); return (float)$usec + (float)$sec; }
php
protected function microtime($microtime = null) { list($usec, $sec) = explode(" ", $microtime ?: microtime()); return (float)$usec + (float)$sec; }
[ "protected", "function", "microtime", "(", "$", "microtime", "=", "null", ")", "{", "list", "(", "$", "usec", ",", "$", "sec", ")", "=", "explode", "(", "\" \"", ",", "$", "microtime", "?", ":", "microtime", "(", ")", ")", ";", "return", "(", "floa...
Returns a microtime. @param int|null $microtime @return float
[ "Returns", "a", "microtime", "." ]
bbd146ee323e8cc1fb11dc1803215c3656e02c57
https://github.com/romeOz/rock-cache/blob/bbd146ee323e8cc1fb11dc1803215c3656e02c57/src/Cache.php#L273-L277
204,313
gluephp/glue
src/Http/Response.php
Response.binaryFile
public function binaryFile($file, $status = 200, array $headers = [], $public = true, $contentDisposition = null, $autoEtag = false, $autoLastModified = true) { return new BinaryFileResponse($file, $status, $headers, $public, $contentDisposition, $autoEtag, $autoLastModified); }
php
public function binaryFile($file, $status = 200, array $headers = [], $public = true, $contentDisposition = null, $autoEtag = false, $autoLastModified = true) { return new BinaryFileResponse($file, $status, $headers, $public, $contentDisposition, $autoEtag, $autoLastModified); }
[ "public", "function", "binaryFile", "(", "$", "file", ",", "$", "status", "=", "200", ",", "array", "$", "headers", "=", "[", "]", ",", "$", "public", "=", "true", ",", "$", "contentDisposition", "=", "null", ",", "$", "autoEtag", "=", "false", ",", ...
Create a new BinaryFileResponse @param \SplFileInfo|string $file The file to stream @param int $status The response status code @param array $headers An array of response headers @param bool $public Files are public by defaul...
[ "Create", "a", "new", "BinaryFileResponse" ]
d54e0905dfe74d1c114c04f33fa89a60e2651562
https://github.com/gluephp/glue/blob/d54e0905dfe74d1c114c04f33fa89a60e2651562/src/Http/Response.php#L52-L55
204,314
gluephp/glue
src/Http/Response.php
Response.fileDownload
public function fileDownload($file) { $response = new SymfonyResponse(); $response->headers->set('Content-Disposition', $response->headers->makeDisposition( ResponseHeaderBag::DISPOSITION_ATTACHMENT, $file ) ); return $respon...
php
public function fileDownload($file) { $response = new SymfonyResponse(); $response->headers->set('Content-Disposition', $response->headers->makeDisposition( ResponseHeaderBag::DISPOSITION_ATTACHMENT, $file ) ); return $respon...
[ "public", "function", "fileDownload", "(", "$", "file", ")", "{", "$", "response", "=", "new", "SymfonyResponse", "(", ")", ";", "$", "response", "->", "headers", "->", "set", "(", "'Content-Disposition'", ",", "$", "response", "->", "headers", "->", "make...
Create a new file download response @param string $file The file
[ "Create", "a", "new", "file", "download", "response" ]
d54e0905dfe74d1c114c04f33fa89a60e2651562
https://github.com/gluephp/glue/blob/d54e0905dfe74d1c114c04f33fa89a60e2651562/src/Http/Response.php#L63-L75
204,315
apishka/easy-extend
source/Command/GenerateMeta.php
GenerateMeta.generateMeta
private function generateMeta(): void { $generator = new Meta\Generator(); $generator->register( $this->generateMetaDataForRouter(Broker::getInstance(), 'getRouter') ); $generator->register( $this->generateMetaDataForRouter(Broker::getInstance()->getRouter(L...
php
private function generateMeta(): void { $generator = new Meta\Generator(); $generator->register( $this->generateMetaDataForRouter(Broker::getInstance(), 'getRouter') ); $generator->register( $this->generateMetaDataForRouter(Broker::getInstance()->getRouter(L...
[ "private", "function", "generateMeta", "(", ")", ":", "void", "{", "$", "generator", "=", "new", "Meta", "\\", "Generator", "(", ")", ";", "$", "generator", "->", "register", "(", "$", "this", "->", "generateMetaDataForRouter", "(", "Broker", "::", "getIns...
Generates file with meta
[ "Generates", "file", "with", "meta" ]
5e5c63c2509377abc3db6956e353623683703e09
https://github.com/apishka/easy-extend/blob/5e5c63c2509377abc3db6956e353623683703e09/source/Command/GenerateMeta.php#L44-L57
204,316
alphacomm/alpharpc
src/AlphaRPC/Manager/ClientHandler/Client.php
Client.setRequest
public function setRequest($request, $waitForResult = true) { $this->previousRequest = $this->request; $this->request = $request; $this->waitForResult = $waitForResult; $this->bucket->refresh($this); return $this; }
php
public function setRequest($request, $waitForResult = true) { $this->previousRequest = $this->request; $this->request = $request; $this->waitForResult = $waitForResult; $this->bucket->refresh($this); return $this; }
[ "public", "function", "setRequest", "(", "$", "request", ",", "$", "waitForResult", "=", "true", ")", "{", "$", "this", "->", "previousRequest", "=", "$", "this", "->", "request", ";", "$", "this", "->", "request", "=", "$", "request", ";", "$", "this"...
Sets the request the client is interested in. @param string $request @param boolean $waitForResult @return \AlphaRPC\Manager\ClientHandler\Client
[ "Sets", "the", "request", "the", "client", "is", "interested", "in", "." ]
cf162854500554c4ba8d39f2675de35a49c30ed0
https://github.com/alphacomm/alpharpc/blob/cf162854500554c4ba8d39f2675de35a49c30ed0/src/AlphaRPC/Manager/ClientHandler/Client.php#L143-L151
204,317
armazon/armazon
src/Armazon/Bd/Relacional.php
Relacional.seleccionarBd
public function seleccionarBd($basedatos) { if ($this->pdo->exec('USE ' . $basedatos) === false) { if ($this->arrojarExcepciones) { throw new \RuntimeException('No se pudo seleccionar base de datos.'); } return false; } return true; }
php
public function seleccionarBd($basedatos) { if ($this->pdo->exec('USE ' . $basedatos) === false) { if ($this->arrojarExcepciones) { throw new \RuntimeException('No se pudo seleccionar base de datos.'); } return false; } return true; }
[ "public", "function", "seleccionarBd", "(", "$", "basedatos", ")", "{", "if", "(", "$", "this", "->", "pdo", "->", "exec", "(", "'USE '", ".", "$", "basedatos", ")", "===", "false", ")", "{", "if", "(", "$", "this", "->", "arrojarExcepciones", ")", "...
Selecciona la base de datos interna. @param string $basedatos @return bool @throws \RuntimeException
[ "Selecciona", "la", "base", "de", "datos", "interna", "." ]
ec76385ff80ce1659d81bc4050ef9483ab0ebe52
https://github.com/armazon/armazon/blob/ec76385ff80ce1659d81bc4050ef9483ab0ebe52/src/Armazon/Bd/Relacional.php#L90-L101
204,318
armazon/armazon
src/Armazon/Bd/Relacional.php
Relacional.prepararValor
public function prepararValor($valor, $tipo = 'txt', $permiteVacio = false) { if (is_array($valor)) { if (empty($valor)) { return 'NULL'; } foreach ($valor as $llave => $v) { $valor[$llave] = $this->prepararValor($v, $tipo); } ...
php
public function prepararValor($valor, $tipo = 'txt', $permiteVacio = false) { if (is_array($valor)) { if (empty($valor)) { return 'NULL'; } foreach ($valor as $llave => $v) { $valor[$llave] = $this->prepararValor($v, $tipo); } ...
[ "public", "function", "prepararValor", "(", "$", "valor", ",", "$", "tipo", "=", "'txt'", ",", "$", "permiteVacio", "=", "false", ")", "{", "if", "(", "is_array", "(", "$", "valor", ")", ")", "{", "if", "(", "empty", "(", "$", "valor", ")", ")", ...
Prepara valor segun tipo especificado. @param mixed $valor Valor a preparar @param string $tipo Tipo de valor pasado: bol, txt, num, def @param bool $permiteVacio Define si permite cadena de texto vacio en vez de nulo @return string Retorna valor escapado para MySQL
[ "Prepara", "valor", "segun", "tipo", "especificado", "." ]
ec76385ff80ce1659d81bc4050ef9483ab0ebe52
https://github.com/armazon/armazon/blob/ec76385ff80ce1659d81bc4050ef9483ab0ebe52/src/Armazon/Bd/Relacional.php#L112-L148
204,319
armazon/armazon
src/Armazon/Bd/Relacional.php
Relacional.obtenerPrimero
public function obtenerPrimero($clase = null, array $claseArgs = []) { $resultado = $this->obtener(null, null, $clase, $claseArgs); if ($resultado !== false) { return array_shift($resultado); } return false; }
php
public function obtenerPrimero($clase = null, array $claseArgs = []) { $resultado = $this->obtener(null, null, $clase, $claseArgs); if ($resultado !== false) { return array_shift($resultado); } return false; }
[ "public", "function", "obtenerPrimero", "(", "$", "clase", "=", "null", ",", "array", "$", "claseArgs", "=", "[", "]", ")", "{", "$", "resultado", "=", "$", "this", "->", "obtener", "(", "null", ",", "null", ",", "$", "clase", ",", "$", "claseArgs", ...
Devuelve el primer registro generado por la consulta de la sentencia interna. @param string $clase Nombre de clase que servirá como formato de registro @param array $claseArgs Argumentos para instanciar clase formato @return array|bool @throws \RuntimeException @throws \InvalidArgumentException
[ "Devuelve", "el", "primer", "registro", "generado", "por", "la", "consulta", "de", "la", "sentencia", "interna", "." ]
ec76385ff80ce1659d81bc4050ef9483ab0ebe52
https://github.com/armazon/armazon/blob/ec76385ff80ce1659d81bc4050ef9483ab0ebe52/src/Armazon/Bd/Relacional.php#L292-L301
204,320
armazon/armazon
src/Armazon/Bd/Relacional.php
Relacional.ejecutar
public function ejecutar() { // Validamos la sentencia a ejecutar if (empty($this->sentencia)) { if ($this->arrojarExcepciones) { throw new \InvalidArgumentException('La sentencia a ejecutar se encuentra vacia.'); } return false; } ...
php
public function ejecutar() { // Validamos la sentencia a ejecutar if (empty($this->sentencia)) { if ($this->arrojarExcepciones) { throw new \InvalidArgumentException('La sentencia a ejecutar se encuentra vacia.'); } return false; } ...
[ "public", "function", "ejecutar", "(", ")", "{", "// Validamos la sentencia a ejecutar", "if", "(", "empty", "(", "$", "this", "->", "sentencia", ")", ")", "{", "if", "(", "$", "this", "->", "arrojarExcepciones", ")", "{", "throw", "new", "\\", "InvalidArgum...
Ejecuta la sentencia interna. @return bool @throws \InvalidArgumentException @throws Excepcion
[ "Ejecuta", "la", "sentencia", "interna", "." ]
ec76385ff80ce1659d81bc4050ef9483ab0ebe52
https://github.com/armazon/armazon/blob/ec76385ff80ce1659d81bc4050ef9483ab0ebe52/src/Armazon/Bd/Relacional.php#L311-L338
204,321
armazon/armazon
src/Armazon/Bd/Relacional.php
Relacional.preparar
public function preparar() { // Validamos la sentencia a preparar if (empty($this->sentencia)) { if ($this->arrojarExcepciones) { throw new \InvalidArgumentException('La sentencia a preparar se encuentra vacia.'); } } return $this->pdo->prepar...
php
public function preparar() { // Validamos la sentencia a preparar if (empty($this->sentencia)) { if ($this->arrojarExcepciones) { throw new \InvalidArgumentException('La sentencia a preparar se encuentra vacia.'); } } return $this->pdo->prepar...
[ "public", "function", "preparar", "(", ")", "{", "// Validamos la sentencia a preparar", "if", "(", "empty", "(", "$", "this", "->", "sentencia", ")", ")", "{", "if", "(", "$", "this", "->", "arrojarExcepciones", ")", "{", "throw", "new", "\\", "InvalidArgum...
Prepara la sentencia interna para su uso exterior. @throws \Exception @return \PDOStatement
[ "Prepara", "la", "sentencia", "interna", "para", "su", "uso", "exterior", "." ]
ec76385ff80ce1659d81bc4050ef9483ab0ebe52
https://github.com/armazon/armazon/blob/ec76385ff80ce1659d81bc4050ef9483ab0ebe52/src/Armazon/Bd/Relacional.php#L359-L369
204,322
armazon/armazon
src/Armazon/Bd/Relacional.php
Relacional.seleccionar
public function seleccionar($campos, $tabla) { if (is_array($campos)) { $this->sentencia = 'SELECT ' . implode(', ', $campos); } else { $this->sentencia = 'SELECT ' . $campos; } $this->sentencia .= ' FROM ' . $tabla; return $this; }
php
public function seleccionar($campos, $tabla) { if (is_array($campos)) { $this->sentencia = 'SELECT ' . implode(', ', $campos); } else { $this->sentencia = 'SELECT ' . $campos; } $this->sentencia .= ' FROM ' . $tabla; return $this; }
[ "public", "function", "seleccionar", "(", "$", "campos", ",", "$", "tabla", ")", "{", "if", "(", "is_array", "(", "$", "campos", ")", ")", "{", "$", "this", "->", "sentencia", "=", "'SELECT '", ".", "implode", "(", "', '", ",", "$", "campos", ")", ...
Inicia la sentencia interna con SELECT. @param string|array $campos @param string $tabla @return Relacional
[ "Inicia", "la", "sentencia", "interna", "con", "SELECT", "." ]
ec76385ff80ce1659d81bc4050ef9483ab0ebe52
https://github.com/armazon/armazon/blob/ec76385ff80ce1659d81bc4050ef9483ab0ebe52/src/Armazon/Bd/Relacional.php#L447-L457
204,323
armazon/armazon
src/Armazon/Bd/Relacional.php
Relacional.donde
public function donde(array $params = null) { if ($params) { $terminos_sql = []; foreach ($params as $llave => $valor) { // Limpiamos la llave $llave = trim($llave); // Extraemos operador if (false === ($temp = strpos(...
php
public function donde(array $params = null) { if ($params) { $terminos_sql = []; foreach ($params as $llave => $valor) { // Limpiamos la llave $llave = trim($llave); // Extraemos operador if (false === ($temp = strpos(...
[ "public", "function", "donde", "(", "array", "$", "params", "=", "null", ")", "{", "if", "(", "$", "params", ")", "{", "$", "terminos_sql", "=", "[", "]", ";", "foreach", "(", "$", "params", "as", "$", "llave", "=>", "$", "valor", ")", "{", "// L...
Prepara los campos que filtran la sentencia interna. @param array|null $params Campos parametrizados @return Relacional
[ "Prepara", "los", "campos", "que", "filtran", "la", "sentencia", "interna", "." ]
ec76385ff80ce1659d81bc4050ef9483ab0ebe52
https://github.com/armazon/armazon/blob/ec76385ff80ce1659d81bc4050ef9483ab0ebe52/src/Armazon/Bd/Relacional.php#L484-L537
204,324
armazon/armazon
src/Armazon/Bd/Relacional.php
Relacional.limitar
public function limitar($pos, $limite = null) { if ($limite) { $this->sentencia .= ' LIMIT ' . $pos . ',' . $limite; } else { $this->sentencia .= ' LIMIT ' . $pos; } return $this; }
php
public function limitar($pos, $limite = null) { if ($limite) { $this->sentencia .= ' LIMIT ' . $pos . ',' . $limite; } else { $this->sentencia .= ' LIMIT ' . $pos; } return $this; }
[ "public", "function", "limitar", "(", "$", "pos", ",", "$", "limite", "=", "null", ")", "{", "if", "(", "$", "limite", ")", "{", "$", "this", "->", "sentencia", ".=", "' LIMIT '", ".", "$", "pos", ".", "','", ".", "$", "limite", ";", "}", "else",...
Implementa LIMIT a la sentencia interna. @param int $pos @param int $limite @return Relacional
[ "Implementa", "LIMIT", "a", "la", "sentencia", "interna", "." ]
ec76385ff80ce1659d81bc4050ef9483ab0ebe52
https://github.com/armazon/armazon/blob/ec76385ff80ce1659d81bc4050ef9483ab0ebe52/src/Armazon/Bd/Relacional.php#L575-L584
204,325
armazon/armazon
src/Armazon/Bd/Relacional.php
Relacional.actualizar
public function actualizar($tabla, array $params) { $terminos_sql = []; foreach ($params as $llave => $valor) { // Extramos campo y su tipo $temp = explode('|', $llave); $campo = $temp[0]; if (isset($temp[1])) { $tipo = $temp[1]; ...
php
public function actualizar($tabla, array $params) { $terminos_sql = []; foreach ($params as $llave => $valor) { // Extramos campo y su tipo $temp = explode('|', $llave); $campo = $temp[0]; if (isset($temp[1])) { $tipo = $temp[1]; ...
[ "public", "function", "actualizar", "(", "$", "tabla", ",", "array", "$", "params", ")", "{", "$", "terminos_sql", "=", "[", "]", ";", "foreach", "(", "$", "params", "as", "$", "llave", "=>", "$", "valor", ")", "{", "// Extramos campo y su tipo", "$", ...
Inicia la sentencia interna con UPDATE. @param string $tabla @param array $params Campos parametrizados @return Relacional
[ "Inicia", "la", "sentencia", "interna", "con", "UPDATE", "." ]
ec76385ff80ce1659d81bc4050ef9483ab0ebe52
https://github.com/armazon/armazon/blob/ec76385ff80ce1659d81bc4050ef9483ab0ebe52/src/Armazon/Bd/Relacional.php#L594-L613
204,326
armazon/armazon
src/Armazon/Bd/Relacional.php
Relacional.insertar
public function insertar($tabla, array $params) { $columnas = []; $valores = []; foreach ($params as $llave => $valor) { // Extramos campo y su tipo $temp = explode('|', $llave); $campo = $temp[0]; if (isset($temp[1])) { $tipo ...
php
public function insertar($tabla, array $params) { $columnas = []; $valores = []; foreach ($params as $llave => $valor) { // Extramos campo y su tipo $temp = explode('|', $llave); $campo = $temp[0]; if (isset($temp[1])) { $tipo ...
[ "public", "function", "insertar", "(", "$", "tabla", ",", "array", "$", "params", ")", "{", "$", "columnas", "=", "[", "]", ";", "$", "valores", "=", "[", "]", ";", "foreach", "(", "$", "params", "as", "$", "llave", "=>", "$", "valor", ")", "{", ...
Inicia la sentencia interna con INSERT. @param string $tabla Tabla @param array $params Campos parametrizados @return Relacional
[ "Inicia", "la", "sentencia", "interna", "con", "INSERT", "." ]
ec76385ff80ce1659d81bc4050ef9483ab0ebe52
https://github.com/armazon/armazon/blob/ec76385ff80ce1659d81bc4050ef9483ab0ebe52/src/Armazon/Bd/Relacional.php#L623-L645
204,327
PopSugar/php-yesmail-api
src/Yesmail/CurlClient.php
CurlClient.get
public function get($url, $data) { curl_setopt($this->_ch, CURLOPT_CUSTOMREQUEST, 'GET'); curl_setopt($this->_ch, CURLOPT_URL, sprintf( "%s?%s", $url, http_build_query($data, '', '&', PHP_QUERY_RFC3986))); curl_setopt($this->_ch, CURLOPT_HTTPHEADER, array("Accept:application/json", "Content-Type...
php
public function get($url, $data) { curl_setopt($this->_ch, CURLOPT_CUSTOMREQUEST, 'GET'); curl_setopt($this->_ch, CURLOPT_URL, sprintf( "%s?%s", $url, http_build_query($data, '', '&', PHP_QUERY_RFC3986))); curl_setopt($this->_ch, CURLOPT_HTTPHEADER, array("Accept:application/json", "Content-Type...
[ "public", "function", "get", "(", "$", "url", ",", "$", "data", ")", "{", "curl_setopt", "(", "$", "this", "->", "_ch", ",", "CURLOPT_CUSTOMREQUEST", ",", "'GET'", ")", ";", "curl_setopt", "(", "$", "this", "->", "_ch", ",", "CURLOPT_URL", ",", "sprint...
Perform an HTTP GET @param string $url The URL to send the GET request to. @param array $data An array of parameters to be added to the query string. @return mixed A JSON decoded PHP variable representing the HTTP response. @access public
[ "Perform", "an", "HTTP", "GET" ]
42c20a3ded1d8f2177c792cd3aa44bcdfdcb239c
https://github.com/PopSugar/php-yesmail-api/blob/42c20a3ded1d8f2177c792cd3aa44bcdfdcb239c/src/Yesmail/CurlClient.php#L61-L67
204,328
PopSugar/php-yesmail-api
src/Yesmail/CurlClient.php
CurlClient._initialize
protected function _initialize() { $this->_ch = curl_init(); $this->_last_info = FALSE; curl_setopt($this->_ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($this->_ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($this->_ch, CURLOPT_TIMEOUT, 60); curl_setopt($this->_ch, CUR...
php
protected function _initialize() { $this->_ch = curl_init(); $this->_last_info = FALSE; curl_setopt($this->_ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($this->_ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($this->_ch, CURLOPT_TIMEOUT, 60); curl_setopt($this->_ch, CUR...
[ "protected", "function", "_initialize", "(", ")", "{", "$", "this", "->", "_ch", "=", "curl_init", "(", ")", ";", "$", "this", "->", "_last_info", "=", "FALSE", ";", "curl_setopt", "(", "$", "this", "->", "_ch", ",", "CURLOPT_RETURNTRANSFER", ",", "true"...
Initialize the curl resource and options @return void @access protected
[ "Initialize", "the", "curl", "resource", "and", "options" ]
42c20a3ded1d8f2177c792cd3aa44bcdfdcb239c
https://github.com/PopSugar/php-yesmail-api/blob/42c20a3ded1d8f2177c792cd3aa44bcdfdcb239c/src/Yesmail/CurlClient.php#L136-L146
204,329
PopSugar/php-yesmail-api
src/Yesmail/CurlClient.php
CurlClient._exec
protected function _exec() { $response = curl_exec($this->_ch); $this->_last_info = curl_getinfo($this->_ch); $error = curl_error( $this->_ch ); if ( $error ) { throw new \Exception($error); } return $response; }
php
protected function _exec() { $response = curl_exec($this->_ch); $this->_last_info = curl_getinfo($this->_ch); $error = curl_error( $this->_ch ); if ( $error ) { throw new \Exception($error); } return $response; }
[ "protected", "function", "_exec", "(", ")", "{", "$", "response", "=", "curl_exec", "(", "$", "this", "->", "_ch", ")", ";", "$", "this", "->", "_last_info", "=", "curl_getinfo", "(", "$", "this", "->", "_ch", ")", ";", "$", "error", "=", "curl_error...
Execute a curl request. Maintain the info from the request in a variable @return mixed A JSON decoded PHP variable representing the HTTP response. @access protected @throws Exception
[ "Execute", "a", "curl", "request", ".", "Maintain", "the", "info", "from", "the", "request", "in", "a", "variable" ]
42c20a3ded1d8f2177c792cd3aa44bcdfdcb239c
https://github.com/PopSugar/php-yesmail-api/blob/42c20a3ded1d8f2177c792cd3aa44bcdfdcb239c/src/Yesmail/CurlClient.php#L155-L164
204,330
harp-orm/harp
src/Repo/LinkMap.php
LinkMap.get
public function get(AbstractModel $model) { if (! $this->repo->isModel($model)) { throw new InvalidArgumentException( sprintf('Model must be %s, was %s', $this->repo->getModelClass(), get_class($model)) ); } if ($this->map->contains($model)) { ...
php
public function get(AbstractModel $model) { if (! $this->repo->isModel($model)) { throw new InvalidArgumentException( sprintf('Model must be %s, was %s', $this->repo->getModelClass(), get_class($model)) ); } if ($this->map->contains($model)) { ...
[ "public", "function", "get", "(", "AbstractModel", "$", "model", ")", "{", "if", "(", "!", "$", "this", "->", "repo", "->", "isModel", "(", "$", "model", ")", ")", "{", "throw", "new", "InvalidArgumentException", "(", "sprintf", "(", "'Model must be %s, wa...
Get Links object associated with this model. If there is none, an empty Links object is created. @param AbstractModel $model @return Links @throws InvalidArgumentException If model does not belong to repo
[ "Get", "Links", "object", "associated", "with", "this", "model", ".", "If", "there", "is", "none", "an", "empty", "Links", "object", "is", "created", "." ]
e0751696521164c86ccd0a76d708df490efd8306
https://github.com/harp-orm/harp/blob/e0751696521164c86ccd0a76d708df490efd8306/src/Repo/LinkMap.php#L55-L68
204,331
cyberspectrum/i18n-contao
src/ContaoTableDictionary.php
ContaoTableDictionary.getKeysForSource
protected function getKeysForSource(int $sourceId): \Traversable { $row = $this->getRow($sourceId); foreach ($this->extractors as $extractor) { switch (true) { case $extractor instanceof MultiStringExtractorInterface: foreach ($extractor->keys($row) as...
php
protected function getKeysForSource(int $sourceId): \Traversable { $row = $this->getRow($sourceId); foreach ($this->extractors as $extractor) { switch (true) { case $extractor instanceof MultiStringExtractorInterface: foreach ($extractor->keys($row) as...
[ "protected", "function", "getKeysForSource", "(", "int", "$", "sourceId", ")", ":", "\\", "Traversable", "{", "$", "row", "=", "$", "this", "->", "getRow", "(", "$", "sourceId", ")", ";", "foreach", "(", "$", "this", "->", "extractors", "as", "$", "ext...
Get the keys for the source id. @param int $sourceId The source id. @return \Traversable|string[] @throws \InvalidArgumentException When the extractor is unknown.
[ "Get", "the", "keys", "for", "the", "source", "id", "." ]
038cf6ea9c609a734d7476fba256bc4b0db236b7
https://github.com/cyberspectrum/i18n-contao/blob/038cf6ea9c609a734d7476fba256bc4b0db236b7/src/ContaoTableDictionary.php#L297-L316
204,332
cyberspectrum/i18n-contao
src/ContaoTableDictionary.php
ContaoTableDictionary.createValueReader
protected function createValueReader( int $sourceId, int $targetId, ExtractorInterface $extractor, string $trail ): TranslationValueInterface { return new TranslationValue($this, $sourceId, $targetId, $extractor, $trail); }
php
protected function createValueReader( int $sourceId, int $targetId, ExtractorInterface $extractor, string $trail ): TranslationValueInterface { return new TranslationValue($this, $sourceId, $targetId, $extractor, $trail); }
[ "protected", "function", "createValueReader", "(", "int", "$", "sourceId", ",", "int", "$", "targetId", ",", "ExtractorInterface", "$", "extractor", ",", "string", "$", "trail", ")", ":", "TranslationValueInterface", "{", "return", "new", "TranslationValue", "(", ...
Create a value reader instance. @param int $sourceId The source id. @param int $targetId The target id. @param ExtractorInterface $extractor The extractor to use. @param string $trail The trailing sub path. @return TranslationValueInterface
[ "Create", "a", "value", "reader", "instance", "." ]
038cf6ea9c609a734d7476fba256bc4b0db236b7
https://github.com/cyberspectrum/i18n-contao/blob/038cf6ea9c609a734d7476fba256bc4b0db236b7/src/ContaoTableDictionary.php#L340-L347
204,333
cyberspectrum/i18n-contao
src/ContaoTableDictionary.php
ContaoTableDictionary.createValueWriter
protected function createValueWriter( int $sourceId, int $targetId, ExtractorInterface $extractor, string $trail ): WritableTranslationValueInterface { return new WritableTranslationValue($this, $sourceId, $targetId, $extractor, $trail); }
php
protected function createValueWriter( int $sourceId, int $targetId, ExtractorInterface $extractor, string $trail ): WritableTranslationValueInterface { return new WritableTranslationValue($this, $sourceId, $targetId, $extractor, $trail); }
[ "protected", "function", "createValueWriter", "(", "int", "$", "sourceId", ",", "int", "$", "targetId", ",", "ExtractorInterface", "$", "extractor", ",", "string", "$", "trail", ")", ":", "WritableTranslationValueInterface", "{", "return", "new", "WritableTranslatio...
Create a value writer instance. @param int $sourceId The source id. @param int $targetId The target id. @param ExtractorInterface $extractor The extractor to use. @param string $trail The trailing sub path. @return WritableTranslationValueInterface
[ "Create", "a", "value", "writer", "instance", "." ]
038cf6ea9c609a734d7476fba256bc4b0db236b7
https://github.com/cyberspectrum/i18n-contao/blob/038cf6ea9c609a734d7476fba256bc4b0db236b7/src/ContaoTableDictionary.php#L359-L366
204,334
atelierspierrot/internationalization
src/I18n/Loader.php
Loader.addPath
public function addPath($db_filename = null, $db_directory = null, $file = null) { if (!empty($db_filename) && !in_array($db_filename, $this->_paths['language_strings_db_filename'])) { $this->_paths['language_strings_db_filename'][] = $db_filename; } if (!empty($db_directory) && ...
php
public function addPath($db_filename = null, $db_directory = null, $file = null) { if (!empty($db_filename) && !in_array($db_filename, $this->_paths['language_strings_db_filename'])) { $this->_paths['language_strings_db_filename'][] = $db_filename; } if (!empty($db_directory) && ...
[ "public", "function", "addPath", "(", "$", "db_filename", "=", "null", ",", "$", "db_directory", "=", "null", ",", "$", "file", "=", "null", ")", "{", "if", "(", "!", "empty", "(", "$", "db_filename", ")", "&&", "!", "in_array", "(", "$", "db_filenam...
Add a path to the registry @param null|string $db_filename @param null|string $db_directory @param null|string $file @return $this
[ "Add", "a", "path", "to", "the", "registry" ]
334ebf75020d9e66b4b38a1eeab7b411f1ffe198
https://github.com/atelierspierrot/internationalization/blob/334ebf75020d9e66b4b38a1eeab7b411f1ffe198/src/I18n/Loader.php#L88-L100
204,335
atelierspierrot/internationalization
src/I18n/Loader.php
Loader.getParsedOption
public function getParsedOption($name, $lang = null, $default = null) { $val = $this->getOption($name, $default); if (false!==strpos($val, '%s')) { if (is_null($lang)) { $i18n = I18n::getInstance(); $lang = $i18n->getLanguage(); } i...
php
public function getParsedOption($name, $lang = null, $default = null) { $val = $this->getOption($name, $default); if (false!==strpos($val, '%s')) { if (is_null($lang)) { $i18n = I18n::getInstance(); $lang = $i18n->getLanguage(); } i...
[ "public", "function", "getParsedOption", "(", "$", "name", ",", "$", "lang", "=", "null", ",", "$", "default", "=", "null", ")", "{", "$", "val", "=", "$", "this", "->", "getOption", "(", "$", "name", ",", "$", "default", ")", ";", "if", "(", "fa...
Parse an option value replacing `%s` by the actual language code @param string $name The option name @param string|array $lang The language code to use or an array to pass to the 'sprintf()' method @param mixed $default The value to return if the option can't be found @return mixed The value of the option if fo...
[ "Parse", "an", "option", "value", "replacing", "%s", "by", "the", "actual", "language", "code" ]
334ebf75020d9e66b4b38a1eeab7b411f1ffe198
https://github.com/atelierspierrot/internationalization/blob/334ebf75020d9e66b4b38a1eeab7b411f1ffe198/src/I18n/Loader.php#L111-L127
204,336
atelierspierrot/internationalization
src/I18n/Loader.php
Loader.buildLanguageFileName
public function buildLanguageFileName($lang, $db_filename = null) { if (empty($db_filename)) { $db_filename = $this->getParsedOption('language_strings_db_filename'); } $filename = pathinfo($db_filename, PATHINFO_FILENAME); return $this->getParsedOption('language_filename...
php
public function buildLanguageFileName($lang, $db_filename = null) { if (empty($db_filename)) { $db_filename = $this->getParsedOption('language_strings_db_filename'); } $filename = pathinfo($db_filename, PATHINFO_FILENAME); return $this->getParsedOption('language_filename...
[ "public", "function", "buildLanguageFileName", "(", "$", "lang", ",", "$", "db_filename", "=", "null", ")", "{", "if", "(", "empty", "(", "$", "db_filename", ")", ")", "{", "$", "db_filename", "=", "$", "this", "->", "getParsedOption", "(", "'language_stri...
Build the file name for the language database @param string $lang The language code to use @param string $db_filename A base filename to use @return string The file name for the concerned language
[ "Build", "the", "file", "name", "for", "the", "language", "database" ]
334ebf75020d9e66b4b38a1eeab7b411f1ffe198
https://github.com/atelierspierrot/internationalization/blob/334ebf75020d9e66b4b38a1eeab7b411f1ffe198/src/I18n/Loader.php#L140-L147
204,337
armazon/armazon
src/Armazon/Http/Respuesta.php
Respuesta.agregarCabecera
public function agregarCabecera($nombre, $valor) { if (isset($this->cabeceras[$nombre])) { $this->cabeceras[$nombre][] = $valor; } else { $this->cabeceras[$nombre] = [$valor]; } }
php
public function agregarCabecera($nombre, $valor) { if (isset($this->cabeceras[$nombre])) { $this->cabeceras[$nombre][] = $valor; } else { $this->cabeceras[$nombre] = [$valor]; } }
[ "public", "function", "agregarCabecera", "(", "$", "nombre", ",", "$", "valor", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "cabeceras", "[", "$", "nombre", "]", ")", ")", "{", "$", "this", "->", "cabeceras", "[", "$", "nombre", "]", "[",...
Agrega una cabecera a la respuesta. @param string $nombre @param string $valor
[ "Agrega", "una", "cabecera", "a", "la", "respuesta", "." ]
ec76385ff80ce1659d81bc4050ef9483ab0ebe52
https://github.com/armazon/armazon/blob/ec76385ff80ce1659d81bc4050ef9483ab0ebe52/src/Armazon/Http/Respuesta.php#L65-L73
204,338
armazon/armazon
src/Armazon/Http/Respuesta.php
Respuesta.agregarGalleta
public function agregarGalleta($nombre, $valor, $expira = 0, $camino = '/', $dominio = null, $seguro = false, $soloHttp = false) { $extras = ''; if ($expira) { $extras .= ';Expires=' . gmdate('D, d M Y H:i:s \G\M\T', $expira); } if ($camino) { $extras .= ';Pat...
php
public function agregarGalleta($nombre, $valor, $expira = 0, $camino = '/', $dominio = null, $seguro = false, $soloHttp = false) { $extras = ''; if ($expira) { $extras .= ';Expires=' . gmdate('D, d M Y H:i:s \G\M\T', $expira); } if ($camino) { $extras .= ';Pat...
[ "public", "function", "agregarGalleta", "(", "$", "nombre", ",", "$", "valor", ",", "$", "expira", "=", "0", ",", "$", "camino", "=", "'/'", ",", "$", "dominio", "=", "null", ",", "$", "seguro", "=", "false", ",", "$", "soloHttp", "=", "false", ")"...
Agrega una galleta a la respuesta. @param $nombre @param $valor @param int $expira @param string $camino @param string $dominio @param bool $seguro @param bool $soloHttp
[ "Agrega", "una", "galleta", "a", "la", "respuesta", "." ]
ec76385ff80ce1659d81bc4050ef9483ab0ebe52
https://github.com/armazon/armazon/blob/ec76385ff80ce1659d81bc4050ef9483ab0ebe52/src/Armazon/Http/Respuesta.php#L86-L106
204,339
armazon/armazon
src/Armazon/Http/Respuesta.php
Respuesta.enviarArchivo
public function enviarArchivo($nombre) { $this->definirCabecera('Pragma', 'public'); $this->definirCabecera('Expires', '0'); $this->definirCabecera('Cache-Control', 'must-revalidate, post-check=0, pre-check=0'); $this->definirCabecera('Content-Length', (function_exists('mb_strlen') ?...
php
public function enviarArchivo($nombre) { $this->definirCabecera('Pragma', 'public'); $this->definirCabecera('Expires', '0'); $this->definirCabecera('Cache-Control', 'must-revalidate, post-check=0, pre-check=0'); $this->definirCabecera('Content-Length', (function_exists('mb_strlen') ?...
[ "public", "function", "enviarArchivo", "(", "$", "nombre", ")", "{", "$", "this", "->", "definirCabecera", "(", "'Pragma'", ",", "'public'", ")", ";", "$", "this", "->", "definirCabecera", "(", "'Expires'", ",", "'0'", ")", ";", "$", "this", "->", "defin...
Envia un archivo al navegador. @param string $nombre
[ "Envia", "un", "archivo", "al", "navegador", "." ]
ec76385ff80ce1659d81bc4050ef9483ab0ebe52
https://github.com/armazon/armazon/blob/ec76385ff80ce1659d81bc4050ef9483ab0ebe52/src/Armazon/Http/Respuesta.php#L214-L224
204,340
armazon/armazon
src/Armazon/Http/Respuesta.php
Respuesta.redirigir
public function redirigir($url, $estadoHttp = 302) { $this->definirCabecera('Location', $url); $this->definirEstadoHttp($estadoHttp); $this->definirContenido(null); return $this; }
php
public function redirigir($url, $estadoHttp = 302) { $this->definirCabecera('Location', $url); $this->definirEstadoHttp($estadoHttp); $this->definirContenido(null); return $this; }
[ "public", "function", "redirigir", "(", "$", "url", ",", "$", "estadoHttp", "=", "302", ")", "{", "$", "this", "->", "definirCabecera", "(", "'Location'", ",", "$", "url", ")", ";", "$", "this", "->", "definirEstadoHttp", "(", "$", "estadoHttp", ")", "...
Redirige el navegador a la URL especificada. @param string $url @param int $estadoHttp @return self
[ "Redirige", "el", "navegador", "a", "la", "URL", "especificada", "." ]
ec76385ff80ce1659d81bc4050ef9483ab0ebe52
https://github.com/armazon/armazon/blob/ec76385ff80ce1659d81bc4050ef9483ab0ebe52/src/Armazon/Http/Respuesta.php#L233-L239
204,341
bruno-barros/w.eloquent-framework
src/weloquent/Core/Application.php
Application.run
public function run(SymfonyRequest $request = null) { /** * On testing environment the WordPress helpers * will not have context. So we stop here. */ if(defined('WELOQUENT_TEST_ENV') && WELOQUENT_TEST_ENV) { return; } $request = $request ?: $this['request']; $response = with($stack = $this->g...
php
public function run(SymfonyRequest $request = null) { /** * On testing environment the WordPress helpers * will not have context. So we stop here. */ if(defined('WELOQUENT_TEST_ENV') && WELOQUENT_TEST_ENV) { return; } $request = $request ?: $this['request']; $response = with($stack = $this->g...
[ "public", "function", "run", "(", "SymfonyRequest", "$", "request", "=", "null", ")", "{", "/**\n\t\t * On testing environment the WordPress helpers\n\t\t * will not have context. So we stop here.\n\t\t */", "if", "(", "defined", "(", "'WELOQUENT_TEST_ENV'", ")", "&&", "WELOQUE...
Run the application and save headers. The response is up to WordPress @param \Symfony\Component\HttpFoundation\Request $request @return void
[ "Run", "the", "application", "and", "save", "headers", ".", "The", "response", "is", "up", "to", "WordPress" ]
d252dcb1ba1b6b1cecf67877d7d6d3ba57ebedbd
https://github.com/bruno-barros/w.eloquent-framework/blob/d252dcb1ba1b6b1cecf67877d7d6d3ba57ebedbd/src/weloquent/Core/Application.php#L44-L82
204,342
gregorybesson/PlaygroundFlow
src/Form/Admin/StoryMapping.php
StoryMapping.getLeaderboardTypes
public function getLeaderboardTypes() { $leaderboardTypesArray = array(); $leaderboardTypesService = $this->getServiceManager()->get('playgroundreward_leaderboardtype_service'); $leaderboardTypes = $leaderboardTypesService->getLeaderboardTypeMapper()->findAll(); foreach ($leader...
php
public function getLeaderboardTypes() { $leaderboardTypesArray = array(); $leaderboardTypesService = $this->getServiceManager()->get('playgroundreward_leaderboardtype_service'); $leaderboardTypes = $leaderboardTypesService->getLeaderboardTypeMapper()->findAll(); foreach ($leader...
[ "public", "function", "getLeaderboardTypes", "(", ")", "{", "$", "leaderboardTypesArray", "=", "array", "(", ")", ";", "$", "leaderboardTypesService", "=", "$", "this", "->", "getServiceManager", "(", ")", "->", "get", "(", "'playgroundreward_leaderboardtype_service...
retrieve all leaderboard type for associate to storyMapping @return array $leaderboardTypesArray
[ "retrieve", "all", "leaderboard", "type", "for", "associate", "to", "storyMapping" ]
f97493f8527e425d46223ac7b5c41331ab8b3022
https://github.com/gregorybesson/PlaygroundFlow/blob/f97493f8527e425d46223ac7b5c41331ab8b3022/src/Form/Admin/StoryMapping.php#L317-L328
204,343
schpill/thin
src/Inflector.php
Inflector.rules
public static function rules($type, $config = array()) { $var = '_' . $type; if (!isset(static::${$var})) { return null; } if (empty($config)) { return static::${$var}; } switch ($type) { c...
php
public static function rules($type, $config = array()) { $var = '_' . $type; if (!isset(static::${$var})) { return null; } if (empty($config)) { return static::${$var}; } switch ($type) { c...
[ "public", "static", "function", "rules", "(", "$", "type", ",", "$", "config", "=", "array", "(", ")", ")", "{", "$", "var", "=", "'_'", ".", "$", "type", ";", "if", "(", "!", "isset", "(", "static", "::", "$", "{", "$", "var", "}", ")", ")",...
Gets or adds inflection and transliteration rules. @param string $type Either `'transliteration'`, `'uninflected'`, `'singular'` or `'plural'`. @param array $config @return mixed If `$config` is empty, returns the rules list specified by `$type`, otherwise returns `null`.
[ "Gets", "or", "adds", "inflection", "and", "transliteration", "rules", "." ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Inflector.php#L221-L275
204,344
schpill/thin
src/Inflector.php
Inflector.pluralize
public static function pluralize($word) { if (isset(static::$_pluralized[$word])) { return static::$_pluralized[$word]; } extract(static::$_plural); if (!isset($regexUninflected) || !isset($regexIrregular)) { $regexUninflected = s...
php
public static function pluralize($word) { if (isset(static::$_pluralized[$word])) { return static::$_pluralized[$word]; } extract(static::$_plural); if (!isset($regexUninflected) || !isset($regexIrregular)) { $regexUninflected = s...
[ "public", "static", "function", "pluralize", "(", "$", "word", ")", "{", "if", "(", "isset", "(", "static", "::", "$", "_pluralized", "[", "$", "word", "]", ")", ")", "{", "return", "static", "::", "$", "_pluralized", "[", "$", "word", "]", ";", "}...
Changes the form of a word from singular to plural. @param string $word Word in singular form. @return string Word in plural form.
[ "Changes", "the", "form", "of", "a", "word", "from", "singular", "to", "plural", "." ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Inflector.php#L283-L315
204,345
schpill/thin
src/Inflector.php
Inflector.limitExact
public static function limitExact($value, $limit = 100, $end = '...') { if (static::length($value) <= $limit) { return $value; } $limit -= static::length($end); return static::limit($value, $limit, $end); }
php
public static function limitExact($value, $limit = 100, $end = '...') { if (static::length($value) <= $limit) { return $value; } $limit -= static::length($end); return static::limit($value, $limit, $end); }
[ "public", "static", "function", "limitExact", "(", "$", "value", ",", "$", "limit", "=", "100", ",", "$", "end", "=", "'...'", ")", "{", "if", "(", "static", "::", "length", "(", "$", "value", ")", "<=", "$", "limit", ")", "{", "return", "$", "va...
Limit the number of chracters in a string including custom ending <code> // Returns "hello..." echo Inflector::limitExact('hello word', 9); // Limit the number of characters and append a custom ending echo Inflector::limitExact('hello word', 9, '---'); </code> @param string $value @param int $limit @param st...
[ "Limit", "the", "number", "of", "chracters", "in", "a", "string", "including", "custom", "ending" ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Inflector.php#L985-L994
204,346
Phpillip/phpillip
src/Console/Model/Logger.php
Logger.getProgress
public function getProgress($total = null) { if (!$this->progress || $this->progress->getMaxSteps() === $this->progress->getProgress()) { $this->progress = new ProgressBar($this->output, $total); } return $this->progress; }
php
public function getProgress($total = null) { if (!$this->progress || $this->progress->getMaxSteps() === $this->progress->getProgress()) { $this->progress = new ProgressBar($this->output, $total); } return $this->progress; }
[ "public", "function", "getProgress", "(", "$", "total", "=", "null", ")", "{", "if", "(", "!", "$", "this", "->", "progress", "||", "$", "this", "->", "progress", "->", "getMaxSteps", "(", ")", "===", "$", "this", "->", "progress", "->", "getProgress",...
Get progress bar instance @param integer $total @return ProgressBar
[ "Get", "progress", "bar", "instance" ]
c37afaafb536361e7e0b564659f1cd5b80b98be9
https://github.com/Phpillip/phpillip/blob/c37afaafb536361e7e0b564659f1cd5b80b98be9/src/Console/Model/Logger.php#L67-L74
204,347
Phpillip/phpillip
src/Console/Model/Logger.php
Logger.flush
public function flush() { if (!$this->progress) { $this->log(''); foreach ($this->logs as $message) { $this->log($message); } $this->logs = []; } }
php
public function flush() { if (!$this->progress) { $this->log(''); foreach ($this->logs as $message) { $this->log($message); } $this->logs = []; } }
[ "public", "function", "flush", "(", ")", "{", "if", "(", "!", "$", "this", "->", "progress", ")", "{", "$", "this", "->", "log", "(", "''", ")", ";", "foreach", "(", "$", "this", "->", "logs", "as", "$", "message", ")", "{", "$", "this", "->", ...
Flush message queue
[ "Flush", "message", "queue" ]
c37afaafb536361e7e0b564659f1cd5b80b98be9
https://github.com/Phpillip/phpillip/blob/c37afaafb536361e7e0b564659f1cd5b80b98be9/src/Console/Model/Logger.php#L111-L122
204,348
phramework/phramework
src/Authentication/Manager.php
Manager.register
public static function register($implementation) { $object = new $implementation(); if (!($object instanceof \Phramework\Authentication\IAuthentication)) { throw new \Exception( 'Class is not implementing \Phramework\Authentication\IAuthentication' ); ...
php
public static function register($implementation) { $object = new $implementation(); if (!($object instanceof \Phramework\Authentication\IAuthentication)) { throw new \Exception( 'Class is not implementing \Phramework\Authentication\IAuthentication' ); ...
[ "public", "static", "function", "register", "(", "$", "implementation", ")", "{", "$", "object", "=", "new", "$", "implementation", "(", ")", ";", "if", "(", "!", "(", "$", "object", "instanceof", "\\", "Phramework", "\\", "Authentication", "\\", "IAuthent...
Register an authentication implementation. Implementation must implement `\Phramework\Authentication\IAuthentication` interface @param string $implementation implementation class @throws Exception
[ "Register", "an", "authentication", "implementation", ".", "Implementation", "must", "implement", "\\", "Phramework", "\\", "Authentication", "\\", "IAuthentication", "interface" ]
40041d1ef23b1f8cdbd26fb112448d6a3dbef012
https://github.com/phramework/phramework/blob/40041d1ef23b1f8cdbd26fb112448d6a3dbef012/src/Authentication/Manager.php#L31-L41
204,349
phramework/phramework
src/Authentication/Manager.php
Manager.check
public static function check($params, $method, $headers) { if (count(self::$implementations) !== 0 && !self::$userGetByEmailMethod) { throw new \Phramework\Exceptions\ServerException( 'getUserByEmail method is not set' ); } foreach (self::$implementat...
php
public static function check($params, $method, $headers) { if (count(self::$implementations) !== 0 && !self::$userGetByEmailMethod) { throw new \Phramework\Exceptions\ServerException( 'getUserByEmail method is not set' ); } foreach (self::$implementat...
[ "public", "static", "function", "check", "(", "$", "params", ",", "$", "method", ",", "$", "headers", ")", "{", "if", "(", "count", "(", "self", "::", "$", "implementations", ")", "!==", "0", "&&", "!", "self", "::", "$", "userGetByEmailMethod", ")", ...
Check user's authentication This method iterates through all available authentication implementations tests in priorioty order which of them might be provided and executes @param array $params Request parameters @param string $method Request method @param array $headers Request headers @return array|false Retur...
[ "Check", "user", "s", "authentication", "This", "method", "iterates", "through", "all", "available", "authentication", "implementations", "tests", "in", "priorioty", "order", "which", "of", "them", "might", "be", "provided", "and", "executes" ]
40041d1ef23b1f8cdbd26fb112448d6a3dbef012
https://github.com/phramework/phramework/blob/40041d1ef23b1f8cdbd26fb112448d6a3dbef012/src/Authentication/Manager.php#L61-L76
204,350
lechimp-p/flightcontrol
src/Recursor.php
Recursor.filter
public function filter(\Closure $predicate) { $filter = array(); $filter[0] = function(FixedFDirectory $obj) use ($predicate, &$filter) { return $obj ->filter($predicate) ->map(function(FSObject $obj) use ($predicate, &$filter) { if ($obj->...
php
public function filter(\Closure $predicate) { $filter = array(); $filter[0] = function(FixedFDirectory $obj) use ($predicate, &$filter) { return $obj ->filter($predicate) ->map(function(FSObject $obj) use ($predicate, &$filter) { if ($obj->...
[ "public", "function", "filter", "(", "\\", "Closure", "$", "predicate", ")", "{", "$", "filter", "=", "array", "(", ")", ";", "$", "filter", "[", "0", "]", "=", "function", "(", "FixedFDirectory", "$", "obj", ")", "use", "(", "$", "predicate", ",", ...
Get a recursor that folds all files in this recursor that match the provided predicate and the objects below that match the predicate as well. Won't recurse over directories that do not match the predicate! @param \Closure $predicate (FSObject -> Bool) @return Recursor
[ "Get", "a", "recursor", "that", "folds", "all", "files", "in", "this", "recursor", "that", "match", "the", "provided", "predicate", "and", "the", "objects", "below", "that", "match", "the", "predicate", "as", "well", "." ]
be7698183b44787f1b3d4a16d739655388e569ae
https://github.com/lechimp-p/flightcontrol/blob/be7698183b44787f1b3d4a16d739655388e569ae/src/Recursor.php#L39-L52
204,351
lechimp-p/flightcontrol
src/Recursor.php
Recursor.cata
public function cata(\Closure $trans) { return $trans( $this->directory->unfix()->fmap(function(FSObject $obj) use ($trans) { if ($obj->isFile()) { return $trans($obj); } assert($obj instanceof FixedFDirectory); return $obj->cata($trans); }...
php
public function cata(\Closure $trans) { return $trans( $this->directory->unfix()->fmap(function(FSObject $obj) use ($trans) { if ($obj->isFile()) { return $trans($obj); } assert($obj instanceof FixedFDirectory); return $obj->cata($trans); }...
[ "public", "function", "cata", "(", "\\", "Closure", "$", "trans", ")", "{", "return", "$", "trans", "(", "$", "this", "->", "directory", "->", "unfix", "(", ")", "->", "fmap", "(", "function", "(", "FSObject", "$", "obj", ")", "use", "(", "$", "tra...
We could also use the catamorphism on this to do recursion, as we have an unfix and an underlying fmap from the FDirectory. Supply a function $trans from File|FDirectory a to a that flattens (folds) a directory. Will start the directories where only files are included, folds them and then proceeds upwards. The return...
[ "We", "could", "also", "use", "the", "catamorphism", "on", "this", "to", "do", "recursion", "as", "we", "have", "an", "unfix", "and", "an", "underlying", "fmap", "from", "the", "FDirectory", "." ]
be7698183b44787f1b3d4a16d739655388e569ae
https://github.com/lechimp-p/flightcontrol/blob/be7698183b44787f1b3d4a16d739655388e569ae/src/Recursor.php#L69-L77
204,352
lechimp-p/flightcontrol
src/Recursor.php
Recursor.foldFiles
public function foldFiles($start_value, \Closure $fold_with) { foreach ($this->allFiles() as $file) { $start_value = $fold_with($start_value, $file); } return $start_value; }
php
public function foldFiles($start_value, \Closure $fold_with) { foreach ($this->allFiles() as $file) { $start_value = $fold_with($start_value, $file); } return $start_value; }
[ "public", "function", "foldFiles", "(", "$", "start_value", ",", "\\", "Closure", "$", "fold_with", ")", "{", "foreach", "(", "$", "this", "->", "allFiles", "(", ")", "as", "$", "file", ")", "{", "$", "start_value", "=", "$", "fold_with", "(", "$", "...
Fold over all files in this directory and subjacent directories. Start with an initial value of some type and a function from that type and File to a new value of the type. Will successively feed all files and the resulting values to that function. @param mixed $start_value @param \Closure $fold_with ...
[ "Fold", "over", "all", "files", "in", "this", "directory", "and", "subjacent", "directories", "." ]
be7698183b44787f1b3d4a16d739655388e569ae
https://github.com/lechimp-p/flightcontrol/blob/be7698183b44787f1b3d4a16d739655388e569ae/src/Recursor.php#L100-L105
204,353
lechimp-p/flightcontrol
src/Recursor.php
Recursor.allFiles
public function allFiles() { return $this->cata(function(FSObject $obj) { if ($obj->isFile()) { return array($obj); } assert($obj instanceof FDirectory); $fcontents = $obj->fcontents(); if (empty($fcontents)) { return $...
php
public function allFiles() { return $this->cata(function(FSObject $obj) { if ($obj->isFile()) { return array($obj); } assert($obj instanceof FDirectory); $fcontents = $obj->fcontents(); if (empty($fcontents)) { return $...
[ "public", "function", "allFiles", "(", ")", "{", "return", "$", "this", "->", "cata", "(", "function", "(", "FSObject", "$", "obj", ")", "{", "if", "(", "$", "obj", "->", "isFile", "(", ")", ")", "{", "return", "array", "(", "$", "obj", ")", ";",...
Get a list of all files in the directory and subjacent directories. @return File[]
[ "Get", "a", "list", "of", "all", "files", "in", "the", "directory", "and", "subjacent", "directories", "." ]
be7698183b44787f1b3d4a16d739655388e569ae
https://github.com/lechimp-p/flightcontrol/blob/be7698183b44787f1b3d4a16d739655388e569ae/src/Recursor.php#L112-L125
204,354
Ekstazi/yii2-crud-actions
src/actions/Action.php
Action.ensureAccess
protected function ensureAccess($params = []) { if (!isset($this->checkAccess)) return; $params['action'] = $this; if (call_user_func($this->checkAccess, $params)) return; $user = \Yii::$app->user; if ($user->getIsGuest()) $user->loginR...
php
protected function ensureAccess($params = []) { if (!isset($this->checkAccess)) return; $params['action'] = $this; if (call_user_func($this->checkAccess, $params)) return; $user = \Yii::$app->user; if ($user->getIsGuest()) $user->loginR...
[ "protected", "function", "ensureAccess", "(", "$", "params", "=", "[", "]", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "checkAccess", ")", ")", "return", ";", "$", "params", "[", "'action'", "]", "=", "$", "this", ";", "if", "(", ...
Ensure this action is allowed for current user @param array $params Params to be passed to {$this->checkAccess} @throws ForbiddenHttpException
[ "Ensure", "this", "action", "is", "allowed", "for", "current", "user" ]
38029fcfc1fac662604b3cabc08ec6ccacb94c57
https://github.com/Ekstazi/yii2-crud-actions/blob/38029fcfc1fac662604b3cabc08ec6ccacb94c57/src/actions/Action.php#L66-L86
204,355
tigron/skeleton-error
lib/Skeleton/Error/Detector/Whoops.php
Whoops.detect
public static function detect($html, &$error = '') { if (!class_exists('Whoops\Run')) { return false; } if (strpos($html, 'class="Whoops container"') != false) { // temporarily disables libxml warnings libxml_use_internal_errors(true); $dom = new \DOMDocument(); $dom->loadHTML($html); $xpath = ...
php
public static function detect($html, &$error = '') { if (!class_exists('Whoops\Run')) { return false; } if (strpos($html, 'class="Whoops container"') != false) { // temporarily disables libxml warnings libxml_use_internal_errors(true); $dom = new \DOMDocument(); $dom->loadHTML($html); $xpath = ...
[ "public", "static", "function", "detect", "(", "$", "html", ",", "&", "$", "error", "=", "''", ")", "{", "if", "(", "!", "class_exists", "(", "'Whoops\\Run'", ")", ")", "{", "return", "false", ";", "}", "if", "(", "strpos", "(", "$", "html", ",", ...
Function detect Takes care of detecting if a Whoops error was passed and if true extracting the error code to return it by reference @access public @param string $html code of the page to be analyzed @param string $error the error code found (if any) @return bool does the page contain an error
[ "Function", "detect", "Takes", "care", "of", "detecting", "if", "a", "Whoops", "error", "was", "passed", "and", "if", "true", "extracting", "the", "error", "code", "to", "return", "it", "by", "reference" ]
c0671ad52a4386d95179f1c47bedfdf754ee3611
https://github.com/tigron/skeleton-error/blob/c0671ad52a4386d95179f1c47bedfdf754ee3611/lib/Skeleton/Error/Detector/Whoops.php#L25-L47
204,356
pmdevelopment/tool-bundle
Framework/Model/SendMailFormModel.php
SendMailFormModel.getSwiftMessage
public function getSwiftMessage() { $message = \Swift_Message::newInstance(); if (true === is_array($this->getRecipient())) { $recipient = $this->getRecipient(); } else { $recipient = [ $this->getRecipient(), ]; }; $messag...
php
public function getSwiftMessage() { $message = \Swift_Message::newInstance(); if (true === is_array($this->getRecipient())) { $recipient = $this->getRecipient(); } else { $recipient = [ $this->getRecipient(), ]; }; $messag...
[ "public", "function", "getSwiftMessage", "(", ")", "{", "$", "message", "=", "\\", "Swift_Message", "::", "newInstance", "(", ")", ";", "if", "(", "true", "===", "is_array", "(", "$", "this", "->", "getRecipient", "(", ")", ")", ")", "{", "$", "recipie...
Get Swift Message @return Swift_Mime_Message
[ "Get", "Swift", "Message" ]
2cbc9f82c5b33fd7a9d389edd3676e9f70ea8129
https://github.com/pmdevelopment/tool-bundle/blob/2cbc9f82c5b33fd7a9d389edd3676e9f70ea8129/Framework/Model/SendMailFormModel.php#L161-L190
204,357
zbox/UnifiedPush
src/Zbox/UnifiedPush/NotificationService/GCM/Response.php
Response.checkMessageStatus
private function checkMessageStatus($message) { if (!$message || $message->success == 0 || $message->failure > 0) { throw new DispatchMessageException( sprintf("%d messages could not be processed", $message->failure) ); } }
php
private function checkMessageStatus($message) { if (!$message || $message->success == 0 || $message->failure > 0) { throw new DispatchMessageException( sprintf("%d messages could not be processed", $message->failure) ); } }
[ "private", "function", "checkMessageStatus", "(", "$", "message", ")", "{", "if", "(", "!", "$", "message", "||", "$", "message", "->", "success", "==", "0", "||", "$", "message", "->", "failure", ">", "0", ")", "{", "throw", "new", "DispatchMessageExcep...
Checks message status @param \stdClass $message
[ "Checks", "message", "status" ]
47da2d0577b18ac709cd947c68541014001e1866
https://github.com/zbox/UnifiedPush/blob/47da2d0577b18ac709cd947c68541014001e1866/src/Zbox/UnifiedPush/NotificationService/GCM/Response.php#L119-L126
204,358
zbox/UnifiedPush
src/Zbox/UnifiedPush/NotificationService/GCM/Response.php
Response.checkMessageResult
private function checkMessageResult($message, \ArrayIterator $recipients) { $hasDeviceError = false; $recipientCount = $recipients->count(); for ($i = 0; $i <= $recipientCount; $i++) { if (isset($message->results[$i]['registration_id'])) { $hasDeviceError = true...
php
private function checkMessageResult($message, \ArrayIterator $recipients) { $hasDeviceError = false; $recipientCount = $recipients->count(); for ($i = 0; $i <= $recipientCount; $i++) { if (isset($message->results[$i]['registration_id'])) { $hasDeviceError = true...
[ "private", "function", "checkMessageResult", "(", "$", "message", ",", "\\", "ArrayIterator", "$", "recipients", ")", "{", "$", "hasDeviceError", "=", "false", ";", "$", "recipientCount", "=", "$", "recipients", "->", "count", "(", ")", ";", "for", "(", "$...
Check message result @param \stdClass $message @param \ArrayIterator $recipients
[ "Check", "message", "result" ]
47da2d0577b18ac709cd947c68541014001e1866
https://github.com/zbox/UnifiedPush/blob/47da2d0577b18ac709cd947c68541014001e1866/src/Zbox/UnifiedPush/NotificationService/GCM/Response.php#L134-L156
204,359
diasbruno/stc
lib/stc/Config.php
Config.getOptional
public function getOptional($key, $defaultValue = null) { if (array_key_exists($key, $this->data)) { return $this->data[$key]; } return $defaultValue; }
php
public function getOptional($key, $defaultValue = null) { if (array_key_exists($key, $this->data)) { return $this->data[$key]; } return $defaultValue; }
[ "public", "function", "getOptional", "(", "$", "key", ",", "$", "defaultValue", "=", "null", ")", "{", "if", "(", "array_key_exists", "(", "$", "key", ",", "$", "this", "->", "data", ")", ")", "{", "return", "$", "this", "->", "data", "[", "$", "ke...
Use this method for optional values. @param $key string | The key name. @return object
[ "Use", "this", "method", "for", "optional", "values", "." ]
43f62c3b28167bff76274f954e235413a9e9c707
https://github.com/diasbruno/stc/blob/43f62c3b28167bff76274f954e235413a9e9c707/lib/stc/Config.php#L82-L88
204,360
bruno-barros/w.eloquent-framework
src/weloquent/Providers/OptimizeServiceProvider.php
OptimizeServiceProvider.registerOptimizeCommand
protected function registerOptimizeCommand() { $this->app->bindShared('command.optimize', function($app) { return new \Weloquent\Core\Console\OptimizeCommand($app['composer']); }); }
php
protected function registerOptimizeCommand() { $this->app->bindShared('command.optimize', function($app) { return new \Weloquent\Core\Console\OptimizeCommand($app['composer']); }); }
[ "protected", "function", "registerOptimizeCommand", "(", ")", "{", "$", "this", "->", "app", "->", "bindShared", "(", "'command.optimize'", ",", "function", "(", "$", "app", ")", "{", "return", "new", "\\", "Weloquent", "\\", "Core", "\\", "Console", "\\", ...
Register the optimize command. @return void
[ "Register", "the", "optimize", "command", "." ]
d252dcb1ba1b6b1cecf67877d7d6d3ba57ebedbd
https://github.com/bruno-barros/w.eloquent-framework/blob/d252dcb1ba1b6b1cecf67877d7d6d3ba57ebedbd/src/weloquent/Providers/OptimizeServiceProvider.php#L35-L41
204,361
PhoxPHP/Glider
src/Events/EventManager.php
EventManager.listenTo
public static function listenTo(String $eventId, $callback) { if (!in_array(gettype($callback), ['array', 'object', 'closure'])) { return false; } EventManager::$listeners[$eventId][] = $callback; }
php
public static function listenTo(String $eventId, $callback) { if (!in_array(gettype($callback), ['array', 'object', 'closure'])) { return false; } EventManager::$listeners[$eventId][] = $callback; }
[ "public", "static", "function", "listenTo", "(", "String", "$", "eventId", ",", "$", "callback", ")", "{", "if", "(", "!", "in_array", "(", "gettype", "(", "$", "callback", ")", ",", "[", "'array'", ",", "'object'", ",", "'closure'", "]", ")", ")", "...
Creates a new listener. Two parameters are required. The eventId that will be used to track the current event and the callback which can be either an array or a closure. @param $eventId <String> @param $callback <Mixed> @access public @static @return <void>
[ "Creates", "a", "new", "listener", ".", "Two", "parameters", "are", "required", ".", "The", "eventId", "that", "will", "be", "used", "to", "track", "the", "current", "event", "and", "the", "callback", "which", "can", "be", "either", "an", "array", "or", ...
17aaf3b7bb6e70ea3ae1f04e30a7690e884bf042
https://github.com/PhoxPHP/Glider/blob/17aaf3b7bb6e70ea3ae1f04e30a7690e884bf042/src/Events/EventManager.php#L75-L82
204,362
PhoxPHP/Glider
src/Events/EventManager.php
EventManager.attachSubscriber
public function attachSubscriber(Subscriber $subscriber) { $listeners = $subscriber->getRegisteredEvents(); foreach($listeners as $id => $listener) { EventManager::listenTo($id, array($subscriber, $listener)); } }
php
public function attachSubscriber(Subscriber $subscriber) { $listeners = $subscriber->getRegisteredEvents(); foreach($listeners as $id => $listener) { EventManager::listenTo($id, array($subscriber, $listener)); } }
[ "public", "function", "attachSubscriber", "(", "Subscriber", "$", "subscriber", ")", "{", "$", "listeners", "=", "$", "subscriber", "->", "getRegisteredEvents", "(", ")", ";", "foreach", "(", "$", "listeners", "as", "$", "id", "=>", "$", "listener", ")", "...
This method attaches an event through it's subscribe object. List of events are loaded from the subscriber and added to the listeners. @param $subscriber <Kit\Glider\Events\Contract\Subcriber> @access public @return <void>
[ "This", "method", "attaches", "an", "event", "through", "it", "s", "subscribe", "object", ".", "List", "of", "events", "are", "loaded", "from", "the", "subscriber", "and", "added", "to", "the", "listeners", "." ]
17aaf3b7bb6e70ea3ae1f04e30a7690e884bf042
https://github.com/PhoxPHP/Glider/blob/17aaf3b7bb6e70ea3ae1f04e30a7690e884bf042/src/Events/EventManager.php#L109-L115
204,363
eloquent/endec
src/Endec.php
Endec.registerFilters
public static function registerFilters(Isolator $isolator = null) { $isolator = Isolator::get($isolator); $isolator->stream_filter_register( 'endec.base16-encode', 'Eloquent\Endec\Base16\Base16EncodeNativeStreamFilter' ); $isolator->stream_filter_register( ...
php
public static function registerFilters(Isolator $isolator = null) { $isolator = Isolator::get($isolator); $isolator->stream_filter_register( 'endec.base16-encode', 'Eloquent\Endec\Base16\Base16EncodeNativeStreamFilter' ); $isolator->stream_filter_register( ...
[ "public", "static", "function", "registerFilters", "(", "Isolator", "$", "isolator", "=", "null", ")", "{", "$", "isolator", "=", "Isolator", "::", "get", "(", "$", "isolator", ")", ";", "$", "isolator", "->", "stream_filter_register", "(", "'endec.base16-enco...
Register Endec's native stream filters. @param Isolator|null $isolator The isolator to use.
[ "Register", "Endec", "s", "native", "stream", "filters", "." ]
90043a26439739d6bac631cc57dab3ecf5cafdc3
https://github.com/eloquent/endec/blob/90043a26439739d6bac631cc57dab3ecf5cafdc3/src/Endec.php#L26-L86
204,364
kmfk/slowdb
src/Collection.php
Collection.get
public function get($key) { $position = $this->getPosition($key); if (false !== $position) { return [$key => $this->file->read($position)]; } return false; }
php
public function get($key) { $position = $this->getPosition($key); if (false !== $position) { return [$key => $this->file->read($position)]; } return false; }
[ "public", "function", "get", "(", "$", "key", ")", "{", "$", "position", "=", "$", "this", "->", "getPosition", "(", "$", "key", ")", ";", "if", "(", "false", "!==", "$", "position", ")", "{", "return", "[", "$", "key", "=>", "$", "this", "->", ...
Retrieves the value based on the key @param mixed $key The key to fetch data for @return array
[ "Retrieves", "the", "value", "based", "on", "the", "key" ]
7461771b8ddc0c9887e2ee69a76ff5ffc763974c
https://github.com/kmfk/slowdb/blob/7461771b8ddc0c9887e2ee69a76ff5ffc763974c/src/Collection.php#L83-L91
204,365
kmfk/slowdb
src/Collection.php
Collection.query
public function query($match) { $keys = $this->index->getKeys(); $matches = array_filter($keys, function($key) use ($match) { return preg_match("/{$match}/i", $key); }); $results = []; foreach ($matches as $match) { $result = $this->get($match); ...
php
public function query($match) { $keys = $this->index->getKeys(); $matches = array_filter($keys, function($key) use ($match) { return preg_match("/{$match}/i", $key); }); $results = []; foreach ($matches as $match) { $result = $this->get($match); ...
[ "public", "function", "query", "(", "$", "match", ")", "{", "$", "keys", "=", "$", "this", "->", "index", "->", "getKeys", "(", ")", ";", "$", "matches", "=", "array_filter", "(", "$", "keys", ",", "function", "(", "$", "key", ")", "use", "(", "$...
Queries for Keys matching a case insensitive expression @param string $match The expression to match against @return array
[ "Queries", "for", "Keys", "matching", "a", "case", "insensitive", "expression" ]
7461771b8ddc0c9887e2ee69a76ff5ffc763974c
https://github.com/kmfk/slowdb/blob/7461771b8ddc0c9887e2ee69a76ff5ffc763974c/src/Collection.php#L130-L144
204,366
kmfk/slowdb
src/Collection.php
Collection.remove
public function remove($key) { $position = $this->getPosition($key); if (false !== $position) { $this->file->remove($position); $this->rebuildIndex(); return true; } return false; }
php
public function remove($key) { $position = $this->getPosition($key); if (false !== $position) { $this->file->remove($position); $this->rebuildIndex(); return true; } return false; }
[ "public", "function", "remove", "(", "$", "key", ")", "{", "$", "position", "=", "$", "this", "->", "getPosition", "(", "$", "key", ")", ";", "if", "(", "false", "!==", "$", "position", ")", "{", "$", "this", "->", "file", "->", "remove", "(", "$...
Remove a Value based on its Key @param mixed $key The key to remove @return bool
[ "Remove", "a", "Value", "based", "on", "its", "Key" ]
7461771b8ddc0c9887e2ee69a76ff5ffc763974c
https://github.com/kmfk/slowdb/blob/7461771b8ddc0c9887e2ee69a76ff5ffc763974c/src/Collection.php#L175-L186
204,367
kmfk/slowdb
src/Collection.php
Collection.drop
public function drop() { $filepath = $this->file->getFilePath(); unset($this->file); if (!file_exists($filepath)) { unlink($filepath); } return true; }
php
public function drop() { $filepath = $this->file->getFilePath(); unset($this->file); if (!file_exists($filepath)) { unlink($filepath); } return true; }
[ "public", "function", "drop", "(", ")", "{", "$", "filepath", "=", "$", "this", "->", "file", "->", "getFilePath", "(", ")", ";", "unset", "(", "$", "this", "->", "file", ")", ";", "if", "(", "!", "file_exists", "(", "$", "filepath", ")", ")", "{...
Removes the Collection database file @return bool
[ "Removes", "the", "Collection", "database", "file" ]
7461771b8ddc0c9887e2ee69a76ff5ffc763974c
https://github.com/kmfk/slowdb/blob/7461771b8ddc0c9887e2ee69a76ff5ffc763974c/src/Collection.php#L206-L217
204,368
wdbo/webdocbook
src/WebDocBook/FrontController.php
FrontController.boot
protected function boot() { try { Kernel::boot(); // Kernel::debug(); // the actual manifest if (true===file_exists(Kernel::getPath('app_manifest_filepath'))) { $manifest_data = FilesystemHelper::parseJson(Kernel::getPath('app_manifest_filepath...
php
protected function boot() { try { Kernel::boot(); // Kernel::debug(); // the actual manifest if (true===file_exists(Kernel::getPath('app_manifest_filepath'))) { $manifest_data = FilesystemHelper::parseJson(Kernel::getPath('app_manifest_filepath...
[ "protected", "function", "boot", "(", ")", "{", "try", "{", "Kernel", "::", "boot", "(", ")", ";", "// Kernel::debug();", "// the actual manifest", "if", "(", "true", "===", "file_exists", "(", "Kernel", "::", "getPath", "(", "'app_manifest_filepath'", ...
This must boot the system If an error occurred, a message is written "as is" on screen and the run stops here. @return void @see \WebDocBook\Kernel::boot()
[ "This", "must", "boot", "the", "system" ]
7d4e806f674b6222c9a3e85bfed34e72bc9d584e
https://github.com/wdbo/webdocbook/blob/7d4e806f674b6222c9a3e85bfed34e72bc9d584e/src/WebDocBook/FrontController.php#L94-L125
204,369
wdbo/webdocbook
src/WebDocBook/FrontController.php
FrontController.distribute
public function distribute($return = false) { $this->processSessionValues(); try { $routing = $this->request ->parseWDBRequest() ->getWDBRouting(); } catch (NotFoundException $e) { throw $e; } $this->processQueryArgume...
php
public function distribute($return = false) { $this->processSessionValues(); try { $routing = $this->request ->parseWDBRequest() ->getWDBRouting(); } catch (NotFoundException $e) { throw $e; } $this->processQueryArgume...
[ "public", "function", "distribute", "(", "$", "return", "=", "false", ")", "{", "$", "this", "->", "processSessionValues", "(", ")", ";", "try", "{", "$", "routing", "=", "$", "this", "->", "request", "->", "parseWDBRequest", "(", ")", "->", "getWDBRouti...
This will distribute the request and return the response @param bool $return @throws \WebDocBook\Exception\NotFoundException @throws \WebDocBook\Exception\RuntimeException if the controller action does not return a valid array @return void
[ "This", "will", "distribute", "the", "request", "and", "return", "the", "response" ]
7d4e806f674b6222c9a3e85bfed34e72bc9d584e
https://github.com/wdbo/webdocbook/blob/7d4e806f674b6222c9a3e85bfed34e72bc9d584e/src/WebDocBook/FrontController.php#L238-L290
204,370
stonedz/pff2
src/modules/encryption/Encryption.php
Encryption.decrypt
public function decrypt($crypttext, $key = null) { if(null !== $key) { $this->_key = md5($key); } $crypttext = base64_decode($crypttext); $plaintext = ''; $td = mcrypt_module_open($this->_cypher, '', self::MODE, ''); $ivsize = mcrypt_enc_get_iv_size...
php
public function decrypt($crypttext, $key = null) { if(null !== $key) { $this->_key = md5($key); } $crypttext = base64_decode($crypttext); $plaintext = ''; $td = mcrypt_module_open($this->_cypher, '', self::MODE, ''); $ivsize = mcrypt_enc_get_iv_size...
[ "public", "function", "decrypt", "(", "$", "crypttext", ",", "$", "key", "=", "null", ")", "{", "if", "(", "null", "!==", "$", "key", ")", "{", "$", "this", "->", "_key", "=", "md5", "(", "$", "key", ")", ";", "}", "$", "crypttext", "=", "base6...
Decrypt a previously encrypted text @param string $crypttext @param null|string $key User specified key @return string
[ "Decrypt", "a", "previously", "encrypted", "text" ]
ec3b087d4d4732816f61ac487f0cb25511e0da88
https://github.com/stonedz/pff2/blob/ec3b087d4d4732816f61ac487f0cb25511e0da88/src/modules/encryption/Encryption.php#L70-L86
204,371
zbox/UnifiedPush
src/Zbox/UnifiedPush/NotificationService/ServiceClientFactory.php
ServiceClientFactory.getServiceURL
public function getServiceURL($serviceName, $isFeedback = false) { $serviceName = NotificationServices::validateServiceName($serviceName); $serviceType = $isFeedback ? self::FEEDBACK_SERVICE : self::PUSH_SERVICE; $environment = $this->getEnvironment(); $serviceConfig = $this->getSer...
php
public function getServiceURL($serviceName, $isFeedback = false) { $serviceName = NotificationServices::validateServiceName($serviceName); $serviceType = $isFeedback ? self::FEEDBACK_SERVICE : self::PUSH_SERVICE; $environment = $this->getEnvironment(); $serviceConfig = $this->getSer...
[ "public", "function", "getServiceURL", "(", "$", "serviceName", ",", "$", "isFeedback", "=", "false", ")", "{", "$", "serviceName", "=", "NotificationServices", "::", "validateServiceName", "(", "$", "serviceName", ")", ";", "$", "serviceType", "=", "$", "isFe...
Gets notification service url by service name @param string $serviceName @param bool $isFeedback @return array
[ "Gets", "notification", "service", "url", "by", "service", "name" ]
47da2d0577b18ac709cd947c68541014001e1866
https://github.com/zbox/UnifiedPush/blob/47da2d0577b18ac709cd947c68541014001e1866/src/Zbox/UnifiedPush/NotificationService/ServiceClientFactory.php#L148-L165
204,372
zbox/UnifiedPush
src/Zbox/UnifiedPush/NotificationService/ServiceClientFactory.php
ServiceClientFactory.createServiceClient
public function createServiceClient($serviceName, $isFeedback = false) { $serviceUrl = $this->getServiceURL($serviceName, $isFeedback); $clientClass = sprintf( 'Zbox\UnifiedPush\NotificationService\%s\%s', $serviceName, $isFeedback ? 'ServiceFeedbackClient' : 'Se...
php
public function createServiceClient($serviceName, $isFeedback = false) { $serviceUrl = $this->getServiceURL($serviceName, $isFeedback); $clientClass = sprintf( 'Zbox\UnifiedPush\NotificationService\%s\%s', $serviceName, $isFeedback ? 'ServiceFeedbackClient' : 'Se...
[ "public", "function", "createServiceClient", "(", "$", "serviceName", ",", "$", "isFeedback", "=", "false", ")", "{", "$", "serviceUrl", "=", "$", "this", "->", "getServiceURL", "(", "$", "serviceName", ",", "$", "isFeedback", ")", ";", "$", "clientClass", ...
Creates client server connection by service name and sender credentials @param string $serviceName @param bool $isFeedback @return ServiceClientInterface
[ "Creates", "client", "server", "connection", "by", "service", "name", "and", "sender", "credentials" ]
47da2d0577b18ac709cd947c68541014001e1866
https://github.com/zbox/UnifiedPush/blob/47da2d0577b18ac709cd947c68541014001e1866/src/Zbox/UnifiedPush/NotificationService/ServiceClientFactory.php#L174-L188
204,373
zbox/UnifiedPush
src/Zbox/UnifiedPush/NotificationService/ServiceClientFactory.php
ServiceClientFactory.loadServicesConfig
public function loadServicesConfig() { $configPath = $this->serviceConfigPath; if (!file_exists($configPath)) { throw new InvalidArgumentException( sprintf( "Service config file '%s' doesn`t exists", $configPath ) ...
php
public function loadServicesConfig() { $configPath = $this->serviceConfigPath; if (!file_exists($configPath)) { throw new InvalidArgumentException( sprintf( "Service config file '%s' doesn`t exists", $configPath ) ...
[ "public", "function", "loadServicesConfig", "(", ")", "{", "$", "configPath", "=", "$", "this", "->", "serviceConfigPath", ";", "if", "(", "!", "file_exists", "(", "$", "configPath", ")", ")", "{", "throw", "new", "InvalidArgumentException", "(", "sprintf", ...
Load notification services connection data @return $this
[ "Load", "notification", "services", "connection", "data" ]
47da2d0577b18ac709cd947c68541014001e1866
https://github.com/zbox/UnifiedPush/blob/47da2d0577b18ac709cd947c68541014001e1866/src/Zbox/UnifiedPush/NotificationService/ServiceClientFactory.php#L195-L217
204,374
newestindustry/ginger-rest
src/Ginger/Format.php
Format.getFormatByAcceptHeader
public static function getFormatByAcceptHeader($header) { if(isset(self::$mimeMapper[$header])) { return self::$mimeMapper[$header]; } else { return self::$format; } }
php
public static function getFormatByAcceptHeader($header) { if(isset(self::$mimeMapper[$header])) { return self::$mimeMapper[$header]; } else { return self::$format; } }
[ "public", "static", "function", "getFormatByAcceptHeader", "(", "$", "header", ")", "{", "if", "(", "isset", "(", "self", "::", "$", "mimeMapper", "[", "$", "header", "]", ")", ")", "{", "return", "self", "::", "$", "mimeMapper", "[", "$", "header", "]...
getFormatByAcceptHeader function. @access public @static @param mixed $header @return void
[ "getFormatByAcceptHeader", "function", "." ]
482b77dc122a60ab0bf143a3c4a1e67168985c83
https://github.com/newestindustry/ginger-rest/blob/482b77dc122a60ab0bf143a3c4a1e67168985c83/src/Ginger/Format.php#L89-L96
204,375
hermajan/dobine
src/Connections/Environment.php
Environment.load
public static function load(string $filename) { if(class_exists(Dotenv::class)) { $dotenv = new Dotenv($filename); $dotenv->load(); } }
php
public static function load(string $filename) { if(class_exists(Dotenv::class)) { $dotenv = new Dotenv($filename); $dotenv->load(); } }
[ "public", "static", "function", "load", "(", "string", "$", "filename", ")", "{", "if", "(", "class_exists", "(", "Dotenv", "::", "class", ")", ")", "{", "$", "dotenv", "=", "new", "Dotenv", "(", "$", "filename", ")", ";", "$", "dotenv", "->", "load"...
Loads environment variables. @param string $filename Path to the .env file.
[ "Loads", "environment", "variables", "." ]
0f18727923cfe06abbbfcd1d39b897633586ad05
https://github.com/hermajan/dobine/blob/0f18727923cfe06abbbfcd1d39b897633586ad05/src/Connections/Environment.php#L15-L20
204,376
hermajan/dobine
src/Connections/Environment.php
Environment.choose
public static function choose($environment = null) { if (!isset($environment)) { if(isset($_ENV["APP_ENV"])) { switch($_ENV["APP_ENV"]) { case "dev": case "development": default: $environment = Environment::DEVELOPMENT; break; case "stage": $environment = Environment::STAGE; break; c...
php
public static function choose($environment = null) { if (!isset($environment)) { if(isset($_ENV["APP_ENV"])) { switch($_ENV["APP_ENV"]) { case "dev": case "development": default: $environment = Environment::DEVELOPMENT; break; case "stage": $environment = Environment::STAGE; break; c...
[ "public", "static", "function", "choose", "(", "$", "environment", "=", "null", ")", "{", "if", "(", "!", "isset", "(", "$", "environment", ")", ")", "{", "if", "(", "isset", "(", "$", "_ENV", "[", "\"APP_ENV\"", "]", ")", ")", "{", "switch", "(", ...
Chooses environment. @param null|string $environment @return string
[ "Chooses", "environment", "." ]
0f18727923cfe06abbbfcd1d39b897633586ad05
https://github.com/hermajan/dobine/blob/0f18727923cfe06abbbfcd1d39b897633586ad05/src/Connections/Environment.php#L27-L51
204,377
villermen/runescape-lookup-commons
src/ActivityFeed/ActivityFeed.php
ActivityFeed.getItemsAfter
public function getItemsAfter(ActivityFeedItem $targetItem): array { $newerItems = []; foreach($this->getItems() as $item) { if ($item->equals($targetItem)) { break; } $newerItems[] = $item; } return $newerItems; }
php
public function getItemsAfter(ActivityFeedItem $targetItem): array { $newerItems = []; foreach($this->getItems() as $item) { if ($item->equals($targetItem)) { break; } $newerItems[] = $item; } return $newerItems; }
[ "public", "function", "getItemsAfter", "(", "ActivityFeedItem", "$", "targetItem", ")", ":", "array", "{", "$", "newerItems", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "getItems", "(", ")", "as", "$", "item", ")", "{", "if", "(", "$", "i...
Returns all feed items in this feed that occur after the given item. @param ActivityFeedItem $targetItem @return ActivityFeedItem[]
[ "Returns", "all", "feed", "items", "in", "this", "feed", "that", "occur", "after", "the", "given", "item", "." ]
3e24dadbdc5e20b755280e5110f4ca0a1758b04c
https://github.com/villermen/runescape-lookup-commons/blob/3e24dadbdc5e20b755280e5110f4ca0a1758b04c/src/ActivityFeed/ActivityFeed.php#L32-L45
204,378
villermen/runescape-lookup-commons
src/ActivityFeed/ActivityFeed.php
ActivityFeed.merge
public function merge(ActivityFeed $newerFeed): ActivityFeed { if (count($this->getItems()) > 0) { $prepend = $newerFeed->getItemsAfter($this->getItems()[0]); } else { $prepend = $newerFeed->getItems(); } return new ActivityFeed(array_merge($prepend, $this->g...
php
public function merge(ActivityFeed $newerFeed): ActivityFeed { if (count($this->getItems()) > 0) { $prepend = $newerFeed->getItemsAfter($this->getItems()[0]); } else { $prepend = $newerFeed->getItems(); } return new ActivityFeed(array_merge($prepend, $this->g...
[ "public", "function", "merge", "(", "ActivityFeed", "$", "newerFeed", ")", ":", "ActivityFeed", "{", "if", "(", "count", "(", "$", "this", "->", "getItems", "(", ")", ")", ">", "0", ")", "{", "$", "prepend", "=", "$", "newerFeed", "->", "getItemsAfter"...
Merges this ActivityFeed with a newer feed. Returns a new feed with all new items from the newerFeed prepended to it. @param ActivityFeed $newerFeed @return ActivityFeed
[ "Merges", "this", "ActivityFeed", "with", "a", "newer", "feed", ".", "Returns", "a", "new", "feed", "with", "all", "new", "items", "from", "the", "newerFeed", "prepended", "to", "it", "." ]
3e24dadbdc5e20b755280e5110f4ca0a1758b04c
https://github.com/villermen/runescape-lookup-commons/blob/3e24dadbdc5e20b755280e5110f4ca0a1758b04c/src/ActivityFeed/ActivityFeed.php#L54-L63
204,379
apishka/easy-extend
source/Broker.php
Broker.getRouter
public function getRouter(string $router): RouterAbstract { if (!array_key_exists($router, $this->_routers)) $this->_routers[$router] = $this->getItem($router); return $this->_routers[$router]; }
php
public function getRouter(string $router): RouterAbstract { if (!array_key_exists($router, $this->_routers)) $this->_routers[$router] = $this->getItem($router); return $this->_routers[$router]; }
[ "public", "function", "getRouter", "(", "string", "$", "router", ")", ":", "RouterAbstract", "{", "if", "(", "!", "array_key_exists", "(", "$", "router", ",", "$", "this", "->", "_routers", ")", ")", "$", "this", "->", "_routers", "[", "$", "router", "...
Get router instance @param string $router @return RouterAbstract
[ "Get", "router", "instance" ]
5e5c63c2509377abc3db6956e353623683703e09
https://github.com/apishka/easy-extend/blob/5e5c63c2509377abc3db6956e353623683703e09/source/Broker.php#L60-L66
204,380
apishka/easy-extend
source/Broker.php
Broker.isCorrectItem
protected function isCorrectItem(\ReflectionClass $reflector): bool { if ($reflector->isInstance($this)) return false; if (!$reflector->isSubclassOf(RouterAbstract::class)) return false; return true; }
php
protected function isCorrectItem(\ReflectionClass $reflector): bool { if ($reflector->isInstance($this)) return false; if (!$reflector->isSubclassOf(RouterAbstract::class)) return false; return true; }
[ "protected", "function", "isCorrectItem", "(", "\\", "ReflectionClass", "$", "reflector", ")", ":", "bool", "{", "if", "(", "$", "reflector", "->", "isInstance", "(", "$", "this", ")", ")", "return", "false", ";", "if", "(", "!", "$", "reflector", "->", ...
Is correct item @param \ReflectionClass $reflector @return bool
[ "Is", "correct", "item" ]
5e5c63c2509377abc3db6956e353623683703e09
https://github.com/apishka/easy-extend/blob/5e5c63c2509377abc3db6956e353623683703e09/source/Broker.php#L97-L106
204,381
tasoftch/php-service-manager
src/ServiceManager.php
ServiceManager.generalServiceManager
public static function generalServiceManager(Iterable $serviceConfig = NULL, $selfRefNames= []) { if(!static::$serviceManager) { if(is_null($serviceConfig)) throw new ServiceException(sprintf("First call of %s must pass a service configuration", __METHOD__), 13); /** @va...
php
public static function generalServiceManager(Iterable $serviceConfig = NULL, $selfRefNames= []) { if(!static::$serviceManager) { if(is_null($serviceConfig)) throw new ServiceException(sprintf("First call of %s must pass a service configuration", __METHOD__), 13); /** @va...
[ "public", "static", "function", "generalServiceManager", "(", "Iterable", "$", "serviceConfig", "=", "NULL", ",", "$", "selfRefNames", "=", "[", "]", ")", "{", "if", "(", "!", "static", "::", "$", "serviceManager", ")", "{", "if", "(", "is_null", "(", "$...
Returns the service manager. The first call of this method should pass a service config info. @param iterable|NULL $serviceConfig @return ServiceManager
[ "Returns", "the", "service", "manager", ".", "The", "first", "call", "of", "this", "method", "should", "pass", "a", "service", "config", "info", "." ]
5f627d81457356f6c087398cd1e8f8e4f9d14822
https://github.com/tasoftch/php-service-manager/blob/5f627d81457356f6c087398cd1e8f8e4f9d14822/src/ServiceManager.php#L72-L85
204,382
tasoftch/php-service-manager
src/ServiceManager.php
ServiceManager.get
public function get($serviceName) { $container = $this->serviceData[$serviceName] ?? NULL; if($container) { return $container->getInstance(); } if(in_array($serviceName, $this->getSelfReferenceNames())) return $this; $e = new UnknownServiceException("Ser...
php
public function get($serviceName) { $container = $this->serviceData[$serviceName] ?? NULL; if($container) { return $container->getInstance(); } if(in_array($serviceName, $this->getSelfReferenceNames())) return $this; $e = new UnknownServiceException("Ser...
[ "public", "function", "get", "(", "$", "serviceName", ")", "{", "$", "container", "=", "$", "this", "->", "serviceData", "[", "$", "serviceName", "]", "??", "NULL", ";", "if", "(", "$", "container", ")", "{", "return", "$", "container", "->", "getInsta...
Returns the instance of a requested service This method call fails if the service does not exist or something else went wrong during creating the service instance. @param string $serviceName @return object|null @throws UnknownServiceException
[ "Returns", "the", "instance", "of", "a", "requested", "service", "This", "method", "call", "fails", "if", "the", "service", "does", "not", "exist", "or", "something", "else", "went", "wrong", "during", "creating", "the", "service", "instance", "." ]
5f627d81457356f6c087398cd1e8f8e4f9d14822
https://github.com/tasoftch/php-service-manager/blob/5f627d81457356f6c087398cd1e8f8e4f9d14822/src/ServiceManager.php#L187-L199
204,383
tasoftch/php-service-manager
src/ServiceManager.php
ServiceManager.set
public function set(string $serviceName, $object) { if(isset($this->serviceData[$serviceName]) || in_array($serviceName, $this->getSelfReferenceNames())) { if($this->replaceExistingServices()) { trigger_error("Service $serviceName is already registered", E_USER_NOTICE); }...
php
public function set(string $serviceName, $object) { if(isset($this->serviceData[$serviceName]) || in_array($serviceName, $this->getSelfReferenceNames())) { if($this->replaceExistingServices()) { trigger_error("Service $serviceName is already registered", E_USER_NOTICE); }...
[ "public", "function", "set", "(", "string", "$", "serviceName", ",", "$", "object", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "serviceData", "[", "$", "serviceName", "]", ")", "||", "in_array", "(", "$", "serviceName", ",", "$", "this", "...
Sets a service Accepted are: - Objects that implement ContainerInterface, their getInstance method call will be the service instance - A callback (note! Objects implementing __invoke are also callbacks!) to obtain the service instance - An array to load configured service - Any other object directly as service If rep...
[ "Sets", "a", "service" ]
5f627d81457356f6c087398cd1e8f8e4f9d14822
https://github.com/tasoftch/php-service-manager/blob/5f627d81457356f6c087398cd1e8f8e4f9d14822/src/ServiceManager.php#L231-L254
204,384
tasoftch/php-service-manager
src/ServiceManager.php
ServiceManager.serviceExists
public function serviceExists(string $serviceName): bool { return isset($this->serviceData[$serviceName]) || in_array($serviceName, $this->getSelfReferenceNames()) ? true : false; }
php
public function serviceExists(string $serviceName): bool { return isset($this->serviceData[$serviceName]) || in_array($serviceName, $this->getSelfReferenceNames()) ? true : false; }
[ "public", "function", "serviceExists", "(", "string", "$", "serviceName", ")", ":", "bool", "{", "return", "isset", "(", "$", "this", "->", "serviceData", "[", "$", "serviceName", "]", ")", "||", "in_array", "(", "$", "serviceName", ",", "$", "this", "->...
Looks, if a service with the given name is available @param string $serviceName @return bool
[ "Looks", "if", "a", "service", "with", "the", "given", "name", "is", "available" ]
5f627d81457356f6c087398cd1e8f8e4f9d14822
https://github.com/tasoftch/php-service-manager/blob/5f627d81457356f6c087398cd1e8f8e4f9d14822/src/ServiceManager.php#L261-L263
204,385
tasoftch/php-service-manager
src/ServiceManager.php
ServiceManager.isServiceLoaded
public function isServiceLoaded(string $serviceName): bool { if($this->serviceExists($serviceName)) { if(in_array($serviceName, $this->getSelfReferenceNames())) return true; /** @var ContainerInterface $container */ $container = $this->serviceData[$serviceNam...
php
public function isServiceLoaded(string $serviceName): bool { if($this->serviceExists($serviceName)) { if(in_array($serviceName, $this->getSelfReferenceNames())) return true; /** @var ContainerInterface $container */ $container = $this->serviceData[$serviceNam...
[ "public", "function", "isServiceLoaded", "(", "string", "$", "serviceName", ")", ":", "bool", "{", "if", "(", "$", "this", "->", "serviceExists", "(", "$", "serviceName", ")", ")", "{", "if", "(", "in_array", "(", "$", "serviceName", ",", "$", "this", ...
Looks, if a service with the given name is available and already is loaded. @param string $serviceName @return bool @see ServiceManager::serviceExists()
[ "Looks", "if", "a", "service", "with", "the", "given", "name", "is", "available", "and", "already", "is", "loaded", "." ]
5f627d81457356f6c087398cd1e8f8e4f9d14822
https://github.com/tasoftch/php-service-manager/blob/5f627d81457356f6c087398cd1e8f8e4f9d14822/src/ServiceManager.php#L271-L281
204,386
tasoftch/php-service-manager
src/ServiceManager.php
ServiceManager._getMapValueHandler
private function _getMapValueHandler() { return function($key, $value) { foreach($this->customArgumentHandler as $name => $callable) { if(is_callable($callable)) { $value = $callable($key, $value); } else trigger_error("Custom a...
php
private function _getMapValueHandler() { return function($key, $value) { foreach($this->customArgumentHandler as $name => $callable) { if(is_callable($callable)) { $value = $callable($key, $value); } else trigger_error("Custom a...
[ "private", "function", "_getMapValueHandler", "(", ")", "{", "return", "function", "(", "$", "key", ",", "$", "value", ")", "{", "foreach", "(", "$", "this", "->", "customArgumentHandler", "as", "$", "name", "=>", "$", "callable", ")", "{", "if", "(", ...
Creates the replacement handler for parameters and service instances @return \Closure
[ "Creates", "the", "replacement", "handler", "for", "parameters", "and", "service", "instances" ]
5f627d81457356f6c087398cd1e8f8e4f9d14822
https://github.com/tasoftch/php-service-manager/blob/5f627d81457356f6c087398cd1e8f8e4f9d14822/src/ServiceManager.php#L403-L413
204,387
tasoftch/php-service-manager
src/ServiceManager.php
ServiceManager.makeServiceInstance
public function makeServiceInstance(string $className, $arguments = NULL, $configuration = NULL) { $instance = NULL; $implInterfaces = class_implements($className); if(in_array(ConstructorAwareServiceInterface::class, $implInterfaces)) { /** @var ConstructorAwareServiceInterface $cl...
php
public function makeServiceInstance(string $className, $arguments = NULL, $configuration = NULL) { $instance = NULL; $implInterfaces = class_implements($className); if(in_array(ConstructorAwareServiceInterface::class, $implInterfaces)) { /** @var ConstructorAwareServiceInterface $cl...
[ "public", "function", "makeServiceInstance", "(", "string", "$", "className", ",", "$", "arguments", "=", "NULL", ",", "$", "configuration", "=", "NULL", ")", "{", "$", "instance", "=", "NULL", ";", "$", "implInterfaces", "=", "class_implements", "(", "$", ...
This method should be used to create service instances. It will check implementations and create it the requested manner. @param string $className @param array|iterable|null $arguments @param array|iterable|null $configuration @return object|null
[ "This", "method", "should", "be", "used", "to", "create", "service", "instances", ".", "It", "will", "check", "implementations", "and", "create", "it", "the", "requested", "manner", "." ]
5f627d81457356f6c087398cd1e8f8e4f9d14822
https://github.com/tasoftch/php-service-manager/blob/5f627d81457356f6c087398cd1e8f8e4f9d14822/src/ServiceManager.php#L423-L462
204,388
tasoftch/php-service-manager
src/ServiceManager.php
ServiceManager.getServiceClass
public function getServiceClass(string $serviceName, bool $forced = true): ?string { if(!isset($this->serviceClassNames[$serviceName])) { if($this->serviceExists($serviceName)) { /** @var ContainerInterface $container */ $container = $this->serviceData[$serviceName]; ...
php
public function getServiceClass(string $serviceName, bool $forced = true): ?string { if(!isset($this->serviceClassNames[$serviceName])) { if($this->serviceExists($serviceName)) { /** @var ContainerInterface $container */ $container = $this->serviceData[$serviceName]; ...
[ "public", "function", "getServiceClass", "(", "string", "$", "serviceName", ",", "bool", "$", "forced", "=", "true", ")", ":", "?", "string", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "serviceClassNames", "[", "$", "serviceName", "]", ")", ...
Gets the class of a service instance @param string $serviceName @param bool $forced // If set, it will until load the service to get its class name @return string|null
[ "Gets", "the", "class", "of", "a", "service", "instance" ]
5f627d81457356f6c087398cd1e8f8e4f9d14822
https://github.com/tasoftch/php-service-manager/blob/5f627d81457356f6c087398cd1e8f8e4f9d14822/src/ServiceManager.php#L487-L526
204,389
tasoftch/php-service-manager
src/ServiceManager.php
ServiceManager.yieldServices
public function yieldServices(array $serviceNames, array $classNames, bool $includeSubclasses = true, bool $forceClassDetection = true) { $matchClass = function($className) use ($includeSubclasses, $classNames) { if(in_array($className, $classNames)) return true; if($inc...
php
public function yieldServices(array $serviceNames, array $classNames, bool $includeSubclasses = true, bool $forceClassDetection = true) { $matchClass = function($className) use ($includeSubclasses, $classNames) { if(in_array($className, $classNames)) return true; if($inc...
[ "public", "function", "yieldServices", "(", "array", "$", "serviceNames", ",", "array", "$", "classNames", ",", "bool", "$", "includeSubclasses", "=", "true", ",", "bool", "$", "forceClassDetection", "=", "true", ")", "{", "$", "matchClass", "=", "function", ...
Yields all services that match required service names or required class names. @param array $serviceNames @param array $classNames @param bool $includeSubclasses @param bool $forceClassDetection @return \Generator
[ "Yields", "all", "services", "that", "match", "required", "service", "names", "or", "required", "class", "names", "." ]
5f627d81457356f6c087398cd1e8f8e4f9d14822
https://github.com/tasoftch/php-service-manager/blob/5f627d81457356f6c087398cd1e8f8e4f9d14822/src/ServiceManager.php#L538-L561
204,390
UnionOfRAD/li3_quality
extensions/command/Syntax.php
Syntax._subjects
protected function _subjects($path) { if (is_file($path)) { $current = new SplFileInfo($path); return $current->getExtension() === 'php' ? array($current) : array(); } $files = new RecursiveCallbackFilterIterator( new RecursiveDirectoryIterator($path), function($current, $key, $iterator) { $noDesc...
php
protected function _subjects($path) { if (is_file($path)) { $current = new SplFileInfo($path); return $current->getExtension() === 'php' ? array($current) : array(); } $files = new RecursiveCallbackFilterIterator( new RecursiveDirectoryIterator($path), function($current, $key, $iterator) { $noDesc...
[ "protected", "function", "_subjects", "(", "$", "path", ")", "{", "if", "(", "is_file", "(", "$", "path", ")", ")", "{", "$", "current", "=", "new", "SplFileInfo", "(", "$", "path", ")", ";", "return", "$", "current", "->", "getExtension", "(", ")", ...
Retrieves subjects. Will return only PHP files. @param string $path @return array Returns an array of SplFieldInfo objects.
[ "Retrieves", "subjects", ".", "Will", "return", "only", "PHP", "files", "." ]
acb72a43ae835e6d200bc0eba1a61aee610e36bf
https://github.com/UnionOfRAD/li3_quality/blob/acb72a43ae835e6d200bc0eba1a61aee610e36bf/extensions/command/Syntax.php#L150-L176
204,391
UnionOfRAD/li3_quality
extensions/command/Syntax.php
Syntax._rules
protected function _rules() { $rules = new Rules(); $files = array( $this->config, Libraries::get('li3_quality', 'path') . '/config/syntax.json' ); foreach ($files as $file) { if (file_exists($file)) { $this->out("Loading configuration file `{$file}`..."); $config = json_decode(file_get_conten...
php
protected function _rules() { $rules = new Rules(); $files = array( $this->config, Libraries::get('li3_quality', 'path') . '/config/syntax.json' ); foreach ($files as $file) { if (file_exists($file)) { $this->out("Loading configuration file `{$file}`..."); $config = json_decode(file_get_conten...
[ "protected", "function", "_rules", "(", ")", "{", "$", "rules", "=", "new", "Rules", "(", ")", ";", "$", "files", "=", "array", "(", "$", "this", "->", "config", ",", "Libraries", "::", "get", "(", "'li3_quality'", ",", "'path'", ")", ".", "'/config/...
Loads rules configuration. @return object
[ "Loads", "rules", "configuration", "." ]
acb72a43ae835e6d200bc0eba1a61aee610e36bf
https://github.com/UnionOfRAD/li3_quality/blob/acb72a43ae835e6d200bc0eba1a61aee610e36bf/extensions/command/Syntax.php#L183-L210
204,392
sulu/SuluSalesOrderBundle
Order/OrderDependencyManager.php
OrderDependencyManager.getWorkflows
public function getWorkflows($order) { $workflows = array(); $actions = array( 'confirm' => array( 'section' => $this->getName(), 'title' => 'salesorder.orders.confirm', 'event' => 'sulu.salesorder.order.confirm.clicked' ), ...
php
public function getWorkflows($order) { $workflows = array(); $actions = array( 'confirm' => array( 'section' => $this->getName(), 'title' => 'salesorder.orders.confirm', 'event' => 'sulu.salesorder.order.confirm.clicked' ), ...
[ "public", "function", "getWorkflows", "(", "$", "order", ")", "{", "$", "workflows", "=", "array", "(", ")", ";", "$", "actions", "=", "array", "(", "'confirm'", "=>", "array", "(", "'section'", "=>", "$", "this", "->", "getName", "(", ")", ",", "'ti...
returns all possible workflows for the current entity @param Order $order @return array
[ "returns", "all", "possible", "workflows", "for", "the", "current", "entity" ]
1de6d43e8e6d0cc1e703b687085445f50f97ecdc
https://github.com/sulu/SuluSalesOrderBundle/blob/1de6d43e8e6d0cc1e703b687085445f50f97ecdc/Order/OrderDependencyManager.php#L95-L139
204,393
ben-gibson/foursquare-venue-client
src/Factory/Venue/DetailFactory.php
DetailFactory.getCreatedAt
private function getCreatedAt(Description $description) { $createdAt = $description->getOptionalProperty('createdAt'); return ($createdAt !== null) ? (new \DateTimeImmutable())->setTimestamp($createdAt) : null; }
php
private function getCreatedAt(Description $description) { $createdAt = $description->getOptionalProperty('createdAt'); return ($createdAt !== null) ? (new \DateTimeImmutable())->setTimestamp($createdAt) : null; }
[ "private", "function", "getCreatedAt", "(", "Description", "$", "description", ")", "{", "$", "createdAt", "=", "$", "description", "->", "getOptionalProperty", "(", "'createdAt'", ")", ";", "return", "(", "$", "createdAt", "!==", "null", ")", "?", "(", "new...
Get created at. @param Description $description The venue details description. @return \DateTimeImmutable|null
[ "Get", "created", "at", "." ]
ce5e7c308f87d5ccc28ab8d27a9cb51bd106d969
https://github.com/ben-gibson/foursquare-venue-client/blob/ce5e7c308f87d5ccc28ab8d27a9cb51bd106d969/src/Factory/Venue/DetailFactory.php#L60-L65
204,394
ben-gibson/foursquare-venue-client
src/Factory/Venue/DetailFactory.php
DetailFactory.getBestPhoto
private function getBestPhoto(Description $description) { $bestPhotoDescription = $description->getOptionalProperty('bestPhoto'); if ($bestPhotoDescription instanceof Description) { return $this->photoFactory->create($bestPhotoDescription); } return null; }
php
private function getBestPhoto(Description $description) { $bestPhotoDescription = $description->getOptionalProperty('bestPhoto'); if ($bestPhotoDescription instanceof Description) { return $this->photoFactory->create($bestPhotoDescription); } return null; }
[ "private", "function", "getBestPhoto", "(", "Description", "$", "description", ")", "{", "$", "bestPhotoDescription", "=", "$", "description", "->", "getOptionalProperty", "(", "'bestPhoto'", ")", ";", "if", "(", "$", "bestPhotoDescription", "instanceof", "Descripti...
Get best photo. @param Description $description The venue details description. @return Photo|null
[ "Get", "best", "photo", "." ]
ce5e7c308f87d5ccc28ab8d27a9cb51bd106d969
https://github.com/ben-gibson/foursquare-venue-client/blob/ce5e7c308f87d5ccc28ab8d27a9cb51bd106d969/src/Factory/Venue/DetailFactory.php#L74-L83
204,395
Clevis/Se34
Se34/ElementComponent.php
ElementComponent.getRoot
private function getRoot() { if ($this->root === NULL) { $selector = reset($this->parameters); $strategy = key($this->parameters); if ($selector instanceof Element) { $this->root = $selector; } else { $this->root = $this->parent->findElement($strategy, $selector); } $expectedTagN...
php
private function getRoot() { if ($this->root === NULL) { $selector = reset($this->parameters); $strategy = key($this->parameters); if ($selector instanceof Element) { $this->root = $selector; } else { $this->root = $this->parent->findElement($strategy, $selector); } $expectedTagN...
[ "private", "function", "getRoot", "(", ")", "{", "if", "(", "$", "this", "->", "root", "===", "NULL", ")", "{", "$", "selector", "=", "reset", "(", "$", "this", "->", "parameters", ")", ";", "$", "strategy", "=", "key", "(", "$", "this", "->", "p...
Get root element of this component. @return Element
[ "Get", "root", "element", "of", "this", "component", "." ]
c52d579a831ba5642dae464882da012b0409ae46
https://github.com/Clevis/Se34/blob/c52d579a831ba5642dae464882da012b0409ae46/Se34/ElementComponent.php#L15-L52
204,396
ScreamingDev/phpsemver
lib/PHPSemVer/Config/RuleSet/Trigger.php
Trigger.getInstances
public function getInstances() { if (null === $this->instances) { $this->instances = []; foreach ($this->getAll() as $className) { $className = '\\PHPSemVer\\Trigger\\' . str_replace('/', '\\', $className); $this->instances[] = new $className(); ...
php
public function getInstances() { if (null === $this->instances) { $this->instances = []; foreach ($this->getAll() as $className) { $className = '\\PHPSemVer\\Trigger\\' . str_replace('/', '\\', $className); $this->instances[] = new $className(); ...
[ "public", "function", "getInstances", "(", ")", "{", "if", "(", "null", "===", "$", "this", "->", "instances", ")", "{", "$", "this", "->", "instances", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "getAll", "(", ")", "as", "$", "classNam...
Get all trigger instances from the config. @return AbstractTrigger[]
[ "Get", "all", "trigger", "instances", "from", "the", "config", "." ]
11a4bc508f71dee73d4f5fee2e9d39e7984d3e15
https://github.com/ScreamingDev/phpsemver/blob/11a4bc508f71dee73d4f5fee2e9d39e7984d3e15/lib/PHPSemVer/Config/RuleSet/Trigger.php#L44-L57
204,397
DBRisinajumi/d2company
controllers/CcmpCompanyController.php
CcmpCompanyController.actionResetPersonPassword
public function actionResetPersonPassword($ccmp_id,$person_id) { //only for validation acces $model = $this->loadModel($ccmp_id); yii::import('vendor.dbrisinajumi.person.PersonModule'); //if do not have user, create $m = Person::model(); $m->resetPassword($pe...
php
public function actionResetPersonPassword($ccmp_id,$person_id) { //only for validation acces $model = $this->loadModel($ccmp_id); yii::import('vendor.dbrisinajumi.person.PersonModule'); //if do not have user, create $m = Person::model(); $m->resetPassword($pe...
[ "public", "function", "actionResetPersonPassword", "(", "$", "ccmp_id", ",", "$", "person_id", ")", "{", "//only for validation acces", "$", "model", "=", "$", "this", "->", "loadModel", "(", "$", "ccmp_id", ")", ";", "yii", "::", "import", "(", "'vendor.dbris...
send to user new password @return type
[ "send", "to", "user", "new", "password" ]
20df0db96ac2c8e73471c4bab7d487b67ef4ed0a
https://github.com/DBRisinajumi/d2company/blob/20df0db96ac2c8e73471c4bab7d487b67ef4ed0a/controllers/CcmpCompanyController.php#L759-L771
204,398
garyr/memento
lib/Memento/Client.php
Client.getKeys
private function getKeys($argv) { $groupKey = null; $key = null; if (isset($argv[0])) { if ($argv[0] instanceof Group\Key) { $groupKey = $argv[0]; if (isset($argv[1])) { if ($argv[1] instanceof Key) { $...
php
private function getKeys($argv) { $groupKey = null; $key = null; if (isset($argv[0])) { if ($argv[0] instanceof Group\Key) { $groupKey = $argv[0]; if (isset($argv[1])) { if ($argv[1] instanceof Key) { $...
[ "private", "function", "getKeys", "(", "$", "argv", ")", "{", "$", "groupKey", "=", "null", ";", "$", "key", "=", "null", ";", "if", "(", "isset", "(", "$", "argv", "[", "0", "]", ")", ")", "{", "if", "(", "$", "argv", "[", "0", "]", "instanc...
Returns an array to serve as a callable param for call_user_func_array @param array $argv Function argument array @param string $source Method name from which the call was made @return arrray Returns the method target callable array
[ "Returns", "an", "array", "to", "serve", "as", "a", "callable", "param", "for", "call_user_func_array" ]
d6cfa9ffec040f96b8361f822f11dcf6d5ff60b4
https://github.com/garyr/memento/blob/d6cfa9ffec040f96b8361f822f11dcf6d5ff60b4/lib/Memento/Client.php#L32-L56
204,399
Laralum/Routes
src/RoutesServiceProvider.php
RoutesServiceProvider.registerPolicies
public function registerPolicies() { foreach ($this->policies as $key => $value) { Gate::policy($key, $value); } }
php
public function registerPolicies() { foreach ($this->policies as $key => $value) { Gate::policy($key, $value); } }
[ "public", "function", "registerPolicies", "(", ")", "{", "foreach", "(", "$", "this", "->", "policies", "as", "$", "key", "=>", "$", "value", ")", "{", "Gate", "::", "policy", "(", "$", "key", ",", "$", "value", ")", ";", "}", "}" ]
I cheated this comes from the AuthServiceProvider extended by the App\Providers\AuthServiceProvider. Register the application's policies. @return void
[ "I", "cheated", "this", "comes", "from", "the", "AuthServiceProvider", "extended", "by", "the", "App", "\\", "Providers", "\\", "AuthServiceProvider", "." ]
10db617db456839c5753294d268198aa65f0a3f0
https://github.com/Laralum/Routes/blob/10db617db456839c5753294d268198aa65f0a3f0/src/RoutesServiceProvider.php#L62-L67