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
198,200
Vectrex/vxPHP
src/Debug/ExceptionHandler.php
ExceptionHandler.decorateException
protected function decorateException(\Exception $e, $status) { $headerTpl = ' <!DOCTYPE html> <html> <head> <title>Error %d</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body> <table> <tr> <th colspan="4">%s</th> </tr> <tr> <t...
php
protected function decorateException(\Exception $e, $status) { $headerTpl = ' <!DOCTYPE html> <html> <head> <title>Error %d</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body> <table> <tr> <th colspan="4">%s</th> </tr> <tr> <t...
[ "protected", "function", "decorateException", "(", "\\", "Exception", "$", "e", ",", "$", "status", ")", "{", "$", "headerTpl", "=", "'\n\t\t<!DOCTYPE html>\n\t\t<html>\n\t\t\t<head>\n\t\t\t\t<title>Error %d</title>\n\t\t\t\t<meta http-equiv=\"content-type\" content=\"text/html; char...
generate simple formatted output of exception @param \Exception $e @param integer $status @return string
[ "generate", "simple", "formatted", "output", "of", "exception" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Debug/ExceptionHandler.php#L136-L186
198,201
Aviogram/Common
src/PHPClass/Element/DocBlock.php
DocBlock.createParamTag
public function createParamTag($type, $name, $description = null) { return $this->createVariableTag('param', $type, $name, $description); }
php
public function createParamTag($type, $name, $description = null) { return $this->createVariableTag('param', $type, $name, $description); }
[ "public", "function", "createParamTag", "(", "$", "type", ",", "$", "name", ",", "$", "description", "=", "null", ")", "{", "return", "$", "this", "->", "createVariableTag", "(", "'param'", ",", "$", "type", ",", "$", "name", ",", "$", "description", "...
Create a param tag for describing method arguments @param string $type The type of the argument (See FileClass::PHP_TYPE_*) or use class name @param string $name The name of the parameters (method argument) @param null|string $description The description with the argument @return DocBlock ...
[ "Create", "a", "param", "tag", "for", "describing", "method", "arguments" ]
bcff2e409cccd4791a3f9bca0b2cdd70c25ddec5
https://github.com/Aviogram/Common/blob/bcff2e409cccd4791a3f9bca0b2cdd70c25ddec5/src/PHPClass/Element/DocBlock.php#L258-L261
198,202
Aviogram/Common
src/PHPClass/Element/DocBlock.php
DocBlock.createPropertyTag
public function createPropertyTag($type, $name, $description = null) { return $this->createVariableTag('property', $type, $name, $description); }
php
public function createPropertyTag($type, $name, $description = null) { return $this->createVariableTag('property', $type, $name, $description); }
[ "public", "function", "createPropertyTag", "(", "$", "type", ",", "$", "name", ",", "$", "description", "=", "null", ")", "{", "return", "$", "this", "->", "createVariableTag", "(", "'property'", ",", "$", "type", ",", "$", "name", ",", "$", "description...
Create a property tag for describing class properties @param string $type The type of the property (See FileClass::PHP_TYPE_*) or use class name @param string $name The name of the property @param null|string $description The description with the property @return DocBlock @throws \Aviogram...
[ "Create", "a", "property", "tag", "for", "describing", "class", "properties" ]
bcff2e409cccd4791a3f9bca0b2cdd70c25ddec5
https://github.com/Aviogram/Common/blob/bcff2e409cccd4791a3f9bca0b2cdd70c25ddec5/src/PHPClass/Element/DocBlock.php#L274-L277
198,203
Aviogram/Common
src/PHPClass/Element/DocBlock.php
DocBlock.createReturnTag
public function createReturnTag($type, $description = null) { return $this->internalCreateTag(true, 'return', $this->classFile->getType($type), $description); }
php
public function createReturnTag($type, $description = null) { return $this->internalCreateTag(true, 'return', $this->classFile->getType($type), $description); }
[ "public", "function", "createReturnTag", "(", "$", "type", ",", "$", "description", "=", "null", ")", "{", "return", "$", "this", "->", "internalCreateTag", "(", "true", ",", "'return'", ",", "$", "this", "->", "classFile", "->", "getType", "(", "$", "ty...
Define the return type of a method @param string $type @param null|string $description @return DocBlock @throws \Aviogram\Common\PHPClass\Exception\ClassFile When the type does not exists or the class does not exists
[ "Define", "the", "return", "type", "of", "a", "method" ]
bcff2e409cccd4791a3f9bca0b2cdd70c25ddec5
https://github.com/Aviogram/Common/blob/bcff2e409cccd4791a3f9bca0b2cdd70c25ddec5/src/PHPClass/Element/DocBlock.php#L321-L324
198,204
Aviogram/Common
src/PHPClass/Element/DocBlock.php
DocBlock.createThrowsTag
public function createThrowsTag($exceptionClass, $description = null) { return $this->internalCreateTag(false, 'throws', $this->classFile->getType($exceptionClass), $description); }
php
public function createThrowsTag($exceptionClass, $description = null) { return $this->internalCreateTag(false, 'throws', $this->classFile->getType($exceptionClass), $description); }
[ "public", "function", "createThrowsTag", "(", "$", "exceptionClass", ",", "$", "description", "=", "null", ")", "{", "return", "$", "this", "->", "internalCreateTag", "(", "false", ",", "'throws'", ",", "$", "this", "->", "classFile", "->", "getType", "(", ...
Indicates if the element throws partical exceptions @param string $exceptionClass The classname of the exception @param null|string $description @return DocBlock @throws \Aviogram\Common\PHPClass\Exception\ClassFile When the class does not exists
[ "Indicates", "if", "the", "element", "throws", "partical", "exceptions" ]
bcff2e409cccd4791a3f9bca0b2cdd70c25ddec5
https://github.com/Aviogram/Common/blob/bcff2e409cccd4791a3f9bca0b2cdd70c25ddec5/src/PHPClass/Element/DocBlock.php#L361-L364
198,205
Aviogram/Common
src/PHPClass/Element/DocBlock.php
DocBlock.createVarTag
public function createVarTag($type, $name, $description = null) { return $this->createVariableTag('var', $type, $name, $description); }
php
public function createVarTag($type, $name, $description = null) { return $this->createVariableTag('var', $type, $name, $description); }
[ "public", "function", "createVarTag", "(", "$", "type", ",", "$", "name", ",", "$", "description", "=", "null", ")", "{", "return", "$", "this", "->", "createVariableTag", "(", "'var'", ",", "$", "type", ",", "$", "name", ",", "$", "description", ")", ...
Create a var tag for describing class properties @param string $type The type of the property (See FileClass::PHP_TYPE_*) or use class name @param string $name The name of the property @param null|string $description The description with the property @return DocBlock @throws \Aviogram\Comm...
[ "Create", "a", "var", "tag", "for", "describing", "class", "properties" ]
bcff2e409cccd4791a3f9bca0b2cdd70c25ddec5
https://github.com/Aviogram/Common/blob/bcff2e409cccd4791a3f9bca0b2cdd70c25ddec5/src/PHPClass/Element/DocBlock.php#L402-L405
198,206
Aviogram/Common
src/PHPClass/Element/DocBlock.php
DocBlock.internalCreateTag
protected function internalCreateTag($single = true, $name, $column1 = null, $column2 = null, $_ = null) { // Create constructor arguments $arguments = func_get_args(); $single = array_shift($arguments); array_unshift($arguments, $this->maxColumnLengths); // Remove null ...
php
protected function internalCreateTag($single = true, $name, $column1 = null, $column2 = null, $_ = null) { // Create constructor arguments $arguments = func_get_args(); $single = array_shift($arguments); array_unshift($arguments, $this->maxColumnLengths); // Remove null ...
[ "protected", "function", "internalCreateTag", "(", "$", "single", "=", "true", ",", "$", "name", ",", "$", "column1", "=", "null", ",", "$", "column2", "=", "null", ",", "$", "_", "=", "null", ")", "{", "// Create constructor arguments", "$", "arguments", ...
Create tag with the given values @param boolean $single Whether there can be one instance of the tag or not @param string $name @param null|string $column1 @param null|string $column2 @param null|string $_ @return DocBlock
[ "Create", "tag", "with", "the", "given", "values" ]
bcff2e409cccd4791a3f9bca0b2cdd70c25ddec5
https://github.com/Aviogram/Common/blob/bcff2e409cccd4791a3f9bca0b2cdd70c25ddec5/src/PHPClass/Element/DocBlock.php#L470-L496
198,207
story75/MultiEventDispatcher
src/EventDispatcherImpl.php
EventDispatcherImpl.addSubscriber
public function addSubscriber(EventSubscriber $eventSubscriber) { $listeners = $eventSubscriber->getEvents(); foreach($listeners as $listener => $data) { if (is_array($data)) { $data = new SubscriberConfiguration($data[0], $data[1] ?? self::USE_ALL, $data[2] ?? 1...
php
public function addSubscriber(EventSubscriber $eventSubscriber) { $listeners = $eventSubscriber->getEvents(); foreach($listeners as $listener => $data) { if (is_array($data)) { $data = new SubscriberConfiguration($data[0], $data[1] ?? self::USE_ALL, $data[2] ?? 1...
[ "public", "function", "addSubscriber", "(", "EventSubscriber", "$", "eventSubscriber", ")", "{", "$", "listeners", "=", "$", "eventSubscriber", "->", "getEvents", "(", ")", ";", "foreach", "(", "$", "listeners", "as", "$", "listener", "=>", "$", "data", ")",...
Adds an event subscriber that listens on the specified events. Internally this will convert all handlers to listeners. @param EventSubscriber $eventSubscriber The subscriber @throws \InvalidArgumentException @api
[ "Adds", "an", "event", "subscriber", "that", "listens", "on", "the", "specified", "events", ".", "Internally", "this", "will", "convert", "all", "handlers", "to", "listeners", "." ]
02d6821dbb4a1d05a356b97befb9e286e7c5fd19
https://github.com/story75/MultiEventDispatcher/blob/02d6821dbb4a1d05a356b97befb9e286e7c5fd19/src/EventDispatcherImpl.php#L159-L187
198,208
story75/MultiEventDispatcher
src/EventDispatcherImpl.php
EventDispatcherImpl.getListeners
public function getListeners(string ...$eventNames) : array { if (empty($eventNames)) return []; $key = implode('|', $eventNames); return $this->combinationListeners[$key] ?? []; }
php
public function getListeners(string ...$eventNames) : array { if (empty($eventNames)) return []; $key = implode('|', $eventNames); return $this->combinationListeners[$key] ?? []; }
[ "public", "function", "getListeners", "(", "string", "...", "$", "eventNames", ")", ":", "array", "{", "if", "(", "empty", "(", "$", "eventNames", ")", ")", "return", "[", "]", ";", "$", "key", "=", "implode", "(", "'|'", ",", "$", "eventNames", ")",...
Gets the listeners of a specific event @param string[] $eventNames The name of the events @return array The event listeners for the specified event combination
[ "Gets", "the", "listeners", "of", "a", "specific", "event" ]
02d6821dbb4a1d05a356b97befb9e286e7c5fd19
https://github.com/story75/MultiEventDispatcher/blob/02d6821dbb4a1d05a356b97befb9e286e7c5fd19/src/EventDispatcherImpl.php#L197-L203
198,209
johnkrovitch/Sam
Filter/Filter.php
Filter.clean
public function clean() { $fileSystem = new Filesystem(); if ($fileSystem->exists($this->getCacheDir())) { $fileSystem->remove($this->getCacheDir()); } }
php
public function clean() { $fileSystem = new Filesystem(); if ($fileSystem->exists($this->getCacheDir())) { $fileSystem->remove($this->getCacheDir()); } }
[ "public", "function", "clean", "(", ")", "{", "$", "fileSystem", "=", "new", "Filesystem", "(", ")", ";", "if", "(", "$", "fileSystem", "->", "exists", "(", "$", "this", "->", "getCacheDir", "(", ")", ")", ")", "{", "$", "fileSystem", "->", "remove",...
Remove the assets cache directory.
[ "Remove", "the", "assets", "cache", "directory", "." ]
fbd3770c11eecc0a6d8070f439f149062316f606
https://github.com/johnkrovitch/Sam/blob/fbd3770c11eecc0a6d8070f439f149062316f606/Filter/Filter.php#L73-L80
198,210
johnkrovitch/Sam
Filter/Filter.php
Filter.getCacheDir
public function getCacheDir() { $fileSystem = new Filesystem(); $path = 'var/cache/assets/'.$this->name.'/'; if (!$fileSystem->exists($path)) { $fileSystem->mkdir($path); } return $path; }
php
public function getCacheDir() { $fileSystem = new Filesystem(); $path = 'var/cache/assets/'.$this->name.'/'; if (!$fileSystem->exists($path)) { $fileSystem->mkdir($path); } return $path; }
[ "public", "function", "getCacheDir", "(", ")", "{", "$", "fileSystem", "=", "new", "Filesystem", "(", ")", ";", "$", "path", "=", "'var/cache/assets/'", ".", "$", "this", "->", "name", ".", "'/'", ";", "if", "(", "!", "$", "fileSystem", "->", "exists",...
Return the assets cache dir. @return string
[ "Return", "the", "assets", "cache", "dir", "." ]
fbd3770c11eecc0a6d8070f439f149062316f606
https://github.com/johnkrovitch/Sam/blob/fbd3770c11eecc0a6d8070f439f149062316f606/Filter/Filter.php#L87-L97
198,211
johnkrovitch/Sam
Filter/Filter.php
Filter.addNotification
protected function addNotification($message) { $event = new NotificationEvent(); $event->setMessage($message); $this ->eventDispatcher ->dispatch(NotificationEvent::NAME, $event) ; }
php
protected function addNotification($message) { $event = new NotificationEvent(); $event->setMessage($message); $this ->eventDispatcher ->dispatch(NotificationEvent::NAME, $event) ; }
[ "protected", "function", "addNotification", "(", "$", "message", ")", "{", "$", "event", "=", "new", "NotificationEvent", "(", ")", ";", "$", "event", "->", "setMessage", "(", "$", "message", ")", ";", "$", "this", "->", "eventDispatcher", "->", "dispatch"...
Add a notification to the subscriber. @param $message
[ "Add", "a", "notification", "to", "the", "subscriber", "." ]
fbd3770c11eecc0a6d8070f439f149062316f606
https://github.com/johnkrovitch/Sam/blob/fbd3770c11eecc0a6d8070f439f149062316f606/Filter/Filter.php#L129-L138
198,212
OxfordInfoLabs/kinikit-core
src/Util/Serialisation/JSON/JSONToObjectConverter.php
JSONToObjectConverter.convert
public function convert($jsonString, $mapToClass = null) { // Decode the string using PHP JSON Decode routine $converted = json_decode($jsonString, true); if ($mapToClass) { $converted = SerialisableArrayUtils::convertArrayToSerialisableObjects($converted, $mapToClass); } ...
php
public function convert($jsonString, $mapToClass = null) { // Decode the string using PHP JSON Decode routine $converted = json_decode($jsonString, true); if ($mapToClass) { $converted = SerialisableArrayUtils::convertArrayToSerialisableObjects($converted, $mapToClass); } ...
[ "public", "function", "convert", "(", "$", "jsonString", ",", "$", "mapToClass", "=", "null", ")", "{", "// Decode the string using PHP JSON Decode routine", "$", "converted", "=", "json_decode", "(", "$", "jsonString", ",", "true", ")", ";", "if", "(", "$", "...
Convert a json string into objects. If the mapToClass member is passed the converter will attempt to map the result to an instance of that class type or array. @param string $jsonString @param string $mapToClass
[ "Convert", "a", "json", "string", "into", "objects", ".", "If", "the", "mapToClass", "member", "is", "passed", "the", "converter", "will", "attempt", "to", "map", "the", "result", "to", "an", "instance", "of", "that", "class", "type", "or", "array", "." ]
edc1b2e6ffabd595c4c7d322279b3dd1e59ef359
https://github.com/OxfordInfoLabs/kinikit-core/blob/edc1b2e6ffabd595c4c7d322279b3dd1e59ef359/src/Util/Serialisation/JSON/JSONToObjectConverter.php#L20-L31
198,213
flaviovs/yii2-imagefilter
src/Component.php
Component.getToken
protected function getToken($src) { $full_path = \Yii::getAlias('@webroot') . "/$src"; try { $token = hash('crc32b', '$full_path ' . filemtime($full_path)); } catch (\Exception $ex) { \Yii::error($ex); return null; } catch (\Throwable $ex) { ...
php
protected function getToken($src) { $full_path = \Yii::getAlias('@webroot') . "/$src"; try { $token = hash('crc32b', '$full_path ' . filemtime($full_path)); } catch (\Exception $ex) { \Yii::error($ex); return null; } catch (\Throwable $ex) { ...
[ "protected", "function", "getToken", "(", "$", "src", ")", "{", "$", "full_path", "=", "\\", "Yii", "::", "getAlias", "(", "'@webroot'", ")", ".", "\"/$src\"", ";", "try", "{", "$", "token", "=", "hash", "(", "'crc32b'", ",", "'$full_path '", ".", "fil...
Get a file token, based on pipe configuration and source path.
[ "Get", "a", "file", "token", "based", "on", "pipe", "configuration", "and", "source", "path", "." ]
e180ee33ca38b2fa74b1803178b251ad8b3838a1
https://github.com/flaviovs/yii2-imagefilter/blob/e180ee33ca38b2fa74b1803178b251ad8b3838a1/src/Component.php#L30-L45
198,214
flaviovs/yii2-imagefilter
src/Component.php
Component.url
public function url($pipeline, $src, $scheme = false) { $src = ltrim(is_array($src) ? $src[0] : $src, '/'); $version = $this->getPipelineVersion($pipeline); return Url::to("@web/$this->path/$pipeline/$version/$src", $scheme) . '?' . $this->getToken($src); }
php
public function url($pipeline, $src, $scheme = false) { $src = ltrim(is_array($src) ? $src[0] : $src, '/'); $version = $this->getPipelineVersion($pipeline); return Url::to("@web/$this->path/$pipeline/$version/$src", $scheme) . '?' . $this->getToken($src); }
[ "public", "function", "url", "(", "$", "pipeline", ",", "$", "src", ",", "$", "scheme", "=", "false", ")", "{", "$", "src", "=", "ltrim", "(", "is_array", "(", "$", "src", ")", "?", "$", "src", "[", "0", "]", ":", "$", "src", ",", "'/'", ")",...
Return a URL to render a filtered version of an image.
[ "Return", "a", "URL", "to", "render", "a", "filtered", "version", "of", "an", "image", "." ]
e180ee33ca38b2fa74b1803178b251ad8b3838a1
https://github.com/flaviovs/yii2-imagefilter/blob/e180ee33ca38b2fa74b1803178b251ad8b3838a1/src/Component.php#L70-L77
198,215
flaviovs/yii2-imagefilter
src/Component.php
Component.img
public function img($pipeline, $src, array $options = []) { return \yii\helpers\Html::img($this->url($pipeline, $src), $options); }
php
public function img($pipeline, $src, array $options = []) { return \yii\helpers\Html::img($this->url($pipeline, $src), $options); }
[ "public", "function", "img", "(", "$", "pipeline", ",", "$", "src", ",", "array", "$", "options", "=", "[", "]", ")", "{", "return", "\\", "yii", "\\", "helpers", "\\", "Html", "::", "img", "(", "$", "this", "->", "url", "(", "$", "pipeline", ","...
Return an HTML IMG tag.
[ "Return", "an", "HTML", "IMG", "tag", "." ]
e180ee33ca38b2fa74b1803178b251ad8b3838a1
https://github.com/flaviovs/yii2-imagefilter/blob/e180ee33ca38b2fa74b1803178b251ad8b3838a1/src/Component.php#L83-L86
198,216
Facebook-Anonymous-Publisher/firewall
src/Utility.php
Utility.ip
public static function ip() { $whip = new Whip( Whip::CLOUDFLARE_HEADERS | Whip::REMOTE_ADDR, [ Whip::CLOUDFLARE_HEADERS => self::CLOUDFLARE_IP, ] ); return $whip->getValidIpAddress(); }
php
public static function ip() { $whip = new Whip( Whip::CLOUDFLARE_HEADERS | Whip::REMOTE_ADDR, [ Whip::CLOUDFLARE_HEADERS => self::CLOUDFLARE_IP, ] ); return $whip->getValidIpAddress(); }
[ "public", "static", "function", "ip", "(", ")", "{", "$", "whip", "=", "new", "Whip", "(", "Whip", "::", "CLOUDFLARE_HEADERS", "|", "Whip", "::", "REMOTE_ADDR", ",", "[", "Whip", "::", "CLOUDFLARE_HEADERS", "=>", "self", "::", "CLOUDFLARE_IP", ",", "]", ...
Get real ip address. @return false|string
[ "Get", "real", "ip", "address", "." ]
3d78855cc828a1ebda37ac73c41fd64dc8dd0583
https://github.com/Facebook-Anonymous-Publisher/firewall/blob/3d78855cc828a1ebda37ac73c41fd64dc8dd0583/src/Utility.php#L58-L68
198,217
Facebook-Anonymous-Publisher/firewall
src/Utility.php
Utility.contains
public static function contains($cidr, $ip) { $cidr = Range::parse($cidr); $ip = new IP($ip); if ($cidr->getFirstIP()->getVersion() !== $ip->getVersion()) { return false; } return $cidr->contains($ip); }
php
public static function contains($cidr, $ip) { $cidr = Range::parse($cidr); $ip = new IP($ip); if ($cidr->getFirstIP()->getVersion() !== $ip->getVersion()) { return false; } return $cidr->contains($ip); }
[ "public", "static", "function", "contains", "(", "$", "cidr", ",", "$", "ip", ")", "{", "$", "cidr", "=", "Range", "::", "parse", "(", "$", "cidr", ")", ";", "$", "ip", "=", "new", "IP", "(", "$", "ip", ")", ";", "if", "(", "$", "cidr", "->",...
Check if ip is within range. @param string $cidr @param string $ip @return bool
[ "Check", "if", "ip", "is", "within", "range", "." ]
3d78855cc828a1ebda37ac73c41fd64dc8dd0583
https://github.com/Facebook-Anonymous-Publisher/firewall/blob/3d78855cc828a1ebda37ac73c41fd64dc8dd0583/src/Utility.php#L105-L116
198,218
itkg/core
src/Itkg/Core/Cache/Adapter/RedisCluster.php
RedisCluster.getSlaveConnection
public function getSlaveConnection() { if (null === $this->slaveConnection) { $this->slaveConnection = new \Redis(); $this->slaveConnection->pconnect( $this->config['slave']['HOST'], $this->config['slave']['PORT'] ); } retur...
php
public function getSlaveConnection() { if (null === $this->slaveConnection) { $this->slaveConnection = new \Redis(); $this->slaveConnection->pconnect( $this->config['slave']['HOST'], $this->config['slave']['PORT'] ); } retur...
[ "public", "function", "getSlaveConnection", "(", ")", "{", "if", "(", "null", "===", "$", "this", "->", "slaveConnection", ")", "{", "$", "this", "->", "slaveConnection", "=", "new", "\\", "Redis", "(", ")", ";", "$", "this", "->", "slaveConnection", "->...
Get slave connection If connection is not initialized, we create a new one @return \Redis
[ "Get", "slave", "connection", "If", "connection", "is", "not", "initialized", "we", "create", "a", "new", "one" ]
e5e4efb05feb4d23b0df41f2b21fd095103e593b
https://github.com/itkg/core/blob/e5e4efb05feb4d23b0df41f2b21fd095103e593b/src/Itkg/Core/Cache/Adapter/RedisCluster.php#L90-L100
198,219
squareproton/Bond
src/Bond/Format.php
Format.getIndent
public function getIndent() { $leadingWhitespace = array(); $n = 0; foreach( $this->lines as $line ) { if( !empty( $line ) ) { $leadingWhitespace[$n] = strlen( $line ) - strlen( ltrim( $line ) ); } $n++; } return min( $leadi...
php
public function getIndent() { $leadingWhitespace = array(); $n = 0; foreach( $this->lines as $line ) { if( !empty( $line ) ) { $leadingWhitespace[$n] = strlen( $line ) - strlen( ltrim( $line ) ); } $n++; } return min( $leadi...
[ "public", "function", "getIndent", "(", ")", "{", "$", "leadingWhitespace", "=", "array", "(", ")", ";", "$", "n", "=", "0", ";", "foreach", "(", "$", "this", "->", "lines", "as", "$", "line", ")", "{", "if", "(", "!", "empty", "(", "$", "line", ...
Get the number of chars @return int
[ "Get", "the", "number", "of", "chars" ]
a04ad9dd1a35adeaec98237716c2a41ce02b4f1a
https://github.com/squareproton/Bond/blob/a04ad9dd1a35adeaec98237716c2a41ce02b4f1a/src/Bond/Format.php#L64-L75
198,220
squareproton/Bond
src/Bond/Format.php
Format.deIndent
public function deIndent() { $ltrim = $this->getIndent(); if( $ltrim > 0 ) { foreach( $this->lines as &$line ) { $line = substr( $line, $ltrim ); } } return $this; }
php
public function deIndent() { $ltrim = $this->getIndent(); if( $ltrim > 0 ) { foreach( $this->lines as &$line ) { $line = substr( $line, $ltrim ); } } return $this; }
[ "public", "function", "deIndent", "(", ")", "{", "$", "ltrim", "=", "$", "this", "->", "getIndent", "(", ")", ";", "if", "(", "$", "ltrim", ">", "0", ")", "{", "foreach", "(", "$", "this", "->", "lines", "as", "&", "$", "line", ")", "{", "$", ...
Completely deindent a string @return Bond\Format
[ "Completely", "deindent", "a", "string" ]
a04ad9dd1a35adeaec98237716c2a41ce02b4f1a
https://github.com/squareproton/Bond/blob/a04ad9dd1a35adeaec98237716c2a41ce02b4f1a/src/Bond/Format.php#L81-L90
198,221
squareproton/Bond
src/Bond/Format.php
Format.indent
public function indent( $indent = 4 ) { $indent = $this->generateIndent( $indent ); foreach( $this->lines as &$line ) { $line = $indent . $line; } return $this; }
php
public function indent( $indent = 4 ) { $indent = $this->generateIndent( $indent ); foreach( $this->lines as &$line ) { $line = $indent . $line; } return $this; }
[ "public", "function", "indent", "(", "$", "indent", "=", "4", ")", "{", "$", "indent", "=", "$", "this", "->", "generateIndent", "(", "$", "indent", ")", ";", "foreach", "(", "$", "this", "->", "lines", "as", "&", "$", "line", ")", "{", "$", "lin...
Indent a string @param int|string Either the length of the indentation in whitespace or the string to indent @return Bond\Format
[ "Indent", "a", "string" ]
a04ad9dd1a35adeaec98237716c2a41ce02b4f1a
https://github.com/squareproton/Bond/blob/a04ad9dd1a35adeaec98237716c2a41ce02b4f1a/src/Bond/Format.php#L97-L104
198,222
squareproton/Bond
src/Bond/Format.php
Format.comment
public function comment( $comment = '#' ) { foreach( $this->lines as &$line ) { $line = $comment . $line; } return $this; }
php
public function comment( $comment = '#' ) { foreach( $this->lines as &$line ) { $line = $comment . $line; } return $this; }
[ "public", "function", "comment", "(", "$", "comment", "=", "'#'", ")", "{", "foreach", "(", "$", "this", "->", "lines", "as", "&", "$", "line", ")", "{", "$", "line", "=", "$", "comment", ".", "$", "line", ";", "}", "return", "$", "this", ";", ...
Comment out a string @param string $comment @return Bond\Format
[ "Comment", "out", "a", "string" ]
a04ad9dd1a35adeaec98237716c2a41ce02b4f1a
https://github.com/squareproton/Bond/blob/a04ad9dd1a35adeaec98237716c2a41ce02b4f1a/src/Bond/Format.php#L120-L126
198,223
squareproton/Bond
src/Bond/Format.php
Format.docblockify
public function docblockify() { foreach( $this->lines as &$line ) { $line = ' * ' . $line; } array_unshift( $this->lines, '/**' ); array_push( $this->lines, ' */'); return $this; }
php
public function docblockify() { foreach( $this->lines as &$line ) { $line = ' * ' . $line; } array_unshift( $this->lines, '/**' ); array_push( $this->lines, ' */'); return $this; }
[ "public", "function", "docblockify", "(", ")", "{", "foreach", "(", "$", "this", "->", "lines", "as", "&", "$", "line", ")", "{", "$", "line", "=", "' * '", ".", "$", "line", ";", "}", "array_unshift", "(", "$", "this", "->", "lines", ",", "'/**'",...
Make docblock this string @return Bond\Format
[ "Make", "docblock", "this", "string" ]
a04ad9dd1a35adeaec98237716c2a41ce02b4f1a
https://github.com/squareproton/Bond/blob/a04ad9dd1a35adeaec98237716c2a41ce02b4f1a/src/Bond/Format.php#L160-L168
198,224
squareproton/Bond
src/Bond/Format.php
Format.removeDuplicateEmptyLines
public function removeDuplicateEmptyLines() { $output = []; $c = 0; foreach( $this->lines as $key => $line ) { if( strlen(rtrim($line)) === 0 ) { $c++; if( $c === 1 ) { $output[] = $line; } } else { ...
php
public function removeDuplicateEmptyLines() { $output = []; $c = 0; foreach( $this->lines as $key => $line ) { if( strlen(rtrim($line)) === 0 ) { $c++; if( $c === 1 ) { $output[] = $line; } } else { ...
[ "public", "function", "removeDuplicateEmptyLines", "(", ")", "{", "$", "output", "=", "[", "]", ";", "$", "c", "=", "0", ";", "foreach", "(", "$", "this", "->", "lines", "as", "$", "key", "=>", "$", "line", ")", "{", "if", "(", "strlen", "(", "rt...
Duplicate empty lines remove @return Bond\Format
[ "Duplicate", "empty", "lines", "remove" ]
a04ad9dd1a35adeaec98237716c2a41ce02b4f1a
https://github.com/squareproton/Bond/blob/a04ad9dd1a35adeaec98237716c2a41ce02b4f1a/src/Bond/Format.php#L174-L191
198,225
squareproton/Bond
src/Bond/Format.php
Format.addLineNumbers
public function addLineNumbers() { $lengthToPad = strlen(count($this->lines)); $c = 0; foreach( $this->lines as &$line ) { $c++; $line = sprintf( "%s %s", str_pad( (string) $c, $lengthToPad, ' ', STR_PAD_LEFT ), $line ...
php
public function addLineNumbers() { $lengthToPad = strlen(count($this->lines)); $c = 0; foreach( $this->lines as &$line ) { $c++; $line = sprintf( "%s %s", str_pad( (string) $c, $lengthToPad, ' ', STR_PAD_LEFT ), $line ...
[ "public", "function", "addLineNumbers", "(", ")", "{", "$", "lengthToPad", "=", "strlen", "(", "count", "(", "$", "this", "->", "lines", ")", ")", ";", "$", "c", "=", "0", ";", "foreach", "(", "$", "this", "->", "lines", "as", "&", "$", "line", "...
Add line numbers to output. Useful for debugging output. This is obviously destructive @return Bond\Format
[ "Add", "line", "numbers", "to", "output", ".", "Useful", "for", "debugging", "output", ".", "This", "is", "obviously", "destructive" ]
a04ad9dd1a35adeaec98237716c2a41ce02b4f1a
https://github.com/squareproton/Bond/blob/a04ad9dd1a35adeaec98237716c2a41ce02b4f1a/src/Bond/Format.php#L197-L210
198,226
squareproton/Bond
src/Bond/Format.php
Format.generateIndent
private function generateIndent( $indent ) { if( is_integer( $indent ) ) { $indent = str_repeat( $this->indentChar, $indent ); } elseif( !is_string($indent) ) { throw new BadTypeException( $indent, 'int|string' ); } return $indent; }
php
private function generateIndent( $indent ) { if( is_integer( $indent ) ) { $indent = str_repeat( $this->indentChar, $indent ); } elseif( !is_string($indent) ) { throw new BadTypeException( $indent, 'int|string' ); } return $indent; }
[ "private", "function", "generateIndent", "(", "$", "indent", ")", "{", "if", "(", "is_integer", "(", "$", "indent", ")", ")", "{", "$", "indent", "=", "str_repeat", "(", "$", "this", "->", "indentChar", ",", "$", "indent", ")", ";", "}", "elseif", "(...
Generate indention string from length. @param int|string Either the length of the indentation in whitespace or the string to indent @return string Indention string
[ "Generate", "indention", "string", "from", "length", "." ]
a04ad9dd1a35adeaec98237716c2a41ce02b4f1a
https://github.com/squareproton/Bond/blob/a04ad9dd1a35adeaec98237716c2a41ce02b4f1a/src/Bond/Format.php#L217-L225
198,227
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/C2MQuery.php
C2MQuery.filterByCategoryId
public function filterByCategoryId($categoryId = null, $comparison = null) { if (is_array($categoryId)) { $useMinMax = false; if (isset($categoryId['min'])) { $this->addUsingAlias(C2MTableMap::COL_CATEGORY_ID, $categoryId['min'], Criteria::GREATER_EQUAL); ...
php
public function filterByCategoryId($categoryId = null, $comparison = null) { if (is_array($categoryId)) { $useMinMax = false; if (isset($categoryId['min'])) { $this->addUsingAlias(C2MTableMap::COL_CATEGORY_ID, $categoryId['min'], Criteria::GREATER_EQUAL); ...
[ "public", "function", "filterByCategoryId", "(", "$", "categoryId", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "is_array", "(", "$", "categoryId", ")", ")", "{", "$", "useMinMax", "=", "false", ";", "if", "(", "isset", "(", ...
Filter the query on the category_id column Example usage: <code> $query->filterByCategoryId(1234); // WHERE category_id = 1234 $query->filterByCategoryId(array(12, 34)); // WHERE category_id IN (12, 34) $query->filterByCategoryId(array('min' => 12)); // WHERE category_id > 12 </code> @see filterByCategory() @p...
[ "Filter", "the", "query", "on", "the", "category_id", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/C2MQuery.php#L294-L315
198,228
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/C2MQuery.php
C2MQuery.filterByMediaId
public function filterByMediaId($mediaId = null, $comparison = null) { if (is_array($mediaId)) { $useMinMax = false; if (isset($mediaId['min'])) { $this->addUsingAlias(C2MTableMap::COL_MEDIA_ID, $mediaId['min'], Criteria::GREATER_EQUAL); $useMinMax = t...
php
public function filterByMediaId($mediaId = null, $comparison = null) { if (is_array($mediaId)) { $useMinMax = false; if (isset($mediaId['min'])) { $this->addUsingAlias(C2MTableMap::COL_MEDIA_ID, $mediaId['min'], Criteria::GREATER_EQUAL); $useMinMax = t...
[ "public", "function", "filterByMediaId", "(", "$", "mediaId", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "is_array", "(", "$", "mediaId", ")", ")", "{", "$", "useMinMax", "=", "false", ";", "if", "(", "isset", "(", "$", ...
Filter the query on the media_id column Example usage: <code> $query->filterByMediaId(1234); // WHERE media_id = 1234 $query->filterByMediaId(array(12, 34)); // WHERE media_id IN (12, 34) $query->filterByMediaId(array('min' => 12)); // WHERE media_id > 12 </code> @see filterByMedia() @param mixed $mediaId ...
[ "Filter", "the", "query", "on", "the", "media_id", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/C2MQuery.php#L337-L358
198,229
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/C2MQuery.php
C2MQuery.useCategoryQuery
public function useCategoryQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { return $this ->joinCategory($relationAlias, $joinType) ->useQuery($relationAlias ? $relationAlias : 'Category', '\Attogram\SharedMedia\Orm\CategoryQuery'); }
php
public function useCategoryQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { return $this ->joinCategory($relationAlias, $joinType) ->useQuery($relationAlias ? $relationAlias : 'Category', '\Attogram\SharedMedia\Orm\CategoryQuery'); }
[ "public", "function", "useCategoryQuery", "(", "$", "relationAlias", "=", "null", ",", "$", "joinType", "=", "Criteria", "::", "INNER_JOIN", ")", "{", "return", "$", "this", "->", "joinCategory", "(", "$", "relationAlias", ",", "$", "joinType", ")", "->", ...
Use the Category relation Category object @see useQuery() @param string $relationAlias optional alias for the relation, to be used as main alias in the secondary query @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' @return \Attogram\SharedMedia\Orm\CategoryQuery A s...
[ "Use", "the", "Category", "relation", "Category", "object" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/C2MQuery.php#L430-L435
198,230
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/C2MQuery.php
C2MQuery.useMediaQuery
public function useMediaQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { return $this ->joinMedia($relationAlias, $joinType) ->useQuery($relationAlias ? $relationAlias : 'Media', '\Attogram\SharedMedia\Orm\MediaQuery'); }
php
public function useMediaQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { return $this ->joinMedia($relationAlias, $joinType) ->useQuery($relationAlias ? $relationAlias : 'Media', '\Attogram\SharedMedia\Orm\MediaQuery'); }
[ "public", "function", "useMediaQuery", "(", "$", "relationAlias", "=", "null", ",", "$", "joinType", "=", "Criteria", "::", "INNER_JOIN", ")", "{", "return", "$", "this", "->", "joinMedia", "(", "$", "relationAlias", ",", "$", "joinType", ")", "->", "useQu...
Use the Media relation Media object @see useQuery() @param string $relationAlias optional alias for the relation, to be used as main alias in the secondary query @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' @return \Attogram\SharedMedia\Orm\MediaQuery A secondary ...
[ "Use", "the", "Media", "relation", "Media", "object" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/C2MQuery.php#L507-L512
198,231
Dhii/exception
src/CreateNativeInvalidArgumentExceptionCapableTrait.php
CreateNativeInvalidArgumentExceptionCapableTrait._createInvalidArgumentException
protected function _createInvalidArgumentException( $message = '', $code = 0, RootException $previous = null, $argument = null ) { return new RootInvalidArgumentException($message, $code, $previous); }
php
protected function _createInvalidArgumentException( $message = '', $code = 0, RootException $previous = null, $argument = null ) { return new RootInvalidArgumentException($message, $code, $previous); }
[ "protected", "function", "_createInvalidArgumentException", "(", "$", "message", "=", "''", ",", "$", "code", "=", "0", ",", "RootException", "$", "previous", "=", "null", ",", "$", "argument", "=", "null", ")", "{", "return", "new", "RootInvalidArgumentExcept...
Creates a new invalid argument exception. @since [*next-version*] @param string $message The error message, if any. @param int $code The error code, if any. @param RootException|null $previous The inner exception for chaining, if any. @param mixed|null $argument The invalid arg...
[ "Creates", "a", "new", "invalid", "argument", "exception", "." ]
d42828984c85a509af3f7fde709561a1e520b9e4
https://github.com/Dhii/exception/blob/d42828984c85a509af3f7fde709561a1e520b9e4/src/CreateNativeInvalidArgumentExceptionCapableTrait.php#L22-L29
198,232
geoffroy-aubry/Helpers
src/GAubry/Helpers/Debug.php
Debug.getVarName
private static function getVarName ($sFunction, $sFile, $iLine) { $sContent = file($sFile); $sLine = $sContent[$iLine - 1]; preg_match("#$sFunction\s*\((.+)\)#", $sLine, $aMatches); // Let's count brackets to see how many of them actually belongs to the var name. // e.g.: ...
php
private static function getVarName ($sFunction, $sFile, $iLine) { $sContent = file($sFile); $sLine = $sContent[$iLine - 1]; preg_match("#$sFunction\s*\((.+)\)#", $sLine, $aMatches); // Let's count brackets to see how many of them actually belongs to the var name. // e.g.: ...
[ "private", "static", "function", "getVarName", "(", "$", "sFunction", ",", "$", "sFile", ",", "$", "iLine", ")", "{", "$", "sContent", "=", "file", "(", "$", "sFile", ")", ";", "$", "sLine", "=", "$", "sContent", "[", "$", "iLine", "-", "1", "]", ...
Return the name of the first parameter of the penultimate function call. TODO bug if multiple calls in the same line… @see http://stackoverflow.com/a/6837836 @author Sebastián Grignoli @author Geoffroy Aubry @param string $sFunction function called @param string $sFile file containing a call to $sFunction @param int...
[ "Return", "the", "name", "of", "the", "first", "parameter", "of", "the", "penultimate", "function", "call", "." ]
09e787e554158d7c2233a27107d2949824cd5602
https://github.com/geoffroy-aubry/Helpers/blob/09e787e554158d7c2233a27107d2949824cd5602/src/GAubry/Helpers/Debug.php#L124-L156
198,233
agentmedia/phine-core
src/Core/Logic/Routing/Rewriter.php
Rewriter.AddIndexCommands
function AddIndexCommands() { $condition = new RewriteCondition('$1', '!^(index\\.php|files|phine|robots\\.txt)'); $this->writer->AddContent($condition); $rule = new RewriteRule('(.*)$', 'index.php'); $rule->AddFlag(new CommandFlag(FlagType::Qsa())); $rule->AddFlag(n...
php
function AddIndexCommands() { $condition = new RewriteCondition('$1', '!^(index\\.php|files|phine|robots\\.txt)'); $this->writer->AddContent($condition); $rule = new RewriteRule('(.*)$', 'index.php'); $rule->AddFlag(new CommandFlag(FlagType::Qsa())); $rule->AddFlag(n...
[ "function", "AddIndexCommands", "(", ")", "{", "$", "condition", "=", "new", "RewriteCondition", "(", "'$1'", ",", "'!^(index\\\\.php|files|phine|robots\\\\.txt)'", ")", ";", "$", "this", "->", "writer", "->", "AddContent", "(", "$", "condition", ")", ";", "$", ...
Adds the rules to rewrite anything to the index.php
[ "Adds", "the", "rules", "to", "rewrite", "anything", "to", "the", "index", ".", "php" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Routing/Rewriter.php#L98-L107
198,234
agentmedia/phine-core
src/Core/Logic/Routing/Rewriter.php
Rewriter.SiteHostCondition
private function SiteHostCondition(Site $site) { $siteUrl = $site->GetUrl(); $host = parse_url($siteUrl, PHP_URL_HOST); return new RewriteCondition(new Variable(ServerVariable::HttpHost()), $host); }
php
private function SiteHostCondition(Site $site) { $siteUrl = $site->GetUrl(); $host = parse_url($siteUrl, PHP_URL_HOST); return new RewriteCondition(new Variable(ServerVariable::HttpHost()), $host); }
[ "private", "function", "SiteHostCondition", "(", "Site", "$", "site", ")", "{", "$", "siteUrl", "=", "$", "site", "->", "GetUrl", "(", ")", ";", "$", "host", "=", "parse_url", "(", "$", "siteUrl", ",", "PHP_URL_HOST", ")", ";", "return", "new", "Rewrit...
Gets the host condition for a page rewrite @param Site $site @return RewriteCondition
[ "Gets", "the", "host", "condition", "for", "a", "page", "rewrite" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Routing/Rewriter.php#L114-L119
198,235
agentmedia/phine-core
src/Core/Logic/Routing/Rewriter.php
Rewriter.SiteFolderCondition
private function SiteFolderCondition(Site $site) { $siteUrl = $site->GetUrl(); $siteFolder = parse_url($siteUrl, PHP_URL_PATH); if ($siteFolder != '' && $siteFolder != '/') { return new RewriteCondition(new Variable(ServerVariable::RequestUri()), '^' . rtrim($siteF...
php
private function SiteFolderCondition(Site $site) { $siteUrl = $site->GetUrl(); $siteFolder = parse_url($siteUrl, PHP_URL_PATH); if ($siteFolder != '' && $siteFolder != '/') { return new RewriteCondition(new Variable(ServerVariable::RequestUri()), '^' . rtrim($siteF...
[ "private", "function", "SiteFolderCondition", "(", "Site", "$", "site", ")", "{", "$", "siteUrl", "=", "$", "site", "->", "GetUrl", "(", ")", ";", "$", "siteFolder", "=", "parse_url", "(", "$", "siteUrl", ",", "PHP_URL_PATH", ")", ";", "if", "(", "$", ...
Gets the rewrite condition for the site specific folder; if present @param Site $site @return RewriteCondition
[ "Gets", "the", "rewrite", "condition", "for", "the", "site", "specific", "folder", ";", "if", "present" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Routing/Rewriter.php#L125-L138
198,236
agentmedia/phine-core
src/Core/Logic/Routing/Rewriter.php
Rewriter.PageRule
private function PageRule(Page $page, array $params) { $lhs = $page->GetUrl(); foreach ($params as $param) { $lhs = str_replace('{' . $param . '}', self::PARAM_PATTERN, $lhs); } $rhs = 'index.php'; $idx = 1; foreach ($params as $p...
php
private function PageRule(Page $page, array $params) { $lhs = $page->GetUrl(); foreach ($params as $param) { $lhs = str_replace('{' . $param . '}', self::PARAM_PATTERN, $lhs); } $rhs = 'index.php'; $idx = 1; foreach ($params as $p...
[ "private", "function", "PageRule", "(", "Page", "$", "page", ",", "array", "$", "params", ")", "{", "$", "lhs", "=", "$", "page", "->", "GetUrl", "(", ")", ";", "foreach", "(", "$", "params", "as", "$", "param", ")", "{", "$", "lhs", "=", "str_re...
Returns the page rule @param Page $page @param array $params @return RewriteRule
[ "Returns", "the", "page", "rule" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Routing/Rewriter.php#L145-L167
198,237
agentmedia/phine-core
src/Core/Logic/Routing/Rewriter.php
Rewriter.PageStartComment
function PageStartComment(Page $page) { $text = str_replace('{0}', $page->GetID(), self::START_PAGE_COMMENT); return new CommentLine($text); }
php
function PageStartComment(Page $page) { $text = str_replace('{0}', $page->GetID(), self::START_PAGE_COMMENT); return new CommentLine($text); }
[ "function", "PageStartComment", "(", "Page", "$", "page", ")", "{", "$", "text", "=", "str_replace", "(", "'{0}'", ",", "$", "page", "->", "GetID", "(", ")", ",", "self", "::", "START_PAGE_COMMENT", ")", ";", "return", "new", "CommentLine", "(", "$", "...
The page start comment @param Page $page @return CommentLine
[ "The", "page", "start", "comment" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Routing/Rewriter.php#L173-L177
198,238
agentmedia/phine-core
src/Core/Logic/Routing/Rewriter.php
Rewriter.PageEndComment
function PageEndComment(Page $page) { $text = str_replace('{0}', $page->GetID(), self::END_PAGE_COMMENT); return new CommentLine($text); }
php
function PageEndComment(Page $page) { $text = str_replace('{0}', $page->GetID(), self::END_PAGE_COMMENT); return new CommentLine($text); }
[ "function", "PageEndComment", "(", "Page", "$", "page", ")", "{", "$", "text", "=", "str_replace", "(", "'{0}'", ",", "$", "page", "->", "GetID", "(", ")", ",", "self", "::", "END_PAGE_COMMENT", ")", ";", "return", "new", "CommentLine", "(", "$", "text...
The page end comment @param Page $page @return CommentLine
[ "The", "page", "end", "comment" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Routing/Rewriter.php#L185-L189
198,239
SetBased/php-abc-var-dumper
src/VarDumper.php
VarDumper.&
private static function &getProperty($object, string $property) { $value = &\Closure::bind(function & () use ($property) { return $this->$property; }, $object, $object)->__invoke(); return $value; }
php
private static function &getProperty($object, string $property) { $value = &\Closure::bind(function & () use ($property) { return $this->$property; }, $object, $object)->__invoke(); return $value; }
[ "private", "static", "function", "&", "getProperty", "(", "$", "object", ",", "string", "$", "property", ")", "{", "$", "value", "=", "&", "\\", "Closure", "::", "bind", "(", "function", "&", "(", ")", "use", "(", "$", "property", ")", "{", "return",...
Returns a reference to a non static property of an object. @param object $object The object. @param string $property The name of the property. @return mixed
[ "Returns", "a", "reference", "to", "a", "non", "static", "property", "of", "an", "object", "." ]
cb03a4f1e76d65378c818120f97cbd734768a842
https://github.com/SetBased/php-abc-var-dumper/blob/cb03a4f1e76d65378c818120f97cbd734768a842/src/VarDumper.php#L63-L70
198,240
SetBased/php-abc-var-dumper
src/VarDumper.php
VarDumper.&
private static function &getStaticProperty($object, string $property) { $value = &\Closure::bind(function & () use ($property) { return self::$$property; }, $object, $object)->__invoke(); return $value; }
php
private static function &getStaticProperty($object, string $property) { $value = &\Closure::bind(function & () use ($property) { return self::$$property; }, $object, $object)->__invoke(); return $value; }
[ "private", "static", "function", "&", "getStaticProperty", "(", "$", "object", ",", "string", "$", "property", ")", "{", "$", "value", "=", "&", "\\", "Closure", "::", "bind", "(", "function", "&", "(", ")", "use", "(", "$", "property", ")", "{", "re...
Returns a reference to a static property of an object. @param object $object The object. @param string $property The name of the property. @return mixed
[ "Returns", "a", "reference", "to", "a", "static", "property", "of", "an", "object", "." ]
cb03a4f1e76d65378c818120f97cbd734768a842
https://github.com/SetBased/php-abc-var-dumper/blob/cb03a4f1e76d65378c818120f97cbd734768a842/src/VarDumper.php#L81-L88
198,241
SetBased/php-abc-var-dumper
src/VarDumper.php
VarDumper.dump
public function dump($name, &$value, bool $scalarReferences = false): void { $this->seen = []; $this->scalarReferences = $scalarReferences; $this->gid = uniqid((string)mt_rand(), true); $this->writer->start(); $this->recursiveDump($value, $name); $this->writer->stop...
php
public function dump($name, &$value, bool $scalarReferences = false): void { $this->seen = []; $this->scalarReferences = $scalarReferences; $this->gid = uniqid((string)mt_rand(), true); $this->writer->start(); $this->recursiveDump($value, $name); $this->writer->stop...
[ "public", "function", "dump", "(", "$", "name", ",", "&", "$", "value", ",", "bool", "$", "scalarReferences", "=", "false", ")", ":", "void", "{", "$", "this", "->", "seen", "=", "[", "]", ";", "$", "this", "->", "scalarReferences", "=", "$", "scal...
Main function for dumping. @param string|int|null $name The name of the variable. @param mixed $value Value to be dumped. @param bool $scalarReferences If true scalar references to values must be traced. @api @since 1.0.0
[ "Main", "function", "for", "dumping", "." ]
cb03a4f1e76d65378c818120f97cbd734768a842
https://github.com/SetBased/php-abc-var-dumper/blob/cb03a4f1e76d65378c818120f97cbd734768a842/src/VarDumper.php#L125-L136
198,242
SetBased/php-abc-var-dumper
src/VarDumper.php
VarDumper.dumpArray
private function dumpArray(array &$value, $name): void { list($id, $ref) = $this->isReference($value); if ($ref===null) { $this->writer->writeArrayOpen($id, $name); foreach ($value as $key => &$item) { $this->recursiveDump($item, $key); } $this->writer->writeArrayC...
php
private function dumpArray(array &$value, $name): void { list($id, $ref) = $this->isReference($value); if ($ref===null) { $this->writer->writeArrayOpen($id, $name); foreach ($value as $key => &$item) { $this->recursiveDump($item, $key); } $this->writer->writeArrayC...
[ "private", "function", "dumpArray", "(", "array", "&", "$", "value", ",", "$", "name", ")", ":", "void", "{", "list", "(", "$", "id", ",", "$", "ref", ")", "=", "$", "this", "->", "isReference", "(", "$", "value", ")", ";", "if", "(", "$", "ref...
Dumps an array. @param array $value The array. @param string|int|null $name Variable name.
[ "Dumps", "an", "array", "." ]
cb03a4f1e76d65378c818120f97cbd734768a842
https://github.com/SetBased/php-abc-var-dumper/blob/cb03a4f1e76d65378c818120f97cbd734768a842/src/VarDumper.php#L145-L164
198,243
SetBased/php-abc-var-dumper
src/VarDumper.php
VarDumper.dumpBool
private function dumpBool(bool &$value, $name): void { if ($this->scalarReferences) { list($id, $ref) = $this->isReference($value); } else { $id = null; $ref = null; } $this->writer->writeBool($id, $ref, $value, $name); }
php
private function dumpBool(bool &$value, $name): void { if ($this->scalarReferences) { list($id, $ref) = $this->isReference($value); } else { $id = null; $ref = null; } $this->writer->writeBool($id, $ref, $value, $name); }
[ "private", "function", "dumpBool", "(", "bool", "&", "$", "value", ",", "$", "name", ")", ":", "void", "{", "if", "(", "$", "this", "->", "scalarReferences", ")", "{", "list", "(", "$", "id", ",", "$", "ref", ")", "=", "$", "this", "->", "isRefer...
Dumps a boolean. @param bool $value The boolean. @param string|int|null $name The name of the variable.
[ "Dumps", "a", "boolean", "." ]
cb03a4f1e76d65378c818120f97cbd734768a842
https://github.com/SetBased/php-abc-var-dumper/blob/cb03a4f1e76d65378c818120f97cbd734768a842/src/VarDumper.php#L173-L186
198,244
SetBased/php-abc-var-dumper
src/VarDumper.php
VarDumper.dumpFloat
private function dumpFloat(float &$value, $name): void { if ($this->scalarReferences) { list($id, $ref) = $this->isReference($value); } else { $id = null; $ref = null; } $this->writer->writeFloat($id, $ref, $value, $name); }
php
private function dumpFloat(float &$value, $name): void { if ($this->scalarReferences) { list($id, $ref) = $this->isReference($value); } else { $id = null; $ref = null; } $this->writer->writeFloat($id, $ref, $value, $name); }
[ "private", "function", "dumpFloat", "(", "float", "&", "$", "value", ",", "$", "name", ")", ":", "void", "{", "if", "(", "$", "this", "->", "scalarReferences", ")", "{", "list", "(", "$", "id", ",", "$", "ref", ")", "=", "$", "this", "->", "isRef...
Dumps a float. @param float $value The float. @param string|int|null $name The name of the variable.
[ "Dumps", "a", "float", "." ]
cb03a4f1e76d65378c818120f97cbd734768a842
https://github.com/SetBased/php-abc-var-dumper/blob/cb03a4f1e76d65378c818120f97cbd734768a842/src/VarDumper.php#L195-L208
198,245
SetBased/php-abc-var-dumper
src/VarDumper.php
VarDumper.dumpInt
private function dumpInt(int &$value, $name): void { if ($this->scalarReferences) { list($id, $ref) = $this->isReference($value); } else { $id = null; $ref = null; } $this->writer->writeInt($id, $ref, $value, $name); }
php
private function dumpInt(int &$value, $name): void { if ($this->scalarReferences) { list($id, $ref) = $this->isReference($value); } else { $id = null; $ref = null; } $this->writer->writeInt($id, $ref, $value, $name); }
[ "private", "function", "dumpInt", "(", "int", "&", "$", "value", ",", "$", "name", ")", ":", "void", "{", "if", "(", "$", "this", "->", "scalarReferences", ")", "{", "list", "(", "$", "id", ",", "$", "ref", ")", "=", "$", "this", "->", "isReferen...
Dumps an integer. @param int $value The integer. @param string|int|null $name The name of the variable.
[ "Dumps", "an", "integer", "." ]
cb03a4f1e76d65378c818120f97cbd734768a842
https://github.com/SetBased/php-abc-var-dumper/blob/cb03a4f1e76d65378c818120f97cbd734768a842/src/VarDumper.php#L217-L230
198,246
SetBased/php-abc-var-dumper
src/VarDumper.php
VarDumper.dumpNull
private function dumpNull(&$value, $name): void { if ($this->scalarReferences) { list($id, $ref) = $this->isReference($value); } else { $id = null; $ref = null; } $this->writer->writeNull($id, $ref, $name); }
php
private function dumpNull(&$value, $name): void { if ($this->scalarReferences) { list($id, $ref) = $this->isReference($value); } else { $id = null; $ref = null; } $this->writer->writeNull($id, $ref, $name); }
[ "private", "function", "dumpNull", "(", "&", "$", "value", ",", "$", "name", ")", ":", "void", "{", "if", "(", "$", "this", "->", "scalarReferences", ")", "{", "list", "(", "$", "id", ",", "$", "ref", ")", "=", "$", "this", "->", "isReference", "...
Dumps null. @param null $value The null. @param string|int|null $name The name of the variable.
[ "Dumps", "null", "." ]
cb03a4f1e76d65378c818120f97cbd734768a842
https://github.com/SetBased/php-abc-var-dumper/blob/cb03a4f1e76d65378c818120f97cbd734768a842/src/VarDumper.php#L239-L252
198,247
SetBased/php-abc-var-dumper
src/VarDumper.php
VarDumper.dumpObject
private function dumpObject($value, $name): void { list($id, $ref) = $this->isReference($value); if ($ref===null) { $this->writer->writeObjectOpen($id, $name, get_class($value)); // Dump all fields of the object, unless the object is me. if ($this!==$value) { $reflect ...
php
private function dumpObject($value, $name): void { list($id, $ref) = $this->isReference($value); if ($ref===null) { $this->writer->writeObjectOpen($id, $name, get_class($value)); // Dump all fields of the object, unless the object is me. if ($this!==$value) { $reflect ...
[ "private", "function", "dumpObject", "(", "$", "value", ",", "$", "name", ")", ":", "void", "{", "list", "(", "$", "id", ",", "$", "ref", ")", "=", "$", "this", "->", "isReference", "(", "$", "value", ")", ";", "if", "(", "$", "ref", "===", "nu...
Dumps an object. @param object $value The object. @param string|int|null $name The name of the variable.
[ "Dumps", "an", "object", "." ]
cb03a4f1e76d65378c818120f97cbd734768a842
https://github.com/SetBased/php-abc-var-dumper/blob/cb03a4f1e76d65378c818120f97cbd734768a842/src/VarDumper.php#L261-L307
198,248
SetBased/php-abc-var-dumper
src/VarDumper.php
VarDumper.dumpResource
private function dumpResource($value, $name): void { list($id, $ref) = $this->isReference($value); $this->writer->writeResource($id, $ref, $name, get_resource_type($value)); }
php
private function dumpResource($value, $name): void { list($id, $ref) = $this->isReference($value); $this->writer->writeResource($id, $ref, $name, get_resource_type($value)); }
[ "private", "function", "dumpResource", "(", "$", "value", ",", "$", "name", ")", ":", "void", "{", "list", "(", "$", "id", ",", "$", "ref", ")", "=", "$", "this", "->", "isReference", "(", "$", "value", ")", ";", "$", "this", "->", "writer", "->"...
Dumps a resource. @param resource $value The resource. @param string $name The name of the variable.
[ "Dumps", "a", "resource", "." ]
cb03a4f1e76d65378c818120f97cbd734768a842
https://github.com/SetBased/php-abc-var-dumper/blob/cb03a4f1e76d65378c818120f97cbd734768a842/src/VarDumper.php#L316-L321
198,249
SetBased/php-abc-var-dumper
src/VarDumper.php
VarDumper.dumpString
private function dumpString(string &$value, $name): void { if ($this->scalarReferences) { list($id, $ref) = $this->isReference($value); } else { $id = null; $ref = null; } $this->writer->writeString($id, $ref, $value, $name); }
php
private function dumpString(string &$value, $name): void { if ($this->scalarReferences) { list($id, $ref) = $this->isReference($value); } else { $id = null; $ref = null; } $this->writer->writeString($id, $ref, $value, $name); }
[ "private", "function", "dumpString", "(", "string", "&", "$", "value", ",", "$", "name", ")", ":", "void", "{", "if", "(", "$", "this", "->", "scalarReferences", ")", "{", "list", "(", "$", "id", ",", "$", "ref", ")", "=", "$", "this", "->", "isR...
Dumps a string. @param string $value The string. @param string|int|null $name The name of the variable.
[ "Dumps", "a", "string", "." ]
cb03a4f1e76d65378c818120f97cbd734768a842
https://github.com/SetBased/php-abc-var-dumper/blob/cb03a4f1e76d65378c818120f97cbd734768a842/src/VarDumper.php#L330-L343
198,250
SetBased/php-abc-var-dumper
src/VarDumper.php
VarDumper.isReference
private function isReference(&$value): array { switch (true) { case is_bool($value): case is_null($value): case is_int($value): case is_string($value): case is_double($value): case is_resource($value): $ref = $this->testSeen($value); break; case is_ob...
php
private function isReference(&$value): array { switch (true) { case is_bool($value): case is_null($value): case is_int($value): case is_string($value): case is_double($value): case is_resource($value): $ref = $this->testSeen($value); break; case is_ob...
[ "private", "function", "isReference", "(", "&", "$", "value", ")", ":", "array", "{", "switch", "(", "true", ")", "{", "case", "is_bool", "(", "$", "value", ")", ":", "case", "is_null", "(", "$", "value", ")", ":", "case", "is_int", "(", "$", "valu...
If a value has been dumped before returns the ID of the variable. Otherwise returns null. @param mixed $value The variable. @return array<int|null>
[ "If", "a", "value", "has", "been", "dumped", "before", "returns", "the", "ID", "of", "the", "variable", ".", "Otherwise", "returns", "null", "." ]
cb03a4f1e76d65378c818120f97cbd734768a842
https://github.com/SetBased/php-abc-var-dumper/blob/cb03a4f1e76d65378c818120f97cbd734768a842/src/VarDumper.php#L353-L381
198,251
SetBased/php-abc-var-dumper
src/VarDumper.php
VarDumper.recursiveDump
private function recursiveDump(&$value, $name): void { switch (true) { case is_null($value): $this->dumpNull($value, $name); break; case is_bool($value): $this->dumpBool($value, $name); break; case is_float($value): $this->dumpFloat($value, $name); ...
php
private function recursiveDump(&$value, $name): void { switch (true) { case is_null($value): $this->dumpNull($value, $name); break; case is_bool($value): $this->dumpBool($value, $name); break; case is_float($value): $this->dumpFloat($value, $name); ...
[ "private", "function", "recursiveDump", "(", "&", "$", "value", ",", "$", "name", ")", ":", "void", "{", "switch", "(", "true", ")", "{", "case", "is_null", "(", "$", "value", ")", ":", "$", "this", "->", "dumpNull", "(", "$", "value", ",", "$", ...
Dumps recursively a variable. @param mixed $value The value. @param string|int|null $name Variable The name of the variable.
[ "Dumps", "recursively", "a", "variable", "." ]
cb03a4f1e76d65378c818120f97cbd734768a842
https://github.com/SetBased/php-abc-var-dumper/blob/cb03a4f1e76d65378c818120f97cbd734768a842/src/VarDumper.php#L390-L438
198,252
phospr/DoubleEntryBundle
Model/Account.php
Account.generateSlugSegmentationAndPath
public function generateSlugSegmentationAndPath() { // Set slug for this Account. The reason we do this here is that // the slug listener hasn't been called yet $this->setSlug(\Gedmo\Sluggable\Util\Urlizer::urlize($this->name)); if ($this->getParent()) { $account = $thi...
php
public function generateSlugSegmentationAndPath() { // Set slug for this Account. The reason we do this here is that // the slug listener hasn't been called yet $this->setSlug(\Gedmo\Sluggable\Util\Urlizer::urlize($this->name)); if ($this->getParent()) { $account = $thi...
[ "public", "function", "generateSlugSegmentationAndPath", "(", ")", "{", "// Set slug for this Account. The reason we do this here is that", "// the slug listener hasn't been called yet", "$", "this", "->", "setSlug", "(", "\\", "Gedmo", "\\", "Sluggable", "\\", "Util", "\\", ...
Generate slug, segmentation and path @author Tom Haskins-Vaughan <tom@tomhv.uk> @since 0.8.0 @ORM\PrePersist @ORM\PreUpdate
[ "Generate", "slug", "segmentation", "and", "path" ]
d9c421f30922b461483731983c59beb26047fb7f
https://github.com/phospr/DoubleEntryBundle/blob/d9c421f30922b461483731983c59beb26047fb7f/Model/Account.php#L574-L602
198,253
phospr/DoubleEntryBundle
Model/Account.php
Account.getPostedPostings
public function getPostedPostings() { $criteria = Criteria::create() ->where(Criteria::expr()->neq('postedAt', null)) ->orderBy(array('postedAt' => Criteria::ASC)) ; return $this->getPostings()->matching($criteria); }
php
public function getPostedPostings() { $criteria = Criteria::create() ->where(Criteria::expr()->neq('postedAt', null)) ->orderBy(array('postedAt' => Criteria::ASC)) ; return $this->getPostings()->matching($criteria); }
[ "public", "function", "getPostedPostings", "(", ")", "{", "$", "criteria", "=", "Criteria", "::", "create", "(", ")", "->", "where", "(", "Criteria", "::", "expr", "(", ")", "->", "neq", "(", "'postedAt'", ",", "null", ")", ")", "->", "orderBy", "(", ...
Get posted Postings @author Tom Haskins-Vaughan <tom@tomhv.uk> @since 0.8.0 @return ArrayCollection|Posting
[ "Get", "posted", "Postings" ]
d9c421f30922b461483731983c59beb26047fb7f
https://github.com/phospr/DoubleEntryBundle/blob/d9c421f30922b461483731983c59beb26047fb7f/Model/Account.php#L672-L680
198,254
phospr/DoubleEntryBundle
Model/Account.php
Account.getUnpostedPostings
public function getUnpostedPostings() { $criteria = Criteria::create() ->where(Criteria::expr()->eq('postedAt', null)) ; return $this->getPostings()->matching($criteria); }
php
public function getUnpostedPostings() { $criteria = Criteria::create() ->where(Criteria::expr()->eq('postedAt', null)) ; return $this->getPostings()->matching($criteria); }
[ "public", "function", "getUnpostedPostings", "(", ")", "{", "$", "criteria", "=", "Criteria", "::", "create", "(", ")", "->", "where", "(", "Criteria", "::", "expr", "(", ")", "->", "eq", "(", "'postedAt'", ",", "null", ")", ")", ";", "return", "$", ...
Get unposted Postings @author Tom Haskins-Vaughan <tom@tomhv.uk> @since 0.8.0 @return ArrayCollection|Posting
[ "Get", "unposted", "Postings" ]
d9c421f30922b461483731983c59beb26047fb7f
https://github.com/phospr/DoubleEntryBundle/blob/d9c421f30922b461483731983c59beb26047fb7f/Model/Account.php#L690-L697
198,255
phospr/DoubleEntryBundle
Model/Account.php
Account.getChildForName
public function getChildForName($name) { $criteria = Criteria::create() ->where(Criteria::expr()->eq('name', $name)) ; return $this->getChildren()->matching($criteria)->first(); }
php
public function getChildForName($name) { $criteria = Criteria::create() ->where(Criteria::expr()->eq('name', $name)) ; return $this->getChildren()->matching($criteria)->first(); }
[ "public", "function", "getChildForName", "(", "$", "name", ")", "{", "$", "criteria", "=", "Criteria", "::", "create", "(", ")", "->", "where", "(", "Criteria", "::", "expr", "(", ")", "->", "eq", "(", "'name'", ",", "$", "name", ")", ")", ";", "re...
Get a child account by name @author Tom Haskins-Vaughan <tom@tomhv.uk> @since 0.8.0 @param string $name @return Account
[ "Get", "a", "child", "account", "by", "name" ]
d9c421f30922b461483731983c59beb26047fb7f
https://github.com/phospr/DoubleEntryBundle/blob/d9c421f30922b461483731983c59beb26047fb7f/Model/Account.php#L709-L716
198,256
RudyMas/Emvc_Router
src/Router/Router.php
Router.respondOnOptionsRequest
private function respondOnOptionsRequest(int $httpResponseCode): void { http_response_code($httpResponseCode); header('Content-Type: application/json'); header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Headers: *'); exit; }
php
private function respondOnOptionsRequest(int $httpResponseCode): void { http_response_code($httpResponseCode); header('Content-Type: application/json'); header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Headers: *'); exit; }
[ "private", "function", "respondOnOptionsRequest", "(", "int", "$", "httpResponseCode", ")", ":", "void", "{", "http_response_code", "(", "$", "httpResponseCode", ")", ";", "header", "(", "'Content-Type: application/json'", ")", ";", "header", "(", "'Access-Control-All...
Send confirmation for an OPTIONS request @param int $httpResponseCode
[ "Send", "confirmation", "for", "an", "OPTIONS", "request" ]
80eada990a5f9471d7516e988d464ba2bfa9ebd3
https://github.com/RudyMas/Emvc_Router/blob/80eada990a5f9471d7516e988d464ba2bfa9ebd3/src/Router/Router.php#L344-L351
198,257
RudyMas/Emvc_Router
src/Router/Router.php
Router.checkFunctions
private function checkFunctions() { if (!function_exists('apache_request_headers')) { function apache_request_headers() { $arh = array(); $rx_http = '/\AHTTP_/'; foreach ($_SERVER as $key => $val) { if (preg_match($r...
php
private function checkFunctions() { if (!function_exists('apache_request_headers')) { function apache_request_headers() { $arh = array(); $rx_http = '/\AHTTP_/'; foreach ($_SERVER as $key => $val) { if (preg_match($r...
[ "private", "function", "checkFunctions", "(", ")", "{", "if", "(", "!", "function_exists", "(", "'apache_request_headers'", ")", ")", "{", "function", "apache_request_headers", "(", ")", "{", "$", "arh", "=", "array", "(", ")", ";", "$", "rx_http", "=", "'...
Checks if a certain function exists on the server, or not. I needed to add this, because else the router wouldn't work on a NGINX server!
[ "Checks", "if", "a", "certain", "function", "exists", "on", "the", "server", "or", "not", ".", "I", "needed", "to", "add", "this", "because", "else", "the", "router", "wouldn", "t", "work", "on", "a", "NGINX", "server!" ]
80eada990a5f9471d7516e988d464ba2bfa9ebd3
https://github.com/RudyMas/Emvc_Router/blob/80eada990a5f9471d7516e988d464ba2bfa9ebd3/src/Router/Router.php#L357-L380
198,258
mageware/magento2-common
Model/Feed.php
Feed.getFeedXml
protected function getFeedXml() { $client = $this->curlFactory->create(); $client->setConfig($this->getCurlConfig()); $client->write(\Zend_Http_Client::GET, self::ENDPOINT, '1.0'); $response = $client->read(); $client->close(); if (false !== $response) { ...
php
protected function getFeedXml() { $client = $this->curlFactory->create(); $client->setConfig($this->getCurlConfig()); $client->write(\Zend_Http_Client::GET, self::ENDPOINT, '1.0'); $response = $client->read(); $client->close(); if (false !== $response) { ...
[ "protected", "function", "getFeedXml", "(", ")", "{", "$", "client", "=", "$", "this", "->", "curlFactory", "->", "create", "(", ")", ";", "$", "client", "->", "setConfig", "(", "$", "this", "->", "getCurlConfig", "(", ")", ")", ";", "$", "client", "...
Retrieve feed data as XML element @return \SimpleXMLElement|bool
[ "Retrieve", "feed", "data", "as", "XML", "element" ]
3cf0dff5600f614d9081a4d585e257bbec27b1e6
https://github.com/mageware/magento2-common/blob/3cf0dff5600f614d9081a4d585e257bbec27b1e6/Model/Feed.php#L83-L106
198,259
mageware/magento2-common
Model/Feed.php
Feed.getCurlConfig
protected function getCurlConfig() { $useragent = $this->productMetadata->getName() . '/' . $this->productMetadata->getVersion() . ' (' . $this->productMetadata->getEdition() . ')'; return [ 'useragent' => $useragent, 'timeout' => 2 ]; }
php
protected function getCurlConfig() { $useragent = $this->productMetadata->getName() . '/' . $this->productMetadata->getVersion() . ' (' . $this->productMetadata->getEdition() . ')'; return [ 'useragent' => $useragent, 'timeout' => 2 ]; }
[ "protected", "function", "getCurlConfig", "(", ")", "{", "$", "useragent", "=", "$", "this", "->", "productMetadata", "->", "getName", "(", ")", ".", "'/'", ".", "$", "this", "->", "productMetadata", "->", "getVersion", "(", ")", ".", "' ('", ".", "$", ...
Retrieve config for curl @return array
[ "Retrieve", "config", "for", "curl" ]
3cf0dff5600f614d9081a4d585e257bbec27b1e6
https://github.com/mageware/magento2-common/blob/3cf0dff5600f614d9081a4d585e257bbec27b1e6/Model/Feed.php#L113-L123
198,260
anime-db/catalog-bundle
src/Service/Item/ListControls.php
ListControls.getLimit
public function getLimit(array $query = []) { if (isset($query['limit']) && is_numeric($query['limit']) && in_array($query['limit'], self::$limits)) { return (int) $query['limit']; } return self::DEFAULT_LIMIT; }
php
public function getLimit(array $query = []) { if (isset($query['limit']) && is_numeric($query['limit']) && in_array($query['limit'], self::$limits)) { return (int) $query['limit']; } return self::DEFAULT_LIMIT; }
[ "public", "function", "getLimit", "(", "array", "$", "query", "=", "[", "]", ")", "{", "if", "(", "isset", "(", "$", "query", "[", "'limit'", "]", ")", "&&", "is_numeric", "(", "$", "query", "[", "'limit'", "]", ")", "&&", "in_array", "(", "$", "...
Get limit list items. @param array $query @return int
[ "Get", "limit", "list", "items", "." ]
631b6f92a654e91bee84f46218c52cf42bdb8606
https://github.com/anime-db/catalog-bundle/blob/631b6f92a654e91bee84f46218c52cf42bdb8606/src/Service/Item/ListControls.php#L95-L102
198,261
anime-db/catalog-bundle
src/Service/Item/ListControls.php
ListControls.getLimits
public function getLimits(array $query = []) { $limits = []; $current_limit = $this->getLimit($query); foreach (self::$limits as $limit) { $limits[] = [ 'link' => '?'.http_build_query(array_merge($query, ['limit' => $limit])), 'name' => $limit ? $...
php
public function getLimits(array $query = []) { $limits = []; $current_limit = $this->getLimit($query); foreach (self::$limits as $limit) { $limits[] = [ 'link' => '?'.http_build_query(array_merge($query, ['limit' => $limit])), 'name' => $limit ? $...
[ "public", "function", "getLimits", "(", "array", "$", "query", "=", "[", "]", ")", "{", "$", "limits", "=", "[", "]", ";", "$", "current_limit", "=", "$", "this", "->", "getLimit", "(", "$", "query", ")", ";", "foreach", "(", "self", "::", "$", "...
Get list limits. @param array $query @return array
[ "Get", "list", "limits", "." ]
631b6f92a654e91bee84f46218c52cf42bdb8606
https://github.com/anime-db/catalog-bundle/blob/631b6f92a654e91bee84f46218c52cf42bdb8606/src/Service/Item/ListControls.php#L111-L126
198,262
SagittariusX/Beluga.IO
src/Beluga/IO/MimeTypeTool.php
MimeTypeTool.GetByExtension
public static function GetByExtension( string $extension ) : string { $normalizedExtension = \strtolower( \ltrim( $extension, '.' ) ); if ( isset( static::$mimeTypes[ $normalizedExtension ] ) ) { return static::$mimeTypes[ $normalizedExtension ]; } return 'application/octet-...
php
public static function GetByExtension( string $extension ) : string { $normalizedExtension = \strtolower( \ltrim( $extension, '.' ) ); if ( isset( static::$mimeTypes[ $normalizedExtension ] ) ) { return static::$mimeTypes[ $normalizedExtension ]; } return 'application/octet-...
[ "public", "static", "function", "GetByExtension", "(", "string", "$", "extension", ")", ":", "string", "{", "$", "normalizedExtension", "=", "\\", "strtolower", "(", "\\", "ltrim", "(", "$", "extension", ",", "'.'", ")", ")", ";", "if", "(", "isset", "("...
Returns the MIME type, associated with the defined file name extension. @param string $extension The file name extension (with or without the leading dot) @return string Returns the MIME type
[ "Returns", "the", "MIME", "type", "associated", "with", "the", "defined", "file", "name", "extension", "." ]
c8af09a1b3cc8a955e43c89b70779d11b30ae29e
https://github.com/SagittariusX/Beluga.IO/blob/c8af09a1b3cc8a955e43c89b70779d11b30ae29e/src/Beluga/IO/MimeTypeTool.php#L210-L222
198,263
SagittariusX/Beluga.IO
src/Beluga/IO/MimeTypeTool.php
MimeTypeTool.HasGifHeader
public static function HasGifHeader( string $file, string $firstBytes = null ) : bool { if ( empty( $firstBytes ) ) { $firstBytes = File::ReadFirstBytes( $file, 6 ); } return (bool) \preg_match( '~^GIF\d~', $firstBytes ); }
php
public static function HasGifHeader( string $file, string $firstBytes = null ) : bool { if ( empty( $firstBytes ) ) { $firstBytes = File::ReadFirstBytes( $file, 6 ); } return (bool) \preg_match( '~^GIF\d~', $firstBytes ); }
[ "public", "static", "function", "HasGifHeader", "(", "string", "$", "file", ",", "string", "$", "firstBytes", "=", "null", ")", ":", "bool", "{", "if", "(", "empty", "(", "$", "firstBytes", ")", ")", "{", "$", "firstBytes", "=", "File", "::", "ReadFirs...
Returns if the defined file uses a valid GIF image file header. @param string $file @param string $firstBytes If defined it is used to get image info from. @return boolean
[ "Returns", "if", "the", "defined", "file", "uses", "a", "valid", "GIF", "image", "file", "header", "." ]
c8af09a1b3cc8a955e43c89b70779d11b30ae29e
https://github.com/SagittariusX/Beluga.IO/blob/c8af09a1b3cc8a955e43c89b70779d11b30ae29e/src/Beluga/IO/MimeTypeTool.php#L283-L293
198,264
SagittariusX/Beluga.IO
src/Beluga/IO/MimeTypeTool.php
MimeTypeTool.HasJpegHeader
public static function HasJpegHeader( string $file, string $firstBytes = null ) : bool { if ( empty( $firstBytes ) ) { $firstBytes = File::ReadFirstBytes( $file, 4 ); } return ( ( 'ff' == \dechex( \ord( $firstBytes [ 0 ] ) ) ) && ( 'd8' == \dechex( \ord( $first...
php
public static function HasJpegHeader( string $file, string $firstBytes = null ) : bool { if ( empty( $firstBytes ) ) { $firstBytes = File::ReadFirstBytes( $file, 4 ); } return ( ( 'ff' == \dechex( \ord( $firstBytes [ 0 ] ) ) ) && ( 'd8' == \dechex( \ord( $first...
[ "public", "static", "function", "HasJpegHeader", "(", "string", "$", "file", ",", "string", "$", "firstBytes", "=", "null", ")", ":", "bool", "{", "if", "(", "empty", "(", "$", "firstBytes", ")", ")", "{", "$", "firstBytes", "=", "File", "::", "ReadFir...
Returns if the defined file uses a valid JPEG image file header. @param string $file @param string $firstBytes If defined it is used to get image info from. @return boolean
[ "Returns", "if", "the", "defined", "file", "uses", "a", "valid", "JPEG", "image", "file", "header", "." ]
c8af09a1b3cc8a955e43c89b70779d11b30ae29e
https://github.com/SagittariusX/Beluga.IO/blob/c8af09a1b3cc8a955e43c89b70779d11b30ae29e/src/Beluga/IO/MimeTypeTool.php#L302-L316
198,265
SagittariusX/Beluga.IO
src/Beluga/IO/MimeTypeTool.php
MimeTypeTool.GetWebImageMimeTypeByHeaderCode
public static function GetWebImageMimeTypeByHeaderCode( string $file ) { $f8b = File::ReadFirstBytes( $file, 8 ); $ext = \strtolower( File::GetExtensionName( $file ) ); switch ( $ext ) { case 'gif': if ( static::HasGifHeader( $file, $f8b ) ) { r...
php
public static function GetWebImageMimeTypeByHeaderCode( string $file ) { $f8b = File::ReadFirstBytes( $file, 8 ); $ext = \strtolower( File::GetExtensionName( $file ) ); switch ( $ext ) { case 'gif': if ( static::HasGifHeader( $file, $f8b ) ) { r...
[ "public", "static", "function", "GetWebImageMimeTypeByHeaderCode", "(", "string", "$", "file", ")", "{", "$", "f8b", "=", "File", "::", "ReadFirstBytes", "(", "$", "file", ",", "8", ")", ";", "$", "ext", "=", "\\", "strtolower", "(", "File", "::", "GetEx...
Returns the web image MIME type, depending to file name extension and used image file header. If its not a web image FALSE is returned. Valid web image ar images of type GIF, PNG and JPEG. @param string $file @return string|FALSE
[ "Returns", "the", "web", "image", "MIME", "type", "depending", "to", "file", "name", "extension", "and", "used", "image", "file", "header", "." ]
c8af09a1b3cc8a955e43c89b70779d11b30ae29e
https://github.com/SagittariusX/Beluga.IO/blob/c8af09a1b3cc8a955e43c89b70779d11b30ae29e/src/Beluga/IO/MimeTypeTool.php#L351-L379
198,266
CeusMedia/Router
src/Registry.php
Registry.add
public function add( Route $route ){ $routeId = $route->getId(); if( array_key_exists( $routeId, $this->routes ) ){ throw new \DomainException( sprintf( 'A route for pattern and method is already registered: %2$s %1$s', $route->getPattern(), $route->getMethod() ) ); } $this->routes[$routeId] =...
php
public function add( Route $route ){ $routeId = $route->getId(); if( array_key_exists( $routeId, $this->routes ) ){ throw new \DomainException( sprintf( 'A route for pattern and method is already registered: %2$s %1$s', $route->getPattern(), $route->getMethod() ) ); } $this->routes[$routeId] =...
[ "public", "function", "add", "(", "Route", "$", "route", ")", "{", "$", "routeId", "=", "$", "route", "->", "getId", "(", ")", ";", "if", "(", "array_key_exists", "(", "$", "routeId", ",", "$", "this", "->", "routes", ")", ")", "{", "throw", "new",...
Adds route to route registry by route object. @access public @param Route $route Route object @return string ID of added route @throws DomainException if route is already registered by route ID
[ "Adds", "route", "to", "route", "registry", "by", "route", "object", "." ]
d4c68e8c2895abf5c13835e1671635507e2fb21d
https://github.com/CeusMedia/Router/blob/d4c68e8c2895abf5c13835e1671635507e2fb21d/src/Registry.php#L51-L62
198,267
CeusMedia/Router
src/Registry.php
Registry.loadFromJsonFile
public function loadFromJsonFile( $filePath, $folderPath = NULL ){ if( !file_exists( $filePath ) && $folderPath ){ $this->assembleJsonFileFromFolder( $filePath, $folderPath ); } $data = \FS_File_JSON_Reader::load( $filePath ); foreach( $data as $item ){ if( !isset( $item->controller ) ) throw new \Out...
php
public function loadFromJsonFile( $filePath, $folderPath = NULL ){ if( !file_exists( $filePath ) && $folderPath ){ $this->assembleJsonFileFromFolder( $filePath, $folderPath ); } $data = \FS_File_JSON_Reader::load( $filePath ); foreach( $data as $item ){ if( !isset( $item->controller ) ) throw new \Out...
[ "public", "function", "loadFromJsonFile", "(", "$", "filePath", ",", "$", "folderPath", "=", "NULL", ")", "{", "if", "(", "!", "file_exists", "(", "$", "filePath", ")", "&&", "$", "folderPath", ")", "{", "$", "this", "->", "assembleJsonFileFromFolder", "("...
Adds a list of routes defined in a JSON file. @access public @param string $filePath Relative or absolute file path of JSON file to load @param string $folderPath Relative or absolute path to folder containing JSON files to assemble @return void @throws OutOfRangeException if route set has no controller @thr...
[ "Adds", "a", "list", "of", "routes", "defined", "in", "a", "JSON", "file", "." ]
d4c68e8c2895abf5c13835e1671635507e2fb21d
https://github.com/CeusMedia/Router/blob/d4c68e8c2895abf5c13835e1671635507e2fb21d/src/Registry.php#L114-L138
198,268
CeusMedia/Router
src/Registry.php
Registry.remove
public function remove( $routeId, $strict = TRUE ){ if( array_key_exists( $routeId, $this->routes ) ){ unset( $this->routes[$routeId] ); return TRUE; } if( $strict ) throw new \DomainException( 'No route found for this route ID' ); return FALSE; }
php
public function remove( $routeId, $strict = TRUE ){ if( array_key_exists( $routeId, $this->routes ) ){ unset( $this->routes[$routeId] ); return TRUE; } if( $strict ) throw new \DomainException( 'No route found for this route ID' ); return FALSE; }
[ "public", "function", "remove", "(", "$", "routeId", ",", "$", "strict", "=", "TRUE", ")", "{", "if", "(", "array_key_exists", "(", "$", "routeId", ",", "$", "this", "->", "routes", ")", ")", "{", "unset", "(", "$", "this", "->", "routes", "[", "$"...
Removes a route from route registry by its ID. @access public @param string $routeId ID of route @param boolean $strict Throw exception if route ID is invalid @return boolean TRUE is route existed and has been removed @throws DomainException if route ID has not been found in registry (strict mode only)
[ "Removes", "a", "route", "from", "route", "registry", "by", "its", "ID", "." ]
d4c68e8c2895abf5c13835e1671635507e2fb21d
https://github.com/CeusMedia/Router/blob/d4c68e8c2895abf5c13835e1671635507e2fb21d/src/Registry.php#L148-L156
198,269
phpffcms/ffcms-core
src/Arch/Widget.php
Widget.widget
public static function widget(?array $params = null): ?string { self::$class = get_called_class(); self::$view = App::$View; self::$request = App::$Request; self::$response = App::$Response; // check if class exist if (!class_exists(self::$class)) { retur...
php
public static function widget(?array $params = null): ?string { self::$class = get_called_class(); self::$view = App::$View; self::$request = App::$Request; self::$response = App::$Response; // check if class exist if (!class_exists(self::$class)) { retur...
[ "public", "static", "function", "widget", "(", "?", "array", "$", "params", "=", "null", ")", ":", "?", "string", "{", "self", "::", "$", "class", "=", "get_called_class", "(", ")", ";", "self", "::", "$", "view", "=", "App", "::", "$", "View", ";"...
Build and display widget @param array|null $params @return null|string
[ "Build", "and", "display", "widget" ]
44a309553ef9f115ccfcfd71f2ac6e381c612082
https://github.com/phpffcms/ffcms-core/blob/44a309553ef9f115ccfcfd71f2ac6e381c612082/src/Arch/Widget.php#L29-L54
198,270
agentmedia/phine-core
src/Core/Modules/Backend/ContainerList.php
ContainerList.CanCreate
protected function CanCreate() { return self::Guard()->Allow(BackendAction::Create(), new Container()) && self::Guard()->Allow(BackendAction::UseIt(), new ContainerForm()); }
php
protected function CanCreate() { return self::Guard()->Allow(BackendAction::Create(), new Container()) && self::Guard()->Allow(BackendAction::UseIt(), new ContainerForm()); }
[ "protected", "function", "CanCreate", "(", ")", "{", "return", "self", "::", "Guard", "(", ")", "->", "Allow", "(", "BackendAction", "::", "Create", "(", ")", ",", "new", "Container", "(", ")", ")", "&&", "self", "::", "Guard", "(", ")", "->", "Allow...
True if a new container can be created @return bool
[ "True", "if", "a", "new", "container", "can", "be", "created" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Modules/Backend/ContainerList.php#L109-L113
198,271
agentmedia/phine-core
src/Core/Modules/Backend/ContainerList.php
ContainerList.CanEdit
protected function CanEdit(Container $container) { return self::Guard()->Allow(BackendAction::Edit(), $container) && self::Guard()->Allow(BackendAction::UseIt(), new ContainerForm()); }
php
protected function CanEdit(Container $container) { return self::Guard()->Allow(BackendAction::Edit(), $container) && self::Guard()->Allow(BackendAction::UseIt(), new ContainerForm()); }
[ "protected", "function", "CanEdit", "(", "Container", "$", "container", ")", "{", "return", "self", "::", "Guard", "(", ")", "->", "Allow", "(", "BackendAction", "::", "Edit", "(", ")", ",", "$", "container", ")", "&&", "self", "::", "Guard", "(", ")",...
True if the container can be edited @param Container $container @return boolean
[ "True", "if", "the", "container", "can", "be", "edited" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Modules/Backend/ContainerList.php#L119-L123
198,272
brightnucleus/options-store
src/Option/OptionTrait.php
OptionTrait.setValue
public function setValue($value, $persist = true) { if ($this->isEmpty($value) && ! $this->flags & Value::CAN_BE_EMPTY) { throw FailedToValidate::fromValue($value, $this); } if (! $this->isEmpty($value)) { $value = $this->validate($value); } if (null...
php
public function setValue($value, $persist = true) { if ($this->isEmpty($value) && ! $this->flags & Value::CAN_BE_EMPTY) { throw FailedToValidate::fromValue($value, $this); } if (! $this->isEmpty($value)) { $value = $this->validate($value); } if (null...
[ "public", "function", "setValue", "(", "$", "value", ",", "$", "persist", "=", "true", ")", "{", "if", "(", "$", "this", "->", "isEmpty", "(", "$", "value", ")", "&&", "!", "$", "this", "->", "flags", "&", "Value", "::", "CAN_BE_EMPTY", ")", "{", ...
Set the raw value. @since 0.1.0 @param mixed $value New raw value. @param bool $persist Optional. Whether to immediately persist the value. @return Option Modified Option object. Can differ from the original one.
[ "Set", "the", "raw", "value", "." ]
9a9ef2a160bbacd69fe3e9db0be8ed89e6905ef1
https://github.com/brightnucleus/options-store/blob/9a9ef2a160bbacd69fe3e9db0be8ed89e6905ef1/src/Option/OptionTrait.php#L83-L107
198,273
jdmaymeow/cake-utility
src/Random/Dice.php
Dice.roll
public function roll($config = '1x6') { // parse config and set variables $config = $this->parseConfig($config); $diceType = $config[2]; $count = $config[1]; // initialize rolls and value variables $rolls = []; $value = 0; // roll dice for ($i ...
php
public function roll($config = '1x6') { // parse config and set variables $config = $this->parseConfig($config); $diceType = $config[2]; $count = $config[1]; // initialize rolls and value variables $rolls = []; $value = 0; // roll dice for ($i ...
[ "public", "function", "roll", "(", "$", "config", "=", "'1x6'", ")", "{", "// parse config and set variables", "$", "config", "=", "$", "this", "->", "parseConfig", "(", "$", "config", ")", ";", "$", "diceType", "=", "$", "config", "[", "2", "]", ";", ...
Roll Dice and return array with all rolls and sum fo your rolls. @param null $config Config @return array
[ "Roll", "Dice", "and", "return", "array", "with", "all", "rolls", "and", "sum", "fo", "your", "rolls", "." ]
9da54f12a0f41fb1d590924db0c1130978b6e94e
https://github.com/jdmaymeow/cake-utility/blob/9da54f12a0f41fb1d590924db0c1130978b6e94e/src/Random/Dice.php#L36-L55
198,274
SlabPHP/configuration-manager
src/Manager.php
Manager.buildFileList
private function buildFileList($directories = [], $fileList = []) { $output = []; foreach ($directories as $directory) { foreach ($fileList as $file) { $fileName = $directory . DIRECTORY_SEPARATOR . $file; if (is_file($fileName) && is_readable($fileName))...
php
private function buildFileList($directories = [], $fileList = []) { $output = []; foreach ($directories as $directory) { foreach ($fileList as $file) { $fileName = $directory . DIRECTORY_SEPARATOR . $file; if (is_file($fileName) && is_readable($fileName))...
[ "private", "function", "buildFileList", "(", "$", "directories", "=", "[", "]", ",", "$", "fileList", "=", "[", "]", ")", "{", "$", "output", "=", "[", "]", ";", "foreach", "(", "$", "directories", "as", "$", "directory", ")", "{", "foreach", "(", ...
Build file list @param array $directories @param array $fileList @return array
[ "Build", "file", "list" ]
3f36b528b8d7b0ffbb43ec933e82efd7312a3397
https://github.com/SlabPHP/configuration-manager/blob/3f36b528b8d7b0ffbb43ec933e82efd7312a3397/src/Manager.php#L114-L128
198,275
SlabPHP/configuration-manager
src/Manager.php
Manager.parseConfigurationFiles
private function parseConfigurationFiles($fileList) { foreach ($fileList as $file) { if (!is_file($file) || !is_readable($file)) { if ($this->configuration->getLog()) { $this->configuration->getLog()->error("Failed to load configuration file " ...
php
private function parseConfigurationFiles($fileList) { foreach ($fileList as $file) { if (!is_file($file) || !is_readable($file)) { if ($this->configuration->getLog()) { $this->configuration->getLog()->error("Failed to load configuration file " ...
[ "private", "function", "parseConfigurationFiles", "(", "$", "fileList", ")", "{", "foreach", "(", "$", "fileList", "as", "$", "file", ")", "{", "if", "(", "!", "is_file", "(", "$", "file", ")", "||", "!", "is_readable", "(", "$", "file", ")", ")", "{...
Go through each configuration directory and get the data @param string[] $fileList
[ "Go", "through", "each", "configuration", "directory", "and", "get", "the", "data" ]
3f36b528b8d7b0ffbb43ec933e82efd7312a3397
https://github.com/SlabPHP/configuration-manager/blob/3f36b528b8d7b0ffbb43ec933e82efd7312a3397/src/Manager.php#L136-L167
198,276
SlabPHP/configuration-manager
src/Manager.php
Manager.mergeConfigurationOption
private function mergeConfigurationOption(&$currentNode, $name, $value) { if (empty($currentNode) || empty($name)) { return; } //We're going to be building our own objects here if (is_object($value)) { $value = (array)$value; } if (is_array($...
php
private function mergeConfigurationOption(&$currentNode, $name, $value) { if (empty($currentNode) || empty($name)) { return; } //We're going to be building our own objects here if (is_object($value)) { $value = (array)$value; } if (is_array($...
[ "private", "function", "mergeConfigurationOption", "(", "&", "$", "currentNode", ",", "$", "name", ",", "$", "value", ")", "{", "if", "(", "empty", "(", "$", "currentNode", ")", "||", "empty", "(", "$", "name", ")", ")", "{", "return", ";", "}", "//W...
Merge a configuration option in @param mixed $currentNode @param string $name @param mixed $value
[ "Merge", "a", "configuration", "option", "in" ]
3f36b528b8d7b0ffbb43ec933e82efd7312a3397
https://github.com/SlabPHP/configuration-manager/blob/3f36b528b8d7b0ffbb43ec933e82efd7312a3397/src/Manager.php#L222-L268
198,277
native5/native5-sdk-client-php
src/Native5/Control/DefaultController.php
DefaultController.execute
public function execute($request) { ob_start(); $logger = $GLOBALS['logger']; $this->_request = $request; $this->_response = new HttpResponse(); try { WebSessionManager::updateActiveSession(); foreach ($this->_preProcessors as $preProcessor) ...
php
public function execute($request) { ob_start(); $logger = $GLOBALS['logger']; $this->_request = $request; $this->_response = new HttpResponse(); try { WebSessionManager::updateActiveSession(); foreach ($this->_preProcessors as $preProcessor) ...
[ "public", "function", "execute", "(", "$", "request", ")", "{", "ob_start", "(", ")", ";", "$", "logger", "=", "$", "GLOBALS", "[", "'logger'", "]", ";", "$", "this", "->", "_request", "=", "$", "request", ";", "$", "this", "->", "_response", "=", ...
Handles Request Execution. @param mixed $request HttpRequest @see Native5/Route/HttpRequest @access public @return void
[ "Handles", "Request", "Execution", "." ]
e1f598cf27654d81bb5facace1990b737242a2f9
https://github.com/native5/native5-sdk-client-php/blob/e1f598cf27654d81bb5facace1990b737242a2f9/src/Native5/Control/DefaultController.php#L104-L158
198,278
SlabPHP/controllers
src/Sequenced.php
Sequenced.buildFailedOutputObject
protected function buildFailedOutputObject() { $error = '<!DOCTYPE html><html><head><title>An Error Occurred</title></head><body>'; $error.= '<h1>Error ' . $this->statusCode . '</h1>'; $error.= '<p>Sorry about that, please try again later!</p></body></html>'; $output = new \Slab\Con...
php
protected function buildFailedOutputObject() { $error = '<!DOCTYPE html><html><head><title>An Error Occurred</title></head><body>'; $error.= '<h1>Error ' . $this->statusCode . '</h1>'; $error.= '<p>Sorry about that, please try again later!</p></body></html>'; $output = new \Slab\Con...
[ "protected", "function", "buildFailedOutputObject", "(", ")", "{", "$", "error", "=", "'<!DOCTYPE html><html><head><title>An Error Occurred</title></head><body>'", ";", "$", "error", ".=", "'<h1>Error '", ".", "$", "this", "->", "statusCode", ".", "'</h1>'", ";", "$", ...
When a call queue fails, this method will be used @return \Slab\Components\Output\ControllerResponseInterface
[ "When", "a", "call", "queue", "fails", "this", "method", "will", "be", "used" ]
a1c4fded0265100a85904dd664b972a7f8687652
https://github.com/SlabPHP/controllers/blob/a1c4fded0265100a85904dd664b972a7f8687652/src/Sequenced.php#L97-L111
198,279
rollerworks/search-core
LazyFieldSetRegistry.php
LazyFieldSetRegistry.create
public static function create(array $configurators = []): self { $names = array_keys($configurators); return new self(new ClosureContainer($configurators), array_combine($names, $names)); }
php
public static function create(array $configurators = []): self { $names = array_keys($configurators); return new self(new ClosureContainer($configurators), array_combine($names, $names)); }
[ "public", "static", "function", "create", "(", "array", "$", "configurators", "=", "[", "]", ")", ":", "self", "{", "$", "names", "=", "array_keys", "(", "$", "configurators", ")", ";", "return", "new", "self", "(", "new", "ClosureContainer", "(", "$", ...
Creates a new LazyFieldSetRegistry with easy factories for loading. @param \Closure[] $configurators an array of lazy loading configurators. The Closure when called is expected to return a FieldSetConfiguratorInterface object @return LazyFieldSetRegistry
[ "Creates", "a", "new", "LazyFieldSetRegistry", "with", "easy", "factories", "for", "loading", "." ]
6b5671b8c4d6298906ded768261b0a59845140fb
https://github.com/rollerworks/search-core/blob/6b5671b8c4d6298906ded768261b0a59845140fb/LazyFieldSetRegistry.php#L66-L71
198,280
rollerworks/search-core
LazyFieldSetRegistry.php
LazyFieldSetRegistry.getConfigurator
public function getConfigurator(string $name): FieldSetConfigurator { if (!isset($this->configurators[$name])) { if (isset($this->serviceIds[$name])) { $configurator = $this->container->get($this->serviceIds[$name]); } elseif (class_exists($name)) { //...
php
public function getConfigurator(string $name): FieldSetConfigurator { if (!isset($this->configurators[$name])) { if (isset($this->serviceIds[$name])) { $configurator = $this->container->get($this->serviceIds[$name]); } elseif (class_exists($name)) { //...
[ "public", "function", "getConfigurator", "(", "string", "$", "name", ")", ":", "FieldSetConfigurator", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "configurators", "[", "$", "name", "]", ")", ")", "{", "if", "(", "isset", "(", "$", "this", ...
Returns a FieldSetConfigurator by name. @param string $name The name of the FieldSet configurator @throws InvalidArgumentException if the configurator can not be retrieved @return FieldSetConfigurator
[ "Returns", "a", "FieldSetConfigurator", "by", "name", "." ]
6b5671b8c4d6298906ded768261b0a59845140fb
https://github.com/rollerworks/search-core/blob/6b5671b8c4d6298906ded768261b0a59845140fb/LazyFieldSetRegistry.php#L82-L102
198,281
rollerworks/search-core
LazyFieldSetRegistry.php
LazyFieldSetRegistry.hasConfigurator
public function hasConfigurator(string $name): bool { if (isset($this->configurators[$name])) { return true; } if (isset($this->serviceIds[$name])) { return true; } return class_exists($name) && \in_array(FieldSetConfigurator::class, class_implements...
php
public function hasConfigurator(string $name): bool { if (isset($this->configurators[$name])) { return true; } if (isset($this->serviceIds[$name])) { return true; } return class_exists($name) && \in_array(FieldSetConfigurator::class, class_implements...
[ "public", "function", "hasConfigurator", "(", "string", "$", "name", ")", ":", "bool", "{", "if", "(", "isset", "(", "$", "this", "->", "configurators", "[", "$", "name", "]", ")", ")", "{", "return", "true", ";", "}", "if", "(", "isset", "(", "$",...
Returns whether the given FieldSetConfigurator is supported. @param string $name The name of the FieldSet configurator @return bool
[ "Returns", "whether", "the", "given", "FieldSetConfigurator", "is", "supported", "." ]
6b5671b8c4d6298906ded768261b0a59845140fb
https://github.com/rollerworks/search-core/blob/6b5671b8c4d6298906ded768261b0a59845140fb/LazyFieldSetRegistry.php#L111-L122
198,282
DoSomething/mb-toolbox
src/MB_Configuration.php
MB_Configuration.getProperty
public function getProperty($key, $notifyWarnings = true) { if (!(isset($this->configSettings[$key])) && $notifyWarnings) { echo 'MB_Configuration->getProperty() - Warning: "' . $key . '" not defined.', PHP_EOL; $callers = debug_backtrace(); echo '- Called from: ' . $callers[1]['function'], PHP_...
php
public function getProperty($key, $notifyWarnings = true) { if (!(isset($this->configSettings[$key])) && $notifyWarnings) { echo 'MB_Configuration->getProperty() - Warning: "' . $key . '" not defined.', PHP_EOL; $callers = debug_backtrace(); echo '- Called from: ' . $callers[1]['function'], PHP_...
[ "public", "function", "getProperty", "(", "$", "key", ",", "$", "notifyWarnings", "=", "true", ")", "{", "if", "(", "!", "(", "isset", "(", "$", "this", "->", "configSettings", "[", "$", "key", "]", ")", ")", "&&", "$", "notifyWarnings", ")", "{", ...
Get property in MB_Configuration instance. @param string $key The name of property to get. @param boolean $notifyWarnings Flag to enable / disable warning and traceback if property not found.
[ "Get", "property", "in", "MB_Configuration", "instance", "." ]
ceec5fc594bae137d1ab1f447344800343b62ac6
https://github.com/DoSomething/mb-toolbox/blob/ceec5fc594bae137d1ab1f447344800343b62ac6/src/MB_Configuration.php#L99-L110
198,283
DoSomething/mb-toolbox
src/MB_Configuration.php
MB_Configuration.exchangeSettings
public function exchangeSettings($targetExchange) { $settings = null; if (isset($this->configSettings['configFile']->rabbit->exchanges)) { foreach ($this->configSettings['configFile']->rabbit->exchanges as $exchange => $exchangeSettings) { if ($exchange == $targetExchange) { $settings...
php
public function exchangeSettings($targetExchange) { $settings = null; if (isset($this->configSettings['configFile']->rabbit->exchanges)) { foreach ($this->configSettings['configFile']->rabbit->exchanges as $exchange => $exchangeSettings) { if ($exchange == $targetExchange) { $settings...
[ "public", "function", "exchangeSettings", "(", "$", "targetExchange", ")", "{", "$", "settings", "=", "null", ";", "if", "(", "isset", "(", "$", "this", "->", "configSettings", "[", "'configFile'", "]", "->", "rabbit", "->", "exchanges", ")", ")", "{", "...
Gather all setting for a specific exchange @param string $targetExchange The name of the exchange to gather setting for. @return array $settings The exchange settings in the format needed for a RabbitMQ connection.
[ "Gather", "all", "setting", "for", "a", "specific", "exchange" ]
ceec5fc594bae137d1ab1f447344800343b62ac6
https://github.com/DoSomething/mb-toolbox/blob/ceec5fc594bae137d1ab1f447344800343b62ac6/src/MB_Configuration.php#L204-L225
198,284
DoSomething/mb-toolbox
src/MB_Configuration.php
MB_Configuration._gatherSettings
private static function _gatherSettings($source) { if (strpos('http://', $source) !== false) { echo 'cURL sources are not currently supported.', PHP_EOL; } elseif (file_exists($source)) { $settings = json_decode(implode(file($source))); return $settings; } else { echo 'Source: ' ....
php
private static function _gatherSettings($source) { if (strpos('http://', $source) !== false) { echo 'cURL sources are not currently supported.', PHP_EOL; } elseif (file_exists($source)) { $settings = json_decode(implode(file($source))); return $settings; } else { echo 'Source: ' ....
[ "private", "static", "function", "_gatherSettings", "(", "$", "source", ")", "{", "if", "(", "strpos", "(", "'http://'", ",", "$", "source", ")", "!==", "false", ")", "{", "echo", "'cURL sources are not currently supported.'", ",", "PHP_EOL", ";", "}", "elseif...
Gather all Message Broker configuration settings from the defined source. @param string $source Source can be the path to a file or a URL to an endpoint.
[ "Gather", "all", "Message", "Broker", "configuration", "settings", "from", "the", "defined", "source", "." ]
ceec5fc594bae137d1ab1f447344800343b62ac6
https://github.com/DoSomething/mb-toolbox/blob/ceec5fc594bae137d1ab1f447344800343b62ac6/src/MB_Configuration.php#L264-L275
198,285
linpax/microphp-framework
src/file/Filesystem.php
Filesystem.setDriver
public function setDriver(array $params = []) { $driverName = !empty($params['driver']) ? $params['driver'] : 'local'; $this->driver = new $driverName($params); }
php
public function setDriver(array $params = []) { $driverName = !empty($params['driver']) ? $params['driver'] : 'local'; $this->driver = new $driverName($params); }
[ "public", "function", "setDriver", "(", "array", "$", "params", "=", "[", "]", ")", "{", "$", "driverName", "=", "!", "empty", "(", "$", "params", "[", "'driver'", "]", ")", "?", "$", "params", "[", "'driver'", "]", ":", "'local'", ";", "$", "this"...
Set driver usage driver params @access public @param array $params Driver params @return void
[ "Set", "driver", "usage", "driver", "params" ]
11f3370f3f64c516cce9b84ecd8276c6e9ae8df9
https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/file/Filesystem.php#L52-L57
198,286
sokil/NotificationBundle
src/DependencyInjection/CompilerPass/MessageBuilderPass.php
MessageBuilderPass.getMessageBuilderCollectionServiceidList
private function getMessageBuilderCollectionServiceidList(ContainerBuilder $container) { $builderCollectionServiceIdList = []; $messageBuilderCollectionListDefinition = $container->findTaggedServiceIds('notification.message_builder_collection'); foreach ($messageBuilderCollectionListDefinit...
php
private function getMessageBuilderCollectionServiceidList(ContainerBuilder $container) { $builderCollectionServiceIdList = []; $messageBuilderCollectionListDefinition = $container->findTaggedServiceIds('notification.message_builder_collection'); foreach ($messageBuilderCollectionListDefinit...
[ "private", "function", "getMessageBuilderCollectionServiceidList", "(", "ContainerBuilder", "$", "container", ")", "{", "$", "builderCollectionServiceIdList", "=", "[", "]", ";", "$", "messageBuilderCollectionListDefinition", "=", "$", "container", "->", "findTaggedServiceI...
Get service ids of collections
[ "Get", "service", "ids", "of", "collections" ]
bf8d793b6b5a13827b2db4f0b3c588cf6a03c66b
https://github.com/sokil/NotificationBundle/blob/bf8d793b6b5a13827b2db4f0b3c588cf6a03c66b/src/DependencyInjection/CompilerPass/MessageBuilderPass.php#L81-L97
198,287
FuzeWorks/Core
src/FuzeWorks/ConfigORM/ConfigORM.php
ConfigORM.commit
public function commit() { // Write the changes if (is_writable($this->file)) { $config = var_export($this->cfg, true); file_put_contents($this->file, "<?php return $config ;"); return true; } throw new ConfigException("Could not write config file. $...
php
public function commit() { // Write the changes if (is_writable($this->file)) { $config = var_export($this->cfg, true); file_put_contents($this->file, "<?php return $config ;"); return true; } throw new ConfigException("Could not write config file. $...
[ "public", "function", "commit", "(", ")", "{", "// Write the changes", "if", "(", "is_writable", "(", "$", "this", "->", "file", ")", ")", "{", "$", "config", "=", "var_export", "(", "$", "this", "->", "cfg", ",", "true", ")", ";", "file_put_contents", ...
Updates the config file and writes it. @throws ConfigException on fatal error
[ "Updates", "the", "config", "file", "and", "writes", "it", "." ]
051c64fdaa3a648174cbd54557d05ad553dd826b
https://github.com/FuzeWorks/Core/blob/051c64fdaa3a648174cbd54557d05ad553dd826b/src/FuzeWorks/ConfigORM/ConfigORM.php#L84-L94
198,288
Lustmored/oauth2-lockme
src/Provider/Lockme.php
Lockme.executeRequest
public function executeRequest($method, $url, $token, $body = null) { $options = []; if ($body) { $options['body'] = json_encode($body); $options['headers']['Content-Type'] = 'application/json'; } $request = $this->getAuthenticatedRequest($method, $this->apiD...
php
public function executeRequest($method, $url, $token, $body = null) { $options = []; if ($body) { $options['body'] = json_encode($body); $options['headers']['Content-Type'] = 'application/json'; } $request = $this->getAuthenticatedRequest($method, $this->apiD...
[ "public", "function", "executeRequest", "(", "$", "method", ",", "$", "url", ",", "$", "token", ",", "$", "body", "=", "null", ")", "{", "$", "options", "=", "[", "]", ";", "if", "(", "$", "body", ")", "{", "$", "options", "[", "'body'", "]", "...
Generate request, execute it and return parsed response @param string $method @param string $url @param AccessToken|string|null $token @param mixed $body @return mixed
[ "Generate", "request", "execute", "it", "and", "return", "parsed", "response" ]
906c40be9d896d28d20b1bbdf32f91c858e3c280
https://github.com/Lustmored/oauth2-lockme/blob/906c40be9d896d28d20b1bbdf32f91c858e3c280/src/Provider/Lockme.php#L77-L88
198,289
miguelibero/meinhof
src/Meinhof/Meinhof.php
Meinhof.reload
public function reload() { $this->container = $this->buildContainer($this->dir); // load input and output $this->container->set('input', $this->input); $this->container->set('output', $this->output); // freeze the container $this->container->compile(); }
php
public function reload() { $this->container = $this->buildContainer($this->dir); // load input and output $this->container->set('input', $this->input); $this->container->set('output', $this->output); // freeze the container $this->container->compile(); }
[ "public", "function", "reload", "(", ")", "{", "$", "this", "->", "container", "=", "$", "this", "->", "buildContainer", "(", "$", "this", "->", "dir", ")", ";", "// load input and output", "$", "this", "->", "container", "->", "set", "(", "'input'", ","...
Reload the dependency container
[ "Reload", "the", "dependency", "container" ]
3a090f08485dc0da3e27463cf349dba374201072
https://github.com/miguelibero/meinhof/blob/3a090f08485dc0da3e27463cf349dba374201072/src/Meinhof/Meinhof.php#L60-L70
198,290
miguelibero/meinhof
src/Meinhof/Meinhof.php
Meinhof.buildContainer
public function buildContainer($dir) { // load the container $container = new ContainerBuilder(); // setup basic container compiler passes $container->addCompilerPass(new EventListenerPass()); $container->addCompilerPass(new TemplatingEnginePass()); $configDir = $di...
php
public function buildContainer($dir) { // load the container $container = new ContainerBuilder(); // setup basic container compiler passes $container->addCompilerPass(new EventListenerPass()); $container->addCompilerPass(new TemplatingEnginePass()); $configDir = $di...
[ "public", "function", "buildContainer", "(", "$", "dir", ")", "{", "// load the container", "$", "container", "=", "new", "ContainerBuilder", "(", ")", ";", "// setup basic container compiler passes", "$", "container", "->", "addCompilerPass", "(", "new", "EventListen...
Builds the dependency injection container @param string $dir the path to the base of the site configuration @return ContainerInterface the new container @throws \RuntimeException when a service tagged as an extension does not implement ExtensionInterface
[ "Builds", "the", "dependency", "injection", "container" ]
3a090f08485dc0da3e27463cf349dba374201072
https://github.com/miguelibero/meinhof/blob/3a090f08485dc0da3e27463cf349dba374201072/src/Meinhof/Meinhof.php#L103-L139
198,291
miguelibero/meinhof
src/Meinhof/Meinhof.php
Meinhof.dispatchEvent
protected function dispatchEvent($event) { if (!$this->container) { throw new \RuntimeException("The container has not been set up."); } $dir = $this->container->getParameter('base_dir'); if (!is_dir($dir) || !is_readable($dir)) { throw new \RuntimeException("...
php
protected function dispatchEvent($event) { if (!$this->container) { throw new \RuntimeException("The container has not been set up."); } $dir = $this->container->getParameter('base_dir'); if (!is_dir($dir) || !is_readable($dir)) { throw new \RuntimeException("...
[ "protected", "function", "dispatchEvent", "(", "$", "event", ")", "{", "if", "(", "!", "$", "this", "->", "container", ")", "{", "throw", "new", "\\", "RuntimeException", "(", "\"The container has not been set up.\"", ")", ";", "}", "$", "dir", "=", "$", "...
Dispatches an event @throws \RuntimeException when the container is not present @throws \RuntimeException when the site directory is not readable
[ "Dispatches", "an", "event" ]
3a090f08485dc0da3e27463cf349dba374201072
https://github.com/miguelibero/meinhof/blob/3a090f08485dc0da3e27463cf349dba374201072/src/Meinhof/Meinhof.php#L147-L158
198,292
quantaphp/container-factories
src/AutowiredInstance.php
AutowiredInstance.parameters
private function parameters(): array { try { $reflection = new \ReflectionClass($this->class); } catch (\ReflectionException $e) { return []; } $constructor = $reflection->getConstructor(); return is_null($constructor) ? [] : $constructor->g...
php
private function parameters(): array { try { $reflection = new \ReflectionClass($this->class); } catch (\ReflectionException $e) { return []; } $constructor = $reflection->getConstructor(); return is_null($constructor) ? [] : $constructor->g...
[ "private", "function", "parameters", "(", ")", ":", "array", "{", "try", "{", "$", "reflection", "=", "new", "\\", "ReflectionClass", "(", "$", "this", "->", "class", ")", ";", "}", "catch", "(", "\\", "ReflectionException", "$", "e", ")", "{", "return...
Return the non variadic class constructor parameter reflections. When the string is not a class name the method does not fail and returns an empty array. This way the script keeps going until the factory tries to instantiate a non class and fail like it would by manually doing so. @return \ReflectionParameter[]
[ "Return", "the", "non", "variadic", "class", "constructor", "parameter", "reflections", "." ]
5e753d66a18d0ce4418cbf33fe6d6b74948f303d
https://github.com/quantaphp/container-factories/blob/5e753d66a18d0ce4418cbf33fe6d6b74948f303d/src/AutowiredInstance.php#L82-L95
198,293
enikeishik/ufoframework
src/Ufo/Core/Debug.php
Debug.trace
public function trace(string $operation): int { $this->buffTrace[] = [ 'operation' => $operation, 'time' => microtime(true), 'result' => '', 'stack' => 9 == self::C_DEBUG_LEVEL ? debug_backtrace(): null, ]; return count($this->b...
php
public function trace(string $operation): int { $this->buffTrace[] = [ 'operation' => $operation, 'time' => microtime(true), 'result' => '', 'stack' => 9 == self::C_DEBUG_LEVEL ? debug_backtrace(): null, ]; return count($this->b...
[ "public", "function", "trace", "(", "string", "$", "operation", ")", ":", "int", "{", "$", "this", "->", "buffTrace", "[", "]", "=", "[", "'operation'", "=>", "$", "operation", ",", "'time'", "=>", "microtime", "(", "true", ")", ",", "'result'", "=>", ...
Create new trace item. @param string $operation @return int
[ "Create", "new", "trace", "item", "." ]
fb44461bcb0506dbc3257724a2281f756594f62f
https://github.com/enikeishik/ufoframework/blob/fb44461bcb0506dbc3257724a2281f756594f62f/src/Ufo/Core/Debug.php#L58-L67
198,294
enikeishik/ufoframework
src/Ufo/Core/Debug.php
Debug.traceClose
public function traceClose(int $idx = null, int $errCode = null, string $errMessage = null): void { if (null === $idx) { $idx = count($this->buffTrace) - 1; } if (!array_key_exists($idx, $this->buffTrace)) { throw new DebugIndexNotExistsException(); }...
php
public function traceClose(int $idx = null, int $errCode = null, string $errMessage = null): void { if (null === $idx) { $idx = count($this->buffTrace) - 1; } if (!array_key_exists($idx, $this->buffTrace)) { throw new DebugIndexNotExistsException(); }...
[ "public", "function", "traceClose", "(", "int", "$", "idx", "=", "null", ",", "int", "$", "errCode", "=", "null", ",", "string", "$", "errMessage", "=", "null", ")", ":", "void", "{", "if", "(", "null", "===", "$", "idx", ")", "{", "$", "idx", "=...
Close trace item by its index. @param int $idx = null @param int $errCode = null @param string $errMessage = null @return void
[ "Close", "trace", "item", "by", "its", "index", "." ]
fb44461bcb0506dbc3257724a2281f756594f62f
https://github.com/enikeishik/ufoframework/blob/fb44461bcb0506dbc3257724a2281f756594f62f/src/Ufo/Core/Debug.php#L76-L88
198,295
enikeishik/ufoframework
src/Ufo/Core/Debug.php
Debug.traceEnd
public function traceEnd(): void { $now = microtime(true); foreach ($this->buffTrace as &$traceItem) { if ('' === $traceItem['result']) { $traceItem['time'] = $now - $traceItem['time']; $traceItem['result'] = 'Trace end'; } } un...
php
public function traceEnd(): void { $now = microtime(true); foreach ($this->buffTrace as &$traceItem) { if ('' === $traceItem['result']) { $traceItem['time'] = $now - $traceItem['time']; $traceItem['result'] = 'Trace end'; } } un...
[ "public", "function", "traceEnd", "(", ")", ":", "void", "{", "$", "now", "=", "microtime", "(", "true", ")", ";", "foreach", "(", "$", "this", "->", "buffTrace", "as", "&", "$", "traceItem", ")", "{", "if", "(", "''", "===", "$", "traceItem", "[",...
Set time to now-time for each unclosed trace items. @return void
[ "Set", "time", "to", "now", "-", "time", "for", "each", "unclosed", "trace", "items", "." ]
fb44461bcb0506dbc3257724a2281f756594f62f
https://github.com/enikeishik/ufoframework/blob/fb44461bcb0506dbc3257724a2281f756594f62f/src/Ufo/Core/Debug.php#L94-L104
198,296
enikeishik/ufoframework
src/Ufo/Core/Debug.php
Debug.vd
public static function vd($var, bool $dump = true, bool $stop = true, int $obLevel = 0): void { if ($stop) { while (ob_get_level() > $obLevel) { ob_end_clean(); } } ob_start(); if (empty($_SERVER['DOCUMENT_ROOT'])) { $dump ...
php
public static function vd($var, bool $dump = true, bool $stop = true, int $obLevel = 0): void { if ($stop) { while (ob_get_level() > $obLevel) { ob_end_clean(); } } ob_start(); if (empty($_SERVER['DOCUMENT_ROOT'])) { $dump ...
[ "public", "static", "function", "vd", "(", "$", "var", ",", "bool", "$", "dump", "=", "true", ",", "bool", "$", "stop", "=", "true", ",", "int", "$", "obLevel", "=", "0", ")", ":", "void", "{", "if", "(", "$", "stop", ")", "{", "while", "(", ...
Show variable debug info. @param mixed $var @param bool $dump = true @param bool $stop = true @return void
[ "Show", "variable", "debug", "info", "." ]
fb44461bcb0506dbc3257724a2281f756594f62f
https://github.com/enikeishik/ufoframework/blob/fb44461bcb0506dbc3257724a2281f756594f62f/src/Ufo/Core/Debug.php#L150-L172
198,297
Dhii/exception-helper-base
src/CreateOutOfRangeExceptionCapableTrait.php
CreateOutOfRangeExceptionCapableTrait._createOutOfRangeException
protected function _createOutOfRangeException( $message = null, $code = null, RootException $previous = null, $argument = null ) { return new OutOfRangeException($message, $code, $previous, $argument); }
php
protected function _createOutOfRangeException( $message = null, $code = null, RootException $previous = null, $argument = null ) { return new OutOfRangeException($message, $code, $previous, $argument); }
[ "protected", "function", "_createOutOfRangeException", "(", "$", "message", "=", "null", ",", "$", "code", "=", "null", ",", "RootException", "$", "previous", "=", "null", ",", "$", "argument", "=", "null", ")", "{", "return", "new", "OutOfRangeException", "...
Creates a new Dhii Out Of Range exception. @since [*next-version*] @param string|Stringable|int|float|bool|null $message The message, if any. @param int|float|string|Stringable|null $code The numeric error code, if any. @param RootException|null $previous The inner exception, if any. @par...
[ "Creates", "a", "new", "Dhii", "Out", "Of", "Range", "exception", "." ]
e97bfa6c0f79ea079e36b2f1d8f84d7566a3ccf5
https://github.com/Dhii/exception-helper-base/blob/e97bfa6c0f79ea079e36b2f1d8f84d7566a3ccf5/src/CreateOutOfRangeExceptionCapableTrait.php#L27-L34
198,298
Wedeto/HTTP
src/Response/StringResponse.php
StringResponse.setOutput
public function setOutput($output, string $mime = "text/html") { if ( !is_string($output) && !is_callable($output) && !(is_object($output) && method_exists($output, '__toString')) ) { throw new \InvalidArgumentException( "Output must be te...
php
public function setOutput($output, string $mime = "text/html") { if ( !is_string($output) && !is_callable($output) && !(is_object($output) && method_exists($output, '__toString')) ) { throw new \InvalidArgumentException( "Output must be te...
[ "public", "function", "setOutput", "(", "$", "output", ",", "string", "$", "mime", "=", "\"text/html\"", ")", "{", "if", "(", "!", "is_string", "(", "$", "output", ")", "&&", "!", "is_callable", "(", "$", "output", ")", "&&", "!", "(", "is_object", "...
Set or replace the output for a content type @param mixed $str The text to add. This can be a string, a callback function returning a string or an object with a __toString method. @param string $mime The mime-type for the content @return StringResponse Provides fluent interface
[ "Set", "or", "replace", "the", "output", "for", "a", "content", "type" ]
7318eff1b81a3c103c4263466d09b7f3593b70b9
https://github.com/Wedeto/HTTP/blob/7318eff1b81a3c103c4263466d09b7f3593b70b9/src/Response/StringResponse.php#L55-L69
198,299
Wedeto/HTTP
src/Response/StringResponse.php
StringResponse.append
public function append(string $str, string $mime = "text/html") { // To append, we need to make sure we have a string first if (empty($this->output[$mime]) || !is_string($this->output[$mime])) $this->output[$mime] = $this->getOutput($mime); $this->output[$mime] .= $str; ...
php
public function append(string $str, string $mime = "text/html") { // To append, we need to make sure we have a string first if (empty($this->output[$mime]) || !is_string($this->output[$mime])) $this->output[$mime] = $this->getOutput($mime); $this->output[$mime] .= $str; ...
[ "public", "function", "append", "(", "string", "$", "str", ",", "string", "$", "mime", "=", "\"text/html\"", ")", "{", "// To append, we need to make sure we have a string first", "if", "(", "empty", "(", "$", "this", "->", "output", "[", "$", "mime", "]", ")"...
Append a string to the current output @param string $str The string to add @return StringResponse Provides fluent interface
[ "Append", "a", "string", "to", "the", "current", "output" ]
7318eff1b81a3c103c4263466d09b7f3593b70b9
https://github.com/Wedeto/HTTP/blob/7318eff1b81a3c103c4263466d09b7f3593b70b9/src/Response/StringResponse.php#L76-L84