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
202,600
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/CategoryQuery.php
CategoryQuery.retrieveRoot
static public function retrieveRoot(ConnectionInterface $con = null) { $c = new Criteria(CategoryTableMap::DATABASE_NAME); $c->add(ChildCategory::LEFT_COL, 1, Criteria::EQUAL); return ChildCategoryQuery::create(null, $c)->findOne($con); }
php
static public function retrieveRoot(ConnectionInterface $con = null) { $c = new Criteria(CategoryTableMap::DATABASE_NAME); $c->add(ChildCategory::LEFT_COL, 1, Criteria::EQUAL); return ChildCategoryQuery::create(null, $c)->findOne($con); }
[ "static", "public", "function", "retrieveRoot", "(", "ConnectionInterface", "$", "con", "=", "null", ")", "{", "$", "c", "=", "new", "Criteria", "(", "CategoryTableMap", "::", "DATABASE_NAME", ")", ";", "$", "c", "->", "add", "(", "ChildCategory", "::", "L...
Returns the root node for a given scope @param ConnectionInterface $con Connection to use. @return ChildCategory Propel object for root node
[ "Returns", "the", "root", "node", "for", "a", "given", "scope" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/CategoryQuery.php#L1416-L1422
202,601
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/CategoryQuery.php
CategoryQuery.retrieveTree
static public function retrieveTree(Criteria $criteria = null, ConnectionInterface $con = null) { if (null === $criteria) { $criteria = new Criteria(CategoryTableMap::DATABASE_NAME); } $criteria->addAscendingOrderByColumn(ChildCategory::LEFT_COL); return ChildCategoryQue...
php
static public function retrieveTree(Criteria $criteria = null, ConnectionInterface $con = null) { if (null === $criteria) { $criteria = new Criteria(CategoryTableMap::DATABASE_NAME); } $criteria->addAscendingOrderByColumn(ChildCategory::LEFT_COL); return ChildCategoryQue...
[ "static", "public", "function", "retrieveTree", "(", "Criteria", "$", "criteria", "=", "null", ",", "ConnectionInterface", "$", "con", "=", "null", ")", "{", "if", "(", "null", "===", "$", "criteria", ")", "{", "$", "criteria", "=", "new", "Criteria", "(...
Returns the whole tree node for a given scope @param Criteria $criteria Optional Criteria to filter the query @param ConnectionInterface $con Connection to use. @return ChildCategory[]|ObjectCollection|mixed the list of results, formatted by the current formatter
[ "Returns", "the", "whole", "tree", "node", "for", "a", "given", "scope" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/CategoryQuery.php#L1431-L1439
202,602
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/CategoryQuery.php
CategoryQuery.isValid
static public function isValid(ChildCategory $node = null) { if (is_object($node) && $node->getRightValue() > $node->getLeftValue()) { return true; } else { return false; } }
php
static public function isValid(ChildCategory $node = null) { if (is_object($node) && $node->getRightValue() > $node->getLeftValue()) { return true; } else { return false; } }
[ "static", "public", "function", "isValid", "(", "ChildCategory", "$", "node", "=", "null", ")", "{", "if", "(", "is_object", "(", "$", "node", ")", "&&", "$", "node", "->", "getRightValue", "(", ")", ">", "$", "node", "->", "getLeftValue", "(", ")", ...
Tests if node is valid @param ChildCategory $node Propel object for src node @return bool
[ "Tests", "if", "node", "is", "valid" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/CategoryQuery.php#L1447-L1454
202,603
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/CategoryQuery.php
CategoryQuery.updateLoadedNodes
static public function updateLoadedNodes($prune = null, ConnectionInterface $con = null) { if (Propel::isInstancePoolingEnabled()) { $keys = array(); /** @var $obj ChildCategory */ foreach (CategoryTableMap::$instances as $obj) { if (!$prune || !$prune->eq...
php
static public function updateLoadedNodes($prune = null, ConnectionInterface $con = null) { if (Propel::isInstancePoolingEnabled()) { $keys = array(); /** @var $obj ChildCategory */ foreach (CategoryTableMap::$instances as $obj) { if (!$prune || !$prune->eq...
[ "static", "public", "function", "updateLoadedNodes", "(", "$", "prune", "=", "null", ",", "ConnectionInterface", "$", "con", "=", "null", ")", "{", "if", "(", "Propel", "::", "isInstancePoolingEnabled", "(", ")", ")", "{", "$", "keys", "=", "array", "(", ...
Reload all already loaded nodes to sync them with updated db @param ChildCategory $prune Object to prune from the update @param ConnectionInterface $con Connection to use.
[ "Reload", "all", "already", "loaded", "nodes", "to", "sync", "them", "with", "updated", "db" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/CategoryQuery.php#L1542-L1572
202,604
vukbgit/PHPCraft.Subject
src/Traits/Images.php
Images.resizeImage
protected function resizeImage($path, $width, $height) { $this->images->open('Gd',$path); $this->images->resize($width, $height); }
php
protected function resizeImage($path, $width, $height) { $this->images->open('Gd',$path); $this->images->resize($width, $height); }
[ "protected", "function", "resizeImage", "(", "$", "path", ",", "$", "width", ",", "$", "height", ")", "{", "$", "this", "->", "images", "->", "open", "(", "'Gd'", ",", "$", "path", ")", ";", "$", "this", "->", "images", "->", "resize", "(", "$", ...
resizes an image @param string $path @param int $width @param int $height
[ "resizes", "an", "image" ]
a43ad7868098ff1e7bda6819547ea64f9a853732
https://github.com/vukbgit/PHPCraft.Subject/blob/a43ad7868098ff1e7bda6819547ea64f9a853732/src/Traits/Images.php#L51-L55
202,605
titledk/silverstripe-identity
code/Identity.php
Identity.get_colors
public static function get_colors($type = 'hex') { $cached = self::$colorsCached; if (isset($cached[$type])) return $cached[$type]; $colors = Config::inst()->get('Identity', 'colors'); if ($type == 'rgb') { $rgbColors = []; foreach ($colors as $name => $c) { ...
php
public static function get_colors($type = 'hex') { $cached = self::$colorsCached; if (isset($cached[$type])) return $cached[$type]; $colors = Config::inst()->get('Identity', 'colors'); if ($type == 'rgb') { $rgbColors = []; foreach ($colors as $name => $c) { ...
[ "public", "static", "function", "get_colors", "(", "$", "type", "=", "'hex'", ")", "{", "$", "cached", "=", "self", "::", "$", "colorsCached", ";", "if", "(", "isset", "(", "$", "cached", "[", "$", "type", "]", ")", ")", "return", "$", "cached", "[...
Identify colors in either hex or rgb @param string $type @return array
[ "Identify", "colors", "in", "either", "hex", "or", "rgb" ]
27cf7edd6bdb2d220b718bafba6b2959243d23cf
https://github.com/titledk/silverstripe-identity/blob/27cf7edd6bdb2d220b718bafba6b2959243d23cf/code/Identity.php#L23-L38
202,606
titledk/silverstripe-identity
code/Identity.php
Identity.hex2rgb
public static function hex2rgb($hex) { $hex = str_replace("#", "", $hex); $r = hexdec(substr($hex,0,2)); $g = hexdec(substr($hex,2,2)); $b = hexdec(substr($hex,4,2)); return "$r,$g,$b"; }
php
public static function hex2rgb($hex) { $hex = str_replace("#", "", $hex); $r = hexdec(substr($hex,0,2)); $g = hexdec(substr($hex,2,2)); $b = hexdec(substr($hex,4,2)); return "$r,$g,$b"; }
[ "public", "static", "function", "hex2rgb", "(", "$", "hex", ")", "{", "$", "hex", "=", "str_replace", "(", "\"#\"", ",", "\"\"", ",", "$", "hex", ")", ";", "$", "r", "=", "hexdec", "(", "substr", "(", "$", "hex", ",", "0", ",", "2", ")", ")", ...
Helper for converting a color to rbg @param $hex @return string
[ "Helper", "for", "converting", "a", "color", "to", "rbg" ]
27cf7edd6bdb2d220b718bafba6b2959243d23cf
https://github.com/titledk/silverstripe-identity/blob/27cf7edd6bdb2d220b718bafba6b2959243d23cf/code/Identity.php#L45-L52
202,607
zarathustra323/modlr-data
src/Zarathustra/ModlrData/Resource/Collection.php
Collection.getResourceTypes
public function getResourceTypes() { $types = []; foreach ($this as $entity) { $types[] = $entity->getType(); } return array_unique($types); }
php
public function getResourceTypes() { $types = []; foreach ($this as $entity) { $types[] = $entity->getType(); } return array_unique($types); }
[ "public", "function", "getResourceTypes", "(", ")", "{", "$", "types", "=", "[", "]", ";", "foreach", "(", "$", "this", "as", "$", "entity", ")", "{", "$", "types", "[", "]", "=", "$", "entity", "->", "getType", "(", ")", ";", "}", "return", "arr...
Gets a unique list of all entity types assigned to this collection. @return array
[ "Gets", "a", "unique", "list", "of", "all", "entity", "types", "assigned", "to", "this", "collection", "." ]
7c2c767216055f75abf8cf22e2200f11998ed24e
https://github.com/zarathustra323/modlr-data/blob/7c2c767216055f75abf8cf22e2200f11998ed24e/src/Zarathustra/ModlrData/Resource/Collection.php#L45-L52
202,608
Nicofuma/phpbb-ext-webprofiler
phpbb/profiler/profiler_listener.php
profiler_listener.on_common
public function on_common() { if (substr($GLOBALS['request']->server('SCRIPT_NAME'), -7) === 'app.php') { return; } try { $this->request_stack->push($this->symfony_request); $this->dispatcher->dispatch(KernelEvents::REQUEST, new GetResponseEvent( $this->http_kernel, $this->request_stac...
php
public function on_common() { if (substr($GLOBALS['request']->server('SCRIPT_NAME'), -7) === 'app.php') { return; } try { $this->request_stack->push($this->symfony_request); $this->dispatcher->dispatch(KernelEvents::REQUEST, new GetResponseEvent( $this->http_kernel, $this->request_stac...
[ "public", "function", "on_common", "(", ")", "{", "if", "(", "substr", "(", "$", "GLOBALS", "[", "'request'", "]", "->", "server", "(", "'SCRIPT_NAME'", ")", ",", "-", "7", ")", "===", "'app.php'", ")", "{", "return", ";", "}", "try", "{", "$", "th...
Emulate the kernel request event
[ "Emulate", "the", "kernel", "request", "event" ]
5f52e2b67f5b8278af18907615f30ffe20f4802c
https://github.com/Nicofuma/phpbb-ext-webprofiler/blob/5f52e2b67f5b8278af18907615f30ffe20f4802c/phpbb/profiler/profiler_listener.php#L56-L76
202,609
Nicofuma/phpbb-ext-webprofiler
phpbb/profiler/profiler_listener.php
profiler_listener.on_garbage_collection
public function on_garbage_collection() { if (substr($GLOBALS['request']->server('SCRIPT_NAME'), -7) === 'app.php') { return; } // An Exception is throw because the TraceableEventDispatcher // stop all the events when KernelEvents::RESPONSE is trigger. // But because we are emulating the event through ...
php
public function on_garbage_collection() { if (substr($GLOBALS['request']->server('SCRIPT_NAME'), -7) === 'app.php') { return; } // An Exception is throw because the TraceableEventDispatcher // stop all the events when KernelEvents::RESPONSE is trigger. // But because we are emulating the event through ...
[ "public", "function", "on_garbage_collection", "(", ")", "{", "if", "(", "substr", "(", "$", "GLOBALS", "[", "'request'", "]", "->", "server", "(", "'SCRIPT_NAME'", ")", ",", "-", "7", ")", "===", "'app.php'", ")", "{", "return", ";", "}", "// An Excepti...
Emulate the kernel response event
[ "Emulate", "the", "kernel", "response", "event" ]
5f52e2b67f5b8278af18907615f30ffe20f4802c
https://github.com/Nicofuma/phpbb-ext-webprofiler/blob/5f52e2b67f5b8278af18907615f30ffe20f4802c/phpbb/profiler/profiler_listener.php#L81-L164
202,610
Nicofuma/phpbb-ext-webprofiler
phpbb/profiler/profiler_listener.php
profiler_listener.onKernelResponse
public function onKernelResponse(FilterResponseEvent $event) { $result = parent::onKernelResponse($event); $content = ob_get_contents(); if ($this->request_stack->getCurrentRequest()->getMethod() === 'POST' && empty($content)) { $event->stopPropagation(); } return $result; }
php
public function onKernelResponse(FilterResponseEvent $event) { $result = parent::onKernelResponse($event); $content = ob_get_contents(); if ($this->request_stack->getCurrentRequest()->getMethod() === 'POST' && empty($content)) { $event->stopPropagation(); } return $result; }
[ "public", "function", "onKernelResponse", "(", "FilterResponseEvent", "$", "event", ")", "{", "$", "result", "=", "parent", "::", "onKernelResponse", "(", "$", "event", ")", ";", "$", "content", "=", "ob_get_contents", "(", ")", ";", "if", "(", "$", "this"...
Avoid the injection of the toolbar @param FilterResponseEvent $event
[ "Avoid", "the", "injection", "of", "the", "toolbar" ]
5f52e2b67f5b8278af18907615f30ffe20f4802c
https://github.com/Nicofuma/phpbb-ext-webprofiler/blob/5f52e2b67f5b8278af18907615f30ffe20f4802c/phpbb/profiler/profiler_listener.php#L184-L195
202,611
acgrid/phprofiling
src/Item.php
Item.&
public function &refScopeStatistic($scope) { if(!isset($this->statistics[$scope])) $this->statistics[$scope] = []; return $this->statistics[$scope]; }
php
public function &refScopeStatistic($scope) { if(!isset($this->statistics[$scope])) $this->statistics[$scope] = []; return $this->statistics[$scope]; }
[ "public", "function", "&", "refScopeStatistic", "(", "$", "scope", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "statistics", "[", "$", "scope", "]", ")", ")", "$", "this", "->", "statistics", "[", "$", "scope", "]", "=", "[", "]", ...
Return a reference for batch editing. Do not replace the whole variable into non-array value! @param string $scope @return array
[ "Return", "a", "reference", "for", "batch", "editing", ".", "Do", "not", "replace", "the", "whole", "variable", "into", "non", "-", "array", "value!" ]
537aaad74892848060646c2764e8c85232daceae
https://github.com/acgrid/phprofiling/blob/537aaad74892848060646c2764e8c85232daceae/src/Item.php#L140-L144
202,612
squareproton/Bond
src/Bond/Di/Configurator.php
Configurator.load
public function load() { $output = []; $args = func_get_args(); foreach( $args as $arg ) { if( is_array($arg) ) { $output = array_merge( call_user_func_array( [$this, 'load'], $arg ), $output ); }...
php
public function load() { $output = []; $args = func_get_args(); foreach( $args as $arg ) { if( is_array($arg) ) { $output = array_merge( call_user_func_array( [$this, 'load'], $arg ), $output ); }...
[ "public", "function", "load", "(", ")", "{", "$", "output", "=", "[", "]", ";", "$", "args", "=", "func_get_args", "(", ")", ";", "foreach", "(", "$", "args", "as", "$", "arg", ")", "{", "if", "(", "is_array", "(", "$", "arg", ")", ")", "{", ...
Load a collection of assets into the Di container. Provides a whole load of syntatic sugar so you can basically pass this a combination of arrays, assets, multiple args, ... whatever The actual work is done by loadHandler @return mixed[]. Array of the individual assets loaded.
[ "Load", "a", "collection", "of", "assets", "into", "the", "Di", "container", ".", "Provides", "a", "whole", "load", "of", "syntatic", "sugar", "so", "you", "can", "basically", "pass", "this", "a", "combination", "of", "arrays", "assets", "multiple", "args", ...
a04ad9dd1a35adeaec98237716c2a41ce02b4f1a
https://github.com/squareproton/Bond/blob/a04ad9dd1a35adeaec98237716c2a41ce02b4f1a/src/Bond/Di/Configurator.php#L59-L75
202,613
reliv/rcm-config
src/Model/ConfigModel.php
ConfigModel.getList
public function getList() { $category = $this->getCategory(); $list = $this->getCategoryConfig($category); foreach ($list as $context => $config) { $list[$context] = $this->getAll($context); } return $list; }
php
public function getList() { $category = $this->getCategory(); $list = $this->getCategoryConfig($category); foreach ($list as $context => $config) { $list[$context] = $this->getAll($context); } return $list; }
[ "public", "function", "getList", "(", ")", "{", "$", "category", "=", "$", "this", "->", "getCategory", "(", ")", ";", "$", "list", "=", "$", "this", "->", "getCategoryConfig", "(", "$", "category", ")", ";", "foreach", "(", "$", "list", "as", "$", ...
Get All config entries @return array
[ "Get", "All", "config", "entries" ]
3e8cdea57a8688b06997ce1b167b8410bccac09e
https://github.com/reliv/rcm-config/blob/3e8cdea57a8688b06997ce1b167b8410bccac09e/src/Model/ConfigModel.php#L94-L105
202,614
irfantoor/engine
src/Engine.php
Engine.classname
public function classname($id) { # todo -- returns null class instead of null return isset($this->classes[$id]) ? $this->classes[$id] : null; }
php
public function classname($id) { # todo -- returns null class instead of null return isset($this->classes[$id]) ? $this->classes[$id] : null; }
[ "public", "function", "classname", "(", "$", "id", ")", "{", "# todo -- returns null class instead of null", "return", "isset", "(", "$", "this", "->", "classes", "[", "$", "id", "]", ")", "?", "$", "this", "->", "classes", "[", "$", "id", "]", ":", "nul...
Returns the default or configured classname with namespace @param string $id @return string
[ "Returns", "the", "default", "or", "configured", "classname", "with", "namespace" ]
4d2d221add749f75100d0b4ffe1488cdbf7af5d3
https://github.com/irfantoor/engine/blob/4d2d221add749f75100d0b4ffe1488cdbf7af5d3/src/Engine.php#L158-L162
202,615
irfantoor/engine
src/Engine.php
Engine.run
function run() { $request = $this->getServerRequest(); $response = $this->getResponse(); $uri = $request->getUri(); $basepath = $uri->getBasePath(); $args = explode('/', htmlspecialchars($basepath)); $response = $this->process($request, $response, $args); ...
php
function run() { $request = $this->getServerRequest(); $response = $this->getResponse(); $uri = $request->getUri(); $basepath = $uri->getBasePath(); $args = explode('/', htmlspecialchars($basepath)); $response = $this->process($request, $response, $args); ...
[ "function", "run", "(", ")", "{", "$", "request", "=", "$", "this", "->", "getServerRequest", "(", ")", ";", "$", "response", "=", "$", "this", "->", "getResponse", "(", ")", ";", "$", "uri", "=", "$", "request", "->", "getUri", "(", ")", ";", "$...
Runs the engine, the processes the request
[ "Runs", "the", "engine", "the", "processes", "the", "request" ]
4d2d221add749f75100d0b4ffe1488cdbf7af5d3
https://github.com/irfantoor/engine/blob/4d2d221add749f75100d0b4ffe1488cdbf7af5d3/src/Engine.php#L168-L179
202,616
OUTRAGElib/psr7-file-stream
lib/Stream.php
Stream.setFilePointer
public function setFilePointer($pointer) { if(!is_resource($pointer)) throw new InvalidArgumentException("Invalid type - not a file resource"); $this->pointer = $pointer; # and now to set everything up... $metadata = stream_get_meta_data($this->pointer); # can this stream be read from? if(isset...
php
public function setFilePointer($pointer) { if(!is_resource($pointer)) throw new InvalidArgumentException("Invalid type - not a file resource"); $this->pointer = $pointer; # and now to set everything up... $metadata = stream_get_meta_data($this->pointer); # can this stream be read from? if(isset...
[ "public", "function", "setFilePointer", "(", "$", "pointer", ")", "{", "if", "(", "!", "is_resource", "(", "$", "pointer", ")", ")", "throw", "new", "InvalidArgumentException", "(", "\"Invalid type - not a file resource\"", ")", ";", "$", "this", "->", "pointer"...
Set the file pointer
[ "Set", "the", "file", "pointer" ]
8da9ecad1e4190f31f8776aeadd9c7db41107f68
https://github.com/OUTRAGElib/psr7-file-stream/blob/8da9ecad1e4190f31f8776aeadd9c7db41107f68/lib/Stream.php#L46-L115
202,617
libreworks/caridea-auth
src/Adapter/MongoDb.php
MongoDb.getResults
protected function getResults(string $username, ServerRequestInterface $request): \MongoDB\Driver\Cursor { $q = new \MongoDB\Driver\Query( array_merge($this->query, [($this->fieldUser) => $username]), ['projection' => [($this->fieldUser) => true, ($this->fieldPass) => true]] ...
php
protected function getResults(string $username, ServerRequestInterface $request): \MongoDB\Driver\Cursor { $q = new \MongoDB\Driver\Query( array_merge($this->query, [($this->fieldUser) => $username]), ['projection' => [($this->fieldUser) => true, ($this->fieldPass) => true]] ...
[ "protected", "function", "getResults", "(", "string", "$", "username", ",", "ServerRequestInterface", "$", "request", ")", ":", "\\", "MongoDB", "\\", "Driver", "\\", "Cursor", "{", "$", "q", "=", "new", "\\", "MongoDB", "\\", "Driver", "\\", "Query", "(",...
Queries the MongoDB collection. @param string $username The username to use for parameter binding @param ServerRequestInterface $request The Server Request message (to use for additional parameter binding) @return \MongoDB\Driver\Cursor The results cursor
[ "Queries", "the", "MongoDB", "collection", "." ]
1bf965c57716942b18ca3204629f6bda99cf876a
https://github.com/libreworks/caridea-auth/blob/1bf965c57716942b18ca3204629f6bda99cf876a/src/Adapter/MongoDb.php#L119-L126
202,618
libreworks/caridea-auth
src/Adapter/MongoDb.php
MongoDb.fetchResult
protected function fetchResult(\MongoDB\Driver\Cursor $results, string $username): \stdClass { $values = $results->toArray(); if (count($values) > 1) { throw new \Caridea\Auth\Exception\UsernameAmbiguous($username); } elseif (count($values) == 0) { throw new \Caridea\...
php
protected function fetchResult(\MongoDB\Driver\Cursor $results, string $username): \stdClass { $values = $results->toArray(); if (count($values) > 1) { throw new \Caridea\Auth\Exception\UsernameAmbiguous($username); } elseif (count($values) == 0) { throw new \Caridea\...
[ "protected", "function", "fetchResult", "(", "\\", "MongoDB", "\\", "Driver", "\\", "Cursor", "$", "results", ",", "string", "$", "username", ")", ":", "\\", "stdClass", "{", "$", "values", "=", "$", "results", "->", "toArray", "(", ")", ";", "if", "("...
Fetches a single result from the Mongo Cursor. @param \MongoCursor $results The results @param string $username The attempted username (for Exception purposes) @return \stdClass A single MongoDB document @throws \Caridea\Auth\Exception\UsernameAmbiguous If there is more than 1 result @throws \Caridea\Auth\Exception\Us...
[ "Fetches", "a", "single", "result", "from", "the", "Mongo", "Cursor", "." ]
1bf965c57716942b18ca3204629f6bda99cf876a
https://github.com/libreworks/caridea-auth/blob/1bf965c57716942b18ca3204629f6bda99cf876a/src/Adapter/MongoDb.php#L137-L146
202,619
native5/native5-sdk-client-php
src/Native5/Sessions/CachedSessionHandler.php
CachedSessionHandler.destroy
public function destroy($sessionId) { $sql = 'DELETE from tbl_sessions where SESSION_ID=:SESSID'; $delete = $this->_db->prepare($sql); $delete->execute(array(':SESSID' => $sessionId)); $this->_cache->delete($sessionId); return true; }
php
public function destroy($sessionId) { $sql = 'DELETE from tbl_sessions where SESSION_ID=:SESSID'; $delete = $this->_db->prepare($sql); $delete->execute(array(':SESSID' => $sessionId)); $this->_cache->delete($sessionId); return true; }
[ "public", "function", "destroy", "(", "$", "sessionId", ")", "{", "$", "sql", "=", "'DELETE from tbl_sessions where SESSION_ID=:SESSID'", ";", "$", "delete", "=", "$", "this", "->", "_db", "->", "prepare", "(", "$", "sql", ")", ";", "$", "delete", "->", "e...
destroy Destroying the session deletes it from the cache as well as the backend database. @param mixed $sessionId The session id @access public @return void
[ "destroy", "Destroying", "the", "session", "deletes", "it", "from", "the", "cache", "as", "well", "as", "the", "backend", "database", "." ]
e1f598cf27654d81bb5facace1990b737242a2f9
https://github.com/native5/native5-sdk-client-php/blob/e1f598cf27654d81bb5facace1990b737242a2f9/src/Native5/Sessions/CachedSessionHandler.php#L78-L87
202,620
native5/native5-sdk-client-php
src/Native5/Sessions/CachedSessionHandler.php
CachedSessionHandler.gc
public function gc($lifetime) { $sql = 'DELETE from tbl_sessions where LAST_ACCESSED < DATE_SUB(NOW(), INTERVAL :LIFETIME SECOND)'; $delete = $this->_db->prepare($sql); $count = $delete->execute(array(':LIFETIME' => $lifetime)); return true; }
php
public function gc($lifetime) { $sql = 'DELETE from tbl_sessions where LAST_ACCESSED < DATE_SUB(NOW(), INTERVAL :LIFETIME SECOND)'; $delete = $this->_db->prepare($sql); $count = $delete->execute(array(':LIFETIME' => $lifetime)); return true; }
[ "public", "function", "gc", "(", "$", "lifetime", ")", "{", "$", "sql", "=", "'DELETE from tbl_sessions where LAST_ACCESSED < DATE_SUB(NOW(), INTERVAL :LIFETIME SECOND)'", ";", "$", "delete", "=", "$", "this", "->", "_db", "->", "prepare", "(", "$", "sql", ")", ";...
Garbage collection causes all expired sessions to be deleted. @param mixed $lifetime The max-lifetime of the session. @access public @return void
[ "Garbage", "collection", "causes", "all", "expired", "sessions", "to", "be", "deleted", "." ]
e1f598cf27654d81bb5facace1990b737242a2f9
https://github.com/native5/native5-sdk-client-php/blob/e1f598cf27654d81bb5facace1990b737242a2f9/src/Native5/Sessions/CachedSessionHandler.php#L98-L106
202,621
native5/native5-sdk-client-php
src/Native5/Sessions/CachedSessionHandler.php
CachedSessionHandler.open
public function open($savePath, $sessionName) { $sql = 'INSERT INTO tbl_sessions (SESSION_ID, SESSION_DATA) values (:SESSID, :SESSDATA) ON DUPLICATE KEY UPDATE LAST_ACCESSED=NOW()'; $stmt = $this->_db->prepare($sql); $stmt->execute(array(':SESSID' => session_id(), ':SESSDATA' => '')); ...
php
public function open($savePath, $sessionName) { $sql = 'INSERT INTO tbl_sessions (SESSION_ID, SESSION_DATA) values (:SESSID, :SESSDATA) ON DUPLICATE KEY UPDATE LAST_ACCESSED=NOW()'; $stmt = $this->_db->prepare($sql); $stmt->execute(array(':SESSID' => session_id(), ':SESSDATA' => '')); ...
[ "public", "function", "open", "(", "$", "savePath", ",", "$", "sessionName", ")", "{", "$", "sql", "=", "'INSERT INTO tbl_sessions (SESSION_ID, SESSION_DATA) values (:SESSID, :SESSDATA) ON DUPLICATE KEY UPDATE LAST_ACCESSED=NOW()'", ";", "$", "stmt", "=", "$", "this", "->",...
open Opening the session causes an insert into the sessions table. @param mixed $savePath SavePath, relevant only while persisting to disk. @param mixed $sessionName SessionName @access public @return void
[ "open", "Opening", "the", "session", "causes", "an", "insert", "into", "the", "sessions", "table", "." ]
e1f598cf27654d81bb5facace1990b737242a2f9
https://github.com/native5/native5-sdk-client-php/blob/e1f598cf27654d81bb5facace1990b737242a2f9/src/Native5/Sessions/CachedSessionHandler.php#L118-L124
202,622
xZ1mEFx/yii2-base
db/ActiveRecord.php
ActiveRecord.lockTables
public static function lockTables($table = NULL, $blockType = 'WRITE') { $sql = "LOCK TABLES "; if ($table === NULL) { $sql .= self::tableName() . " $blockType"; } else { $tmpSql = ''; foreach ((is_array($table) ? $table : [$table]) as $key => $value) { ...
php
public static function lockTables($table = NULL, $blockType = 'WRITE') { $sql = "LOCK TABLES "; if ($table === NULL) { $sql .= self::tableName() . " $blockType"; } else { $tmpSql = ''; foreach ((is_array($table) ? $table : [$table]) as $key => $value) { ...
[ "public", "static", "function", "lockTables", "(", "$", "table", "=", "NULL", ",", "$", "blockType", "=", "'WRITE'", ")", "{", "$", "sql", "=", "\"LOCK TABLES \"", ";", "if", "(", "$", "table", "===", "NULL", ")", "{", "$", "sql", ".=", "self", "::",...
Lock DB tables @param null|string|array $table Examples: 'table_name' or 'table_name tn' or ['table_name_1 tn1', 'table_name_2', 'tn3'=>'table_name_3'] @param string $blockType 'WRITE'|'READ'
[ "Lock", "DB", "tables" ]
f6633c08ccccb7eb5ac000dfae0db26cb2e0a76a
https://github.com/xZ1mEFx/yii2-base/blob/f6633c08ccccb7eb5ac000dfae0db26cb2e0a76a/db/ActiveRecord.php#L22-L39
202,623
phpffcms/ffcms-core
src/Debug/Manager.php
Manager.renderOut
public function renderOut() { foreach (Error::all() as $file => $error) { foreach ($error as $line) { $this->addMessage('Template error: ' . $line . '(' . $file . ')', 'error'); } } return $this->render->render(); }
php
public function renderOut() { foreach (Error::all() as $file => $error) { foreach ($error as $line) { $this->addMessage('Template error: ' . $line . '(' . $file . ')', 'error'); } } return $this->render->render(); }
[ "public", "function", "renderOut", "(", ")", "{", "foreach", "(", "Error", "::", "all", "(", ")", "as", "$", "file", "=>", "$", "error", ")", "{", "foreach", "(", "$", "error", "as", "$", "line", ")", "{", "$", "this", "->", "addMessage", "(", "'...
Render debug bar code @return string
[ "Render", "debug", "bar", "code" ]
44a309553ef9f115ccfcfd71f2ac6e381c612082
https://github.com/phpffcms/ffcms-core/blob/44a309553ef9f115ccfcfd71f2ac6e381c612082/src/Debug/Manager.php#L48-L56
202,624
phpffcms/ffcms-core
src/Debug/Manager.php
Manager.addException
public function addException($e) { if ($e instanceof \Exception) { try { $this->bar->getCollector('exceptions')->addException($e); } catch (\Exception $ie) { } // mute exceptions there } }
php
public function addException($e) { if ($e instanceof \Exception) { try { $this->bar->getCollector('exceptions')->addException($e); } catch (\Exception $ie) { } // mute exceptions there } }
[ "public", "function", "addException", "(", "$", "e", ")", "{", "if", "(", "$", "e", "instanceof", "\\", "Exception", ")", "{", "try", "{", "$", "this", "->", "bar", "->", "getCollector", "(", "'exceptions'", ")", "->", "addException", "(", "$", "e", ...
Add exception into debug bar and stop execute @param \Exception $e
[ "Add", "exception", "into", "debug", "bar", "and", "stop", "execute" ]
44a309553ef9f115ccfcfd71f2ac6e381c612082
https://github.com/phpffcms/ffcms-core/blob/44a309553ef9f115ccfcfd71f2ac6e381c612082/src/Debug/Manager.php#L62-L70
202,625
phpffcms/ffcms-core
src/Debug/Manager.php
Manager.addMessage
public function addMessage($m, $type = 'info') { if (!Any::isStr($m) || !Any::isStr($type)) { return; } $m = App::$Security->secureHtml($m); try { $mCollector = $this->bar->getCollector('messages'); if (method_exists($mCollector, $type)) { ...
php
public function addMessage($m, $type = 'info') { if (!Any::isStr($m) || !Any::isStr($type)) { return; } $m = App::$Security->secureHtml($m); try { $mCollector = $this->bar->getCollector('messages'); if (method_exists($mCollector, $type)) { ...
[ "public", "function", "addMessage", "(", "$", "m", ",", "$", "type", "=", "'info'", ")", "{", "if", "(", "!", "Any", "::", "isStr", "(", "$", "m", ")", "||", "!", "Any", "::", "isStr", "(", "$", "type", ")", ")", "{", "return", ";", "}", "$",...
Add message into debug bar @param string $m @param string $type
[ "Add", "message", "into", "debug", "bar" ]
44a309553ef9f115ccfcfd71f2ac6e381c612082
https://github.com/phpffcms/ffcms-core/blob/44a309553ef9f115ccfcfd71f2ac6e381c612082/src/Debug/Manager.php#L77-L92
202,626
vpg/titon.utility
src/Titon/Utility/Converter.php
Converter.autobox
public static function autobox($value) { if (is_numeric($value)) { if (strpos($value, '.') !== false) { return (float) $value; } else { return (int) $value; } } else if (is_bool($value)) { return (bool) $value; } e...
php
public static function autobox($value) { if (is_numeric($value)) { if (strpos($value, '.') !== false) { return (float) $value; } else { return (int) $value; } } else if (is_bool($value)) { return (bool) $value; } e...
[ "public", "static", "function", "autobox", "(", "$", "value", ")", "{", "if", "(", "is_numeric", "(", "$", "value", ")", ")", "{", "if", "(", "strpos", "(", "$", "value", ",", "'.'", ")", "!==", "false", ")", "{", "return", "(", "float", ")", "$"...
Autobox a value by type casting it. @param mixed $value @return mixed
[ "Autobox", "a", "value", "by", "type", "casting", "it", "." ]
8a77eb9e7b8baacf41cc25487289779d8319cd3a
https://github.com/vpg/titon.utility/blob/8a77eb9e7b8baacf41cc25487289779d8319cd3a/src/Titon/Utility/Converter.php#L43-L59
202,627
vpg/titon.utility
src/Titon/Utility/Converter.php
Converter.isJson
public static function isJson($data) { if (!is_string($data) || empty($data)) { return false; } $json = @json_decode($data, true); return (json_last_error() === JSON_ERROR_NONE && $json !== null); }
php
public static function isJson($data) { if (!is_string($data) || empty($data)) { return false; } $json = @json_decode($data, true); return (json_last_error() === JSON_ERROR_NONE && $json !== null); }
[ "public", "static", "function", "isJson", "(", "$", "data", ")", "{", "if", "(", "!", "is_string", "(", "$", "data", ")", "||", "empty", "(", "$", "data", ")", ")", "{", "return", "false", ";", "}", "$", "json", "=", "@", "json_decode", "(", "$",...
Check to see if data passed is a JSON object. @param mixed $data @return bool
[ "Check", "to", "see", "if", "data", "passed", "is", "a", "JSON", "object", "." ]
8a77eb9e7b8baacf41cc25487289779d8319cd3a
https://github.com/vpg/titon.utility/blob/8a77eb9e7b8baacf41cc25487289779d8319cd3a/src/Titon/Utility/Converter.php#L125-L133
202,628
vpg/titon.utility
src/Titon/Utility/Converter.php
Converter.isSerialized
public static function isSerialized($data) { if (!is_string($data) || empty($data)) { return false; } return (@unserialize($data) !== false); }
php
public static function isSerialized($data) { if (!is_string($data) || empty($data)) { return false; } return (@unserialize($data) !== false); }
[ "public", "static", "function", "isSerialized", "(", "$", "data", ")", "{", "if", "(", "!", "is_string", "(", "$", "data", ")", "||", "empty", "(", "$", "data", ")", ")", "{", "return", "false", ";", "}", "return", "(", "@", "unserialize", "(", "$"...
Check to see if data passed has been serialized. @param mixed $data @return bool
[ "Check", "to", "see", "if", "data", "passed", "has", "been", "serialized", "." ]
8a77eb9e7b8baacf41cc25487289779d8319cd3a
https://github.com/vpg/titon.utility/blob/8a77eb9e7b8baacf41cc25487289779d8319cd3a/src/Titon/Utility/Converter.php#L151-L157
202,629
vpg/titon.utility
src/Titon/Utility/Converter.php
Converter.isXml
public static function isXml($data) { // Do manually checks on the string since HHVM blows up if (!is_string($data) || substr($data, 0, 5) !== '<?xml') { return false; } return (@simplexml_load_string($data) instanceof SimpleXMLElement); }
php
public static function isXml($data) { // Do manually checks on the string since HHVM blows up if (!is_string($data) || substr($data, 0, 5) !== '<?xml') { return false; } return (@simplexml_load_string($data) instanceof SimpleXMLElement); }
[ "public", "static", "function", "isXml", "(", "$", "data", ")", "{", "// Do manually checks on the string since HHVM blows up", "if", "(", "!", "is_string", "(", "$", "data", ")", "||", "substr", "(", "$", "data", ",", "0", ",", "5", ")", "!==", "'<?xml'", ...
Check to see if data passed is an XML document. @param mixed $data @return bool
[ "Check", "to", "see", "if", "data", "passed", "is", "an", "XML", "document", "." ]
8a77eb9e7b8baacf41cc25487289779d8319cd3a
https://github.com/vpg/titon.utility/blob/8a77eb9e7b8baacf41cc25487289779d8319cd3a/src/Titon/Utility/Converter.php#L165-L172
202,630
jenskooij/cloudcontrol
src/components/cms/BaseRouting.php
BaseRouting.route
public function route() { $this->dashboardRouting($this->relativeCmsUri); $this->logOffRouting($this->request, $this->relativeCmsUri); $this->apiRouting($this->relativeCmsUri); $this->documentRouting($this->userRights, $this->relativeCmsUri); $this->valuelistsRouting($this->u...
php
public function route() { $this->dashboardRouting($this->relativeCmsUri); $this->logOffRouting($this->request, $this->relativeCmsUri); $this->apiRouting($this->relativeCmsUri); $this->documentRouting($this->userRights, $this->relativeCmsUri); $this->valuelistsRouting($this->u...
[ "public", "function", "route", "(", ")", "{", "$", "this", "->", "dashboardRouting", "(", "$", "this", "->", "relativeCmsUri", ")", ";", "$", "this", "->", "logOffRouting", "(", "$", "this", "->", "request", ",", "$", "this", "->", "relativeCmsUri", ")",...
Call the different routing methods @throws \Exception
[ "Call", "the", "different", "routing", "methods" ]
76e5d9ac8f9c50d06d39a995d13cc03742536548
https://github.com/jenskooij/cloudcontrol/blob/76e5d9ac8f9c50d06d39a995d13cc03742536548/src/components/cms/BaseRouting.php#L58-L71
202,631
Mandarin-Medien/MMCmfContentBundle
Templating/TemplateManager.php
TemplateManager.getTemplate
public function getTemplate(TemplatableNodeInterface $node) { $template = $node->getTemplate(); if (!$template) { $meta = $this->manager->getClassMetadata(get_class($node)); if (!empty($this->templates[$meta->name]) && count($this->templates[$meta->name]) > 0) ...
php
public function getTemplate(TemplatableNodeInterface $node) { $template = $node->getTemplate(); if (!$template) { $meta = $this->manager->getClassMetadata(get_class($node)); if (!empty($this->templates[$meta->name]) && count($this->templates[$meta->name]) > 0) ...
[ "public", "function", "getTemplate", "(", "TemplatableNodeInterface", "$", "node", ")", "{", "$", "template", "=", "$", "node", "->", "getTemplate", "(", ")", ";", "if", "(", "!", "$", "template", ")", "{", "$", "meta", "=", "$", "this", "->", "manager...
get the assigned template of the given TemplatableNodeInterface handles the template selection if no template is assigned @param TemplatableNodeInterface $node @return mixed|string
[ "get", "the", "assigned", "template", "of", "the", "given", "TemplatableNodeInterface", "handles", "the", "template", "selection", "if", "no", "template", "is", "assigned" ]
503ab31cef3ce068f767de5b72f833526355b726
https://github.com/Mandarin-Medien/MMCmfContentBundle/blob/503ab31cef3ce068f767de5b72f833526355b726/Templating/TemplateManager.php#L84-L105
202,632
Mandarin-Medien/MMCmfContentBundle
Templating/TemplateManager.php
TemplateManager.getBundleNameFromEntity
protected static function getBundleNameFromEntity($entityNamespace, $bundles) { $dataBaseNamespace = substr($entityNamespace, 0, strpos($entityNamespace, '\\Entity')); foreach ($bundles as $type => $bundle) { $bundleRefClass = new \ReflectionClass($bundle); if ($bundleRefCla...
php
protected static function getBundleNameFromEntity($entityNamespace, $bundles) { $dataBaseNamespace = substr($entityNamespace, 0, strpos($entityNamespace, '\\Entity')); foreach ($bundles as $type => $bundle) { $bundleRefClass = new \ReflectionClass($bundle); if ($bundleRefCla...
[ "protected", "static", "function", "getBundleNameFromEntity", "(", "$", "entityNamespace", ",", "$", "bundles", ")", "{", "$", "dataBaseNamespace", "=", "substr", "(", "$", "entityNamespace", ",", "0", ",", "strpos", "(", "$", "entityNamespace", ",", "'\\\\Entit...
Get the bundle name from an Entity namespace @param $entityNamespace @param $bundles @return string|null
[ "Get", "the", "bundle", "name", "from", "an", "Entity", "namespace" ]
503ab31cef3ce068f767de5b72f833526355b726
https://github.com/Mandarin-Medien/MMCmfContentBundle/blob/503ab31cef3ce068f767de5b72f833526355b726/Templating/TemplateManager.php#L114-L126
202,633
fdmweb/FDM-netaxept
src/Netaxept/Api.php
Api.getTransaction
public function getTransaction($transactionId): QueryInterface { $uri = $this->getUri('query', $this->getParameters(['transactionId' => $transactionId])); /** @var QueryInterface $response */ $response = $this->performRequest((string) $uri); Assert::isInstanceOf($response, QueryInte...
php
public function getTransaction($transactionId): QueryInterface { $uri = $this->getUri('query', $this->getParameters(['transactionId' => $transactionId])); /** @var QueryInterface $response */ $response = $this->performRequest((string) $uri); Assert::isInstanceOf($response, QueryInte...
[ "public", "function", "getTransaction", "(", "$", "transactionId", ")", ":", "QueryInterface", "{", "$", "uri", "=", "$", "this", "->", "getUri", "(", "'query'", ",", "$", "this", "->", "getParameters", "(", "[", "'transactionId'", "=>", "$", "transactionId"...
Get a Query response object for the provided transaction ID. @param string $transactionId @return QueryInterface
[ "Get", "a", "Query", "response", "object", "for", "the", "provided", "transaction", "ID", "." ]
0afcf18056387976fc4ca5933ea8c15b24d005cc
https://github.com/fdmweb/FDM-netaxept/blob/0afcf18056387976fc4ca5933ea8c15b24d005cc/src/Netaxept/Api.php#L105-L115
202,634
fdmweb/FDM-netaxept
src/Netaxept/Api.php
Api.registerTransaction
public function registerTransaction(array $transactionData): RegisterInterface { $uri = $this->getUri('register', $this->getParameters($transactionData)); /** @var RegisterInterface $response */ $response = $this->performRequest((string) $uri); Assert::isInstanceOf($response, Regist...
php
public function registerTransaction(array $transactionData): RegisterInterface { $uri = $this->getUri('register', $this->getParameters($transactionData)); /** @var RegisterInterface $response */ $response = $this->performRequest((string) $uri); Assert::isInstanceOf($response, Regist...
[ "public", "function", "registerTransaction", "(", "array", "$", "transactionData", ")", ":", "RegisterInterface", "{", "$", "uri", "=", "$", "this", "->", "getUri", "(", "'register'", ",", "$", "this", "->", "getParameters", "(", "$", "transactionData", ")", ...
Registers a transaction @param array $transactionData @return RegisterInterface
[ "Registers", "a", "transaction" ]
0afcf18056387976fc4ca5933ea8c15b24d005cc
https://github.com/fdmweb/FDM-netaxept/blob/0afcf18056387976fc4ca5933ea8c15b24d005cc/src/Netaxept/Api.php#L124-L133
202,635
fdmweb/FDM-netaxept
src/Netaxept/Api.php
Api.processTransaction
public function processTransaction(array $transactionData, string $operation): ProcessInterface { // When hitting the process endpoint, we only need the transactionId and operation key/value pairs, and // optionally the transactionAmount if we are capturing a portion of the total amount. $tr...
php
public function processTransaction(array $transactionData, string $operation): ProcessInterface { // When hitting the process endpoint, we only need the transactionId and operation key/value pairs, and // optionally the transactionAmount if we are capturing a portion of the total amount. $tr...
[ "public", "function", "processTransaction", "(", "array", "$", "transactionData", ",", "string", "$", "operation", ")", ":", "ProcessInterface", "{", "// When hitting the process endpoint, we only need the transactionId and operation key/value pairs, and", "// optionally the transact...
Processes a transaction @param array $transactionData @return ProcessInterface
[ "Processes", "a", "transaction" ]
0afcf18056387976fc4ca5933ea8c15b24d005cc
https://github.com/fdmweb/FDM-netaxept/blob/0afcf18056387976fc4ca5933ea8c15b24d005cc/src/Netaxept/Api.php#L142-L157
202,636
fdmweb/FDM-netaxept
src/Netaxept/Api.php
Api.getTerminalUri
public function getTerminalUri(string $transactionId): Uri { $uri = $this->getUri('terminal', ['merchantId' => $this->merchantId, 'transactionId' => $transactionId]); return $uri; }
php
public function getTerminalUri(string $transactionId): Uri { $uri = $this->getUri('terminal', ['merchantId' => $this->merchantId, 'transactionId' => $transactionId]); return $uri; }
[ "public", "function", "getTerminalUri", "(", "string", "$", "transactionId", ")", ":", "Uri", "{", "$", "uri", "=", "$", "this", "->", "getUri", "(", "'terminal'", ",", "[", "'merchantId'", "=>", "$", "this", "->", "merchantId", ",", "'transactionId'", "=>...
Given the transaction ID, returns a URI that the user should be redirected to in order to enter their card details for that transaction. @param string $transactionId @return Uri
[ "Given", "the", "transaction", "ID", "returns", "a", "URI", "that", "the", "user", "should", "be", "redirected", "to", "in", "order", "to", "enter", "their", "card", "details", "for", "that", "transaction", "." ]
0afcf18056387976fc4ca5933ea8c15b24d005cc
https://github.com/fdmweb/FDM-netaxept/blob/0afcf18056387976fc4ca5933ea8c15b24d005cc/src/Netaxept/Api.php#L251-L256
202,637
fdmweb/FDM-netaxept
src/Netaxept/Api.php
Api.performRequest
protected function performRequest(string $uri) { $httpResponse = $this->client->get($uri); Assert::eq($httpResponse->getStatusCode(), 200, 'Request failed.'); $content = $httpResponse->getBody()->getContents(); $xml = simplexml_load_string($content); $this->exceptionOnError...
php
protected function performRequest(string $uri) { $httpResponse = $this->client->get($uri); Assert::eq($httpResponse->getStatusCode(), 200, 'Request failed.'); $content = $httpResponse->getBody()->getContents(); $xml = simplexml_load_string($content); $this->exceptionOnError...
[ "protected", "function", "performRequest", "(", "string", "$", "uri", ")", "{", "$", "httpResponse", "=", "$", "this", "->", "client", "->", "get", "(", "$", "uri", ")", ";", "Assert", "::", "eq", "(", "$", "httpResponse", "->", "getStatusCode", "(", "...
Performs a request to the provided URI, and returns the appropriate response object, based on the content of the HTTP response. @param string $uri @return mixed
[ "Performs", "a", "request", "to", "the", "provided", "URI", "and", "returns", "the", "appropriate", "response", "object", "based", "on", "the", "content", "of", "the", "HTTP", "response", "." ]
0afcf18056387976fc4ca5933ea8c15b24d005cc
https://github.com/fdmweb/FDM-netaxept/blob/0afcf18056387976fc4ca5933ea8c15b24d005cc/src/Netaxept/Api.php#L266-L277
202,638
fdmweb/FDM-netaxept
src/Netaxept/Api.php
Api.getUri
protected function getUri(string $endpoint, array $parameters = []): Uri { Assert::keyExists(self::ENDPOINTS, $endpoint, "Named endpoint {$endpoint} is unknown."); $uri = $this->sandbox ? self::SANDBOX_URL : self::PRODUCTION_URL; $uri .= self::ENDPOINTS[$endpoint]; if ($parameters)...
php
protected function getUri(string $endpoint, array $parameters = []): Uri { Assert::keyExists(self::ENDPOINTS, $endpoint, "Named endpoint {$endpoint} is unknown."); $uri = $this->sandbox ? self::SANDBOX_URL : self::PRODUCTION_URL; $uri .= self::ENDPOINTS[$endpoint]; if ($parameters)...
[ "protected", "function", "getUri", "(", "string", "$", "endpoint", ",", "array", "$", "parameters", "=", "[", "]", ")", ":", "Uri", "{", "Assert", "::", "keyExists", "(", "self", "::", "ENDPOINTS", ",", "$", "endpoint", ",", "\"Named endpoint {$endpoint} is ...
Builds a URI, based on the named endpoint and provided parameters. The Netaxept API claims to be a REST API, but it is not in any way, shape, or form a REST API. It requires all requests to be GET requests, and all parameters to be URLencoded and provided in the query string. About as far away from REST as you can get....
[ "Builds", "a", "URI", "based", "on", "the", "named", "endpoint", "and", "provided", "parameters", ".", "The", "Netaxept", "API", "claims", "to", "be", "a", "REST", "API", "but", "it", "is", "not", "in", "any", "way", "shape", "or", "form", "a", "REST",...
0afcf18056387976fc4ca5933ea8c15b24d005cc
https://github.com/fdmweb/FDM-netaxept/blob/0afcf18056387976fc4ca5933ea8c15b24d005cc/src/Netaxept/Api.php#L304-L316
202,639
SetBased/php-abc-babel-core
src/CoreBabel.php
CoreBabel.getFormattedDate
public function getFormattedDate(int $dateType, $date): string { if ($date=='') return ''; switch ($dateType) { case self::FORMAT_FULL: $format = $this->language['lan_date_format_full']; break; case self::FORMAT_LONG: $format = $this->language['lan_date_format_long'];...
php
public function getFormattedDate(int $dateType, $date): string { if ($date=='') return ''; switch ($dateType) { case self::FORMAT_FULL: $format = $this->language['lan_date_format_full']; break; case self::FORMAT_LONG: $format = $this->language['lan_date_format_long'];...
[ "public", "function", "getFormattedDate", "(", "int", "$", "dateType", ",", "$", "date", ")", ":", "string", "{", "if", "(", "$", "date", "==", "''", ")", "return", "''", ";", "switch", "(", "$", "dateType", ")", "{", "case", "self", "::", "FORMAT_FU...
Returns a date formatted according to a date format specifier. @param int $dateType The date format specifier. One of: <ul> <li>Babel::FORMAT_FULL <li>Babel::FORMAT_LONG <li>Babel::FORMAT_MEDIUM <li>Babel::FORMAT_SHORT </ul> @param string|\DateTimeInterface|null $date The date. @return ...
[ "Returns", "a", "date", "formatted", "according", "to", "a", "date", "format", "specifier", "." ]
db409d04bac4d1e0c3ca2f19b46cce3b3b92401d
https://github.com/SetBased/php-abc-babel-core/blob/db409d04bac4d1e0c3ca2f19b46cce3b3b92401d/src/CoreBabel.php#L79-L130
202,640
SetBased/php-abc-babel-core
src/CoreBabel.php
CoreBabel.getText
public function getText(int $txtId): string { return Abc::$DL->abcBabelCoreTextGetText($txtId, $this->language['lan_id']); }
php
public function getText(int $txtId): string { return Abc::$DL->abcBabelCoreTextGetText($txtId, $this->language['lan_id']); }
[ "public", "function", "getText", "(", "int", "$", "txtId", ")", ":", "string", "{", "return", "Abc", "::", "$", "DL", "->", "abcBabelCoreTextGetText", "(", "$", "txtId", ",", "$", "this", "->", "language", "[", "'lan_id'", "]", ")", ";", "}" ]
Returns the value of a text. @param int $txtId The ID of the text. @return string @since 1.0.0 @api
[ "Returns", "the", "value", "of", "a", "text", "." ]
db409d04bac4d1e0c3ca2f19b46cce3b3b92401d
https://github.com/SetBased/php-abc-babel-core/blob/db409d04bac4d1e0c3ca2f19b46cce3b3b92401d/src/CoreBabel.php#L349-L352
202,641
SetBased/php-abc-babel-core
src/CoreBabel.php
CoreBabel.getWord
public function getWord(int $wrdId): string { return Abc::$DL->abcBabelCoreWordGetWord($wrdId, $this->language['lan_id']); }
php
public function getWord(int $wrdId): string { return Abc::$DL->abcBabelCoreWordGetWord($wrdId, $this->language['lan_id']); }
[ "public", "function", "getWord", "(", "int", "$", "wrdId", ")", ":", "string", "{", "return", "Abc", "::", "$", "DL", "->", "abcBabelCoreWordGetWord", "(", "$", "wrdId", ",", "$", "this", "->", "language", "[", "'lan_id'", "]", ")", ";", "}" ]
Returns the text of a word. @param int $wrdId The ID of the word. @return string @since 1.0.0 @api
[ "Returns", "the", "text", "of", "a", "word", "." ]
db409d04bac4d1e0c3ca2f19b46cce3b3b92401d
https://github.com/SetBased/php-abc-babel-core/blob/db409d04bac4d1e0c3ca2f19b46cce3b3b92401d/src/CoreBabel.php#L405-L408
202,642
SetBased/php-abc-babel-core
src/CoreBabel.php
CoreBabel.popLanguage
public function popLanguage(): void { array_pop($this->stack); $this->language = $this->stack[count($this->stack) - 1]; }
php
public function popLanguage(): void { array_pop($this->stack); $this->language = $this->stack[count($this->stack) - 1]; }
[ "public", "function", "popLanguage", "(", ")", ":", "void", "{", "array_pop", "(", "$", "this", "->", "stack", ")", ";", "$", "this", "->", "language", "=", "$", "this", "->", "stack", "[", "count", "(", "$", "this", "->", "stack", ")", "-", "1", ...
Restores the previous language as the current language. @return void @since 1.0.0 @api
[ "Restores", "the", "previous", "language", "as", "the", "current", "language", "." ]
db409d04bac4d1e0c3ca2f19b46cce3b3b92401d
https://github.com/SetBased/php-abc-babel-core/blob/db409d04bac4d1e0c3ca2f19b46cce3b3b92401d/src/CoreBabel.php#L419-L423
202,643
SetBased/php-abc-babel-core
src/CoreBabel.php
CoreBabel.pushLanguage
public function pushLanguage(int $lanId): void { $this->language = Abc::$DL->abcBabelCoreLanguageGetDetails($lanId); array_push($this->stack, $this->language); }
php
public function pushLanguage(int $lanId): void { $this->language = Abc::$DL->abcBabelCoreLanguageGetDetails($lanId); array_push($this->stack, $this->language); }
[ "public", "function", "pushLanguage", "(", "int", "$", "lanId", ")", ":", "void", "{", "$", "this", "->", "language", "=", "Abc", "::", "$", "DL", "->", "abcBabelCoreLanguageGetDetails", "(", "$", "lanId", ")", ";", "array_push", "(", "$", "this", "->", ...
Sets and pushes a new current language. @param int $lanId The ID of the new current language. @return void @since 1.0.0 @api
[ "Sets", "and", "pushes", "a", "new", "current", "language", "." ]
db409d04bac4d1e0c3ca2f19b46cce3b3b92401d
https://github.com/SetBased/php-abc-babel-core/blob/db409d04bac4d1e0c3ca2f19b46cce3b3b92401d/src/CoreBabel.php#L436-L440
202,644
SetBased/php-abc-babel-core
src/CoreBabel.php
CoreBabel.setLanguage
public function setLanguage(int $lanId): void { $this->language = Abc::$DL->abcBabelCoreLanguageGetDetails($lanId); $this->stack[max(0, count($this->stack) - 1)] = $this->language; }
php
public function setLanguage(int $lanId): void { $this->language = Abc::$DL->abcBabelCoreLanguageGetDetails($lanId); $this->stack[max(0, count($this->stack) - 1)] = $this->language; }
[ "public", "function", "setLanguage", "(", "int", "$", "lanId", ")", ":", "void", "{", "$", "this", "->", "language", "=", "Abc", "::", "$", "DL", "->", "abcBabelCoreLanguageGetDetails", "(", "$", "lanId", ")", ";", "$", "this", "->", "stack", "[", "max...
Replaces the current language. @param int $lanId The ID of the new current language. @return void @since 1.0.0 @api
[ "Replaces", "the", "current", "language", "." ]
db409d04bac4d1e0c3ca2f19b46cce3b3b92401d
https://github.com/SetBased/php-abc-babel-core/blob/db409d04bac4d1e0c3ca2f19b46cce3b3b92401d/src/CoreBabel.php#L453-L457
202,645
mpf-soft/admin-widgets
menu/items/Link.php
Link.getIcon
public function getIcon() { if (!$this->icon) { return ""; } return Html::get()->image($this->icon, $this->translate($this->label)); }
php
public function getIcon() { if (!$this->icon) { return ""; } return Html::get()->image($this->icon, $this->translate($this->label)); }
[ "public", "function", "getIcon", "(", ")", "{", "if", "(", "!", "$", "this", "->", "icon", ")", "{", "return", "\"\"", ";", "}", "return", "Html", "::", "get", "(", ")", "->", "image", "(", "$", "this", "->", "icon", ",", "$", "this", "->", "tr...
Get HTML image for selected icon @return string
[ "Get", "HTML", "image", "for", "selected", "icon" ]
92597f9a09d086664268d6b7e0111d5a5586d8c7
https://github.com/mpf-soft/admin-widgets/blob/92597f9a09d086664268d6b7e0111d5a5586d8c7/menu/items/Link.php#L141-L147
202,646
mpf-soft/admin-widgets
menu/items/Link.php
Link.getURL
public function getURL() { if (is_string($this->url)) { return $this->url; } return \mpf\WebApp::get()->request()->createURL(isset($this->url[0]) ? $this->url[0] : 'home', isset($this->url[1]) ? $this->url[1] : null, (isset($this->url[2]) && is_array($this->url[2])) ? $this->url[...
php
public function getURL() { if (is_string($this->url)) { return $this->url; } return \mpf\WebApp::get()->request()->createURL(isset($this->url[0]) ? $this->url[0] : 'home', isset($this->url[1]) ? $this->url[1] : null, (isset($this->url[2]) && is_array($this->url[2])) ? $this->url[...
[ "public", "function", "getURL", "(", ")", "{", "if", "(", "is_string", "(", "$", "this", "->", "url", ")", ")", "{", "return", "$", "this", "->", "url", ";", "}", "return", "\\", "mpf", "\\", "WebApp", "::", "get", "(", ")", "->", "request", "(",...
Get string url from array|string input @return string
[ "Get", "string", "url", "from", "array|string", "input" ]
92597f9a09d086664268d6b7e0111d5a5586d8c7
https://github.com/mpf-soft/admin-widgets/blob/92597f9a09d086664268d6b7e0111d5a5586d8c7/menu/items/Link.php#L153-L159
202,647
mpf-soft/admin-widgets
menu/items/Link.php
Link.isSelected
public function isSelected() { if (!is_null($this->isSelected)) return $this->isSelected; if (is_string($this->url) && $this->url == \mpf\WebApp::get()->request()->getCurrentURL()) { return true; } elseif (is_array($this->url)) { $controller = isset($this-...
php
public function isSelected() { if (!is_null($this->isSelected)) return $this->isSelected; if (is_string($this->url) && $this->url == \mpf\WebApp::get()->request()->getCurrentURL()) { return true; } elseif (is_array($this->url)) { $controller = isset($this-...
[ "public", "function", "isSelected", "(", ")", "{", "if", "(", "!", "is_null", "(", "$", "this", "->", "isSelected", ")", ")", "return", "$", "this", "->", "isSelected", ";", "if", "(", "is_string", "(", "$", "this", "->", "url", ")", "&&", "$", "th...
Check if this is the current page. @return boolean
[ "Check", "if", "this", "is", "the", "current", "page", "." ]
92597f9a09d086664268d6b7e0111d5a5586d8c7
https://github.com/mpf-soft/admin-widgets/blob/92597f9a09d086664268d6b7e0111d5a5586d8c7/menu/items/Link.php#L165-L186
202,648
mpf-soft/admin-widgets
menu/items/Link.php
Link.getModule
protected function getModule() { $module = \mpf\WebApp::get()->request()->getModule(); if (isset($this->url[2]) && !is_array($this->url[2])) { // is module $module = $this->url[2]; } elseif (isset($this->url[3]) && !is_array($this->url[3])) { // this is module then $m...
php
protected function getModule() { $module = \mpf\WebApp::get()->request()->getModule(); if (isset($this->url[2]) && !is_array($this->url[2])) { // is module $module = $this->url[2]; } elseif (isset($this->url[3]) && !is_array($this->url[3])) { // this is module then $m...
[ "protected", "function", "getModule", "(", ")", "{", "$", "module", "=", "\\", "mpf", "\\", "WebApp", "::", "get", "(", ")", "->", "request", "(", ")", "->", "getModule", "(", ")", ";", "if", "(", "isset", "(", "$", "this", "->", "url", "[", "2",...
Get name of the link module; @return string
[ "Get", "name", "of", "the", "link", "module", ";" ]
92597f9a09d086664268d6b7e0111d5a5586d8c7
https://github.com/mpf-soft/admin-widgets/blob/92597f9a09d086664268d6b7e0111d5a5586d8c7/menu/items/Link.php#L192-L201
202,649
mpf-soft/admin-widgets
menu/items/Link.php
Link.isVisible
public function isVisible() { if ((!is_array($this->url)) || (!$this->visible)) { // if it's not array, or not visible then just return visible value, no need to check anything return $this->visible; } $controller = isset($this->url[0]) ? $this->url[0] : 'home'; $action =...
php
public function isVisible() { if ((!is_array($this->url)) || (!$this->visible)) { // if it's not array, or not visible then just return visible value, no need to check anything return $this->visible; } $controller = isset($this->url[0]) ? $this->url[0] : 'home'; $action =...
[ "public", "function", "isVisible", "(", ")", "{", "if", "(", "(", "!", "is_array", "(", "$", "this", "->", "url", ")", ")", "||", "(", "!", "$", "this", "->", "visible", ")", ")", "{", "// if it's not array, or not visible then just return visible value, no ne...
Check if current item is visible or not. @return boolean
[ "Check", "if", "current", "item", "is", "visible", "or", "not", "." ]
92597f9a09d086664268d6b7e0111d5a5586d8c7
https://github.com/mpf-soft/admin-widgets/blob/92597f9a09d086664268d6b7e0111d5a5586d8c7/menu/items/Link.php#L207-L226
202,650
netbull/CoreBundle
Templating/Helper/PhoneNumberHelper.php
PhoneNumberHelper.format
public function format(PhoneNumber $phoneNumber, $format = PhoneNumberFormat::INTERNATIONAL) { if (true === is_string($format)) { $constant = '\libphonenumber\PhoneNumberFormat::' . $format; if (false === defined($constant)) { throw new InvalidArgumentException('The ...
php
public function format(PhoneNumber $phoneNumber, $format = PhoneNumberFormat::INTERNATIONAL) { if (true === is_string($format)) { $constant = '\libphonenumber\PhoneNumberFormat::' . $format; if (false === defined($constant)) { throw new InvalidArgumentException('The ...
[ "public", "function", "format", "(", "PhoneNumber", "$", "phoneNumber", ",", "$", "format", "=", "PhoneNumberFormat", "::", "INTERNATIONAL", ")", "{", "if", "(", "true", "===", "is_string", "(", "$", "format", ")", ")", "{", "$", "constant", "=", "'\\libph...
Format a phone number. @param PhoneNumber $phoneNumber Phone number. @param int|string $format Format, or format constant name. @return string Formatted phone number. @throws InvalidArgumentException If an argument is invalid.
[ "Format", "a", "phone", "number", "." ]
0bacc1d9e4733b6da613027400c48421e5a14645
https://github.com/netbull/CoreBundle/blob/0bacc1d9e4733b6da613027400c48421e5a14645/Templating/Helper/PhoneNumberHelper.php#L74-L87
202,651
benjamindulau/BarbeQ
src/BarbeQ/BarbeQ.php
BarbeQ.publish
public function publish($queue, MessageInterface $message) { $message->setQueue($queue); $this->getAdapter()->publish($queue, $message); }
php
public function publish($queue, MessageInterface $message) { $message->setQueue($queue); $this->getAdapter()->publish($queue, $message); }
[ "public", "function", "publish", "(", "$", "queue", ",", "MessageInterface", "$", "message", ")", "{", "$", "message", "->", "setQueue", "(", "$", "queue", ")", ";", "$", "this", "->", "getAdapter", "(", ")", "->", "publish", "(", "$", "queue", ",", ...
Publish a message @param string $queue Target queue to push message in @param MessageInterface $message Message content
[ "Publish", "a", "message" ]
d1fd7caa1ba700ac317282948c6fc9d62fe6d523
https://github.com/benjamindulau/BarbeQ/blob/d1fd7caa1ba700ac317282948c6fc9d62fe6d523/src/BarbeQ/BarbeQ.php#L51-L55
202,652
benjamindulau/BarbeQ
src/BarbeQ/BarbeQ.php
BarbeQ.consumeOne
public function consumeOne(MessageInterface $message) { $consumeEvent = new ConsumeEvent($message); try { $this->dispatcher->dispatch(BarbeQEvents::PRE_CONSUME, $consumeEvent); $message->start(); $this->messageDispatcher->dispatch($message->getQueue(),...
php
public function consumeOne(MessageInterface $message) { $consumeEvent = new ConsumeEvent($message); try { $this->dispatcher->dispatch(BarbeQEvents::PRE_CONSUME, $consumeEvent); $message->start(); $this->messageDispatcher->dispatch($message->getQueue(),...
[ "public", "function", "consumeOne", "(", "MessageInterface", "$", "message", ")", "{", "$", "consumeEvent", "=", "new", "ConsumeEvent", "(", "$", "message", ")", ";", "try", "{", "$", "this", "->", "dispatcher", "->", "dispatch", "(", "BarbeQEvents", "::", ...
Dispatches a Message to all interested consumers @param MessageInterface $message @throws ConsumerIndigestionException
[ "Dispatches", "a", "Message", "to", "all", "interested", "consumers" ]
d1fd7caa1ba700ac317282948c6fc9d62fe6d523
https://github.com/benjamindulau/BarbeQ/blob/d1fd7caa1ba700ac317282948c6fc9d62fe6d523/src/BarbeQ/BarbeQ.php#L108-L132
202,653
benjamindulau/BarbeQ
src/BarbeQ/BarbeQ.php
BarbeQ.addConsumer
public function addConsumer($queue, ConsumerInterface $consumer, $priority = 0) { $this->messageDispatcher->addListener($queue, array($consumer, 'consume'), $priority); }
php
public function addConsumer($queue, ConsumerInterface $consumer, $priority = 0) { $this->messageDispatcher->addListener($queue, array($consumer, 'consume'), $priority); }
[ "public", "function", "addConsumer", "(", "$", "queue", ",", "ConsumerInterface", "$", "consumer", ",", "$", "priority", "=", "0", ")", "{", "$", "this", "->", "messageDispatcher", "->", "addListener", "(", "$", "queue", ",", "array", "(", "$", "consumer",...
Adds a consumer for messages from the given queue name @param string $queue @param ConsumerInterface $consumer @param int $priority @return void
[ "Adds", "a", "consumer", "for", "messages", "from", "the", "given", "queue", "name" ]
d1fd7caa1ba700ac317282948c6fc9d62fe6d523
https://github.com/benjamindulau/BarbeQ/blob/d1fd7caa1ba700ac317282948c6fc9d62fe6d523/src/BarbeQ/BarbeQ.php#L157-L160
202,654
robertmain/communique
src/Curl.php
Curl.headers_to_array
private static function headers_to_array($headerContent) { $headers = array(); $arrRequests = explode("\r\n\r\n", $headerContent); foreach (explode("\r\n", $arrRequests[0]) as $i => $line) { if ($i === 0) { $headers['http_code'] = $line; } else { list($key, $value) = explode(': ', $line); $heade...
php
private static function headers_to_array($headerContent) { $headers = array(); $arrRequests = explode("\r\n\r\n", $headerContent); foreach (explode("\r\n", $arrRequests[0]) as $i => $line) { if ($i === 0) { $headers['http_code'] = $line; } else { list($key, $value) = explode(': ', $line); $heade...
[ "private", "static", "function", "headers_to_array", "(", "$", "headerContent", ")", "{", "$", "headers", "=", "array", "(", ")", ";", "$", "arrRequests", "=", "explode", "(", "\"\\r\\n\\r\\n\"", ",", "$", "headerContent", ")", ";", "foreach", "(", "explode"...
Converts a string containing multiple headers into an array that can be used programatically. @param string $headerContent A header string @return array An indexable array of headers
[ "Converts", "a", "string", "containing", "multiple", "headers", "into", "an", "array", "that", "can", "be", "used", "programatically", "." ]
025d4f0f9bc391f6f9fc653a363158d2f83e9051
https://github.com/robertmain/communique/blob/025d4f0f9bc391f6f9fc653a363158d2f83e9051/src/Curl.php#L67-L79
202,655
robertmain/communique
src/Curl.php
Curl.exec
public function exec() { if ($response = curl_exec($this->_ch)) { $header_size = $this->getinfo(CURLINFO_HEADER_SIZE); return array( 'http_status_code' => $this->getinfo(CURLINFO_HTTP_CODE), 'body' => substr($response, $header_size), 'headers' => self::headers_to_array(substr($response, 0, $header_s...
php
public function exec() { if ($response = curl_exec($this->_ch)) { $header_size = $this->getinfo(CURLINFO_HEADER_SIZE); return array( 'http_status_code' => $this->getinfo(CURLINFO_HTTP_CODE), 'body' => substr($response, $header_size), 'headers' => self::headers_to_array(substr($response, 0, $header_s...
[ "public", "function", "exec", "(", ")", "{", "if", "(", "$", "response", "=", "curl_exec", "(", "$", "this", "->", "_ch", ")", ")", "{", "$", "header_size", "=", "$", "this", "->", "getinfo", "(", "CURLINFO_HEADER_SIZE", ")", ";", "return", "array", ...
This function should be called after initializing a cURL session and all the options for the session are set @see http://php.net/manual/en/function.curl-exec.php Official PHP documentation for curl_exec() @return boolean|mixed Returns **TRUE** on success or **FALSE** on failiure. However, if the **CURLOPT_RETURNTAN...
[ "This", "function", "should", "be", "called", "after", "initializing", "a", "cURL", "session", "and", "all", "the", "options", "for", "the", "session", "are", "set" ]
025d4f0f9bc391f6f9fc653a363158d2f83e9051
https://github.com/robertmain/communique/blob/025d4f0f9bc391f6f9fc653a363158d2f83e9051/src/Curl.php#L146-L157
202,656
OxfordInfoLabs/kinikit-core
src/Util/Annotation/ClassAnnotationParser.php
ClassAnnotationParser.parse
public function parse($className) { try { $class = new \ReflectionClass($className); } catch (\ReflectionException $e) { return new ClassAnnotations($className, array(), array(), array()); } // get the master annotations $classComment = $class->getDocC...
php
public function parse($className) { try { $class = new \ReflectionClass($className); } catch (\ReflectionException $e) { return new ClassAnnotations($className, array(), array(), array()); } // get the master annotations $classComment = $class->getDocC...
[ "public", "function", "parse", "(", "$", "className", ")", "{", "try", "{", "$", "class", "=", "new", "\\", "ReflectionClass", "(", "$", "className", ")", ";", "}", "catch", "(", "\\", "ReflectionException", "$", "e", ")", "{", "return", "new", "ClassA...
Parse annotations for a class
[ "Parse", "annotations", "for", "a", "class" ]
edc1b2e6ffabd595c4c7d322279b3dd1e59ef359
https://github.com/OxfordInfoLabs/kinikit-core/blob/edc1b2e6ffabd595c4c7d322279b3dd1e59ef359/src/Util/Annotation/ClassAnnotationParser.php#L29-L84
202,657
OxfordInfoLabs/kinikit-core
src/Util/Annotation/ClassAnnotationParser.php
ClassAnnotationParser.cleanComment
private function cleanComment($comment) { $commentLines = explode(PHP_EOL, $comment); for ($i = sizeof($commentLines) - 1; $i >= 0; $i--) { $commentLine = $commentLines[$i]; if (is_numeric(strpos($commentLine, "/**")) || is_numeric(strpos($commentLine, "*/")) || ...
php
private function cleanComment($comment) { $commentLines = explode(PHP_EOL, $comment); for ($i = sizeof($commentLines) - 1; $i >= 0; $i--) { $commentLine = $commentLines[$i]; if (is_numeric(strpos($commentLine, "/**")) || is_numeric(strpos($commentLine, "*/")) || ...
[ "private", "function", "cleanComment", "(", "$", "comment", ")", "{", "$", "commentLines", "=", "explode", "(", "PHP_EOL", ",", "$", "comment", ")", ";", "for", "(", "$", "i", "=", "sizeof", "(", "$", "commentLines", ")", "-", "1", ";", "$", "i", "...
Clean a comment
[ "Clean", "a", "comment" ]
edc1b2e6ffabd595c4c7d322279b3dd1e59ef359
https://github.com/OxfordInfoLabs/kinikit-core/blob/edc1b2e6ffabd595c4c7d322279b3dd1e59ef359/src/Util/Annotation/ClassAnnotationParser.php#L104-L117
202,658
ekyna/Table
Util/FilterOperator.php
FilterOperator.isValid
static public function isValid($operator, $throwException = false) { $operator = intval($operator); if ($operator > 0 && $operator <= static::IS_NOT_NULL) { return true; } if ($throwException) { throw new InvalidArgumentException('Unexpected filter operator.'...
php
static public function isValid($operator, $throwException = false) { $operator = intval($operator); if ($operator > 0 && $operator <= static::IS_NOT_NULL) { return true; } if ($throwException) { throw new InvalidArgumentException('Unexpected filter operator.'...
[ "static", "public", "function", "isValid", "(", "$", "operator", ",", "$", "throwException", "=", "false", ")", "{", "$", "operator", "=", "intval", "(", "$", "operator", ")", ";", "if", "(", "$", "operator", ">", "0", "&&", "$", "operator", "<=", "s...
Returns whether the operator is valid or not. @param string $operator @param bool $throwException @return bool
[ "Returns", "whether", "the", "operator", "is", "valid", "or", "not", "." ]
6f06e8fd8a3248d52f3a91f10508471344db311a
https://github.com/ekyna/Table/blob/6f06e8fd8a3248d52f3a91f10508471344db311a/Util/FilterOperator.php#L60-L72
202,659
ekyna/Table
Util/FilterOperator.php
FilterOperator.getChoices
static public function getChoices(array $operators) { $choices = []; foreach ($operators as $operator) { $choices[static::getLabel($operator)] = $operator; } return $choices; }
php
static public function getChoices(array $operators) { $choices = []; foreach ($operators as $operator) { $choices[static::getLabel($operator)] = $operator; } return $choices; }
[ "static", "public", "function", "getChoices", "(", "array", "$", "operators", ")", "{", "$", "choices", "=", "[", "]", ";", "foreach", "(", "$", "operators", "as", "$", "operator", ")", "{", "$", "choices", "[", "static", "::", "getLabel", "(", "$", ...
Returns the available operators choices. @param array $operators @return array
[ "Returns", "the", "available", "operators", "choices", "." ]
6f06e8fd8a3248d52f3a91f10508471344db311a
https://github.com/ekyna/Table/blob/6f06e8fd8a3248d52f3a91f10508471344db311a/Util/FilterOperator.php#L127-L135
202,660
romm/configuration_object
Classes/Traits/ConfigurationObject/MagicMethodsTrait.php
MagicMethodsTrait.isPropertyAccessible
private function isPropertyAccessible($propertyName) { $result = false; $className = get_class($this); $reflectionService = ReflectionService::get(); if ($reflectionService->isClassPropertyAccessible($className, $propertyName)) { $property = $reflectionService->getClassA...
php
private function isPropertyAccessible($propertyName) { $result = false; $className = get_class($this); $reflectionService = ReflectionService::get(); if ($reflectionService->isClassPropertyAccessible($className, $propertyName)) { $property = $reflectionService->getClassA...
[ "private", "function", "isPropertyAccessible", "(", "$", "propertyName", ")", "{", "$", "result", "=", "false", ";", "$", "className", "=", "get_class", "(", "$", "this", ")", ";", "$", "reflectionService", "=", "ReflectionService", "::", "get", "(", ")", ...
Returns true if the given property name is accessible for the current instance of this class. Note that the list of accessible properties for this class is stored in cache to improve performances. @param string $propertyName @return bool
[ "Returns", "true", "if", "the", "given", "property", "name", "is", "accessible", "for", "the", "current", "instance", "of", "this", "class", "." ]
d3a40903386c2e0766bd8279337fe6da45cf5ce3
https://github.com/romm/configuration_object/blob/d3a40903386c2e0766bd8279337fe6da45cf5ce3/Classes/Traits/ConfigurationObject/MagicMethodsTrait.php#L127-L139
202,661
jaypha/mysqli-ext
src/MySQLiExt.php
MySQLiExtTrait.queryColumn
function queryColumn($query) { $data = []; $res = $this->q($query); while ($row = $res->fetch_row()) { if ($res->field_count == 1) $data[] = $row[0]; else $data[$row[0]] = $row[1]; } $res->close(); return $data; }
php
function queryColumn($query) { $data = []; $res = $this->q($query); while ($row = $res->fetch_row()) { if ($res->field_count == 1) $data[] = $row[0]; else $data[$row[0]] = $row[1]; } $res->close(); return $data; }
[ "function", "queryColumn", "(", "$", "query", ")", "{", "$", "data", "=", "[", "]", ";", "$", "res", "=", "$", "this", "->", "q", "(", "$", "query", ")", ";", "while", "(", "$", "row", "=", "$", "res", "->", "fetch_row", "(", ")", ")", "{", ...
If two fields are queried, the first is used as an index.
[ "If", "two", "fields", "are", "queried", "the", "first", "is", "used", "as", "an", "index", "." ]
b13ea5dfeef4090fcd235f8aaa25728a582a93c2
https://github.com/jaypha/mysqli-ext/blob/b13ea5dfeef4090fcd235f8aaa25728a582a93c2/src/MySQLiExt.php#L127-L140
202,662
pixelpolishers/makedocs
src/MakeDocs/Generator/Generator.php
Generator.getPageManager
public function getPageManager() { if ($this->pageManager === null) { $this->pageManager = new PageManager($this); } return $this->pageManager; }
php
public function getPageManager() { if ($this->pageManager === null) { $this->pageManager = new PageManager($this); } return $this->pageManager; }
[ "public", "function", "getPageManager", "(", ")", "{", "if", "(", "$", "this", "->", "pageManager", "===", "null", ")", "{", "$", "this", "->", "pageManager", "=", "new", "PageManager", "(", "$", "this", ")", ";", "}", "return", "$", "this", "->", "p...
Gets the page manager. @return PageManager
[ "Gets", "the", "page", "manager", "." ]
1fa243b52565b5de417ef2dbdfbcae9896b6b483
https://github.com/pixelpolishers/makedocs/blob/1fa243b52565b5de417ef2dbdfbcae9896b6b483/src/MakeDocs/Generator/Generator.php#L80-L86
202,663
pixelpolishers/makedocs
src/MakeDocs/Generator/Generator.php
Generator.getConfig
public function getConfig() { if ($this->config === null) { $path = $this->getInputDirectory() . '/makedocs.json'; if (!is_file($path)) { throw new \RuntimeException('The input directory does not contain a makedocs.json file.'); } $data = json...
php
public function getConfig() { if ($this->config === null) { $path = $this->getInputDirectory() . '/makedocs.json'; if (!is_file($path)) { throw new \RuntimeException('The input directory does not contain a makedocs.json file.'); } $data = json...
[ "public", "function", "getConfig", "(", ")", "{", "if", "(", "$", "this", "->", "config", "===", "null", ")", "{", "$", "path", "=", "$", "this", "->", "getInputDirectory", "(", ")", ".", "'/makedocs.json'", ";", "if", "(", "!", "is_file", "(", "$", ...
Gets the configuration of the project to generate the documentation for. @return Config @throws \RuntimeException
[ "Gets", "the", "configuration", "of", "the", "project", "to", "generate", "the", "documentation", "for", "." ]
1fa243b52565b5de417ef2dbdfbcae9896b6b483
https://github.com/pixelpolishers/makedocs/blob/1fa243b52565b5de417ef2dbdfbcae9896b6b483/src/MakeDocs/Generator/Generator.php#L159-L175
202,664
pixelpolishers/makedocs
src/MakeDocs/Generator/Generator.php
Generator.generate
public function generate() { if (!is_dir($this->getInputDirectory())) { throw new \RuntimeException('The MakeDocs input directory does not exist.'); } if (!$this->builders) { throw new \RuntimeException('No MakeDocs builders present.'); } // First we...
php
public function generate() { if (!is_dir($this->getInputDirectory())) { throw new \RuntimeException('The MakeDocs input directory does not exist.'); } if (!$this->builders) { throw new \RuntimeException('No MakeDocs builders present.'); } // First we...
[ "public", "function", "generate", "(", ")", "{", "if", "(", "!", "is_dir", "(", "$", "this", "->", "getInputDirectory", "(", ")", ")", ")", "{", "throw", "new", "\\", "RuntimeException", "(", "'The MakeDocs input directory does not exist.'", ")", ";", "}", "...
Generates the documentation for all the renderers.
[ "Generates", "the", "documentation", "for", "all", "the", "renderers", "." ]
1fa243b52565b5de417ef2dbdfbcae9896b6b483
https://github.com/pixelpolishers/makedocs/blob/1fa243b52565b5de417ef2dbdfbcae9896b6b483/src/MakeDocs/Generator/Generator.php#L180-L201
202,665
gplcart/cli
controllers/commands/Event.php
Event.cmdGetEvent
public function cmdGetEvent() { $result = $this->getListEvent(); $this->outputFormat($result); $this->outputFormatTableEvent($result); $this->output(); }
php
public function cmdGetEvent() { $result = $this->getListEvent(); $this->outputFormat($result); $this->outputFormatTableEvent($result); $this->output(); }
[ "public", "function", "cmdGetEvent", "(", ")", "{", "$", "result", "=", "$", "this", "->", "getListEvent", "(", ")", ";", "$", "this", "->", "outputFormat", "(", "$", "result", ")", ";", "$", "this", "->", "outputFormatTableEvent", "(", "$", "result", ...
Callback for "event-get" command
[ "Callback", "for", "event", "-", "get", "command" ]
e57dba53e291a225b4bff0c0d9b23d685dd1c125
https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/Event.php#L40-L46
202,666
gplcart/cli
controllers/commands/Event.php
Event.cmdDeleteEvent
public function cmdDeleteEvent() { if ($this->getParam('expired')) { $this->report->deleteExpired(); } else { $this->report->delete(); } $this->output(); }
php
public function cmdDeleteEvent() { if ($this->getParam('expired')) { $this->report->deleteExpired(); } else { $this->report->delete(); } $this->output(); }
[ "public", "function", "cmdDeleteEvent", "(", ")", "{", "if", "(", "$", "this", "->", "getParam", "(", "'expired'", ")", ")", "{", "$", "this", "->", "report", "->", "deleteExpired", "(", ")", ";", "}", "else", "{", "$", "this", "->", "report", "->", ...
Callback for "event-delete" command
[ "Callback", "for", "event", "-", "delete", "command" ]
e57dba53e291a225b4bff0c0d9b23d685dd1c125
https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/Event.php#L51-L60
202,667
gplcart/cli
controllers/commands/Event.php
Event.getListEvent
protected function getListEvent() { $options = array( 'order' => 'desc', 'sort' => 'created', 'limit' => $this->getLimit(), 'severity' => $this->getParam('severity') ); return (array) $this->report->getList($options); }
php
protected function getListEvent() { $options = array( 'order' => 'desc', 'sort' => 'created', 'limit' => $this->getLimit(), 'severity' => $this->getParam('severity') ); return (array) $this->report->getList($options); }
[ "protected", "function", "getListEvent", "(", ")", "{", "$", "options", "=", "array", "(", "'order'", "=>", "'desc'", ",", "'sort'", "=>", "'created'", ",", "'limit'", "=>", "$", "this", "->", "getLimit", "(", ")", ",", "'severity'", "=>", "$", "this", ...
Returns an array of events @return array
[ "Returns", "an", "array", "of", "events" ]
e57dba53e291a225b4bff0c0d9b23d685dd1c125
https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/Event.php#L66-L76
202,668
gplcart/cli
controllers/commands/Event.php
Event.outputFormatTableEvent
protected function outputFormatTableEvent(array $events) { $header = array( $this->text('Text'), $this->text('Type'), $this->text('Severity'), $this->text('Created') ); $rows = array(); foreach ($events as $item) { $text =...
php
protected function outputFormatTableEvent(array $events) { $header = array( $this->text('Text'), $this->text('Type'), $this->text('Severity'), $this->text('Created') ); $rows = array(); foreach ($events as $item) { $text =...
[ "protected", "function", "outputFormatTableEvent", "(", "array", "$", "events", ")", "{", "$", "header", "=", "array", "(", "$", "this", "->", "text", "(", "'Text'", ")", ",", "$", "this", "->", "text", "(", "'Type'", ")", ",", "$", "this", "->", "te...
Output events in a table @param array $events
[ "Output", "events", "in", "a", "table" ]
e57dba53e291a225b4bff0c0d9b23d685dd1c125
https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/Event.php#L82-L104
202,669
Wedeto/DB
src/Query/TableClause.php
TableClause.toSQL
public function toSQL(Parameters $params, bool $inner_clause) { $name = $this->getTable(); $alias = $this->getAlias(); $prefix_disabled = $this->getDisablePrefixing(); $drv = $params->getDriver(); list($tname, $talias) = $params->resolveTable($name); if (!empty($tali...
php
public function toSQL(Parameters $params, bool $inner_clause) { $name = $this->getTable(); $alias = $this->getAlias(); $prefix_disabled = $this->getDisablePrefixing(); $drv = $params->getDriver(); list($tname, $talias) = $params->resolveTable($name); if (!empty($tali...
[ "public", "function", "toSQL", "(", "Parameters", "$", "params", ",", "bool", "$", "inner_clause", ")", "{", "$", "name", "=", "$", "this", "->", "getTable", "(", ")", ";", "$", "alias", "=", "$", "this", "->", "getAlias", "(", ")", ";", "$", "pref...
Write an function as SQL query syntax @param Parameters $params The query parameters: tables and placeholder values @param bool $inner_clause Unused @return string The generated SQL
[ "Write", "an", "function", "as", "SQL", "query", "syntax" ]
715f8f2e3ae6b53c511c40b620921cb9c87e6f62
https://github.com/Wedeto/DB/blob/715f8f2e3ae6b53c511c40b620921cb9c87e6f62/src/Query/TableClause.php#L92-L104
202,670
Wedeto/FileFormats
src/CSV/Reader.php
Reader.readFile
public function readFile(string $file_name) { $data = array(); $this->file_handle = fopen($file_name, "r"); foreach ($this as $row) $data[] = $row; return $data; }
php
public function readFile(string $file_name) { $data = array(); $this->file_handle = fopen($file_name, "r"); foreach ($this as $row) $data[] = $row; return $data; }
[ "public", "function", "readFile", "(", "string", "$", "file_name", ")", "{", "$", "data", "=", "array", "(", ")", ";", "$", "this", "->", "file_handle", "=", "fopen", "(", "$", "file_name", ",", "\"r\"", ")", ";", "foreach", "(", "$", "this", "as", ...
Read CSV data from a file @param string $file_name The name of the file to read @return array The parsed data
[ "Read", "CSV", "data", "from", "a", "file" ]
65b71fbd38a2ee6b504622aca4f4047ce9d31e9f
https://github.com/Wedeto/FileFormats/blob/65b71fbd38a2ee6b504622aca4f4047ce9d31e9f/src/CSV/Reader.php#L151-L160
202,671
Wedeto/FileFormats
src/CSV/Reader.php
Reader.readFileHandle
public function readFileHandle($file_handle) { if (!is_resource($file_handle)) throw new \InvalidArgumentException("No file handle was provided"); $data = array(); $this->file_handle = $file_handle; foreach ($this as $row) $data[] = $row; return $da...
php
public function readFileHandle($file_handle) { if (!is_resource($file_handle)) throw new \InvalidArgumentException("No file handle was provided"); $data = array(); $this->file_handle = $file_handle; foreach ($this as $row) $data[] = $row; return $da...
[ "public", "function", "readFileHandle", "(", "$", "file_handle", ")", "{", "if", "(", "!", "is_resource", "(", "$", "file_handle", ")", ")", "throw", "new", "\\", "InvalidArgumentException", "(", "\"No file handle was provided\"", ")", ";", "$", "data", "=", "...
Read CSV from a stream. @param resource $file_handle The stream to read CSV from @return array The parsed data
[ "Read", "CSV", "from", "a", "stream", "." ]
65b71fbd38a2ee6b504622aca4f4047ce9d31e9f
https://github.com/Wedeto/FileFormats/blob/65b71fbd38a2ee6b504622aca4f4047ce9d31e9f/src/CSV/Reader.php#L168-L180
202,672
Wedeto/FileFormats
src/CSV/Reader.php
Reader.readString
public function readString(string $data) { $this->file_handle = fopen('php://temp', 'rw'); fwrite($this->file_handle, $data); $data = array(); foreach ($this as $row) $data[] = $row; return $data; }
php
public function readString(string $data) { $this->file_handle = fopen('php://temp', 'rw'); fwrite($this->file_handle, $data); $data = array(); foreach ($this as $row) $data[] = $row; return $data; }
[ "public", "function", "readString", "(", "string", "$", "data", ")", "{", "$", "this", "->", "file_handle", "=", "fopen", "(", "'php://temp'", ",", "'rw'", ")", ";", "fwrite", "(", "$", "this", "->", "file_handle", ",", "$", "data", ")", ";", "$", "d...
Read CSV from a string. This will write the data to a temporary stream @param string $data The data to read as CSV @return array The parsed data
[ "Read", "CSV", "from", "a", "string", ".", "This", "will", "write", "the", "data", "to", "a", "temporary", "stream" ]
65b71fbd38a2ee6b504622aca4f4047ce9d31e9f
https://github.com/Wedeto/FileFormats/blob/65b71fbd38a2ee6b504622aca4f4047ce9d31e9f/src/CSV/Reader.php#L188-L198
202,673
Wedeto/FileFormats
src/CSV/Reader.php
Reader.rewind
public function rewind() { rewind($this->file_handle); $this->line_number = 0; $this->current_line = null; $this->header = null; }
php
public function rewind() { rewind($this->file_handle); $this->line_number = 0; $this->current_line = null; $this->header = null; }
[ "public", "function", "rewind", "(", ")", "{", "rewind", "(", "$", "this", "->", "file_handle", ")", ";", "$", "this", "->", "line_number", "=", "0", ";", "$", "this", "->", "current_line", "=", "null", ";", "$", "this", "->", "header", "=", "null", ...
Rewind the file handle to the start
[ "Rewind", "the", "file", "handle", "to", "the", "start" ]
65b71fbd38a2ee6b504622aca4f4047ce9d31e9f
https://github.com/Wedeto/FileFormats/blob/65b71fbd38a2ee6b504622aca4f4047ce9d31e9f/src/CSV/Reader.php#L203-L209
202,674
covex-nn/JooS
src/JooS/Options.php
Options.loadJson
public function loadJson($filename) { $result = false; if (file_exists($filename) && is_file($filename)) { $json = file_get_contents($filename); $data = json_decode($json, true); if (is_array($data)) { foreach ($data as $name => $value) { $this->__set($name, $value); ...
php
public function loadJson($filename) { $result = false; if (file_exists($filename) && is_file($filename)) { $json = file_get_contents($filename); $data = json_decode($json, true); if (is_array($data)) { foreach ($data as $name => $value) { $this->__set($name, $value); ...
[ "public", "function", "loadJson", "(", "$", "filename", ")", "{", "$", "result", "=", "false", ";", "if", "(", "file_exists", "(", "$", "filename", ")", "&&", "is_file", "(", "$", "filename", ")", ")", "{", "$", "json", "=", "file_get_contents", "(", ...
Load options from filename.json @param string $filename Path to config file @return boolean
[ "Load", "options", "from", "filename", ".", "json" ]
8dfb94edccecaf307787d4091ba7f20a674b7792
https://github.com/covex-nn/JooS/blob/8dfb94edccecaf307787d4091ba7f20a674b7792/src/JooS/Options.php#L99-L113
202,675
covex-nn/JooS
src/JooS/Options.php
Options.getDefault
protected function getDefault($name) { if (is_null($this->_defaultData)) { $subject = $this->getSubject(); if (!is_null($subject) && $subject instanceof Options_Subject) { $this->_defaultData = $subject->getDefaultOptions(); } else { $this->_defaultData = array(); } } ...
php
protected function getDefault($name) { if (is_null($this->_defaultData)) { $subject = $this->getSubject(); if (!is_null($subject) && $subject instanceof Options_Subject) { $this->_defaultData = $subject->getDefaultOptions(); } else { $this->_defaultData = array(); } } ...
[ "protected", "function", "getDefault", "(", "$", "name", ")", "{", "if", "(", "is_null", "(", "$", "this", "->", "_defaultData", ")", ")", "{", "$", "subject", "=", "$", "this", "->", "getSubject", "(", ")", ";", "if", "(", "!", "is_null", "(", "$"...
Return default value @param string $name Property name @return mixed
[ "Return", "default", "value" ]
8dfb94edccecaf307787d4091ba7f20a674b7792
https://github.com/covex-nn/JooS/blob/8dfb94edccecaf307787d4091ba7f20a674b7792/src/JooS/Options.php#L146-L164
202,676
field-interactive/cito-bundle
Controller/CitoController.php
CitoController.getLocaleFromUrl
protected function getLocaleFromUrl(string $url) { $locale = trim(substr($url, 0, 3), '/'); if (strlen($locale) > 2 || strlen($locale) < 2) { return false; } return $locale; }
php
protected function getLocaleFromUrl(string $url) { $locale = trim(substr($url, 0, 3), '/'); if (strlen($locale) > 2 || strlen($locale) < 2) { return false; } return $locale; }
[ "protected", "function", "getLocaleFromUrl", "(", "string", "$", "url", ")", "{", "$", "locale", "=", "trim", "(", "substr", "(", "$", "url", ",", "0", ",", "3", ")", ",", "'/'", ")", ";", "if", "(", "strlen", "(", "$", "locale", ")", ">", "2", ...
Gets the locale out of the url if it's in return string|false
[ "Gets", "the", "locale", "out", "of", "the", "url", "if", "it", "s", "in" ]
41cab570f960d964916e278c616720b17de258c1
https://github.com/field-interactive/cito-bundle/blob/41cab570f960d964916e278c616720b17de258c1/Controller/CitoController.php#L110-L118
202,677
field-interactive/cito-bundle
Controller/CitoController.php
CitoController.isUARouted
protected function isUARouted(string $url) { $exploded = explode('/', $url); $uaRoute = $exploded[0]; $routingData = $this->getParameter('field_cito.routing.user_agent_routing'); foreach ($routingData as $route => $browsers) { if ($route === $uaRoute) { r...
php
protected function isUARouted(string $url) { $exploded = explode('/', $url); $uaRoute = $exploded[0]; $routingData = $this->getParameter('field_cito.routing.user_agent_routing'); foreach ($routingData as $route => $browsers) { if ($route === $uaRoute) { r...
[ "protected", "function", "isUARouted", "(", "string", "$", "url", ")", "{", "$", "exploded", "=", "explode", "(", "'/'", ",", "$", "url", ")", ";", "$", "uaRoute", "=", "$", "exploded", "[", "0", "]", ";", "$", "routingData", "=", "$", "this", "->"...
Checks if UserAgent is Routed
[ "Checks", "if", "UserAgent", "is", "Routed" ]
41cab570f960d964916e278c616720b17de258c1
https://github.com/field-interactive/cito-bundle/blob/41cab570f960d964916e278c616720b17de258c1/Controller/CitoController.php#L123-L135
202,678
field-interactive/cito-bundle
Controller/CitoController.php
CitoController.getBrowserData
protected static function getBrowserData($userAgent) { $matches = []; if (strpos($userAgent, 'Opera') !== false) { $browserName = 'Opera'; preg_match_all('/Version\/([\d]+)/', $_SERVER['HTTP_USER_AGENT'], $matches); } elseif (strpos($userAgent, 'OPR/') !== false) { ...
php
protected static function getBrowserData($userAgent) { $matches = []; if (strpos($userAgent, 'Opera') !== false) { $browserName = 'Opera'; preg_match_all('/Version\/([\d]+)/', $_SERVER['HTTP_USER_AGENT'], $matches); } elseif (strpos($userAgent, 'OPR/') !== false) { ...
[ "protected", "static", "function", "getBrowserData", "(", "$", "userAgent", ")", "{", "$", "matches", "=", "[", "]", ";", "if", "(", "strpos", "(", "$", "userAgent", ",", "'Opera'", ")", "!==", "false", ")", "{", "$", "browserName", "=", "'Opera'", ";"...
Gets the browser data
[ "Gets", "the", "browser", "data" ]
41cab570f960d964916e278c616720b17de258c1
https://github.com/field-interactive/cito-bundle/blob/41cab570f960d964916e278c616720b17de258c1/Controller/CitoController.php#L140-L175
202,679
wb-crowdfusion/crowdfusion
system/core/classes/mvc/templateengines/PresenterTemplateEngine.php
PresenterTemplateEngine.render
protected function render(Template $template) { $presenter = $this->createPresenter($template->getPresenter()); try { $arguments = $this->getArguments($presenter, $template); $this->logger->debug($arguments); $result = call_user_func_array($presenter, $arguments)...
php
protected function render(Template $template) { $presenter = $this->createPresenter($template->getPresenter()); try { $arguments = $this->getArguments($presenter, $template); $this->logger->debug($arguments); $result = call_user_func_array($presenter, $arguments)...
[ "protected", "function", "render", "(", "Template", "$", "template", ")", "{", "$", "presenter", "=", "$", "this", "->", "createPresenter", "(", "$", "template", "->", "getPresenter", "(", ")", ")", ";", "try", "{", "$", "arguments", "=", "$", "this", ...
Loads a presenter, calls its method and returns the result. @param Template $template @return string @throws Exception
[ "Loads", "a", "presenter", "calls", "its", "method", "and", "returns", "the", "result", "." ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/mvc/templateengines/PresenterTemplateEngine.php#L159-L182
202,680
wb-crowdfusion/crowdfusion
system/core/classes/mvc/templateengines/PresenterTemplateEngine.php
PresenterTemplateEngine.createPresenter
protected function createPresenter($presenter) { if (false === strpos($presenter, '::')) { throw new TemplateEngineException(sprintf('Presenter must be in the format class|service::method', $presenter)); } list($class, $method) = explode('::', $presenter, 2); $presenter ...
php
protected function createPresenter($presenter) { if (false === strpos($presenter, '::')) { throw new TemplateEngineException(sprintf('Presenter must be in the format class|service::method', $presenter)); } list($class, $method) = explode('::', $presenter, 2); $presenter ...
[ "protected", "function", "createPresenter", "(", "$", "presenter", ")", "{", "if", "(", "false", "===", "strpos", "(", "$", "presenter", ",", "'::'", ")", ")", "{", "throw", "new", "TemplateEngineException", "(", "sprintf", "(", "'Presenter must be in the format...
Returns a callable for the given presenter. @param string $presenter A Presenter string @return mixed A PHP callable @throws TemplateEngineException
[ "Returns", "a", "callable", "for", "the", "given", "presenter", "." ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/mvc/templateengines/PresenterTemplateEngine.php#L193-L207
202,681
kyoya-de/random-string-generator
lib/Generator.php
Generator.generate
public function generate($length) { $realPool = $this->mergePools($this->characterPools); $max = (count($realPool) - 1); mt_srand(); $randomString = ''; for ($i = 0; $i < $length; $i++) { $randomString .= $realPool[mt_rand(0, $max)]; } return $r...
php
public function generate($length) { $realPool = $this->mergePools($this->characterPools); $max = (count($realPool) - 1); mt_srand(); $randomString = ''; for ($i = 0; $i < $length; $i++) { $randomString .= $realPool[mt_rand(0, $max)]; } return $r...
[ "public", "function", "generate", "(", "$", "length", ")", "{", "$", "realPool", "=", "$", "this", "->", "mergePools", "(", "$", "this", "->", "characterPools", ")", ";", "$", "max", "=", "(", "count", "(", "$", "realPool", ")", "-", "1", ")", ";",...
Generates a random string with the given length based on the character pools. @param int $length Length of the result string. @return string
[ "Generates", "a", "random", "string", "with", "the", "given", "length", "based", "on", "the", "character", "pools", "." ]
9c8212ddd093c23e2af73840330fc62db48c0023
https://github.com/kyoya-de/random-string-generator/blob/9c8212ddd093c23e2af73840330fc62db48c0023/lib/Generator.php#L50-L63
202,682
kyoya-de/random-string-generator
lib/Generator.php
Generator.mergePools
protected function mergePools($pools) { $mergedPool = []; foreach ($pools as $pool) { foreach ($pool->getCharacters() as $character) { $mergedPool[] = $character; } } return $mergedPool; }
php
protected function mergePools($pools) { $mergedPool = []; foreach ($pools as $pool) { foreach ($pool->getCharacters() as $character) { $mergedPool[] = $character; } } return $mergedPool; }
[ "protected", "function", "mergePools", "(", "$", "pools", ")", "{", "$", "mergedPool", "=", "[", "]", ";", "foreach", "(", "$", "pools", "as", "$", "pool", ")", "{", "foreach", "(", "$", "pool", "->", "getCharacters", "(", ")", "as", "$", "character"...
Merges all characters from the registered pools into one array. @param CharacterPoolInterface[] $pools @return array
[ "Merges", "all", "characters", "from", "the", "registered", "pools", "into", "one", "array", "." ]
9c8212ddd093c23e2af73840330fc62db48c0023
https://github.com/kyoya-de/random-string-generator/blob/9c8212ddd093c23e2af73840330fc62db48c0023/lib/Generator.php#L72-L83
202,683
Dhii/callback-abstract
src/ValidateParamsCapableTrait.php
ValidateParamsCapableTrait._validateParams
protected function _validateParams($args, $spec) { $errors = $this->_getArgsListErrors($args, $spec); if ($this->_countIterable($errors)) { throw $this->_createValidationFailedException(null, null, null, null, $args, $errors); } }
php
protected function _validateParams($args, $spec) { $errors = $this->_getArgsListErrors($args, $spec); if ($this->_countIterable($errors)) { throw $this->_createValidationFailedException(null, null, null, null, $args, $errors); } }
[ "protected", "function", "_validateParams", "(", "$", "args", ",", "$", "spec", ")", "{", "$", "errors", "=", "$", "this", "->", "_getArgsListErrors", "(", "$", "args", ",", "$", "spec", ")", ";", "if", "(", "$", "this", "->", "_countIterable", "(", ...
Validates a function or method's arguments according to the method's parameter specification. @since [*next-version*] @param array $args The arguments to validate. @param ReflectionParameter[]|stdClass|Traversable $spec The parameter specification.
[ "Validates", "a", "function", "or", "method", "s", "arguments", "according", "to", "the", "method", "s", "parameter", "specification", "." ]
43ed4e99fc6ccdaf46a25d06da482a2fba8d9b19
https://github.com/Dhii/callback-abstract/blob/43ed4e99fc6ccdaf46a25d06da482a2fba8d9b19/src/ValidateParamsCapableTrait.php#L29-L35
202,684
the-eater/odango.php
src/NyaaMatcher/Fuzzy.php
Fuzzy.construct
public static function construct($minMatches = .7, $maxDistance = .2) { $fuzzy = new static(); $fuzzy->minMatches = $minMatches; $fuzzy->maxDistance = $maxDistance; return $fuzzy; }
php
public static function construct($minMatches = .7, $maxDistance = .2) { $fuzzy = new static(); $fuzzy->minMatches = $minMatches; $fuzzy->maxDistance = $maxDistance; return $fuzzy; }
[ "public", "static", "function", "construct", "(", "$", "minMatches", "=", ".7", ",", "$", "maxDistance", "=", ".2", ")", "{", "$", "fuzzy", "=", "new", "static", "(", ")", ";", "$", "fuzzy", "->", "minMatches", "=", "$", "minMatches", ";", "$", "fuzz...
Creates a new instance of NyaaMatcher\Fuzzy @param int $minMatches The ratio of minimal amount of words that should fall in the max distance to match (0 - 1) @param int $maxDistance The max distance of how different a word may be to match @return NyaaMatcher\Fuzzy
[ "Creates", "a", "new", "instance", "of", "NyaaMatcher", "\\", "Fuzzy" ]
6c78f983e7b3c49ff2f8a10ce7299747d3c82e3f
https://github.com/the-eater/odango.php/blob/6c78f983e7b3c49ff2f8a10ce7299747d3c82e3f/src/NyaaMatcher/Fuzzy.php#L16-L23
202,685
translationexchange/tml-php-clientsdk
library/Tr8n/Translation.php
Translation.calculatePrecedence
public function calculatePrecedence() { $this->precedence = 0; if (!$this->hasContextRules()) { return; } foreach($this->context as $token_name=>$rules) { foreach($rules as $context_key=>$rule_key) { if ($rule_key == "other") ...
php
public function calculatePrecedence() { $this->precedence = 0; if (!$this->hasContextRules()) { return; } foreach($this->context as $token_name=>$rules) { foreach($rules as $context_key=>$rule_key) { if ($rule_key == "other") ...
[ "public", "function", "calculatePrecedence", "(", ")", "{", "$", "this", "->", "precedence", "=", "0", ";", "if", "(", "!", "$", "this", "->", "hasContextRules", "(", ")", ")", "{", "return", ";", "}", "foreach", "(", "$", "this", "->", "context", "a...
the precedence is based on the number of fallback rules in the context. a fallback rule is indicated by the keyword "other" the more "others" are used the lower the precedence will be 0 indicates the highest precedence
[ "the", "precedence", "is", "based", "on", "the", "number", "of", "fallback", "rules", "in", "the", "context", ".", "a", "fallback", "rule", "is", "indicated", "by", "the", "keyword", "other", "the", "more", "others", "are", "used", "the", "lower", "the", ...
fe51473824e62cfd883c6aa0c6a3783a16ce8425
https://github.com/translationexchange/tml-php-clientsdk/blob/fe51473824e62cfd883c6aa0c6a3783a16ce8425/library/Tr8n/Translation.php#L103-L116
202,686
ColonelBlimp/NsanjaCore
src/Nsanja/Core/Util.php
Util.scanDirectory
public function scanDirectory(string $path): array { $files = []; $rdi = new \RecursiveDirectoryIterator( $path, \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::KEY_AS_FILENAME | \FilesystemIterator::CURRENT_AS_FILEINFO ); $rii ...
php
public function scanDirectory(string $path): array { $files = []; $rdi = new \RecursiveDirectoryIterator( $path, \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::KEY_AS_FILENAME | \FilesystemIterator::CURRENT_AS_FILEINFO ); $rii ...
[ "public", "function", "scanDirectory", "(", "string", "$", "path", ")", ":", "array", "{", "$", "files", "=", "[", "]", ";", "$", "rdi", "=", "new", "\\", "RecursiveDirectoryIterator", "(", "$", "path", ",", "\\", "FilesystemIterator", "::", "SKIP_DOTS", ...
Scans the given directory and its sub-directories and returns a list of all the files @return array
[ "Scans", "the", "given", "directory", "and", "its", "sub", "-", "directories", "and", "returns", "a", "list", "of", "all", "the", "files" ]
935b7363ae21b340eaa5867560a29f965ec7d012
https://github.com/ColonelBlimp/NsanjaCore/blob/935b7363ae21b340eaa5867560a29f965ec7d012/src/Nsanja/Core/Util.php#L35-L53
202,687
ColonelBlimp/NsanjaCore
src/Nsanja/Core/Util.php
Util.markdownToText
public function markdownToText(string $markdown): string { if (empty($markdown)) { return ''; } $pattern = array( '/(\.|)#/', '/(\.|)\*/', '/(\.|)~/' ); return preg_replace($pattern, '', $markdown); }
php
public function markdownToText(string $markdown): string { if (empty($markdown)) { return ''; } $pattern = array( '/(\.|)#/', '/(\.|)\*/', '/(\.|)~/' ); return preg_replace($pattern, '', $markdown); }
[ "public", "function", "markdownToText", "(", "string", "$", "markdown", ")", ":", "string", "{", "if", "(", "empty", "(", "$", "markdown", ")", ")", "{", "return", "''", ";", "}", "$", "pattern", "=", "array", "(", "'/(\\.|)#/'", ",", "'/(\\.|)\\*/'", ...
Strips the given text of the markdown but not '\n'. @param string $markdown @return string
[ "Strips", "the", "given", "text", "of", "the", "markdown", "but", "not", "\\", "n", "." ]
935b7363ae21b340eaa5867560a29f965ec7d012
https://github.com/ColonelBlimp/NsanjaCore/blob/935b7363ae21b340eaa5867560a29f965ec7d012/src/Nsanja/Core/Util.php#L60-L73
202,688
ColonelBlimp/NsanjaCore
src/Nsanja/Core/Util.php
Util.startswith
public function startswith(string $haystack, string $needle) : bool { return (substr($haystack, 0, strlen($needle)) === $needle); }
php
public function startswith(string $haystack, string $needle) : bool { return (substr($haystack, 0, strlen($needle)) === $needle); }
[ "public", "function", "startswith", "(", "string", "$", "haystack", ",", "string", "$", "needle", ")", ":", "bool", "{", "return", "(", "substr", "(", "$", "haystack", ",", "0", ",", "strlen", "(", "$", "needle", ")", ")", "===", "$", "needle", ")", ...
String startswith. @param string $haystack The input string. @param string $needle The string search for. @return bool Returns true if the $haystack ends with the $needle, otherwise false.
[ "String", "startswith", "." ]
935b7363ae21b340eaa5867560a29f965ec7d012
https://github.com/ColonelBlimp/NsanjaCore/blob/935b7363ae21b340eaa5867560a29f965ec7d012/src/Nsanja/Core/Util.php#L81-L84
202,689
ColonelBlimp/NsanjaCore
src/Nsanja/Core/Util.php
Util.endswith
public function endswith(string $haystack, string $needle) : bool { return (substr($haystack, -1 * strlen($needle)) === $needle); }
php
public function endswith(string $haystack, string $needle) : bool { return (substr($haystack, -1 * strlen($needle)) === $needle); }
[ "public", "function", "endswith", "(", "string", "$", "haystack", ",", "string", "$", "needle", ")", ":", "bool", "{", "return", "(", "substr", "(", "$", "haystack", ",", "-", "1", "*", "strlen", "(", "$", "needle", ")", ")", "===", "$", "needle", ...
String endswith. @param string $haystack The input string. @param string $needle The string search for. @return bool Returns true if the $haystack starts with the $needle, otherwise false.
[ "String", "endswith", "." ]
935b7363ae21b340eaa5867560a29f965ec7d012
https://github.com/ColonelBlimp/NsanjaCore/blob/935b7363ae21b340eaa5867560a29f965ec7d012/src/Nsanja/Core/Util.php#L92-L95
202,690
Torann/skosh-generator
src/Twig/Loader.php
Loader.getSource
function getSource($name) { if (isset($this->site->pages[$name])) { $content = $this->site->pages[$name]; } else { throw new \Exception("Cannot find content \"$name\"."); } if (!$content->template) { throw new \Exception("Content does not ...
php
function getSource($name) { if (isset($this->site->pages[$name])) { $content = $this->site->pages[$name]; } else { throw new \Exception("Cannot find content \"$name\"."); } if (!$content->template) { throw new \Exception("Content does not ...
[ "function", "getSource", "(", "$", "name", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "site", "->", "pages", "[", "$", "name", "]", ")", ")", "{", "$", "content", "=", "$", "this", "->", "site", "->", "pages", "[", "$", "name", "]", ...
Generates the template for a given page path.
[ "Generates", "the", "template", "for", "a", "given", "page", "path", "." ]
ea60e037d92398d7c146eb2349735d5692e3c48c
https://github.com/Torann/skosh-generator/blob/ea60e037d92398d7c146eb2349735d5692e3c48c/src/Twig/Loader.php#L22-L54
202,691
WideFocus/Feed-Writer
src/WriterTrait.php
WriterTrait.write
public function write(Iterator $dataIterator) { $this->initialize(); foreach ($dataIterator as $item) { $this->writeItem($item); } $this->finish(); }
php
public function write(Iterator $dataIterator) { $this->initialize(); foreach ($dataIterator as $item) { $this->writeItem($item); } $this->finish(); }
[ "public", "function", "write", "(", "Iterator", "$", "dataIterator", ")", "{", "$", "this", "->", "initialize", "(", ")", ";", "foreach", "(", "$", "dataIterator", "as", "$", "item", ")", "{", "$", "this", "->", "writeItem", "(", "$", "item", ")", ";...
Write the feed. @param Iterator|ArrayAccess[] $dataIterator @return void
[ "Write", "the", "feed", "." ]
c2698394645c75db06962e5e9d638f0cabe69fe3
https://github.com/WideFocus/Feed-Writer/blob/c2698394645c75db06962e5e9d638f0cabe69fe3/src/WriterTrait.php#L24-L31
202,692
ciims/ciims-modules-hybridauth
models/RemoteIdentityForm.php
RemoteIdentityForm.validateIdentity
public function validateIdentity($attributes, $params) { // Search the database for a user with that information $metadata = UserMetadata::model()->findByAttributes(array( 'key' => $this->provider.'Provider', 'value' => $this->adapter->identifier )); // Retur...
php
public function validateIdentity($attributes, $params) { // Search the database for a user with that information $metadata = UserMetadata::model()->findByAttributes(array( 'key' => $this->provider.'Provider', 'value' => $this->adapter->identifier )); // Retur...
[ "public", "function", "validateIdentity", "(", "$", "attributes", ",", "$", "params", ")", "{", "// Search the database for a user with that information", "$", "metadata", "=", "UserMetadata", "::", "model", "(", ")", "->", "findByAttributes", "(", "array", "(", "'k...
Validates that we have an identity on file for this user @param array $attributes @param array $params @return boolean
[ "Validates", "that", "we", "have", "an", "identity", "on", "file", "for", "this", "user" ]
417b2682bf3468dd509164a9b773d886359a7aec
https://github.com/ciims/ciims-modules-hybridauth/blob/417b2682bf3468dd509164a9b773d886359a7aec/models/RemoteIdentityForm.php#L47-L72
202,693
ciims/ciims-modules-hybridauth
models/RemoteIdentityForm.php
RemoteIdentityForm.login
public function login() { if (!$this->authenticate()) return false; if($this->_identity->errorCode===RemoteUserIdentity::ERROR_NONE) { Yii::app()->user->logout(); return Yii::app()->user->login($this->_identity,3600*24); } else return false; }
php
public function login() { if (!$this->authenticate()) return false; if($this->_identity->errorCode===RemoteUserIdentity::ERROR_NONE) { Yii::app()->user->logout(); return Yii::app()->user->login($this->_identity,3600*24); } else return false; }
[ "public", "function", "login", "(", ")", "{", "if", "(", "!", "$", "this", "->", "authenticate", "(", ")", ")", "return", "false", ";", "if", "(", "$", "this", "->", "_identity", "->", "errorCode", "===", "RemoteUserIdentity", "::", "ERROR_NONE", ")", ...
Logins the user in using their Remote user information @return boolean
[ "Logins", "the", "user", "in", "using", "their", "Remote", "user", "information" ]
417b2682bf3468dd509164a9b773d886359a7aec
https://github.com/ciims/ciims-modules-hybridauth/blob/417b2682bf3468dd509164a9b773d886359a7aec/models/RemoteIdentityForm.php#L92-L105
202,694
Xsaven/laravel-intelect-admin
src/Auth/Database/HasPermissions.php
HasPermissions.roles
public function roles() : BelongsToMany { $pivotTable = config('lia.database.role_users_table'); $relatedModel = config('lia.database.roles_model'); return $this->belongsToMany($relatedModel, $pivotTable, 'user_id', 'role_id'); }
php
public function roles() : BelongsToMany { $pivotTable = config('lia.database.role_users_table'); $relatedModel = config('lia.database.roles_model'); return $this->belongsToMany($relatedModel, $pivotTable, 'user_id', 'role_id'); }
[ "public", "function", "roles", "(", ")", ":", "BelongsToMany", "{", "$", "pivotTable", "=", "config", "(", "'lia.database.role_users_table'", ")", ";", "$", "relatedModel", "=", "config", "(", "'lia.database.roles_model'", ")", ";", "return", "$", "this", "->", ...
A user has and belongs to many roles. @return BelongsToMany
[ "A", "user", "has", "and", "belongs", "to", "many", "roles", "." ]
592574633d12c74cf25b43dd6694fee496abefcb
https://github.com/Xsaven/laravel-intelect-admin/blob/592574633d12c74cf25b43dd6694fee496abefcb/src/Auth/Database/HasPermissions.php#L32-L39
202,695
Xsaven/laravel-intelect-admin
src/Auth/Database/HasPermissions.php
HasPermissions.permissions
public function permissions() : BelongsToMany { $pivotTable = config('lia.database.user_permissions_table'); $relatedModel = config('lia.database.permissions_model'); return $this->belongsToMany($relatedModel, $pivotTable, 'user_id', 'permission_id'); }
php
public function permissions() : BelongsToMany { $pivotTable = config('lia.database.user_permissions_table'); $relatedModel = config('lia.database.permissions_model'); return $this->belongsToMany($relatedModel, $pivotTable, 'user_id', 'permission_id'); }
[ "public", "function", "permissions", "(", ")", ":", "BelongsToMany", "{", "$", "pivotTable", "=", "config", "(", "'lia.database.user_permissions_table'", ")", ";", "$", "relatedModel", "=", "config", "(", "'lia.database.permissions_model'", ")", ";", "return", "$", ...
A User has and belongs to many permissions. @return BelongsToMany
[ "A", "User", "has", "and", "belongs", "to", "many", "permissions", "." ]
592574633d12c74cf25b43dd6694fee496abefcb
https://github.com/Xsaven/laravel-intelect-admin/blob/592574633d12c74cf25b43dd6694fee496abefcb/src/Auth/Database/HasPermissions.php#L46-L53
202,696
ScaraMVC/Framework
src/Scara/Routing/Route.php
Route.register
public function register($method, $url, $action) { if (in_array($method, $this->_methods)) { if (is_array($action)) { if (!empty($action)) { $exp = explode('@', $action['uses']); $this->_routes[] = [ 'controller' => ...
php
public function register($method, $url, $action) { if (in_array($method, $this->_methods)) { if (is_array($action)) { if (!empty($action)) { $exp = explode('@', $action['uses']); $this->_routes[] = [ 'controller' => ...
[ "public", "function", "register", "(", "$", "method", ",", "$", "url", ",", "$", "action", ")", "{", "if", "(", "in_array", "(", "$", "method", ",", "$", "this", "->", "_methods", ")", ")", "{", "if", "(", "is_array", "(", "$", "action", ")", ")"...
Registers each route. @param string $method - Route's request method @param string $url - Route's URL @param mixed $action - Route's action @throws \Exception @return void
[ "Registers", "each", "route", "." ]
199b08b45fadf5dae14ac4732af03b36e15bbef2
https://github.com/ScaraMVC/Framework/blob/199b08b45fadf5dae14ac4732af03b36e15bbef2/src/Scara/Routing/Route.php#L35-L62
202,697
Subscribo/psr-http-message-tools
src/Factories/UriFactory.php
UriFactory.make
public static function make($uri, array $queryParameters = []) { $uri = ($uri instanceof UriInterface) ? $uri : new Uri($uri); if ($queryParameters) { $uri = static::addQueryParameters($uri, $queryParameters); } return $uri; }
php
public static function make($uri, array $queryParameters = []) { $uri = ($uri instanceof UriInterface) ? $uri : new Uri($uri); if ($queryParameters) { $uri = static::addQueryParameters($uri, $queryParameters); } return $uri; }
[ "public", "static", "function", "make", "(", "$", "uri", ",", "array", "$", "queryParameters", "=", "[", "]", ")", "{", "$", "uri", "=", "(", "$", "uri", "instanceof", "UriInterface", ")", "?", "$", "uri", ":", "new", "Uri", "(", "$", "uri", ")", ...
Makes PSR-7 compliant Uri object @param string|UriInterface $uri @param array $queryParameters Query parameters to add / overwrite @return UriInterface
[ "Makes", "PSR", "-", "7", "compliant", "Uri", "object" ]
b1dfa0b1dd646f353634b5c9603fd6c75a7b73bd
https://github.com/Subscribo/psr-http-message-tools/blob/b1dfa0b1dd646f353634b5c9603fd6c75a7b73bd/src/Factories/UriFactory.php#L20-L27
202,698
vukbgit/PHPCraft.Subject
src/Traits/Authentication.php
Authentication.execLoginForm
protected function execLoginForm() { $this->loadTranslations('form', sprintf('private/global/locales/%s/form.ini', LANGUAGE)); $this->templateParameters['translations'] = $this->translations; $this->renderTemplate(); }
php
protected function execLoginForm() { $this->loadTranslations('form', sprintf('private/global/locales/%s/form.ini', LANGUAGE)); $this->templateParameters['translations'] = $this->translations; $this->renderTemplate(); }
[ "protected", "function", "execLoginForm", "(", ")", "{", "$", "this", "->", "loadTranslations", "(", "'form'", ",", "sprintf", "(", "'private/global/locales/%s/form.ini'", ",", "LANGUAGE", ")", ")", ";", "$", "this", "->", "templateParameters", "[", "'translations...
displays login form
[ "displays", "login", "form" ]
a43ad7868098ff1e7bda6819547ea64f9a853732
https://github.com/vukbgit/PHPCraft.Subject/blob/a43ad7868098ff1e7bda6819547ea64f9a853732/src/Traits/Authentication.php#L56-L61
202,699
vukbgit/PHPCraft.Subject
src/Traits/Authentication.php
Authentication.getUserData
private function getUserData() { $auth = $this->authFactory->newInstance(); return null !== $auth->getUserData() ? $auth->getUserData() : false; }
php
private function getUserData() { $auth = $this->authFactory->newInstance(); return null !== $auth->getUserData() ? $auth->getUserData() : false; }
[ "private", "function", "getUserData", "(", ")", "{", "$", "auth", "=", "$", "this", "->", "authFactory", "->", "newInstance", "(", ")", ";", "return", "null", "!==", "$", "auth", "->", "getUserData", "(", ")", "?", "$", "auth", "->", "getUserData", "("...
gets current user
[ "gets", "current", "user" ]
a43ad7868098ff1e7bda6819547ea64f9a853732
https://github.com/vukbgit/PHPCraft.Subject/blob/a43ad7868098ff1e7bda6819547ea64f9a853732/src/Traits/Authentication.php#L116-L120