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
226,400
QueenCityCodeFactory/CakeSoap
src/Network/CakeSoap.php
CakeSoap.handleError
public function handleError($error = null) { if ($this->logErrors === true) { $this->log($error); if ($this->client) { $this->log($this->client->__getLastRequest()); } } throw new Exception($error); }
php
public function handleError($error = null) { if ($this->logErrors === true) { $this->log($error); if ($this->client) { $this->log($this->client->__getLastRequest()); } } throw new Exception($error); }
[ "public", "function", "handleError", "(", "$", "error", "=", "null", ")", "{", "if", "(", "$", "this", "->", "logErrors", "===", "true", ")", "{", "$", "this", "->", "log", "(", "$", "error", ")", ";", "if", "(", "$", "this", "->", "client", ")",...
Shows an error message and outputs the SOAP result if passed @param string $error The Error @return void
[ "Shows", "an", "error", "message", "and", "outputs", "the", "SOAP", "result", "if", "passed" ]
587edc29d9e891fb6027805cd0cb30034dcadff1
https://github.com/QueenCityCodeFactory/CakeSoap/blob/587edc29d9e891fb6027805cd0cb30034dcadff1/src/Network/CakeSoap.php#L241-L250
226,401
Solution10/calendar
src/Week.php
Week.days
public function days() { if (!isset($this->days)) { $clonedStart = clone $this->weekStart; $this->days = array(); for ($i = 0; $i < 7; $i ++) { $thisDay = new Day($clonedStart); if ( $this->containingMonth ...
php
public function days() { if (!isset($this->days)) { $clonedStart = clone $this->weekStart; $this->days = array(); for ($i = 0; $i < 7; $i ++) { $thisDay = new Day($clonedStart); if ( $this->containingMonth ...
[ "public", "function", "days", "(", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "days", ")", ")", "{", "$", "clonedStart", "=", "clone", "$", "this", "->", "weekStart", ";", "$", "this", "->", "days", "=", "array", "(", ")", ";", ...
Returns the days in this week. @return Day[]
[ "Returns", "the", "days", "in", "this", "week", "." ]
fa0d8e09627693a7b0fe0e6b69cab997bab919e8
https://github.com/Solution10/calendar/blob/fa0d8e09627693a7b0fe0e6b69cab997bab919e8/src/Week.php#L109-L129
226,402
QueenCityCodeFactory/CakeSoap
src/Network/SoapClient.php
SoapClient.__soapCall
public function __soapCall($functionName, $arguments, $options = null, $inputHeaders = null, &$outputHeaders = null) { if (Configure::read('debug') === true) { $this->log($functionName, LogLevel::INFO); $this->log($arguments, LogLevel::INFO); $this->log($options, LogLevel...
php
public function __soapCall($functionName, $arguments, $options = null, $inputHeaders = null, &$outputHeaders = null) { if (Configure::read('debug') === true) { $this->log($functionName, LogLevel::INFO); $this->log($arguments, LogLevel::INFO); $this->log($options, LogLevel...
[ "public", "function", "__soapCall", "(", "$", "functionName", ",", "$", "arguments", ",", "$", "options", "=", "null", ",", "$", "inputHeaders", "=", "null", ",", "&", "$", "outputHeaders", "=", "null", ")", "{", "if", "(", "Configure", "::", "read", "...
Calls a SOAP function @param string $functionName The name of the SOAP function to call. @param array $arguments An array of the arguments to pass to the function. @param array $options An associative array of options to pass to the client. @param array $inputHeaders An array of headers to be sent along with the SOAP ...
[ "Calls", "a", "SOAP", "function" ]
587edc29d9e891fb6027805cd0cb30034dcadff1
https://github.com/QueenCityCodeFactory/CakeSoap/blob/587edc29d9e891fb6027805cd0cb30034dcadff1/src/Network/SoapClient.php#L63-L74
226,403
Solution10/calendar
src/Timeframe.php
Timeframe.intersects
public function intersects(TimeframeInterface $frame) { return // Checks intersections within: ($this->contains($frame->start()) || $this->contains($frame->end())) // Checks full overlaps: || ($frame->start() <= $this->start && $frame->end() >= $this->end) ...
php
public function intersects(TimeframeInterface $frame) { return // Checks intersections within: ($this->contains($frame->start()) || $this->contains($frame->end())) // Checks full overlaps: || ($frame->start() <= $this->start && $frame->end() >= $this->end) ...
[ "public", "function", "intersects", "(", "TimeframeInterface", "$", "frame", ")", "{", "return", "// Checks intersections within:", "(", "$", "this", "->", "contains", "(", "$", "frame", "->", "start", "(", ")", ")", "||", "$", "this", "->", "contains", "(",...
Returns whether this timeframe intersects with another timeframe; some part of this timeframe overlaps with the given timeframe. @param TimeframeInterface $frame @return bool
[ "Returns", "whether", "this", "timeframe", "intersects", "with", "another", "timeframe", ";", "some", "part", "of", "this", "timeframe", "overlaps", "with", "the", "given", "timeframe", "." ]
fa0d8e09627693a7b0fe0e6b69cab997bab919e8
https://github.com/Solution10/calendar/blob/fa0d8e09627693a7b0fe0e6b69cab997bab919e8/src/Timeframe.php#L86-L94
226,404
xinix-technology/bono
src/Bono/Theme/Theme.php
Theme.partial
public function partial($template, array $data = array()) { $app = App::getInstance(); $Clazz = $app->config('bono.partial.view'); $view = new $Clazz(); $t = $this->resolve($template, $view); if (empty($t)) { throw new \Exception('Cant resolve template "'.$templ...
php
public function partial($template, array $data = array()) { $app = App::getInstance(); $Clazz = $app->config('bono.partial.view'); $view = new $Clazz(); $t = $this->resolve($template, $view); if (empty($t)) { throw new \Exception('Cant resolve template "'.$templ...
[ "public", "function", "partial", "(", "$", "template", ",", "array", "$", "data", "=", "array", "(", ")", ")", "{", "$", "app", "=", "App", "::", "getInstance", "(", ")", ";", "$", "Clazz", "=", "$", "app", "->", "config", "(", "'bono.partial.view'",...
Partial generate view @param string $template Template slug @param array $data Data @return [type] [description]
[ "Partial", "generate", "view" ]
86c89f702dee2ab010767236c2c40b50cdc39c6e
https://github.com/xinix-technology/bono/blob/86c89f702dee2ab010767236c2c40b50cdc39c6e/src/Bono/Theme/Theme.php#L268-L282
226,405
nystudio107/craft-fastcgicachebust
src/services/Cache.php
Cache.clearAll
public function clearAll() { /** * @var Settings settings */ $settings = FastcgiCacheBust::$plugin->getSettings(); if (!empty($settings) && !empty($settings->cachePath)) { $cacheDirs = explode(',', $settings->cachePath); foreach ($cacheDirs as $cache...
php
public function clearAll() { /** * @var Settings settings */ $settings = FastcgiCacheBust::$plugin->getSettings(); if (!empty($settings) && !empty($settings->cachePath)) { $cacheDirs = explode(',', $settings->cachePath); foreach ($cacheDirs as $cache...
[ "public", "function", "clearAll", "(", ")", "{", "/**\n * @var Settings settings\n */", "$", "settings", "=", "FastcgiCacheBust", "::", "$", "plugin", "->", "getSettings", "(", ")", ";", "if", "(", "!", "empty", "(", "$", "settings", ")", "&&", ...
Clears the entirety of the FastCGI Cache
[ "Clears", "the", "entirety", "of", "the", "FastCGI", "Cache" ]
6d792aaca1c98bbf1b219bf9241078dc47edd11a
https://github.com/nystudio107/craft-fastcgicachebust/blob/6d792aaca1c98bbf1b219bf9241078dc47edd11a/src/services/Cache.php#L34-L58
226,406
Solution10/calendar
src/Event.php
Event.setStart
public function setStart(DateTime $start) { if ($this->end && $start > $this->end) { throw new EventException( 'New start comes after the end!', EventException::INVALID_DATES ); } $this->start = clone $start; return $this; }
php
public function setStart(DateTime $start) { if ($this->end && $start > $this->end) { throw new EventException( 'New start comes after the end!', EventException::INVALID_DATES ); } $this->start = clone $start; return $this; }
[ "public", "function", "setStart", "(", "DateTime", "$", "start", ")", "{", "if", "(", "$", "this", "->", "end", "&&", "$", "start", ">", "$", "this", "->", "end", ")", "{", "throw", "new", "EventException", "(", "'New start comes after the end!'", ",", "...
Sets the start date of the event @param DateTime $start @return $this @throws \Solution10\Calendar\Exception\Event
[ "Sets", "the", "start", "date", "of", "the", "event" ]
fa0d8e09627693a7b0fe0e6b69cab997bab919e8
https://github.com/Solution10/calendar/blob/fa0d8e09627693a7b0fe0e6b69cab997bab919e8/src/Event.php#L57-L67
226,407
Solution10/calendar
src/Event.php
Event.setEnd
public function setEnd(DateTime $end) { // Check the end is not before the start: if ($this->start && $end < $this->start) { throw new EventException( 'New end comes after the start!', EventException::INVALID_DATES ); } $this->...
php
public function setEnd(DateTime $end) { // Check the end is not before the start: if ($this->start && $end < $this->start) { throw new EventException( 'New end comes after the start!', EventException::INVALID_DATES ); } $this->...
[ "public", "function", "setEnd", "(", "DateTime", "$", "end", ")", "{", "// Check the end is not before the start:", "if", "(", "$", "this", "->", "start", "&&", "$", "end", "<", "$", "this", "->", "start", ")", "{", "throw", "new", "EventException", "(", "...
Sets the end date of the event @param DateTime $end @return $this @throws \Solution10\Calendar\Exception\Event
[ "Sets", "the", "end", "date", "of", "the", "event" ]
fa0d8e09627693a7b0fe0e6b69cab997bab919e8
https://github.com/Solution10/calendar/blob/fa0d8e09627693a7b0fe0e6b69cab997bab919e8/src/Event.php#L86-L98
226,408
Solution10/calendar
src/Resolution/MonthResolution.php
MonthResolution.build
public function build() { if (!isset($this->currentDate)) { return array(); } // We need to know how many months to display, so that's the first job: $monthsToDisplay = array(); $thisMonth = new Month($this->currentDate); // Go backwards first: f...
php
public function build() { if (!isset($this->currentDate)) { return array(); } // We need to know how many months to display, so that's the first job: $monthsToDisplay = array(); $thisMonth = new Month($this->currentDate); // Go backwards first: f...
[ "public", "function", "build", "(", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "currentDate", ")", ")", "{", "return", "array", "(", ")", ";", "}", "// We need to know how many months to display, so that's the first job:", "$", "monthsToDisplay", ...
Returns the month objects to display @return Month[]
[ "Returns", "the", "month", "objects", "to", "display" ]
fa0d8e09627693a7b0fe0e6b69cab997bab919e8
https://github.com/Solution10/calendar/blob/fa0d8e09627693a7b0fe0e6b69cab997bab919e8/src/Resolution/MonthResolution.php#L143-L167
226,409
Solution10/calendar
src/Calendar.php
Calendar.setResolution
public function setResolution(ResolutionInterface $res) { $this->resolution = $res; $this->resolution->setDateTime($this->currentDate()); return $this; }
php
public function setResolution(ResolutionInterface $res) { $this->resolution = $res; $this->resolution->setDateTime($this->currentDate()); return $this; }
[ "public", "function", "setResolution", "(", "ResolutionInterface", "$", "res", ")", "{", "$", "this", "->", "resolution", "=", "$", "res", ";", "$", "this", "->", "resolution", "->", "setDateTime", "(", "$", "this", "->", "currentDate", "(", ")", ")", ";...
Sets the Resolution of the Calendar. Resolutions decide how many months to show either side, or whether to show a week or work week. @param ResolutionInterface $res Resolution to use @return $this
[ "Sets", "the", "Resolution", "of", "the", "Calendar", ".", "Resolutions", "decide", "how", "many", "months", "to", "show", "either", "side", "or", "whether", "to", "show", "a", "week", "or", "work", "week", "." ]
fa0d8e09627693a7b0fe0e6b69cab997bab919e8
https://github.com/Solution10/calendar/blob/fa0d8e09627693a7b0fe0e6b69cab997bab919e8/src/Calendar.php#L80-L85
226,410
Solution10/calendar
src/Calendar.php
Calendar.addEvents
public function addEvents(array $events) { foreach ($events as $event) { if ($event instanceof EventInterface) { $this->addEvent($event); } } return $this; }
php
public function addEvents(array $events) { foreach ($events as $event) { if ($event instanceof EventInterface) { $this->addEvent($event); } } return $this; }
[ "public", "function", "addEvents", "(", "array", "$", "events", ")", "{", "foreach", "(", "$", "events", "as", "$", "event", ")", "{", "if", "(", "$", "event", "instanceof", "EventInterface", ")", "{", "$", "this", "->", "addEvent", "(", "$", "event", ...
Add an array of EventInterface objects at once @param array $events The array of EventInterface objects @return $this
[ "Add", "an", "array", "of", "EventInterface", "objects", "at", "once" ]
fa0d8e09627693a7b0fe0e6b69cab997bab919e8
https://github.com/Solution10/calendar/blob/fa0d8e09627693a7b0fe0e6b69cab997bab919e8/src/Calendar.php#L119-L127
226,411
michael-donat/php-vfs
src/VirtualFileSystem/Container.php
Container.nodeAt
public function nodeAt($path) { $pathParts = array_filter(explode('/', str_replace('\\', '/', $path)), 'strlen'); $node = $this->root(); foreach ($pathParts as $level) { if ($node instanceof File) { throw new NotFoundException(); } $node ...
php
public function nodeAt($path) { $pathParts = array_filter(explode('/', str_replace('\\', '/', $path)), 'strlen'); $node = $this->root(); foreach ($pathParts as $level) { if ($node instanceof File) { throw new NotFoundException(); } $node ...
[ "public", "function", "nodeAt", "(", "$", "path", ")", "{", "$", "pathParts", "=", "array_filter", "(", "explode", "(", "'/'", ",", "str_replace", "(", "'\\\\'", ",", "'/'", ",", "$", "path", ")", ")", ",", "'strlen'", ")", ";", "$", "node", "=", "...
Returns filesystem Node|Directory|File|Root at given path. @param string $path @return Structure\Node @throws NotFoundException
[ "Returns", "filesystem", "Node|Directory|File|Root", "at", "given", "path", "." ]
1254b67ca6bdaccd9f305b0e1aea81f790b3fa67
https://github.com/michael-donat/php-vfs/blob/1254b67ca6bdaccd9f305b0e1aea81f790b3fa67/src/VirtualFileSystem/Container.php#L99-L113
226,412
michael-donat/php-vfs
src/VirtualFileSystem/Container.php
Container.directoryAt
public function directoryAt($path) { $file = $this->nodeAt($path); if (!$file instanceof Directory) { throw new NotDirectoryException(); } return $file; }
php
public function directoryAt($path) { $file = $this->nodeAt($path); if (!$file instanceof Directory) { throw new NotDirectoryException(); } return $file; }
[ "public", "function", "directoryAt", "(", "$", "path", ")", "{", "$", "file", "=", "$", "this", "->", "nodeAt", "(", "$", "path", ")", ";", "if", "(", "!", "$", "file", "instanceof", "Directory", ")", "{", "throw", "new", "NotDirectoryException", "(", ...
Returns directory at given path @param string $path @return Structure\Directory @throws NotDirectoryException @throws NotFoundException
[ "Returns", "directory", "at", "given", "path" ]
1254b67ca6bdaccd9f305b0e1aea81f790b3fa67
https://github.com/michael-donat/php-vfs/blob/1254b67ca6bdaccd9f305b0e1aea81f790b3fa67/src/VirtualFileSystem/Container.php#L143-L152
226,413
michael-donat/php-vfs
src/VirtualFileSystem/Container.php
Container.fileAt
public function fileAt($path) { $file = $this->nodeAt($path); if (!$file instanceof File) { throw new NotFileException(); } return $file; }
php
public function fileAt($path) { $file = $this->nodeAt($path); if (!$file instanceof File) { throw new NotFileException(); } return $file; }
[ "public", "function", "fileAt", "(", "$", "path", ")", "{", "$", "file", "=", "$", "this", "->", "nodeAt", "(", "$", "path", ")", ";", "if", "(", "!", "$", "file", "instanceof", "File", ")", "{", "throw", "new", "NotFileException", "(", ")", ";", ...
Returns file at given path @param string $path @return Structure\File @throws NotFileException @throws NotFoundException
[ "Returns", "file", "at", "given", "path" ]
1254b67ca6bdaccd9f305b0e1aea81f790b3fa67
https://github.com/michael-donat/php-vfs/blob/1254b67ca6bdaccd9f305b0e1aea81f790b3fa67/src/VirtualFileSystem/Container.php#L164-L173
226,414
michael-donat/php-vfs
src/VirtualFileSystem/Container.php
Container.createDir
public function createDir($path, $recursive = false, $mode = null) { $parentPath = dirname($path); $name = basename($path); try { $parent = $this->directoryAt($parentPath); } catch (NotFoundException $e) { if (!$recursive) { throw new NotFound...
php
public function createDir($path, $recursive = false, $mode = null) { $parentPath = dirname($path); $name = basename($path); try { $parent = $this->directoryAt($parentPath); } catch (NotFoundException $e) { if (!$recursive) { throw new NotFound...
[ "public", "function", "createDir", "(", "$", "path", ",", "$", "recursive", "=", "false", ",", "$", "mode", "=", "null", ")", "{", "$", "parentPath", "=", "dirname", "(", "$", "path", ")", ";", "$", "name", "=", "basename", "(", "$", "path", ")", ...
Creates Directory at given path. @param string $path @param bool $recursive @param null|integer $mode @return Structure\Directory @throws NotFoundException
[ "Creates", "Directory", "at", "given", "path", "." ]
1254b67ca6bdaccd9f305b0e1aea81f790b3fa67
https://github.com/michael-donat/php-vfs/blob/1254b67ca6bdaccd9f305b0e1aea81f790b3fa67/src/VirtualFileSystem/Container.php#L186-L207
226,415
michael-donat/php-vfs
src/VirtualFileSystem/Container.php
Container.createLink
public function createLink($path, $destination) { $destination = $this->nodeAt($destination); if ($this->hasNodeAt($path)) { throw new \RuntimeException(sprintf('%s already exists', $path)); } $parent = $this->directoryAt(dirname($path)); $parent->addLink($ne...
php
public function createLink($path, $destination) { $destination = $this->nodeAt($destination); if ($this->hasNodeAt($path)) { throw new \RuntimeException(sprintf('%s already exists', $path)); } $parent = $this->directoryAt(dirname($path)); $parent->addLink($ne...
[ "public", "function", "createLink", "(", "$", "path", ",", "$", "destination", ")", "{", "$", "destination", "=", "$", "this", "->", "nodeAt", "(", "$", "destination", ")", ";", "if", "(", "$", "this", "->", "hasNodeAt", "(", "$", "path", ")", ")", ...
Creates link at given path @param string $path @param string $destination @return Structure\Link
[ "Creates", "link", "at", "given", "path" ]
1254b67ca6bdaccd9f305b0e1aea81f790b3fa67
https://github.com/michael-donat/php-vfs/blob/1254b67ca6bdaccd9f305b0e1aea81f790b3fa67/src/VirtualFileSystem/Container.php#L218-L232
226,416
michael-donat/php-vfs
src/VirtualFileSystem/Container.php
Container.createFile
public function createFile($path, $data = null) { if ($this->hasNodeAt($path)) { throw new \RuntimeException(sprintf('%s already exists', $path)); } $parent = $this->directoryAt(dirname($path)); $parent->addFile($newFile = $this->factory()->getFile(basename($path))); ...
php
public function createFile($path, $data = null) { if ($this->hasNodeAt($path)) { throw new \RuntimeException(sprintf('%s already exists', $path)); } $parent = $this->directoryAt(dirname($path)); $parent->addFile($newFile = $this->factory()->getFile(basename($path))); ...
[ "public", "function", "createFile", "(", "$", "path", ",", "$", "data", "=", "null", ")", "{", "if", "(", "$", "this", "->", "hasNodeAt", "(", "$", "path", ")", ")", "{", "throw", "new", "\\", "RuntimeException", "(", "sprintf", "(", "'%s already exist...
Creates file at given path @param string $path @param string|null $data @return Structure\File @throws \RuntimeException
[ "Creates", "file", "at", "given", "path" ]
1254b67ca6bdaccd9f305b0e1aea81f790b3fa67
https://github.com/michael-donat/php-vfs/blob/1254b67ca6bdaccd9f305b0e1aea81f790b3fa67/src/VirtualFileSystem/Container.php#L244-L258
226,417
michael-donat/php-vfs
src/VirtualFileSystem/Container.php
Container.move
public function move($fromPath, $toPath) { $fromNode = $this->nodeAt($fromPath); try { $nodeToOverride = $this->nodeAt($toPath); if (!is_a($nodeToOverride, get_class($fromNode))) { //nodes of a different type throw new \RuntimeException('Can\...
php
public function move($fromPath, $toPath) { $fromNode = $this->nodeAt($fromPath); try { $nodeToOverride = $this->nodeAt($toPath); if (!is_a($nodeToOverride, get_class($fromNode))) { //nodes of a different type throw new \RuntimeException('Can\...
[ "public", "function", "move", "(", "$", "fromPath", ",", "$", "toPath", ")", "{", "$", "fromNode", "=", "$", "this", "->", "nodeAt", "(", "$", "fromPath", ")", ";", "try", "{", "$", "nodeToOverride", "=", "$", "this", "->", "nodeAt", "(", "$", "toP...
Moves Node from source to destination @param string $fromPath @param string $toPath @throws \RuntimeException
[ "Moves", "Node", "from", "source", "to", "destination" ]
1254b67ca6bdaccd9f305b0e1aea81f790b3fa67
https://github.com/michael-donat/php-vfs/blob/1254b67ca6bdaccd9f305b0e1aea81f790b3fa67/src/VirtualFileSystem/Container.php#L287-L320
226,418
phrest/api
src/Request/PhrestRequest.php
PhrestRequest.getToken
public function getToken() { if ($this->has('token')) { return $this->get('token'); } if ($this->has('access_token')) { return $this->get('access_token'); } if ($this->has('accessToken')) { return $this->get('accessToken'); } if ($authorization = $this->ge...
php
public function getToken() { if ($this->has('token')) { return $this->get('token'); } if ($this->has('access_token')) { return $this->get('access_token'); } if ($this->has('accessToken')) { return $this->get('accessToken'); } if ($authorization = $this->ge...
[ "public", "function", "getToken", "(", ")", "{", "if", "(", "$", "this", "->", "has", "(", "'token'", ")", ")", "{", "return", "$", "this", "->", "get", "(", "'token'", ")", ";", "}", "if", "(", "$", "this", "->", "has", "(", "'access_token'", ")...
Get oAuth access token todo tidy up, standardize @return mixed|null|string
[ "Get", "oAuth", "access", "token", "todo", "tidy", "up", "standardize" ]
271d604f332cbd3ef0dc8593ea0904fee0a42a84
https://github.com/phrest/api/blob/271d604f332cbd3ef0dc8593ea0904fee0a42a84/src/Request/PhrestRequest.php#L29-L53
226,419
xinix-technology/bono
src/Bono/Middleware/ControllerMiddleware.php
ControllerMiddleware.call
public function call() { if (empty($this->options)) { $this->options = $this->app->config('bono.controllers'); } if (empty($this->options['mapping'])) { return $this->next->call(); } $mapping = $this->options['mapping']; $resourceUri = $this...
php
public function call() { if (empty($this->options)) { $this->options = $this->app->config('bono.controllers'); } if (empty($this->options['mapping'])) { return $this->next->call(); } $mapping = $this->options['mapping']; $resourceUri = $this...
[ "public", "function", "call", "(", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "options", ")", ")", "{", "$", "this", "->", "options", "=", "$", "this", "->", "app", "->", "config", "(", "'bono.controllers'", ")", ";", "}", "if", "(", "...
Instantiating controllers from configuration @return [type] [description]
[ "Instantiating", "controllers", "from", "configuration" ]
86c89f702dee2ab010767236c2c40b50cdc39c6e
https://github.com/xinix-technology/bono/blob/86c89f702dee2ab010767236c2c40b50cdc39c6e/src/Bono/Middleware/ControllerMiddleware.php#L60-L104
226,420
michael-donat/php-vfs
src/VirtualFileSystem/Structure/Node.php
Node.path
public function path() { $dirname = $this->dirname(); if ($this->parent instanceof Root) { //at root return $dirname.$this->basename(); } return sprintf('%s/%s', $dirname, $this->basename()); }
php
public function path() { $dirname = $this->dirname(); if ($this->parent instanceof Root) { //at root return $dirname.$this->basename(); } return sprintf('%s/%s', $dirname, $this->basename()); }
[ "public", "function", "path", "(", ")", "{", "$", "dirname", "=", "$", "this", "->", "dirname", "(", ")", ";", "if", "(", "$", "this", "->", "parent", "instanceof", "Root", ")", "{", "//at root", "return", "$", "dirname", ".", "$", "this", "->", "b...
Returns node path. @return string
[ "Returns", "node", "path", "." ]
1254b67ca6bdaccd9f305b0e1aea81f790b3fa67
https://github.com/michael-donat/php-vfs/blob/1254b67ca6bdaccd9f305b0e1aea81f790b3fa67/src/VirtualFileSystem/Structure/Node.php#L151-L162
226,421
michael-donat/php-vfs
src/VirtualFileSystem/Structure/Node.php
Node.url
public function url() { $dirname = $this->parent->url(); if ($this->parent instanceof Root) { //at root return $dirname.$this->basename(); } return sprintf('%s/%s', $dirname, $this->basename()); }
php
public function url() { $dirname = $this->parent->url(); if ($this->parent instanceof Root) { //at root return $dirname.$this->basename(); } return sprintf('%s/%s', $dirname, $this->basename()); }
[ "public", "function", "url", "(", ")", "{", "$", "dirname", "=", "$", "this", "->", "parent", "->", "url", "(", ")", ";", "if", "(", "$", "this", "->", "parent", "instanceof", "Root", ")", "{", "//at root", "return", "$", "dirname", ".", "$", "this...
Returns node URL. @return string
[ "Returns", "node", "URL", "." ]
1254b67ca6bdaccd9f305b0e1aea81f790b3fa67
https://github.com/michael-donat/php-vfs/blob/1254b67ca6bdaccd9f305b0e1aea81f790b3fa67/src/VirtualFileSystem/Structure/Node.php#L169-L180
226,422
yansongda/supports
src/Traits/HasHttpRequest.php
HasHttpRequest.post
public function post($endpoint, $data, $options = []) { if (!is_array($data)) { $options['body'] = $data; } else { $options['form_params'] = $data; } return $this->request('post', $endpoint, $options); }
php
public function post($endpoint, $data, $options = []) { if (!is_array($data)) { $options['body'] = $data; } else { $options['form_params'] = $data; } return $this->request('post', $endpoint, $options); }
[ "public", "function", "post", "(", "$", "endpoint", ",", "$", "data", ",", "$", "options", "=", "[", "]", ")", "{", "if", "(", "!", "is_array", "(", "$", "data", ")", ")", "{", "$", "options", "[", "'body'", "]", "=", "$", "data", ";", "}", "...
Send a POST request. @author yansongda <me@yansongda.cn> @param string $endpoint @param string|array $data @param array $options @return array|string
[ "Send", "a", "POST", "request", "." ]
3e8ba6dc757352da52cb73fa1c577eceb80dcd7a
https://github.com/yansongda/supports/blob/3e8ba6dc757352da52cb73fa1c577eceb80dcd7a/src/Traits/HasHttpRequest.php#L61-L70
226,423
yansongda/supports
src/Traits/HasHttpRequest.php
HasHttpRequest.getOptions
public function getOptions() { return array_merge([ 'base_uri' => property_exists($this, 'baseUri') ? $this->baseUri : '', 'timeout' => property_exists($this, 'timeout') ? $this->timeout : 5.0, 'connect_timeout' => property_exists($this, 'connectTimeout') ?...
php
public function getOptions() { return array_merge([ 'base_uri' => property_exists($this, 'baseUri') ? $this->baseUri : '', 'timeout' => property_exists($this, 'timeout') ? $this->timeout : 5.0, 'connect_timeout' => property_exists($this, 'connectTimeout') ?...
[ "public", "function", "getOptions", "(", ")", "{", "return", "array_merge", "(", "[", "'base_uri'", "=>", "property_exists", "(", "$", "this", ",", "'baseUri'", ")", "?", "$", "this", "->", "baseUri", ":", "''", ",", "'timeout'", "=>", "property_exists", "...
Get default options. @author yansongda <me@yansongda.cn> @return array
[ "Get", "default", "options", "." ]
3e8ba6dc757352da52cb73fa1c577eceb80dcd7a
https://github.com/yansongda/supports/blob/3e8ba6dc757352da52cb73fa1c577eceb80dcd7a/src/Traits/HasHttpRequest.php#L111-L118
226,424
yansongda/supports
src/Traits/HasHttpRequest.php
HasHttpRequest.getHttpClient
public function getHttpClient() { if (is_null($this->httpClient)) { $this->httpClient = $this->getDefaultHttpClient(); } return $this->httpClient; }
php
public function getHttpClient() { if (is_null($this->httpClient)) { $this->httpClient = $this->getDefaultHttpClient(); } return $this->httpClient; }
[ "public", "function", "getHttpClient", "(", ")", "{", "if", "(", "is_null", "(", "$", "this", "->", "httpClient", ")", ")", "{", "$", "this", "->", "httpClient", "=", "$", "this", "->", "getDefaultHttpClient", "(", ")", ";", "}", "return", "$", "this",...
Return http client. @return \GuzzleHttp\Client
[ "Return", "http", "client", "." ]
3e8ba6dc757352da52cb73fa1c577eceb80dcd7a
https://github.com/yansongda/supports/blob/3e8ba6dc757352da52cb73fa1c577eceb80dcd7a/src/Traits/HasHttpRequest.php#L125-L132
226,425
yansongda/supports
src/Traits/HasHttpRequest.php
HasHttpRequest.unwrapResponse
public function unwrapResponse(ResponseInterface $response) { $contentType = $response->getHeaderLine('Content-Type'); $contents = $response->getBody()->getContents(); if (false !== stripos($contentType, 'json') || stripos($contentType, 'javascript')) { return json_decode($conte...
php
public function unwrapResponse(ResponseInterface $response) { $contentType = $response->getHeaderLine('Content-Type'); $contents = $response->getBody()->getContents(); if (false !== stripos($contentType, 'json') || stripos($contentType, 'javascript')) { return json_decode($conte...
[ "public", "function", "unwrapResponse", "(", "ResponseInterface", "$", "response", ")", "{", "$", "contentType", "=", "$", "response", "->", "getHeaderLine", "(", "'Content-Type'", ")", ";", "$", "contents", "=", "$", "response", "->", "getBody", "(", ")", "...
Convert response. @author yansongda <me@yansongda.cn> @param ResponseInterface $response @return array|string
[ "Convert", "response", "." ]
3e8ba6dc757352da52cb73fa1c577eceb80dcd7a
https://github.com/yansongda/supports/blob/3e8ba6dc757352da52cb73fa1c577eceb80dcd7a/src/Traits/HasHttpRequest.php#L155-L167
226,426
phrest/api
src/Response/Response.php
Response.setStatusCode
public function setStatusCode($code, $message) { $this->meta->statusCode = $code; $this->meta->statusMessage = $message; }
php
public function setStatusCode($code, $message) { $this->meta->statusCode = $code; $this->meta->statusMessage = $message; }
[ "public", "function", "setStatusCode", "(", "$", "code", ",", "$", "message", ")", "{", "$", "this", "->", "meta", "->", "statusCode", "=", "$", "code", ";", "$", "this", "->", "meta", "->", "statusMessage", "=", "$", "message", ";", "}" ]
Set the status code @param int $code @param string $message @return \Phalcon\Http\ResponseInterface
[ "Set", "the", "status", "code" ]
271d604f332cbd3ef0dc8593ea0904fee0a42a84
https://github.com/phrest/api/blob/271d604f332cbd3ef0dc8593ea0904fee0a42a84/src/Response/Response.php#L81-L85
226,427
phrest/api
src/Response/Response.php
Response.addMessage
public function addMessage($text, $type = ResponseMessage::TYPE_SUCCESS) { $this->messages[] = new ResponseMessage( $text, $type ); return $this; }
php
public function addMessage($text, $type = ResponseMessage::TYPE_SUCCESS) { $this->messages[] = new ResponseMessage( $text, $type ); return $this; }
[ "public", "function", "addMessage", "(", "$", "text", ",", "$", "type", "=", "ResponseMessage", "::", "TYPE_SUCCESS", ")", "{", "$", "this", "->", "messages", "[", "]", "=", "new", "ResponseMessage", "(", "$", "text", ",", "$", "type", ")", ";", "retur...
Add a message to the response object @param $text @param string $type @return $this
[ "Add", "a", "message", "to", "the", "response", "object" ]
271d604f332cbd3ef0dc8593ea0904fee0a42a84
https://github.com/phrest/api/blob/271d604f332cbd3ef0dc8593ea0904fee0a42a84/src/Response/Response.php#L105-L113
226,428
xinix-technology/bono
src/Bono/App.php
App.getDefaultSettings
public static function getDefaultSettings() { $settings = parent::getDefaultSettings(); $settings['templates.path'] = ''; $settings['bono.base.path'] = '..'; $settings['bono.theme'] = 'Bono\\Theme\\DefaultTheme'; $settings['config.path'] = '../config'; // slim settin...
php
public static function getDefaultSettings() { $settings = parent::getDefaultSettings(); $settings['templates.path'] = ''; $settings['bono.base.path'] = '..'; $settings['bono.theme'] = 'Bono\\Theme\\DefaultTheme'; $settings['config.path'] = '../config'; // slim settin...
[ "public", "static", "function", "getDefaultSettings", "(", ")", "{", "$", "settings", "=", "parent", "::", "getDefaultSettings", "(", ")", ";", "$", "settings", "[", "'templates.path'", "]", "=", "''", ";", "$", "settings", "[", "'bono.base.path'", "]", "=",...
Override default settings @return array
[ "Override", "default", "settings" ]
86c89f702dee2ab010767236c2c40b50cdc39c6e
https://github.com/xinix-technology/bono/blob/86c89f702dee2ab010767236c2c40b50cdc39c6e/src/Bono/App.php#L80-L102
226,429
xinix-technology/bono
src/Bono/App.php
App.run
public function run() { // why I put it here because you can override the implementation require_once dirname(__FILE__).'/../functions.php'; if ($this->isRunning) { return; } $this->isRunning = true; $this->add(new \Bono\Middleware\CommonHandlerMiddlewa...
php
public function run() { // why I put it here because you can override the implementation require_once dirname(__FILE__).'/../functions.php'; if ($this->isRunning) { return; } $this->isRunning = true; $this->add(new \Bono\Middleware\CommonHandlerMiddlewa...
[ "public", "function", "run", "(", ")", "{", "// why I put it here because you can override the implementation", "require_once", "dirname", "(", "__FILE__", ")", ".", "'/../functions.php'", ";", "if", "(", "$", "this", "->", "isRunning", ")", "{", "return", ";", "}",...
Override run method @return void
[ "Override", "run", "method" ]
86c89f702dee2ab010767236c2c40b50cdc39c6e
https://github.com/xinix-technology/bono/blob/86c89f702dee2ab010767236c2c40b50cdc39c6e/src/Bono/App.php#L254-L268
226,430
xinix-technology/bono
src/Bono/App.php
App.has
public function has($Clazz) { if ($Clazz[0] == '\\') { $Clazz = substr($Clazz, 1); } foreach ($this->middleware as $middleware) { if (get_class($middleware) === $Clazz) { return true; } } return false; }
php
public function has($Clazz) { if ($Clazz[0] == '\\') { $Clazz = substr($Clazz, 1); } foreach ($this->middleware as $middleware) { if (get_class($middleware) === $Clazz) { return true; } } return false; }
[ "public", "function", "has", "(", "$", "Clazz", ")", "{", "if", "(", "$", "Clazz", "[", "0", "]", "==", "'\\\\'", ")", "{", "$", "Clazz", "=", "substr", "(", "$", "Clazz", ",", "1", ")", ";", "}", "foreach", "(", "$", "this", "->", "middleware"...
Check whether application has middleware with class name @param string $Clazz Class name @return boolean
[ "Check", "whether", "application", "has", "middleware", "with", "class", "name" ]
86c89f702dee2ab010767236c2c40b50cdc39c6e
https://github.com/xinix-technology/bono/blob/86c89f702dee2ab010767236c2c40b50cdc39c6e/src/Bono/App.php#L277-L289
226,431
xinix-technology/bono
src/Bono/App.php
App.configure
protected function configure() { if (is_readable($configFile = $this->config('config.path') . '/config.php')) { $config = include $configFile; if (!is_array($config)) { $config = (array) $config; } $this->config($config); } if (...
php
protected function configure() { if (is_readable($configFile = $this->config('config.path') . '/config.php')) { $config = include $configFile; if (!is_array($config)) { $config = (array) $config; } $this->config($config); } if (...
[ "protected", "function", "configure", "(", ")", "{", "if", "(", "is_readable", "(", "$", "configFile", "=", "$", "this", "->", "config", "(", "'config.path'", ")", ".", "'/config.php'", ")", ")", "{", "$", "config", "=", "include", "$", "configFile", ";"...
Configure life cycle @return void
[ "Configure", "life", "cycle" ]
86c89f702dee2ab010767236c2c40b50cdc39c6e
https://github.com/xinix-technology/bono/blob/86c89f702dee2ab010767236c2c40b50cdc39c6e/src/Bono/App.php#L305-L323
226,432
xinix-technology/bono
src/Bono/App.php
App.configureAliases
protected function configureAliases() { $this->aliases = array_merge($this->aliases, $this->config('bono.aliases') ?: array()); foreach ($this->aliases as $key => $value) { if (! class_exists($key)) { class_alias($value, $key); } } }
php
protected function configureAliases() { $this->aliases = array_merge($this->aliases, $this->config('bono.aliases') ?: array()); foreach ($this->aliases as $key => $value) { if (! class_exists($key)) { class_alias($value, $key); } } }
[ "protected", "function", "configureAliases", "(", ")", "{", "$", "this", "->", "aliases", "=", "array_merge", "(", "$", "this", "->", "aliases", ",", "$", "this", "->", "config", "(", "'bono.aliases'", ")", "?", ":", "array", "(", ")", ")", ";", "forea...
Configure the alias class name @return void
[ "Configure", "the", "alias", "class", "name" ]
86c89f702dee2ab010767236c2c40b50cdc39c6e
https://github.com/xinix-technology/bono/blob/86c89f702dee2ab010767236c2c40b50cdc39c6e/src/Bono/App.php#L386-L395
226,433
xinix-technology/bono
src/Bono/App.php
App.getFilters
public function getFilters($name = null) { if (!is_null($name)) { return isset($this->filters[(string) $name]) ? $this->filters[(string) $name] : null; } else { return $this->filters; } }
php
public function getFilters($name = null) { if (!is_null($name)) { return isset($this->filters[(string) $name]) ? $this->filters[(string) $name] : null; } else { return $this->filters; } }
[ "public", "function", "getFilters", "(", "$", "name", "=", "null", ")", "{", "if", "(", "!", "is_null", "(", "$", "name", ")", ")", "{", "return", "isset", "(", "$", "this", "->", "filters", "[", "(", "string", ")", "$", "name", "]", ")", "?", ...
Get filter listeners Return an array of registered filters. If `$name` is a valid filter name, only the listeners attached to that filter are returned. Else, all listeners are returned as an associative array whose keys are filter names and whose values are arrays of listeners. @param string $name A filter name (Opti...
[ "Get", "filter", "listeners" ]
86c89f702dee2ab010767236c2c40b50cdc39c6e
https://github.com/xinix-technology/bono/blob/86c89f702dee2ab010767236c2c40b50cdc39c6e/src/Bono/App.php#L632-L639
226,434
xinix-technology/bono
src/Bono/App.php
App.clearFilters
public function clearFilters($name = null) { if (!is_null($name) && isset($this->filters[(string) $name])) { $this->filters[(string) $name] = array(array()); } else { foreach ($this->filters as $key => $value) { $this->filters[$key] = array(array()); ...
php
public function clearFilters($name = null) { if (!is_null($name) && isset($this->filters[(string) $name])) { $this->filters[(string) $name] = array(array()); } else { foreach ($this->filters as $key => $value) { $this->filters[$key] = array(array()); ...
[ "public", "function", "clearFilters", "(", "$", "name", "=", "null", ")", "{", "if", "(", "!", "is_null", "(", "$", "name", ")", "&&", "isset", "(", "$", "this", "->", "filters", "[", "(", "string", ")", "$", "name", "]", ")", ")", "{", "$", "t...
Clear filter listeners Clear all listeners for all filters. If `$name` is a valid filter name, only the listeners attached to that filter will be cleared. @param string $name A filter name (Optional) @return void
[ "Clear", "filter", "listeners" ]
86c89f702dee2ab010767236c2c40b50cdc39c6e
https://github.com/xinix-technology/bono/blob/86c89f702dee2ab010767236c2c40b50cdc39c6e/src/Bono/App.php#L652-L661
226,435
amranidev/ajaxis
src/Modal/ModalDirector.php
ModalDirector.build
public function build($title, $action, $input, $link, ModalInterface $modal) { /* * build modal head */ $modal->buildHead($title, $link); /** * check if $input is an array. */ if (is_array($input)) { /* * check if name ke...
php
public function build($title, $action, $input, $link, ModalInterface $modal) { /* * build modal head */ $modal->buildHead($title, $link); /** * check if $input is an array. */ if (is_array($input)) { /* * check if name ke...
[ "public", "function", "build", "(", "$", "title", ",", "$", "action", ",", "$", "input", ",", "$", "link", ",", "ModalInterface", "$", "modal", ")", "{", "/*\n * build modal head\n */", "$", "modal", "->", "buildHead", "(", "$", "title", ",",...
build modal. @param string $title @param string $action @param mixed $input @param string $link @param Modal $modal $input may be a string or an array.
[ "build", "modal", "." ]
0de3be2cc63cd953fb8a0efc44b6afc176f57ca4
https://github.com/amranidev/ajaxis/blob/0de3be2cc63cd953fb8a0efc44b6afc176f57ca4/src/Modal/ModalDirector.php#L23-L58
226,436
welpdev/icalBundle
src/Response/CalendarResponse.php
CalendarResponse.getDefaultHeaders
protected function getDefaultHeaders() { $headers = array(); $mimeType = $this->calendar->getContentType(); $headers['Content-Type'] = sprintf('%s; charset=utf-8', $mimeType); $filename = $this->calendar->getFilename(); $headers['Content-Disposition'] = sprintf('attachment;...
php
protected function getDefaultHeaders() { $headers = array(); $mimeType = $this->calendar->getContentType(); $headers['Content-Type'] = sprintf('%s; charset=utf-8', $mimeType); $filename = $this->calendar->getFilename(); $headers['Content-Disposition'] = sprintf('attachment;...
[ "protected", "function", "getDefaultHeaders", "(", ")", "{", "$", "headers", "=", "array", "(", ")", ";", "$", "mimeType", "=", "$", "this", "->", "calendar", "->", "getContentType", "(", ")", ";", "$", "headers", "[", "'Content-Type'", "]", "=", "sprint...
Get default response headers for a calendar @return array
[ "Get", "default", "response", "headers", "for", "a", "calendar" ]
b432375bb024e9245581e9775032f4d2b48e9966
https://github.com/welpdev/icalBundle/blob/b432375bb024e9245581e9775032f4d2b48e9966/src/Response/CalendarResponse.php#L51-L62
226,437
yansongda/supports
src/Str.php
Str.length
public static function length($value, $encoding = null) { if ($encoding !== null) { return mb_strlen($value, $encoding); } return mb_strlen($value); }
php
public static function length($value, $encoding = null) { if ($encoding !== null) { return mb_strlen($value, $encoding); } return mb_strlen($value); }
[ "public", "static", "function", "length", "(", "$", "value", ",", "$", "encoding", "=", "null", ")", "{", "if", "(", "$", "encoding", "!==", "null", ")", "{", "return", "mb_strlen", "(", "$", "value", ",", "$", "encoding", ")", ";", "}", "return", ...
Return the length of the given string. @param string $value @param string $encoding @return int
[ "Return", "the", "length", "of", "the", "given", "string", "." ]
3e8ba6dc757352da52cb73fa1c577eceb80dcd7a
https://github.com/yansongda/supports/blob/3e8ba6dc757352da52cb73fa1c577eceb80dcd7a/src/Str.php#L208-L215
226,438
easy-swoole/easyWhoops
src/Runner.php
Runner.writeToOutputNow
private function writeToOutputNow($output, $handlerContentType) { /** @var Response $Response */ $Response = $this->system->ResIns(); // If can do browser output if ($Response instanceof Response) { if ($this->sendHttpCode()) { $Response->withStatus($this-...
php
private function writeToOutputNow($output, $handlerContentType) { /** @var Response $Response */ $Response = $this->system->ResIns(); // If can do browser output if ($Response instanceof Response) { if ($this->sendHttpCode()) { $Response->withStatus($this-...
[ "private", "function", "writeToOutputNow", "(", "$", "output", ",", "$", "handlerContentType", ")", "{", "/** @var Response $Response */", "$", "Response", "=", "$", "this", "->", "system", "->", "ResIns", "(", ")", ";", "// If can do browser output", "if", "(", ...
Auto write Output to Browser or Console @param $output @param $handlerContentType @author : evalor <master@evalor.cn>
[ "Auto", "write", "Output", "to", "Browser", "or", "Console" ]
be1f55ddee5e6513e619c5614ae8b6c7a1b327c4
https://github.com/easy-swoole/easyWhoops/blob/be1f55ddee5e6513e619c5614ae8b6c7a1b327c4/src/Runner.php#L378-L394
226,439
xinix-technology/bono
src/Bono/Config/Config.php
Config.get
public function get($index) { $config = $this->config; foreach (explode('.', $index) as $value) { $config = $config[$value]; } return $config; }
php
public function get($index) { $config = $this->config; foreach (explode('.', $index) as $value) { $config = $config[$value]; } return $config; }
[ "public", "function", "get", "(", "$", "index", ")", "{", "$", "config", "=", "$", "this", "->", "config", ";", "foreach", "(", "explode", "(", "'.'", ",", "$", "index", ")", "as", "$", "value", ")", "{", "$", "config", "=", "$", "config", "[", ...
Get a particular value back from the config array @param string $index The index to fetch in dot notation @global array $config The config array defined in the config files @return mixed
[ "Get", "a", "particular", "value", "back", "from", "the", "config", "array" ]
86c89f702dee2ab010767236c2c40b50cdc39c6e
https://github.com/xinix-technology/bono/blob/86c89f702dee2ab010767236c2c40b50cdc39c6e/src/Bono/Config/Config.php#L93-L101
226,440
timegridio/icalreader
src/ICalParser.php
ICalParser.initURL
public function initURL($url) { $contents = file_get_contents($url); $lines = explode("\n", $contents); return $this->initLines($lines); }
php
public function initURL($url) { $contents = file_get_contents($url); $lines = explode("\n", $contents); return $this->initLines($lines); }
[ "public", "function", "initURL", "(", "$", "url", ")", "{", "$", "contents", "=", "file_get_contents", "(", "$", "url", ")", ";", "$", "lines", "=", "explode", "(", "\"\\n\"", ",", "$", "contents", ")", ";", "return", "$", "this", "->", "initLines", ...
Initializes lines from a URL @url {string} $url The url of the ical file to download and initialize. Unless you know what you're doing, it should begin with "http://" @return Object The iCal Object
[ "Initializes", "lines", "from", "a", "URL" ]
a345345c04f19ad949fe0ab2c0c07ff97835e822
https://github.com/timegridio/icalreader/blob/a345345c04f19ad949fe0ab2c0c07ff97835e822/src/ICalParser.php#L54-L61
226,441
timegridio/icalreader
src/ICalParser.php
ICalParser.initLines
public function initLines($lines) { if (stristr($lines[0], 'BEGIN:VCALENDAR') === false) { return false; } foreach ($lines as $line) { $line = rtrim($line); // Trim trailing whitespace $add = $this->keyValueFromString($line); if ($add ===...
php
public function initLines($lines) { if (stristr($lines[0], 'BEGIN:VCALENDAR') === false) { return false; } foreach ($lines as $line) { $line = rtrim($line); // Trim trailing whitespace $add = $this->keyValueFromString($line); if ($add ===...
[ "public", "function", "initLines", "(", "$", "lines", ")", "{", "if", "(", "stristr", "(", "$", "lines", "[", "0", "]", ",", "'BEGIN:VCALENDAR'", ")", "===", "false", ")", "{", "return", "false", ";", "}", "foreach", "(", "$", "lines", "as", "$", "...
Initializes lines from file @param {array} $lines The lines to initialize @return Object The iCal Object
[ "Initializes", "lines", "from", "file" ]
a345345c04f19ad949fe0ab2c0c07ff97835e822
https://github.com/timegridio/icalreader/blob/a345345c04f19ad949fe0ab2c0c07ff97835e822/src/ICalParser.php#L84-L166
226,442
timegridio/icalreader
src/ICalParser.php
ICalParser.keyValueFromString
public function keyValueFromString($text) { // Match colon separator outside of quoted substrings // Fallback to nearest semicolon outside of quoted substrings, if colon cannot be found // Do not try and match within the value paired with the keyword preg_match('/(.*?)(?::(?=(?:[^"]*...
php
public function keyValueFromString($text) { // Match colon separator outside of quoted substrings // Fallback to nearest semicolon outside of quoted substrings, if colon cannot be found // Do not try and match within the value paired with the keyword preg_match('/(.*?)(?::(?=(?:[^"]*...
[ "public", "function", "keyValueFromString", "(", "$", "text", ")", "{", "// Match colon separator outside of quoted substrings", "// Fallback to nearest semicolon outside of quoted substrings, if colon cannot be found", "// Do not try and match within the value paired with the keyword", "preg_...
Get a key-value pair of a string. @param {string} $text which is like "VCALENDAR:Begin" or "LOCATION:" @return {array} array("VCALENDAR", "Begin")
[ "Get", "a", "key", "-", "value", "pair", "of", "a", "string", "." ]
a345345c04f19ad949fe0ab2c0c07ff97835e822
https://github.com/timegridio/icalreader/blob/a345345c04f19ad949fe0ab2c0c07ff97835e822/src/ICalParser.php#L238-L283
226,443
timegridio/icalreader
src/ICalParser.php
ICalParser.iCalDateToUnixTimestamp
public static function iCalDateToUnixTimestamp($icalDate) { $icalDate = str_replace('T', '', $icalDate); $icalDate = str_replace('Z', '', $icalDate); $pattern = '/([0-9]{4})'; // 1: YYYY $pattern .= '([0-9]{2})'; // 2: MM $pattern .= '([0-9]{2})'; // 3: DD $p...
php
public static function iCalDateToUnixTimestamp($icalDate) { $icalDate = str_replace('T', '', $icalDate); $icalDate = str_replace('Z', '', $icalDate); $pattern = '/([0-9]{4})'; // 1: YYYY $pattern .= '([0-9]{2})'; // 2: MM $pattern .= '([0-9]{2})'; // 3: DD $p...
[ "public", "static", "function", "iCalDateToUnixTimestamp", "(", "$", "icalDate", ")", "{", "$", "icalDate", "=", "str_replace", "(", "'T'", ",", "''", ",", "$", "icalDate", ")", ";", "$", "icalDate", "=", "str_replace", "(", "'Z'", ",", "''", ",", "$", ...
Return Unix timestamp from iCal date time format @param {string} $icalDate A Date in the format YYYYMMDD[T]HHMMSS[Z] or YYYYMMDD[T]HHMMSS @return {int}
[ "Return", "Unix", "timestamp", "from", "iCal", "date", "time", "format" ]
a345345c04f19ad949fe0ab2c0c07ff97835e822
https://github.com/timegridio/icalreader/blob/a345345c04f19ad949fe0ab2c0c07ff97835e822/src/ICalParser.php#L293-L315
226,444
timegridio/icalreader
src/ICalParser.php
ICalParser.eventsFromRange
public function eventsFromRange($rangeStart = false, $rangeEnd = false) { $events = $this->sortEventsWithOrder($this->events(), SORT_ASC); if (!$events) { return false; } $extendedEvents = []; $rangeStart = ($rangeStart === false) ? new DateTime() :...
php
public function eventsFromRange($rangeStart = false, $rangeEnd = false) { $events = $this->sortEventsWithOrder($this->events(), SORT_ASC); if (!$events) { return false; } $extendedEvents = []; $rangeStart = ($rangeStart === false) ? new DateTime() :...
[ "public", "function", "eventsFromRange", "(", "$", "rangeStart", "=", "false", ",", "$", "rangeEnd", "=", "false", ")", "{", "$", "events", "=", "$", "this", "->", "sortEventsWithOrder", "(", "$", "this", "->", "events", "(", ")", ",", "SORT_ASC", ")", ...
Returns false when the current calendar has no events in range, else the events. Note that this function makes use of a UNIX timestamp. This might be a problem on January the 29th, 2038. See http://en.wikipedia.org/wiki/Unix_time#Representing_the_number @param {boolean} $rangeStart Either true or false @param {boolea...
[ "Returns", "false", "when", "the", "current", "calendar", "has", "no", "events", "in", "range", "else", "the", "events", "." ]
a345345c04f19ad949fe0ab2c0c07ff97835e822
https://github.com/timegridio/icalreader/blob/a345345c04f19ad949fe0ab2c0c07ff97835e822/src/ICalParser.php#L714-L746
226,445
timegridio/icalreader
src/ICalParser.php
ICalParser.sortEventsWithOrder
public function sortEventsWithOrder($events, $sortOrder = SORT_ASC) { $extendedEvents = []; // Loop through all events by adding two new elements foreach ($events as $anEvent) { if (!array_key_exists('UNIX_TIMESTAMP', $anEvent)) { $anEvent['UNIX_TIMESTAMP'] = $th...
php
public function sortEventsWithOrder($events, $sortOrder = SORT_ASC) { $extendedEvents = []; // Loop through all events by adding two new elements foreach ($events as $anEvent) { if (!array_key_exists('UNIX_TIMESTAMP', $anEvent)) { $anEvent['UNIX_TIMESTAMP'] = $th...
[ "public", "function", "sortEventsWithOrder", "(", "$", "events", ",", "$", "sortOrder", "=", "SORT_ASC", ")", "{", "$", "extendedEvents", "=", "[", "]", ";", "// Loop through all events by adding two new elements", "foreach", "(", "$", "events", "as", "$", "anEven...
Returns a boolean value whether the current calendar has events or not @param {array} $events An array with events. @param {array} $sortOrder Either SORT_ASC, SORT_DESC, SORT_REGULAR, SORT_NUMERIC, SORT_STRING @return {boolean}
[ "Returns", "a", "boolean", "value", "whether", "the", "current", "calendar", "has", "events", "or", "not" ]
a345345c04f19ad949fe0ab2c0c07ff97835e822
https://github.com/timegridio/icalreader/blob/a345345c04f19ad949fe0ab2c0c07ff97835e822/src/ICalParser.php#L757-L780
226,446
michael-donat/php-vfs
src/VirtualFileSystem/Factory.php
Factory.updateMetadata
public function updateMetadata(Node $node) { $this->updateFileTimes($node); $this->updateOwnership($node); return $node; }
php
public function updateMetadata(Node $node) { $this->updateFileTimes($node); $this->updateOwnership($node); return $node; }
[ "public", "function", "updateMetadata", "(", "Node", "$", "node", ")", "{", "$", "this", "->", "updateFileTimes", "(", "$", "node", ")", ";", "$", "this", "->", "updateOwnership", "(", "$", "node", ")", ";", "return", "$", "node", ";", "}" ]
Updates time and ownership of a node @param Node $node @return Node
[ "Updates", "time", "and", "ownership", "of", "a", "node" ]
1254b67ca6bdaccd9f305b0e1aea81f790b3fa67
https://github.com/michael-donat/php-vfs/blob/1254b67ca6bdaccd9f305b0e1aea81f790b3fa67/src/VirtualFileSystem/Factory.php#L59-L65
226,447
datto/php-json-rpc-simple
src/Simple/Mapper.php
Mapper.getCallable
public function getCallable($methodName) { $this->checkMethodName($methodName); $class = $this->getClassName($methodName); $method = $this->getMethodName($methodName); $object = $this->createObject($class); if (!method_exists($object, $method)) { throw new Json...
php
public function getCallable($methodName) { $this->checkMethodName($methodName); $class = $this->getClassName($methodName); $method = $this->getMethodName($methodName); $object = $this->createObject($class); if (!method_exists($object, $method)) { throw new Json...
[ "public", "function", "getCallable", "(", "$", "methodName", ")", "{", "$", "this", "->", "checkMethodName", "(", "$", "methodName", ")", ";", "$", "class", "=", "$", "this", "->", "getClassName", "(", "$", "methodName", ")", ";", "$", "method", "=", "...
Maps JSON-RPC method name to a PHP callable function. @param string $methodName JSON-RPC method name @return callable Returns a callable method @throws JsonRpc\Exception\Method If the method does not map to a valid callable
[ "Maps", "JSON", "-", "RPC", "method", "name", "to", "a", "PHP", "callable", "function", "." ]
40433a713279d1d075942a3802d763ef4ff527c5
https://github.com/datto/php-json-rpc-simple/blob/40433a713279d1d075942a3802d763ef4ff527c5/src/Simple/Mapper.php#L70-L84
226,448
datto/php-json-rpc-simple
src/Simple/Mapper.php
Mapper.createObject
private function createObject($class) { if (!class_exists($class)) { throw new JsonRpc\Exception\Method(); } try { return new $class(); } catch (Exception $e) { throw new JsonRpc\Exception\Method(); } }
php
private function createObject($class) { if (!class_exists($class)) { throw new JsonRpc\Exception\Method(); } try { return new $class(); } catch (Exception $e) { throw new JsonRpc\Exception\Method(); } }
[ "private", "function", "createObject", "(", "$", "class", ")", "{", "if", "(", "!", "class_exists", "(", "$", "class", ")", ")", "{", "throw", "new", "JsonRpc", "\\", "Exception", "\\", "Method", "(", ")", ";", "}", "try", "{", "return", "new", "$", ...
Create an object from the given class name @param string $class Fully qualified class name @return object Object of the type 'class' @throws JsonRpc\Exception\Method If the class does not exist or the class creation fails
[ "Create", "an", "object", "from", "the", "given", "class", "name" ]
40433a713279d1d075942a3802d763ef4ff527c5
https://github.com/datto/php-json-rpc-simple/blob/40433a713279d1d075942a3802d763ef4ff527c5/src/Simple/Mapper.php#L158-L169
226,449
datto/php-json-rpc-simple
src/Simple/Mapper.php
Mapper.isPositionalArguments
private function isPositionalArguments($arguments) { $i = 0; foreach ($arguments as $key => $value) { if ($key !== $i++) { return false; } } return true; }
php
private function isPositionalArguments($arguments) { $i = 0; foreach ($arguments as $key => $value) { if ($key !== $i++) { return false; } } return true; }
[ "private", "function", "isPositionalArguments", "(", "$", "arguments", ")", "{", "$", "i", "=", "0", ";", "foreach", "(", "$", "arguments", "as", "$", "key", "=>", "$", "value", ")", "{", "if", "(", "$", "key", "!==", "$", "i", "++", ")", "{", "r...
Returns true if the argument array is a zero-indexed list of positional arguments, or false if the argument array is a set of named arguments. @param array $arguments Array of arguments. @return bool Returns true iff the arguments array is zero-indexed.
[ "Returns", "true", "if", "the", "argument", "array", "is", "a", "zero", "-", "indexed", "list", "of", "positional", "arguments", "or", "false", "if", "the", "argument", "array", "is", "a", "set", "of", "named", "arguments", "." ]
40433a713279d1d075942a3802d763ef4ff527c5
https://github.com/datto/php-json-rpc-simple/blob/40433a713279d1d075942a3802d763ef4ff527c5/src/Simple/Mapper.php#L178-L187
226,450
michael-donat/php-vfs
src/VirtualFileSystem/Wrapper.php
Wrapper.getContainerFromContext
public function getContainerFromContext($path) { $scheme = current(preg_split('#://#', $path)); $options = stream_context_get_options(stream_context_get_default()); return $options[$scheme]['Container']; }
php
public function getContainerFromContext($path) { $scheme = current(preg_split('#://#', $path)); $options = stream_context_get_options(stream_context_get_default()); return $options[$scheme]['Container']; }
[ "public", "function", "getContainerFromContext", "(", "$", "path", ")", "{", "$", "scheme", "=", "current", "(", "preg_split", "(", "'#://#'", ",", "$", "path", ")", ")", ";", "$", "options", "=", "stream_context_get_options", "(", "stream_context_get_default", ...
Returns Container object fished form default_context_options by scheme. @param $path @return Container
[ "Returns", "Container", "object", "fished", "form", "default_context_options", "by", "scheme", "." ]
1254b67ca6bdaccd9f305b0e1aea81f790b3fa67
https://github.com/michael-donat/php-vfs/blob/1254b67ca6bdaccd9f305b0e1aea81f790b3fa67/src/VirtualFileSystem/Wrapper.php#L96-L102
226,451
michael-donat/php-vfs
src/VirtualFileSystem/Wrapper.php
Wrapper.stream_stat
public function stream_stat() { try { $file = $this->currentlyOpenedFile->getFile(); return array_merge($this->getStatArray(), array( 'mode' => $file->mode(), 'uid' => $file->user(), 'gid' => $file->group(), 'atime' =>...
php
public function stream_stat() { try { $file = $this->currentlyOpenedFile->getFile(); return array_merge($this->getStatArray(), array( 'mode' => $file->mode(), 'uid' => $file->user(), 'gid' => $file->group(), 'atime' =>...
[ "public", "function", "stream_stat", "(", ")", "{", "try", "{", "$", "file", "=", "$", "this", "->", "currentlyOpenedFile", "->", "getFile", "(", ")", ";", "return", "array_merge", "(", "$", "this", "->", "getStatArray", "(", ")", ",", "array", "(", "'...
Returns stat data for file inclusion. @see http://php.net/streamwrapper.stream-stat @return bool
[ "Returns", "stat", "data", "for", "file", "inclusion", "." ]
1254b67ca6bdaccd9f305b0e1aea81f790b3fa67
https://github.com/michael-donat/php-vfs/blob/1254b67ca6bdaccd9f305b0e1aea81f790b3fa67/src/VirtualFileSystem/Wrapper.php#L267-L285
226,452
michael-donat/php-vfs
src/VirtualFileSystem/Wrapper.php
Wrapper.url_stat
public function url_stat($path) { try { $file = $this->getContainerFromContext($path)->nodeAt($this->stripScheme($path)); return array_merge($this->getStatArray(), array( 'mode' => $file->mode(), 'uid' => $file->user(), 'gid' => $file-...
php
public function url_stat($path) { try { $file = $this->getContainerFromContext($path)->nodeAt($this->stripScheme($path)); return array_merge($this->getStatArray(), array( 'mode' => $file->mode(), 'uid' => $file->user(), 'gid' => $file-...
[ "public", "function", "url_stat", "(", "$", "path", ")", "{", "try", "{", "$", "file", "=", "$", "this", "->", "getContainerFromContext", "(", "$", "path", ")", "->", "nodeAt", "(", "$", "this", "->", "stripScheme", "(", "$", "path", ")", ")", ";", ...
Returns file stat information @see http://php.net/stat @param string $path @return array|false
[ "Returns", "file", "stat", "information" ]
1254b67ca6bdaccd9f305b0e1aea81f790b3fa67
https://github.com/michael-donat/php-vfs/blob/1254b67ca6bdaccd9f305b0e1aea81f790b3fa67/src/VirtualFileSystem/Wrapper.php#L296-L313
226,453
michael-donat/php-vfs
src/VirtualFileSystem/Wrapper.php
Wrapper.mkdir
public function mkdir($path, $mode, $options) { $container = $this->getContainerFromContext($path); $path = $this->stripScheme($path); $recursive = (bool) ($options & STREAM_MKDIR_RECURSIVE); try { //need to check all parents for permissions $parentPath = $pa...
php
public function mkdir($path, $mode, $options) { $container = $this->getContainerFromContext($path); $path = $this->stripScheme($path); $recursive = (bool) ($options & STREAM_MKDIR_RECURSIVE); try { //need to check all parents for permissions $parentPath = $pa...
[ "public", "function", "mkdir", "(", "$", "path", ",", "$", "mode", ",", "$", "options", ")", "{", "$", "container", "=", "$", "this", "->", "getContainerFromContext", "(", "$", "path", ")", ";", "$", "path", "=", "$", "this", "->", "stripScheme", "("...
Called in response to mkdir to create directory. @see http://php.net/streamwrapper.mkdir @param string $path @param int $mode @param int $options @return bool
[ "Called", "in", "response", "to", "mkdir", "to", "create", "directory", "." ]
1254b67ca6bdaccd9f305b0e1aea81f790b3fa67
https://github.com/michael-donat/php-vfs/blob/1254b67ca6bdaccd9f305b0e1aea81f790b3fa67/src/VirtualFileSystem/Wrapper.php#L371-L408
226,454
michael-donat/php-vfs
src/VirtualFileSystem/Wrapper.php
Wrapper.stream_seek
public function stream_seek($offset, $whence = SEEK_SET) { switch ($whence) { case SEEK_SET: $this->currentlyOpenedFile->position($offset); break; case SEEK_CUR: $this->currentlyOpenedFile->offsetPosition($offset); break...
php
public function stream_seek($offset, $whence = SEEK_SET) { switch ($whence) { case SEEK_SET: $this->currentlyOpenedFile->position($offset); break; case SEEK_CUR: $this->currentlyOpenedFile->offsetPosition($offset); break...
[ "public", "function", "stream_seek", "(", "$", "offset", ",", "$", "whence", "=", "SEEK_SET", ")", "{", "switch", "(", "$", "whence", ")", "{", "case", "SEEK_SET", ":", "$", "this", "->", "currentlyOpenedFile", "->", "position", "(", "$", "offset", ")", ...
Sets file pointer to specified position @param int $offset @param int $whence @return bool
[ "Sets", "file", "pointer", "to", "specified", "position" ]
1254b67ca6bdaccd9f305b0e1aea81f790b3fa67
https://github.com/michael-donat/php-vfs/blob/1254b67ca6bdaccd9f305b0e1aea81f790b3fa67/src/VirtualFileSystem/Wrapper.php#L561-L576
226,455
michael-donat/php-vfs
src/VirtualFileSystem/Wrapper.php
Wrapper.unlink
public function unlink($path) { $container = $this->getContainerFromContext($path); try { $path = $this->stripScheme($path); $parent = $container->nodeAt(dirname($path)); $permissionHelper = $container->getPermissionHelper($parent); if (!$permissio...
php
public function unlink($path) { $container = $this->getContainerFromContext($path); try { $path = $this->stripScheme($path); $parent = $container->nodeAt(dirname($path)); $permissionHelper = $container->getPermissionHelper($parent); if (!$permissio...
[ "public", "function", "unlink", "(", "$", "path", ")", "{", "$", "container", "=", "$", "this", "->", "getContainerFromContext", "(", "$", "path", ")", ";", "try", "{", "$", "path", "=", "$", "this", "->", "stripScheme", "(", "$", "path", ")", ";", ...
Deletes file at given path @param int $path @return bool
[ "Deletes", "file", "at", "given", "path" ]
1254b67ca6bdaccd9f305b0e1aea81f790b3fa67
https://github.com/michael-donat/php-vfs/blob/1254b67ca6bdaccd9f305b0e1aea81f790b3fa67/src/VirtualFileSystem/Wrapper.php#L635-L673
226,456
michael-donat/php-vfs
src/VirtualFileSystem/Wrapper.php
Wrapper.dir_opendir
public function dir_opendir($path) { $container = $this->getContainerFromContext($path); $path = $this->stripScheme($path); if (!$container->hasNodeAt($path)) { trigger_error(sprintf('opendir(%s): failed to open dir: No such file or directory', $path), E_USER_WARNING); ...
php
public function dir_opendir($path) { $container = $this->getContainerFromContext($path); $path = $this->stripScheme($path); if (!$container->hasNodeAt($path)) { trigger_error(sprintf('opendir(%s): failed to open dir: No such file or directory', $path), E_USER_WARNING); ...
[ "public", "function", "dir_opendir", "(", "$", "path", ")", "{", "$", "container", "=", "$", "this", "->", "getContainerFromContext", "(", "$", "path", ")", ";", "$", "path", "=", "$", "this", "->", "stripScheme", "(", "$", "path", ")", ";", "if", "(...
Opens directory for iteration @param string $path @return bool
[ "Opens", "directory", "for", "iteration" ]
1254b67ca6bdaccd9f305b0e1aea81f790b3fa67
https://github.com/michael-donat/php-vfs/blob/1254b67ca6bdaccd9f305b0e1aea81f790b3fa67/src/VirtualFileSystem/Wrapper.php#L739-L773
226,457
michael-donat/php-vfs
src/VirtualFileSystem/Wrapper.php
Wrapper.dir_readdir
public function dir_readdir() { $node = $this->currentlyOpenedDir->iterator()->current(); if (!$node) { return false; } $this->currentlyOpenedDir->iterator()->next(); return $node->basename(); }
php
public function dir_readdir() { $node = $this->currentlyOpenedDir->iterator()->current(); if (!$node) { return false; } $this->currentlyOpenedDir->iterator()->next(); return $node->basename(); }
[ "public", "function", "dir_readdir", "(", ")", "{", "$", "node", "=", "$", "this", "->", "currentlyOpenedDir", "->", "iterator", "(", ")", "->", "current", "(", ")", ";", "if", "(", "!", "$", "node", ")", "{", "return", "false", ";", "}", "$", "thi...
Returns next file url in directory @return null
[ "Returns", "next", "file", "url", "in", "directory" ]
1254b67ca6bdaccd9f305b0e1aea81f790b3fa67
https://github.com/michael-donat/php-vfs/blob/1254b67ca6bdaccd9f305b0e1aea81f790b3fa67/src/VirtualFileSystem/Wrapper.php#L796-L805
226,458
michael-donat/php-vfs
src/VirtualFileSystem/Wrapper/DirectoryHandler.php
DirectoryHandler.setDirectory
public function setDirectory(Directory $directory) { $this->directory = $directory; $this->iterator = new \ArrayIterator($directory->children()); }
php
public function setDirectory(Directory $directory) { $this->directory = $directory; $this->iterator = new \ArrayIterator($directory->children()); }
[ "public", "function", "setDirectory", "(", "Directory", "$", "directory", ")", "{", "$", "this", "->", "directory", "=", "$", "directory", ";", "$", "this", "->", "iterator", "=", "new", "\\", "ArrayIterator", "(", "$", "directory", "->", "children", "(", ...
Sets directory in context. @param Directory $directory
[ "Sets", "directory", "in", "context", "." ]
1254b67ca6bdaccd9f305b0e1aea81f790b3fa67
https://github.com/michael-donat/php-vfs/blob/1254b67ca6bdaccd9f305b0e1aea81f790b3fa67/src/VirtualFileSystem/Wrapper/DirectoryHandler.php#L40-L44
226,459
michael-donat/php-vfs
src/VirtualFileSystem/Structure/Directory.php
Directory.addNode
public function addNode(Node $node) { if (array_key_exists($node->basename(), $this->children)) { throw new FileExistsException(sprintf('%s already exists', $node->basename())); } $this->children[$node->basename()] = $node; $node->setParent($this); }
php
public function addNode(Node $node) { if (array_key_exists($node->basename(), $this->children)) { throw new FileExistsException(sprintf('%s already exists', $node->basename())); } $this->children[$node->basename()] = $node; $node->setParent($this); }
[ "public", "function", "addNode", "(", "Node", "$", "node", ")", "{", "if", "(", "array_key_exists", "(", "$", "node", "->", "basename", "(", ")", ",", "$", "this", "->", "children", ")", ")", "{", "throw", "new", "FileExistsException", "(", "sprintf", ...
Adds child Node. @param Node $node @throws FileExistsException
[ "Adds", "child", "Node", "." ]
1254b67ca6bdaccd9f305b0e1aea81f790b3fa67
https://github.com/michael-donat/php-vfs/blob/1254b67ca6bdaccd9f305b0e1aea81f790b3fa67/src/VirtualFileSystem/Structure/Directory.php#L83-L91
226,460
michael-donat/php-vfs
src/VirtualFileSystem/Structure/Directory.php
Directory.childAt
public function childAt($path) { if (!array_key_exists($path, $this->children)) { throw new NotFoundException(sprintf('Could not find child %s in %s', $path, $this->path())); } return $this->children[$path]; }
php
public function childAt($path) { if (!array_key_exists($path, $this->children)) { throw new NotFoundException(sprintf('Could not find child %s in %s', $path, $this->path())); } return $this->children[$path]; }
[ "public", "function", "childAt", "(", "$", "path", ")", "{", "if", "(", "!", "array_key_exists", "(", "$", "path", ",", "$", "this", "->", "children", ")", ")", "{", "throw", "new", "NotFoundException", "(", "sprintf", "(", "'Could not find child %s in %s'",...
Returns child Node existing at path. @param string $path @return Node @throws \VirtualFileSystem\Exception\NotFoundException
[ "Returns", "child", "Node", "existing", "at", "path", "." ]
1254b67ca6bdaccd9f305b0e1aea81f790b3fa67
https://github.com/michael-donat/php-vfs/blob/1254b67ca6bdaccd9f305b0e1aea81f790b3fa67/src/VirtualFileSystem/Structure/Directory.php#L112-L119
226,461
datto/php-json-rpc-simple
src/Simple/Evaluator.php
Evaluator.evaluate
public function evaluate($method, $arguments = array()) { $callable = $this->mapper->getCallable($method); $arguments = $this->mapper->getArguments($callable, $arguments); return $this->execute($callable, $arguments); }
php
public function evaluate($method, $arguments = array()) { $callable = $this->mapper->getCallable($method); $arguments = $this->mapper->getArguments($callable, $arguments); return $this->execute($callable, $arguments); }
[ "public", "function", "evaluate", "(", "$", "method", ",", "$", "arguments", "=", "array", "(", ")", ")", "{", "$", "callable", "=", "$", "this", "->", "mapper", "->", "getCallable", "(", "$", "method", ")", ";", "$", "arguments", "=", "$", "this", ...
Map method name to callable and run it with the given arguments. @param string $method Method name @param array $arguments Positional or associative argument array @return mixed Return value of the callable
[ "Map", "method", "name", "to", "callable", "and", "run", "it", "with", "the", "given", "arguments", "." ]
40433a713279d1d075942a3802d763ef4ff527c5
https://github.com/datto/php-json-rpc-simple/blob/40433a713279d1d075942a3802d763ef4ff527c5/src/Simple/Evaluator.php#L39-L45
226,462
datto/php-json-rpc-simple
src/Simple/Evaluator.php
Evaluator.execute
private function execute($callable, $arguments) { try { return call_user_func_array($callable, $arguments); } catch (Exception $e) { if ($e instanceof JsonRpc\Exception) { throw $e; } else { // Send the original exception to the err...
php
private function execute($callable, $arguments) { try { return call_user_func_array($callable, $arguments); } catch (Exception $e) { if ($e instanceof JsonRpc\Exception) { throw $e; } else { // Send the original exception to the err...
[ "private", "function", "execute", "(", "$", "callable", ",", "$", "arguments", ")", "{", "try", "{", "return", "call_user_func_array", "(", "$", "callable", ",", "$", "arguments", ")", ";", "}", "catch", "(", "Exception", "$", "e", ")", "{", "if", "(",...
Executes the given callable with the arguments provided. If the callable throws an Exception, it is wrapped into a JsonRpc\Exception\Evaluation object if necessary. @param callable $callable A callable to be used to detect the argument names. @param array $arguments Array of arguments to be passed to the callable @re...
[ "Executes", "the", "given", "callable", "with", "the", "arguments", "provided", "." ]
40433a713279d1d075942a3802d763ef4ff527c5
https://github.com/datto/php-json-rpc-simple/blob/40433a713279d1d075942a3802d763ef4ff527c5/src/Simple/Evaluator.php#L58-L72
226,463
amranidev/ajaxis
src/Autoarray/AutoArray.php
AutoArray.arrayAnalyzer
private function arrayAnalyzer($input) { $result = []; foreach ($input as $key => $value) { if ($key == 'Field') { $result[] = $value; } elseif ($key == 'Type') { if (str_contains($value, 'int')) { $result[] = 'text'; ...
php
private function arrayAnalyzer($input) { $result = []; foreach ($input as $key => $value) { if ($key == 'Field') { $result[] = $value; } elseif ($key == 'Type') { if (str_contains($value, 'int')) { $result[] = 'text'; ...
[ "private", "function", "arrayAnalyzer", "(", "$", "input", ")", "{", "$", "result", "=", "[", "]", ";", "foreach", "(", "$", "input", "as", "$", "key", "=>", "$", "value", ")", "{", "if", "(", "$", "key", "==", "'Field'", ")", "{", "$", "result",...
arrayAnalyser . add specified types from attributes. @var array @return $result
[ "arrayAnalyser", ".", "add", "specified", "types", "from", "attributes", "." ]
0de3be2cc63cd953fb8a0efc44b6afc176f57ca4
https://github.com/amranidev/ajaxis/blob/0de3be2cc63cd953fb8a0efc44b6afc176f57ca4/src/Autoarray/AutoArray.php#L46-L64
226,464
amranidev/ajaxis
src/Autoarray/AutoArray.php
AutoArray.getResult
private function getResult() { $result = []; foreach ($this->attributes->getAttributes() as $key) { $result[] = $this->arrayAnalyzer($key); } return $result; }
php
private function getResult() { $result = []; foreach ($this->attributes->getAttributes() as $key) { $result[] = $this->arrayAnalyzer($key); } return $result; }
[ "private", "function", "getResult", "(", ")", "{", "$", "result", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "attributes", "->", "getAttributes", "(", ")", "as", "$", "key", ")", "{", "$", "result", "[", "]", "=", "$", "this", "->", "...
get result from attributes and arrayAnalyzer. @return $result
[ "get", "result", "from", "attributes", "and", "arrayAnalyzer", "." ]
0de3be2cc63cd953fb8a0efc44b6afc176f57ca4
https://github.com/amranidev/ajaxis/blob/0de3be2cc63cd953fb8a0efc44b6afc176f57ca4/src/Autoarray/AutoArray.php#L71-L79
226,465
amranidev/ajaxis
src/Autoarray/AutoArray.php
AutoArray.getModelArray
public function getModelArray(Model $model) { $result = []; foreach ($model->getAttributes() as $key => $value) { $result[] = ['type' => 'text', 'name' => $key, 'key' => $key.' :', 'value' => $value]; } unset($result[0]); return $result; }
php
public function getModelArray(Model $model) { $result = []; foreach ($model->getAttributes() as $key => $value) { $result[] = ['type' => 'text', 'name' => $key, 'key' => $key.' :', 'value' => $value]; } unset($result[0]); return $result; }
[ "public", "function", "getModelArray", "(", "Model", "$", "model", ")", "{", "$", "result", "=", "[", "]", ";", "foreach", "(", "$", "model", "->", "getAttributes", "(", ")", "as", "$", "key", "=>", "$", "value", ")", "{", "$", "result", "[", "]", ...
get simple array from Model. @param Model $model @return $result
[ "get", "simple", "array", "from", "Model", "." ]
0de3be2cc63cd953fb8a0efc44b6afc176f57ca4
https://github.com/amranidev/ajaxis/blob/0de3be2cc63cd953fb8a0efc44b6afc176f57ca4/src/Autoarray/AutoArray.php#L109-L118
226,466
joomla-framework/utilities
src/IpHelper.php
IpHelper.getIp
public static function getIp() { if (self::$ip === null) { $ip = self::detectAndCleanIP(); if (!empty($ip) && ($ip != '0.0.0.0') && \function_exists('inet_pton') && \function_exists('inet_ntop')) { $myIP = @inet_pton($ip); if ($myIP !== false) { $ip = inet_ntop($myIP); } } se...
php
public static function getIp() { if (self::$ip === null) { $ip = self::detectAndCleanIP(); if (!empty($ip) && ($ip != '0.0.0.0') && \function_exists('inet_pton') && \function_exists('inet_ntop')) { $myIP = @inet_pton($ip); if ($myIP !== false) { $ip = inet_ntop($myIP); } } se...
[ "public", "static", "function", "getIp", "(", ")", "{", "if", "(", "self", "::", "$", "ip", "===", "null", ")", "{", "$", "ip", "=", "self", "::", "detectAndCleanIP", "(", ")", ";", "if", "(", "!", "empty", "(", "$", "ip", ")", "&&", "(", "$", ...
Get the current visitor's IP address @return string @since 1.6.0
[ "Get", "the", "current", "visitor", "s", "IP", "address" ]
4bdfd63d4d411ba1d986bf3e655e7465c25e4833
https://github.com/joomla-framework/utilities/blob/4bdfd63d4d411ba1d986bf3e655e7465c25e4833/src/IpHelper.php#L53-L73
226,467
joomla-framework/utilities
src/IpHelper.php
IpHelper.workaroundIPIssues
public static function workaroundIPIssues() { $ip = self::getIp(); if ($_SERVER['REMOTE_ADDR'] === $ip) { return; } if (array_key_exists('REMOTE_ADDR', $_SERVER)) { $_SERVER['JOOMLA_REMOTE_ADDR'] = $_SERVER['REMOTE_ADDR']; } elseif (\function_exists('getenv')) { if (getenv('REMOTE_ADDR')) ...
php
public static function workaroundIPIssues() { $ip = self::getIp(); if ($_SERVER['REMOTE_ADDR'] === $ip) { return; } if (array_key_exists('REMOTE_ADDR', $_SERVER)) { $_SERVER['JOOMLA_REMOTE_ADDR'] = $_SERVER['REMOTE_ADDR']; } elseif (\function_exists('getenv')) { if (getenv('REMOTE_ADDR')) ...
[ "public", "static", "function", "workaroundIPIssues", "(", ")", "{", "$", "ip", "=", "self", "::", "getIp", "(", ")", ";", "if", "(", "$", "_SERVER", "[", "'REMOTE_ADDR'", "]", "===", "$", "ip", ")", "{", "return", ";", "}", "if", "(", "array_key_exi...
Works around the REMOTE_ADDR not containing the user's IP @return void @since 1.6.0
[ "Works", "around", "the", "REMOTE_ADDR", "not", "containing", "the", "user", "s", "IP" ]
4bdfd63d4d411ba1d986bf3e655e7465c25e4833
https://github.com/joomla-framework/utilities/blob/4bdfd63d4d411ba1d986bf3e655e7465c25e4833/src/IpHelper.php#L386-L408
226,468
joomla-framework/utilities
src/IpHelper.php
IpHelper.detectAndCleanIP
protected static function detectAndCleanIP() { $ip = self::detectIP(); if (strstr($ip, ',') !== false || strstr($ip, ' ') !== false) { $ip = str_replace(' ', ',', $ip); $ip = str_replace(',,', ',', $ip); $ips = explode(',', $ip); $ip = ''; while (empty($ip) && !empty($ips)) { $ip = arr...
php
protected static function detectAndCleanIP() { $ip = self::detectIP(); if (strstr($ip, ',') !== false || strstr($ip, ' ') !== false) { $ip = str_replace(' ', ',', $ip); $ip = str_replace(',,', ',', $ip); $ips = explode(',', $ip); $ip = ''; while (empty($ip) && !empty($ips)) { $ip = arr...
[ "protected", "static", "function", "detectAndCleanIP", "(", ")", "{", "$", "ip", "=", "self", "::", "detectIP", "(", ")", ";", "if", "(", "strstr", "(", "$", "ip", ",", "','", ")", "!==", "false", "||", "strstr", "(", "$", "ip", ",", "' '", ")", ...
Gets the visitor's IP address. Automatically handles reverse proxies reporting the IPs of intermediate devices, like load balancers. Examples: - https://www.akeebabackup.com/support/admin-tools/13743-double-ip-adresses-in-security-exception-log-warnings.html - https://stackoverflow.com/questions/2422395/why-is-reques...
[ "Gets", "the", "visitor", "s", "IP", "address", "." ]
4bdfd63d4d411ba1d986bf3e655e7465c25e4833
https://github.com/joomla-framework/utilities/blob/4bdfd63d4d411ba1d986bf3e655e7465c25e4833/src/IpHelper.php#L438-L461
226,469
joomla-framework/utilities
src/IpHelper.php
IpHelper.detectIP
protected static function detectIP() { // Normally the $_SERVER superglobal is set if (isset($_SERVER)) { // Do we have an x-forwarded-for HTTP header (e.g. NginX)? if (self::$allowIpOverrides && array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER)) { return $_SERVER['HTTP_X_FORWARDED_FOR']; } ...
php
protected static function detectIP() { // Normally the $_SERVER superglobal is set if (isset($_SERVER)) { // Do we have an x-forwarded-for HTTP header (e.g. NginX)? if (self::$allowIpOverrides && array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER)) { return $_SERVER['HTTP_X_FORWARDED_FOR']; } ...
[ "protected", "static", "function", "detectIP", "(", ")", "{", "// Normally the $_SERVER superglobal is set", "if", "(", "isset", "(", "$", "_SERVER", ")", ")", "{", "// Do we have an x-forwarded-for HTTP header (e.g. NginX)?", "if", "(", "self", "::", "$", "allowIpOverr...
Gets the visitor's IP address @return string @since 1.6.0
[ "Gets", "the", "visitor", "s", "IP", "address" ]
4bdfd63d4d411ba1d986bf3e655e7465c25e4833
https://github.com/joomla-framework/utilities/blob/4bdfd63d4d411ba1d986bf3e655e7465c25e4833/src/IpHelper.php#L470-L520
226,470
joomla-framework/utilities
src/IpHelper.php
IpHelper.inetToBits
protected static function inetToBits($inet) { if (\strlen($inet) == 4) { $unpacked = unpack('A4', $inet); } else { $unpacked = unpack('A16', $inet); } $unpacked = str_split($unpacked[1]); $binaryip = ''; foreach ($unpacked as $char) { $binaryip .= str_pad(decbin(\ord($char)), 8, '0', STR...
php
protected static function inetToBits($inet) { if (\strlen($inet) == 4) { $unpacked = unpack('A4', $inet); } else { $unpacked = unpack('A16', $inet); } $unpacked = str_split($unpacked[1]); $binaryip = ''; foreach ($unpacked as $char) { $binaryip .= str_pad(decbin(\ord($char)), 8, '0', STR...
[ "protected", "static", "function", "inetToBits", "(", "$", "inet", ")", "{", "if", "(", "\\", "strlen", "(", "$", "inet", ")", "==", "4", ")", "{", "$", "unpacked", "=", "unpack", "(", "'A4'", ",", "$", "inet", ")", ";", "}", "else", "{", "$", ...
Converts inet_pton output to bits string @param string $inet The in_addr representation of an IPv4 or IPv6 address @return string @since 1.6.0
[ "Converts", "inet_pton", "output", "to", "bits", "string" ]
4bdfd63d4d411ba1d986bf3e655e7465c25e4833
https://github.com/joomla-framework/utilities/blob/4bdfd63d4d411ba1d986bf3e655e7465c25e4833/src/IpHelper.php#L531-L551
226,471
amranidev/ajaxis
src/AjaxisGenerate.php
AjaxisGenerate.mtEditFormModal
public function mtEditFormModal($input, $link, $title) { $modal = $this->modalDirector->build($title, 'update', $input, $link, $this->MtModal); return $modal->modalHead.$modal->modalBody.$modal->modalFooter; }
php
public function mtEditFormModal($input, $link, $title) { $modal = $this->modalDirector->build($title, 'update', $input, $link, $this->MtModal); return $modal->modalHead.$modal->modalBody.$modal->modalFooter; }
[ "public", "function", "mtEditFormModal", "(", "$", "input", ",", "$", "link", ",", "$", "title", ")", "{", "$", "modal", "=", "$", "this", "->", "modalDirector", "->", "build", "(", "$", "title", ",", "'update'", ",", "$", "input", ",", "$", "link", ...
Show Ajaxis materialize form to edit specified resource. @param array $input @param string $link @return string
[ "Show", "Ajaxis", "materialize", "form", "to", "edit", "specified", "resource", "." ]
0de3be2cc63cd953fb8a0efc44b6afc176f57ca4
https://github.com/amranidev/ajaxis/blob/0de3be2cc63cd953fb8a0efc44b6afc176f57ca4/src/AjaxisGenerate.php#L65-L70
226,472
amranidev/ajaxis
src/AjaxisGenerate.php
AjaxisGenerate.mtDeleting
public function mtDeleting($title, $message, $link) { $modal = new MaterializeDeleteConfirmationMessage(); $modal = $this->modalDirector->build($title, 'Delete', $message, $link, $modal); return $modal->modalHead.$modal->modalBody.$modal->modalFooter; }
php
public function mtDeleting($title, $message, $link) { $modal = new MaterializeDeleteConfirmationMessage(); $modal = $this->modalDirector->build($title, 'Delete', $message, $link, $modal); return $modal->modalHead.$modal->modalBody.$modal->modalFooter; }
[ "public", "function", "mtDeleting", "(", "$", "title", ",", "$", "message", ",", "$", "link", ")", "{", "$", "modal", "=", "new", "MaterializeDeleteConfirmationMessage", "(", ")", ";", "$", "modal", "=", "$", "this", "->", "modalDirector", "->", "build", ...
Show materialize confirmation message to delete specified resource. @param string $title @param string $message @param string $link @return string
[ "Show", "materialize", "confirmation", "message", "to", "delete", "specified", "resource", "." ]
0de3be2cc63cd953fb8a0efc44b6afc176f57ca4
https://github.com/amranidev/ajaxis/blob/0de3be2cc63cd953fb8a0efc44b6afc176f57ca4/src/AjaxisGenerate.php#L96-L103
226,473
amranidev/ajaxis
src/AjaxisGenerate.php
AjaxisGenerate.mtDisplay
public function mtDisplay($input) { $modal = new MaterializeDisplayBuilder(); $modal = $this->modalDirector->build(null, null, $input, null, $modal); return $modal->modalHead.$modal->modalBody.$modal->modalFooter; }
php
public function mtDisplay($input) { $modal = new MaterializeDisplayBuilder(); $modal = $this->modalDirector->build(null, null, $input, null, $modal); return $modal->modalHead.$modal->modalBody.$modal->modalFooter; }
[ "public", "function", "mtDisplay", "(", "$", "input", ")", "{", "$", "modal", "=", "new", "MaterializeDisplayBuilder", "(", ")", ";", "$", "modal", "=", "$", "this", "->", "modalDirector", "->", "build", "(", "null", ",", "null", ",", "$", "input", ","...
Show materialize modal to displa specified resource. @param array $input @return string
[ "Show", "materialize", "modal", "to", "displa", "specified", "resource", "." ]
0de3be2cc63cd953fb8a0efc44b6afc176f57ca4
https://github.com/amranidev/ajaxis/blob/0de3be2cc63cd953fb8a0efc44b6afc176f57ca4/src/AjaxisGenerate.php#L112-L119
226,474
amranidev/ajaxis
src/AjaxisGenerate.php
AjaxisGenerate.btDeleting
public function btDeleting($title, $body, $link) { $modal = new BootstrapDeleteConfirmationMessage(); $modal = $this->modalDirector->build($title, 'Agree', $body, $link, $modal); return $modal->modalHead.$modal->modalBody.$modal->modalFooter; }
php
public function btDeleting($title, $body, $link) { $modal = new BootstrapDeleteConfirmationMessage(); $modal = $this->modalDirector->build($title, 'Agree', $body, $link, $modal); return $modal->modalHead.$modal->modalBody.$modal->modalFooter; }
[ "public", "function", "btDeleting", "(", "$", "title", ",", "$", "body", ",", "$", "link", ")", "{", "$", "modal", "=", "new", "BootstrapDeleteConfirmationMessage", "(", ")", ";", "$", "modal", "=", "$", "this", "->", "modalDirector", "->", "build", "(",...
Show bootsrap modal to delete specified resource. @param string $title @param string $body @param string $link @return string
[ "Show", "bootsrap", "modal", "to", "delete", "specified", "resource", "." ]
0de3be2cc63cd953fb8a0efc44b6afc176f57ca4
https://github.com/amranidev/ajaxis/blob/0de3be2cc63cd953fb8a0efc44b6afc176f57ca4/src/AjaxisGenerate.php#L130-L137
226,475
amranidev/ajaxis
src/AjaxisGenerate.php
AjaxisGenerate.btCreateFormModal
public function btCreateFormModal($input, $link, $title) { $modal = $this->modalDirector->build($title, 'Create', $input, $link, $this->BtModal); return $modal->modalHead.$modal->modalBody.$modal->modalFooter; }
php
public function btCreateFormModal($input, $link, $title) { $modal = $this->modalDirector->build($title, 'Create', $input, $link, $this->BtModal); return $modal->modalHead.$modal->modalBody.$modal->modalFooter; }
[ "public", "function", "btCreateFormModal", "(", "$", "input", ",", "$", "link", ",", "$", "title", ")", "{", "$", "modal", "=", "$", "this", "->", "modalDirector", "->", "build", "(", "$", "title", ",", "'Create'", ",", "$", "input", ",", "$", "link"...
Show Ajaxis bootstrap form to create specified resource. @param array $input @param string $link @return string
[ "Show", "Ajaxis", "bootstrap", "form", "to", "create", "specified", "resource", "." ]
0de3be2cc63cd953fb8a0efc44b6afc176f57ca4
https://github.com/amranidev/ajaxis/blob/0de3be2cc63cd953fb8a0efc44b6afc176f57ca4/src/AjaxisGenerate.php#L147-L152
226,476
amranidev/ajaxis
src/AjaxisGenerate.php
AjaxisGenerate.btDisplay
public function btDisplay($input) { $modal = new BootstrapDisplayBuilder(); $modal = $this->modalDirector->build('Dsiplay', 'ok', $input, null, $modal); return $modal->modalHead.$modal->modalBody.$modal->modalFooter; }
php
public function btDisplay($input) { $modal = new BootstrapDisplayBuilder(); $modal = $this->modalDirector->build('Dsiplay', 'ok', $input, null, $modal); return $modal->modalHead.$modal->modalBody.$modal->modalFooter; }
[ "public", "function", "btDisplay", "(", "$", "input", ")", "{", "$", "modal", "=", "new", "BootstrapDisplayBuilder", "(", ")", ";", "$", "modal", "=", "$", "this", "->", "modalDirector", "->", "build", "(", "'Dsiplay'", ",", "'ok'", ",", "$", "input", ...
Show bootstrap modal to display specified resource. @param array $input @return string
[ "Show", "bootstrap", "modal", "to", "display", "specified", "resource", "." ]
0de3be2cc63cd953fb8a0efc44b6afc176f57ca4
https://github.com/amranidev/ajaxis/blob/0de3be2cc63cd953fb8a0efc44b6afc176f57ca4/src/AjaxisGenerate.php#L176-L183
226,477
amranidev/ajaxis
src/AjaxisGenerate.php
AjaxisGenerate.mtGet
public function mtGet($table, $link, $title) { $result = new AutoArray($table); $modal = $this->modalDirector->build($title, 'Create', $result->merge(), $link, $this->MtModal); return $modal->modalHead.$modal->modalBody.$modal->modalFooter; }
php
public function mtGet($table, $link, $title) { $result = new AutoArray($table); $modal = $this->modalDirector->build($title, 'Create', $result->merge(), $link, $this->MtModal); return $modal->modalHead.$modal->modalBody.$modal->modalFooter; }
[ "public", "function", "mtGet", "(", "$", "table", ",", "$", "link", ",", "$", "title", ")", "{", "$", "result", "=", "new", "AutoArray", "(", "$", "table", ")", ";", "$", "modal", "=", "$", "this", "->", "modalDirector", "->", "build", "(", "$", ...
build Materialize modal quickly by a table name. @param string $table @param string $link @return string
[ "build", "Materialize", "modal", "quickly", "by", "a", "table", "name", "." ]
0de3be2cc63cd953fb8a0efc44b6afc176f57ca4
https://github.com/amranidev/ajaxis/blob/0de3be2cc63cd953fb8a0efc44b6afc176f57ca4/src/AjaxisGenerate.php#L193-L200
226,478
amranidev/ajaxis
src/AjaxisGenerate.php
AjaxisGenerate.btGet
public function btGet($table, $link, $title) { $result = new AutoArray($table); $modal = $this->modalDirector->build($title, 'Create', $result->merge(), $link, $this->BtModal); return $modal->modalHead.$modal->modalBody.$modal->modalFooter; }
php
public function btGet($table, $link, $title) { $result = new AutoArray($table); $modal = $this->modalDirector->build($title, 'Create', $result->merge(), $link, $this->BtModal); return $modal->modalHead.$modal->modalBody.$modal->modalFooter; }
[ "public", "function", "btGet", "(", "$", "table", ",", "$", "link", ",", "$", "title", ")", "{", "$", "result", "=", "new", "AutoArray", "(", "$", "table", ")", ";", "$", "modal", "=", "$", "this", "->", "modalDirector", "->", "build", "(", "$", ...
build Bootstrap modal quickly by a table name. @param string $table @param string $link @return string
[ "build", "Bootstrap", "modal", "quickly", "by", "a", "table", "name", "." ]
0de3be2cc63cd953fb8a0efc44b6afc176f57ca4
https://github.com/amranidev/ajaxis/blob/0de3be2cc63cd953fb8a0efc44b6afc176f57ca4/src/AjaxisGenerate.php#L227-L234
226,479
amranidev/ajaxis
src/AjaxisGenerate.php
AjaxisGenerate.btText
public function btText($input, $link) { $director = new ModalDirector(); $modal = new BootstrapText(); $modal = $director->build('Has Role', 'Ok', $input, $link, $modal); return $modal->modalHead.$modal->modalBody.$modal->modalFooter; }
php
public function btText($input, $link) { $director = new ModalDirector(); $modal = new BootstrapText(); $modal = $director->build('Has Role', 'Ok', $input, $link, $modal); return $modal->modalHead.$modal->modalBody.$modal->modalFooter; }
[ "public", "function", "btText", "(", "$", "input", ",", "$", "link", ")", "{", "$", "director", "=", "new", "ModalDirector", "(", ")", ";", "$", "modal", "=", "new", "BootstrapText", "(", ")", ";", "$", "modal", "=", "$", "director", "->", "build", ...
build simple modal with text. @param string $input @param string $link @return string
[ "build", "simple", "modal", "with", "text", "." ]
0de3be2cc63cd953fb8a0efc44b6afc176f57ca4
https://github.com/amranidev/ajaxis/blob/0de3be2cc63cd953fb8a0efc44b6afc176f57ca4/src/AjaxisGenerate.php#L261-L270
226,480
voryx/RxThruwayClient
src/Client.php
Client.progressiveCall
public function progressiveCall(string $uri, array $args = [], array $argskw = [], array $options = null): Observable { $options['receive_progress'] = true; return Observable::defer(function () use ($uri, $args, $argskw, $options) { $completed = new Subject(); return $this-...
php
public function progressiveCall(string $uri, array $args = [], array $argskw = [], array $options = null): Observable { $options['receive_progress'] = true; return Observable::defer(function () use ($uri, $args, $argskw, $options) { $completed = new Subject(); return $this-...
[ "public", "function", "progressiveCall", "(", "string", "$", "uri", ",", "array", "$", "args", "=", "[", "]", ",", "array", "$", "argskw", "=", "[", "]", ",", "array", "$", "options", "=", "null", ")", ":", "Observable", "{", "$", "options", "[", "...
This is a variant of call, that expects the far end to emit more than one result. It will also repeat the call, if the websocket connection resets and the observable has not completed or errored. @param string $uri @param array $args @param array $argskw @param array $options @return Observable
[ "This", "is", "a", "variant", "of", "call", "that", "expects", "the", "far", "end", "to", "emit", "more", "than", "one", "result", ".", "It", "will", "also", "repeat", "the", "call", "if", "the", "websocket", "connection", "resets", "and", "the", "observ...
043d3b125a8448deecb36668be95b623134bec4b
https://github.com/voryx/RxThruwayClient/blob/043d3b125a8448deecb36668be95b623134bec4b/src/Client.php#L131-L148
226,481
yansongda/supports
src/Arr.php
Arr.sort
public static function sort($array, Closure $callback) { $results = []; foreach ($array as $key => $value) { $results[$key] = $callback($value); } return $results; }
php
public static function sort($array, Closure $callback) { $results = []; foreach ($array as $key => $value) { $results[$key] = $callback($value); } return $results; }
[ "public", "static", "function", "sort", "(", "$", "array", ",", "Closure", "$", "callback", ")", "{", "$", "results", "=", "[", "]", ";", "foreach", "(", "$", "array", "as", "$", "key", "=>", "$", "value", ")", "{", "$", "results", "[", "$", "key...
Sort the array using the given Closure. @param array $array @param \Closure $callback @return array
[ "Sort", "the", "array", "using", "the", "given", "Closure", "." ]
3e8ba6dc757352da52cb73fa1c577eceb80dcd7a
https://github.com/yansongda/supports/blob/3e8ba6dc757352da52cb73fa1c577eceb80dcd7a/src/Arr.php#L333-L342
226,482
phrest/api
src/Controllers/RESTController.php
RESTController.respondWithModel
protected function respondWithModel(Model $model, $functionName = null) { // Return a partial response if ($functionName && isset($this->partialFields)) { // Validate that there are fields set for this method if (!isset($this->allowedPartialFields[$functionName])) { throw new Exc...
php
protected function respondWithModel(Model $model, $functionName = null) { // Return a partial response if ($functionName && isset($this->partialFields)) { // Validate that there are fields set for this method if (!isset($this->allowedPartialFields[$functionName])) { throw new Exc...
[ "protected", "function", "respondWithModel", "(", "Model", "$", "model", ",", "$", "functionName", "=", "null", ")", "{", "// Return a partial response", "if", "(", "$", "functionName", "&&", "isset", "(", "$", "this", "->", "partialFields", ")", ")", "{", "...
Respond with a single model, pass function name
[ "Respond", "with", "a", "single", "model", "pass", "function", "name" ]
271d604f332cbd3ef0dc8593ea0904fee0a42a84
https://github.com/phrest/api/blob/271d604f332cbd3ef0dc8593ea0904fee0a42a84/src/Controllers/RESTController.php#L353-L404
226,483
phrest/api
src/Controllers/RESTController.php
RESTController.respondWithModels
protected function respondWithModels(ResultsetInterface $models) { if (count($models) == 0) { $this->response->data = []; } else { foreach ($models as $model) { $this->response->data[] = (object)$model->toArray(); } $this->response->getMeta()->count = count($...
php
protected function respondWithModels(ResultsetInterface $models) { if (count($models) == 0) { $this->response->data = []; } else { foreach ($models as $model) { $this->response->data[] = (object)$model->toArray(); } $this->response->getMeta()->count = count($...
[ "protected", "function", "respondWithModels", "(", "ResultsetInterface", "$", "models", ")", "{", "if", "(", "count", "(", "$", "models", ")", "==", "0", ")", "{", "$", "this", "->", "response", "->", "data", "=", "[", "]", ";", "}", "else", "{", "fo...
Respond with multiple models, a result set
[ "Respond", "with", "multiple", "models", "a", "result", "set" ]
271d604f332cbd3ef0dc8593ea0904fee0a42a84
https://github.com/phrest/api/blob/271d604f332cbd3ef0dc8593ea0904fee0a42a84/src/Controllers/RESTController.php#L409-L426
226,484
TCB13/SubStringy
src/SubStringyTrait.php
SubStringyTrait.substringAfterFirst
public function substringAfterFirst($separator) { if (($offset = $this->indexOf($separator)) === false) { return false; } return static::create(mb_substr($this->str, $offset + mb_strlen($separator, $this->encoding), null, $this->encoding), $this->encoding); }
php
public function substringAfterFirst($separator) { if (($offset = $this->indexOf($separator)) === false) { return false; } return static::create(mb_substr($this->str, $offset + mb_strlen($separator, $this->encoding), null, $this->encoding), $this->encoding); }
[ "public", "function", "substringAfterFirst", "(", "$", "separator", ")", "{", "if", "(", "(", "$", "offset", "=", "$", "this", "->", "indexOf", "(", "$", "separator", ")", ")", "===", "false", ")", "{", "return", "false", ";", "}", "return", "static", ...
Gets the substring after the first occurrence of a separator. If no match is found returns false. @param string $separator @return string|bool
[ "Gets", "the", "substring", "after", "the", "first", "occurrence", "of", "a", "separator", ".", "If", "no", "match", "is", "found", "returns", "false", "." ]
ddf4ea3e13b1c96446ef2c71950882b06121ab66
https://github.com/TCB13/SubStringy/blob/ddf4ea3e13b1c96446ef2c71950882b06121ab66/src/SubStringyTrait.php#L20-L27
226,485
TCB13/SubStringy
src/SubStringyTrait.php
SubStringyTrait.substringAfterLast
public function substringAfterLast($separator) { if (($offset = $this->indexOfLast($separator)) === false) { return false; } return static::create(mb_substr($this->str, $offset + mb_strlen($separator, $this->encoding), null, $this->encoding), $this->encoding); }
php
public function substringAfterLast($separator) { if (($offset = $this->indexOfLast($separator)) === false) { return false; } return static::create(mb_substr($this->str, $offset + mb_strlen($separator, $this->encoding), null, $this->encoding), $this->encoding); }
[ "public", "function", "substringAfterLast", "(", "$", "separator", ")", "{", "if", "(", "(", "$", "offset", "=", "$", "this", "->", "indexOfLast", "(", "$", "separator", ")", ")", "===", "false", ")", "{", "return", "false", ";", "}", "return", "static...
Gets the substring after the last occurrence of a separator. If no match is found returns false. @param string $separator @return string|bool
[ "Gets", "the", "substring", "after", "the", "last", "occurrence", "of", "a", "separator", ".", "If", "no", "match", "is", "found", "returns", "false", "." ]
ddf4ea3e13b1c96446ef2c71950882b06121ab66
https://github.com/TCB13/SubStringy/blob/ddf4ea3e13b1c96446ef2c71950882b06121ab66/src/SubStringyTrait.php#L37-L44
226,486
TCB13/SubStringy
src/SubStringyTrait.php
SubStringyTrait.substringBeforeFirst
public function substringBeforeFirst($separator) { if (($offset = $this->indexOf($separator)) === false) { return false; } return static::create(mb_substr($this->str, 0, $offset, $this->encoding), $this->encoding); }
php
public function substringBeforeFirst($separator) { if (($offset = $this->indexOf($separator)) === false) { return false; } return static::create(mb_substr($this->str, 0, $offset, $this->encoding), $this->encoding); }
[ "public", "function", "substringBeforeFirst", "(", "$", "separator", ")", "{", "if", "(", "(", "$", "offset", "=", "$", "this", "->", "indexOf", "(", "$", "separator", ")", ")", "===", "false", ")", "{", "return", "false", ";", "}", "return", "static",...
Gets the substring before the first occurrence of a separator. If no match is found returns false. @param string $separator @return string|bool
[ "Gets", "the", "substring", "before", "the", "first", "occurrence", "of", "a", "separator", ".", "If", "no", "match", "is", "found", "returns", "false", "." ]
ddf4ea3e13b1c96446ef2c71950882b06121ab66
https://github.com/TCB13/SubStringy/blob/ddf4ea3e13b1c96446ef2c71950882b06121ab66/src/SubStringyTrait.php#L54-L61
226,487
TCB13/SubStringy
src/SubStringyTrait.php
SubStringyTrait.substringBeforeLast
public function substringBeforeLast($separator) { if (($offset = $this->indexOfLast($separator)) === false) { return false; } return static::create(mb_substr($this->str, 0, $offset, $this->encoding), $this->encoding); }
php
public function substringBeforeLast($separator) { if (($offset = $this->indexOfLast($separator)) === false) { return false; } return static::create(mb_substr($this->str, 0, $offset, $this->encoding), $this->encoding); }
[ "public", "function", "substringBeforeLast", "(", "$", "separator", ")", "{", "if", "(", "(", "$", "offset", "=", "$", "this", "->", "indexOfLast", "(", "$", "separator", ")", ")", "===", "false", ")", "{", "return", "false", ";", "}", "return", "stati...
Gets the substring before the last occurrence of a separator. If no match is found returns false. @param string $separator @return string|bool
[ "Gets", "the", "substring", "before", "the", "last", "occurrence", "of", "a", "separator", ".", "If", "no", "match", "is", "found", "returns", "false", "." ]
ddf4ea3e13b1c96446ef2c71950882b06121ab66
https://github.com/TCB13/SubStringy/blob/ddf4ea3e13b1c96446ef2c71950882b06121ab66/src/SubStringyTrait.php#L71-L78
226,488
TCB13/SubStringy
src/SubStringyTrait.php
SubStringyTrait.substringBetween
public function substringBetween($start, $end) { $ini = mb_stripos($this->str, $start, 0, $this->encoding); if ($ini === 0) { return ""; } $ini += mb_strlen($start, $this->encoding); $len = mb_stripos($this->str, $end, $ini, $this->encoding) - $ini; ret...
php
public function substringBetween($start, $end) { $ini = mb_stripos($this->str, $start, 0, $this->encoding); if ($ini === 0) { return ""; } $ini += mb_strlen($start, $this->encoding); $len = mb_stripos($this->str, $end, $ini, $this->encoding) - $ini; ret...
[ "public", "function", "substringBetween", "(", "$", "start", ",", "$", "end", ")", "{", "$", "ini", "=", "mb_stripos", "(", "$", "this", "->", "str", ",", "$", "start", ",", "0", ",", "$", "this", "->", "encoding", ")", ";", "if", "(", "$", "ini"...
Extracts a string from between two substrings present on the current string @param string $start @param string $end @return string
[ "Extracts", "a", "string", "from", "between", "two", "substrings", "present", "on", "the", "current", "string" ]
ddf4ea3e13b1c96446ef2c71950882b06121ab66
https://github.com/TCB13/SubStringy/blob/ddf4ea3e13b1c96446ef2c71950882b06121ab66/src/SubStringyTrait.php#L88-L100
226,489
Solution10/calendar
src/Month.php
Month.year
public function year() { if (!isset($this->year)) { $this->year = new Year($this->startDateTime->format('Y')); } return $this->year; }
php
public function year() { if (!isset($this->year)) { $this->year = new Year($this->startDateTime->format('Y')); } return $this->year; }
[ "public", "function", "year", "(", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "year", ")", ")", "{", "$", "this", "->", "year", "=", "new", "Year", "(", "$", "this", "->", "startDateTime", "->", "format", "(", "'Y'", ")", ")", "...
Returns a year object for this month @return Year
[ "Returns", "a", "year", "object", "for", "this", "month" ]
fa0d8e09627693a7b0fe0e6b69cab997bab919e8
https://github.com/Solution10/calendar/blob/fa0d8e09627693a7b0fe0e6b69cab997bab919e8/src/Month.php#L100-L106
226,490
Solution10/calendar
src/Month.php
Month.weeks
public function weeks($startDay = 'Monday') { if (!isset($this->weeks[$startDay])) { $this->weeks[$startDay] = array(); $keepWeeking = true; $weekPoint = clone $this->firstDay(); while ($keepWeeking) { $candidateWeek = new Week($weekPoint, $st...
php
public function weeks($startDay = 'Monday') { if (!isset($this->weeks[$startDay])) { $this->weeks[$startDay] = array(); $keepWeeking = true; $weekPoint = clone $this->firstDay(); while ($keepWeeking) { $candidateWeek = new Week($weekPoint, $st...
[ "public", "function", "weeks", "(", "$", "startDay", "=", "'Monday'", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "weeks", "[", "$", "startDay", "]", ")", ")", "{", "$", "this", "->", "weeks", "[", "$", "startDay", "]", "=", "array...
Returns the weeks associated with this month. Not all of these weeks might start and end in this month, but they all contain days from this month. @param string $startDay The day that weeks start on. @return Week[]
[ "Returns", "the", "weeks", "associated", "with", "this", "month", ".", "Not", "all", "of", "these", "weeks", "might", "start", "and", "end", "in", "this", "month", "but", "they", "all", "contain", "days", "from", "this", "month", "." ]
fa0d8e09627693a7b0fe0e6b69cab997bab919e8
https://github.com/Solution10/calendar/blob/fa0d8e09627693a7b0fe0e6b69cab997bab919e8/src/Month.php#L143-L162
226,491
michael-donat/php-vfs
src/VirtualFileSystem/FileSystem.php
FileSystem.registerContextOptions
protected function registerContextOptions(Container $container) { $defaultOptions = stream_context_get_options(stream_context_get_default()); stream_context_set_default(array_merge( $defaultOptions, array($this->scheme => array('Container' => $container)) )); }
php
protected function registerContextOptions(Container $container) { $defaultOptions = stream_context_get_options(stream_context_get_default()); stream_context_set_default(array_merge( $defaultOptions, array($this->scheme => array('Container' => $container)) )); }
[ "protected", "function", "registerContextOptions", "(", "Container", "$", "container", ")", "{", "$", "defaultOptions", "=", "stream_context_get_options", "(", "stream_context_get_default", "(", ")", ")", ";", "stream_context_set_default", "(", "array_merge", "(", "$", ...
Registers Container object as default context option for scheme associated with FileSystem instance. @param Container $container
[ "Registers", "Container", "object", "as", "default", "context", "option", "for", "scheme", "associated", "with", "FileSystem", "instance", "." ]
1254b67ca6bdaccd9f305b0e1aea81f790b3fa67
https://github.com/michael-donat/php-vfs/blob/1254b67ca6bdaccd9f305b0e1aea81f790b3fa67/src/VirtualFileSystem/FileSystem.php#L68-L75
226,492
michael-donat/php-vfs
src/VirtualFileSystem/FileSystem.php
FileSystem.createDirectory
public function createDirectory($path, $recursive = false, $mode = null) { return $this->container()->createDir($path, $recursive, $mode); }
php
public function createDirectory($path, $recursive = false, $mode = null) { return $this->container()->createDir($path, $recursive, $mode); }
[ "public", "function", "createDirectory", "(", "$", "path", ",", "$", "recursive", "=", "false", ",", "$", "mode", "=", "null", ")", "{", "return", "$", "this", "->", "container", "(", ")", "->", "createDir", "(", "$", "path", ",", "$", "recursive", "...
Creates and returns a directory @param string $path @param bool $recursive @param integer|null $mode @return Directory
[ "Creates", "and", "returns", "a", "directory" ]
1254b67ca6bdaccd9f305b0e1aea81f790b3fa67
https://github.com/michael-donat/php-vfs/blob/1254b67ca6bdaccd9f305b0e1aea81f790b3fa67/src/VirtualFileSystem/FileSystem.php#L128-L131
226,493
welpdev/icalBundle
src/Factory/Factory.php
Factory.createCalendar
public function createCalendar() { $calendar = new Calendar(); if (!is_null($this->timezone)) { $calendar->setTimezone($this->timezone); } if (!is_null($this->prodid)) { $calendar->setProdId($this->prodid); } return $calendar; }
php
public function createCalendar() { $calendar = new Calendar(); if (!is_null($this->timezone)) { $calendar->setTimezone($this->timezone); } if (!is_null($this->prodid)) { $calendar->setProdId($this->prodid); } return $calendar; }
[ "public", "function", "createCalendar", "(", ")", "{", "$", "calendar", "=", "new", "Calendar", "(", ")", ";", "if", "(", "!", "is_null", "(", "$", "this", "->", "timezone", ")", ")", "{", "$", "calendar", "->", "setTimezone", "(", "$", "this", "->",...
Create new calendar @return Calendar
[ "Create", "new", "calendar" ]
b432375bb024e9245581e9775032f4d2b48e9966
https://github.com/welpdev/icalBundle/blob/b432375bb024e9245581e9775032f4d2b48e9966/src/Factory/Factory.php#L46-L59
226,494
joomla-framework/utilities
src/ArrayHelper.php
ArrayHelper.addColumn
public static function addColumn(array $array, array $column, $colName, $keyCol = null) { $result = array(); foreach ($array as $i => $item) { $value = null; if (!isset($keyCol)) { $value = static::getValue($column, $i); } else { // Convert object to array $subject = \is_object($i...
php
public static function addColumn(array $array, array $column, $colName, $keyCol = null) { $result = array(); foreach ($array as $i => $item) { $value = null; if (!isset($keyCol)) { $value = static::getValue($column, $i); } else { // Convert object to array $subject = \is_object($i...
[ "public", "static", "function", "addColumn", "(", "array", "$", "array", ",", "array", "$", "column", ",", "$", "colName", ",", "$", "keyCol", "=", "null", ")", "{", "$", "result", "=", "array", "(", ")", ";", "foreach", "(", "$", "array", "as", "$...
Adds a column to an array of arrays or objects @param array $array The source array @param array $column The array to be used as new column @param string $colName The index of the new column or name of the new object property @param string $keyCol The index of the column or name of object propert...
[ "Adds", "a", "column", "to", "an", "array", "of", "arrays", "or", "objects" ]
4bdfd63d4d411ba1d986bf3e655e7465c25e4833
https://github.com/joomla-framework/utilities/blob/4bdfd63d4d411ba1d986bf3e655e7465c25e4833/src/ArrayHelper.php#L210-L257
226,495
joomla-framework/utilities
src/ArrayHelper.php
ArrayHelper.dropColumn
public static function dropColumn(array $array, $colName) { $result = array(); foreach ($array as $i => $item) { if (\is_object($item) && isset($item->$colName)) { unset($item->$colName); } elseif (\is_array($item) && isset($item[$colName])) { unset($item[$colName]); } $result[$i] ...
php
public static function dropColumn(array $array, $colName) { $result = array(); foreach ($array as $i => $item) { if (\is_object($item) && isset($item->$colName)) { unset($item->$colName); } elseif (\is_array($item) && isset($item[$colName])) { unset($item[$colName]); } $result[$i] ...
[ "public", "static", "function", "dropColumn", "(", "array", "$", "array", ",", "$", "colName", ")", "{", "$", "result", "=", "array", "(", ")", ";", "foreach", "(", "$", "array", "as", "$", "i", "=>", "$", "item", ")", "{", "if", "(", "\\", "is_o...
Remove a column from an array of arrays or objects @param array $array The source array @param string $colName The index of the column or name of object property to be removed @return array Column of values from the source array @since 1.5.0 @see https://www.php.net/manual/en/language.types.array....
[ "Remove", "a", "column", "from", "an", "array", "of", "arrays", "or", "objects" ]
4bdfd63d4d411ba1d986bf3e655e7465c25e4833
https://github.com/joomla-framework/utilities/blob/4bdfd63d4d411ba1d986bf3e655e7465c25e4833/src/ArrayHelper.php#L270-L289
226,496
joomla-framework/utilities
src/ArrayHelper.php
ArrayHelper.invert
public static function invert(array $array) { $return = array(); foreach ($array as $base => $values) { if (!\is_array($values)) { continue; } foreach ($values as $key) { // If the key isn't scalar then ignore it. if (is_scalar($key)) { $return[$key] = $base; } } } ...
php
public static function invert(array $array) { $return = array(); foreach ($array as $base => $values) { if (!\is_array($values)) { continue; } foreach ($values as $key) { // If the key isn't scalar then ignore it. if (is_scalar($key)) { $return[$key] = $base; } } } ...
[ "public", "static", "function", "invert", "(", "array", "$", "array", ")", "{", "$", "return", "=", "array", "(", ")", ";", "foreach", "(", "$", "array", "as", "$", "base", "=>", "$", "values", ")", "{", "if", "(", "!", "\\", "is_array", "(", "$"...
Takes an associative array of arrays and inverts the array keys to values using the array values as keys. Example: $input = array( 'New' => array('1000', '1500', '1750'), 'Used' => array('3000', '4000', '5000', '6000') ); $output = ArrayHelper::invert($input); Output would be equal to: $output = array( '1000' => 'New...
[ "Takes", "an", "associative", "array", "of", "arrays", "and", "inverts", "the", "array", "keys", "to", "values", "using", "the", "array", "values", "as", "keys", "." ]
4bdfd63d4d411ba1d986bf3e655e7465c25e4833
https://github.com/joomla-framework/utilities/blob/4bdfd63d4d411ba1d986bf3e655e7465c25e4833/src/ArrayHelper.php#L467-L489
226,497
xinix-technology/bono
src/Bono/Controller/RestController.php
RestController.mapRoute
public function mapRoute() { $this->map('/null/create', 'create')->via('GET', 'POST'); $this->map('/:id/read', 'read')->via('GET'); $this->map('/:id/update', 'update')->via('GET', 'POST'); $this->map('/:id/delete', 'delete')->via('GET', 'POST'); $this->map('/', 'search')->vi...
php
public function mapRoute() { $this->map('/null/create', 'create')->via('GET', 'POST'); $this->map('/:id/read', 'read')->via('GET'); $this->map('/:id/update', 'update')->via('GET', 'POST'); $this->map('/:id/delete', 'delete')->via('GET', 'POST'); $this->map('/', 'search')->vi...
[ "public", "function", "mapRoute", "(", ")", "{", "$", "this", "->", "map", "(", "'/null/create'", ",", "'create'", ")", "->", "via", "(", "'GET'", ",", "'POST'", ")", ";", "$", "this", "->", "map", "(", "'/:id/read'", ",", "'read'", ")", "->", "via",...
Map routes to available method @return [type] [description]
[ "Map", "routes", "to", "available", "method" ]
86c89f702dee2ab010767236c2c40b50cdc39c6e
https://github.com/xinix-technology/bono/blob/86c89f702dee2ab010767236c2c40b50cdc39c6e/src/Bono/Controller/RestController.php#L79-L92
226,498
kevinkhill/FontAwesomePHP
src/FontAwesomeList.php
FontAwesomeList.li
public function li($iconOrLine, $liVal = null) { if (is_string($iconOrLine) === false && is_array($iconOrLine) === false) { throw new IncompleteListException( 'List items must be a string or array of strings.' ); } if (is_string($iconOrLine) && is_nul...
php
public function li($iconOrLine, $liVal = null) { if (is_string($iconOrLine) === false && is_array($iconOrLine) === false) { throw new IncompleteListException( 'List items must be a string or array of strings.' ); } if (is_string($iconOrLine) && is_nul...
[ "public", "function", "li", "(", "$", "iconOrLine", ",", "$", "liVal", "=", "null", ")", "{", "if", "(", "is_string", "(", "$", "iconOrLine", ")", "===", "false", "&&", "is_array", "(", "$", "iconOrLine", ")", "===", "false", ")", "{", "throw", "new"...
Adds items to unordered list If the first parameter is a string, and the second parameter is ommited, then a single item is added to the list, using the default icon. If the first parameter is a string, and the second is also a string, then the first is the icon for the item, and the second, the value of the item. I...
[ "Adds", "items", "to", "unordered", "list" ]
e7d12d7422b23a5c3a09715d9ca3e24ff811c073
https://github.com/kevinkhill/FontAwesomePHP/blob/e7d12d7422b23a5c3a09715d9ca3e24ff811c073/src/FontAwesomeList.php#L78-L97
226,499
kevinkhill/FontAwesomePHP
src/FontAwesomeList.php
FontAwesomeList.output
protected function output() { $listItems = ''; foreach ($this->lines as $li) { $icon = $this->buildIcon($li[0]); $listItems .= sprintf(self::LI_HTML, $icon, $li[1]); } return sprintf(self::UL_HTML, $listItems); }
php
protected function output() { $listItems = ''; foreach ($this->lines as $li) { $icon = $this->buildIcon($li[0]); $listItems .= sprintf(self::LI_HTML, $icon, $li[1]); } return sprintf(self::UL_HTML, $listItems); }
[ "protected", "function", "output", "(", ")", "{", "$", "listItems", "=", "''", ";", "foreach", "(", "$", "this", "->", "lines", "as", "$", "li", ")", "{", "$", "icon", "=", "$", "this", "->", "buildIcon", "(", "$", "li", "[", "0", "]", ")", ";"...
Outputs the FontAwesomeList object as an HTML string @return string @throws \Khill\FontAwesome\Exceptions\IncompleteListException
[ "Outputs", "the", "FontAwesomeList", "object", "as", "an", "HTML", "string" ]
e7d12d7422b23a5c3a09715d9ca3e24ff811c073
https://github.com/kevinkhill/FontAwesomePHP/blob/e7d12d7422b23a5c3a09715d9ca3e24ff811c073/src/FontAwesomeList.php#L105-L116