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
196,900
railken/lem
src/Validator.php
Validator.validateUniqueness
public function validateUniqueness($entity, $parameters) { $errors = new Collection(); foreach ($this->getManager()->getUnique() as $name => $attributes) { // Check if attribute exists... $q = $this->getManager()->getRepository()->getQuery(); $where = collect()...
php
public function validateUniqueness($entity, $parameters) { $errors = new Collection(); foreach ($this->getManager()->getUnique() as $name => $attributes) { // Check if attribute exists... $q = $this->getManager()->getRepository()->getQuery(); $where = collect()...
[ "public", "function", "validateUniqueness", "(", "$", "entity", ",", "$", "parameters", ")", "{", "$", "errors", "=", "new", "Collection", "(", ")", ";", "foreach", "(", "$", "this", "->", "getManager", "(", ")", "->", "getUnique", "(", ")", "as", "$",...
Validate uniqueness. @param \Railken\Lem\Contracts\EntityContract $entity @param Bag $parameters @return Collection
[ "Validate", "uniqueness", "." ]
cff1efcd090a9504b2faf5594121885786dea67a
https://github.com/railken/lem/blob/cff1efcd090a9504b2faf5594121885786dea67a/src/Validator.php#L51-L86
196,901
Fenzland/http-api-gluer
src/Gluer/THoldsSerializers.php
THoldsSerializers.achieveSerializer
protected function achieveSerializer( string$mime ):S\ASerializer { $this->checkSerializerSupported( $mime ); $serializer= $this->getSerializer( $mime ); return static::instantiateSerializer_( $serializer ); }
php
protected function achieveSerializer( string$mime ):S\ASerializer { $this->checkSerializerSupported( $mime ); $serializer= $this->getSerializer( $mime ); return static::instantiateSerializer_( $serializer ); }
[ "protected", "function", "achieveSerializer", "(", "string", "$", "mime", ")", ":", "S", "\\", "ASerializer", "{", "$", "this", "->", "checkSerializerSupported", "(", "$", "mime", ")", ";", "$", "serializer", "=", "$", "this", "->", "getSerializer", "(", "...
Static method achieveSerializer @access protected @param string $mime @return S\ASerializer
[ "Static", "method", "achieveSerializer" ]
3488de28b7f54fb444ec47f84034473a7d86e17e
https://github.com/Fenzland/http-api-gluer/blob/3488de28b7f54fb444ec47f84034473a7d86e17e/src/Gluer/THoldsSerializers.php#L126-L133
196,902
eureka-framework/component-error
src/Error/ErrorHandler.php
ErrorHandler.handler
public function handler($severity, $message, $file, $line) { throw new ErrorException($message, 0, $severity, $file, $line); }
php
public function handler($severity, $message, $file, $line) { throw new ErrorException($message, 0, $severity, $file, $line); }
[ "public", "function", "handler", "(", "$", "severity", ",", "$", "message", ",", "$", "file", ",", "$", "line", ")", "{", "throw", "new", "ErrorException", "(", "$", "message", ",", "0", ",", "$", "severity", ",", "$", "file", ",", "$", "line", ")"...
Error handler. Throw new Eureka ErrorException @param int $severity Severity code Error. @param string $message Error message. @param string $file File name for Error. @param int $line File line for Error. @return void @throws ErrorException
[ "Error", "handler", ".", "Throw", "new", "Eureka", "ErrorException" ]
0c27be21d6623ffdf2f7a0591e76dad478b45832
https://github.com/eureka-framework/component-error/blob/0c27be21d6623ffdf2f7a0591e76dad478b45832/src/Error/ErrorHandler.php#L54-L57
196,903
mullanaphy/variable
src/PHY/Variable/Arr.php
Arr.toObject
public function toObject() { $array = $this->get(); foreach ($array as $key => $value) { if (is_array($value)) { $array[$key] = (new \PHY\Variable\Arr($value))->toObject(); } } return (object)$array; ...
php
public function toObject() { $array = $this->get(); foreach ($array as $key => $value) { if (is_array($value)) { $array[$key] = (new \PHY\Variable\Arr($value))->toObject(); } } return (object)$array; ...
[ "public", "function", "toObject", "(", ")", "{", "$", "array", "=", "$", "this", "->", "get", "(", ")", ";", "foreach", "(", "$", "array", "as", "$", "key", "=>", "$", "value", ")", "{", "if", "(", "is_array", "(", "$", "value", ")", ")", "{", ...
Recursively convert our array into a stdClass. @return \stdClass
[ "Recursively", "convert", "our", "array", "into", "a", "stdClass", "." ]
e4eb274a1799a25e33e5e21cd260603c74628031
https://github.com/mullanaphy/variable/blob/e4eb274a1799a25e33e5e21cd260603c74628031/src/PHY/Variable/Arr.php#L50-L59
196,904
mullanaphy/variable
src/PHY/Variable/Arr.php
Arr.offsetGet
public function offsetGet($offset) { $get = $this->chaining ? 'chain' : 'current'; return array_key_exists($offset, $this->$get) ? $this->$get[$offset] : null; }
php
public function offsetGet($offset) { $get = $this->chaining ? 'chain' : 'current'; return array_key_exists($offset, $this->$get) ? $this->$get[$offset] : null; }
[ "public", "function", "offsetGet", "(", "$", "offset", ")", "{", "$", "get", "=", "$", "this", "->", "chaining", "?", "'chain'", ":", "'current'", ";", "return", "array_key_exists", "(", "$", "offset", ",", "$", "this", "->", "$", "get", ")", "?", "$...
Grab an offset if it's defined. @param scalar $offset @return mixed
[ "Grab", "an", "offset", "if", "it", "s", "defined", "." ]
e4eb274a1799a25e33e5e21cd260603c74628031
https://github.com/mullanaphy/variable/blob/e4eb274a1799a25e33e5e21cd260603c74628031/src/PHY/Variable/Arr.php#L158-L166
196,905
mullanaphy/variable
src/PHY/Variable/Arr.php
Arr.offsetSet
public function offsetSet($offset, $value) { $get = $this->chaining ? 'chain' : 'current'; $this->$get[$offset] = $value; }
php
public function offsetSet($offset, $value) { $get = $this->chaining ? 'chain' : 'current'; $this->$get[$offset] = $value; }
[ "public", "function", "offsetSet", "(", "$", "offset", ",", "$", "value", ")", "{", "$", "get", "=", "$", "this", "->", "chaining", "?", "'chain'", ":", "'current'", ";", "$", "this", "->", "$", "get", "[", "$", "offset", "]", "=", "$", "value", ...
Set an offset. @param scalar $offset @param mixed $value
[ "Set", "an", "offset", "." ]
e4eb274a1799a25e33e5e21cd260603c74628031
https://github.com/mullanaphy/variable/blob/e4eb274a1799a25e33e5e21cd260603c74628031/src/PHY/Variable/Arr.php#L174-L180
196,906
mullanaphy/variable
src/PHY/Variable/Arr.php
Arr.sort
public function sort($sort_flags = SORT_REGULAR) { $array = $this->get(); sort($array, $sort_flags); $this->update($array); return $this; }
php
public function sort($sort_flags = SORT_REGULAR) { $array = $this->get(); sort($array, $sort_flags); $this->update($array); return $this; }
[ "public", "function", "sort", "(", "$", "sort_flags", "=", "SORT_REGULAR", ")", "{", "$", "array", "=", "$", "this", "->", "get", "(", ")", ";", "sort", "(", "$", "array", ",", "$", "sort_flags", ")", ";", "$", "this", "->", "update", "(", "$", "...
Sort our Array. @param int $sort_flags @return \PHY\Variable\Arr
[ "Sort", "our", "Array", "." ]
e4eb274a1799a25e33e5e21cd260603c74628031
https://github.com/mullanaphy/variable/blob/e4eb274a1799a25e33e5e21cd260603c74628031/src/PHY/Variable/Arr.php#L238-L244
196,907
mullanaphy/variable
src/PHY/Variable/Arr.php
Arr.slice
public function slice($offset = 0, $length = null, $preserve_keys = false) { $array = array_slice($this->get(), $offset, $length, $preserve_keys); $this->update($array); return $this; }
php
public function slice($offset = 0, $length = null, $preserve_keys = false) { $array = array_slice($this->get(), $offset, $length, $preserve_keys); $this->update($array); return $this; }
[ "public", "function", "slice", "(", "$", "offset", "=", "0", ",", "$", "length", "=", "null", ",", "$", "preserve_keys", "=", "false", ")", "{", "$", "array", "=", "array_slice", "(", "$", "this", "->", "get", "(", ")", ",", "$", "offset", ",", "...
Slice an Array. @param int $offset @param int|null $length @param boolean $preserve_keys @return \PHY\Variable\Arr
[ "Slice", "an", "Array", "." ]
e4eb274a1799a25e33e5e21cd260603c74628031
https://github.com/mullanaphy/variable/blob/e4eb274a1799a25e33e5e21cd260603c74628031/src/PHY/Variable/Arr.php#L254-L259
196,908
mullanaphy/variable
src/PHY/Variable/Arr.php
Arr.splice
public function splice($offset = 0, $length = 0, $replacement = null) { $array = $this->get(); if (null !== $replacement) { array_splice($array, $offset, $length, $replacement); } else { array_splice($array, $offset, $length); ...
php
public function splice($offset = 0, $length = 0, $replacement = null) { $array = $this->get(); if (null !== $replacement) { array_splice($array, $offset, $length, $replacement); } else { array_splice($array, $offset, $length); ...
[ "public", "function", "splice", "(", "$", "offset", "=", "0", ",", "$", "length", "=", "0", ",", "$", "replacement", "=", "null", ")", "{", "$", "array", "=", "$", "this", "->", "get", "(", ")", ";", "if", "(", "null", "!==", "$", "replacement", ...
Splice an array. @param int $offset @param int $length @param mixed $replacement @return \PHY\Variable\Arr
[ "Splice", "an", "array", "." ]
e4eb274a1799a25e33e5e21cd260603c74628031
https://github.com/mullanaphy/variable/blob/e4eb274a1799a25e33e5e21cd260603c74628031/src/PHY/Variable/Arr.php#L269-L279
196,909
Xsaven/laravel-intelect-admin
src/Addons/Scaffold/ModelCreator.php
ModelCreator.create
public function create($keyName = 'id', $route_key_name = 'id', $timestamps = true, $softDeletes = false, $fields=[]) { $path = $this->getpath($this->name); if ($this->files->exists($path)) { throw new \Exception("Model [$this->name] already exists!"); } $stub = $this->...
php
public function create($keyName = 'id', $route_key_name = 'id', $timestamps = true, $softDeletes = false, $fields=[]) { $path = $this->getpath($this->name); if ($this->files->exists($path)) { throw new \Exception("Model [$this->name] already exists!"); } $stub = $this->...
[ "public", "function", "create", "(", "$", "keyName", "=", "'id'", ",", "$", "route_key_name", "=", "'id'", ",", "$", "timestamps", "=", "true", ",", "$", "softDeletes", "=", "false", ",", "$", "fields", "=", "[", "]", ")", "{", "$", "path", "=", "$...
Create a new migration file. @param string $keyName @param bool|true $timestamps @param bool|false $softDeletes @throws \Exception @return string
[ "Create", "a", "new", "migration", "file", "." ]
592574633d12c74cf25b43dd6694fee496abefcb
https://github.com/Xsaven/laravel-intelect-admin/blob/592574633d12c74cf25b43dd6694fee496abefcb/src/Addons/Scaffold/ModelCreator.php#L57-L82
196,910
Xsaven/laravel-intelect-admin
src/Addons/Scaffold/ModelCreator.php
ModelCreator.replaceFillable
protected function replaceFillable(&$stub, $fields){ $fillable = []; foreach ($fields as $f){ if($f['add_to']=='fillable') $fillable[] = "\"{$f['name']}\""; } if(count($fillable)) $fillable = "protected \$fillable = [".implode(',',$fillable)."];"; else $fillable = ""...
php
protected function replaceFillable(&$stub, $fields){ $fillable = []; foreach ($fields as $f){ if($f['add_to']=='fillable') $fillable[] = "\"{$f['name']}\""; } if(count($fillable)) $fillable = "protected \$fillable = [".implode(',',$fillable)."];"; else $fillable = ""...
[ "protected", "function", "replaceFillable", "(", "&", "$", "stub", ",", "$", "fields", ")", "{", "$", "fillable", "=", "[", "]", ";", "foreach", "(", "$", "fields", "as", "$", "f", ")", "{", "if", "(", "$", "f", "[", "'add_to'", "]", "==", "'fill...
Replace fillable dummy. @param string $stub @param array $fields @return $this
[ "Replace", "fillable", "dummy", "." ]
592574633d12c74cf25b43dd6694fee496abefcb
https://github.com/Xsaven/laravel-intelect-admin/blob/592574633d12c74cf25b43dd6694fee496abefcb/src/Addons/Scaffold/ModelCreator.php#L226-L238
196,911
Xsaven/laravel-intelect-admin
src/Addons/Scaffold/ModelCreator.php
ModelCreator.replaceGuarded
protected function replaceGuarded(&$stub, $fields){ $guarded = []; foreach ($fields as $f){ if($f['add_to']=='guarded') $guarded[] = "\"{$f['name']}\""; } if(count($guarded)) $guarded = "protected \$guarded = [".implode(',',$guarded)."];"; else $guarded = ""; ...
php
protected function replaceGuarded(&$stub, $fields){ $guarded = []; foreach ($fields as $f){ if($f['add_to']=='guarded') $guarded[] = "\"{$f['name']}\""; } if(count($guarded)) $guarded = "protected \$guarded = [".implode(',',$guarded)."];"; else $guarded = ""; ...
[ "protected", "function", "replaceGuarded", "(", "&", "$", "stub", ",", "$", "fields", ")", "{", "$", "guarded", "=", "[", "]", ";", "foreach", "(", "$", "fields", "as", "$", "f", ")", "{", "if", "(", "$", "f", "[", "'add_to'", "]", "==", "'guarde...
Replace guarded dummy. @param string $stub @param array $fields @return $this
[ "Replace", "guarded", "dummy", "." ]
592574633d12c74cf25b43dd6694fee496abefcb
https://github.com/Xsaven/laravel-intelect-admin/blob/592574633d12c74cf25b43dd6694fee496abefcb/src/Addons/Scaffold/ModelCreator.php#L248-L260
196,912
Xsaven/laravel-intelect-admin
src/Addons/Scaffold/ModelCreator.php
ModelCreator.replaceCasts
protected function replaceCasts(&$stub, $fields){ $casts = []; foreach ($fields as $f){ if(!empty($f['casts'])) $casts[] = "\"{$f['name']}\"=>\"{$f['casts']}\""; } if(count($casts)) $casts = "protected \$casts = [".implode(',',$casts)."];"; else $casts = ""; ...
php
protected function replaceCasts(&$stub, $fields){ $casts = []; foreach ($fields as $f){ if(!empty($f['casts'])) $casts[] = "\"{$f['name']}\"=>\"{$f['casts']}\""; } if(count($casts)) $casts = "protected \$casts = [".implode(',',$casts)."];"; else $casts = ""; ...
[ "protected", "function", "replaceCasts", "(", "&", "$", "stub", ",", "$", "fields", ")", "{", "$", "casts", "=", "[", "]", ";", "foreach", "(", "$", "fields", "as", "$", "f", ")", "{", "if", "(", "!", "empty", "(", "$", "f", "[", "'casts'", "]"...
Replace casts dummy. @param string $stub @param array $fields @return $this
[ "Replace", "casts", "dummy", "." ]
592574633d12c74cf25b43dd6694fee496abefcb
https://github.com/Xsaven/laravel-intelect-admin/blob/592574633d12c74cf25b43dd6694fee496abefcb/src/Addons/Scaffold/ModelCreator.php#L270-L281
196,913
Xsaven/laravel-intelect-admin
src/Addons/Scaffold/ModelCreator.php
ModelCreator.replaceRouteKeyName
protected function replaceRouteKeyName(&$stub, $route_key_name){ if($route_key_name=='id') $replace = ""; else{ $replace = "public function getRouteKeyName(){ return \"{$route_key_name}\"; }"; } $stub = str_replace('DummyRouteKeyName', $replace, $stub); ...
php
protected function replaceRouteKeyName(&$stub, $route_key_name){ if($route_key_name=='id') $replace = ""; else{ $replace = "public function getRouteKeyName(){ return \"{$route_key_name}\"; }"; } $stub = str_replace('DummyRouteKeyName', $replace, $stub); ...
[ "protected", "function", "replaceRouteKeyName", "(", "&", "$", "stub", ",", "$", "route_key_name", ")", "{", "if", "(", "$", "route_key_name", "==", "'id'", ")", "$", "replace", "=", "\"\"", ";", "else", "{", "$", "replace", "=", "\"public function getRouteK...
Replace RouteKeyName dummy. @param string $stub @param array $fields @return $this
[ "Replace", "RouteKeyName", "dummy", "." ]
592574633d12c74cf25b43dd6694fee496abefcb
https://github.com/Xsaven/laravel-intelect-admin/blob/592574633d12c74cf25b43dd6694fee496abefcb/src/Addons/Scaffold/ModelCreator.php#L291-L302
196,914
craig-mcmahon/google-helper
src/GoogleHelper/Drive/FilesHelper.php
FilesHelper.getFileByName
public function getFileByName( $folderName, $mimeType, $includeTrash = false, \Google_Service_Drive_DriveFile $parent = null, $createIfNotFound = false ) { $query = 'title = \'' . $folderName . '\' and mimeType = \'' . $mimeType . '\''; if (!$includeTrash) { ...
php
public function getFileByName( $folderName, $mimeType, $includeTrash = false, \Google_Service_Drive_DriveFile $parent = null, $createIfNotFound = false ) { $query = 'title = \'' . $folderName . '\' and mimeType = \'' . $mimeType . '\''; if (!$includeTrash) { ...
[ "public", "function", "getFileByName", "(", "$", "folderName", ",", "$", "mimeType", ",", "$", "includeTrash", "=", "false", ",", "\\", "Google_Service_Drive_DriveFile", "$", "parent", "=", "null", ",", "$", "createIfNotFound", "=", "false", ")", "{", "$", "...
Get a file @param $folderName @param $mimeType @param bool $includeTrash @param \Google_Service_Drive_DriveFile $parent @param bool $createIfNotFound @return \Google_Service_Drive_DriveFile|null
[ "Get", "a", "file" ]
6b877efd7c9827555ecac65ee01e337849db6611
https://github.com/craig-mcmahon/google-helper/blob/6b877efd7c9827555ecac65ee01e337849db6611/src/GoogleHelper/Drive/FilesHelper.php#L17-L42
196,915
craig-mcmahon/google-helper
src/GoogleHelper/Drive/FilesHelper.php
FilesHelper.downloadFileFromURL
public function downloadFileFromURL($url) { $request = new \Google_Http_Request($url, 'GET', null, null); $httpRequest = $this->service->getClient() ->getAuth() ->authenticatedRequest($request); if ($httpRequest->getResponseHttpCode() == 200) { return $h...
php
public function downloadFileFromURL($url) { $request = new \Google_Http_Request($url, 'GET', null, null); $httpRequest = $this->service->getClient() ->getAuth() ->authenticatedRequest($request); if ($httpRequest->getResponseHttpCode() == 200) { return $h...
[ "public", "function", "downloadFileFromURL", "(", "$", "url", ")", "{", "$", "request", "=", "new", "\\", "Google_Http_Request", "(", "$", "url", ",", "'GET'", ",", "null", ",", "null", ")", ";", "$", "httpRequest", "=", "$", "this", "->", "service", "...
Download a file from a url @param $url @return string|null
[ "Download", "a", "file", "from", "a", "url" ]
6b877efd7c9827555ecac65ee01e337849db6611
https://github.com/craig-mcmahon/google-helper/blob/6b877efd7c9827555ecac65ee01e337849db6611/src/GoogleHelper/Drive/FilesHelper.php#L138-L150
196,916
craig-mcmahon/google-helper
src/GoogleHelper/Drive/FilesHelper.php
FilesHelper.getFilesInFolder
public function getFilesInFolder(\Google_Service_Drive_DriveFile $folder) { $query = 'trashed = false and \'' . $folder->getId() . '\' in parents'; $fileList = $this->service->files->listFiles(array('q' => $query)); return $fileList; }
php
public function getFilesInFolder(\Google_Service_Drive_DriveFile $folder) { $query = 'trashed = false and \'' . $folder->getId() . '\' in parents'; $fileList = $this->service->files->listFiles(array('q' => $query)); return $fileList; }
[ "public", "function", "getFilesInFolder", "(", "\\", "Google_Service_Drive_DriveFile", "$", "folder", ")", "{", "$", "query", "=", "'trashed = false and \\''", ".", "$", "folder", "->", "getId", "(", ")", ".", "'\\' in parents'", ";", "$", "fileList", "=", "$", ...
Get Files in a folder @param \Google_Service_Drive_DriveFile $folder @return \Google_Service_Drive_FileList
[ "Get", "Files", "in", "a", "folder" ]
6b877efd7c9827555ecac65ee01e337849db6611
https://github.com/craig-mcmahon/google-helper/blob/6b877efd7c9827555ecac65ee01e337849db6611/src/GoogleHelper/Drive/FilesHelper.php#L157-L165
196,917
leapt/im-bundle
Manager.php
Manager.checkImage
private function checkImage($path) { if (!file_exists($this->getWebDirectory() . '/' . $path) && !file_exists($path)) { throw new NotFoundException(sprintf("Unable to find the image \"%s\" to cache", $path)); } if (!is_file($this->getWebDirectory() . '/' . $path) && !is_file($pa...
php
private function checkImage($path) { if (!file_exists($this->getWebDirectory() . '/' . $path) && !file_exists($path)) { throw new NotFoundException(sprintf("Unable to find the image \"%s\" to cache", $path)); } if (!is_file($this->getWebDirectory() . '/' . $path) && !is_file($pa...
[ "private", "function", "checkImage", "(", "$", "path", ")", "{", "if", "(", "!", "file_exists", "(", "$", "this", "->", "getWebDirectory", "(", ")", ".", "'/'", ".", "$", "path", ")", "&&", "!", "file_exists", "(", "$", "path", ")", ")", "{", "thro...
Validates that an image exists @param string $path @throws NotFoundException @throws HttpException
[ "Validates", "that", "an", "image", "exists" ]
0d2bad7b68611cbf745f606c404a415274d78104
https://github.com/leapt/im-bundle/blob/0d2bad7b68611cbf745f606c404a415274d78104/Manager.php#L265-L274
196,918
phata/widgetfy
src/Core.php
Core.translate
public static function translate($url, $options=array()) { if (($embed = \Phata\Widgetfy\Site::translate($url, $options)) != NULL) { return $embed; } elseif (($embed = \Phata\Widgetfy\MediaFile::translate($url, $options)) != NULL) { return $embed; ...
php
public static function translate($url, $options=array()) { if (($embed = \Phata\Widgetfy\Site::translate($url, $options)) != NULL) { return $embed; } elseif (($embed = \Phata\Widgetfy\MediaFile::translate($url, $options)) != NULL) { return $embed; ...
[ "public", "static", "function", "translate", "(", "$", "url", ",", "$", "options", "=", "array", "(", ")", ")", "{", "if", "(", "(", "$", "embed", "=", "\\", "Phata", "\\", "Widgetfy", "\\", "Site", "::", "translate", "(", "$", "url", ",", "$", "...
simplified interface to translate a url into embed code @param string $url URL to be translated @return mixed array of embed information or NULL if not translatable
[ "simplified", "interface", "to", "translate", "a", "url", "into", "embed", "code" ]
00102c35ec5267b42c627f1e34b8e64a7dd3590c
https://github.com/phata/widgetfy/blob/00102c35ec5267b42c627f1e34b8e64a7dd3590c/src/Core.php#L49-L58
196,919
libreworks/caridea-validate
src/Rule/Length.php
Length.between
public static function between(int $min, int $max, string $encoding = 'UTF-8'): Length { $length = [$min, $max]; sort($length); return new Length('bt', $length, $encoding); }
php
public static function between(int $min, int $max, string $encoding = 'UTF-8'): Length { $length = [$min, $max]; sort($length); return new Length('bt', $length, $encoding); }
[ "public", "static", "function", "between", "(", "int", "$", "min", ",", "int", "$", "max", ",", "string", "$", "encoding", "=", "'UTF-8'", ")", ":", "Length", "{", "$", "length", "=", "[", "$", "min", ",", "$", "max", "]", ";", "sort", "(", "$", ...
Gets a rule that requires strings to have a minimum and maximum length. @param int $min The minimum length, inclusive @param int $max The maximum length, inclusive @param string $encoding The string encoding @return \Caridea\Validate\Rule\Length the created rule
[ "Gets", "a", "rule", "that", "requires", "strings", "to", "have", "a", "minimum", "and", "maximum", "length", "." ]
625835694d34591bfb1e3b2ce60c2cc28a28d006
https://github.com/libreworks/caridea-validate/blob/625835694d34591bfb1e3b2ce60c2cc28a28d006/src/Rule/Length.php#L133-L138
196,920
agentmedia/phine-core
src/Core/Logic/Module/Traits/Form.php
Form.BeforeGather
protected function BeforeGather() { if ($this->IsTriggered() && $this->Elements()->Check(Request::MethodArray($this->Method()))) { return $this->OnSuccess(); } return parent::BeforeGather(); }
php
protected function BeforeGather() { if ($this->IsTriggered() && $this->Elements()->Check(Request::MethodArray($this->Method()))) { return $this->OnSuccess(); } return parent::BeforeGather(); }
[ "protected", "function", "BeforeGather", "(", ")", "{", "if", "(", "$", "this", "->", "IsTriggered", "(", ")", "&&", "$", "this", "->", "Elements", "(", ")", "->", "Check", "(", "Request", "::", "MethodArray", "(", "$", "this", "->", "Method", "(", "...
Overrides the template module method to realize form logic @return boolean
[ "Overrides", "the", "template", "module", "method", "to", "realize", "form", "logic" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Module/Traits/Form.php#L90-L97
196,921
agentmedia/phine-core
src/Core/Logic/Module/Traits/Form.php
Form.SetRequired
protected function SetRequired($name, $errorPrefix = '') { $field = $this->GetElement($name); if (!$field instanceof FormField) { throw new \InvalidArgumentException("$name is not a field in the form elements"); } if (!$errorPrefix) { $errorPre...
php
protected function SetRequired($name, $errorPrefix = '') { $field = $this->GetElement($name); if (!$field instanceof FormField) { throw new \InvalidArgumentException("$name is not a field in the form elements"); } if (!$errorPrefix) { $errorPre...
[ "protected", "function", "SetRequired", "(", "$", "name", ",", "$", "errorPrefix", "=", "''", ")", "{", "$", "field", "=", "$", "this", "->", "GetElement", "(", "$", "name", ")", ";", "if", "(", "!", "$", "field", "instanceof", "FormField", ")", "{",...
Sets the field as required @param string $name The name of the required field @param string $errorPrefix The label prefix, auto calculated if omitted
[ "Sets", "the", "field", "as", "required" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Module/Traits/Form.php#L176-L188
196,922
agentmedia/phine-core
src/Core/Logic/Module/Traits/Form.php
Form.GetElement
public function GetElement($name) { $element = $this->Elements()->GetElement($name); if (!$element) { throw new \Exception(Trans('Core.Form.Error.ElementNotFound.Name_{0}', $name)); } return $element; }
php
public function GetElement($name) { $element = $this->Elements()->GetElement($name); if (!$element) { throw new \Exception(Trans('Core.Form.Error.ElementNotFound.Name_{0}', $name)); } return $element; }
[ "public", "function", "GetElement", "(", "$", "name", ")", "{", "$", "element", "=", "$", "this", "->", "Elements", "(", ")", "->", "GetElement", "(", "$", "name", ")", ";", "if", "(", "!", "$", "element", ")", "{", "throw", "new", "\\", "Exception...
Gets the element with the given name @param string $name @return IFormElement
[ "Gets", "the", "element", "with", "the", "given", "name" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Module/Traits/Form.php#L194-L202
196,923
agentmedia/phine-core
src/Core/Logic/Module/Traits/Form.php
Form.AddValidator
protected function AddValidator($name, Validator $validator, $errorPrefix = '') { $field = $this->GetElement($name); if (!$errorPrefix) { $errorPrefix = $this->ErrorPrefix($name); } $validator->SetErrorLabelPrefix($errorPrefix); $field->AddValidator($valid...
php
protected function AddValidator($name, Validator $validator, $errorPrefix = '') { $field = $this->GetElement($name); if (!$errorPrefix) { $errorPrefix = $this->ErrorPrefix($name); } $validator->SetErrorLabelPrefix($errorPrefix); $field->AddValidator($valid...
[ "protected", "function", "AddValidator", "(", "$", "name", ",", "Validator", "$", "validator", ",", "$", "errorPrefix", "=", "''", ")", "{", "$", "field", "=", "$", "this", "->", "GetElement", "(", "$", "name", ")", ";", "if", "(", "!", "$", "errorPr...
Adds a validator to the name @param string $name @param Validator $validator @param string $errorPrefix A custom error prefix
[ "Adds", "a", "validator", "to", "the", "name" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Module/Traits/Form.php#L210-L219
196,924
agentmedia/phine-core
src/Core/Logic/Module/Traits/Form.php
Form.AddSubmit
protected function AddSubmit($name = '', $label = '') { $defaultLabel = $this->Label('Submit'); if (!$name) { //html attributes better without dot $name = str_replace('.', '-', $defaultLabel); } if (!$label) { $label = Worder::Repla...
php
protected function AddSubmit($name = '', $label = '') { $defaultLabel = $this->Label('Submit'); if (!$name) { //html attributes better without dot $name = str_replace('.', '-', $defaultLabel); } if (!$label) { $label = Worder::Repla...
[ "protected", "function", "AddSubmit", "(", "$", "name", "=", "''", ",", "$", "label", "=", "''", ")", "{", "$", "defaultLabel", "=", "$", "this", "->", "Label", "(", "'Submit'", ")", ";", "if", "(", "!", "$", "name", ")", "{", "//html attributes bett...
Adds a submit button that triggers the form logic on submit @param name The button name; if omitted, a name is generated by bundle and module name @param label The visible button label; if omitted, a label is generated @return Submit Returns the added submit button
[ "Adds", "a", "submit", "button", "that", "triggers", "the", "form", "logic", "on", "submit" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Module/Traits/Form.php#L226-L242
196,925
agentmedia/phine-core
src/Core/Logic/Module/Traits/Form.php
Form.Value
protected function Value($name, $trim = true) { $value = Request::MethodData($this->Method(), $name); if ($trim) { return Str::Trim($value); } return $value; }
php
protected function Value($name, $trim = true) { $value = Request::MethodData($this->Method(), $name); if ($trim) { return Str::Trim($value); } return $value; }
[ "protected", "function", "Value", "(", "$", "name", ",", "$", "trim", "=", "true", ")", "{", "$", "value", "=", "Request", "::", "MethodData", "(", "$", "this", "->", "Method", "(", ")", ",", "$", "name", ")", ";", "if", "(", "$", "trim", ")", ...
The form value as submitted @param string $name The field name @param boolean $trim If false, no string trimming is performed @return string Returns the submitted field value
[ "The", "form", "value", "as", "submitted" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Module/Traits/Form.php#L251-L259
196,926
agentmedia/phine-core
src/Core/Logic/Module/Traits/Form.php
Form.FindSnippet
protected function FindSnippet(IFormField $field) { if ($field instanceof Input && ($field->GetType() == Input::TypeText || $field->GetType() == Input::TypePassword || $field->GetType() == Input::TypeColor)) { return new FormFields\TextIn...
php
protected function FindSnippet(IFormField $field) { if ($field instanceof Input && ($field->GetType() == Input::TypeText || $field->GetType() == Input::TypePassword || $field->GetType() == Input::TypeColor)) { return new FormFields\TextIn...
[ "protected", "function", "FindSnippet", "(", "IFormField", "$", "field", ")", "{", "if", "(", "$", "field", "instanceof", "Input", "&&", "(", "$", "field", "->", "GetType", "(", ")", "==", "Input", "::", "TypeText", "||", "$", "field", "->", "GetType", ...
Finds the snippet for a form field; can be overriden for customization @param IFormField $field @return TemplateSnippet Returns the associated snippet renderer
[ "Finds", "the", "snippet", "for", "a", "form", "field", ";", "can", "be", "overriden", "for", "customization" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Module/Traits/Form.php#L267-L320
196,927
agentmedia/phine-core
src/Core/Logic/Module/Traits/Form.php
Form.SetTransAttribute
protected function SetTransAttribute($name, $attribute) { $field = $this->GetElement($name); $field->SetHtmlAttribute($attribute, Worder::Replace($this->AttributePlaceholder($name, $attribute))); }
php
protected function SetTransAttribute($name, $attribute) { $field = $this->GetElement($name); $field->SetHtmlAttribute($attribute, Worder::Replace($this->AttributePlaceholder($name, $attribute))); }
[ "protected", "function", "SetTransAttribute", "(", "$", "name", ",", "$", "attribute", ")", "{", "$", "field", "=", "$", "this", "->", "GetElement", "(", "$", "name", ")", ";", "$", "field", "->", "SetHtmlAttribute", "(", "$", "attribute", ",", "Worder",...
Sets a translatable attribute of the field to a default placeholder @param string $name The field name @param string $attribute The attribute name
[ "Sets", "a", "translatable", "attribute", "of", "the", "field", "to", "a", "default", "placeholder" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Module/Traits/Form.php#L346-L351
196,928
agentmedia/phine-core
src/Core/Logic/Module/Traits/Form.php
Form.SetTransDescription
protected function SetTransDescription($name) { $field = $this->GetElement($name); $field->SetDescription(Worder::Replace($this->FieldDescription($name))); }
php
protected function SetTransDescription($name) { $field = $this->GetElement($name); $field->SetDescription(Worder::Replace($this->FieldDescription($name))); }
[ "protected", "function", "SetTransDescription", "(", "$", "name", ")", "{", "$", "field", "=", "$", "this", "->", "GetElement", "(", "$", "name", ")", ";", "$", "field", "->", "SetDescription", "(", "Worder", "::", "Replace", "(", "$", "this", "->", "F...
Sets a description with a default placeholder for translation @param string $name The field name
[ "Sets", "a", "description", "with", "a", "default", "placeholder", "for", "translation" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Module/Traits/Form.php#L358-L362
196,929
essence/dom
src/Document/Native.php
Native._loadDocument
protected function _loadDocument() { $this->_Document = new DOMDocument(); $reporting = error_reporting(0); $loaded = $this->_Document->loadHTML($this->_html); error_reporting($reporting); if (!$loaded) { throw new Exception('Unable to load HTML document.'); } }
php
protected function _loadDocument() { $this->_Document = new DOMDocument(); $reporting = error_reporting(0); $loaded = $this->_Document->loadHTML($this->_html); error_reporting($reporting); if (!$loaded) { throw new Exception('Unable to load HTML document.'); } }
[ "protected", "function", "_loadDocument", "(", ")", "{", "$", "this", "->", "_Document", "=", "new", "DOMDocument", "(", ")", ";", "$", "reporting", "=", "error_reporting", "(", "0", ")", ";", "$", "loaded", "=", "$", "this", "->", "_Document", "->", "...
Builds a DOMDocument from the HTML source.
[ "Builds", "a", "DOMDocument", "from", "the", "HTML", "source", "." ]
e5776d2286f4ccbd048d160c28ac77ccc6d68f3a
https://github.com/essence/dom/blob/e5776d2286f4ccbd048d160c28ac77ccc6d68f3a/src/Document/Native.php#L70-L80
196,930
spoom-php/core
src/extension/File.php
File.path
public static function path( string $path ): string { if( !isset( self::$cache[ $path ] ) ) { // deep normalization if the path contains one-dir-up segment (clean multiple separators) $_path = preg_replace( '#\\' . static::DIRECTORY_SEPARATOR . '+#', static::DIRECTORY_SEPARATOR, ltrim( $path, static::...
php
public static function path( string $path ): string { if( !isset( self::$cache[ $path ] ) ) { // deep normalization if the path contains one-dir-up segment (clean multiple separators) $_path = preg_replace( '#\\' . static::DIRECTORY_SEPARATOR . '+#', static::DIRECTORY_SEPARATOR, ltrim( $path, static::...
[ "public", "static", "function", "path", "(", "string", "$", "path", ")", ":", "string", "{", "if", "(", "!", "isset", "(", "self", "::", "$", "cache", "[", "$", "path", "]", ")", ")", "{", "// deep normalization if the path contains one-dir-up segment (clean m...
Normalize the given path Remove multiple (consecutive) separators and resolve static::DIRECTORY_CURRENT / static::DIRECTORY_PREVIOUS. This will remove the leading separator but keep the trailing one @param string $path Standard path string @return string @throws FilePathInvalidException The path begins with static::...
[ "Normalize", "the", "given", "path" ]
ea7184213352fa2fad7636927a019e5798734e04
https://github.com/spoom-php/core/blob/ea7184213352fa2fad7636927a019e5798734e04/src/extension/File.php#L656-L685
196,931
spoom-php/core
src/extension/File.php
File.directory
public static function directory( string $path ): string { return ltrim( rtrim( $path, static::DIRECTORY_SEPARATOR ) . static::DIRECTORY_SEPARATOR, static::DIRECTORY_SEPARATOR ); }
php
public static function directory( string $path ): string { return ltrim( rtrim( $path, static::DIRECTORY_SEPARATOR ) . static::DIRECTORY_SEPARATOR, static::DIRECTORY_SEPARATOR ); }
[ "public", "static", "function", "directory", "(", "string", "$", "path", ")", ":", "string", "{", "return", "ltrim", "(", "rtrim", "(", "$", "path", ",", "static", "::", "DIRECTORY_SEPARATOR", ")", ".", "static", "::", "DIRECTORY_SEPARATOR", ",", "static", ...
Force path to be a directory ..and ensure the trailing separator (except for root path) @param string $path @return string
[ "Force", "path", "to", "be", "a", "directory" ]
ea7184213352fa2fad7636927a019e5798734e04
https://github.com/spoom-php/core/blob/ea7184213352fa2fad7636927a019e5798734e04/src/extension/File.php#L695-L697
196,932
OxfordInfoLabs/kinikit-core
src/Util/ObjectUtils.php
ObjectUtils.setNestedObjectProperty
public static function setNestedObjectProperty($value, &$object, $memberPath) { // Explode the path on . firstly $explodedPath = explode(".", $memberPath); // Pop the final entry $finalBit = array_pop($explodedPath); // Now call above function to get down to the point we need...
php
public static function setNestedObjectProperty($value, &$object, $memberPath) { // Explode the path on . firstly $explodedPath = explode(".", $memberPath); // Pop the final entry $finalBit = array_pop($explodedPath); // Now call above function to get down to the point we need...
[ "public", "static", "function", "setNestedObjectProperty", "(", "$", "value", ",", "&", "$", "object", ",", "$", "memberPath", ")", "{", "// Explode the path on . firstly", "$", "explodedPath", "=", "explode", "(", "\".\"", ",", "$", "memberPath", ")", ";", "/...
Set a nested object property value on an object using a member path to locate it. @param $value @param $object @param $memberPath
[ "Set", "a", "nested", "object", "property", "value", "on", "an", "object", "using", "a", "member", "path", "to", "locate", "it", "." ]
edc1b2e6ffabd595c4c7d322279b3dd1e59ef359
https://github.com/OxfordInfoLabs/kinikit-core/blob/edc1b2e6ffabd595c4c7d322279b3dd1e59ef359/src/Util/ObjectUtils.php#L95-L126
196,933
OxfordInfoLabs/kinikit-core
src/Util/ObjectUtils.php
ObjectUtils.getDifferingMembers
public static function getDifferingMembers($object1, $object2, $membersToConsider = array(), $recursive = false) { if (!($object1 instanceof SerialisableObject) || !($object2 instanceof SerialisableObject)) { throw new Exception("You cannot compare for differing members of none serialisable object...
php
public static function getDifferingMembers($object1, $object2, $membersToConsider = array(), $recursive = false) { if (!($object1 instanceof SerialisableObject) || !($object2 instanceof SerialisableObject)) { throw new Exception("You cannot compare for differing members of none serialisable object...
[ "public", "static", "function", "getDifferingMembers", "(", "$", "object1", ",", "$", "object2", ",", "$", "membersToConsider", "=", "array", "(", ")", ",", "$", "recursive", "=", "false", ")", "{", "if", "(", "!", "(", "$", "object1", "instanceof", "Ser...
Get differing members between two serialisable source objects - this will return a structured array detailing the differences. If the membersToConsider array is passed only members contained within the array will be considered otherwise all members will be considered by default. @param $object @param $object2
[ "Get", "differing", "members", "between", "two", "serialisable", "source", "objects", "-", "this", "will", "return", "a", "structured", "array", "detailing", "the", "differences", ".", "If", "the", "membersToConsider", "array", "is", "passed", "only", "members", ...
edc1b2e6ffabd595c4c7d322279b3dd1e59ef359
https://github.com/OxfordInfoLabs/kinikit-core/blob/edc1b2e6ffabd595c4c7d322279b3dd1e59ef359/src/Util/ObjectUtils.php#L138-L191
196,934
OxfordInfoLabs/kinikit-core
src/Util/ObjectUtils.php
ObjectUtils.getDifferingMembersFormattedString
public static function getDifferingMembersFormattedString($object1, $object2, $formatString, $separator, $displayMemberKeys = array(), $recursive = false) { // Get the differing members $differingMembers = ObjectUtils::getDifferingMembers($object1, $object2, array_keys($displayMemberKeys), $recursive);...
php
public static function getDifferingMembersFormattedString($object1, $object2, $formatString, $separator, $displayMemberKeys = array(), $recursive = false) { // Get the differing members $differingMembers = ObjectUtils::getDifferingMembers($object1, $object2, array_keys($displayMemberKeys), $recursive);...
[ "public", "static", "function", "getDifferingMembersFormattedString", "(", "$", "object1", ",", "$", "object2", ",", "$", "formatString", ",", "$", "separator", ",", "$", "displayMemberKeys", "=", "array", "(", ")", ",", "$", "recursive", "=", "false", ")", ...
Get a formatted string encoding the differing members. @param $object @param $object2 @param $formatString @param $separator
[ "Get", "a", "formatted", "string", "encoding", "the", "differing", "members", "." ]
edc1b2e6ffabd595c4c7d322279b3dd1e59ef359
https://github.com/OxfordInfoLabs/kinikit-core/blob/edc1b2e6ffabd595c4c7d322279b3dd1e59ef359/src/Util/ObjectUtils.php#L201-L216
196,935
Blipfoto/php-sdk
src/Blipfoto/Traits/Helper.php
Helper.getset
public function getset($property, $args) { if (count($args)) { $this->$property = $args[0]; } return $this->$property; }
php
public function getset($property, $args) { if (count($args)) { $this->$property = $args[0]; } return $this->$property; }
[ "public", "function", "getset", "(", "$", "property", ",", "$", "args", ")", "{", "if", "(", "count", "(", "$", "args", ")", ")", "{", "$", "this", "->", "$", "property", "=", "$", "args", "[", "0", "]", ";", "}", "return", "$", "this", "->", ...
Get and optionally set the value for a property. @param string $property @param array $args
[ "Get", "and", "optionally", "set", "the", "value", "for", "a", "property", "." ]
04f770ac7427e79d15f97b993c787651079cdeb4
https://github.com/Blipfoto/php-sdk/blob/04f770ac7427e79d15f97b993c787651079cdeb4/src/Blipfoto/Traits/Helper.php#L13-L18
196,936
codeblanche/Entity
src/Entity/Abstraction/AbstractEntity.php
AbstractEntity.resolveDefitions
protected function resolveDefitions(PropertyDefinitionCollectionInterface $propertyDefinitionCollection = null) { if ($propertyDefinitionCollection instanceof PropertyDefinitionCollectionInterface) { return $propertyDefinitionCollection->import($this->propertiesAndTypes()); } $c...
php
protected function resolveDefitions(PropertyDefinitionCollectionInterface $propertyDefinitionCollection = null) { if ($propertyDefinitionCollection instanceof PropertyDefinitionCollectionInterface) { return $propertyDefinitionCollection->import($this->propertiesAndTypes()); } $c...
[ "protected", "function", "resolveDefitions", "(", "PropertyDefinitionCollectionInterface", "$", "propertyDefinitionCollection", "=", "null", ")", "{", "if", "(", "$", "propertyDefinitionCollection", "instanceof", "PropertyDefinitionCollectionInterface", ")", "{", "return", "$...
Resolve and if necessary initialize the property definition collection. @param PropertyDefinitionCollectionInterface $propertyDefinitionCollection @return PropertyDefinitionCollectionInterface
[ "Resolve", "and", "if", "necessary", "initialize", "the", "property", "definition", "collection", "." ]
1d3839c09d7639ae8bbfc9d2721223202f3a5cdd
https://github.com/codeblanche/Entity/blob/1d3839c09d7639ae8bbfc9d2721223202f3a5cdd/src/Entity/Abstraction/AbstractEntity.php#L165-L184
196,937
OxfordInfoLabs/kinikit-core
src/Util/FileUtils.php
FileUtils.appendDataToFile
public static function appendDataToFile($filePath, $data, $newLine = false) { if ($newLine) { file_put_contents($filePath, $data . PHP_EOL, FILE_APPEND); } else { file_put_contents($filePath, $data, FILE_APPEND); } }
php
public static function appendDataToFile($filePath, $data, $newLine = false) { if ($newLine) { file_put_contents($filePath, $data . PHP_EOL, FILE_APPEND); } else { file_put_contents($filePath, $data, FILE_APPEND); } }
[ "public", "static", "function", "appendDataToFile", "(", "$", "filePath", ",", "$", "data", ",", "$", "newLine", "=", "false", ")", "{", "if", "(", "$", "newLine", ")", "{", "file_put_contents", "(", "$", "filePath", ",", "$", "data", ".", "PHP_EOL", "...
Add data to the end of a file. @param $filePath string @param $data string @param $newLine boolean
[ "Add", "data", "to", "the", "end", "of", "a", "file", "." ]
edc1b2e6ffabd595c4c7d322279b3dd1e59ef359
https://github.com/OxfordInfoLabs/kinikit-core/blob/edc1b2e6ffabd595c4c7d322279b3dd1e59ef359/src/Util/FileUtils.php#L15-L21
196,938
OxfordInfoLabs/kinikit-core
src/Util/FileUtils.php
FileUtils.removeLineFromFile
public static function removeLineFromFile($filePath, $match) { $allLines = file($filePath); $matches = preg_grep('/' . $match . '/i', $allLines, PREG_GREP_INVERT); // This removes any lines with returns, so we avoid additional blank lines when we glue // back together again. $cl...
php
public static function removeLineFromFile($filePath, $match) { $allLines = file($filePath); $matches = preg_grep('/' . $match . '/i', $allLines, PREG_GREP_INVERT); // This removes any lines with returns, so we avoid additional blank lines when we glue // back together again. $cl...
[ "public", "static", "function", "removeLineFromFile", "(", "$", "filePath", ",", "$", "match", ")", "{", "$", "allLines", "=", "file", "(", "$", "filePath", ")", ";", "$", "matches", "=", "preg_grep", "(", "'/'", ".", "$", "match", ".", "'/i'", ",", ...
Find matching line of text from file and remove it. @param $filePath string @param $match string
[ "Find", "matching", "line", "of", "text", "from", "file", "and", "remove", "it", "." ]
edc1b2e6ffabd595c4c7d322279b3dd1e59ef359
https://github.com/OxfordInfoLabs/kinikit-core/blob/edc1b2e6ffabd595c4c7d322279b3dd1e59ef359/src/Util/FileUtils.php#L33-L45
196,939
OxfordInfoLabs/kinikit-core
src/Util/FileUtils.php
FileUtils.returnMatchingLinesFromFile
public static function returnMatchingLinesFromFile($filePath, $textMatch) { $allLines = file($filePath); $matches = preg_grep("/" . $textMatch . "/i", $allLines); $cleanMatches = array_map(function ($str) { return str_replace(PHP_EOL, '', $str); }, $matches); return...
php
public static function returnMatchingLinesFromFile($filePath, $textMatch) { $allLines = file($filePath); $matches = preg_grep("/" . $textMatch . "/i", $allLines); $cleanMatches = array_map(function ($str) { return str_replace(PHP_EOL, '', $str); }, $matches); return...
[ "public", "static", "function", "returnMatchingLinesFromFile", "(", "$", "filePath", ",", "$", "textMatch", ")", "{", "$", "allLines", "=", "file", "(", "$", "filePath", ")", ";", "$", "matches", "=", "preg_grep", "(", "\"/\"", ".", "$", "textMatch", ".", ...
Return lines matching the text supplied. @param $filePath @param $textMatch @return array
[ "Return", "lines", "matching", "the", "text", "supplied", "." ]
edc1b2e6ffabd595c4c7d322279b3dd1e59ef359
https://github.com/OxfordInfoLabs/kinikit-core/blob/edc1b2e6ffabd595c4c7d322279b3dd1e59ef359/src/Util/FileUtils.php#L54-L63
196,940
RudyMas/Emvc_Menu
src/BootstrapMenu.php
BootstrapMenu.createMenu
public function createMenu(string $id, string $class): string { $output = $this->addOpeningNav($id); if ($this->options['brand']['name'] !== '') $output .= $this->addBranding(); if ($this->options['mobile']) $output .= $this->addMobileButton(); $output .= '<div class="collapse navbar...
php
public function createMenu(string $id, string $class): string { $output = $this->addOpeningNav($id); if ($this->options['brand']['name'] !== '') $output .= $this->addBranding(); if ($this->options['mobile']) $output .= $this->addMobileButton(); $output .= '<div class="collapse navbar...
[ "public", "function", "createMenu", "(", "string", "$", "id", ",", "string", "$", "class", ")", ":", "string", "{", "$", "output", "=", "$", "this", "->", "addOpeningNav", "(", "$", "id", ")", ";", "if", "(", "$", "this", "->", "options", "[", "'br...
1.0 Start of creating the bootstrap menu @param string $id @param string $class @return string
[ "1", ".", "0", "Start", "of", "creating", "the", "bootstrap", "menu" ]
5765ec7e7193866de19e7a039a347ac4ed3bf952
https://github.com/RudyMas/Emvc_Menu/blob/5765ec7e7193866de19e7a039a347ac4ed3bf952/src/BootstrapMenu.php#L65-L76
196,941
RudyMas/Emvc_Menu
src/BootstrapMenu.php
BootstrapMenu.addOpeningNav
private function addOpeningNav(string $id): string { $output = '<nav '; if ($id !== '') $output .= 'id="' . $id . '" '; $output .= 'class="navbar navbar-' . $this->options['theme']['fore']; if (!empty($this->options['theme']['back'])) $output .= " bg-" . $this->options['theme']['back...
php
private function addOpeningNav(string $id): string { $output = '<nav '; if ($id !== '') $output .= 'id="' . $id . '" '; $output .= 'class="navbar navbar-' . $this->options['theme']['fore']; if (!empty($this->options['theme']['back'])) $output .= " bg-" . $this->options['theme']['back...
[ "private", "function", "addOpeningNav", "(", "string", "$", "id", ")", ":", "string", "{", "$", "output", "=", "'<nav '", ";", "if", "(", "$", "id", "!==", "''", ")", "$", "output", ".=", "'id=\"'", ".", "$", "id", ".", "'\" '", ";", "$", "output",...
1.1 Creating opening tag navigation @param string $id @return string
[ "1", ".", "1", "Creating", "opening", "tag", "navigation" ]
5765ec7e7193866de19e7a039a347ac4ed3bf952
https://github.com/RudyMas/Emvc_Menu/blob/5765ec7e7193866de19e7a039a347ac4ed3bf952/src/BootstrapMenu.php#L84-L98
196,942
RudyMas/Emvc_Menu
src/BootstrapMenu.php
BootstrapMenu.addBranding
private function addBranding(): string { $output = '<a class="navbar-brand" href="' . BASE_URL . '/">'; if ($this->options['brand']['image']['link'] !== 'none') $output .= '<img src="' . BASE_URL . $this->options['brand']['image']['link'] . '" height="' . $this->options['brand']['image']['size'] . '...
php
private function addBranding(): string { $output = '<a class="navbar-brand" href="' . BASE_URL . '/">'; if ($this->options['brand']['image']['link'] !== 'none') $output .= '<img src="' . BASE_URL . $this->options['brand']['image']['link'] . '" height="' . $this->options['brand']['image']['size'] . '...
[ "private", "function", "addBranding", "(", ")", ":", "string", "{", "$", "output", "=", "'<a class=\"navbar-brand\" href=\"'", ".", "BASE_URL", ".", "'/\">'", ";", "if", "(", "$", "this", "->", "options", "[", "'brand'", "]", "[", "'image'", "]", "[", "'li...
1.2 Adding the brand of the website to the menu @return string
[ "1", ".", "2", "Adding", "the", "brand", "of", "the", "website", "to", "the", "menu" ]
5765ec7e7193866de19e7a039a347ac4ed3bf952
https://github.com/RudyMas/Emvc_Menu/blob/5765ec7e7193866de19e7a039a347ac4ed3bf952/src/BootstrapMenu.php#L105-L119
196,943
RudyMas/Emvc_Menu
src/BootstrapMenu.php
BootstrapMenu.createLeftMenu
private function createLeftMenu(): string { $argsCount = 0; $arrayKey = $this->getArrayKey($this->menuData); $output = '<ul class="navbar navbar-nav mr-auto">'; foreach ($arrayKey as $menuItem) { list($url, $text, $place, $id, $class) = $this->getLinkInformation([$menuIte...
php
private function createLeftMenu(): string { $argsCount = 0; $arrayKey = $this->getArrayKey($this->menuData); $output = '<ul class="navbar navbar-nav mr-auto">'; foreach ($arrayKey as $menuItem) { list($url, $text, $place, $id, $class) = $this->getLinkInformation([$menuIte...
[ "private", "function", "createLeftMenu", "(", ")", ":", "string", "{", "$", "argsCount", "=", "0", ";", "$", "arrayKey", "=", "$", "this", "->", "getArrayKey", "(", "$", "this", "->", "menuData", ")", ";", "$", "output", "=", "'<ul class=\"navbar navbar-na...
2.0 Creating Bootstrap's Left Menu @return string
[ "2", ".", "0", "Creating", "Bootstrap", "s", "Left", "Menu" ]
5765ec7e7193866de19e7a039a347ac4ed3bf952
https://github.com/RudyMas/Emvc_Menu/blob/5765ec7e7193866de19e7a039a347ac4ed3bf952/src/BootstrapMenu.php#L140-L163
196,944
RudyMas/Emvc_Menu
src/BootstrapMenu.php
BootstrapMenu.createSubmenu
private function createSubmenu(array $arguments, array $subMenu): string { $argsCount = count($arguments); $arrayKey = $this->getArrayKey($subMenu); list($url, $text, $place, $id, $class) = $this->getLinkInformation($arguments); $output = '<a class="nav-link dropdown-toggle'; ...
php
private function createSubmenu(array $arguments, array $subMenu): string { $argsCount = count($arguments); $arrayKey = $this->getArrayKey($subMenu); list($url, $text, $place, $id, $class) = $this->getLinkInformation($arguments); $output = '<a class="nav-link dropdown-toggle'; ...
[ "private", "function", "createSubmenu", "(", "array", "$", "arguments", ",", "array", "$", "subMenu", ")", ":", "string", "{", "$", "argsCount", "=", "count", "(", "$", "arguments", ")", ";", "$", "arrayKey", "=", "$", "this", "->", "getArrayKey", "(", ...
4.0 Create the drop down submenu @param array $arguments @param array $subMenu @return string
[ "4", ".", "0", "Create", "the", "drop", "down", "submenu" ]
5765ec7e7193866de19e7a039a347ac4ed3bf952
https://github.com/RudyMas/Emvc_Menu/blob/5765ec7e7193866de19e7a039a347ac4ed3bf952/src/BootstrapMenu.php#L202-L231
196,945
RudyMas/Emvc_Menu
src/BootstrapMenu.php
BootstrapMenu.createDropDownItemSubUrl
private function createDropDownItemSubUrl(array $args): string { list($url, $text, $place, $id, $class) = $this->getLinkInformation($args); $output = '<a class="dropdown-item dropdown-toggle'; $output = !empty($class) ? $output . ' ' . $class . '"' : $output . '"'; if (!empty($id)) $...
php
private function createDropDownItemSubUrl(array $args): string { list($url, $text, $place, $id, $class) = $this->getLinkInformation($args); $output = '<a class="dropdown-item dropdown-toggle'; $output = !empty($class) ? $output . ' ' . $class . '"' : $output . '"'; if (!empty($id)) $...
[ "private", "function", "createDropDownItemSubUrl", "(", "array", "$", "args", ")", ":", "string", "{", "list", "(", "$", "url", ",", "$", "text", ",", "$", "place", ",", "$", "id", ",", "$", "class", ")", "=", "$", "this", "->", "getLinkInformation", ...
G.2 Create the URL for the dropdown-item @param array $args @return string
[ "G", ".", "2", "Create", "the", "URL", "for", "the", "dropdown", "-", "item" ]
5765ec7e7193866de19e7a039a347ac4ed3bf952
https://github.com/RudyMas/Emvc_Menu/blob/5765ec7e7193866de19e7a039a347ac4ed3bf952/src/BootstrapMenu.php#L303-L311
196,946
RudyMas/Emvc_Menu
src/BootstrapMenu.php
BootstrapMenu.getLinkInformation
private function getLinkInformation(array $args): array { $arg = Menu::getIndexes($args); $url = $this->menuData[$arg[0]][$arg[1]][$arg[2]][$arg[3]][$arg[4]][$arg[5]][$arg[6]][$arg[7]][$arg[8]][$arg[9]]['url']; $text = $this->menuData[$arg[0]][$arg[1]][$arg[2]][$arg[3]][$arg[4]][$arg[5]][$ar...
php
private function getLinkInformation(array $args): array { $arg = Menu::getIndexes($args); $url = $this->menuData[$arg[0]][$arg[1]][$arg[2]][$arg[3]][$arg[4]][$arg[5]][$arg[6]][$arg[7]][$arg[8]][$arg[9]]['url']; $text = $this->menuData[$arg[0]][$arg[1]][$arg[2]][$arg[3]][$arg[4]][$arg[5]][$ar...
[ "private", "function", "getLinkInformation", "(", "array", "$", "args", ")", ":", "array", "{", "$", "arg", "=", "Menu", "::", "getIndexes", "(", "$", "args", ")", ";", "$", "url", "=", "$", "this", "->", "menuData", "[", "$", "arg", "[", "0", "]",...
G.3 Get the menu information @param array $args @return array
[ "G", ".", "3", "Get", "the", "menu", "information" ]
5765ec7e7193866de19e7a039a347ac4ed3bf952
https://github.com/RudyMas/Emvc_Menu/blob/5765ec7e7193866de19e7a039a347ac4ed3bf952/src/BootstrapMenu.php#L319-L328
196,947
RudyMas/Emvc_Menu
src/BootstrapMenu.php
BootstrapMenu.getArrayKey
private function getArrayKey(array $menuData): array { $arrayKey = array_keys($menuData); $arrayKey = array_diff($arrayKey, $this->remove); $arrayKey = array_values($arrayKey); return $arrayKey; }
php
private function getArrayKey(array $menuData): array { $arrayKey = array_keys($menuData); $arrayKey = array_diff($arrayKey, $this->remove); $arrayKey = array_values($arrayKey); return $arrayKey; }
[ "private", "function", "getArrayKey", "(", "array", "$", "menuData", ")", ":", "array", "{", "$", "arrayKey", "=", "array_keys", "(", "$", "menuData", ")", ";", "$", "arrayKey", "=", "array_diff", "(", "$", "arrayKey", ",", "$", "this", "->", "remove", ...
G.4 Get the keys of the current level in the menu @param array $menuData @return array
[ "G", ".", "4", "Get", "the", "keys", "of", "the", "current", "level", "in", "the", "menu" ]
5765ec7e7193866de19e7a039a347ac4ed3bf952
https://github.com/RudyMas/Emvc_Menu/blob/5765ec7e7193866de19e7a039a347ac4ed3bf952/src/BootstrapMenu.php#L336-L342
196,948
RudyMas/Emvc_Menu
src/BootstrapMenu.php
BootstrapMenu.overviewUrl
private function overviewUrl(string $url, string $id, string $class): string { $output = '<li>'; $output .= '<a class="dropdown-item'; $output = !empty($class) ? $output . ' ' . $class . '"' : $output . '"'; if (!empty($id)) $output .= ' id="' . $id . '"'; $output .= ' href="...
php
private function overviewUrl(string $url, string $id, string $class): string { $output = '<li>'; $output .= '<a class="dropdown-item'; $output = !empty($class) ? $output . ' ' . $class . '"' : $output . '"'; if (!empty($id)) $output .= ' id="' . $id . '"'; $output .= ' href="...
[ "private", "function", "overviewUrl", "(", "string", "$", "url", ",", "string", "$", "id", ",", "string", "$", "class", ")", ":", "string", "{", "$", "output", "=", "'<li>'", ";", "$", "output", ".=", "'<a class=\"dropdown-item'", ";", "$", "output", "="...
G.5 Add Overview Menu option @param string $url @param string $id @param string $class @return string
[ "G", ".", "5", "Add", "Overview", "Menu", "option" ]
5765ec7e7193866de19e7a039a347ac4ed3bf952
https://github.com/RudyMas/Emvc_Menu/blob/5765ec7e7193866de19e7a039a347ac4ed3bf952/src/BootstrapMenu.php#L352-L361
196,949
freialib/hlin.archetype
src/Trait/Logger.php
LoggerTrait.var_dump
function var_dump($message, $data) { try { $export = trim(str_replace("\n", "\n\t", var_export($data, true)), "\n\t "); $this->log("$message\n\n\t$export\n"); } catch (Exception $e) { $this->failedLogging($e, $message); } }
php
function var_dump($message, $data) { try { $export = trim(str_replace("\n", "\n\t", var_export($data, true)), "\n\t "); $this->log("$message\n\n\t$export\n"); } catch (Exception $e) { $this->failedLogging($e, $message); } }
[ "function", "var_dump", "(", "$", "message", ",", "$", "data", ")", "{", "try", "{", "$", "export", "=", "trim", "(", "str_replace", "(", "\"\\n\"", ",", "\"\\n\\t\"", ",", "var_export", "(", "$", "data", ",", "true", ")", ")", ",", "\"\\n\\t \"", ")...
Save the data passed in as data.
[ "Save", "the", "data", "passed", "in", "as", "data", "." ]
d8750a9bf4b7efb8063899969e3f39c1915c423a
https://github.com/freialib/hlin.archetype/blob/d8750a9bf4b7efb8063899969e3f39c1915c423a/src/Trait/Logger.php#L29-L37
196,950
freialib/hlin.archetype
src/Trait/Logger.php
LoggerTrait.becloud
protected function becloud($clear) { if ($this->beclouding === null) { return $clear; } else { // path replacements $to_hide = []; foreach ($this->beclouding as $key => $str) { $to_hide[$str] = $key; } return strtr($clear, $to_hide); } }
php
protected function becloud($clear) { if ($this->beclouding === null) { return $clear; } else { // path replacements $to_hide = []; foreach ($this->beclouding as $key => $str) { $to_hide[$str] = $key; } return strtr($clear, $to_hide); } }
[ "protected", "function", "becloud", "(", "$", "clear", ")", "{", "if", "(", "$", "this", "->", "beclouding", "===", "null", ")", "{", "return", "$", "clear", ";", "}", "else", "{", "// path replacements", "$", "to_hide", "=", "[", "]", ";", "foreach", ...
This method is hook for implementation that can handle hiding, or need hiding. @return string beclouded version
[ "This", "method", "is", "hook", "for", "implementation", "that", "can", "handle", "hiding", "or", "need", "hiding", "." ]
d8750a9bf4b7efb8063899969e3f39c1915c423a
https://github.com/freialib/hlin.archetype/blob/d8750a9bf4b7efb8063899969e3f39c1915c423a/src/Trait/Logger.php#L61-L72
196,951
PhoxPHP/Console
src/Environment.php
Environment.getText
public function getText(String $text=null, String $colour='green', String $backgroundColor='black') { $colours = [ 'green' => Attributes::COLOR_GREEN, 'red' => Attributes::COLOR_RED, 'yellow' => Attributes::COLOR_YELLOW, 'blue' => Attributes::COLOR_BLUE, 'cyan' => Attributes::COLOR_CYAN, 'magenta' ...
php
public function getText(String $text=null, String $colour='green', String $backgroundColor='black') { $colours = [ 'green' => Attributes::COLOR_GREEN, 'red' => Attributes::COLOR_RED, 'yellow' => Attributes::COLOR_YELLOW, 'blue' => Attributes::COLOR_BLUE, 'cyan' => Attributes::COLOR_CYAN, 'magenta' ...
[ "public", "function", "getText", "(", "String", "$", "text", "=", "null", ",", "String", "$", "colour", "=", "'green'", ",", "String", "$", "backgroundColor", "=", "'black'", ")", "{", "$", "colours", "=", "[", "'green'", "=>", "Attributes", "::", "COLOR...
Returns text with option to set the text colour. @param $text <String> @param $colour <String> @param $backgroundColor <String> @access public @return <Mixed>
[ "Returns", "text", "with", "option", "to", "set", "the", "text", "colour", "." ]
fee1238cfdb3592964bb5d5a2336e70b8ffd20e9
https://github.com/PhoxPHP/Console/blob/fee1238cfdb3592964bb5d5a2336e70b8ffd20e9/src/Environment.php#L61-L90
196,952
PhoxPHP/Console
src/Environment.php
Environment.sendOutput
public function sendOutput(String $output, String $colour='white', String $backgroundColor='black') { fwrite(STDOUT, $this->getText($output, $colour, $backgroundColor)); }
php
public function sendOutput(String $output, String $colour='white', String $backgroundColor='black') { fwrite(STDOUT, $this->getText($output, $colour, $backgroundColor)); }
[ "public", "function", "sendOutput", "(", "String", "$", "output", ",", "String", "$", "colour", "=", "'white'", ",", "String", "$", "backgroundColor", "=", "'black'", ")", "{", "fwrite", "(", "STDOUT", ",", "$", "this", "->", "getText", "(", "$", "output...
Sends output to the environment. @param $output <String> @param $colour <String> @param $backgroundColor <String> @access public @return <void>
[ "Sends", "output", "to", "the", "environment", "." ]
fee1238cfdb3592964bb5d5a2336e70b8ffd20e9
https://github.com/PhoxPHP/Console/blob/fee1238cfdb3592964bb5d5a2336e70b8ffd20e9/src/Environment.php#L134-L137
196,953
lasallecms/lasallecms-l5-lasallecmsemail-pkg
src/Repositories/Email_attachmentRepository.php
Email_attachmentRepository.getAlternatesortstring1ByUserId
public function getAlternatesortstring1ByUserId($userID) { return DB::table('email_messages') ->join('email_attachments', 'email_messages.id', '=', 'email_attachments.email_messages_id') ->select('email_attachments.alternate_sort_string1') ->where('email_messages.user_id', '=...
php
public function getAlternatesortstring1ByUserId($userID) { return DB::table('email_messages') ->join('email_attachments', 'email_messages.id', '=', 'email_attachments.email_messages_id') ->select('email_attachments.alternate_sort_string1') ->where('email_messages.user_id', '=...
[ "public", "function", "getAlternatesortstring1ByUserId", "(", "$", "userID", ")", "{", "return", "DB", "::", "table", "(", "'email_messages'", ")", "->", "join", "(", "'email_attachments'", ",", "'email_messages.id'", ",", "'='", ",", "'email_attachments.email_message...
Get a list of "alternatesortstring1" field values by user ID @param int $userID @return collection
[ "Get", "a", "list", "of", "alternatesortstring1", "field", "values", "by", "user", "ID" ]
95db5a59ab322105b9d3681cf9ab1f829c9fdb9f
https://github.com/lasallecms/lasallecms-l5-lasallecmsemail-pkg/blob/95db5a59ab322105b9d3681cf9ab1f829c9fdb9f/src/Repositories/Email_attachmentRepository.php#L102-L111
196,954
comodojo/foundation
src/Comodojo/Foundation/Utils/ErrorLevelConverter.php
ErrorLevelConverter.convert
public static function convert(int $error_code) { return isset(self::$levels[$error_code]) ? self::$levels[$error_code] : "GENERIC_ERROR"; }
php
public static function convert(int $error_code) { return isset(self::$levels[$error_code]) ? self::$levels[$error_code] : "GENERIC_ERROR"; }
[ "public", "static", "function", "convert", "(", "int", "$", "error_code", ")", "{", "return", "isset", "(", "self", "::", "$", "levels", "[", "$", "error_code", "]", ")", "?", "self", "::", "$", "levels", "[", "$", "error_code", "]", ":", "\"GENERIC_ER...
Convert a PHP error level to its name @param int $error_code @return string
[ "Convert", "a", "PHP", "error", "level", "to", "its", "name" ]
21ed690e81763ed9e1ef7721a7eb4fcc0fcefc1a
https://github.com/comodojo/foundation/blob/21ed690e81763ed9e1ef7721a7eb4fcc0fcefc1a/src/Comodojo/Foundation/Utils/ErrorLevelConverter.php#L46-L50
196,955
AnonymPHP/Anonym-Database
Base.php
Base.errorInfo
public function errorInfo(){ if ($this->getConnection() instanceof PDO) { $message = isset($this->connection->errorInfo()['message']) ? $this->getConnection()->errorInfo()['message'] : 'Something Went Wrong!'; } elseif ($this->getConnection() instanceof mysqli) { $message = $this...
php
public function errorInfo(){ if ($this->getConnection() instanceof PDO) { $message = isset($this->connection->errorInfo()['message']) ? $this->getConnection()->errorInfo()['message'] : 'Something Went Wrong!'; } elseif ($this->getConnection() instanceof mysqli) { $message = $this...
[ "public", "function", "errorInfo", "(", ")", "{", "if", "(", "$", "this", "->", "getConnection", "(", ")", "instanceof", "PDO", ")", "{", "$", "message", "=", "isset", "(", "$", "this", "->", "connection", "->", "errorInfo", "(", ")", "[", "'message'",...
return the last query error @return string
[ "return", "the", "last", "query", "error" ]
4d034219e0e3eb2833fa53204e9f52a74a9a7e4b
https://github.com/AnonymPHP/Anonym-Database/blob/4d034219e0e3eb2833fa53204e9f52a74a9a7e4b/Base.php#L174-L182
196,956
jacksleight/coast
library/App.php
App.dir
public function dir($path = null, $create = false) { if (!isset($this->_baseDir)) { throw new App\Exception('Base directory not set'); } return isset($path) ? $this->_baseDir->dir($path, $create) : $this->_baseDir; }
php
public function dir($path = null, $create = false) { if (!isset($this->_baseDir)) { throw new App\Exception('Base directory not set'); } return isset($path) ? $this->_baseDir->dir($path, $create) : $this->_baseDir; }
[ "public", "function", "dir", "(", "$", "path", "=", "null", ",", "$", "create", "=", "false", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "_baseDir", ")", ")", "{", "throw", "new", "App", "\\", "Exception", "(", "'Base directory not se...
Get child directory. @return Coast\Dir
[ "Get", "child", "directory", "." ]
cd6cd41e8304adce41f59f799d4183adcaf666f9
https://github.com/jacksleight/coast/blob/cd6cd41e8304adce41f59f799d4183adcaf666f9/library/App.php#L118-L126
196,957
jacksleight/coast
library/App.php
App.file
public function file($path) { if (!isset($this->_baseDir)) { throw new App\Exception('Base directory not set'); } return $this->_baseDir->file($path); }
php
public function file($path) { if (!isset($this->_baseDir)) { throw new App\Exception('Base directory not set'); } return $this->_baseDir->file($path); }
[ "public", "function", "file", "(", "$", "path", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "_baseDir", ")", ")", "{", "throw", "new", "App", "\\", "Exception", "(", "'Base directory not set'", ")", ";", "}", "return", "$", "this", "->...
Get child file. @return Coast\File
[ "Get", "child", "file", "." ]
cd6cd41e8304adce41f59f799d4183adcaf666f9
https://github.com/jacksleight/coast/blob/cd6cd41e8304adce41f59f799d4183adcaf666f9/library/App.php#L132-L138
196,958
jacksleight/coast
library/App.php
App.load
public function load($file, array $vars = array()) { $file = !$file instanceof File ? new File("{$file}") : $file; $file = $file->isRelative() ? $this->file($file) : $file; return \Coast\load($file, array_merge(['app' => $this], $vars)); }
php
public function load($file, array $vars = array()) { $file = !$file instanceof File ? new File("{$file}") : $file; $file = $file->isRelative() ? $this->file($file) : $file; return \Coast\load($file, array_merge(['app' => $this], $vars)); }
[ "public", "function", "load", "(", "$", "file", ",", "array", "$", "vars", "=", "array", "(", ")", ")", "{", "$", "file", "=", "!", "$", "file", "instanceof", "File", "?", "new", "File", "(", "\"{$file}\"", ")", ":", "$", "file", ";", "$", "file"...
Load a file without leaking variables, include app object in vars. @param mixed $file @param array $vars @return mixed
[ "Load", "a", "file", "without", "leaking", "variables", "include", "app", "object", "in", "vars", "." ]
cd6cd41e8304adce41f59f799d4183adcaf666f9
https://github.com/jacksleight/coast/blob/cd6cd41e8304adce41f59f799d4183adcaf666f9/library/App.php#L146-L155
196,959
jacksleight/coast
library/App.php
App.lazy
public function lazy($source, array $vars = array()) { if (is_string($source)) { $source = new File("{$source}"); $source = $source->isRelative() ? $this->file($source) : $source; } return new Lazy($source, array_merge(['app' => $this],...
php
public function lazy($source, array $vars = array()) { if (is_string($source)) { $source = new File("{$source}"); $source = $source->isRelative() ? $this->file($source) : $source; } return new Lazy($source, array_merge(['app' => $this],...
[ "public", "function", "lazy", "(", "$", "source", ",", "array", "$", "vars", "=", "array", "(", ")", ")", "{", "if", "(", "is_string", "(", "$", "source", ")", ")", "{", "$", "source", "=", "new", "File", "(", "\"{$source}\"", ")", ";", "$", "sou...
Lazy load a file without leaking variables, include app object in vars. @param mixed $file @param array $vars @return mixed
[ "Lazy", "load", "a", "file", "without", "leaking", "variables", "include", "app", "object", "in", "vars", "." ]
cd6cd41e8304adce41f59f799d4183adcaf666f9
https://github.com/jacksleight/coast/blob/cd6cd41e8304adce41f59f799d4183adcaf666f9/library/App.php#L163-L172
196,960
jacksleight/coast
library/App.php
App.executable
public function executable($executable, $subpath = null) { if (!$executable instanceof Closure && !$executable instanceof Executable) { throw new App\Exception("Object is not a closure or instance of Coast\App\Executable"); } if (isset($subpath)) { $executable = new A...
php
public function executable($executable, $subpath = null) { if (!$executable instanceof Closure && !$executable instanceof Executable) { throw new App\Exception("Object is not a closure or instance of Coast\App\Executable"); } if (isset($subpath)) { $executable = new A...
[ "public", "function", "executable", "(", "$", "executable", ",", "$", "subpath", "=", "null", ")", "{", "if", "(", "!", "$", "executable", "instanceof", "Closure", "&&", "!", "$", "executable", "instanceof", "Executable", ")", "{", "throw", "new", "App", ...
Add executable to the stack. @param string $name @param Closure|Coast\App\Executable $value @return self
[ "Add", "executable", "to", "the", "stack", "." ]
cd6cd41e8304adce41f59f799d4183adcaf666f9
https://github.com/jacksleight/coast/blob/cd6cd41e8304adce41f59f799d4183adcaf666f9/library/App.php#L255-L269
196,961
jacksleight/coast
library/App.php
App.execute
public function execute(Request $req = null, Response $res = null) { $auto = false; if (!isset($req)) { $auto = true; $req = (new Request())->fromGlobals(); $res = (new Response($req)); } else if (!isset($res)) { throw new App\Exception('You ...
php
public function execute(Request $req = null, Response $res = null) { $auto = false; if (!isset($req)) { $auto = true; $req = (new Request())->fromGlobals(); $res = (new Response($req)); } else if (!isset($res)) { throw new App\Exception('You ...
[ "public", "function", "execute", "(", "Request", "$", "req", "=", "null", ",", "Response", "$", "res", "=", "null", ")", "{", "$", "auto", "=", "false", ";", "if", "(", "!", "isset", "(", "$", "req", ")", ")", "{", "$", "auto", "=", "true", ";"...
Execute the application, running middleware in order. @param Coast\Request $req Request object. @param Coast\Response $res Response object.
[ "Execute", "the", "application", "running", "middleware", "in", "order", "." ]
cd6cd41e8304adce41f59f799d4183adcaf666f9
https://github.com/jacksleight/coast/blob/cd6cd41e8304adce41f59f799d4183adcaf666f9/library/App.php#L276-L333
196,962
wasinger/adaptimage
src/ImageResizeDefinition.php
ImageResizeDefinition.addPostFilter
public function addPostFilter(FilterInterface $filter, $priority = 0) { $this->post_transformation->add($filter, $priority); return $this; }
php
public function addPostFilter(FilterInterface $filter, $priority = 0) { $this->post_transformation->add($filter, $priority); return $this; }
[ "public", "function", "addPostFilter", "(", "FilterInterface", "$", "filter", ",", "$", "priority", "=", "0", ")", "{", "$", "this", "->", "post_transformation", "->", "add", "(", "$", "filter", ",", "$", "priority", ")", ";", "return", "$", "this", ";",...
add a post-processing filter to be always executed This filter will ALWAYS be executed no matter whether the image has actually been resized or not. Usefull e.g. for Strip or Monochrome filter. @param FilterInterface $filter @param int $priority @return $this
[ "add", "a", "post", "-", "processing", "filter", "to", "be", "always", "executed" ]
7b529b25081b399451c8bbd56d0cef7daaa83ec4
https://github.com/wasinger/adaptimage/blob/7b529b25081b399451c8bbd56d0cef7daaa83ec4/src/ImageResizeDefinition.php#L148-L152
196,963
wasinger/adaptimage
src/ImageResizeDefinition.php
ImageResizeDefinition.create
static function create($width, $height = 0, $mode = ImageResizeDefinition::MODE_MAX, $upscale = false) { return new static($width, $height, $mode, $upscale); }
php
static function create($width, $height = 0, $mode = ImageResizeDefinition::MODE_MAX, $upscale = false) { return new static($width, $height, $mode, $upscale); }
[ "static", "function", "create", "(", "$", "width", ",", "$", "height", "=", "0", ",", "$", "mode", "=", "ImageResizeDefinition", "::", "MODE_MAX", ",", "$", "upscale", "=", "false", ")", "{", "return", "new", "static", "(", "$", "width", ",", "$", "h...
Create an ImageResizeDefinition instance @param int $width The width of the new size @param int $height The height of the new size. If set to 0 (default), it will be set to the same value as width. If set to ImageResizeDefinition::HEIGHT_UNRESTRICTED, height will not be restricted. @param string $mode one of the Ima...
[ "Create", "an", "ImageResizeDefinition", "instance" ]
7b529b25081b399451c8bbd56d0cef7daaa83ec4
https://github.com/wasinger/adaptimage/blob/7b529b25081b399451c8bbd56d0cef7daaa83ec4/src/ImageResizeDefinition.php#L231-L234
196,964
prolic/HumusSupervisorModule
src/HumusSupervisorModule/Module.php
Module.onBootstrap
public function onBootstrap(EventInterface $e) { /* @var $e \Zend\Mvc\MvcEvent */ $serviceManager = $e->getApplication()->getServiceManager(); /* @var $serviceManager \Zend\ServiceManager\ServiceManager */ $this->initPluginManagerFactory( $serviceManager, __N...
php
public function onBootstrap(EventInterface $e) { /* @var $e \Zend\Mvc\MvcEvent */ $serviceManager = $e->getApplication()->getServiceManager(); /* @var $serviceManager \Zend\ServiceManager\ServiceManager */ $this->initPluginManagerFactory( $serviceManager, __N...
[ "public", "function", "onBootstrap", "(", "EventInterface", "$", "e", ")", "{", "/* @var $e \\Zend\\Mvc\\MvcEvent */", "$", "serviceManager", "=", "$", "e", "->", "getApplication", "(", ")", "->", "getServiceManager", "(", ")", ";", "/* @var $serviceManager \\Zend\\Se...
Bootstrap the module Register the supervisor plugin manager @param EventInterface $e @return array
[ "Bootstrap", "the", "module" ]
b71a7508d9737dbda1ad3b0a1374ed70b77070bd
https://github.com/prolic/HumusSupervisorModule/blob/b71a7508d9737dbda1ad3b0a1374ed70b77070bd/src/HumusSupervisorModule/Module.php#L57-L74
196,965
itcreator/custom-cmf
Module/Language/src/Cmf/Language/Container.php
Container.get
protected function get($name) { $this->load(); return isset($this->lng[$name]) ? $this->lng[$name] : $name; }
php
protected function get($name) { $this->load(); return isset($this->lng[$name]) ? $this->lng[$name] : $name; }
[ "protected", "function", "get", "(", "$", "name", ")", "{", "$", "this", "->", "load", "(", ")", ";", "return", "isset", "(", "$", "this", "->", "lng", "[", "$", "name", "]", ")", "?", "$", "this", "->", "lng", "[", "$", "name", "]", ":", "$"...
get language Value @param string $name @return mixed
[ "get", "language", "Value" ]
42fc0535dfa0f641856f06673f6ab596b2020c40
https://github.com/itcreator/custom-cmf/blob/42fc0535dfa0f641856f06673f6ab596b2020c40/Module/Language/src/Cmf/Language/Container.php#L65-L70
196,966
frodosghost/AtomLoggerBundle
Log/AtomLogger.php
AtomLogger.message
public function message($message, $level, $level_name, $channel, $datetime) { $datetime->setTimezone(new \DateTimeZone('UTC')); $this->request->setData(array( 'message' => $message, 'status_code' => $level, 'status_name' => $level_name, 'channel' ...
php
public function message($message, $level, $level_name, $channel, $datetime) { $datetime->setTimezone(new \DateTimeZone('UTC')); $this->request->setData(array( 'message' => $message, 'status_code' => $level, 'status_name' => $level_name, 'channel' ...
[ "public", "function", "message", "(", "$", "message", ",", "$", "level", ",", "$", "level_name", ",", "$", "channel", ",", "$", "datetime", ")", "{", "$", "datetime", "->", "setTimezone", "(", "new", "\\", "DateTimeZone", "(", "'UTC'", ")", ")", ";", ...
Build message to send to AtomLogger @param string $message @param integer $level @param string $level_name @param string $channel @param \DateTime $datetime
[ "Build", "message", "to", "send", "to", "AtomLogger" ]
c48823e4b3772e498b366867f27e6581f613f733
https://github.com/frodosghost/AtomLoggerBundle/blob/c48823e4b3772e498b366867f27e6581f613f733/Log/AtomLogger.php#L48-L65
196,967
JumpGateio/Core
src/JumpGate/Core/Http/Routes/BaseRoute.php
BaseRoute.getContext
public function getContext($name = null) { if (is_null($name)) { $name = $this->context; } return isset($this->contexts[$name]) ? $this->contexts[$name] : null; }
php
public function getContext($name = null) { if (is_null($name)) { $name = $this->context; } return isset($this->contexts[$name]) ? $this->contexts[$name] : null; }
[ "public", "function", "getContext", "(", "$", "name", "=", "null", ")", "{", "if", "(", "is_null", "(", "$", "name", ")", ")", "{", "$", "name", "=", "$", "this", "->", "context", ";", "}", "return", "isset", "(", "$", "this", "->", "contexts", "...
Get a context URI from the array. @param string|null $name @return string
[ "Get", "a", "context", "URI", "from", "the", "array", "." ]
485b5cf03b3072267bffbee428b81e48d407d6b6
https://github.com/JumpGateio/Core/blob/485b5cf03b3072267bffbee428b81e48d407d6b6/src/JumpGate/Core/Http/Routes/BaseRoute.php#L72-L79
196,968
JumpGateio/Core
src/JumpGate/Core/Http/Routes/BaseRoute.php
BaseRoute.getPrefix
public function getPrefix() { $prefix = null; if (! is_null($this->getContext())) { $prefix = $this->getContext(); } if (! is_string($this->prefix)) { return $prefix; } return $prefix . $this->prefix; }
php
public function getPrefix() { $prefix = null; if (! is_null($this->getContext())) { $prefix = $this->getContext(); } if (! is_string($this->prefix)) { return $prefix; } return $prefix . $this->prefix; }
[ "public", "function", "getPrefix", "(", ")", "{", "$", "prefix", "=", "null", ";", "if", "(", "!", "is_null", "(", "$", "this", "->", "getContext", "(", ")", ")", ")", "{", "$", "prefix", "=", "$", "this", "->", "getContext", "(", ")", ";", "}", ...
Get the prefix for this route group. @return string|null
[ "Get", "the", "prefix", "for", "this", "route", "group", "." ]
485b5cf03b3072267bffbee428b81e48d407d6b6
https://github.com/JumpGateio/Core/blob/485b5cf03b3072267bffbee428b81e48d407d6b6/src/JumpGate/Core/Http/Routes/BaseRoute.php#L100-L113
196,969
g4code/buffer
src/Buffer.php
Buffer._overflowHandler
protected function _overflowHandler() { return $this->_getAdapter()->overflow( $this->_cacheKey, $this->getUsage() - $this->getSize() + 1, $this->getUsage() ); }
php
protected function _overflowHandler() { return $this->_getAdapter()->overflow( $this->_cacheKey, $this->getUsage() - $this->getSize() + 1, $this->getUsage() ); }
[ "protected", "function", "_overflowHandler", "(", ")", "{", "return", "$", "this", "->", "_getAdapter", "(", ")", "->", "overflow", "(", "$", "this", "->", "_cacheKey", ",", "$", "this", "->", "getUsage", "(", ")", "-", "$", "this", "->", "getSize", "(...
Buffer overflow handler @param void @return boolean
[ "Buffer", "overflow", "handler" ]
2f98fe8681f337095aac60542e31ca9034a795be
https://github.com/g4code/buffer/blob/2f98fe8681f337095aac60542e31ca9034a795be/src/Buffer.php#L131-L137
196,970
g4code/buffer
src/Buffer.php
Buffer.add
public function add($data) { if(empty($data) || !$this->_getAdapter()->isClientConnected()) { return false; } if(!$this->_getAdapter()->add($this->_cacheKey, json_encode($data))) { return false; } // overflow handling if($this->getUsage() >=...
php
public function add($data) { if(empty($data) || !$this->_getAdapter()->isClientConnected()) { return false; } if(!$this->_getAdapter()->add($this->_cacheKey, json_encode($data))) { return false; } // overflow handling if($this->getUsage() >=...
[ "public", "function", "add", "(", "$", "data", ")", "{", "if", "(", "empty", "(", "$", "data", ")", "||", "!", "$", "this", "->", "_getAdapter", "(", ")", "->", "isClientConnected", "(", ")", ")", "{", "return", "false", ";", "}", "if", "(", "!",...
Add data to buffer @param mixed $data @return boolean
[ "Add", "data", "to", "buffer" ]
2f98fe8681f337095aac60542e31ca9034a795be
https://github.com/g4code/buffer/blob/2f98fe8681f337095aac60542e31ca9034a795be/src/Buffer.php#L145-L164
196,971
g4code/buffer
src/Buffer.php
Buffer.read
public function read() { $data = $this->_getAdapter()->read($this->_cacheKey); if(!empty($data) && is_array($data)) { foreach($data as &$row) { // @todo: check what to do with this $row = json_decode($row, 1); } } return $data; }
php
public function read() { $data = $this->_getAdapter()->read($this->_cacheKey); if(!empty($data) && is_array($data)) { foreach($data as &$row) { // @todo: check what to do with this $row = json_decode($row, 1); } } return $data; }
[ "public", "function", "read", "(", ")", "{", "$", "data", "=", "$", "this", "->", "_getAdapter", "(", ")", "->", "read", "(", "$", "this", "->", "_cacheKey", ")", ";", "if", "(", "!", "empty", "(", "$", "data", ")", "&&", "is_array", "(", "$", ...
Read data from buffer @todo: remove json encode from buffer, move it to adapter @return mixed
[ "Read", "data", "from", "buffer" ]
2f98fe8681f337095aac60542e31ca9034a795be
https://github.com/g4code/buffer/blob/2f98fe8681f337095aac60542e31ca9034a795be/src/Buffer.php#L173-L184
196,972
e-commit/EcommitUtilBundle
Doctrine/ClearEntityManager.php
ClearEntityManager.clearEntityManager
public function clearEntityManager($managerName = null) { if (null === $this->doctrine) { throw new \Exception('Doctrine is required'); } if (null === $managerName) { $managerName = $this->doctrine->getDefaultConnectionName(); } if (!array_key_exists(...
php
public function clearEntityManager($managerName = null) { if (null === $this->doctrine) { throw new \Exception('Doctrine is required'); } if (null === $managerName) { $managerName = $this->doctrine->getDefaultConnectionName(); } if (!array_key_exists(...
[ "public", "function", "clearEntityManager", "(", "$", "managerName", "=", "null", ")", "{", "if", "(", "null", "===", "$", "this", "->", "doctrine", ")", "{", "throw", "new", "\\", "Exception", "(", "'Doctrine is required'", ")", ";", "}", "if", "(", "nu...
Detach all objects in EntityManager persisted since snapshot @param string|null $managerName
[ "Detach", "all", "objects", "in", "EntityManager", "persisted", "since", "snapshot" ]
2ee5ddae7709e8ad4412739cbecda28e0590da8b
https://github.com/e-commit/EcommitUtilBundle/blob/2ee5ddae7709e8ad4412739cbecda28e0590da8b/Doctrine/ClearEntityManager.php#L53-L76
196,973
leogitpro/php-zf3-base-module
module/src/Module.php
Module.onBootstrap
public function onBootstrap(MvcEvent $event) { $sharedEventManager = $event->getApplication()->getEventManager()->getSharedManager(); $sharedEventManager->attach( AbstractActionController::class, MvcEvent::EVENT_DISPATCH, [$this, 'onDispatchedListener'], ...
php
public function onBootstrap(MvcEvent $event) { $sharedEventManager = $event->getApplication()->getEventManager()->getSharedManager(); $sharedEventManager->attach( AbstractActionController::class, MvcEvent::EVENT_DISPATCH, [$this, 'onDispatchedListener'], ...
[ "public", "function", "onBootstrap", "(", "MvcEvent", "$", "event", ")", "{", "$", "sharedEventManager", "=", "$", "event", "->", "getApplication", "(", ")", "->", "getEventManager", "(", ")", "->", "getSharedManager", "(", ")", ";", "$", "sharedEventManager",...
Module bootstrap handler @param MvcEvent $event
[ "Module", "bootstrap", "handler" ]
596fc89c25033eaef8f796418a4a3399c47a9638
https://github.com/leogitpro/php-zf3-base-module/blob/596fc89c25033eaef8f796418a4a3399c47a9638/module/src/Module.php#L33-L42
196,974
leogitpro/php-zf3-base-module
module/src/Module.php
Module.getControllerPluginConfig
public function getControllerPluginConfig() { return [ 'factories' => [ Controller\Plugin\Config::class => Controller\Plugin\Factory\ConfigFactory::class, Controller\Plugin\Env::class => Controller\Plugin\Factory\EnvFactory::class, Controller\Plugi...
php
public function getControllerPluginConfig() { return [ 'factories' => [ Controller\Plugin\Config::class => Controller\Plugin\Factory\ConfigFactory::class, Controller\Plugin\Env::class => Controller\Plugin\Factory\EnvFactory::class, Controller\Plugi...
[ "public", "function", "getControllerPluginConfig", "(", ")", "{", "return", "[", "'factories'", "=>", "[", "Controller", "\\", "Plugin", "\\", "Config", "::", "class", "=>", "Controller", "\\", "Plugin", "\\", "Factory", "\\", "ConfigFactory", "::", "class", "...
Configuration controller plugin @return array
[ "Configuration", "controller", "plugin" ]
596fc89c25033eaef8f796418a4a3399c47a9638
https://github.com/leogitpro/php-zf3-base-module/blob/596fc89c25033eaef8f796418a4a3399c47a9638/module/src/Module.php#L254-L268
196,975
leogitpro/php-zf3-base-module
module/src/Module.php
Module.getViewHelperConfig
public function getViewHelperConfig() { return [ 'factories' => [ View\Helper\Params::class => View\Helper\Factory\ParamsFactory::class, View\Helper\Config::class => View\Helper\Factory\ConfigFactory::class, View\Helper\Env::class => View\Helper\Fa...
php
public function getViewHelperConfig() { return [ 'factories' => [ View\Helper\Params::class => View\Helper\Factory\ParamsFactory::class, View\Helper\Config::class => View\Helper\Factory\ConfigFactory::class, View\Helper\Env::class => View\Helper\Fa...
[ "public", "function", "getViewHelperConfig", "(", ")", "{", "return", "[", "'factories'", "=>", "[", "View", "\\", "Helper", "\\", "Params", "::", "class", "=>", "View", "\\", "Helper", "\\", "Factory", "\\", "ParamsFactory", "::", "class", ",", "View", "\...
Configuration view helper @return array
[ "Configuration", "view", "helper" ]
596fc89c25033eaef8f796418a4a3399c47a9638
https://github.com/leogitpro/php-zf3-base-module/blob/596fc89c25033eaef8f796418a4a3399c47a9638/module/src/Module.php#L277-L297
196,976
mtils/cmsable
src/Cmsable/Http/ContentTypeMorpher.php
ContentTypeMorpher.morphResponseIfNeeded
protected function morphResponseIfNeeded($response) { $contentType = $this->detectContentType($response); if ($newResponse = $this->getFromListeners($contentType, $response)) { return $newResponse; } }
php
protected function morphResponseIfNeeded($response) { $contentType = $this->detectContentType($response); if ($newResponse = $this->getFromListeners($contentType, $response)) { return $newResponse; } }
[ "protected", "function", "morphResponseIfNeeded", "(", "$", "response", ")", "{", "$", "contentType", "=", "$", "this", "->", "detectContentType", "(", "$", "response", ")", ";", "if", "(", "$", "newResponse", "=", "$", "this", "->", "getFromListeners", "(",...
Does the actual work. Looks if a morpher is set and call it if needed @param mixed $response @return null|$response
[ "Does", "the", "actual", "work", ".", "Looks", "if", "a", "morpher", "is", "set", "and", "call", "it", "if", "needed" ]
03ae84ee3c7d46146f2a1cf687e5c29d6de4286d
https://github.com/mtils/cmsable/blob/03ae84ee3c7d46146f2a1cf687e5c29d6de4286d/src/Cmsable/Http/ContentTypeMorpher.php#L87-L96
196,977
mtils/cmsable
src/Cmsable/Http/ContentTypeMorpher.php
ContentTypeMorpher.detectContentType
protected function detectContentType($response) { if (!$this->contentTypeDetector) { return $this->defaultContentType; } if ($contentType = call_user_func($this->contentTypeDetector, $response, $this)) { return $contentType; } return $this->defaultCo...
php
protected function detectContentType($response) { if (!$this->contentTypeDetector) { return $this->defaultContentType; } if ($contentType = call_user_func($this->contentTypeDetector, $response, $this)) { return $contentType; } return $this->defaultCo...
[ "protected", "function", "detectContentType", "(", "$", "response", ")", "{", "if", "(", "!", "$", "this", "->", "contentTypeDetector", ")", "{", "return", "$", "this", "->", "defaultContentType", ";", "}", "if", "(", "$", "contentType", "=", "call_user_func...
Detects the content type @param mixed $response @return string
[ "Detects", "the", "content", "type" ]
03ae84ee3c7d46146f2a1cf687e5c29d6de4286d
https://github.com/mtils/cmsable/blob/03ae84ee3c7d46146f2a1cf687e5c29d6de4286d/src/Cmsable/Http/ContentTypeMorpher.php#L104-L115
196,978
mtils/cmsable
src/Cmsable/Http/ContentTypeMorpher.php
ContentTypeMorpher.getFromListeners
protected function getFromListeners($contentType, $response) { foreach (['before', 'after'] as $position) { foreach ($this->getAfterOrBeforeListeners('handle', $position) as $listener) { if($result = $listener($contentType, $response, $this)) { ...
php
protected function getFromListeners($contentType, $response) { foreach (['before', 'after'] as $position) { foreach ($this->getAfterOrBeforeListeners('handle', $position) as $listener) { if($result = $listener($contentType, $response, $this)) { ...
[ "protected", "function", "getFromListeners", "(", "$", "contentType", ",", "$", "response", ")", "{", "foreach", "(", "[", "'before'", ",", "'after'", "]", "as", "$", "position", ")", "{", "foreach", "(", "$", "this", "->", "getAfterOrBeforeListeners", "(", ...
Fires the event and returns the result if there were some @param string $contentType @param \Illuminate\Http\Response $response @return \Illuminate\Http\Response|null
[ "Fires", "the", "event", "and", "returns", "the", "result", "if", "there", "were", "some" ]
03ae84ee3c7d46146f2a1cf687e5c29d6de4286d
https://github.com/mtils/cmsable/blob/03ae84ee3c7d46146f2a1cf687e5c29d6de4286d/src/Cmsable/Http/ContentTypeMorpher.php#L124-L139
196,979
ekyna/SettingBundle
Entity/RedirectionRepository.php
RedirectionRepository.findByPath
public function findByPath($path) { $qb = $this->createQueryBuilder('r'); $query = $qb ->andWhere($qb->expr()->eq('r.fromPath', ':path')) ->andWhere($qb->expr()->eq('r.enabled', ':enabled')) ->getQuery() ->setMaxResults(1) // TODO cache ...
php
public function findByPath($path) { $qb = $this->createQueryBuilder('r'); $query = $qb ->andWhere($qb->expr()->eq('r.fromPath', ':path')) ->andWhere($qb->expr()->eq('r.enabled', ':enabled')) ->getQuery() ->setMaxResults(1) // TODO cache ...
[ "public", "function", "findByPath", "(", "$", "path", ")", "{", "$", "qb", "=", "$", "this", "->", "createQueryBuilder", "(", "'r'", ")", ";", "$", "query", "=", "$", "qb", "->", "andWhere", "(", "$", "qb", "->", "expr", "(", ")", "->", "eq", "("...
Finds the redirection by "from path". @param string $path @return Redirection|null
[ "Finds", "the", "redirection", "by", "from", "path", "." ]
df58f83eb3a01ef56cd76ea73639322c581e75c1
https://github.com/ekyna/SettingBundle/blob/df58f83eb3a01ef56cd76ea73639322c581e75c1/Entity/RedirectionRepository.php#L21-L40
196,980
frodosghost/AtomLoggerBundle
Connection/Client.php
Client.send
public function send(Request $request) { $headers = array('Content-Type' => $request->getContentType()); $content = $request->formatData(); if ($this->hasSiteKey()) { $headers = array_merge($headers, array('x-atom-log-id' => $this->getSiteKey())); } try { ...
php
public function send(Request $request) { $headers = array('Content-Type' => $request->getContentType()); $content = $request->formatData(); if ($this->hasSiteKey()) { $headers = array_merge($headers, array('x-atom-log-id' => $this->getSiteKey())); } try { ...
[ "public", "function", "send", "(", "Request", "$", "request", ")", "{", "$", "headers", "=", "array", "(", "'Content-Type'", "=>", "$", "request", "->", "getContentType", "(", ")", ")", ";", "$", "content", "=", "$", "request", "->", "formatData", "(", ...
Send the Request @param Request $request @return Response
[ "Send", "the", "Request" ]
c48823e4b3772e498b366867f27e6581f613f733
https://github.com/frodosghost/AtomLoggerBundle/blob/c48823e4b3772e498b366867f27e6581f613f733/Connection/Client.php#L64-L80
196,981
jabernardo/lollipop-php
Library/HTTP/Route.php
Route.resolve
static public function resolve($callback, \Lollipop\HTTP\Request $req, \Lollipop\HTTP\Response $res, array $args = []) { if (is_string($callback)) { // If callback was string then // Explode it by (dot) to determine the Controller and Action $ctoks = explode('.', $cal...
php
static public function resolve($callback, \Lollipop\HTTP\Request $req, \Lollipop\HTTP\Response $res, array $args = []) { if (is_string($callback)) { // If callback was string then // Explode it by (dot) to determine the Controller and Action $ctoks = explode('.', $cal...
[ "static", "public", "function", "resolve", "(", "$", "callback", ",", "\\", "Lollipop", "\\", "HTTP", "\\", "Request", "$", "req", ",", "\\", "Lollipop", "\\", "HTTP", "\\", "Response", "$", "res", ",", "array", "$", "args", "=", "[", "]", ")", "{", ...
Call callback and return data @access private @param mixed $callback (string or callable) string must be {abc}.{abc} format to use controller action @param \Lollipop\HTTP\Request $req Request Object @param \Lollipop\HTTP\Response $res Response Object @param array $args Parameters to be pass...
[ "Call", "callback", "and", "return", "data" ]
004d80b21f7246bb3e08c7b9f74a165b0d3ca0f5
https://github.com/jabernardo/lollipop-php/blob/004d80b21f7246bb3e08c7b9f74a165b0d3ca0f5/Library/HTTP/Route.php#L32-L85
196,982
miguelibero/meinhof
src/Meinhof/Action/UpdateAssetsAction.php
UpdateAssetsAction.addAssets
public function addAssets(array $assets) { foreach ($assets as $asset) { if (!is_array($asset)) { throw new \InvalidArgumentException('Each element needs to be an array.'); } $this->addAsset($asset); } }
php
public function addAssets(array $assets) { foreach ($assets as $asset) { if (!is_array($asset)) { throw new \InvalidArgumentException('Each element needs to be an array.'); } $this->addAsset($asset); } }
[ "public", "function", "addAssets", "(", "array", "$", "assets", ")", "{", "foreach", "(", "$", "assets", "as", "$", "asset", ")", "{", "if", "(", "!", "is_array", "(", "$", "asset", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", ...
Adds a list of assets to be processed by the asset writer. @param array assets the asset list
[ "Adds", "a", "list", "of", "assets", "to", "be", "processed", "by", "the", "asset", "writer", "." ]
3a090f08485dc0da3e27463cf349dba374201072
https://github.com/miguelibero/meinhof/blob/3a090f08485dc0da3e27463cf349dba374201072/src/Meinhof/Action/UpdateAssetsAction.php#L48-L56
196,983
miguelibero/meinhof
src/Meinhof/Action/UpdateAssetsAction.php
UpdateAssetsAction.addAsset
public function addAsset(array $asset) { if (!isset($asset['input'])) { throw new \InvalidArgumentException('Asset needs an input.'); } if (!isset($asset['name'])) { $asset['name'] = uniqid(); } if (!isset($asset['filter'])) { $asset['filte...
php
public function addAsset(array $asset) { if (!isset($asset['input'])) { throw new \InvalidArgumentException('Asset needs an input.'); } if (!isset($asset['name'])) { $asset['name'] = uniqid(); } if (!isset($asset['filter'])) { $asset['filte...
[ "public", "function", "addAsset", "(", "array", "$", "asset", ")", "{", "if", "(", "!", "isset", "(", "$", "asset", "[", "'input'", "]", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'Asset needs an input.'", ")", ";", "}", "if",...
Adds an asset to be processed by the asset writer. Accepted keys in the asset array are: * `name`: the name of the asset * `input`: the input assets (required) * `filter`: the assetic filters to be applied (by default) * `output`: the output path (by default the same as input) * `options`: other asset options @param ...
[ "Adds", "an", "asset", "to", "be", "processed", "by", "the", "asset", "writer", "." ]
3a090f08485dc0da3e27463cf349dba374201072
https://github.com/miguelibero/meinhof/blob/3a090f08485dc0da3e27463cf349dba374201072/src/Meinhof/Action/UpdateAssetsAction.php#L70-L96
196,984
vaniocz/stdlib
src/LinkedHashMap.php
LinkedHashMap.offsetGet
public function offsetGet($key) { if (($index = $this->keysIndices[self::keyString($key)] ?? null) === null) { return null; } return $this->values[$index]; }
php
public function offsetGet($key) { if (($index = $this->keysIndices[self::keyString($key)] ?? null) === null) { return null; } return $this->values[$index]; }
[ "public", "function", "offsetGet", "(", "$", "key", ")", "{", "if", "(", "(", "$", "index", "=", "$", "this", "->", "keysIndices", "[", "self", "::", "keyString", "(", "$", "key", ")", "]", "??", "null", ")", "===", "null", ")", "{", "return", "n...
Retrieve a value with the given key. @param mixed $key @return mixed A value with the given key.
[ "Retrieve", "a", "value", "with", "the", "given", "key", "." ]
06a8343c42829d8fdeecad2bb5c30946fbd73e74
https://github.com/vaniocz/stdlib/blob/06a8343c42829d8fdeecad2bb5c30946fbd73e74/src/LinkedHashMap.php#L52-L59
196,985
vaniocz/stdlib
src/LinkedHashMap.php
LinkedHashMap.offsetSet
public function offsetSet($key, $value) { if ($key === null) { $intKeys = array_filter($this->keys, 'is_int'); $this->keys[] = $i = empty($intKeys) ? 0 : max(max($intKeys) + 1, 0); $this->values[] = $value; $this->keysIndices[$i] = count($this->values) - 1; ...
php
public function offsetSet($key, $value) { if ($key === null) { $intKeys = array_filter($this->keys, 'is_int'); $this->keys[] = $i = empty($intKeys) ? 0 : max(max($intKeys) + 1, 0); $this->values[] = $value; $this->keysIndices[$i] = count($this->values) - 1; ...
[ "public", "function", "offsetSet", "(", "$", "key", ",", "$", "value", ")", "{", "if", "(", "$", "key", "===", "null", ")", "{", "$", "intKeys", "=", "array_filter", "(", "$", "this", "->", "keys", ",", "'is_int'", ")", ";", "$", "this", "->", "k...
Insert the given value with the given key. @param mixed $key @param mixed $value
[ "Insert", "the", "given", "value", "with", "the", "given", "key", "." ]
06a8343c42829d8fdeecad2bb5c30946fbd73e74
https://github.com/vaniocz/stdlib/blob/06a8343c42829d8fdeecad2bb5c30946fbd73e74/src/LinkedHashMap.php#L67-L81
196,986
vaniocz/stdlib
src/LinkedHashMap.php
LinkedHashMap.offsetUnset
public function offsetUnset($key) { $keyString = self::keyString($key); if (($index = $this->keysIndices[$keyString] ?? null) !== null) { unset($this->keys[$index], $this->values[$index], $this->keysIndices[$keyString]); } }
php
public function offsetUnset($key) { $keyString = self::keyString($key); if (($index = $this->keysIndices[$keyString] ?? null) !== null) { unset($this->keys[$index], $this->values[$index], $this->keysIndices[$keyString]); } }
[ "public", "function", "offsetUnset", "(", "$", "key", ")", "{", "$", "keyString", "=", "self", "::", "keyString", "(", "$", "key", ")", ";", "if", "(", "(", "$", "index", "=", "$", "this", "->", "keysIndices", "[", "$", "keyString", "]", "??", "nul...
Remove a value with the given key from the map. @param mixed $key
[ "Remove", "a", "value", "with", "the", "given", "key", "from", "the", "map", "." ]
06a8343c42829d8fdeecad2bb5c30946fbd73e74
https://github.com/vaniocz/stdlib/blob/06a8343c42829d8fdeecad2bb5c30946fbd73e74/src/LinkedHashMap.php#L88-L94
196,987
vaniocz/stdlib
src/LinkedHashMap.php
LinkedHashMap.getIterator
public function getIterator(): Traversable { foreach ($this->values as $index => &$value) { yield $this->keys[$index] => $value; } }
php
public function getIterator(): Traversable { foreach ($this->values as $index => &$value) { yield $this->keys[$index] => $value; } }
[ "public", "function", "getIterator", "(", ")", ":", "Traversable", "{", "foreach", "(", "$", "this", "->", "values", "as", "$", "index", "=>", "&", "$", "value", ")", "{", "yield", "$", "this", "->", "keys", "[", "$", "index", "]", "=>", "$", "valu...
Get the map iterator. @return Traversable The map iterator.
[ "Get", "the", "map", "iterator", "." ]
06a8343c42829d8fdeecad2bb5c30946fbd73e74
https://github.com/vaniocz/stdlib/blob/06a8343c42829d8fdeecad2bb5c30946fbd73e74/src/LinkedHashMap.php#L111-L116
196,988
mcustiel/phiremock-client
src/Phiremock.php
Phiremock.reset
public function reset() { $uri = $this->createBaseUri()->withPath(self::API_RESET_URL); $request = (new PsrRequest())->withUri($uri)->withMethod('post'); $this->ensureIsNotErrorResponse($this->connection->send($request)); }
php
public function reset() { $uri = $this->createBaseUri()->withPath(self::API_RESET_URL); $request = (new PsrRequest())->withUri($uri)->withMethod('post'); $this->ensureIsNotErrorResponse($this->connection->send($request)); }
[ "public", "function", "reset", "(", ")", "{", "$", "uri", "=", "$", "this", "->", "createBaseUri", "(", ")", "->", "withPath", "(", "self", "::", "API_RESET_URL", ")", ";", "$", "request", "=", "(", "new", "PsrRequest", "(", ")", ")", "->", "withUri"...
Restores pre-defined expectations and resets scenarios and requests counter.
[ "Restores", "pre", "-", "defined", "expectations", "and", "resets", "scenarios", "and", "requests", "counter", "." ]
2e4c6948ad1573451bb4d2e72aee779d4343b9fd
https://github.com/mcustiel/phiremock-client/blob/2e4c6948ad1573451bb4d2e72aee779d4343b9fd/src/Phiremock.php#L90-L96
196,989
mcustiel/phiremock-client
src/Phiremock.php
Phiremock.resetScenarios
public function resetScenarios() { $uri = $this->createBaseUri()->withPath(self::API_SCENARIOS_URL); $request = (new PsrRequest())->withUri($uri)->withMethod('delete'); $this->ensureIsNotErrorResponse($this->connection->send($request)); }
php
public function resetScenarios() { $uri = $this->createBaseUri()->withPath(self::API_SCENARIOS_URL); $request = (new PsrRequest())->withUri($uri)->withMethod('delete'); $this->ensureIsNotErrorResponse($this->connection->send($request)); }
[ "public", "function", "resetScenarios", "(", ")", "{", "$", "uri", "=", "$", "this", "->", "createBaseUri", "(", ")", "->", "withPath", "(", "self", "::", "API_SCENARIOS_URL", ")", ";", "$", "request", "=", "(", "new", "PsrRequest", "(", ")", ")", "->"...
Resets all the scenarios to start state.
[ "Resets", "all", "the", "scenarios", "to", "start", "state", "." ]
2e4c6948ad1573451bb4d2e72aee779d4343b9fd
https://github.com/mcustiel/phiremock-client/blob/2e4c6948ad1573451bb4d2e72aee779d4343b9fd/src/Phiremock.php#L210-L216
196,990
mcustiel/phiremock-client
src/Phiremock.php
Phiremock.resetRequestsCounter
public function resetRequestsCounter() { $uri = $this->createBaseUri()->withPath(self::API_EXECUTIONS_URL); $request = (new PsrRequest())->withUri($uri)->withMethod('delete'); $this->ensureIsNotErrorResponse($this->connection->send($request)); }
php
public function resetRequestsCounter() { $uri = $this->createBaseUri()->withPath(self::API_EXECUTIONS_URL); $request = (new PsrRequest())->withUri($uri)->withMethod('delete'); $this->ensureIsNotErrorResponse($this->connection->send($request)); }
[ "public", "function", "resetRequestsCounter", "(", ")", "{", "$", "uri", "=", "$", "this", "->", "createBaseUri", "(", ")", "->", "withPath", "(", "self", "::", "API_EXECUTIONS_URL", ")", ";", "$", "request", "=", "(", "new", "PsrRequest", "(", ")", ")",...
Resets all the requests counters to 0.
[ "Resets", "all", "the", "requests", "counters", "to", "0", "." ]
2e4c6948ad1573451bb4d2e72aee779d4343b9fd
https://github.com/mcustiel/phiremock-client/blob/2e4c6948ad1573451bb4d2e72aee779d4343b9fd/src/Phiremock.php#L221-L227
196,991
fuelphp-storage/session
src/FlashContainer.php
FlashContainer.keep
public function keep($key) { if (isset($this->data[static::EXPIRE_DATA_KEY][$key])) { $this->data[static::EXPIRE_DATA_KEY][$key][1] = static::EXPIRE_STATE_NEW; return true; } return false; }
php
public function keep($key) { if (isset($this->data[static::EXPIRE_DATA_KEY][$key])) { $this->data[static::EXPIRE_DATA_KEY][$key][1] = static::EXPIRE_STATE_NEW; return true; } return false; }
[ "public", "function", "keep", "(", "$", "key", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "data", "[", "static", "::", "EXPIRE_DATA_KEY", "]", "[", "$", "key", "]", ")", ")", "{", "$", "this", "->", "data", "[", "static", "::", "EXPIRE...
Reset the expiry state on the given key @param string $key @return boolean
[ "Reset", "the", "expiry", "state", "on", "the", "given", "key" ]
948fd2b45286e65e7fababf65de89ca6aaca3c4a
https://github.com/fuelphp-storage/session/blob/948fd2b45286e65e7fababf65de89ca6aaca3c4a/src/FlashContainer.php#L123-L132
196,992
fuelphp-storage/session
src/FlashContainer.php
FlashContainer.expiration
public function expiration($key) { if (isset($this->data[static::EXPIRE_DATA_KEY][$key])) { $expiration = array( $this->data[static::EXPIRE_DATA_KEY][$key][0] == EXPIRE_ON_REQUEST ? 'EXPIRE_ON_REQUEST' : 'EXPIRE_ON_GET', $this->data[static::EXPIRE_DATA_KEY][$key][1] == static::EXPIRE_STATE_NEW ? 'STATE_...
php
public function expiration($key) { if (isset($this->data[static::EXPIRE_DATA_KEY][$key])) { $expiration = array( $this->data[static::EXPIRE_DATA_KEY][$key][0] == EXPIRE_ON_REQUEST ? 'EXPIRE_ON_REQUEST' : 'EXPIRE_ON_GET', $this->data[static::EXPIRE_DATA_KEY][$key][1] == static::EXPIRE_STATE_NEW ? 'STATE_...
[ "public", "function", "expiration", "(", "$", "key", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "data", "[", "static", "::", "EXPIRE_DATA_KEY", "]", "[", "$", "key", "]", ")", ")", "{", "$", "expiration", "=", "array", "(", "$", "this", ...
Returns the expiry state on the given key @param string $key @return array
[ "Returns", "the", "expiry", "state", "on", "the", "given", "key" ]
948fd2b45286e65e7fababf65de89ca6aaca3c4a
https://github.com/fuelphp-storage/session/blob/948fd2b45286e65e7fababf65de89ca6aaca3c4a/src/FlashContainer.php#L141-L153
196,993
fuelphp-storage/session
src/FlashContainer.php
FlashContainer.get
public function get($key, $default = null) { // check if we have this key if (parent::has($this->prefixKey($key))) { // do we have expiry information? if ( ! isset($this->data[static::EXPIRE_DATA_KEY][$key])) { // nope, simply return the data return parent::get($this->prefixKey($key), $default);...
php
public function get($key, $default = null) { // check if we have this key if (parent::has($this->prefixKey($key))) { // do we have expiry information? if ( ! isset($this->data[static::EXPIRE_DATA_KEY][$key])) { // nope, simply return the data return parent::get($this->prefixKey($key), $default);...
[ "public", "function", "get", "(", "$", "key", ",", "$", "default", "=", "null", ")", "{", "// check if we have this key", "if", "(", "parent", "::", "has", "(", "$", "this", "->", "prefixKey", "(", "$", "key", ")", ")", ")", "{", "// do we have expiry in...
Returns a key's value from this bag's data @param string $key @param mixed $default @return mixed
[ "Returns", "a", "key", "s", "value", "from", "this", "bag", "s", "data" ]
948fd2b45286e65e7fababf65de89ca6aaca3c4a
https://github.com/fuelphp-storage/session/blob/948fd2b45286e65e7fababf65de89ca6aaca3c4a/src/FlashContainer.php#L163-L192
196,994
fuelphp-storage/session
src/FlashContainer.php
FlashContainer.delete
public function delete($key) { // remove the expiration tracking for this key unset($this->data[static::EXPIRE_DATA_KEY][$key]); // and delete the key itself return parent::delete($this->prefixKey($key)); }
php
public function delete($key) { // remove the expiration tracking for this key unset($this->data[static::EXPIRE_DATA_KEY][$key]); // and delete the key itself return parent::delete($this->prefixKey($key)); }
[ "public", "function", "delete", "(", "$", "key", ")", "{", "// remove the expiration tracking for this key", "unset", "(", "$", "this", "->", "data", "[", "static", "::", "EXPIRE_DATA_KEY", "]", "[", "$", "key", "]", ")", ";", "// and delete the key itself", "re...
Deletes data from the container @param string $key @return boolean
[ "Deletes", "data", "from", "the", "container" ]
948fd2b45286e65e7fababf65de89ca6aaca3c4a
https://github.com/fuelphp-storage/session/blob/948fd2b45286e65e7fababf65de89ca6aaca3c4a/src/FlashContainer.php#L234-L241
196,995
fuelphp-storage/session
src/FlashContainer.php
FlashContainer.setContents
public function setContents(array $data) { // make sure we have our expire data key if (isset($data[static::EXPIRE_DATA_KEY])) { // process the expiration settings foreach($data[static::EXPIRE_DATA_KEY] as $key => $expiration) { // if it was set on the last request, make it as loaded if ($expira...
php
public function setContents(array $data) { // make sure we have our expire data key if (isset($data[static::EXPIRE_DATA_KEY])) { // process the expiration settings foreach($data[static::EXPIRE_DATA_KEY] as $key => $expiration) { // if it was set on the last request, make it as loaded if ($expira...
[ "public", "function", "setContents", "(", "array", "$", "data", ")", "{", "// make sure we have our expire data key", "if", "(", "isset", "(", "$", "data", "[", "static", "::", "EXPIRE_DATA_KEY", "]", ")", ")", "{", "// process the expiration settings", "foreach", ...
Replaces the container's data @param array $data @throws \RuntimeException
[ "Replaces", "the", "container", "s", "data" ]
948fd2b45286e65e7fababf65de89ca6aaca3c4a
https://github.com/fuelphp-storage/session/blob/948fd2b45286e65e7fababf65de89ca6aaca3c4a/src/FlashContainer.php#L250-L280
196,996
fuelphp-storage/session
src/FlashContainer.php
FlashContainer.getContents
public function getContents() { // make a copy to leave the original container untouched $data = $this->data; // delete all expired variables foreach($data[static::EXPIRE_DATA_KEY] as $key => $expiration) { if ($expiration[1] === static::EXPIRE_STATE_EXPIRED) { unset($data[static::EXPIRE_DATA_KEY]...
php
public function getContents() { // make a copy to leave the original container untouched $data = $this->data; // delete all expired variables foreach($data[static::EXPIRE_DATA_KEY] as $key => $expiration) { if ($expiration[1] === static::EXPIRE_STATE_EXPIRED) { unset($data[static::EXPIRE_DATA_KEY]...
[ "public", "function", "getContents", "(", ")", "{", "// make a copy to leave the original container untouched", "$", "data", "=", "$", "this", "->", "data", ";", "// delete all expired variables", "foreach", "(", "$", "data", "[", "static", "::", "EXPIRE_DATA_KEY", "]...
Returns the container's data @return array
[ "Returns", "the", "container", "s", "data" ]
948fd2b45286e65e7fababf65de89ca6aaca3c4a
https://github.com/fuelphp-storage/session/blob/948fd2b45286e65e7fababf65de89ca6aaca3c4a/src/FlashContainer.php#L287-L304
196,997
gplcart/cli
controllers/commands/Library.php
Library.cmdGetLibrary
public function cmdGetLibrary() { $list = $this->getListLibrary(); $this->outputFormat($list); $this->outputFormatTableLibrary($list); $this->output(); }
php
public function cmdGetLibrary() { $list = $this->getListLibrary(); $this->outputFormat($list); $this->outputFormatTableLibrary($list); $this->output(); }
[ "public", "function", "cmdGetLibrary", "(", ")", "{", "$", "list", "=", "$", "this", "->", "getListLibrary", "(", ")", ";", "$", "this", "->", "outputFormat", "(", "$", "list", ")", ";", "$", "this", "->", "outputFormatTableLibrary", "(", "$", "list", ...
Callback for "library-get" command
[ "Callback", "for", "library", "-", "get", "command" ]
e57dba53e291a225b4bff0c0d9b23d685dd1c125
https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/Library.php#L40-L46
196,998
OxfordInfoLabs/kinikit-core
src/Util/ClassUtils.php
ClassUtils.doesClassExtendClass
public static function doesClassExtendClass($childClassName, $parentClassName) { $reflectionClass = new \ReflectionClass ($childClassName); do { if ($reflectionClass->getName() == $parentClassName) return true; $reflectionClass = $reflectionClass->getParentClass...
php
public static function doesClassExtendClass($childClassName, $parentClassName) { $reflectionClass = new \ReflectionClass ($childClassName); do { if ($reflectionClass->getName() == $parentClassName) return true; $reflectionClass = $reflectionClass->getParentClass...
[ "public", "static", "function", "doesClassExtendClass", "(", "$", "childClassName", ",", "$", "parentClassName", ")", "{", "$", "reflectionClass", "=", "new", "\\", "ReflectionClass", "(", "$", "childClassName", ")", ";", "do", "{", "if", "(", "$", "reflection...
Check to see whether or not a given child class extends a given parent class @param $childClassName @param $parentClassName
[ "Check", "to", "see", "whether", "or", "not", "a", "given", "child", "class", "extends", "a", "given", "parent", "class" ]
edc1b2e6ffabd595c4c7d322279b3dd1e59ef359
https://github.com/OxfordInfoLabs/kinikit-core/blob/edc1b2e6ffabd595c4c7d322279b3dd1e59ef359/src/Util/ClassUtils.php#L26-L38
196,999
Dhii/placeholder-template-abstract
src/PlaceholderTemplateAwareCapableTrait.php
PlaceholderTemplateAwareCapableTrait._setPlaceholderTemplate
protected function _setPlaceholderTemplate($template) { if (!is_null($template)) { $template = $this->_normalizeStringable($template); } $this->placeholderTemplate = $template; }
php
protected function _setPlaceholderTemplate($template) { if (!is_null($template)) { $template = $this->_normalizeStringable($template); } $this->placeholderTemplate = $template; }
[ "protected", "function", "_setPlaceholderTemplate", "(", "$", "template", ")", "{", "if", "(", "!", "is_null", "(", "$", "template", ")", ")", "{", "$", "template", "=", "$", "this", "->", "_normalizeStringable", "(", "$", "template", ")", ";", "}", "$",...
Assigns the placeholder template to this instance. @since [*next-version*] @param Stringable|string|int|float|bool|null $template The template.
[ "Assigns", "the", "placeholder", "template", "to", "this", "instance", "." ]
bfa7cea3b1e078b19bcf59d9a3da63b8c12ed03b
https://github.com/Dhii/placeholder-template-abstract/blob/bfa7cea3b1e078b19bcf59d9a3da63b8c12ed03b/src/PlaceholderTemplateAwareCapableTrait.php#L31-L38