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
2,700
MINISTRYGmbH/morrow-core
src/Factory.php
Factory.load
public static function load($instance_identifier) { $args = func_get_args(); $instance_identifier = array_shift($args); $factory_args = $args; // get factory config $instance_identifier = explode(':', $instance_identifier); // create a fully namespaced class path $classname = $instance_identifier[0...
php
public static function load($instance_identifier) { $args = func_get_args(); $instance_identifier = array_shift($args); $factory_args = $args; // get factory config $instance_identifier = explode(':', $instance_identifier); // create a fully namespaced class path $classname = $instance_identifier[0...
[ "public", "static", "function", "load", "(", "$", "instance_identifier", ")", "{", "$", "args", "=", "func_get_args", "(", ")", ";", "$", "instance_identifier", "=", "array_shift", "(", "$", "args", ")", ";", "$", "factory_args", "=", "$", "args", ";", "...
Initializes a class with optionally prepared constructor parameters and returns the instance. @param string $instance_identifier The instance identifier. @return object
[ "Initializes", "a", "class", "with", "optionally", "prepared", "constructor", "parameters", "and", "returns", "the", "instance", "." ]
bdc916eedb14b65b06dbc88efbd2b7779f4a9a9e
https://github.com/MINISTRYGmbH/morrow-core/blob/bdc916eedb14b65b06dbc88efbd2b7779f4a9a9e/src/Factory.php#L239-L306
2,701
MINISTRYGmbH/morrow-core
src/Factory.php
Factory.prepare
public static function prepare($instance_identifier, $parameters = null) { $args = func_get_args(); // get instance name in params string $params = explode(':', $instance_identifier); $classname = $params[0]; // we always have to create a fully namespaced class path if ($classname{0} !== '\\') { $...
php
public static function prepare($instance_identifier, $parameters = null) { $args = func_get_args(); // get instance name in params string $params = explode(':', $instance_identifier); $classname = $params[0]; // we always have to create a fully namespaced class path if ($classname{0} !== '\\') { $...
[ "public", "static", "function", "prepare", "(", "$", "instance_identifier", ",", "$", "parameters", "=", "null", ")", "{", "$", "args", "=", "func_get_args", "(", ")", ";", "// get instance name in params string", "$", "params", "=", "explode", "(", "':'", ","...
Handles the preparation of class instantiation by deposit the constructor parameters. That allows the lazy loading functionality. @param string $instance_identifier The instance identifier. @param mixed $parameters Any number of constructor parameters. @return null
[ "Handles", "the", "preparation", "of", "class", "instantiation", "by", "deposit", "the", "constructor", "parameters", ".", "That", "allows", "the", "lazy", "loading", "functionality", "." ]
bdc916eedb14b65b06dbc88efbd2b7779f4a9a9e
https://github.com/MINISTRYGmbH/morrow-core/blob/bdc916eedb14b65b06dbc88efbd2b7779f4a9a9e/src/Factory.php#L315-L335
2,702
MINISTRYGmbH/morrow-core
src/Factory.php
Factory.onload
public static function onload($instance_identifier, $callback, $ignore_instancename = false) { $args = func_get_args(); // get instance name in params string $params = explode(':', $instance_identifier); $classname = $params[0]; // we always have to create a fully namespaced class path if ($classname...
php
public static function onload($instance_identifier, $callback, $ignore_instancename = false) { $args = func_get_args(); // get instance name in params string $params = explode(':', $instance_identifier); $classname = $params[0]; // we always have to create a fully namespaced class path if ($classname...
[ "public", "static", "function", "onload", "(", "$", "instance_identifier", ",", "$", "callback", ",", "$", "ignore_instancename", "=", "false", ")", "{", "$", "args", "=", "func_get_args", "(", ")", ";", "// get instance name in params string", "$", "params", "=...
Registers a callback that is executed when an instance is created. @param string $instance_identifier The instance identifier. @param callable $callback A PHP callback. @param boolean $ignore_instancename Set to true if you want all instances of the class to execute the callback. @return null
[ "Registers", "a", "callback", "that", "is", "executed", "when", "an", "instance", "is", "created", "." ]
bdc916eedb14b65b06dbc88efbd2b7779f4a9a9e
https://github.com/MINISTRYGmbH/morrow-core/blob/bdc916eedb14b65b06dbc88efbd2b7779f4a9a9e/src/Factory.php#L345-L366
2,703
eix/core
src/php/main/Eix/Services/Net/Socket.php
Socket.open
public function open() { // Connect the socket. if (@!socket_connect($this->socket, $this->host, $this->port)) { Logger::get()->error(socket_strerror(socket_last_error())); throw new Exception('Socket connection error: ' . socket_strerror(socket_last_error())); } }
php
public function open() { // Connect the socket. if (@!socket_connect($this->socket, $this->host, $this->port)) { Logger::get()->error(socket_strerror(socket_last_error())); throw new Exception('Socket connection error: ' . socket_strerror(socket_last_error())); } }
[ "public", "function", "open", "(", ")", "{", "// Connect the socket.", "if", "(", "@", "!", "socket_connect", "(", "$", "this", "->", "socket", ",", "$", "this", "->", "host", ",", "$", "this", "->", "port", ")", ")", "{", "Logger", "::", "get", "(",...
Open the connection to the socket.
[ "Open", "the", "connection", "to", "the", "socket", "." ]
a5b4c09cc168221e85804fdfeb78e519a0415466
https://github.com/eix/core/blob/a5b4c09cc168221e85804fdfeb78e519a0415466/src/php/main/Eix/Services/Net/Socket.php#L65-L72
2,704
nodes-php/core
src/Exceptions/Exception.php
Exception.setStatusCode
public function setStatusCode($statusCode, $message = null) { $this->statusCode = (int) $statusCode; // Add status message to meta array $this->addMeta(['status' => ['code' => (int) $statusCode]]); // Set optional status message if present if (!empty($message)) { ...
php
public function setStatusCode($statusCode, $message = null) { $this->statusCode = (int) $statusCode; // Add status message to meta array $this->addMeta(['status' => ['code' => (int) $statusCode]]); // Set optional status message if present if (!empty($message)) { ...
[ "public", "function", "setStatusCode", "(", "$", "statusCode", ",", "$", "message", "=", "null", ")", "{", "$", "this", "->", "statusCode", "=", "(", "int", ")", "$", "statusCode", ";", "// Add status message to meta array", "$", "this", "->", "addMeta", "("...
Set status code. @author Morten Rugaard <[email protected]> @param int $statusCode @param string $message @return $this
[ "Set", "status", "code", "." ]
fc788bb3e9668872573838099f868ab162eb8a96
https://github.com/nodes-php/core/blob/fc788bb3e9668872573838099f868ab162eb8a96/src/Exceptions/Exception.php#L236-L249
2,705
nodes-php/core
src/Exceptions/Exception.php
Exception.setErrors
public function setErrors(MessageBag $errors) { $this->errors = $errors; // Add status message to meta array if (!$errors->isEmpty()) { $this->addMeta(['errors' => $errors->all()]); } return $this; }
php
public function setErrors(MessageBag $errors) { $this->errors = $errors; // Add status message to meta array if (!$errors->isEmpty()) { $this->addMeta(['errors' => $errors->all()]); } return $this; }
[ "public", "function", "setErrors", "(", "MessageBag", "$", "errors", ")", "{", "$", "this", "->", "errors", "=", "$", "errors", ";", "// Add status message to meta array", "if", "(", "!", "$", "errors", "->", "isEmpty", "(", ")", ")", "{", "$", "this", "...
Set a message bag of errors. @author Morten Rugaard <[email protected]> @param \Illuminate\Support\MessageBag $errors @return $this
[ "Set", "a", "message", "bag", "of", "errors", "." ]
fc788bb3e9668872573838099f868ab162eb8a96
https://github.com/nodes-php/core/blob/fc788bb3e9668872573838099f868ab162eb8a96/src/Exceptions/Exception.php#L502-L512
2,706
jivoo/core
src/Store/Config.php
Config.reload
public function reload() { if ($this->root !== $this) { $this->root->reload(); return; } if (! isset($this->store)) { return; } if (! $this->store->touch()) { return; } try { $this->store->open(false)...
php
public function reload() { if ($this->root !== $this) { $this->root->reload(); return; } if (! isset($this->store)) { return; } if (! $this->store->touch()) { return; } try { $this->store->open(false)...
[ "public", "function", "reload", "(", ")", "{", "if", "(", "$", "this", "->", "root", "!==", "$", "this", ")", "{", "$", "this", "->", "root", "->", "reload", "(", ")", ";", "return", ";", "}", "if", "(", "!", "isset", "(", "$", "this", "->", ...
Reload configuration document from store. @throws AccessException If file could not be read.
[ "Reload", "configuration", "document", "from", "store", "." ]
4ef3445068f0ff9c0a6512cb741831a847013b76
https://github.com/jivoo/core/blob/4ef3445068f0ff9c0a6512cb741831a847013b76/src/Store/Config.php#L51-L70
2,707
jivoo/core
src/Store/Config.php
Config.save
public function save() { if ($this->root !== $this) { return $this->root->save(); } if (! isset($this->store)) { return false; } if (! $this->updated) { return true; } $this->store->open(true); $this->store->write($t...
php
public function save() { if ($this->root !== $this) { return $this->root->save(); } if (! isset($this->store)) { return false; } if (! $this->updated) { return true; } $this->store->open(true); $this->store->write($t...
[ "public", "function", "save", "(", ")", "{", "if", "(", "$", "this", "->", "root", "!==", "$", "this", ")", "{", "return", "$", "this", "->", "root", "->", "save", "(", ")", ";", "}", "if", "(", "!", "isset", "(", "$", "this", "->", "store", ...
Save configuration. If this is not the root configuration, the root configuration will be saved instead. @return boolean True if the configuration was saved.
[ "Save", "configuration", ".", "If", "this", "is", "not", "the", "root", "configuration", "the", "root", "configuration", "will", "be", "saved", "instead", "." ]
4ef3445068f0ff9c0a6512cb741831a847013b76
https://github.com/jivoo/core/blob/4ef3445068f0ff9c0a6512cb741831a847013b76/src/Store/Config.php#L79-L95
2,708
BudgeIt/composer-builder
src/BuildTools/Grunt.php
Grunt.build
public function build(PackageWrapper $package, $isDev) { $this->execute('grunt', [], $this->io, $package->getPath()); }
php
public function build(PackageWrapper $package, $isDev) { $this->execute('grunt', [], $this->io, $package->getPath()); }
[ "public", "function", "build", "(", "PackageWrapper", "$", "package", ",", "$", "isDev", ")", "{", "$", "this", "->", "execute", "(", "'grunt'", ",", "[", "]", ",", "$", "this", "->", "io", ",", "$", "package", "->", "getPath", "(", ")", ")", ";", ...
Run this build tool for this package @param PackageWrapper $package @param bool $isDev
[ "Run", "this", "build", "tool", "for", "this", "package" ]
ce39fdd501425cf87ec8b20d1db2700c77ee2563
https://github.com/BudgeIt/composer-builder/blob/ce39fdd501425cf87ec8b20d1db2700c77ee2563/src/BuildTools/Grunt.php#L48-L51
2,709
ironedgesoftware/graphs
src/Node/Node.php
Node.setId
public function setId(string $id): NodeInterface { $this->_id = $id; if ($this->_name === null) { $this->setName($id); } return $this; }
php
public function setId(string $id): NodeInterface { $this->_id = $id; if ($this->_name === null) { $this->setName($id); } return $this; }
[ "public", "function", "setId", "(", "string", "$", "id", ")", ":", "NodeInterface", "{", "$", "this", "->", "_id", "=", "$", "id", ";", "if", "(", "$", "this", "->", "_name", "===", "null", ")", "{", "$", "this", "->", "setName", "(", "$", "id", ...
Sets the value of field id. @param string $id - id. @return NodeInterface
[ "Sets", "the", "value", "of", "field", "id", "." ]
c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0
https://github.com/ironedgesoftware/graphs/blob/c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0/src/Node/Node.php#L121-L130
2,710
ironedgesoftware/graphs
src/Node/Node.php
Node.getMetadata
public function getMetadata(): Data { if ($this->_metadata === null) { $this->_metadata = new Data(); $this->setMetadata([]); } return $this->_metadata; }
php
public function getMetadata(): Data { if ($this->_metadata === null) { $this->_metadata = new Data(); $this->setMetadata([]); } return $this->_metadata; }
[ "public", "function", "getMetadata", "(", ")", ":", "Data", "{", "if", "(", "$", "this", "->", "_metadata", "===", "null", ")", "{", "$", "this", "->", "_metadata", "=", "new", "Data", "(", ")", ";", "$", "this", "->", "setMetadata", "(", "[", "]",...
Returns the value of field _metadata. @return Data
[ "Returns", "the", "value", "of", "field", "_metadata", "." ]
c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0
https://github.com/ironedgesoftware/graphs/blob/c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0/src/Node/Node.php#L185-L194
2,711
ironedgesoftware/graphs
src/Node/Node.php
Node.setMetadata
public function setMetadata(array $metadata) { $this->getMetadata()->setData( array_replace_recursive( $this->getDefaultMetadata(), $metadata ) ); return $this; }
php
public function setMetadata(array $metadata) { $this->getMetadata()->setData( array_replace_recursive( $this->getDefaultMetadata(), $metadata ) ); return $this; }
[ "public", "function", "setMetadata", "(", "array", "$", "metadata", ")", "{", "$", "this", "->", "getMetadata", "(", ")", "->", "setData", "(", "array_replace_recursive", "(", "$", "this", "->", "getDefaultMetadata", "(", ")", ",", "$", "metadata", ")", ")...
Sets the value of field metadata. @param array $metadata - metadata. @return NodeInterface
[ "Sets", "the", "value", "of", "field", "metadata", "." ]
c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0
https://github.com/ironedgesoftware/graphs/blob/c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0/src/Node/Node.php#L203-L213
2,712
ironedgesoftware/graphs
src/Node/Node.php
Node.setMetadataAttr
public function setMetadataAttr(string $attr, $value, array $options = []) { $this->getMetadata()->set($attr, $value, $options); return $this; }
php
public function setMetadataAttr(string $attr, $value, array $options = []) { $this->getMetadata()->set($attr, $value, $options); return $this; }
[ "public", "function", "setMetadataAttr", "(", "string", "$", "attr", ",", "$", "value", ",", "array", "$", "options", "=", "[", "]", ")", "{", "$", "this", "->", "getMetadata", "(", ")", "->", "set", "(", "$", "attr", ",", "$", "value", ",", "$", ...
Sets a metadata attribute. @param string $attr - Attribute. @param mixed $value - Value. @param array $options - Options. @return $this
[ "Sets", "a", "metadata", "attribute", "." ]
c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0
https://github.com/ironedgesoftware/graphs/blob/c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0/src/Node/Node.php#L236-L241
2,713
ironedgesoftware/graphs
src/Node/Node.php
Node.getMetadataAttr
public function getMetadataAttr(string $attr, $defaultValue = null, array $options = []) { return $this->getMetadata()->get($attr, $defaultValue, $options); }
php
public function getMetadataAttr(string $attr, $defaultValue = null, array $options = []) { return $this->getMetadata()->get($attr, $defaultValue, $options); }
[ "public", "function", "getMetadataAttr", "(", "string", "$", "attr", ",", "$", "defaultValue", "=", "null", ",", "array", "$", "options", "=", "[", "]", ")", "{", "return", "$", "this", "->", "getMetadata", "(", ")", "->", "get", "(", "$", "attr", ",...
Returns a metadata attribute. @param string $attr - Attribute. @param mixed $defaultValue - Default value. @param array $options - Options. @return mixed
[ "Returns", "a", "metadata", "attribute", "." ]
c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0
https://github.com/ironedgesoftware/graphs/blob/c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0/src/Node/Node.php#L252-L255
2,714
ironedgesoftware/graphs
src/Node/Node.php
Node.findParents
public function findParents(array $filters = [], array $options = []) { $options = array_replace( [ 'returnFirstResult' => false, 'indexById' => false ], $options ); $parents = $this->getAllParents($options); ...
php
public function findParents(array $filters = [], array $options = []) { $options = array_replace( [ 'returnFirstResult' => false, 'indexById' => false ], $options ); $parents = $this->getAllParents($options); ...
[ "public", "function", "findParents", "(", "array", "$", "filters", "=", "[", "]", ",", "array", "$", "options", "=", "[", "]", ")", "{", "$", "options", "=", "array_replace", "(", "[", "'returnFirstResult'", "=>", "false", ",", "'indexById'", "=>", "fals...
Finds parent nodes all the way up until we reach the root node. @param array $filters - Filters. @param array $options - Options. @return array|NodeInterface
[ "Finds", "parent", "nodes", "all", "the", "way", "up", "until", "we", "reach", "the", "root", "node", "." ]
c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0
https://github.com/ironedgesoftware/graphs/blob/c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0/src/Node/Node.php#L277-L314
2,715
ironedgesoftware/graphs
src/Node/Node.php
Node.getAllParents
public function getAllParents(array $options = []): array { $options = array_replace( [ 'indexById' => false, 'skipIds' => [] ], $options ); $parents = []; $ids = [$this->getId()]; /** @var NodeInt...
php
public function getAllParents(array $options = []): array { $options = array_replace( [ 'indexById' => false, 'skipIds' => [] ], $options ); $parents = []; $ids = [$this->getId()]; /** @var NodeInt...
[ "public", "function", "getAllParents", "(", "array", "$", "options", "=", "[", "]", ")", ":", "array", "{", "$", "options", "=", "array_replace", "(", "[", "'indexById'", "=>", "false", ",", "'skipIds'", "=>", "[", "]", "]", ",", "$", "options", ")", ...
Returns all parents from this node. @param array $options - Options. @return array
[ "Returns", "all", "parents", "from", "this", "node", "." ]
c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0
https://github.com/ironedgesoftware/graphs/blob/c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0/src/Node/Node.php#L323-L356
2,716
ironedgesoftware/graphs
src/Node/Node.php
Node.getParent
public function getParent(string $id = null) { if (!$this->_parents || ($id !== null && !isset($this->_parents[$id]))) { return null; } return $id !== null ? $this->_parents[$id] : $this->_parents[array_rand($this->_parents)]; }
php
public function getParent(string $id = null) { if (!$this->_parents || ($id !== null && !isset($this->_parents[$id]))) { return null; } return $id !== null ? $this->_parents[$id] : $this->_parents[array_rand($this->_parents)]; }
[ "public", "function", "getParent", "(", "string", "$", "id", "=", "null", ")", "{", "if", "(", "!", "$", "this", "->", "_parents", "||", "(", "$", "id", "!==", "null", "&&", "!", "isset", "(", "$", "this", "->", "_parents", "[", "$", "id", "]", ...
Returns the value of field _parent. @param string|null $id - Parent ID. @return NodeInterface|null
[ "Returns", "the", "value", "of", "field", "_parent", "." ]
c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0
https://github.com/ironedgesoftware/graphs/blob/c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0/src/Node/Node.php#L380-L389
2,717
ironedgesoftware/graphs
src/Node/Node.php
Node.addParent
public function addParent(NodeInterface $parent, bool $setParentsChild = true): NodeInterface { if (!$this->supportsParent($parent)) { throw ParentTypeNotSupportedException::create($this, $parent); } $this->_parents[$parent->getId()] = $parent; if ($setParentsChild) { ...
php
public function addParent(NodeInterface $parent, bool $setParentsChild = true): NodeInterface { if (!$this->supportsParent($parent)) { throw ParentTypeNotSupportedException::create($this, $parent); } $this->_parents[$parent->getId()] = $parent; if ($setParentsChild) { ...
[ "public", "function", "addParent", "(", "NodeInterface", "$", "parent", ",", "bool", "$", "setParentsChild", "=", "true", ")", ":", "NodeInterface", "{", "if", "(", "!", "$", "this", "->", "supportsParent", "(", "$", "parent", ")", ")", "{", "throw", "Pa...
Sets the value of field parent. @param NodeInterface $parent - Parent. @param bool $setParentsChild - Set parent's child. @throws ParentTypeNotSupportedException @return NodeInterface
[ "Sets", "the", "value", "of", "field", "parent", "." ]
c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0
https://github.com/ironedgesoftware/graphs/blob/c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0/src/Node/Node.php#L411-L429
2,718
ironedgesoftware/graphs
src/Node/Node.php
Node.removeParent
public function removeParent(string $parentId, bool $setParentsChild = true): NodeInterface { if (isset($this->_parents[$parentId])) { $parent = $this->getParent($parentId); $this->notifySubscribers( self::EVENT_REMOVE_PARENT, ['oldParents' => $this->...
php
public function removeParent(string $parentId, bool $setParentsChild = true): NodeInterface { if (isset($this->_parents[$parentId])) { $parent = $this->getParent($parentId); $this->notifySubscribers( self::EVENT_REMOVE_PARENT, ['oldParents' => $this->...
[ "public", "function", "removeParent", "(", "string", "$", "parentId", ",", "bool", "$", "setParentsChild", "=", "true", ")", ":", "NodeInterface", "{", "if", "(", "isset", "(", "$", "this", "->", "_parents", "[", "$", "parentId", "]", ")", ")", "{", "$...
Removes a parent from this node. @param string $parentId - Parent. @param bool $setParentsChild - Set parent's child. @return NodeInterface
[ "Removes", "a", "parent", "from", "this", "node", "." ]
c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0
https://github.com/ironedgesoftware/graphs/blob/c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0/src/Node/Node.php#L439-L457
2,719
ironedgesoftware/graphs
src/Node/Node.php
Node.clearParents
public function clearParents(): NodeInterface { /** @var NodeInterface $parent */ foreach ($this->getParents() as $parent) { $this->removeParent($parent->getId()); } return $this; }
php
public function clearParents(): NodeInterface { /** @var NodeInterface $parent */ foreach ($this->getParents() as $parent) { $this->removeParent($parent->getId()); } return $this; }
[ "public", "function", "clearParents", "(", ")", ":", "NodeInterface", "{", "/** @var NodeInterface $parent */", "foreach", "(", "$", "this", "->", "getParents", "(", ")", "as", "$", "parent", ")", "{", "$", "this", "->", "removeParent", "(", "$", "parent", "...
Clears all parents of this node. @return NodeInterface
[ "Clears", "all", "parents", "of", "this", "node", "." ]
c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0
https://github.com/ironedgesoftware/graphs/blob/c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0/src/Node/Node.php#L464-L472
2,720
ironedgesoftware/graphs
src/Node/Node.php
Node.setChildren
public function setChildren(array $children): NodeInterface { foreach ($this->getChildren() as $node) { $this->removeChild($node->getId()); } foreach ($children as $child) { $this->addChild($child); } return $this; }
php
public function setChildren(array $children): NodeInterface { foreach ($this->getChildren() as $node) { $this->removeChild($node->getId()); } foreach ($children as $child) { $this->addChild($child); } return $this; }
[ "public", "function", "setChildren", "(", "array", "$", "children", ")", ":", "NodeInterface", "{", "foreach", "(", "$", "this", "->", "getChildren", "(", ")", "as", "$", "node", ")", "{", "$", "this", "->", "removeChild", "(", "$", "node", "->", "getI...
Sets the value of field children. @param array $children - children. @return NodeInterface
[ "Sets", "the", "value", "of", "field", "children", "." ]
c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0
https://github.com/ironedgesoftware/graphs/blob/c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0/src/Node/Node.php#L493-L504
2,721
ironedgesoftware/graphs
src/Node/Node.php
Node.addChild
public function addChild(NodeInterface $child, bool $setParent = true): NodeInterface { if (!$this->supportsChild($child)) { throw ChildTypeNotSupportedException::create($this, $child); } $this->_children[$child->getId()] = $child; if ($setParent) { $child->...
php
public function addChild(NodeInterface $child, bool $setParent = true): NodeInterface { if (!$this->supportsChild($child)) { throw ChildTypeNotSupportedException::create($this, $child); } $this->_children[$child->getId()] = $child; if ($setParent) { $child->...
[ "public", "function", "addChild", "(", "NodeInterface", "$", "child", ",", "bool", "$", "setParent", "=", "true", ")", ":", "NodeInterface", "{", "if", "(", "!", "$", "this", "->", "supportsChild", "(", "$", "child", ")", ")", "{", "throw", "ChildTypeNot...
Adds a child to this node. @param NodeInterface $child - Child. @param bool $setChildParent - Set child's parent. @throws ChildTypeNotSupportedException @return NodeInterface
[ "Adds", "a", "child", "to", "this", "node", "." ]
c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0
https://github.com/ironedgesoftware/graphs/blob/c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0/src/Node/Node.php#L516-L539
2,722
ironedgesoftware/graphs
src/Node/Node.php
Node.removeChild
public function removeChild(string $childId, bool $setParent = true): NodeInterface { if ($this->hasChild($childId)) { $child = $this->getChild($childId); if ($setParent) { $child->removeParent($this->getId(), false); } unset($this->_children...
php
public function removeChild(string $childId, bool $setParent = true): NodeInterface { if ($this->hasChild($childId)) { $child = $this->getChild($childId); if ($setParent) { $child->removeParent($this->getId(), false); } unset($this->_children...
[ "public", "function", "removeChild", "(", "string", "$", "childId", ",", "bool", "$", "setParent", "=", "true", ")", ":", "NodeInterface", "{", "if", "(", "$", "this", "->", "hasChild", "(", "$", "childId", ")", ")", "{", "$", "child", "=", "$", "thi...
Removes a child. @param string $childId - Child ID. @param bool $setParent - Set parent? @return NodeInterface
[ "Removes", "a", "child", "." ]
c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0
https://github.com/ironedgesoftware/graphs/blob/c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0/src/Node/Node.php#L549-L572
2,723
ironedgesoftware/graphs
src/Node/Node.php
Node.getChild
public function getChild(string $id): NodeInterface { if (!$this->hasChild($id)) { throw ChildDoesNotExistException::create($this->getId(), $id); } return $this->_children[$id]; }
php
public function getChild(string $id): NodeInterface { if (!$this->hasChild($id)) { throw ChildDoesNotExistException::create($this->getId(), $id); } return $this->_children[$id]; }
[ "public", "function", "getChild", "(", "string", "$", "id", ")", ":", "NodeInterface", "{", "if", "(", "!", "$", "this", "->", "hasChild", "(", "$", "id", ")", ")", "{", "throw", "ChildDoesNotExistException", "::", "create", "(", "$", "this", "->", "ge...
Returns a child by ID. @param string $id - Node ID. @throws ChildDoesNotExistException @return NodeInterface
[ "Returns", "a", "child", "by", "ID", "." ]
c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0
https://github.com/ironedgesoftware/graphs/blob/c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0/src/Node/Node.php#L583-L590
2,724
ironedgesoftware/graphs
src/Node/Node.php
Node.findChildren
public function findChildren(array $filters = [], array $options = []) { $options = array_replace( [ 'returnFirstResult' => false ], $options ); if (empty($filters)) { $result = array_values($this->_nodes); } else i...
php
public function findChildren(array $filters = [], array $options = []) { $options = array_replace( [ 'returnFirstResult' => false ], $options ); if (empty($filters)) { $result = array_values($this->_nodes); } else i...
[ "public", "function", "findChildren", "(", "array", "$", "filters", "=", "[", "]", ",", "array", "$", "options", "=", "[", "]", ")", "{", "$", "options", "=", "array_replace", "(", "[", "'returnFirstResult'", "=>", "false", "]", ",", "$", "options", ")...
Finds children. @param array $filters - Filters. @param array $options - Options. @return array|NodeInterface
[ "Finds", "children", "." ]
c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0
https://github.com/ironedgesoftware/graphs/blob/c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0/src/Node/Node.php#L612-L649
2,725
ironedgesoftware/graphs
src/Node/Node.php
Node.addNode
public function addNode(NodeInterface $node): NodeInterface { $this->_nodes[$node->getId()] = $node; if ($this->getParent()) { $this->getParent()->addNode($node); } return $this; }
php
public function addNode(NodeInterface $node): NodeInterface { $this->_nodes[$node->getId()] = $node; if ($this->getParent()) { $this->getParent()->addNode($node); } return $this; }
[ "public", "function", "addNode", "(", "NodeInterface", "$", "node", ")", ":", "NodeInterface", "{", "$", "this", "->", "_nodes", "[", "$", "node", "->", "getId", "(", ")", "]", "=", "$", "node", ";", "if", "(", "$", "this", "->", "getParent", "(", ...
Adds a node to this graph. @param NodeInterface $node - Node. @return NodeInterface
[ "Adds", "a", "node", "to", "this", "graph", "." ]
c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0
https://github.com/ironedgesoftware/graphs/blob/c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0/src/Node/Node.php#L708-L717
2,726
ironedgesoftware/graphs
src/Node/Node.php
Node.removeNode
public function removeNode(NodeInterface $node): NodeInterface { unset($this->_nodes[$node->getId()]); if ($this->getParent()) { $this->getParent()->removeNode($node); } return $this; }
php
public function removeNode(NodeInterface $node): NodeInterface { unset($this->_nodes[$node->getId()]); if ($this->getParent()) { $this->getParent()->removeNode($node); } return $this; }
[ "public", "function", "removeNode", "(", "NodeInterface", "$", "node", ")", ":", "NodeInterface", "{", "unset", "(", "$", "this", "->", "_nodes", "[", "$", "node", "->", "getId", "(", ")", "]", ")", ";", "if", "(", "$", "this", "->", "getParent", "("...
Removes a node. @param NodeInterface $node - Node. @return NodeInterface
[ "Removes", "a", "node", "." ]
c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0
https://github.com/ironedgesoftware/graphs/blob/c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0/src/Node/Node.php#L726-L735
2,727
ironedgesoftware/graphs
src/Node/Node.php
Node.validate
public function validate(array $options = []) { $options = array_replace( [ 'validateMinChildren' => true, 'validateMaxChildren' => true, 'validateParentMandatory' => true, 'validateParentMustNo...
php
public function validate(array $options = []) { $options = array_replace( [ 'validateMinChildren' => true, 'validateMaxChildren' => true, 'validateParentMandatory' => true, 'validateParentMustNo...
[ "public", "function", "validate", "(", "array", "$", "options", "=", "[", "]", ")", "{", "$", "options", "=", "array_replace", "(", "[", "'validateMinChildren'", "=>", "true", ",", "'validateMaxChildren'", "=>", "true", ",", "'validateParentMandatory'", "=>", ...
This method is called after initializing the data. @param array $options - Options. @throws ValidationException @return void
[ "This", "method", "is", "called", "after", "initializing", "the", "data", "." ]
c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0
https://github.com/ironedgesoftware/graphs/blob/c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0/src/Node/Node.php#L846-L897
2,728
ironedgesoftware/graphs
src/Node/Node.php
Node.setValidationConfig
public function setValidationConfig(string $name, $value): NodeInterface { $this->setMetadataAttr('validations.'.$name, $value); return $this; }
php
public function setValidationConfig(string $name, $value): NodeInterface { $this->setMetadataAttr('validations.'.$name, $value); return $this; }
[ "public", "function", "setValidationConfig", "(", "string", "$", "name", ",", "$", "value", ")", ":", "NodeInterface", "{", "$", "this", "->", "setMetadataAttr", "(", "'validations.'", ".", "$", "name", ",", "$", "value", ")", ";", "return", "$", "this", ...
Sets a validation config. @param string $name - Validation name. @param mixed $value - Validation value. @return NodeInterface
[ "Sets", "a", "validation", "config", "." ]
c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0
https://github.com/ironedgesoftware/graphs/blob/c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0/src/Node/Node.php#L944-L949
2,729
ironedgesoftware/graphs
src/Node/Node.php
Node.setSubscribers
public function setSubscribers(array $subscribers): NodeInterface { $this->_subscribers = []; foreach ($subscribers as $subscriber) { $this->addSubscriber($subscriber); } return $this; }
php
public function setSubscribers(array $subscribers): NodeInterface { $this->_subscribers = []; foreach ($subscribers as $subscriber) { $this->addSubscriber($subscriber); } return $this; }
[ "public", "function", "setSubscribers", "(", "array", "$", "subscribers", ")", ":", "NodeInterface", "{", "$", "this", "->", "_subscribers", "=", "[", "]", ";", "foreach", "(", "$", "subscribers", "as", "$", "subscriber", ")", "{", "$", "this", "->", "ad...
Sets the value of field subscribers. @param array $subscribers - subscribers. @return NodeInterface
[ "Sets", "the", "value", "of", "field", "subscribers", "." ]
c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0
https://github.com/ironedgesoftware/graphs/blob/c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0/src/Node/Node.php#L985-L994
2,730
ironedgesoftware/graphs
src/Node/Node.php
Node.addSubscriber
public function addSubscriber(SubscriberInterface $subscriber): NodeInterface { $this->_subscribers[$subscriber->getId()] = $subscriber; return $this; }
php
public function addSubscriber(SubscriberInterface $subscriber): NodeInterface { $this->_subscribers[$subscriber->getId()] = $subscriber; return $this; }
[ "public", "function", "addSubscriber", "(", "SubscriberInterface", "$", "subscriber", ")", ":", "NodeInterface", "{", "$", "this", "->", "_subscribers", "[", "$", "subscriber", "->", "getId", "(", ")", "]", "=", "$", "subscriber", ";", "return", "$", "this",...
Adds a subscriber. @param SubscriberInterface $subscriber - Subscriber. @return NodeInterface
[ "Adds", "a", "subscriber", "." ]
c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0
https://github.com/ironedgesoftware/graphs/blob/c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0/src/Node/Node.php#L1003-L1008
2,731
ironedgesoftware/graphs
src/Node/Node.php
Node.removeSubscriber
public function removeSubscriber($idOrSubscriber): NodeInterface { if (!is_string($idOrSubscriber) && (!is_object($idOrSubscriber) || !($idOrSubscriber instanceof SubscriberInterface)) ) { throw new \InvalidArgumentException( 'Argument "$idOrSubscriber" must b...
php
public function removeSubscriber($idOrSubscriber): NodeInterface { if (!is_string($idOrSubscriber) && (!is_object($idOrSubscriber) || !($idOrSubscriber instanceof SubscriberInterface)) ) { throw new \InvalidArgumentException( 'Argument "$idOrSubscriber" must b...
[ "public", "function", "removeSubscriber", "(", "$", "idOrSubscriber", ")", ":", "NodeInterface", "{", "if", "(", "!", "is_string", "(", "$", "idOrSubscriber", ")", "&&", "(", "!", "is_object", "(", "$", "idOrSubscriber", ")", "||", "!", "(", "$", "idOrSubs...
Removes a subscriber. @param string|SubscriberInterface $idOrSubscriber - Subscriber or ID. @return NodeInterface
[ "Removes", "a", "subscriber", "." ]
c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0
https://github.com/ironedgesoftware/graphs/blob/c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0/src/Node/Node.php#L1017-L1035
2,732
ironedgesoftware/graphs
src/Node/Node.php
Node.handleEvent
public function handleEvent(string $eventId, array $eventData) { switch ($eventId) { case self::EVENT_ADD_CHILD: /** @var NodeInterface $node */ $node = $eventData['child']; $this->addNode($node); break; case self::EVE...
php
public function handleEvent(string $eventId, array $eventData) { switch ($eventId) { case self::EVENT_ADD_CHILD: /** @var NodeInterface $node */ $node = $eventData['child']; $this->addNode($node); break; case self::EVE...
[ "public", "function", "handleEvent", "(", "string", "$", "eventId", ",", "array", "$", "eventData", ")", "{", "switch", "(", "$", "eventId", ")", "{", "case", "self", "::", "EVENT_ADD_CHILD", ":", "/** @var NodeInterface $node */", "$", "node", "=", "$", "ev...
This method is called when an event is fired. @param string $eventId - Event ID. @param array $eventData - Event Data. @return void
[ "This", "method", "is", "called", "when", "an", "event", "is", "fired", "." ]
c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0
https://github.com/ironedgesoftware/graphs/blob/c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0/src/Node/Node.php#L1045-L1093
2,733
ironedgesoftware/graphs
src/Node/Node.php
Node.notifySubscribers
public function notifySubscribers(string $eventId, array $eventData) { /** @var SubscriberInterface $subscriber */ foreach ($this->getSubscribers() as $subscriber) { $subscriber->handleEvent($eventId, $eventData); } }
php
public function notifySubscribers(string $eventId, array $eventData) { /** @var SubscriberInterface $subscriber */ foreach ($this->getSubscribers() as $subscriber) { $subscriber->handleEvent($eventId, $eventData); } }
[ "public", "function", "notifySubscribers", "(", "string", "$", "eventId", ",", "array", "$", "eventData", ")", "{", "/** @var SubscriberInterface $subscriber */", "foreach", "(", "$", "this", "->", "getSubscribers", "(", ")", "as", "$", "subscriber", ")", "{", "...
Fires an event. Subscribers gets notified about this event. @param string $eventId - Event ID. @param array $eventData - Event Data. @return void
[ "Fires", "an", "event", ".", "Subscribers", "gets", "notified", "about", "this", "event", "." ]
c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0
https://github.com/ironedgesoftware/graphs/blob/c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0/src/Node/Node.php#L1103-L1109
2,734
ironedgesoftware/graphs
src/Node/Node.php
Node.toArray
public function toArray(array $options = []) { $childrenIds = []; /** @var NodeInterface $child */ foreach ($this->getChildren() as $child) { $childrenIds[] = $child->getId(); } return [ 'id' => $this->getId(), 'name' ...
php
public function toArray(array $options = []) { $childrenIds = []; /** @var NodeInterface $child */ foreach ($this->getChildren() as $child) { $childrenIds[] = $child->getId(); } return [ 'id' => $this->getId(), 'name' ...
[ "public", "function", "toArray", "(", "array", "$", "options", "=", "[", "]", ")", "{", "$", "childrenIds", "=", "[", "]", ";", "/** @var NodeInterface $child */", "foreach", "(", "$", "this", "->", "getChildren", "(", ")", "as", "$", "child", ")", "{", ...
Returns an array representation of this node. @param array $options - Options. @return array
[ "Returns", "an", "array", "representation", "of", "this", "node", "." ]
c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0
https://github.com/ironedgesoftware/graphs/blob/c1cc2347e7ba1935fe6b06356a74f0cf3101f5a0/src/Node/Node.php#L1118-L1137
2,735
consigliere/components
src/Repository.php
Repository.scan
public function scan() { $paths = $this->getScanPaths(); $components = []; foreach ($paths as $key => $path) { $manifests = $this->app['files']->glob("{$path}/component.json"); is_array($manifests) || $manifests = []; foreach ($manifests as $manifest) ...
php
public function scan() { $paths = $this->getScanPaths(); $components = []; foreach ($paths as $key => $path) { $manifests = $this->app['files']->glob("{$path}/component.json"); is_array($manifests) || $manifests = []; foreach ($manifests as $manifest) ...
[ "public", "function", "scan", "(", ")", "{", "$", "paths", "=", "$", "this", "->", "getScanPaths", "(", ")", ";", "$", "components", "=", "[", "]", ";", "foreach", "(", "$", "paths", "as", "$", "key", "=>", "$", "path", ")", "{", "$", "manifests"...
Get & scan all components. @return array
[ "Get", "&", "scan", "all", "components", "." ]
9b08bb111f0b55b0a860ed9c3407eda0d9cc1252
https://github.com/consigliere/components/blob/9b08bb111f0b55b0a860ed9c3407eda0d9cc1252/src/Repository.php#L112-L131
2,736
consigliere/components
src/Repository.php
Repository.formatCached
protected function formatCached($cached) { $components = []; foreach ($cached as $name => $component) { $path = $this->config('paths.components') . '/' . $name; $components[$name] = new Component($this->app, $name, $path); } return $components; }
php
protected function formatCached($cached) { $components = []; foreach ($cached as $name => $component) { $path = $this->config('paths.components') . '/' . $name; $components[$name] = new Component($this->app, $name, $path); } return $components; }
[ "protected", "function", "formatCached", "(", "$", "cached", ")", "{", "$", "components", "=", "[", "]", ";", "foreach", "(", "$", "cached", "as", "$", "name", "=>", "$", "component", ")", "{", "$", "path", "=", "$", "this", "->", "config", "(", "'...
Format the cached data as array of components. @param array $cached @return array
[ "Format", "the", "cached", "data", "as", "array", "of", "components", "." ]
9b08bb111f0b55b0a860ed9c3407eda0d9cc1252
https://github.com/consigliere/components/blob/9b08bb111f0b55b0a860ed9c3407eda0d9cc1252/src/Repository.php#L154-L165
2,737
consigliere/components
src/Repository.php
Repository.getByStatus
public function getByStatus($status) { $components = []; foreach ($this->all() as $name => $component) { if ($component->isStatus($status)) { $components[$name] = $component; } } return $components; }
php
public function getByStatus($status) { $components = []; foreach ($this->all() as $name => $component) { if ($component->isStatus($status)) { $components[$name] = $component; } } return $components; }
[ "public", "function", "getByStatus", "(", "$", "status", ")", "{", "$", "components", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "all", "(", ")", "as", "$", "name", "=>", "$", "component", ")", "{", "if", "(", "$", "component", "->", ...
Get components by status. @param $status @return array
[ "Get", "components", "by", "status", "." ]
9b08bb111f0b55b0a860ed9c3407eda0d9cc1252
https://github.com/consigliere/components/blob/9b08bb111f0b55b0a860ed9c3407eda0d9cc1252/src/Repository.php#L196-L207
2,738
consigliere/components
src/Repository.php
Repository.getOrdered
public function getOrdered($direction = 'asc') { $components = $this->enabled(); uasort($components, function(Component $a, Component $b) use ($direction) { if ($a->order == $b->order) { return 0; } if ($direction == 'desc') { ret...
php
public function getOrdered($direction = 'asc') { $components = $this->enabled(); uasort($components, function(Component $a, Component $b) use ($direction) { if ($a->order == $b->order) { return 0; } if ($direction == 'desc') { ret...
[ "public", "function", "getOrdered", "(", "$", "direction", "=", "'asc'", ")", "{", "$", "components", "=", "$", "this", "->", "enabled", "(", ")", ";", "uasort", "(", "$", "components", ",", "function", "(", "Component", "$", "a", ",", "Component", "$"...
Get all ordered components. @param string $direction @return array
[ "Get", "all", "ordered", "components", "." ]
9b08bb111f0b55b0a860ed9c3407eda0d9cc1252
https://github.com/consigliere/components/blob/9b08bb111f0b55b0a860ed9c3407eda0d9cc1252/src/Repository.php#L258-L275
2,739
consigliere/components
src/Repository.php
Repository.find
public function find($name) { foreach ($this->all() as $component) { if ($component->getLowerName() === strtolower($name)) { return $component; } } return; }
php
public function find($name) { foreach ($this->all() as $component) { if ($component->getLowerName() === strtolower($name)) { return $component; } } return; }
[ "public", "function", "find", "(", "$", "name", ")", "{", "foreach", "(", "$", "this", "->", "all", "(", ")", "as", "$", "component", ")", "{", "if", "(", "$", "component", "->", "getLowerName", "(", ")", "===", "strtolower", "(", "$", "name", ")",...
Find a specific component. @param $name @return mixed|void
[ "Find", "a", "specific", "component", "." ]
9b08bb111f0b55b0a860ed9c3407eda0d9cc1252
https://github.com/consigliere/components/blob/9b08bb111f0b55b0a860ed9c3407eda0d9cc1252/src/Repository.php#L314-L323
2,740
consigliere/components
src/Repository.php
Repository.findOrFail
public function findOrFail($name) { $component = $this->find($name); if ($component !== null) { return $component; } throw new ComponentNotFoundException("Component [{$name}] does not exist!"); }
php
public function findOrFail($name) { $component = $this->find($name); if ($component !== null) { return $component; } throw new ComponentNotFoundException("Component [{$name}] does not exist!"); }
[ "public", "function", "findOrFail", "(", "$", "name", ")", "{", "$", "component", "=", "$", "this", "->", "find", "(", "$", "name", ")", ";", "if", "(", "$", "component", "!==", "null", ")", "{", "return", "$", "component", ";", "}", "throw", "new"...
Find a specific component, if there return that, otherwise throw exception. @param $name @return Component @throws ComponentNotFoundException
[ "Find", "a", "specific", "component", "if", "there", "return", "that", "otherwise", "throw", "exception", "." ]
9b08bb111f0b55b0a860ed9c3407eda0d9cc1252
https://github.com/consigliere/components/blob/9b08bb111f0b55b0a860ed9c3407eda0d9cc1252/src/Repository.php#L346-L355
2,741
consigliere/components
src/Repository.php
Repository.getComponentPath
public function getComponentPath($component) { try { return $this->findOrFail($component)->getPath() . '/'; } catch (ComponentNotFoundException $e) { return $this->getPath() . '/' . Str::studly($component) . '/'; } }
php
public function getComponentPath($component) { try { return $this->findOrFail($component)->getPath() . '/'; } catch (ComponentNotFoundException $e) { return $this->getPath() . '/' . Str::studly($component) . '/'; } }
[ "public", "function", "getComponentPath", "(", "$", "component", ")", "{", "try", "{", "return", "$", "this", "->", "findOrFail", "(", "$", "component", ")", "->", "getPath", "(", ")", ".", "'/'", ";", "}", "catch", "(", "ComponentNotFoundException", "$", ...
Get component path for a specific component. @param $component @return string
[ "Get", "component", "path", "for", "a", "specific", "component", "." ]
9b08bb111f0b55b0a860ed9c3407eda0d9cc1252
https://github.com/consigliere/components/blob/9b08bb111f0b55b0a860ed9c3407eda0d9cc1252/src/Repository.php#L374-L381
2,742
consigliere/components
src/Repository.php
Repository.setUsed
public function setUsed($name) { $component = $this->findOrFail($name); $this->app['files']->put($this->getUsedStoragePath(), $component); }
php
public function setUsed($name) { $component = $this->findOrFail($name); $this->app['files']->put($this->getUsedStoragePath(), $component); }
[ "public", "function", "setUsed", "(", "$", "name", ")", "{", "$", "component", "=", "$", "this", "->", "findOrFail", "(", "$", "name", ")", ";", "$", "this", "->", "app", "[", "'files'", "]", "->", "put", "(", "$", "this", "->", "getUsedStoragePath",...
Set component used for cli session. @param $name @throws ComponentNotFoundException
[ "Set", "component", "used", "for", "cli", "session", "." ]
9b08bb111f0b55b0a860ed9c3407eda0d9cc1252
https://github.com/consigliere/components/blob/9b08bb111f0b55b0a860ed9c3407eda0d9cc1252/src/Repository.php#L430-L435
2,743
cityware/city-snmp
src/MIBS/MAU.php
MAU.states
public function states($translate = false) { $states = $this->getSNMP()->subOidWalk(self::OID_STATUS, 12); if (!$translate) return $states; return $this->getSNMP()->translate($states, self::$STATES); }
php
public function states($translate = false) { $states = $this->getSNMP()->subOidWalk(self::OID_STATUS, 12); if (!$translate) return $states; return $this->getSNMP()->translate($states, self::$STATES); }
[ "public", "function", "states", "(", "$", "translate", "=", "false", ")", "{", "$", "states", "=", "$", "this", "->", "getSNMP", "(", ")", "->", "subOidWalk", "(", "self", "::", "OID_STATUS", ",", "12", ")", ";", "if", "(", "!", "$", "translate", "...
Get an array of device interface states @see $STATES @param boolean $translate If true, return the string representation @return array An array of interface states
[ "Get", "an", "array", "of", "device", "interface", "states" ]
831b7485b6c932a84f081d5ceeb9c5f4e7a8641d
https://github.com/cityware/city-snmp/blob/831b7485b6c932a84f081d5ceeb9c5f4e7a8641d/src/MIBS/MAU.php#L662-L669
2,744
cityware/city-snmp
src/MIBS/MAU.php
MAU.jabberStates
public function jabberStates($translate = false) { $states = $this->getSNMP()->subOidWalk(self::OID_JABBER_STATE, 12); if (!$translate) return $states; return $this->getSNMP()->translate($states, self::$JABBER_STATES); }
php
public function jabberStates($translate = false) { $states = $this->getSNMP()->subOidWalk(self::OID_JABBER_STATE, 12); if (!$translate) return $states; return $this->getSNMP()->translate($states, self::$JABBER_STATES); }
[ "public", "function", "jabberStates", "(", "$", "translate", "=", "false", ")", "{", "$", "states", "=", "$", "this", "->", "getSNMP", "(", ")", "->", "subOidWalk", "(", "self", "::", "OID_JABBER_STATE", ",", "12", ")", ";", "if", "(", "!", "$", "tra...
Get an array of device interface jabber states @see $JABBER_STATES @param boolean $translate If true, return the string representation @return array An array of interface jabber states
[ "Get", "an", "array", "of", "device", "interface", "jabber", "states" ]
831b7485b6c932a84f081d5ceeb9c5f4e7a8641d
https://github.com/cityware/city-snmp/blob/831b7485b6c932a84f081d5ceeb9c5f4e7a8641d/src/MIBS/MAU.php#L891-L898
2,745
cityware/city-snmp
src/MIBS/MAU.php
MAU.jackTypes
public function jackTypes($translate = false) { $types = $this->getSNMP()->subOidWalk(self::OID_JACK_TYPE, 12); if (!$translate) return $types; return $this->getSNMP()->translate($types, self::$JACK_TYPES); }
php
public function jackTypes($translate = false) { $types = $this->getSNMP()->subOidWalk(self::OID_JACK_TYPE, 12); if (!$translate) return $types; return $this->getSNMP()->translate($types, self::$JACK_TYPES); }
[ "public", "function", "jackTypes", "(", "$", "translate", "=", "false", ")", "{", "$", "types", "=", "$", "this", "->", "getSNMP", "(", ")", "->", "subOidWalk", "(", "self", "::", "OID_JACK_TYPE", ",", "12", ")", ";", "if", "(", "!", "$", "translate"...
Get an array of device jack types @see $JACK_TYPES @param boolean $translate If true, return the string representation @return array An array of interface jack types
[ "Get", "an", "array", "of", "device", "jack", "types" ]
831b7485b6c932a84f081d5ceeb9c5f4e7a8641d
https://github.com/cityware/city-snmp/blob/831b7485b6c932a84f081d5ceeb9c5f4e7a8641d/src/MIBS/MAU.php#L1065-L1072
2,746
Smile-SA/EzToolsBundle
Command/Content/GenerateCommand.php
GenerateCommand.execute
protected function execute(InputInterface $input, OutputInterface $output) { $this->input = $input; $this->output = $output; /** @var $repository Repository */ $repository = $this->getContainer()->get('ezpublish.api.repository'); /** @var $contentService ContentService */ ...
php
protected function execute(InputInterface $input, OutputInterface $output) { $this->input = $input; $this->output = $output; /** @var $repository Repository */ $repository = $this->getContainer()->get('ezpublish.api.repository'); /** @var $contentService ContentService */ ...
[ "protected", "function", "execute", "(", "InputInterface", "$", "input", ",", "OutputInterface", "$", "output", ")", "{", "$", "this", "->", "input", "=", "$", "input", ";", "$", "this", "->", "output", "=", "$", "output", ";", "/** @var $repository Reposito...
Execute Content generate command @param InputInterface $input @param OutputInterface $output @return int|null|void
[ "Execute", "Content", "generate", "command" ]
5f384f552a83dd723fb4dca468ac0a2e56442be8
https://github.com/Smile-SA/EzToolsBundle/blob/5f384f552a83dd723fb4dca468ac0a2e56442be8/Command/Content/GenerateCommand.php#L45-L98
2,747
ntentan/ntentan
src/sessions/SessionContainerFactory.php
SessionContainerFactory.createSessionContainer
public function createSessionContainer() { // Check and start a default session if a custom session container is not supplied if(!isset($this->config['container'])) { session_start(); return; } // Create an instance of the session container. Session containers...
php
public function createSessionContainer() { // Check and start a default session if a custom session container is not supplied if(!isset($this->config['container'])) { session_start(); return; } // Create an instance of the session container. Session containers...
[ "public", "function", "createSessionContainer", "(", ")", "{", "// Check and start a default session if a custom session container is not supplied", "if", "(", "!", "isset", "(", "$", "this", "->", "config", "[", "'container'", "]", ")", ")", "{", "session_start", "(", ...
Create and return an instance of the custom session container if required.
[ "Create", "and", "return", "an", "instance", "of", "the", "custom", "session", "container", "if", "required", "." ]
a6e89de5999bfafe5be9152bcd51ecfef3e928fb
https://github.com/ntentan/ntentan/blob/a6e89de5999bfafe5be9152bcd51ecfef3e928fb/src/sessions/SessionContainerFactory.php#L20-L32
2,748
rinvex/obsolete-attributable
src/Events/EntityWasDeleted.php
EntityWasDeleted.handle
public function handle(Entity $entity) { // We will initially check if the model is using soft deletes. If so, // the attribute values will remain untouched as they should sill // be available till the entity is truly deleted from database. if (in_array(SoftDeletes::class, class_uses...
php
public function handle(Entity $entity) { // We will initially check if the model is using soft deletes. If so, // the attribute values will remain untouched as they should sill // be available till the entity is truly deleted from database. if (in_array(SoftDeletes::class, class_uses...
[ "public", "function", "handle", "(", "Entity", "$", "entity", ")", "{", "// We will initially check if the model is using soft deletes. If so,", "// the attribute values will remain untouched as they should sill", "// be available till the entity is truly deleted from database.", "if", "("...
Handle the entity deletion. @param \Illuminate\Database\Eloquent\Model $entity @return void
[ "Handle", "the", "entity", "deletion", "." ]
23fa78efda9c24e2e1579917967537a3b3b9e4ce
https://github.com/rinvex/obsolete-attributable/blob/23fa78efda9c24e2e1579917967537a3b3b9e4ce/src/Events/EntityWasDeleted.php#L19-L37
2,749
bushbaby/BsbDoctrineTranslationLoader
src/BsbDoctrineTranslationLoader/Util/ConfigManipulate.php
ConfigManipulate.replaceKey
final protected static function replaceKey($data, $search, $replace) { foreach ($data as $key => $value) { if (is_array($value)) { $data[$key] = $value = self::replaceKey($data[$key], $search, $replace); } if ($key == $search) { $data[$repl...
php
final protected static function replaceKey($data, $search, $replace) { foreach ($data as $key => $value) { if (is_array($value)) { $data[$key] = $value = self::replaceKey($data[$key], $search, $replace); } if ($key == $search) { $data[$repl...
[ "final", "protected", "static", "function", "replaceKey", "(", "$", "data", ",", "$", "search", ",", "$", "replace", ")", "{", "foreach", "(", "$", "data", "as", "$", "key", "=>", "$", "value", ")", "{", "if", "(", "is_array", "(", "$", "value", ")...
Recursively replace keys of associative arrays @param array $data @param string $search @param string $replace @return array
[ "Recursively", "replace", "keys", "of", "associative", "arrays" ]
a80309522bf4fe118a3e66d86d5344407068f27b
https://github.com/bushbaby/BsbDoctrineTranslationLoader/blob/a80309522bf4fe118a3e66d86d5344407068f27b/src/BsbDoctrineTranslationLoader/Util/ConfigManipulate.php#L40-L53
2,750
anklimsk/cakephp-basic-functions
Vendor/langcode-conv/zendframework/zend-stdlib/src/StringUtils.php
StringUtils.getRegisteredWrappers
public static function getRegisteredWrappers() { if (static::$wrapperRegistry === null) { static::$wrapperRegistry = []; if (extension_loaded('intl')) { static::$wrapperRegistry[] = 'Zend\Stdlib\StringWrapper\Intl'; } if (extension_loaded('mb...
php
public static function getRegisteredWrappers() { if (static::$wrapperRegistry === null) { static::$wrapperRegistry = []; if (extension_loaded('intl')) { static::$wrapperRegistry[] = 'Zend\Stdlib\StringWrapper\Intl'; } if (extension_loaded('mb...
[ "public", "static", "function", "getRegisteredWrappers", "(", ")", "{", "if", "(", "static", "::", "$", "wrapperRegistry", "===", "null", ")", "{", "static", "::", "$", "wrapperRegistry", "=", "[", "]", ";", "if", "(", "extension_loaded", "(", "'intl'", ")...
Get registered wrapper classes @return string[]
[ "Get", "registered", "wrapper", "classes" ]
7554e8b0b420fd3155593af7bf76b7ccbdc8701e
https://github.com/anklimsk/cakephp-basic-functions/blob/7554e8b0b420fd3155593af7bf76b7ccbdc8701e/Vendor/langcode-conv/zendframework/zend-stdlib/src/StringUtils.php#L55-L76
2,751
anklimsk/cakephp-basic-functions
Vendor/langcode-conv/zendframework/zend-stdlib/src/StringUtils.php
StringUtils.registerWrapper
public static function registerWrapper($wrapper) { $wrapper = (string) $wrapper; if (!in_array($wrapper, static::$wrapperRegistry, true)) { static::$wrapperRegistry[] = $wrapper; } }
php
public static function registerWrapper($wrapper) { $wrapper = (string) $wrapper; if (!in_array($wrapper, static::$wrapperRegistry, true)) { static::$wrapperRegistry[] = $wrapper; } }
[ "public", "static", "function", "registerWrapper", "(", "$", "wrapper", ")", "{", "$", "wrapper", "=", "(", "string", ")", "$", "wrapper", ";", "if", "(", "!", "in_array", "(", "$", "wrapper", ",", "static", "::", "$", "wrapperRegistry", ",", "true", "...
Register a string wrapper class @param string $wrapper @return void
[ "Register", "a", "string", "wrapper", "class" ]
7554e8b0b420fd3155593af7bf76b7ccbdc8701e
https://github.com/anklimsk/cakephp-basic-functions/blob/7554e8b0b420fd3155593af7bf76b7ccbdc8701e/Vendor/langcode-conv/zendframework/zend-stdlib/src/StringUtils.php#L84-L90
2,752
anklimsk/cakephp-basic-functions
Vendor/langcode-conv/zendframework/zend-stdlib/src/StringUtils.php
StringUtils.unregisterWrapper
public static function unregisterWrapper($wrapper) { $index = array_search((string) $wrapper, static::$wrapperRegistry, true); if ($index !== false) { unset(static::$wrapperRegistry[$index]); } }
php
public static function unregisterWrapper($wrapper) { $index = array_search((string) $wrapper, static::$wrapperRegistry, true); if ($index !== false) { unset(static::$wrapperRegistry[$index]); } }
[ "public", "static", "function", "unregisterWrapper", "(", "$", "wrapper", ")", "{", "$", "index", "=", "array_search", "(", "(", "string", ")", "$", "wrapper", ",", "static", "::", "$", "wrapperRegistry", ",", "true", ")", ";", "if", "(", "$", "index", ...
Unregister a string wrapper class @param string $wrapper @return void
[ "Unregister", "a", "string", "wrapper", "class" ]
7554e8b0b420fd3155593af7bf76b7ccbdc8701e
https://github.com/anklimsk/cakephp-basic-functions/blob/7554e8b0b420fd3155593af7bf76b7ccbdc8701e/Vendor/langcode-conv/zendframework/zend-stdlib/src/StringUtils.php#L98-L104
2,753
anklimsk/cakephp-basic-functions
Vendor/langcode-conv/zendframework/zend-stdlib/src/StringUtils.php
StringUtils.getWrapper
public static function getWrapper($encoding = 'UTF-8', $convertEncoding = null) { foreach (static::getRegisteredWrappers() as $wrapperClass) { if ($wrapperClass::isSupported($encoding, $convertEncoding)) { $wrapper = new $wrapperClass($encoding, $convertEncoding); ...
php
public static function getWrapper($encoding = 'UTF-8', $convertEncoding = null) { foreach (static::getRegisteredWrappers() as $wrapperClass) { if ($wrapperClass::isSupported($encoding, $convertEncoding)) { $wrapper = new $wrapperClass($encoding, $convertEncoding); ...
[ "public", "static", "function", "getWrapper", "(", "$", "encoding", "=", "'UTF-8'", ",", "$", "convertEncoding", "=", "null", ")", "{", "foreach", "(", "static", "::", "getRegisteredWrappers", "(", ")", "as", "$", "wrapperClass", ")", "{", "if", "(", "$", ...
Get the first string wrapper supporting the given character encoding and supports to convert into the given convert encoding. @param string $encoding Character encoding to support @param string|null $convertEncoding OPTIONAL character encoding to convert in @return StringWrapperInterface @throws Exception\...
[ "Get", "the", "first", "string", "wrapper", "supporting", "the", "given", "character", "encoding", "and", "supports", "to", "convert", "into", "the", "given", "convert", "encoding", "." ]
7554e8b0b420fd3155593af7bf76b7ccbdc8701e
https://github.com/anklimsk/cakephp-basic-functions/blob/7554e8b0b420fd3155593af7bf76b7ccbdc8701e/Vendor/langcode-conv/zendframework/zend-stdlib/src/StringUtils.php#L125-L139
2,754
tentwofour/formatter
src/Ten24/Component/Formatter/PhoneNumberFormatter.php
PhoneNumberFormatter.format
public function format() { if (strlen($this->phoneNumber) >= 7) { return sprintf($this->format, $this->getCountryCode(), $this->getAreaCode(), $this->getPrefix(), $this->getLineNumber()); } return null; ...
php
public function format() { if (strlen($this->phoneNumber) >= 7) { return sprintf($this->format, $this->getCountryCode(), $this->getAreaCode(), $this->getPrefix(), $this->getLineNumber()); } return null; ...
[ "public", "function", "format", "(", ")", "{", "if", "(", "strlen", "(", "$", "this", "->", "phoneNumber", ")", ">=", "7", ")", "{", "return", "sprintf", "(", "$", "this", "->", "format", ",", "$", "this", "->", "getCountryCode", "(", ")", ",", "$"...
Get formatted phone number for display This assumes a flattened format like 11235551234 @return string
[ "Get", "formatted", "phone", "number", "for", "display", "This", "assumes", "a", "flattened", "format", "like", "11235551234" ]
6474284a75f2c29f92a795c296cbcd4dedd6f751
https://github.com/tentwofour/formatter/blob/6474284a75f2c29f92a795c296cbcd4dedd6f751/src/Ten24/Component/Formatter/PhoneNumberFormatter.php#L103-L115
2,755
tentwofour/formatter
src/Ten24/Component/Formatter/PhoneNumberFormatter.php
PhoneNumberFormatter.getComponent
public function getComponent($component = null) { if (null === $this->components) { $pattern = '/ (?<countryCode>(\+?\d{1,2})?\D*) # optional country code (?<areaCode>(\d{3})?\D*) # optional area code (?<prefix>(\d{3...
php
public function getComponent($component = null) { if (null === $this->components) { $pattern = '/ (?<countryCode>(\+?\d{1,2})?\D*) # optional country code (?<areaCode>(\d{3})?\D*) # optional area code (?<prefix>(\d{3...
[ "public", "function", "getComponent", "(", "$", "component", "=", "null", ")", "{", "if", "(", "null", "===", "$", "this", "->", "components", ")", "{", "$", "pattern", "=", "'/\n (?<countryCode>(\\+?\\d{1,2})?\\D*) # optional country code\n ...
Get phone number component @param null $component @return null
[ "Get", "phone", "number", "component" ]
6474284a75f2c29f92a795c296cbcd4dedd6f751
https://github.com/tentwofour/formatter/blob/6474284a75f2c29f92a795c296cbcd4dedd6f751/src/Ten24/Component/Formatter/PhoneNumberFormatter.php#L177-L230
2,756
tentwofour/formatter
src/Ten24/Component/Formatter/PhoneNumberFormatter.php
PhoneNumberFormatter.setDisplayFormat
public function setDisplayFormat($displayFormat = self::FORMAT_NA) { if (substr_count($displayFormat, '%d') !== 4) { throw new \BadFunctionCallException('The format passed must be passed in the sprintf() format, and have exactly 4 digit components'); } $this->displayForm...
php
public function setDisplayFormat($displayFormat = self::FORMAT_NA) { if (substr_count($displayFormat, '%d') !== 4) { throw new \BadFunctionCallException('The format passed must be passed in the sprintf() format, and have exactly 4 digit components'); } $this->displayForm...
[ "public", "function", "setDisplayFormat", "(", "$", "displayFormat", "=", "self", "::", "FORMAT_NA", ")", "{", "if", "(", "substr_count", "(", "$", "displayFormat", ",", "'%d'", ")", "!==", "4", ")", "{", "throw", "new", "\\", "BadFunctionCallException", "("...
Sets the display format @param string $displayFormat @throws \BadFunctionCallException
[ "Sets", "the", "display", "format" ]
6474284a75f2c29f92a795c296cbcd4dedd6f751
https://github.com/tentwofour/formatter/blob/6474284a75f2c29f92a795c296cbcd4dedd6f751/src/Ten24/Component/Formatter/PhoneNumberFormatter.php#L268-L276
2,757
tourze/model
src/Support/ActiveRecord.php
ActiveRecord.labels
public function labels($labels = null) { if ($labels === null) { return $this->_labels; } $this->_labels = $labels; return $this; }
php
public function labels($labels = null) { if ($labels === null) { return $this->_labels; } $this->_labels = $labels; return $this; }
[ "public", "function", "labels", "(", "$", "labels", "=", "null", ")", "{", "if", "(", "$", "labels", "===", "null", ")", "{", "return", "$", "this", "->", "_labels", ";", "}", "$", "this", "->", "_labels", "=", "$", "labels", ";", "return", "$", ...
Label definitions for validation @param null $labels @return array
[ "Label", "definitions", "for", "validation" ]
1fd8fb141f47f320f3f20b369d127b0b89f82986
https://github.com/tourze/model/blob/1fd8fb141f47f320f3f20b369d127b0b89f82986/src/Support/ActiveRecord.php#L106-L115
2,758
tourze/model
src/Support/ActiveRecord.php
ActiveRecord.param
public function param($param, $value, $type = null) { return $this->setParameter($param, $value, $type); }
php
public function param($param, $value, $type = null) { return $this->setParameter($param, $value, $type); }
[ "public", "function", "param", "(", "$", "param", ",", "$", "value", ",", "$", "type", "=", "null", ")", "{", "return", "$", "this", "->", "setParameter", "(", "$", "param", ",", "$", "value", ",", "$", "type", ")", ";", "}" ]
Set the value of a parameter in the query. @param string $param parameter key to replace @param mixed $value value to use @param null $type @return $this
[ "Set", "the", "value", "of", "a", "parameter", "in", "the", "query", "." ]
1fd8fb141f47f320f3f20b369d127b0b89f82986
https://github.com/tourze/model/blob/1fd8fb141f47f320f3f20b369d127b0b89f82986/src/Support/ActiveRecord.php#L1066-L1069
2,759
phlexible/phlexible
src/Phlexible/Component/MediaExtractor/Transmutor.php
Transmutor.transmute
public function transmute(InputDescriptor $input, $targetFormat) { if (!in_array($targetFormat, array('image', 'audio', 'video', 'flash', 'text'))) { return null; } $mediaType = $this->mediaTypeManager->find($input->getMediaType()); return $this->extractor->extract($inp...
php
public function transmute(InputDescriptor $input, $targetFormat) { if (!in_array($targetFormat, array('image', 'audio', 'video', 'flash', 'text'))) { return null; } $mediaType = $this->mediaTypeManager->find($input->getMediaType()); return $this->extractor->extract($inp...
[ "public", "function", "transmute", "(", "InputDescriptor", "$", "input", ",", "$", "targetFormat", ")", "{", "if", "(", "!", "in_array", "(", "$", "targetFormat", ",", "array", "(", "'image'", ",", "'audio'", ",", "'video'", ",", "'flash'", ",", "'text'", ...
Transmute file to target format. @param InputDescriptor $input @param string $targetFormat @return string
[ "Transmute", "file", "to", "target", "format", "." ]
132f24924c9bb0dbb6c1ea84db0a463f97fa3893
https://github.com/phlexible/phlexible/blob/132f24924c9bb0dbb6c1ea84db0a463f97fa3893/src/Phlexible/Component/MediaExtractor/Transmutor.php#L53-L62
2,760
laradic/service-provider
src/Plugins/Bindings.php
Bindings.startBindingsPlugin
protected function startBindingsPlugin($app) { /* @var \Illuminate\Foundation\Application $app */ $this->requiresPlugins(Commands::class, Events::class); $this->onRegister('bindings', function (Application $app) { // Container bindings and aliases $legacy = ! class_...
php
protected function startBindingsPlugin($app) { /* @var \Illuminate\Foundation\Application $app */ $this->requiresPlugins(Commands::class, Events::class); $this->onRegister('bindings', function (Application $app) { // Container bindings and aliases $legacy = ! class_...
[ "protected", "function", "startBindingsPlugin", "(", "$", "app", ")", "{", "/* @var \\Illuminate\\Foundation\\Application $app */", "$", "this", "->", "requiresPlugins", "(", "Commands", "::", "class", ",", "Events", "::", "class", ")", ";", "$", "this", "->", "on...
startBindingsPlugin method. @param \Illuminate\Foundation\Application $app
[ "startBindingsPlugin", "method", "." ]
b1428d566b97b3662b405c64ff0cad8a89102033
https://github.com/laradic/service-provider/blob/b1428d566b97b3662b405c64ff0cad8a89102033/src/Plugins/Bindings.php#L85-L126
2,761
laradic/service-provider
src/Plugins/Bindings.php
Bindings.bindIf
protected function bindIf($abstract, $concrete = null, $shared = true, $alias = null) { if ( ! $this->app->bound($abstract)) { $concrete = $concrete ?: $abstract; $this->app->bind($abstract, $concrete, $shared); } }
php
protected function bindIf($abstract, $concrete = null, $shared = true, $alias = null) { if ( ! $this->app->bound($abstract)) { $concrete = $concrete ?: $abstract; $this->app->bind($abstract, $concrete, $shared); } }
[ "protected", "function", "bindIf", "(", "$", "abstract", ",", "$", "concrete", "=", "null", ",", "$", "shared", "=", "true", ",", "$", "alias", "=", "null", ")", "{", "if", "(", "!", "$", "this", "->", "app", "->", "bound", "(", "$", "abstract", ...
Registers a binding if it hasn't already been registered. @param string $abstract @param \Closure|string|null $concrete @param bool $shared @param bool|string|null $alias
[ "Registers", "a", "binding", "if", "it", "hasn", "t", "already", "been", "registered", "." ]
b1428d566b97b3662b405c64ff0cad8a89102033
https://github.com/laradic/service-provider/blob/b1428d566b97b3662b405c64ff0cad8a89102033/src/Plugins/Bindings.php#L136-L143
2,762
inceddy/everest-http
src/Everest/Http/RoutingContext.php
RoutingContext.getPrefixedPath
public function getPrefixedPath(string $path = '') : string { return trim($this->parent ? ($this->parent->getPrefixedPath($this->prefix ? $this->prefix . '/' . $path : $path)) : ($this->prefix ? $this->prefix . '/' . $path : $path), '/'); }
php
public function getPrefixedPath(string $path = '') : string { return trim($this->parent ? ($this->parent->getPrefixedPath($this->prefix ? $this->prefix . '/' . $path : $path)) : ($this->prefix ? $this->prefix . '/' . $path : $path), '/'); }
[ "public", "function", "getPrefixedPath", "(", "string", "$", "path", "=", "''", ")", ":", "string", "{", "return", "trim", "(", "$", "this", "->", "parent", "?", "(", "$", "this", "->", "parent", "->", "getPrefixedPath", "(", "$", "this", "->", "prefix...
Gets path prefix of this context and all its parents @param string $path (optional) The parents prefix @return string The prefixed path
[ "Gets", "path", "prefix", "of", "this", "context", "and", "all", "its", "parents" ]
b0f6cbb6723aa96213d28c35b52e03833113be0e
https://github.com/inceddy/everest-http/blob/b0f6cbb6723aa96213d28c35b52e03833113be0e/src/Everest/Http/RoutingContext.php#L171-L176
2,763
inceddy/everest-http
src/Everest/Http/RoutingContext.php
RoutingContext.addMiddleware
public function addMiddleware(callable $middleware, string $type = self::BEFORE) { ; $type = self::validateMiddlewareType($type); $this->middlewares[$type][] = $middleware; }
php
public function addMiddleware(callable $middleware, string $type = self::BEFORE) { ; $type = self::validateMiddlewareType($type); $this->middlewares[$type][] = $middleware; }
[ "public", "function", "addMiddleware", "(", "callable", "$", "middleware", ",", "string", "$", "type", "=", "self", "::", "BEFORE", ")", "{", ";", "$", "type", "=", "self", "::", "validateMiddlewareType", "(", "$", "type", ")", ";", "$", "this", "->", ...
Adds a new middleware to this context @param callable $middleware The middleware @return void
[ "Adds", "a", "new", "middleware", "to", "this", "context" ]
b0f6cbb6723aa96213d28c35b52e03833113be0e
https://github.com/inceddy/everest-http/blob/b0f6cbb6723aa96213d28c35b52e03833113be0e/src/Everest/Http/RoutingContext.php#L218-L222
2,764
inceddy/everest-http
src/Everest/Http/RoutingContext.php
RoutingContext.addSubContext
public function addSubContext(string $prefix, Closure $invoker) : RoutingContext { return $this->contexts[] = new RoutingContext($prefix, $invoker, $this); }
php
public function addSubContext(string $prefix, Closure $invoker) : RoutingContext { return $this->contexts[] = new RoutingContext($prefix, $invoker, $this); }
[ "public", "function", "addSubContext", "(", "string", "$", "prefix", ",", "Closure", "$", "invoker", ")", ":", "RoutingContext", "{", "return", "$", "this", "->", "contexts", "[", "]", "=", "new", "RoutingContext", "(", "$", "prefix", ",", "$", "invoker", ...
Adds a new sub context to this context @param string $prefix The path prefix of this context @param Closure $invoker The closure invoking the new sub context @return Everest\Http\RoutingContext The new sub context
[ "Adds", "a", "new", "sub", "context", "to", "this", "context" ]
b0f6cbb6723aa96213d28c35b52e03833113be0e
https://github.com/inceddy/everest-http/blob/b0f6cbb6723aa96213d28c35b52e03833113be0e/src/Everest/Http/RoutingContext.php#L285-L288
2,765
ddehart/dilmun
spec/Anshar/Http/UriSpec.php
UriSpec.it_retains_the_original_state_of_the_instance_duplicated_with_new_scheme
function it_retains_the_original_state_of_the_instance_duplicated_with_new_scheme() { $original_uri = (string) $this->getWrappedObject(); $new_scheme = $this->withScheme("http"); $this->__toString()->shouldReturn($original_uri); }
php
function it_retains_the_original_state_of_the_instance_duplicated_with_new_scheme() { $original_uri = (string) $this->getWrappedObject(); $new_scheme = $this->withScheme("http"); $this->__toString()->shouldReturn($original_uri); }
[ "function", "it_retains_the_original_state_of_the_instance_duplicated_with_new_scheme", "(", ")", "{", "$", "original_uri", "=", "(", "string", ")", "$", "this", "->", "getWrappedObject", "(", ")", ";", "$", "new_scheme", "=", "$", "this", "->", "withScheme", "(", ...
This method MUST retain the state of the current instance, and return an instance that contains the specified scheme.
[ "This", "method", "MUST", "retain", "the", "state", "of", "the", "current", "instance", "and", "return", "an", "instance", "that", "contains", "the", "specified", "scheme", "." ]
e2a294dbcd4c6754063c247be64930c5ee91378f
https://github.com/ddehart/dilmun/blob/e2a294dbcd4c6754063c247be64930c5ee91378f/spec/Anshar/Http/UriSpec.php#L438-L445
2,766
ddehart/dilmun
spec/Anshar/Http/UriSpec.php
UriSpec.it_retains_the_original_state_of_the_instance_duplicated_with_new_authority
function it_retains_the_original_state_of_the_instance_duplicated_with_new_authority() { $original_uri = (string) $this->getWrappedObject(); $new_authority = $this->withAuthority("corge:[email protected]:9999"); $this->__toString()->shouldReturn($original_uri); }
php
function it_retains_the_original_state_of_the_instance_duplicated_with_new_authority() { $original_uri = (string) $this->getWrappedObject(); $new_authority = $this->withAuthority("corge:[email protected]:9999"); $this->__toString()->shouldReturn($original_uri); }
[ "function", "it_retains_the_original_state_of_the_instance_duplicated_with_new_authority", "(", ")", "{", "$", "original_uri", "=", "(", "string", ")", "$", "this", "->", "getWrappedObject", "(", ")", ";", "$", "new_authority", "=", "$", "this", "->", "withAuthority",...
This method MUST retain the state of the current instance, and return an instance that contains the specified authority.
[ "This", "method", "MUST", "retain", "the", "state", "of", "the", "current", "instance", "and", "return", "an", "instance", "that", "contains", "the", "specified", "authority", "." ]
e2a294dbcd4c6754063c247be64930c5ee91378f
https://github.com/ddehart/dilmun/blob/e2a294dbcd4c6754063c247be64930c5ee91378f/spec/Anshar/Http/UriSpec.php#L508-L515
2,767
ddehart/dilmun
spec/Anshar/Http/UriSpec.php
UriSpec.it_replaces_authority_components_with_new_authority
function it_replaces_authority_components_with_new_authority() { $new_authority = $this->withAuthority("corge:[email protected]:9999"); $new_authority->getAuthority()->shouldReturn("corge:[email protected]:9999"); $new_authority->getUserInfo()->shouldReturn("corge:grault"); $new_authori...
php
function it_replaces_authority_components_with_new_authority() { $new_authority = $this->withAuthority("corge:[email protected]:9999"); $new_authority->getAuthority()->shouldReturn("corge:[email protected]:9999"); $new_authority->getUserInfo()->shouldReturn("corge:grault"); $new_authori...
[ "function", "it_replaces_authority_components_with_new_authority", "(", ")", "{", "$", "new_authority", "=", "$", "this", "->", "withAuthority", "(", "\"corge:[email protected]:9999\"", ")", ";", "$", "new_authority", "->", "getAuthority", "(", ")", "->", "shouldReturn", ...
Replacing the authority is equivalent to replacing or removing all authority components depending upon the composition of the authority.
[ "Replacing", "the", "authority", "is", "equivalent", "to", "replacing", "or", "removing", "all", "authority", "components", "depending", "upon", "the", "composition", "of", "the", "authority", "." ]
e2a294dbcd4c6754063c247be64930c5ee91378f
https://github.com/ddehart/dilmun/blob/e2a294dbcd4c6754063c247be64930c5ee91378f/spec/Anshar/Http/UriSpec.php#L521-L529
2,768
ddehart/dilmun
spec/Anshar/Http/UriSpec.php
UriSpec.it_removes_authority_components_with_empty_authority
function it_removes_authority_components_with_empty_authority() { $new_authority = $this->withAuthority(""); $new_authority->getAuthority()->shouldReturn(""); $new_authority->getUserInfo()->shouldReturn(""); $new_authority->getHost()->shouldReturn(""); $new_authority->getPor...
php
function it_removes_authority_components_with_empty_authority() { $new_authority = $this->withAuthority(""); $new_authority->getAuthority()->shouldReturn(""); $new_authority->getUserInfo()->shouldReturn(""); $new_authority->getHost()->shouldReturn(""); $new_authority->getPor...
[ "function", "it_removes_authority_components_with_empty_authority", "(", ")", "{", "$", "new_authority", "=", "$", "this", "->", "withAuthority", "(", "\"\"", ")", ";", "$", "new_authority", "->", "getAuthority", "(", ")", "->", "shouldReturn", "(", "\"\"", ")", ...
An empty authority is equivalent to removing the authority and all authority components.
[ "An", "empty", "authority", "is", "equivalent", "to", "removing", "the", "authority", "and", "all", "authority", "components", "." ]
e2a294dbcd4c6754063c247be64930c5ee91378f
https://github.com/ddehart/dilmun/blob/e2a294dbcd4c6754063c247be64930c5ee91378f/spec/Anshar/Http/UriSpec.php#L534-L542
2,769
ddehart/dilmun
spec/Anshar/Http/UriSpec.php
UriSpec.it_retains_the_original_state_of_the_instance_duplicated_with_new_user_info
function it_retains_the_original_state_of_the_instance_duplicated_with_new_user_info() { $original_uri = (string) $this->getWrappedObject(); $new_user_info = $this->withUserInfo("corge", "grault"); $this->__toString()->shouldReturn($original_uri); }
php
function it_retains_the_original_state_of_the_instance_duplicated_with_new_user_info() { $original_uri = (string) $this->getWrappedObject(); $new_user_info = $this->withUserInfo("corge", "grault"); $this->__toString()->shouldReturn($original_uri); }
[ "function", "it_retains_the_original_state_of_the_instance_duplicated_with_new_user_info", "(", ")", "{", "$", "original_uri", "=", "(", "string", ")", "$", "this", "->", "getWrappedObject", "(", ")", ";", "$", "new_user_info", "=", "$", "this", "->", "withUserInfo", ...
This method MUST retain the state of the current instance, and return an instance that contains the specified user information.
[ "This", "method", "MUST", "retain", "the", "state", "of", "the", "current", "instance", "and", "return", "an", "instance", "that", "contains", "the", "specified", "user", "information", "." ]
e2a294dbcd4c6754063c247be64930c5ee91378f
https://github.com/ddehart/dilmun/blob/e2a294dbcd4c6754063c247be64930c5ee91378f/spec/Anshar/Http/UriSpec.php#L577-L584
2,770
ddehart/dilmun
spec/Anshar/Http/UriSpec.php
UriSpec.it_retains_the_original_state_of_the_instance_duplicated_with_a_new_host
function it_retains_the_original_state_of_the_instance_duplicated_with_a_new_host() { $original_uri = (string) $this->getWrappedObject(); $new_host = $this->withHost("quux.qux"); $this->__toString()->shouldReturn($original_uri); }
php
function it_retains_the_original_state_of_the_instance_duplicated_with_a_new_host() { $original_uri = (string) $this->getWrappedObject(); $new_host = $this->withHost("quux.qux"); $this->__toString()->shouldReturn($original_uri); }
[ "function", "it_retains_the_original_state_of_the_instance_duplicated_with_a_new_host", "(", ")", "{", "$", "original_uri", "=", "(", "string", ")", "$", "this", "->", "getWrappedObject", "(", ")", ";", "$", "new_host", "=", "$", "this", "->", "withHost", "(", "\"...
This method MUST retain the state of the current instance, and return an instance that contains the specified host.
[ "This", "method", "MUST", "retain", "the", "state", "of", "the", "current", "instance", "and", "return", "an", "instance", "that", "contains", "the", "specified", "host", "." ]
e2a294dbcd4c6754063c247be64930c5ee91378f
https://github.com/ddehart/dilmun/blob/e2a294dbcd4c6754063c247be64930c5ee91378f/spec/Anshar/Http/UriSpec.php#L635-L642
2,771
ddehart/dilmun
spec/Anshar/Http/UriSpec.php
UriSpec.it_retains_the_original_state_of_the_instance_duplicated_with_a_new_port
function it_retains_the_original_state_of_the_instance_duplicated_with_a_new_port() { $original_uri = (string) $this->getWrappedObject(); $new_port = $this->withPort(9999); $this->__toString()->shouldReturn($original_uri); }
php
function it_retains_the_original_state_of_the_instance_duplicated_with_a_new_port() { $original_uri = (string) $this->getWrappedObject(); $new_port = $this->withPort(9999); $this->__toString()->shouldReturn($original_uri); }
[ "function", "it_retains_the_original_state_of_the_instance_duplicated_with_a_new_port", "(", ")", "{", "$", "original_uri", "=", "(", "string", ")", "$", "this", "->", "getWrappedObject", "(", ")", ";", "$", "new_port", "=", "$", "this", "->", "withPort", "(", "99...
This method MUST retain the state of the current instance, and return an instance that contains the specified port.
[ "This", "method", "MUST", "retain", "the", "state", "of", "the", "current", "instance", "and", "return", "an", "instance", "that", "contains", "the", "specified", "port", "." ]
e2a294dbcd4c6754063c247be64930c5ee91378f
https://github.com/ddehart/dilmun/blob/e2a294dbcd4c6754063c247be64930c5ee91378f/spec/Anshar/Http/UriSpec.php#L696-L703
2,772
ddehart/dilmun
spec/Anshar/Http/UriSpec.php
UriSpec.it_retains_the_original_state_of_the_instance_duplicated_with_new_path
function it_retains_the_original_state_of_the_instance_duplicated_with_new_path() { $original_uri = (string) $this->getWrappedObject(); $new_path = $this->withPath("/quux/quuz"); $this->__toString()->shouldReturn($original_uri); }
php
function it_retains_the_original_state_of_the_instance_duplicated_with_new_path() { $original_uri = (string) $this->getWrappedObject(); $new_path = $this->withPath("/quux/quuz"); $this->__toString()->shouldReturn($original_uri); }
[ "function", "it_retains_the_original_state_of_the_instance_duplicated_with_new_path", "(", ")", "{", "$", "original_uri", "=", "(", "string", ")", "$", "this", "->", "getWrappedObject", "(", ")", ";", "$", "new_path", "=", "$", "this", "->", "withPath", "(", "\"/q...
This method MUST retain the state of the current instance, and return an instance that contains the specified path.
[ "This", "method", "MUST", "retain", "the", "state", "of", "the", "current", "instance", "and", "return", "an", "instance", "that", "contains", "the", "specified", "path", "." ]
e2a294dbcd4c6754063c247be64930c5ee91378f
https://github.com/ddehart/dilmun/blob/e2a294dbcd4c6754063c247be64930c5ee91378f/spec/Anshar/Http/UriSpec.php#L764-L771
2,773
ddehart/dilmun
spec/Anshar/Http/UriSpec.php
UriSpec.it_retains_the_original_state_of_the_instance_duplicated_with_new_query
function it_retains_the_original_state_of_the_instance_duplicated_with_new_query() { $original_uri = (string) $this->getWrappedObject(); $new_query = $this->withQuery("garply"); $this->__toString()->shouldReturn($original_uri); }
php
function it_retains_the_original_state_of_the_instance_duplicated_with_new_query() { $original_uri = (string) $this->getWrappedObject(); $new_query = $this->withQuery("garply"); $this->__toString()->shouldReturn($original_uri); }
[ "function", "it_retains_the_original_state_of_the_instance_duplicated_with_new_query", "(", ")", "{", "$", "original_uri", "=", "(", "string", ")", "$", "this", "->", "getWrappedObject", "(", ")", ";", "$", "new_query", "=", "$", "this", "->", "withQuery", "(", "\...
This method MUST retain the state of the current instance, and return an instance that contains the specified query string.
[ "This", "method", "MUST", "retain", "the", "state", "of", "the", "current", "instance", "and", "return", "an", "instance", "that", "contains", "the", "specified", "query", "string", "." ]
e2a294dbcd4c6754063c247be64930c5ee91378f
https://github.com/ddehart/dilmun/blob/e2a294dbcd4c6754063c247be64930c5ee91378f/spec/Anshar/Http/UriSpec.php#L868-L875
2,774
nirix/radium
src/Templating/Engines/DelegationEngine.php
DelegationEngine.supports
public function supports($template) { foreach ($this->engines as $engine) { if ($engine->supports($template)) { return true; } } return false; }
php
public function supports($template) { foreach ($this->engines as $engine) { if ($engine->supports($template)) { return true; } } return false; }
[ "public", "function", "supports", "(", "$", "template", ")", "{", "foreach", "(", "$", "this", "->", "engines", "as", "$", "engine", ")", "{", "if", "(", "$", "engine", "->", "supports", "(", "$", "template", ")", ")", "{", "return", "true", ";", "...
Checks if any of the engines can render the template. @param string $template @return bool
[ "Checks", "if", "any", "of", "the", "engines", "can", "render", "the", "template", "." ]
cc6907bfee296b64a7630b0b188e233d7cdb86fd
https://github.com/nirix/radium/blob/cc6907bfee296b64a7630b0b188e233d7cdb86fd/src/Templating/Engines/DelegationEngine.php#L102-L111
2,775
nirix/radium
src/Templating/Engines/DelegationEngine.php
DelegationEngine.exists
public function exists($template) { foreach ($this->engines as $engine) { if ($engine->supports($template)) { return $engine->exists($template); } } return false; }
php
public function exists($template) { foreach ($this->engines as $engine) { if ($engine->supports($template)) { return $engine->exists($template); } } return false; }
[ "public", "function", "exists", "(", "$", "template", ")", "{", "foreach", "(", "$", "this", "->", "engines", "as", "$", "engine", ")", "{", "if", "(", "$", "engine", "->", "supports", "(", "$", "template", ")", ")", "{", "return", "$", "engine", "...
Checks if the template exists. @param string $template @return bool
[ "Checks", "if", "the", "template", "exists", "." ]
cc6907bfee296b64a7630b0b188e233d7cdb86fd
https://github.com/nirix/radium/blob/cc6907bfee296b64a7630b0b188e233d7cdb86fd/src/Templating/Engines/DelegationEngine.php#L120-L129
2,776
Puzzlout/FrameworkMvcLegacy
src/GeneratorEngine/Core/ConstantsClassEngineBase.php
ConstantsClassEngineBase.GenerateConstantsClass
protected function GenerateConstantsClass($files) { if (count($files) > 0) { $classGen = new ConstantsClassGeneratorBase($this->params, $files); $classGen->BuildClass(); return str_replace('\\', '/', "file://" . "APP_ROOT_DIR" . $this->params[BaseClassGenerator::NameSpaceKey]...
php
protected function GenerateConstantsClass($files) { if (count($files) > 0) { $classGen = new ConstantsClassGeneratorBase($this->params, $files); $classGen->BuildClass(); return str_replace('\\', '/', "file://" . "APP_ROOT_DIR" . $this->params[BaseClassGenerator::NameSpaceKey]...
[ "protected", "function", "GenerateConstantsClass", "(", "$", "files", ")", "{", "if", "(", "count", "(", "$", "files", ")", ">", "0", ")", "{", "$", "classGen", "=", "new", "ConstantsClassGeneratorBase", "(", "$", "this", "->", "params", ",", "$", "files...
Generate the Constant Class list the framework. @param assoc array $params the params composed the namespace and name of the class. @param array(of String) $files the list of framework files that will make the list of constants
[ "Generate", "the", "Constant", "Class", "list", "the", "framework", "." ]
14e0fc5b16978cbd209f552ee9c649f66a0dfc6e
https://github.com/Puzzlout/FrameworkMvcLegacy/blob/14e0fc5b16978cbd209f552ee9c649f66a0dfc6e/src/GeneratorEngine/Core/ConstantsClassEngineBase.php#L47-L55
2,777
Puzzlout/FrameworkMvcLegacy
src/GeneratorEngine/Core/ConstantsClassEngineBase.php
ConstantsClassEngineBase.GenerateFrameworkFile
protected function GenerateFrameworkFile($files) { $filePath = $this->GenerateConstantsClass($files); array_push($this->filesGenerated, $filePath); return $filePath; }
php
protected function GenerateFrameworkFile($files) { $filePath = $this->GenerateConstantsClass($files); array_push($this->filesGenerated, $filePath); return $filePath; }
[ "protected", "function", "GenerateFrameworkFile", "(", "$", "files", ")", "{", "$", "filePath", "=", "$", "this", "->", "GenerateConstantsClass", "(", "$", "files", ")", ";", "array_push", "(", "$", "this", "->", "filesGenerated", ",", "$", "filePath", ")", ...
Generate the FrameworkControllers.php class. @param array $files list of filenames
[ "Generate", "the", "FrameworkControllers", ".", "php", "class", "." ]
14e0fc5b16978cbd209f552ee9c649f66a0dfc6e
https://github.com/Puzzlout/FrameworkMvcLegacy/blob/14e0fc5b16978cbd209f552ee9c649f66a0dfc6e/src/GeneratorEngine/Core/ConstantsClassEngineBase.php#L72-L76
2,778
marando/phpSOFA
src/Marando/IAU/iauEform.php
iauEform.Eform
public static function Eform(iauRefEllips $n, &$a, &$f) { /* Look up a and f for the specified reference ellipsoid. */ switch ($n->value) { case WGS84: $a = 6378137.0; $f = 1.0 / 298.257223563; break; case GRS80: $a = 6378137.0; $f = 1.0 / 298.257222101; ...
php
public static function Eform(iauRefEllips $n, &$a, &$f) { /* Look up a and f for the specified reference ellipsoid. */ switch ($n->value) { case WGS84: $a = 6378137.0; $f = 1.0 / 298.257223563; break; case GRS80: $a = 6378137.0; $f = 1.0 / 298.257222101; ...
[ "public", "static", "function", "Eform", "(", "iauRefEllips", "$", "n", ",", "&", "$", "a", ",", "&", "$", "f", ")", "{", "/* Look up a and f for the specified reference ellipsoid. */", "switch", "(", "$", "n", "->", "value", ")", "{", "case", "WGS84", ":", ...
- - - - - - - - - i a u E f o r m - - - - - - - - - Earth reference ellipsoids. This function is part of the International Astronomical Union's SOFA (Standards of Fundamental Astronomy) software collection. Status: canonical. Given: n int ellipsoid identifier (Note 1) Returned: a double equator...
[ "-", "-", "-", "-", "-", "-", "-", "-", "-", "i", "a", "u", "E", "f", "o", "r", "m", "-", "-", "-", "-", "-", "-", "-", "-", "-" ]
757fa49fe335ae1210eaa7735473fd4388b13f07
https://github.com/marando/phpSOFA/blob/757fa49fe335ae1210eaa7735473fd4388b13f07/src/Marando/IAU/iauEform.php#L74-L103
2,779
Subscribo/support
src/Subscribo/Support/Arr.php
Arr.mergeNatural
public static function mergeNatural(array $array1, array $array2) { if (empty($array1)) { return $array2; } $result = $array1; foreach ($array2 as $key => $value) { if (isset($result[$key]) and is_array($result[$key]) and is_array($value)) { $r...
php
public static function mergeNatural(array $array1, array $array2) { if (empty($array1)) { return $array2; } $result = $array1; foreach ($array2 as $key => $value) { if (isset($result[$key]) and is_array($result[$key]) and is_array($value)) { $r...
[ "public", "static", "function", "mergeNatural", "(", "array", "$", "array1", ",", "array", "$", "array2", ")", "{", "if", "(", "empty", "(", "$", "array1", ")", ")", "{", "return", "$", "array2", ";", "}", "$", "result", "=", "$", "array1", ";", "f...
Merges two arrays recursive "naturally" Second array values takes precedence, with exception that its value on particular place is null @param array $array1 @param array $array2 @return array
[ "Merges", "two", "arrays", "recursive", "naturally", "Second", "array", "values", "takes", "precedence", "with", "exception", "that", "its", "value", "on", "particular", "place", "is", "null" ]
eb9265ecdcc2dc04a4ddc9f18bf41d7221ed02df
https://github.com/Subscribo/support/blob/eb9265ecdcc2dc04a4ddc9f18bf41d7221ed02df/src/Subscribo/Support/Arr.php#L19-L33
2,780
Subscribo/support
src/Subscribo/Support/Arr.php
Arr.filterCaseInsensitively
public static function filterCaseInsensitively(array $needles, array $haystack) { $result = array(); $modifiedHaystack = array_change_key_case($haystack, CASE_LOWER); foreach ($needles as $needle) { $modifiedNeedle = strtolower($needle); if (array_key_exists($needle, ...
php
public static function filterCaseInsensitively(array $needles, array $haystack) { $result = array(); $modifiedHaystack = array_change_key_case($haystack, CASE_LOWER); foreach ($needles as $needle) { $modifiedNeedle = strtolower($needle); if (array_key_exists($needle, ...
[ "public", "static", "function", "filterCaseInsensitively", "(", "array", "$", "needles", ",", "array", "$", "haystack", ")", "{", "$", "result", "=", "array", "(", ")", ";", "$", "modifiedHaystack", "=", "array_change_key_case", "(", "$", "haystack", ",", "C...
Filter haystack using values in needles in case insensitive manner if needed Exact match takes precedence, If exact match is not found, then case insensitive comparison is made @param array $needles @param array $haystack @return array
[ "Filter", "haystack", "using", "values", "in", "needles", "in", "case", "insensitive", "manner", "if", "needed" ]
eb9265ecdcc2dc04a4ddc9f18bf41d7221ed02df
https://github.com/Subscribo/support/blob/eb9265ecdcc2dc04a4ddc9f18bf41d7221ed02df/src/Subscribo/Support/Arr.php#L45-L58
2,781
tadcka/Mapper
src/Tadcka/Mapper/Mapping/MappingProvider.php
MappingProvider.getItemBySource
private function getItemBySource(MappingInterface $mapping, $sourceSlug) { if ($sourceSlug === $mapping->getLeftItem()->getSource()->getSlug()) { return $mapping->getLeftItem(); } return $mapping->getRightItem(); }
php
private function getItemBySource(MappingInterface $mapping, $sourceSlug) { if ($sourceSlug === $mapping->getLeftItem()->getSource()->getSlug()) { return $mapping->getLeftItem(); } return $mapping->getRightItem(); }
[ "private", "function", "getItemBySource", "(", "MappingInterface", "$", "mapping", ",", "$", "sourceSlug", ")", "{", "if", "(", "$", "sourceSlug", "===", "$", "mapping", "->", "getLeftItem", "(", ")", "->", "getSource", "(", ")", "->", "getSlug", "(", ")",...
Get item by source. @param MappingInterface $mapping @param string $sourceSlug @return MappingItemInterface
[ "Get", "item", "by", "source", "." ]
6853a2be08dcd35a1013c0a4aba9b71a727ff7da
https://github.com/tadcka/Mapper/blob/6853a2be08dcd35a1013c0a4aba9b71a727ff7da/src/Tadcka/Mapper/Mapping/MappingProvider.php#L96-L103
2,782
tokenly/xcaller-client
src/Tokenly/XcallerClient/Client.php
Client._loadNotificationIntoQueue
public function _loadNotificationIntoQueue($notification_entry) { $this->queue_manager ->connection($this->queue_connection) ->pushRaw(json_encode($notification_entry), $this->queue_name); }
php
public function _loadNotificationIntoQueue($notification_entry) { $this->queue_manager ->connection($this->queue_connection) ->pushRaw(json_encode($notification_entry), $this->queue_name); }
[ "public", "function", "_loadNotificationIntoQueue", "(", "$", "notification_entry", ")", "{", "$", "this", "->", "queue_manager", "->", "connection", "(", "$", "this", "->", "queue_connection", ")", "->", "pushRaw", "(", "json_encode", "(", "$", "notification_entr...
public for testing purposes
[ "public", "for", "testing", "purposes" ]
5205676eff3a3deb99b52d4d54476b7c1d24eea5
https://github.com/tokenly/xcaller-client/blob/5205676eff3a3deb99b52d4d54476b7c1d24eea5/src/Tokenly/XcallerClient/Client.php#L69-L73
2,783
tadcka/Mapper
src/Tadcka/Mapper/Extension/Source/Tree/MapperTreeItem.php
MapperTreeItem.sortChildren
private function sortChildren() { uasort( $this->children, function (MapperTreeItemInterface $first, MapperTreeItemInterface $second) { if ($first->getPriority() >= $second->getPriority()) { return 1; } if ($first->...
php
private function sortChildren() { uasort( $this->children, function (MapperTreeItemInterface $first, MapperTreeItemInterface $second) { if ($first->getPriority() >= $second->getPriority()) { return 1; } if ($first->...
[ "private", "function", "sortChildren", "(", ")", "{", "uasort", "(", "$", "this", "->", "children", ",", "function", "(", "MapperTreeItemInterface", "$", "first", ",", "MapperTreeItemInterface", "$", "second", ")", "{", "if", "(", "$", "first", "->", "getPri...
Sort item children.
[ "Sort", "item", "children", "." ]
6853a2be08dcd35a1013c0a4aba9b71a727ff7da
https://github.com/tadcka/Mapper/blob/6853a2be08dcd35a1013c0a4aba9b71a727ff7da/src/Tadcka/Mapper/Extension/Source/Tree/MapperTreeItem.php#L144-L158
2,784
colorium/arraydot
src/Colorium/Tools/ArrayDot.php
ArrayDot.get
public static function get(array $array, $key, $fallback = null) { $keys = explode('.', $key); foreach($keys as $key) { if(!isset($array[$key])) { return $fallback; } $array = $array[$key]; } return $array; }
php
public static function get(array $array, $key, $fallback = null) { $keys = explode('.', $key); foreach($keys as $key) { if(!isset($array[$key])) { return $fallback; } $array = $array[$key]; } return $array; }
[ "public", "static", "function", "get", "(", "array", "$", "array", ",", "$", "key", ",", "$", "fallback", "=", "null", ")", "{", "$", "keys", "=", "explode", "(", "'.'", ",", "$", "key", ")", ";", "foreach", "(", "$", "keys", "as", "$", "key", ...
Get value from array @param array $array @param string $key @param mixed $fallback @return mixed
[ "Get", "value", "from", "array" ]
0751aba4e1e1993bc276b842696ef77e5dca2ec4
https://github.com/colorium/arraydot/blob/0751aba4e1e1993bc276b842696ef77e5dca2ec4/src/Colorium/Tools/ArrayDot.php#L155-L166
2,785
colorium/arraydot
src/Colorium/Tools/ArrayDot.php
ArrayDot.pop
public static function pop(array $array, $key) { $keys = explode('.', $key); foreach($keys as $key) { if(!isset($array[$key])) { return null; } $array = $array[$key]; } if(!is_array($array)) { return null; } ...
php
public static function pop(array $array, $key) { $keys = explode('.', $key); foreach($keys as $key) { if(!isset($array[$key])) { return null; } $array = $array[$key]; } if(!is_array($array)) { return null; } ...
[ "public", "static", "function", "pop", "(", "array", "$", "array", ",", "$", "key", ")", "{", "$", "keys", "=", "explode", "(", "'.'", ",", "$", "key", ")", ";", "foreach", "(", "$", "keys", "as", "$", "key", ")", "{", "if", "(", "!", "isset", ...
Pop value from sub-array @param array $array @param string $key @return mixed
[ "Pop", "value", "from", "sub", "-", "array" ]
0751aba4e1e1993bc276b842696ef77e5dca2ec4
https://github.com/colorium/arraydot/blob/0751aba4e1e1993bc276b842696ef77e5dca2ec4/src/Colorium/Tools/ArrayDot.php#L176-L191
2,786
colorium/arraydot
src/Colorium/Tools/ArrayDot.php
ArrayDot.set
public static function set(array &$array, $key, $value) { $keys = explode('.', $key); foreach($keys as $key) { if(!isset($array[$key])) { $array[$key] = []; } $array = &$array[$key]; } $array = $value; }
php
public static function set(array &$array, $key, $value) { $keys = explode('.', $key); foreach($keys as $key) { if(!isset($array[$key])) { $array[$key] = []; } $array = &$array[$key]; } $array = $value; }
[ "public", "static", "function", "set", "(", "array", "&", "$", "array", ",", "$", "key", ",", "$", "value", ")", "{", "$", "keys", "=", "explode", "(", "'.'", ",", "$", "key", ")", ";", "foreach", "(", "$", "keys", "as", "$", "key", ")", "{", ...
Set value in array @param array $array @param string $key @param $value
[ "Set", "value", "in", "array" ]
0751aba4e1e1993bc276b842696ef77e5dca2ec4
https://github.com/colorium/arraydot/blob/0751aba4e1e1993bc276b842696ef77e5dca2ec4/src/Colorium/Tools/ArrayDot.php#L201-L212
2,787
colorium/arraydot
src/Colorium/Tools/ArrayDot.php
ArrayDot.push
public static function push(array &$array, $key, $value) { $keys = explode('.', $key); foreach($keys as $key) { if(!isset($array[$key])) { $array[$key] = []; } $array = &$array[$key]; } if(!is_array($array)) { $array = ...
php
public static function push(array &$array, $key, $value) { $keys = explode('.', $key); foreach($keys as $key) { if(!isset($array[$key])) { $array[$key] = []; } $array = &$array[$key]; } if(!is_array($array)) { $array = ...
[ "public", "static", "function", "push", "(", "array", "&", "$", "array", ",", "$", "key", ",", "$", "value", ")", "{", "$", "keys", "=", "explode", "(", "'.'", ",", "$", "key", ")", ";", "foreach", "(", "$", "keys", "as", "$", "key", ")", "{", ...
Push value in sub-array @param array $array @param string $key @param $value
[ "Push", "value", "in", "sub", "-", "array" ]
0751aba4e1e1993bc276b842696ef77e5dca2ec4
https://github.com/colorium/arraydot/blob/0751aba4e1e1993bc276b842696ef77e5dca2ec4/src/Colorium/Tools/ArrayDot.php#L222-L237
2,788
colorium/arraydot
src/Colorium/Tools/ArrayDot.php
ArrayDot.drop
public static function drop(array &$array, $key) { $keys = explode('.', $key); $last = array_pop($keys); foreach($keys as $key) { if(!isset($array[$key])) { return false; } $array = &$array[$key]; } if(isset($array[$last]))...
php
public static function drop(array &$array, $key) { $keys = explode('.', $key); $last = array_pop($keys); foreach($keys as $key) { if(!isset($array[$key])) { return false; } $array = &$array[$key]; } if(isset($array[$last]))...
[ "public", "static", "function", "drop", "(", "array", "&", "$", "array", ",", "$", "key", ")", "{", "$", "keys", "=", "explode", "(", "'.'", ",", "$", "key", ")", ";", "$", "last", "=", "array_pop", "(", "$", "keys", ")", ";", "foreach", "(", "...
Delete key in array @param array $array @param string $key @return bool
[ "Delete", "key", "in", "array" ]
0751aba4e1e1993bc276b842696ef77e5dca2ec4
https://github.com/colorium/arraydot/blob/0751aba4e1e1993bc276b842696ef77e5dca2ec4/src/Colorium/Tools/ArrayDot.php#L247-L264
2,789
psychoticmeow/nbsp-peek
src/nbsp/Peek/Utilities/QueryableAbstract.php
QueryableAbstract.query
public function query($query_string, Closure $callback) { $query = $this->getQuery($query_string); $query->execute($this, $callback); }
php
public function query($query_string, Closure $callback) { $query = $this->getQuery($query_string); $query->execute($this, $callback); }
[ "public", "function", "query", "(", "$", "query_string", ",", "Closure", "$", "callback", ")", "{", "$", "query", "=", "$", "this", "->", "getQuery", "(", "$", "query_string", ")", ";", "$", "query", "->", "execute", "(", "$", "this", ",", "$", "call...
Execute a query using a closure to capture the results. @param string $query_string @param Closure $callback Called with two parameters, `$name` and `$value`.
[ "Execute", "a", "query", "using", "a", "closure", "to", "capture", "the", "results", "." ]
2cb4cb2e4047ae9fa49cdf4d8d4a3a12488fe8fd
https://github.com/psychoticmeow/nbsp-peek/blob/2cb4cb2e4047ae9fa49cdf4d8d4a3a12488fe8fd/src/nbsp/Peek/Utilities/QueryableAbstract.php#L24-L27
2,790
liip/LiipDrupalRegistryModule
src/Liip/Drupal/Modules/Registry/Database/MySql.php
MySql.register
public function register($identifier, $value) { parent::register($identifier, $value); $sql = sprintf( 'INSERT INTO %s (`entityId`, `data`) set (`%s`, `%s`);', $this->mysql->quote($this->section), $this->mysql->quote($identifier), $this->decorator->no...
php
public function register($identifier, $value) { parent::register($identifier, $value); $sql = sprintf( 'INSERT INTO %s (`entityId`, `data`) set (`%s`, `%s`);', $this->mysql->quote($this->section), $this->mysql->quote($identifier), $this->decorator->no...
[ "public", "function", "register", "(", "$", "identifier", ",", "$", "value", ")", "{", "parent", "::", "register", "(", "$", "identifier", ",", "$", "value", ")", ";", "$", "sql", "=", "sprintf", "(", "'INSERT INTO %s (`entityId`, `data`) set (`%s`, `%s`);'", ...
Registers the provided value. @param string $identifier @param string $value
[ "Registers", "the", "provided", "value", "." ]
2d860c1f88ef91d9af91909d8711ffbb6e2a1eab
https://github.com/liip/LiipDrupalRegistryModule/blob/2d860c1f88ef91d9af91909d8711ffbb6e2a1eab/src/Liip/Drupal/Modules/Registry/Database/MySql.php#L44-L65
2,791
liip/LiipDrupalRegistryModule
src/Liip/Drupal/Modules/Registry/Database/MySql.php
MySql.getContentById
public function getContentById($identifier, $default = null) { if (empty($this->registry[$this->section][$identifier])) { $this->registry[$this->section][$identifier] = $this->getContentByIds(array($identifier)); if (empty($this->registry[$this->section][$identifier])) { ...
php
public function getContentById($identifier, $default = null) { if (empty($this->registry[$this->section][$identifier])) { $this->registry[$this->section][$identifier] = $this->getContentByIds(array($identifier)); if (empty($this->registry[$this->section][$identifier])) { ...
[ "public", "function", "getContentById", "(", "$", "identifier", ",", "$", "default", "=", "null", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "registry", "[", "$", "this", "->", "section", "]", "[", "$", "identifier", "]", ")", ")", "{", ...
Provides the registry content identified by its ID. @param string $identifier @param null $default @throws \Liip\Drupal\Modules\Registry\RegistryException @return array
[ "Provides", "the", "registry", "content", "identified", "by", "its", "ID", "." ]
2d860c1f88ef91d9af91909d8711ffbb6e2a1eab
https://github.com/liip/LiipDrupalRegistryModule/blob/2d860c1f88ef91d9af91909d8711ffbb6e2a1eab/src/Liip/Drupal/Modules/Registry/Database/MySql.php#L111-L123
2,792
liip/LiipDrupalRegistryModule
src/Liip/Drupal/Modules/Registry/Database/MySql.php
MySql.getContentByIds
public function getContentByIds(array $identifiers) { $sql = sprintf( 'SELECT * FROM %s WHERE entityId IN (`%s`);', $this->mysql->quote($this->section), implode('`,`', $identifiers) ); $result = $this->mysql->query($sql); if (false === $result) { ...
php
public function getContentByIds(array $identifiers) { $sql = sprintf( 'SELECT * FROM %s WHERE entityId IN (`%s`);', $this->mysql->quote($this->section), implode('`,`', $identifiers) ); $result = $this->mysql->query($sql); if (false === $result) { ...
[ "public", "function", "getContentByIds", "(", "array", "$", "identifiers", ")", "{", "$", "sql", "=", "sprintf", "(", "'SELECT * FROM %s WHERE entityId IN (`%s`);'", ",", "$", "this", "->", "mysql", "->", "quote", "(", "$", "this", "->", "section", ")", ",", ...
Provides a set of registry items. @param array $identifiers @throws \Liip\Drupal\Modules\Registry\RegistryException @return array
[ "Provides", "a", "set", "of", "registry", "items", "." ]
2d860c1f88ef91d9af91909d8711ffbb6e2a1eab
https://github.com/liip/LiipDrupalRegistryModule/blob/2d860c1f88ef91d9af91909d8711ffbb6e2a1eab/src/Liip/Drupal/Modules/Registry/Database/MySql.php#L133-L154
2,793
liip/LiipDrupalRegistryModule
src/Liip/Drupal/Modules/Registry/Database/MySql.php
MySql.replace
public function replace($identifier, $value) { // store current data to be able to restore on error; $oldValue = @$this->registry[$this->section][$identifier]; parent::replace($identifier, $value); $sql = sprintf( 'UPDATE %s SET `data`=`%s` WHERE `entityId`=`%s`;', ...
php
public function replace($identifier, $value) { // store current data to be able to restore on error; $oldValue = @$this->registry[$this->section][$identifier]; parent::replace($identifier, $value); $sql = sprintf( 'UPDATE %s SET `data`=`%s` WHERE `entityId`=`%s`;', ...
[ "public", "function", "replace", "(", "$", "identifier", ",", "$", "value", ")", "{", "// store current data to be able to restore on error;", "$", "oldValue", "=", "@", "$", "this", "->", "registry", "[", "$", "this", "->", "section", "]", "[", "$", "identifi...
Replaces the identified entity with the provided one. @param string $identifier @param mixed $value
[ "Replaces", "the", "identified", "entity", "with", "the", "provided", "one", "." ]
2d860c1f88ef91d9af91909d8711ffbb6e2a1eab
https://github.com/liip/LiipDrupalRegistryModule/blob/2d860c1f88ef91d9af91909d8711ffbb6e2a1eab/src/Liip/Drupal/Modules/Registry/Database/MySql.php#L162-L187
2,794
liip/LiipDrupalRegistryModule
src/Liip/Drupal/Modules/Registry/Database/MySql.php
MySql.destroy
public function destroy() { // delete DB $sql = sprintf( 'DROP TABLE `%s`;', $this->mysql->quote($this->section) ); if (false === $this->mysql->exec($sql)) { $this->throwException( 'Unable to delete the database: ', ...
php
public function destroy() { // delete DB $sql = sprintf( 'DROP TABLE `%s`;', $this->mysql->quote($this->section) ); if (false === $this->mysql->exec($sql)) { $this->throwException( 'Unable to delete the database: ', ...
[ "public", "function", "destroy", "(", ")", "{", "// delete DB", "$", "sql", "=", "sprintf", "(", "'DROP TABLE `%s`;'", ",", "$", "this", "->", "mysql", "->", "quote", "(", "$", "this", "->", "section", ")", ")", ";", "if", "(", "false", "===", "$", "...
Shall delete the current registry from the database. @throws RegistryException in case the deletion of the database failed.
[ "Shall", "delete", "the", "current", "registry", "from", "the", "database", "." ]
2d860c1f88ef91d9af91909d8711ffbb6e2a1eab
https://github.com/liip/LiipDrupalRegistryModule/blob/2d860c1f88ef91d9af91909d8711ffbb6e2a1eab/src/Liip/Drupal/Modules/Registry/Database/MySql.php#L223-L240
2,795
liip/LiipDrupalRegistryModule
src/Liip/Drupal/Modules/Registry/Database/MySql.php
MySql.init
public function init() { $this->registryTableExists(); if (empty($this->registry[$this->section])) { $this->registry[$this->section] = $this->getContent(); } return $this->registry[$this->section]; }
php
public function init() { $this->registryTableExists(); if (empty($this->registry[$this->section])) { $this->registry[$this->section] = $this->getContent(); } return $this->registry[$this->section]; }
[ "public", "function", "init", "(", ")", "{", "$", "this", "->", "registryTableExists", "(", ")", ";", "if", "(", "empty", "(", "$", "this", "->", "registry", "[", "$", "this", "->", "section", "]", ")", ")", "{", "$", "this", "->", "registry", "[",...
Shall register a new section in the registry @return array
[ "Shall", "register", "a", "new", "section", "in", "the", "registry" ]
2d860c1f88ef91d9af91909d8711ffbb6e2a1eab
https://github.com/liip/LiipDrupalRegistryModule/blob/2d860c1f88ef91d9af91909d8711ffbb6e2a1eab/src/Liip/Drupal/Modules/Registry/Database/MySql.php#L246-L256
2,796
liip/LiipDrupalRegistryModule
src/Liip/Drupal/Modules/Registry/Database/MySql.php
MySql.registryTableExists
protected function registryTableExists() { $sql = sprintf( 'SHOW CREATE TABLE `%s`;', $this->mysql->quote($this->section) ); if (false === $this->mysql->query($sql)) { $this->throwException( 'The registry table does not exists: ', ...
php
protected function registryTableExists() { $sql = sprintf( 'SHOW CREATE TABLE `%s`;', $this->mysql->quote($this->section) ); if (false === $this->mysql->query($sql)) { $this->throwException( 'The registry table does not exists: ', ...
[ "protected", "function", "registryTableExists", "(", ")", "{", "$", "sql", "=", "sprintf", "(", "'SHOW CREATE TABLE `%s`;'", ",", "$", "this", "->", "mysql", "->", "quote", "(", "$", "this", "->", "section", ")", ")", ";", "if", "(", "false", "===", "$",...
Validates that the registry table exists. @throws \Liip\Drupal\Modules\Registry\RegistryException
[ "Validates", "that", "the", "registry", "table", "exists", "." ]
2d860c1f88ef91d9af91909d8711ffbb6e2a1eab
https://github.com/liip/LiipDrupalRegistryModule/blob/2d860c1f88ef91d9af91909d8711ffbb6e2a1eab/src/Liip/Drupal/Modules/Registry/Database/MySql.php#L262-L276
2,797
liip/LiipDrupalRegistryModule
src/Liip/Drupal/Modules/Registry/Database/MySql.php
MySql.getContent
public function getContent($limit = 0) { $this->registry[$this->section] = parent::getContent(); if (empty($this->registry[$this->section])) { $sql = sprintf('SELECT * FROM `%s`;', $this->mysql->quote($this->section)); $result = $this->mysql->query($sql); if (f...
php
public function getContent($limit = 0) { $this->registry[$this->section] = parent::getContent(); if (empty($this->registry[$this->section])) { $sql = sprintf('SELECT * FROM `%s`;', $this->mysql->quote($this->section)); $result = $this->mysql->query($sql); if (f...
[ "public", "function", "getContent", "(", "$", "limit", "=", "0", ")", "{", "$", "this", "->", "registry", "[", "$", "this", "->", "section", "]", "=", "parent", "::", "getContent", "(", ")", ";", "if", "(", "empty", "(", "$", "this", "->", "registr...
Provides the current content of the registry. NOTICE: Setting $limit to anything else than 0 (zero) currently not have any affect on the amount of returned results. This functionality is due to be implemented. @param integer $limit Amount of documents to be returned in result set. If set to 0 (zero) all documents ...
[ "Provides", "the", "current", "content", "of", "the", "registry", "." ]
2d860c1f88ef91d9af91909d8711ffbb6e2a1eab
https://github.com/liip/LiipDrupalRegistryModule/blob/2d860c1f88ef91d9af91909d8711ffbb6e2a1eab/src/Liip/Drupal/Modules/Registry/Database/MySql.php#L292-L313
2,798
liip/LiipDrupalRegistryModule
src/Liip/Drupal/Modules/Registry/Database/MySql.php
MySql.processResult
protected function processResult(array $results) { foreach ($results as $key => $entity) { if (!empty($entity['data'])) { $entity['data'] = $this->decorator->denormalizeValue($entity['data']); $results[$key] = $entity; } } return $re...
php
protected function processResult(array $results) { foreach ($results as $key => $entity) { if (!empty($entity['data'])) { $entity['data'] = $this->decorator->denormalizeValue($entity['data']); $results[$key] = $entity; } } return $re...
[ "protected", "function", "processResult", "(", "array", "$", "results", ")", "{", "foreach", "(", "$", "results", "as", "$", "key", "=>", "$", "entity", ")", "{", "if", "(", "!", "empty", "(", "$", "entity", "[", "'data'", "]", ")", ")", "{", "$", ...
Processes the results to return a denormalized entity set. @param array $results @return array
[ "Processes", "the", "results", "to", "return", "a", "denormalized", "entity", "set", "." ]
2d860c1f88ef91d9af91909d8711ffbb6e2a1eab
https://github.com/liip/LiipDrupalRegistryModule/blob/2d860c1f88ef91d9af91909d8711ffbb6e2a1eab/src/Liip/Drupal/Modules/Registry/Database/MySql.php#L322-L334
2,799
firstcomputer/seeme
src/Assertion.php
Assertion.allInRangeOrAll
public static function allInRangeOrAll($value, $minValue, $maxValue) { if (is_array($value)) { static::allRange($value, $minValue, $maxValue); return; } static::eq($value, 'all'); }
php
public static function allInRangeOrAll($value, $minValue, $maxValue) { if (is_array($value)) { static::allRange($value, $minValue, $maxValue); return; } static::eq($value, 'all'); }
[ "public", "static", "function", "allInRangeOrAll", "(", "$", "value", ",", "$", "minValue", ",", "$", "maxValue", ")", "{", "if", "(", "is_array", "(", "$", "value", ")", ")", "{", "static", "::", "allRange", "(", "$", "value", ",", "$", "minValue", ...
Assert that value is a range of numbers or the string 'all' @param mixed $value @param integer $minValue @param integer $maxValue @throws Assert\AssertionFailedException
[ "Assert", "that", "value", "is", "a", "range", "of", "numbers", "or", "the", "string", "all" ]
09954a110e44afe34bb03c87d2a7cbf0a3be86b3
https://github.com/firstcomputer/seeme/blob/09954a110e44afe34bb03c87d2a7cbf0a3be86b3/src/Assertion.php#L51-L60