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,800
Wedeto/HTTP
src/Cookie.php
Cookie.setURL
public function setURL(URL $url) { $this->domain = $url->host; $this->path = $url->path; $this->secure = $url->secure; return $this; }
php
public function setURL(URL $url) { $this->domain = $url->host; $this->path = $url->path; $this->secure = $url->secure; return $this; }
[ "public", "function", "setURL", "(", "URL", "$", "url", ")", "{", "$", "this", "->", "domain", "=", "$", "url", "->", "host", ";", "$", "this", "->", "path", "=", "$", "url", "->", "path", ";", "$", "this", "->", "secure", "=", "$", "url", "->"...
Set the domain and path using a URL @param Wedeto\HTTP\URL The URI to use as the cookie domain
[ "Set", "the", "domain", "and", "path", "using", "a", "URL" ]
7318eff1b81a3c103c4263466d09b7f3593b70b9
https://github.com/Wedeto/HTTP/blob/7318eff1b81a3c103c4263466d09b7f3593b70b9/src/Cookie.php#L174-L180
202,801
Wedeto/HTTP
src/Cookie.php
Cookie.setExpiresIn
public function setExpiresIn(DateInterval $interval) { $this->expires = new DateTime(); $this->expires->add($interval); return $this; }
php
public function setExpiresIn(DateInterval $interval) { $this->expires = new DateTime(); $this->expires->add($interval); return $this; }
[ "public", "function", "setExpiresIn", "(", "DateInterval", "$", "interval", ")", "{", "$", "this", "->", "expires", "=", "new", "DateTime", "(", ")", ";", "$", "this", "->", "expires", "->", "add", "(", "$", "interval", ")", ";", "return", "$", "this",...
Set expiry date by a DateInterval, relative to the current time @param DateInterval $interval After how much time the cookie should expire @return Wedeto\HTTP\Cookie Provides fluent interface
[ "Set", "expiry", "date", "by", "a", "DateInterval", "relative", "to", "the", "current", "time" ]
7318eff1b81a3c103c4263466d09b7f3593b70b9
https://github.com/Wedeto/HTTP/blob/7318eff1b81a3c103c4263466d09b7f3593b70b9/src/Cookie.php#L214-L219
202,802
squareproton/Bond
src/Bond/Normality/Builder/EntityChild.php
EntityChild.getClassExtends
protected function getClassExtends() { $parentPlaceholderClass = sprintf( "\\%s\\%s", $this->options['entityPlaceholder'], $this->pgClass->getParent()->getEntityName() ); $this->class->addExtends($parentPlaceholderClass); }
php
protected function getClassExtends() { $parentPlaceholderClass = sprintf( "\\%s\\%s", $this->options['entityPlaceholder'], $this->pgClass->getParent()->getEntityName() ); $this->class->addExtends($parentPlaceholderClass); }
[ "protected", "function", "getClassExtends", "(", ")", "{", "$", "parentPlaceholderClass", "=", "sprintf", "(", "\"\\\\%s\\\\%s\"", ",", "$", "this", "->", "options", "[", "'entityPlaceholder'", "]", ",", "$", "this", "->", "pgClass", "->", "getParent", "(", ")...
Get class extends
[ "Get", "class", "extends" ]
a04ad9dd1a35adeaec98237716c2a41ce02b4f1a
https://github.com/squareproton/Bond/blob/a04ad9dd1a35adeaec98237716c2a41ce02b4f1a/src/Bond/Normality/Builder/EntityChild.php#L34-L42
202,803
duncan3dc/serial
src/Php.php
Php.encode
public static function encode($array) { $array = static::asArray($array); if (is_array($array) && count($array) < 1) { return ""; } try { $string = serialize($array); } catch (\Exception $e) { throw new PhpException("Serialize Error: " . ...
php
public static function encode($array) { $array = static::asArray($array); if (is_array($array) && count($array) < 1) { return ""; } try { $string = serialize($array); } catch (\Exception $e) { throw new PhpException("Serialize Error: " . ...
[ "public", "static", "function", "encode", "(", "$", "array", ")", "{", "$", "array", "=", "static", "::", "asArray", "(", "$", "array", ")", ";", "if", "(", "is_array", "(", "$", "array", ")", "&&", "count", "(", "$", "array", ")", "<", "1", ")",...
Convert an array to a php serialized string. {@inheritDoc}
[ "Convert", "an", "array", "to", "a", "php", "serialized", "string", "." ]
2e40127a0a364ee1bd6f655b0f5b5d4a035a5716
https://github.com/duncan3dc/serial/blob/2e40127a0a364ee1bd6f655b0f5b5d4a035a5716/src/Php.php#L15-L30
202,804
duncan3dc/serial
src/Php.php
Php.decode
public static function decode($string) { if (!$string) { return new ArrayObject(); } try { $array = unserialize($string); } catch (\Exception $e) { throw new PhpException("Serialize Error: " . $e->getMessage()); } if (!is_array($a...
php
public static function decode($string) { if (!$string) { return new ArrayObject(); } try { $array = unserialize($string); } catch (\Exception $e) { throw new PhpException("Serialize Error: " . $e->getMessage()); } if (!is_array($a...
[ "public", "static", "function", "decode", "(", "$", "string", ")", "{", "if", "(", "!", "$", "string", ")", "{", "return", "new", "ArrayObject", "(", ")", ";", "}", "try", "{", "$", "array", "=", "unserialize", "(", "$", "string", ")", ";", "}", ...
Convert a php serialized string to an array. {@inheritDoc}
[ "Convert", "a", "php", "serialized", "string", "to", "an", "array", "." ]
2e40127a0a364ee1bd6f655b0f5b5d4a035a5716
https://github.com/duncan3dc/serial/blob/2e40127a0a364ee1bd6f655b0f5b5d4a035a5716/src/Php.php#L38-L55
202,805
agentmedia/phine-core
src/Core/Logic/Routing/BackendRouter.php
BackendRouter.ModuleUrl
static function ModuleUrl(BackendModule $module, array $args = array()) { $allArgs = array('module'=> ClassFinder::ModuleType($module)) + $args; return 'index.php?' . http_build_query($allArgs); }
php
static function ModuleUrl(BackendModule $module, array $args = array()) { $allArgs = array('module'=> ClassFinder::ModuleType($module)) + $args; return 'index.php?' . http_build_query($allArgs); }
[ "static", "function", "ModuleUrl", "(", "BackendModule", "$", "module", ",", "array", "$", "args", "=", "array", "(", ")", ")", "{", "$", "allArgs", "=", "array", "(", "'module'", "=>", "ClassFinder", "::", "ModuleType", "(", "$", "module", ")", ")", "...
Gets the url for a module @param BackendModule $module The module @param array $args @return string
[ "Gets", "the", "url", "for", "a", "module" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Routing/BackendRouter.php#L21-L25
202,806
agentmedia/phine-core
src/Core/Logic/Routing/BackendRouter.php
BackendRouter.AjaxUrl
static function AjaxUrl(ModuleBase $module, array $args = array()) { $allArgs = array('module'=> ClassFinder::ModuleType($module)) + $args; $guard = new UserGuard(); $user = $guard->GetUser(); if (!$user) { throw new \Exception('Security breach on ajax url: no bac...
php
static function AjaxUrl(ModuleBase $module, array $args = array()) { $allArgs = array('module'=> ClassFinder::ModuleType($module)) + $args; $guard = new UserGuard(); $user = $guard->GetUser(); if (!$user) { throw new \Exception('Security breach on ajax url: no bac...
[ "static", "function", "AjaxUrl", "(", "ModuleBase", "$", "module", ",", "array", "$", "args", "=", "array", "(", ")", ")", "{", "$", "allArgs", "=", "array", "(", "'module'", "=>", "ClassFinder", "::", "ModuleType", "(", "$", "module", ")", ")", "+", ...
Returns the url to ab ajax module whose content is rendered as is @param ModuleBase $module The module @param array $args The url parameters @return string Returns the ajax url
[ "Returns", "the", "url", "to", "ab", "ajax", "module", "whose", "content", "is", "rendered", "as", "is" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Routing/BackendRouter.php#L33-L44
202,807
agentmedia/phine-core
src/Core/Logic/Routing/BackendRouter.php
BackendRouter.ContentTreeUrl
static function ContentTreeUrl(Content $content) { $args = array(); $pageContent = $content->GetPageContent(); if ($pageContent) { $args['page'] = $pageContent->GetPage()->GetID(); $args['area'] = $pageContent->GetArea()->GetID(); return self::Modu...
php
static function ContentTreeUrl(Content $content) { $args = array(); $pageContent = $content->GetPageContent(); if ($pageContent) { $args['page'] = $pageContent->GetPage()->GetID(); $args['area'] = $pageContent->GetArea()->GetID(); return self::Modu...
[ "static", "function", "ContentTreeUrl", "(", "Content", "$", "content", ")", "{", "$", "args", "=", "array", "(", ")", ";", "$", "pageContent", "=", "$", "content", "->", "GetPageContent", "(", ")", ";", "if", "(", "$", "pageContent", ")", "{", "$", ...
Gets the url of the content tree for a content element @param Content $content @return string
[ "Gets", "the", "url", "of", "the", "content", "tree", "for", "a", "content", "element" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Routing/BackendRouter.php#L61-L83
202,808
bytic/orm
src/Traits/Relations/HasRelationsRecordsTrait.php
HasRelationsRecordsTrait.setRelation
public function setRelation($relation, $value) { $this->checkInitRelations(); $this->relations[$relation] = $value; return $this; }
php
public function setRelation($relation, $value) { $this->checkInitRelations(); $this->relations[$relation] = $value; return $this; }
[ "public", "function", "setRelation", "(", "$", "relation", ",", "$", "value", ")", "{", "$", "this", "->", "checkInitRelations", "(", ")", ";", "$", "this", "->", "relations", "[", "$", "relation", "]", "=", "$", "value", ";", "return", "$", "this", ...
Set the specific relationship in the model. @param string $relation @param mixed $value @return $this @throws \Exception
[ "Set", "the", "specific", "relationship", "in", "the", "model", "." ]
8d9a79b47761af0bfd9b8d1d28c83221dcac0de0
https://github.com/bytic/orm/blob/8d9a79b47761af0bfd9b8d1d28c83221dcac0de0/src/Traits/Relations/HasRelationsRecordsTrait.php#L233-L239
202,809
libreworks/caridea-dao
src/Doctrine2.php
Doctrine2.doExecute
protected function doExecute(\Closure $cb) { try { return $cb($this->manager); } catch (\Exception $e) { throw Exception\Translator\Doctrine::translate($e); } }
php
protected function doExecute(\Closure $cb) { try { return $cb($this->manager); } catch (\Exception $e) { throw Exception\Translator\Doctrine::translate($e); } }
[ "protected", "function", "doExecute", "(", "\\", "Closure", "$", "cb", ")", "{", "try", "{", "return", "$", "cb", "(", "$", "this", "->", "manager", ")", ";", "}", "catch", "(", "\\", "Exception", "$", "e", ")", "{", "throw", "Exception", "\\", "Tr...
Executes something in the context of the entityManager. Exceptions are caught and translated. @param Closure $cb The closure to execute, takes the entityManager @return mixed whatever the function returns, this method also returns @throws \Caridea\Dao\Exception If a database problem occurs @see \Caridea\Dao\Exception...
[ "Executes", "something", "in", "the", "context", "of", "the", "entityManager", "." ]
22c2fc81f63050ad23f7b0c40e430ff026e1e767
https://github.com/libreworks/caridea-dao/blob/22c2fc81f63050ad23f7b0c40e430ff026e1e767/src/Doctrine2.php#L71-L78
202,810
libreworks/caridea-dao
src/Doctrine2.php
Doctrine2.doExecuteInRepository
protected function doExecuteInRepository(\Closure $cb) { try { return $cb($this->repository); } catch (\Exception $e) { throw Exception\Translator\Doctrine::translate($e); } }
php
protected function doExecuteInRepository(\Closure $cb) { try { return $cb($this->repository); } catch (\Exception $e) { throw Exception\Translator\Doctrine::translate($e); } }
[ "protected", "function", "doExecuteInRepository", "(", "\\", "Closure", "$", "cb", ")", "{", "try", "{", "return", "$", "cb", "(", "$", "this", "->", "repository", ")", ";", "}", "catch", "(", "\\", "Exception", "$", "e", ")", "{", "throw", "Exception"...
Executes something in the context of the entityRepository. Exceptions are caught and translated. @param Closure $cb The closure to execute, takes the entityRepository @return mixed whatever the function returns, this method also returns @throws \Caridea\Dao\Exception If a database problem occurs @see \Caridea\Dao\Exc...
[ "Executes", "something", "in", "the", "context", "of", "the", "entityRepository", "." ]
22c2fc81f63050ad23f7b0c40e430ff026e1e767
https://github.com/libreworks/caridea-dao/blob/22c2fc81f63050ad23f7b0c40e430ff026e1e767/src/Doctrine2.php#L90-L97
202,811
TuumPHP/View
src/Section.php
Section.saveAs
public function saveAs($name) { $this->section_data[$name] = ob_get_clean(); $this->ob_level--; if ($this->ob_level) { echo $this->section_data[$name]; } }
php
public function saveAs($name) { $this->section_data[$name] = ob_get_clean(); $this->ob_level--; if ($this->ob_level) { echo $this->section_data[$name]; } }
[ "public", "function", "saveAs", "(", "$", "name", ")", "{", "$", "this", "->", "section_data", "[", "$", "name", "]", "=", "ob_get_clean", "(", ")", ";", "$", "this", "->", "ob_level", "--", ";", "if", "(", "$", "this", "->", "ob_level", ")", "{", ...
end capture with name. @param $name
[ "end", "capture", "with", "name", "." ]
b82b20d7b8ee66b2bdbe4eb0d95fabd9bafe4b21
https://github.com/TuumPHP/View/blob/b82b20d7b8ee66b2bdbe4eb0d95fabd9bafe4b21/src/Section.php#L35-L42
202,812
zarathustra323/modlr-data
src/Zarathustra/ModlrData/Metadata/Cache/CacheWarmer.php
CacheWarmer.warm
public function warm() { $warmed = []; if (false === $this->mf->hasCache()) { return $warmed; } $this->clear(); foreach ($this->mf->getAllTypeNames() as $type) { $metadata = $this->mf->getMetadataForType($type); $warmed[] = $type; ...
php
public function warm() { $warmed = []; if (false === $this->mf->hasCache()) { return $warmed; } $this->clear(); foreach ($this->mf->getAllTypeNames() as $type) { $metadata = $this->mf->getMetadataForType($type); $warmed[] = $type; ...
[ "public", "function", "warm", "(", ")", "{", "$", "warmed", "=", "[", "]", ";", "if", "(", "false", "===", "$", "this", "->", "mf", "->", "hasCache", "(", ")", ")", "{", "return", "$", "warmed", ";", "}", "$", "this", "->", "clear", "(", ")", ...
Warms up all metadata objects into the cache. @return array
[ "Warms", "up", "all", "metadata", "objects", "into", "the", "cache", "." ]
7c2c767216055f75abf8cf22e2200f11998ed24e
https://github.com/zarathustra323/modlr-data/blob/7c2c767216055f75abf8cf22e2200f11998ed24e/src/Zarathustra/ModlrData/Metadata/Cache/CacheWarmer.php#L37-L50
202,813
zarathustra323/modlr-data
src/Zarathustra/ModlrData/Metadata/Cache/CacheWarmer.php
CacheWarmer.clear
public function clear() { $cleared = []; if (false === $this->mf->hasCache()) { return $cleared; } $this->mf->enableCache(false); foreach ($this->mf->getAllTypeNames() as $type) { $metadata = $this->mf->getMetadataForType($type); $this->mf...
php
public function clear() { $cleared = []; if (false === $this->mf->hasCache()) { return $cleared; } $this->mf->enableCache(false); foreach ($this->mf->getAllTypeNames() as $type) { $metadata = $this->mf->getMetadataForType($type); $this->mf...
[ "public", "function", "clear", "(", ")", "{", "$", "cleared", "=", "[", "]", ";", "if", "(", "false", "===", "$", "this", "->", "mf", "->", "hasCache", "(", ")", ")", "{", "return", "$", "cleared", ";", "}", "$", "this", "->", "mf", "->", "enab...
Clears all metadata objects from the cache. @return self
[ "Clears", "all", "metadata", "objects", "from", "the", "cache", "." ]
7c2c767216055f75abf8cf22e2200f11998ed24e
https://github.com/zarathustra323/modlr-data/blob/7c2c767216055f75abf8cf22e2200f11998ed24e/src/Zarathustra/ModlrData/Metadata/Cache/CacheWarmer.php#L57-L73
202,814
Hnto/nuki
src/Models/Data/File.php
File.setName
public function setName($name = false) { if ($name === false || empty($name)) { $this->name = \Nuki\Handlers\Core\Assist::randomString(); return; } $this->name = $name; }
php
public function setName($name = false) { if ($name === false || empty($name)) { $this->name = \Nuki\Handlers\Core\Assist::randomString(); return; } $this->name = $name; }
[ "public", "function", "setName", "(", "$", "name", "=", "false", ")", "{", "if", "(", "$", "name", "===", "false", "||", "empty", "(", "$", "name", ")", ")", "{", "$", "this", "->", "name", "=", "\\", "Nuki", "\\", "Handlers", "\\", "Core", "\\",...
Set file name if name not give, it will be generated @param string|bool $name @return void
[ "Set", "file", "name", "if", "name", "not", "give", "it", "will", "be", "generated" ]
c3fb16244e8d611c335a88e3b9c9ee7d81fafc0c
https://github.com/Hnto/nuki/blob/c3fb16244e8d611c335a88e3b9c9ee7d81fafc0c/src/Models/Data/File.php#L80-L87
202,815
Talesoft/tale-framework
src/Tale/Cache/Adapter/File.php
File.init
protected function init() { $this->prependOptions([ 'path' => './cache', 'formatAliases' => [], 'format' => 'json' ]); $this->_path = $this->getOption('path'); $this->_formatFactory = new Factory(__NAMESPACE__.'\\File\\FormatBase', [ ...
php
protected function init() { $this->prependOptions([ 'path' => './cache', 'formatAliases' => [], 'format' => 'json' ]); $this->_path = $this->getOption('path'); $this->_formatFactory = new Factory(__NAMESPACE__.'\\File\\FormatBase', [ ...
[ "protected", "function", "init", "(", ")", "{", "$", "this", "->", "prependOptions", "(", "[", "'path'", "=>", "'./cache'", ",", "'formatAliases'", "=>", "[", "]", ",", "'format'", "=>", "'json'", "]", ")", ";", "$", "this", "->", "_path", "=", "$", ...
Initializes the file cache adapter
[ "Initializes", "the", "file", "cache", "adapter" ]
739a7011c6dad409a51c4bcfbcf4b4ffbc8cba49
https://github.com/Talesoft/tale-framework/blob/739a7011c6dad409a51c4bcfbcf4b4ffbc8cba49/src/Tale/Cache/Adapter/File.php#L50-L74
202,816
Talesoft/tale-framework
src/Tale/Cache/Adapter/File.php
File.exists
public function exists($key) { $path = $this->getKeyPath($key); if (!file_exists($path) || empty($this->_lifeTimes[$key])) return false; if (time() - filemtime($path) > $this->_lifeTimes[$key]) return false; return true; }
php
public function exists($key) { $path = $this->getKeyPath($key); if (!file_exists($path) || empty($this->_lifeTimes[$key])) return false; if (time() - filemtime($path) > $this->_lifeTimes[$key]) return false; return true; }
[ "public", "function", "exists", "(", "$", "key", ")", "{", "$", "path", "=", "$", "this", "->", "getKeyPath", "(", "$", "key", ")", ";", "if", "(", "!", "file_exists", "(", "$", "path", ")", "||", "empty", "(", "$", "this", "->", "_lifeTimes", "[...
Checks if the given cache key has an existing cache file that didn't exceed the given life-time @param $key string The key that needs to be checked @return bool
[ "Checks", "if", "the", "given", "cache", "key", "has", "an", "existing", "cache", "file", "that", "didn", "t", "exceed", "the", "given", "life", "-", "time" ]
739a7011c6dad409a51c4bcfbcf4b4ffbc8cba49
https://github.com/Talesoft/tale-framework/blob/739a7011c6dad409a51c4bcfbcf4b4ffbc8cba49/src/Tale/Cache/Adapter/File.php#L111-L123
202,817
Talesoft/tale-framework
src/Tale/Cache/Adapter/File.php
File.set
public function set($key, $value, $lifeTime) { $path = $this->getKeyPath($key); $dir = dirname($path); if (!is_dir($dir)) mkdir($dir, 0777, true); $this->_lifeTimes[$key] = intval($lifeTime); //Save the life times $this->_format->save($this->_lifeTimeP...
php
public function set($key, $value, $lifeTime) { $path = $this->getKeyPath($key); $dir = dirname($path); if (!is_dir($dir)) mkdir($dir, 0777, true); $this->_lifeTimes[$key] = intval($lifeTime); //Save the life times $this->_format->save($this->_lifeTimeP...
[ "public", "function", "set", "(", "$", "key", ",", "$", "value", ",", "$", "lifeTime", ")", "{", "$", "path", "=", "$", "this", "->", "getKeyPath", "(", "$", "key", ")", ";", "$", "dir", "=", "dirname", "(", "$", "path", ")", ";", "if", "(", ...
Sets the value of an cache item to the given value @param $key string The key that needs to be checked @param $value mixed The value that needs to be cached @param $lifeTime int The life-time of the cache item in seconds @return $this
[ "Sets", "the", "value", "of", "an", "cache", "item", "to", "the", "given", "value" ]
739a7011c6dad409a51c4bcfbcf4b4ffbc8cba49
https://github.com/Talesoft/tale-framework/blob/739a7011c6dad409a51c4bcfbcf4b4ffbc8cba49/src/Tale/Cache/Adapter/File.php#L147-L165
202,818
koolkode/view-express
src/DecoratedTemplate.php
DecoratedTemplate.renderBlock
public function renderBlock(OutputBuffer $out, $name) { if(array_key_exists($name, $this->blocks)) { $pblock = $this->outerContext->set('@block', $name); $pout = $this->outerContext->set('@out', $out); $pthis = $this->outerContext->set('@this', $this); try { $this->blocks[$name]($out); ...
php
public function renderBlock(OutputBuffer $out, $name) { if(array_key_exists($name, $this->blocks)) { $pblock = $this->outerContext->set('@block', $name); $pout = $this->outerContext->set('@out', $out); $pthis = $this->outerContext->set('@this', $this); try { $this->blocks[$name]($out); ...
[ "public", "function", "renderBlock", "(", "OutputBuffer", "$", "out", ",", "$", "name", ")", "{", "if", "(", "array_key_exists", "(", "$", "name", ",", "$", "this", "->", "blocks", ")", ")", "{", "$", "pblock", "=", "$", "this", "->", "outerContext", ...
Render contents of block taking blocks from the decorator into consideration. @param OutputBuffer $out @param string $name The name of the block to be rendered.
[ "Render", "contents", "of", "block", "taking", "blocks", "from", "the", "decorator", "into", "consideration", "." ]
a8ebe6f373b6bfe8b8818d6264535e8fe063a596
https://github.com/koolkode/view-express/blob/a8ebe6f373b6bfe8b8818d6264535e8fe063a596/src/DecoratedTemplate.php#L117-L140
202,819
koolkode/view-express
src/DecoratedTemplate.php
DecoratedTemplate.renderParentBlock
public function renderParentBlock(OutputBuffer $out, $name) { $method = 'block_' . $name; if(method_exists($this, $method)) { return $this->$method($out); } return parent::renderParentBlock($out, $name); }
php
public function renderParentBlock(OutputBuffer $out, $name) { $method = 'block_' . $name; if(method_exists($this, $method)) { return $this->$method($out); } return parent::renderParentBlock($out, $name); }
[ "public", "function", "renderParentBlock", "(", "OutputBuffer", "$", "out", ",", "$", "name", ")", "{", "$", "method", "=", "'block_'", ".", "$", "name", ";", "if", "(", "method_exists", "(", "$", "this", ",", "$", "method", ")", ")", "{", "return", ...
Render contents of a block in the parent view taking block from the decorator into consideration. @param OutputBuffer $out @param string $name The name of the block to be rendered.
[ "Render", "contents", "of", "a", "block", "in", "the", "parent", "view", "taking", "block", "from", "the", "decorator", "into", "consideration", "." ]
a8ebe6f373b6bfe8b8818d6264535e8fe063a596
https://github.com/koolkode/view-express/blob/a8ebe6f373b6bfe8b8818d6264535e8fe063a596/src/DecoratedTemplate.php#L148-L158
202,820
Torann/skosh-generator
src/Config.php
Config.load
private function load($env = 'local', $file = 'config') { $path = BASE_PATH . ($file === '.env' ? '' : '/config'); // File paths $configPath = "{$path}/{$file}.yml"; $envConfigPath = "{$path}/{$file}_{$env}.yml"; if (!file_exists($configPath)) { throw new \Excep...
php
private function load($env = 'local', $file = 'config') { $path = BASE_PATH . ($file === '.env' ? '' : '/config'); // File paths $configPath = "{$path}/{$file}.yml"; $envConfigPath = "{$path}/{$file}_{$env}.yml"; if (!file_exists($configPath)) { throw new \Excep...
[ "private", "function", "load", "(", "$", "env", "=", "'local'", ",", "$", "file", "=", "'config'", ")", "{", "$", "path", "=", "BASE_PATH", ".", "(", "$", "file", "===", "'.env'", "?", "''", ":", "'/config'", ")", ";", "// File paths", "$", "configPa...
Loads and parses the config file @param string $env Environment @param string $file Config filename @return void @throws \Exception
[ "Loads", "and", "parses", "the", "config", "file" ]
ea60e037d92398d7c146eb2349735d5692e3c48c
https://github.com/Torann/skosh-generator/blob/ea60e037d92398d7c146eb2349735d5692e3c48c/src/Config.php#L58-L94
202,821
ekyna/SettingBundle
DependencyInjection/TinymceConfiguration.php
TinymceConfiguration.build
public function build(array $config) { $contentCss = [ '/css/admin-helper.css', '/bundles/ekynacore/css/tinymce-content.css', 'http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800', ]; if (...
php
public function build(array $config) { $contentCss = [ '/css/admin-helper.css', '/bundles/ekynacore/css/tinymce-content.css', 'http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800', ]; if (...
[ "public", "function", "build", "(", "array", "$", "config", ")", "{", "$", "contentCss", "=", "[", "'/css/admin-helper.css'", ",", "'/bundles/ekynacore/css/tinymce-content.css'", ",", "'http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800ital...
Builds the tinymce configuration. @param array $config @return array
[ "Builds", "the", "tinymce", "configuration", "." ]
df58f83eb3a01ef56cd76ea73639322c581e75c1
https://github.com/ekyna/SettingBundle/blob/df58f83eb3a01ef56cd76ea73639322c581e75c1/DependencyInjection/TinymceConfiguration.php#L18-L55
202,822
eskirex/session
src/Traits/SessionTrait.php
SessionTrait.changeCurrentId
protected function changeCurrentId($newId) { if (!preg_match('/^[-,a-zA-Z0-9]{1,128}$/', $newId)) { throw new InvalidArgumentException('Invalid Session ID String'); } if (session_id($newId) === false) { throw new SessionRuntimeException('session_id Failed'); ...
php
protected function changeCurrentId($newId) { if (!preg_match('/^[-,a-zA-Z0-9]{1,128}$/', $newId)) { throw new InvalidArgumentException('Invalid Session ID String'); } if (session_id($newId) === false) { throw new SessionRuntimeException('session_id Failed'); ...
[ "protected", "function", "changeCurrentId", "(", "$", "newId", ")", "{", "if", "(", "!", "preg_match", "(", "'/^[-,a-zA-Z0-9]{1,128}$/'", ",", "$", "newId", ")", ")", "{", "throw", "new", "InvalidArgumentException", "(", "'Invalid Session ID String'", ")", ";", ...
Set session id @param $newId @return bool @throws InvalidArgumentException @throws SessionRuntimeException
[ "Set", "session", "id" ]
3da2ca8c83d3c124b16fee2ad45c8e967c87cd63
https://github.com/eskirex/session/blob/3da2ca8c83d3c124b16fee2ad45c8e967c87cd63/src/Traits/SessionTrait.php#L170-L181
202,823
betasyntax/Betasyntax-Framework-Core
src/Betasyntax/Session.php
Session.getInstance
public static function getInstance() { if (!isset(self::$instance)) { self::$instance = new self; } self::$instance->startSession(); return self::$instance; }
php
public static function getInstance() { if (!isset(self::$instance)) { self::$instance = new self; } self::$instance->startSession(); return self::$instance; }
[ "public", "static", "function", "getInstance", "(", ")", "{", "if", "(", "!", "isset", "(", "self", "::", "$", "instance", ")", ")", "{", "self", "::", "$", "instance", "=", "new", "self", ";", "}", "self", "::", "$", "instance", "->", "startSession"...
Returns THE instance of 'Session'. The session is automatically initialized if it wasn't. @return object
[ "Returns", "THE", "instance", "of", "Session", ".", "The", "session", "is", "automatically", "initialized", "if", "it", "wasn", "t", "." ]
2d135ec1f7dd98e6ef21512a069ac2595f1eb78e
https://github.com/betasyntax/Betasyntax-Framework-Core/blob/2d135ec1f7dd98e6ef21512a069ac2595f1eb78e/src/Betasyntax/Session.php#L25-L32
202,824
betasyntax/Betasyntax-Framework-Core
src/Betasyntax/Session.php
Session.destroy
public function destroy() { if ($this->sessionState == self::SESSION_STARTED) { $_SESSION=array(); $this->sessionState = !session_destroy(); unset($_SESSION); return !$this->sessionState; } return FALSE; }
php
public function destroy() { if ($this->sessionState == self::SESSION_STARTED) { $_SESSION=array(); $this->sessionState = !session_destroy(); unset($_SESSION); return !$this->sessionState; } return FALSE; }
[ "public", "function", "destroy", "(", ")", "{", "if", "(", "$", "this", "->", "sessionState", "==", "self", "::", "SESSION_STARTED", ")", "{", "$", "_SESSION", "=", "array", "(", ")", ";", "$", "this", "->", "sessionState", "=", "!", "session_destroy", ...
Destroys the current session. @return bool TRUE is session has been deleted, else FALSE.
[ "Destroys", "the", "current", "session", "." ]
2d135ec1f7dd98e6ef21512a069ac2595f1eb78e
https://github.com/betasyntax/Betasyntax-Framework-Core/blob/2d135ec1f7dd98e6ef21512a069ac2595f1eb78e/src/Betasyntax/Session.php#L92-L101
202,825
squareproton/Bond
src/Bond/Entity/Sort.php
Sort.generateByPropertyClosure
public static function generateByPropertyClosure( $property, $direction = SORT_ASC ) { if( $direction === SORT_DESC ) { $aLTb = 1; $aGTb = -1; } else { $aLTb = -1; $aGTb = 1; } return function ( \Bond\Entity\Base $a, \Bond\Entity\Base...
php
public static function generateByPropertyClosure( $property, $direction = SORT_ASC ) { if( $direction === SORT_DESC ) { $aLTb = 1; $aGTb = -1; } else { $aLTb = -1; $aGTb = 1; } return function ( \Bond\Entity\Base $a, \Bond\Entity\Base...
[ "public", "static", "function", "generateByPropertyClosure", "(", "$", "property", ",", "$", "direction", "=", "SORT_ASC", ")", "{", "if", "(", "$", "direction", "===", "SORT_DESC", ")", "{", "$", "aLTb", "=", "1", ";", "$", "aGTb", "=", "-", "1", ";",...
Generate a sort by property callback @param string $property property to sort by
[ "Generate", "a", "sort", "by", "property", "callback" ]
a04ad9dd1a35adeaec98237716c2a41ce02b4f1a
https://github.com/squareproton/Bond/blob/a04ad9dd1a35adeaec98237716c2a41ce02b4f1a/src/Bond/Entity/Sort.php#L19-L39
202,826
agentmedia/phine-core
src/Core/Snippets/BackendRights/PageRights.php
PageRights.Save
function Save() { $this->contentRights->Save(); if (!$this->rights) { $this->rights = new BackendPageRights(); } $this->rights->SetCreateIn($this->Value('CreateIn')); $this->rights->SetEdit($this->Value('Edit')); $this->rights->SetMove($this->Value...
php
function Save() { $this->contentRights->Save(); if (!$this->rights) { $this->rights = new BackendPageRights(); } $this->rights->SetCreateIn($this->Value('CreateIn')); $this->rights->SetEdit($this->Value('Edit')); $this->rights->SetMove($this->Value...
[ "function", "Save", "(", ")", "{", "$", "this", "->", "contentRights", "->", "Save", "(", ")", ";", "if", "(", "!", "$", "this", "->", "rights", ")", "{", "$", "this", "->", "rights", "=", "new", "BackendPageRights", "(", ")", ";", "}", "$", "thi...
Saves the page rights
[ "Saves", "the", "page", "rights" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Snippets/BackendRights/PageRights.php#L49-L62
202,827
AppVerk/Components
Form/Handler/AbstractFormHandler.php
AbstractFormHandler.getErrorsFromForm
protected function getErrorsFromForm(FormInterface $form) { $errors = []; /** @var FormError $error */ if($form->getErrors()->count() === 0 && $form->isRoot() && !$form->isValid()){ $errors["_self"] = "Empty post data"; } foreach ($form->getErrors() as $error) {...
php
protected function getErrorsFromForm(FormInterface $form) { $errors = []; /** @var FormError $error */ if($form->getErrors()->count() === 0 && $form->isRoot() && !$form->isValid()){ $errors["_self"] = "Empty post data"; } foreach ($form->getErrors() as $error) {...
[ "protected", "function", "getErrorsFromForm", "(", "FormInterface", "$", "form", ")", "{", "$", "errors", "=", "[", "]", ";", "/** @var FormError $error */", "if", "(", "$", "form", "->", "getErrors", "(", ")", "->", "count", "(", ")", "===", "0", "&&", ...
Build inheritance form errors @param FormInterface $form @return array
[ "Build", "inheritance", "form", "errors" ]
979e613388e5ea8a5858455c34ed22035635277e
https://github.com/AppVerk/Components/blob/979e613388e5ea8a5858455c34ed22035635277e/Form/Handler/AbstractFormHandler.php#L96-L120
202,828
koolkode/config
src/ConfigurationSource.php
ConfigurationSource.loadConfiguration
public function loadConfiguration(ConfigurationLoader $loader, array $params = []) { try { $data = $loader->findLoader($this->source)->load($this->source, $params); return new Configuration($this->createBase($data)); } catch(\Exception $e) { throw new ConfigurationLoadingException(sprintf('Unabl...
php
public function loadConfiguration(ConfigurationLoader $loader, array $params = []) { try { $data = $loader->findLoader($this->source)->load($this->source, $params); return new Configuration($this->createBase($data)); } catch(\Exception $e) { throw new ConfigurationLoadingException(sprintf('Unabl...
[ "public", "function", "loadConfiguration", "(", "ConfigurationLoader", "$", "loader", ",", "array", "$", "params", "=", "[", "]", ")", "{", "try", "{", "$", "data", "=", "$", "loader", "->", "findLoader", "(", "$", "this", "->", "source", ")", "->", "l...
Load configuration data from the source. @param ConfigurationLoader $loader @param array<string, mixed> $params @return Configuration @throws ConfigurationLoadingException
[ "Load", "configuration", "data", "from", "the", "source", "." ]
ad97d80f6e4ae5f8925839488abf2d9bfcb6d7f6
https://github.com/koolkode/config/blob/ad97d80f6e4ae5f8925839488abf2d9bfcb6d7f6/src/ConfigurationSource.php#L69-L81
202,829
spress/spress-core
ContentManager/Permalink/PermalinkGenerator.php
PermalinkGenerator.getPermalink
public function getPermalink(ItemInterface $item) { if ($item->getPath(ItemInterface::SNAPSHOT_PATH_RELATIVE_AFTER_CONVERT) === '') { return new Permalink('', ''); } $placeholders = $this->getPlacehoders($item); $permalinkStyle = $this->getPermalinkAttribute($item); ...
php
public function getPermalink(ItemInterface $item) { if ($item->getPath(ItemInterface::SNAPSHOT_PATH_RELATIVE_AFTER_CONVERT) === '') { return new Permalink('', ''); } $placeholders = $this->getPlacehoders($item); $permalinkStyle = $this->getPermalinkAttribute($item); ...
[ "public", "function", "getPermalink", "(", "ItemInterface", "$", "item", ")", "{", "if", "(", "$", "item", "->", "getPath", "(", "ItemInterface", "::", "SNAPSHOT_PATH_RELATIVE_AFTER_CONVERT", ")", "===", "''", ")", "{", "return", "new", "Permalink", "(", "''",...
Gets a permalink. This method uses the SNAPSHOT_PATH_RELATIVE_AFTER_CONVERT of Item path. For binary items URL path and path point to SNAPSHOT_PATH_RELATIVE. Item's attributes with special meaning: - title: title of the item. - title_path: title extracted from the date filename pattern. - preserve_path_title: if true...
[ "Gets", "a", "permalink", ".", "This", "method", "uses", "the", "SNAPSHOT_PATH_RELATIVE_AFTER_CONVERT", "of", "Item", "path", "." ]
a61008c4cde3ba990e7faa164462171b019a60bf
https://github.com/spress/spress-core/blob/a61008c4cde3ba990e7faa164462171b019a60bf/ContentManager/Permalink/PermalinkGenerator.php#L107-L177
202,830
DoSomething/mb-stat-tracker
src/StatHat.php
StatHat.reportCount
public function reportCount($count) { $statName = $this->prefix . $this->statNames; if ($this->isProduction) { stathat_ez_count($this->ezkey, $statName, $count); } }
php
public function reportCount($count) { $statName = $this->prefix . $this->statNames; if ($this->isProduction) { stathat_ez_count($this->ezkey, $statName, $count); } }
[ "public", "function", "reportCount", "(", "$", "count", ")", "{", "$", "statName", "=", "$", "this", "->", "prefix", ".", "$", "this", "->", "statNames", ";", "if", "(", "$", "this", "->", "isProduction", ")", "{", "stathat_ez_count", "(", "$", "this",...
Reports a count to the StatHat API. @param int $count The count to report.
[ "Reports", "a", "count", "to", "the", "StatHat", "API", "." ]
14a8caef9128661e77492d61a09c06dd5a7ca611
https://github.com/DoSomething/mb-stat-tracker/blob/14a8caef9128661e77492d61a09c06dd5a7ca611/src/StatHat.php#L86-L91
202,831
DoSomething/mb-stat-tracker
src/StatHat.php
StatHat.reportValue
public function reportValue($value) { $statName = $this->prefix . $this->statNames; if ($this->isProduction) { stathat_ez_value($this->ezkey, $statName, $value); } }
php
public function reportValue($value) { $statName = $this->prefix . $this->statNames; if ($this->isProduction) { stathat_ez_value($this->ezkey, $statName, $value); } }
[ "public", "function", "reportValue", "(", "$", "value", ")", "{", "$", "statName", "=", "$", "this", "->", "prefix", ".", "$", "this", "->", "statNames", ";", "if", "(", "$", "this", "->", "isProduction", ")", "{", "stathat_ez_value", "(", "$", "this",...
Reports a value to the StatHat API. @param int $value The value to report.
[ "Reports", "a", "value", "to", "the", "StatHat", "API", "." ]
14a8caef9128661e77492d61a09c06dd5a7ca611
https://github.com/DoSomething/mb-stat-tracker/blob/14a8caef9128661e77492d61a09c06dd5a7ca611/src/StatHat.php#L99-L104
202,832
Wedeto/Util
src/Hook.php
Hook.subscribe
public static function subscribe(string $hook, callable $callback, int $precedence = 0) { $parts = explode(".", $hook); if (count($parts) < 2) throw new InvalidArgumentException("Hook name must consist of at least two parts"); if ($hook === Hook::SHUTDOWN_HOOK) self:...
php
public static function subscribe(string $hook, callable $callback, int $precedence = 0) { $parts = explode(".", $hook); if (count($parts) < 2) throw new InvalidArgumentException("Hook name must consist of at least two parts"); if ($hook === Hook::SHUTDOWN_HOOK) self:...
[ "public", "static", "function", "subscribe", "(", "string", "$", "hook", ",", "callable", "$", "callback", ",", "int", "$", "precedence", "=", "0", ")", "{", "$", "parts", "=", "explode", "(", "\".\"", ",", "$", "hook", ")", ";", "if", "(", "count", ...
Subscribe to a hook. @param string $hook The hook to hook into. Must contain of at least 2 parts separated by dots: vendor.hookname @param callable $callback The callback that will be called when the hook is executed. The function should have the following signature: function (Dictionary $params); @param int $precede...
[ "Subscribe", "to", "a", "hook", "." ]
0e080251bbaa8e7d91ae8d02eb79c029c976744a
https://github.com/Wedeto/Util/blob/0e080251bbaa8e7d91ae8d02eb79c029c976744a/src/Hook.php#L98-L131
202,833
Wedeto/Util
src/Hook.php
Hook.unsubscribe
public static function unsubscribe(string $hook, int $hook_reference) { $parts = explode(".", $hook); if (count($parts) < 2) throw new InvalidArgumentException("Hook name must consist of at least two parts"); if (!isset(self::$hooks[$hook])) throw new InvalidArgument...
php
public static function unsubscribe(string $hook, int $hook_reference) { $parts = explode(".", $hook); if (count($parts) < 2) throw new InvalidArgumentException("Hook name must consist of at least two parts"); if (!isset(self::$hooks[$hook])) throw new InvalidArgument...
[ "public", "static", "function", "unsubscribe", "(", "string", "$", "hook", ",", "int", "$", "hook_reference", ")", "{", "$", "parts", "=", "explode", "(", "\".\"", ",", "$", "hook", ")", ";", "if", "(", "count", "(", "$", "parts", ")", "<", "2", ")...
Unsubscribe from a hook. @param string $hook The hook to unsubscribe from @param int The hook reference @return bool True when the hook was removed, false if it was not present
[ "Unsubscribe", "from", "a", "hook", "." ]
0e080251bbaa8e7d91ae8d02eb79c029c976744a
https://github.com/Wedeto/Util/blob/0e080251bbaa8e7d91ae8d02eb79c029c976744a/src/Hook.php#L140-L158
202,834
Wedeto/Util
src/Hook.php
Hook.execute
public static function execute(string $hook, $params) { if (!($params instanceof Dictionary)) $params = TypedDictionary::wrap($params); if (isset(self::$in_progress[$hook])) throw new RecursionException("Recursion in hooks is not supported"); self::$in_progress[$hoo...
php
public static function execute(string $hook, $params) { if (!($params instanceof Dictionary)) $params = TypedDictionary::wrap($params); if (isset(self::$in_progress[$hook])) throw new RecursionException("Recursion in hooks is not supported"); self::$in_progress[$hoo...
[ "public", "static", "function", "execute", "(", "string", "$", "hook", ",", "$", "params", ")", "{", "if", "(", "!", "(", "$", "params", "instanceof", "Dictionary", ")", ")", "$", "params", "=", "TypedDictionary", "::", "wrap", "(", "$", "params", ")",...
Call the specified hook with the provided parameters. @param array $params The parameters for the hook. You can pass in an array or any traversable object. If it is not yet an instance of Dictionary, it will be converted to a TypedDictionary to fix the types. @return Dictionary The collected responses of the hooks.
[ "Call", "the", "specified", "hook", "with", "the", "provided", "parameters", "." ]
0e080251bbaa8e7d91ae8d02eb79c029c976744a
https://github.com/Wedeto/Util/blob/0e080251bbaa8e7d91ae8d02eb79c029c976744a/src/Hook.php#L197-L254
202,835
Wedeto/Util
src/Hook.php
Hook.getSubscribers
public static function getSubscribers(string $hook) { if (!isset(self::$hooks[$hook])) return array(); $subs = []; foreach (self::$hooks[$hook] as $h) $subs[] = $h['callback']; return $subs; }
php
public static function getSubscribers(string $hook) { if (!isset(self::$hooks[$hook])) return array(); $subs = []; foreach (self::$hooks[$hook] as $h) $subs[] = $h['callback']; return $subs; }
[ "public", "static", "function", "getSubscribers", "(", "string", "$", "hook", ")", "{", "if", "(", "!", "isset", "(", "self", "::", "$", "hooks", "[", "$", "hook", "]", ")", ")", "return", "array", "(", ")", ";", "$", "subs", "=", "[", "]", ";", ...
Return the subscribers for the hook. @param string $hook The hook name @return array The list of subscribers to that hook
[ "Return", "the", "subscribers", "for", "the", "hook", "." ]
0e080251bbaa8e7d91ae8d02eb79c029c976744a
https://github.com/Wedeto/Util/blob/0e080251bbaa8e7d91ae8d02eb79c029c976744a/src/Hook.php#L288-L298
202,836
Wedeto/Util
src/Hook.php
Hook.getExecuteCount
public static function getExecuteCount(string $hook) { return isset(self::$counters[$hook]) ? self::$counters[$hook] : 0; }
php
public static function getExecuteCount(string $hook) { return isset(self::$counters[$hook]) ? self::$counters[$hook] : 0; }
[ "public", "static", "function", "getExecuteCount", "(", "string", "$", "hook", ")", "{", "return", "isset", "(", "self", "::", "$", "counters", "[", "$", "hook", "]", ")", "?", "self", "::", "$", "counters", "[", "$", "hook", "]", ":", "0", ";", "}...
Return the amount of times the hook has been executed @param string $hook The hook name @return int The hook execution counter for this hook
[ "Return", "the", "amount", "of", "times", "the", "hook", "has", "been", "executed" ]
0e080251bbaa8e7d91ae8d02eb79c029c976744a
https://github.com/Wedeto/Util/blob/0e080251bbaa8e7d91ae8d02eb79c029c976744a/src/Hook.php#L305-L308
202,837
Wedeto/Util
src/Hook.php
Hook.resetHook
public static function resetHook(string $hook) { if (isset(self::$hooks[$hook])) unset(self::$hooks[$hook]); if (isset(self::$counters[$hook])) unset(self::$counters[$hook]); if (isset(self::$paused[$hook])) unset(self::$paused[$hook]); }
php
public static function resetHook(string $hook) { if (isset(self::$hooks[$hook])) unset(self::$hooks[$hook]); if (isset(self::$counters[$hook])) unset(self::$counters[$hook]); if (isset(self::$paused[$hook])) unset(self::$paused[$hook]); }
[ "public", "static", "function", "resetHook", "(", "string", "$", "hook", ")", "{", "if", "(", "isset", "(", "self", "::", "$", "hooks", "[", "$", "hook", "]", ")", ")", "unset", "(", "self", "::", "$", "hooks", "[", "$", "hook", "]", ")", ";", ...
Forget about a hook entirely. This will remove all subscribers, reset the counter to 0 and remove the paused state for the hook. @param string $hook The hook to forget
[ "Forget", "about", "a", "hook", "entirely", ".", "This", "will", "remove", "all", "subscribers", "reset", "the", "counter", "to", "0", "and", "remove", "the", "paused", "state", "for", "the", "hook", "." ]
0e080251bbaa8e7d91ae8d02eb79c029c976744a
https://github.com/Wedeto/Util/blob/0e080251bbaa8e7d91ae8d02eb79c029c976744a/src/Hook.php#L316-L324
202,838
Wedeto/Util
src/Hook.php
Hook.getRegisteredHooks
public static function getRegisteredHooks() { $subscribed = array_keys(self::$hooks); $called = array_keys(self::$counters); $all = array_merge($subscribed, $called); return array_unique($all); }
php
public static function getRegisteredHooks() { $subscribed = array_keys(self::$hooks); $called = array_keys(self::$counters); $all = array_merge($subscribed, $called); return array_unique($all); }
[ "public", "static", "function", "getRegisteredHooks", "(", ")", "{", "$", "subscribed", "=", "array_keys", "(", "self", "::", "$", "hooks", ")", ";", "$", "called", "=", "array_keys", "(", "self", "::", "$", "counters", ")", ";", "$", "all", "=", "arra...
Get all hooks that either have subscribers or have been executed @return array The list of hooks that have been called or subscribed to.
[ "Get", "all", "hooks", "that", "either", "have", "subscribers", "or", "have", "been", "executed" ]
0e080251bbaa8e7d91ae8d02eb79c029c976744a
https://github.com/Wedeto/Util/blob/0e080251bbaa8e7d91ae8d02eb79c029c976744a/src/Hook.php#L330-L336
202,839
bkstg/schedule-bundle
Controller/CalendarController.php
CalendarController.personalAction
public function personalAction( AuthorizationCheckerInterface $auth, Request $request ): Response { return new Response($this->templating->render( '@BkstgSchedule/Calendar/personal.html.twig' )); }
php
public function personalAction( AuthorizationCheckerInterface $auth, Request $request ): Response { return new Response($this->templating->render( '@BkstgSchedule/Calendar/personal.html.twig' )); }
[ "public", "function", "personalAction", "(", "AuthorizationCheckerInterface", "$", "auth", ",", "Request", "$", "request", ")", ":", "Response", "{", "return", "new", "Response", "(", "$", "this", "->", "templating", "->", "render", "(", "'@BkstgSchedule/Calendar/...
Show a calendar for a user. @param AuthorizationCheckerInterface $auth The authorization checker service. @param Request $request The current request. @throws NotFoundHttpException When the production does not exist. @throws AccessDeniedException When the user is not an editor. @return Respo...
[ "Show", "a", "calendar", "for", "a", "user", "." ]
e64ac897aa7b28bc48319470d65de13cd4788afe
https://github.com/bkstg/schedule-bundle/blob/e64ac897aa7b28bc48319470d65de13cd4788afe/Controller/CalendarController.php#L112-L119
202,840
bkstg/schedule-bundle
Controller/CalendarController.php
CalendarController.prepareResult
private function prepareResult(array $events, Production $production = null): array { // Create array of events for calendar. $result = [ 'success' => 1, 'result' => [], ]; // Index schedules so we don't duplicate them. $schedules = []; foreac...
php
private function prepareResult(array $events, Production $production = null): array { // Create array of events for calendar. $result = [ 'success' => 1, 'result' => [], ]; // Index schedules so we don't duplicate them. $schedules = []; foreac...
[ "private", "function", "prepareResult", "(", "array", "$", "events", ",", "Production", "$", "production", "=", "null", ")", ":", "array", "{", "// Create array of events for calendar.", "$", "result", "=", "[", "'success'", "=>", "1", ",", "'result'", "=>", "...
Helper function to prepare results for the calendar. @param array $events The events to return. @param Production $production The production for these events. @return array The formatted events.
[ "Helper", "function", "to", "prepare", "results", "for", "the", "calendar", "." ]
e64ac897aa7b28bc48319470d65de13cd4788afe
https://github.com/bkstg/schedule-bundle/blob/e64ac897aa7b28bc48319470d65de13cd4788afe/Controller/CalendarController.php#L158-L205
202,841
black-lamp/blcms-cart
frontend/controllers/CartController.php
CartController.actionAdd
public function actionAdd() { $model = new CartForm(); $post = \Yii::$app->request->post(); if ($model->load(Yii::$app->request->post())) { if ($model->validate()) { $additionalProductForm = []; $productAdditionalProducts = ProductAdditionalProdu...
php
public function actionAdd() { $model = new CartForm(); $post = \Yii::$app->request->post(); if ($model->load(Yii::$app->request->post())) { if ($model->validate()) { $additionalProductForm = []; $productAdditionalProducts = ProductAdditionalProdu...
[ "public", "function", "actionAdd", "(", ")", "{", "$", "model", "=", "new", "CartForm", "(", ")", ";", "$", "post", "=", "\\", "Yii", "::", "$", "app", "->", "request", "->", "post", "(", ")", ";", "if", "(", "$", "model", "->", "load", "(", "Y...
Adds product to cart @return array|bool|\yii\web\Response
[ "Adds", "product", "to", "cart" ]
314796eecae3ca4ed5fecfdc0231a738af50eba7
https://github.com/black-lamp/blcms-cart/blob/314796eecae3ca4ed5fecfdc0231a738af50eba7/frontend/controllers/CartController.php#L55-L105
202,842
black-lamp/blcms-cart
frontend/controllers/CartController.php
CartController.actionShow
public function actionShow() { $this->registerStaticSeoData(); $cart = \Yii::$app->cart; $items = $cart->getOrderItems(); /*EMPTY CART*/ if (empty($items)) { return $this->render('empty-cart'); } /*CART IS NOT EMPTY*/ else { /*...
php
public function actionShow() { $this->registerStaticSeoData(); $cart = \Yii::$app->cart; $items = $cart->getOrderItems(); /*EMPTY CART*/ if (empty($items)) { return $this->render('empty-cart'); } /*CART IS NOT EMPTY*/ else { /*...
[ "public", "function", "actionShow", "(", ")", "{", "$", "this", "->", "registerStaticSeoData", "(", ")", ";", "$", "cart", "=", "\\", "Yii", "::", "$", "app", "->", "cart", ";", "$", "items", "=", "$", "cart", "->", "getOrderItems", "(", ")", ";", ...
Renders cart view with all order products. @return mixed
[ "Renders", "cart", "view", "with", "all", "order", "products", "." ]
314796eecae3ca4ed5fecfdc0231a738af50eba7
https://github.com/black-lamp/blcms-cart/blob/314796eecae3ca4ed5fecfdc0231a738af50eba7/frontend/controllers/CartController.php#L111-L176
202,843
black-lamp/blcms-cart
frontend/controllers/CartController.php
CartController.actionRemove
public function actionRemove(int $productId, int $combinationId = null) { \Yii::$app->cart->removeItem($productId, $combinationId); return $this->redirect(\Yii::$app->request->referrer); }
php
public function actionRemove(int $productId, int $combinationId = null) { \Yii::$app->cart->removeItem($productId, $combinationId); return $this->redirect(\Yii::$app->request->referrer); }
[ "public", "function", "actionRemove", "(", "int", "$", "productId", ",", "int", "$", "combinationId", "=", "null", ")", "{", "\\", "Yii", "::", "$", "app", "->", "cart", "->", "removeItem", "(", "$", "productId", ",", "$", "combinationId", ")", ";", "r...
Removes product from cart @param int $productId @param int $combinationId @return \yii\web\Response
[ "Removes", "product", "from", "cart" ]
314796eecae3ca4ed5fecfdc0231a738af50eba7
https://github.com/black-lamp/blcms-cart/blob/314796eecae3ca4ed5fecfdc0231a738af50eba7/frontend/controllers/CartController.php#L184-L188
202,844
black-lamp/blcms-cart
frontend/controllers/CartController.php
CartController.actionClear
public function actionClear() { \Yii::$app->cart->clearCart(); return $this->redirect(\Yii::$app->request->referrer); }
php
public function actionClear() { \Yii::$app->cart->clearCart(); return $this->redirect(\Yii::$app->request->referrer); }
[ "public", "function", "actionClear", "(", ")", "{", "\\", "Yii", "::", "$", "app", "->", "cart", "->", "clearCart", "(", ")", ";", "return", "$", "this", "->", "redirect", "(", "\\", "Yii", "::", "$", "app", "->", "request", "->", "referrer", ")", ...
Removes all products from cart @return \yii\web\Response
[ "Removes", "all", "products", "from", "cart" ]
314796eecae3ca4ed5fecfdc0231a738af50eba7
https://github.com/black-lamp/blcms-cart/blob/314796eecae3ca4ed5fecfdc0231a738af50eba7/frontend/controllers/CartController.php#L194-L198
202,845
koolkode/security
src/SecurityUtil.php
SecurityUtil.timingSafeEquals
public static function timingSafeEquals($safe, $user) { // Use builtin has comparison function available when running on PHP 5.6+ if(function_exists('hash_equals')) { return hash_equals((string)$safe, (string)$user); } $safe .= chr(0); $user .= chr(0); $safeLen = strlen($safe); $userLen = strlen...
php
public static function timingSafeEquals($safe, $user) { // Use builtin has comparison function available when running on PHP 5.6+ if(function_exists('hash_equals')) { return hash_equals((string)$safe, (string)$user); } $safe .= chr(0); $user .= chr(0); $safeLen = strlen($safe); $userLen = strlen...
[ "public", "static", "function", "timingSafeEquals", "(", "$", "safe", ",", "$", "user", ")", "{", "// Use builtin has comparison function available when running on PHP 5.6+", "if", "(", "function_exists", "(", "'hash_equals'", ")", ")", "{", "return", "hash_equals", "("...
Perform a timing-safe string comparison. @param string $safe Safe string value. @param string $user User-supplied value for comparsion. @return boolean
[ "Perform", "a", "timing", "-", "safe", "string", "comparison", "." ]
d3d8d42392f520754847d29b6df19aaa38c79e8e
https://github.com/koolkode/security/blob/d3d8d42392f520754847d29b6df19aaa38c79e8e/src/SecurityUtil.php#L26-L47
202,846
CismonX/Acast-CronService
src/CronService.php
CronService.loadTasks
function loadTasks(string $namespace, $tasks) { if (!is_array($tasks)) $tasks = [$tasks]; foreach ($tasks as &$task) { $class_name = $namespace.$task; if (!is_subclass_of($class_name, '\\Acast\\CronService\\TaskInterface')) { Console::warning("Invalid ...
php
function loadTasks(string $namespace, $tasks) { if (!is_array($tasks)) $tasks = [$tasks]; foreach ($tasks as &$task) { $class_name = $namespace.$task; if (!is_subclass_of($class_name, '\\Acast\\CronService\\TaskInterface')) { Console::warning("Invalid ...
[ "function", "loadTasks", "(", "string", "$", "namespace", ",", "$", "tasks", ")", "{", "if", "(", "!", "is_array", "(", "$", "tasks", ")", ")", "$", "tasks", "=", "[", "$", "tasks", "]", ";", "foreach", "(", "$", "tasks", "as", "&", "$", "task", ...
Load tasks by namespace and class name. @param string $namespace @param mixed $tasks
[ "Load", "tasks", "by", "namespace", "and", "class", "name", "." ]
a1e48dfb391376421924a91c243ff5756c35c333
https://github.com/CismonX/Acast-CronService/blob/a1e48dfb391376421924a91c243ff5756c35c333/src/CronService.php#L44-L55
202,847
CismonX/Acast-CronService
src/CronService.php
CronService.addTask
protected function addTask(TaskInterface $instance) { $this->_task_list[] = $instance; $this->_cron->add( $instance->name, $instance->time, [$instance, 'execute'], $instance->params, $instance->persistent ); }
php
protected function addTask(TaskInterface $instance) { $this->_task_list[] = $instance; $this->_cron->add( $instance->name, $instance->time, [$instance, 'execute'], $instance->params, $instance->persistent ); }
[ "protected", "function", "addTask", "(", "TaskInterface", "$", "instance", ")", "{", "$", "this", "->", "_task_list", "[", "]", "=", "$", "instance", ";", "$", "this", "->", "_cron", "->", "add", "(", "$", "instance", "->", "name", ",", "$", "instance"...
Add a task to cron service. @param TaskInterface $instance
[ "Add", "a", "task", "to", "cron", "service", "." ]
a1e48dfb391376421924a91c243ff5756c35c333
https://github.com/CismonX/Acast-CronService/blob/a1e48dfb391376421924a91c243ff5756c35c333/src/CronService.php#L61-L70
202,848
CismonX/Acast-CronService
src/CronService.php
CronService.destroy
function destroy() { foreach ($this->_task_list as $task) $task->destroy(); Cron::destroy($this->_name); }
php
function destroy() { foreach ($this->_task_list as $task) $task->destroy(); Cron::destroy($this->_name); }
[ "function", "destroy", "(", ")", "{", "foreach", "(", "$", "this", "->", "_task_list", "as", "$", "task", ")", "$", "task", "->", "destroy", "(", ")", ";", "Cron", "::", "destroy", "(", "$", "this", "->", "_name", ")", ";", "}" ]
Destroy cron service.
[ "Destroy", "cron", "service", "." ]
a1e48dfb391376421924a91c243ff5756c35c333
https://github.com/CismonX/Acast-CronService/blob/a1e48dfb391376421924a91c243ff5756c35c333/src/CronService.php#L74-L78
202,849
wb-crowdfusion/crowdfusion
system/core/classes/systemdb/AbstractSystemValidator.php
AbstractSystemValidator.add
protected function add(ModelObject $obj) { // Check that all required fields exist. $this->getErrors()->validateModelObject($obj); if ($this->dao->slugExists($obj->Slug)) $this->errors->reject("The slug for this ".get_class($obj)." record is already in use."); }
php
protected function add(ModelObject $obj) { // Check that all required fields exist. $this->getErrors()->validateModelObject($obj); if ($this->dao->slugExists($obj->Slug)) $this->errors->reject("The slug for this ".get_class($obj)." record is already in use."); }
[ "protected", "function", "add", "(", "ModelObject", "$", "obj", ")", "{", "// Check that all required fields exist.", "$", "this", "->", "getErrors", "(", ")", "->", "validateModelObject", "(", "$", "obj", ")", ";", "if", "(", "$", "this", "->", "dao", "->",...
Validates the model object and ensures that slug doesn't exist anywhere. @param ModelObject $obj The object to validate @return void
[ "Validates", "the", "model", "object", "and", "ensures", "that", "slug", "doesn", "t", "exist", "anywhere", "." ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/systemdb/AbstractSystemValidator.php#L49-L56
202,850
wb-crowdfusion/crowdfusion
system/core/classes/systemdb/AbstractSystemValidator.php
AbstractSystemValidator.edit
protected function edit(ModelObject $obj) { if ($obj->{$obj->getPrimaryKey()} == null) $this->errors->reject("{$obj->getPrimaryKey()} is required to edit.")->throwOnError(); if ($this->dao->getByID($obj->{$obj->getPrimaryKey()}) == false) $this->getErrors()->reject("Record n...
php
protected function edit(ModelObject $obj) { if ($obj->{$obj->getPrimaryKey()} == null) $this->errors->reject("{$obj->getPrimaryKey()} is required to edit.")->throwOnError(); if ($this->dao->getByID($obj->{$obj->getPrimaryKey()}) == false) $this->getErrors()->reject("Record n...
[ "protected", "function", "edit", "(", "ModelObject", "$", "obj", ")", "{", "if", "(", "$", "obj", "->", "{", "$", "obj", "->", "getPrimaryKey", "(", ")", "}", "==", "null", ")", "$", "this", "->", "errors", "->", "reject", "(", "\"{$obj->getPrimaryKey(...
Ensures we have a valid model object, and that it's slug is not in conflict, then validates the object @param ModelObject $obj The object to validate @return void
[ "Ensures", "we", "have", "a", "valid", "model", "object", "and", "that", "it", "s", "slug", "is", "not", "in", "conflict", "then", "validates", "the", "object" ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/systemdb/AbstractSystemValidator.php#L66-L78
202,851
wb-crowdfusion/crowdfusion
system/core/classes/systemdb/AbstractSystemValidator.php
AbstractSystemValidator.delete
protected function delete($slug) { if ($this->dao->getBySlug($slug) == false) $this->getErrors()->reject('Record not found for slug:' . $slug); }
php
protected function delete($slug) { if ($this->dao->getBySlug($slug) == false) $this->getErrors()->reject('Record not found for slug:' . $slug); }
[ "protected", "function", "delete", "(", "$", "slug", ")", "{", "if", "(", "$", "this", "->", "dao", "->", "getBySlug", "(", "$", "slug", ")", "==", "false", ")", "$", "this", "->", "getErrors", "(", ")", "->", "reject", "(", "'Record not found for slug...
Ensures that the record exists for the given slug @param string $slug The slug to lookup @return void
[ "Ensures", "that", "the", "record", "exists", "for", "the", "given", "slug" ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/systemdb/AbstractSystemValidator.php#L87-L91
202,852
zwilias/beanie
src/Server/Socket.php
Socket.readLine
public function readLine($endOfLine = Server::EOL) { $this->ensureConnected(); $buffer = ''; do { $buffer .= $this->read(self::MAX_SINGLE_RESPONSE_LENGTH); $eolPosition = strpos($buffer, $endOfLine); } while ($eolPosition === false); $this->readBuff...
php
public function readLine($endOfLine = Server::EOL) { $this->ensureConnected(); $buffer = ''; do { $buffer .= $this->read(self::MAX_SINGLE_RESPONSE_LENGTH); $eolPosition = strpos($buffer, $endOfLine); } while ($eolPosition === false); $this->readBuff...
[ "public", "function", "readLine", "(", "$", "endOfLine", "=", "Server", "::", "EOL", ")", "{", "$", "this", "->", "ensureConnected", "(", ")", ";", "$", "buffer", "=", "''", ";", "do", "{", "$", "buffer", ".=", "$", "this", "->", "read", "(", "self...
Reads data from the connected socket in chunks of MAX_SINGLE_RESPONSE_LENGTH The MAX_SINGLE_RESPONSE_LENGTH should always capture at least the first line of a response, assuming the longest possible response is the USING <tubename>\r\n response, which could be up to 208 bytes in length, for any valid <tubename>. As a ...
[ "Reads", "data", "from", "the", "connected", "socket", "in", "chunks", "of", "MAX_SINGLE_RESPONSE_LENGTH" ]
8f0993a163c73ca0dfe1d0b3779fb188ff9cc304
https://github.com/zwilias/beanie/blob/8f0993a163c73ca0dfe1d0b3779fb188ff9cc304/src/Server/Socket.php#L86-L99
202,853
kambalabs/KmbCache
src/KmbCache/Service/MainCacheManager.php
MainCacheManager.getCacheManager
public function getCacheManager($key) { return array_key_exists($key, $this->cacheManagers) ? $this->cacheManagers[$key] : null; }
php
public function getCacheManager($key) { return array_key_exists($key, $this->cacheManagers) ? $this->cacheManagers[$key] : null; }
[ "public", "function", "getCacheManager", "(", "$", "key", ")", "{", "return", "array_key_exists", "(", "$", "key", ",", "$", "this", "->", "cacheManagers", ")", "?", "$", "this", "->", "cacheManagers", "[", "$", "key", "]", ":", "null", ";", "}" ]
Get CacheManager. @param string $key @return \KmbCache\Service\AbstractCacheManager
[ "Get", "CacheManager", "." ]
9865ccde8f17fa5ad0ace103e50c164559a389f0
https://github.com/kambalabs/KmbCache/blob/9865ccde8f17fa5ad0ace103e50c164559a389f0/src/KmbCache/Service/MainCacheManager.php#L96-L99
202,854
shrink0r/monatic
src/Maybe.php
Maybe.get
public function get(callable $codeBlock = null) { if (is_callable($codeBlock)) { return call_user_func($codeBlock, $this->value); } else { return $this->value; } }
php
public function get(callable $codeBlock = null) { if (is_callable($codeBlock)) { return call_user_func($codeBlock, $this->value); } else { return $this->value; } }
[ "public", "function", "get", "(", "callable", "$", "codeBlock", "=", "null", ")", "{", "if", "(", "is_callable", "(", "$", "codeBlock", ")", ")", "{", "return", "call_user_func", "(", "$", "codeBlock", ",", "$", "this", "->", "value", ")", ";", "}", ...
Returns the monad's value and applies an optional code-block before returning it. @param callable $codeBlock @return mixed
[ "Returns", "the", "monad", "s", "value", "and", "applies", "an", "optional", "code", "-", "block", "before", "returning", "it", "." ]
f39b8b2ef68a397d31d844341487412b335fd107
https://github.com/shrink0r/monatic/blob/f39b8b2ef68a397d31d844341487412b335fd107/src/Maybe.php#L41-L48
202,855
shrink0r/monatic
src/Maybe.php
Maybe.bind
public function bind(callable $codeBlock) { if ($this->value === null) { return new None; } else { return static::unit(call_user_func($codeBlock, $this->value)); } }
php
public function bind(callable $codeBlock) { if ($this->value === null) { return new None; } else { return static::unit(call_user_func($codeBlock, $this->value)); } }
[ "public", "function", "bind", "(", "callable", "$", "codeBlock", ")", "{", "if", "(", "$", "this", "->", "value", "===", "null", ")", "{", "return", "new", "None", ";", "}", "else", "{", "return", "static", "::", "unit", "(", "call_user_func", "(", "...
Runs the given code-block on the monad's value, if the value isn't null. @param callable $codeBlock Is expected to return the next value to be unitped. @return Maybe Returns None if the next value is null.
[ "Runs", "the", "given", "code", "-", "block", "on", "the", "monad", "s", "value", "if", "the", "value", "isn", "t", "null", "." ]
f39b8b2ef68a397d31d844341487412b335fd107
https://github.com/shrink0r/monatic/blob/f39b8b2ef68a397d31d844341487412b335fd107/src/Maybe.php#L57-L64
202,856
bkstg/resource-bundle
Timeline/EventSubscriber/ResourceTimelineSubscriber.php
ResourceTimelineSubscriber.createResourceTimelineEntry
public function createResourceTimelineEntry(EntityPublishedEvent $event): void { // Only act on resource objects. $resource = $event->getObject(); if (!$resource instanceof Resource) { return; } // Get the author for the resource. $author = $this->user_pr...
php
public function createResourceTimelineEntry(EntityPublishedEvent $event): void { // Only act on resource objects. $resource = $event->getObject(); if (!$resource instanceof Resource) { return; } // Get the author for the resource. $author = $this->user_pr...
[ "public", "function", "createResourceTimelineEntry", "(", "EntityPublishedEvent", "$", "event", ")", ":", "void", "{", "// Only act on resource objects.", "$", "resource", "=", "$", "event", "->", "getObject", "(", ")", ";", "if", "(", "!", "$", "resource", "ins...
Create the resource timeline entry. @param EntityPublishedEvent $event The entity published event. @return void
[ "Create", "the", "resource", "timeline", "entry", "." ]
9d094366799a4df117a1dd747af9bb6debe14325
https://github.com/bkstg/resource-bundle/blob/9d094366799a4df117a1dd747af9bb6debe14325/Timeline/EventSubscriber/ResourceTimelineSubscriber.php#L60-L89
202,857
cmsgears/module-sns-connect
common/models/forms/SnsLogin.php
SnsLogin.validateUser
public function validateUser( $attribute, $params ) { if( !$this->hasErrors() ) { $user = $this->user; if( !isset( $user ) ) { $this->addError( $attribute, Yii::$app->coreMessage->getMessage( CoreGlobal::ERROR_USER_NOT_EXIST ) ); } else { if( !$this->hasErrors() && !$u...
php
public function validateUser( $attribute, $params ) { if( !$this->hasErrors() ) { $user = $this->user; if( !isset( $user ) ) { $this->addError( $attribute, Yii::$app->coreMessage->getMessage( CoreGlobal::ERROR_USER_NOT_EXIST ) ); } else { if( !$this->hasErrors() && !$u...
[ "public", "function", "validateUser", "(", "$", "attribute", ",", "$", "params", ")", "{", "if", "(", "!", "$", "this", "->", "hasErrors", "(", ")", ")", "{", "$", "user", "=", "$", "this", "->", "user", ";", "if", "(", "!", "isset", "(", "$", ...
Check whether valid user already exist and available for SNS login. @param string $attribute @param array $params @return void
[ "Check", "whether", "valid", "user", "already", "exist", "and", "available", "for", "SNS", "login", "." ]
753ee4157d41c81a701689624f4c44760a6cada3
https://github.com/cmsgears/module-sns-connect/blob/753ee4157d41c81a701689624f4c44760a6cada3/common/models/forms/SnsLogin.php#L129-L152
202,858
cmsgears/module-sns-connect
common/models/forms/SnsLogin.php
SnsLogin.login
public function login() { if( $this->validate() ) { $user = $this->getUser(); $user->lastLoginAt = DateUtil::getDateTime(); $user->save(); return Yii::$app->user->login( $user, false ); } return false; }
php
public function login() { if( $this->validate() ) { $user = $this->getUser(); $user->lastLoginAt = DateUtil::getDateTime(); $user->save(); return Yii::$app->user->login( $user, false ); } return false; }
[ "public", "function", "login", "(", ")", "{", "if", "(", "$", "this", "->", "validate", "(", ")", ")", "{", "$", "user", "=", "$", "this", "->", "getUser", "(", ")", ";", "$", "user", "->", "lastLoginAt", "=", "DateUtil", "::", "getDateTime", "(", ...
Logs in the user. @return boolean
[ "Logs", "in", "the", "user", "." ]
753ee4157d41c81a701689624f4c44760a6cada3
https://github.com/cmsgears/module-sns-connect/blob/753ee4157d41c81a701689624f4c44760a6cada3/common/models/forms/SnsLogin.php#L176-L190
202,859
ornament-orm/core
src/Model.php
Model.__isset
public function __isset(string $prop) : bool { $annotations = $this->__ornamentalize(); foreach ($annotations['methods'] as $name => $anns) { if (isset($anns['get']) && $anns['get'] == $prop) { return true; } } return property_exists($this->__s...
php
public function __isset(string $prop) : bool { $annotations = $this->__ornamentalize(); foreach ($annotations['methods'] as $name => $anns) { if (isset($anns['get']) && $anns['get'] == $prop) { return true; } } return property_exists($this->__s...
[ "public", "function", "__isset", "(", "string", "$", "prop", ")", ":", "bool", "{", "$", "annotations", "=", "$", "this", "->", "__ornamentalize", "(", ")", ";", "foreach", "(", "$", "annotations", "[", "'methods'", "]", "as", "$", "name", "=>", "$", ...
Check if a property is defined. Note that this will return true for protected properties. @param string $prop The property to check. @return boolean True if set, otherwise false.
[ "Check", "if", "a", "property", "is", "defined", ".", "Note", "that", "this", "will", "return", "true", "for", "protected", "properties", "." ]
b573c89d11a183c2e0e11afe8b6fdd56b2cd5ba8
https://github.com/ornament-orm/core/blob/b573c89d11a183c2e0e11afe8b6fdd56b2cd5ba8/src/Model.php#L252-L262
202,860
rollerworks/search-core
Loader/ConditionExporterLoader.php
ConditionExporterLoader.create
public static function create(): self { return new self( new ClosureContainer( [ 'rollerworks_search.condition_exporter.json' => function () { return new Exporter\JsonExporter(); }, 'rollerworks_s...
php
public static function create(): self { return new self( new ClosureContainer( [ 'rollerworks_search.condition_exporter.json' => function () { return new Exporter\JsonExporter(); }, 'rollerworks_s...
[ "public", "static", "function", "create", "(", ")", ":", "self", "{", "return", "new", "self", "(", "new", "ClosureContainer", "(", "[", "'rollerworks_search.condition_exporter.json'", "=>", "function", "(", ")", "{", "return", "new", "Exporter", "\\", "JsonExpo...
Create a new ConditionExporterLoader with the build-in ConditionExporters loadable. @return ConditionExporterLoader
[ "Create", "a", "new", "ConditionExporterLoader", "with", "the", "build", "-", "in", "ConditionExporters", "loadable", "." ]
6b5671b8c4d6298906ded768261b0a59845140fb
https://github.com/rollerworks/search-core/blob/6b5671b8c4d6298906ded768261b0a59845140fb/Loader/ConditionExporterLoader.php#L48-L70
202,861
phpffcms/ffcms-core
src/Network/Request.php
Request.loadTrustedProxies
private function loadTrustedProxies() { $proxies = App::$Properties->get('trustedProxy'); if (!$proxies || Str::likeEmpty($proxies)) { return; } $pList = explode(',', $proxies); $resultList = []; foreach ($pList as $proxy) { $resultList[] = tr...
php
private function loadTrustedProxies() { $proxies = App::$Properties->get('trustedProxy'); if (!$proxies || Str::likeEmpty($proxies)) { return; } $pList = explode(',', $proxies); $resultList = []; foreach ($pList as $proxy) { $resultList[] = tr...
[ "private", "function", "loadTrustedProxies", "(", ")", "{", "$", "proxies", "=", "App", "::", "$", "Properties", "->", "get", "(", "'trustedProxy'", ")", ";", "if", "(", "!", "$", "proxies", "||", "Str", "::", "likeEmpty", "(", "$", "proxies", ")", ")"...
Set trusted proxies from configs
[ "Set", "trusted", "proxies", "from", "configs" ]
44a309553ef9f115ccfcfd71f2ac6e381c612082
https://github.com/phpffcms/ffcms-core/blob/44a309553ef9f115ccfcfd71f2ac6e381c612082/src/Network/Request.php#L88-L101
202,862
phpffcms/ffcms-core
src/Network/Request.php
Request.getPathInfo
public function getPathInfo() { $route = $this->languageInPath ? Str::sub(parent::getPathInfo(), Str::length($this->language) + 1) : parent::getPathInfo(); if (!Str::startsWith('/', $route)) { $route = '/' . $route; } return $route; }
php
public function getPathInfo() { $route = $this->languageInPath ? Str::sub(parent::getPathInfo(), Str::length($this->language) + 1) : parent::getPathInfo(); if (!Str::startsWith('/', $route)) { $route = '/' . $route; } return $route; }
[ "public", "function", "getPathInfo", "(", ")", "{", "$", "route", "=", "$", "this", "->", "languageInPath", "?", "Str", "::", "sub", "(", "parent", "::", "getPathInfo", "(", ")", ",", "Str", "::", "length", "(", "$", "this", "->", "language", ")", "+...
Get pathway as string @return string
[ "Get", "pathway", "as", "string" ]
44a309553ef9f115ccfcfd71f2ac6e381c612082
https://github.com/phpffcms/ffcms-core/blob/44a309553ef9f115ccfcfd71f2ac6e381c612082/src/Network/Request.php#L107-L114
202,863
phpffcms/ffcms-core
src/Network/Request.php
Request.getInterfaceSlug
public function getInterfaceSlug(): string { $path = $this->getBasePath(); $subDir = App::$Properties->get('basePath'); if ($subDir !== '/') { $offset = (int)Str::length($subDir); $path = Str::sub($path, --$offset); } return $path; }
php
public function getInterfaceSlug(): string { $path = $this->getBasePath(); $subDir = App::$Properties->get('basePath'); if ($subDir !== '/') { $offset = (int)Str::length($subDir); $path = Str::sub($path, --$offset); } return $path; }
[ "public", "function", "getInterfaceSlug", "(", ")", ":", "string", "{", "$", "path", "=", "$", "this", "->", "getBasePath", "(", ")", ";", "$", "subDir", "=", "App", "::", "$", "Properties", "->", "get", "(", "'basePath'", ")", ";", "if", "(", "$", ...
Get base path from current environment without basePath of subdirectories @return string
[ "Get", "base", "path", "from", "current", "environment", "without", "basePath", "of", "subdirectories" ]
44a309553ef9f115ccfcfd71f2ac6e381c612082
https://github.com/phpffcms/ffcms-core/blob/44a309553ef9f115ccfcfd71f2ac6e381c612082/src/Network/Request.php#L152-L161
202,864
phpffcms/ffcms-core
src/Network/Request.php
Request.setTemplexFeatures
private function setTemplexFeatures(): void { $url = $this->getSchemeAndHttpHost(); $sub = null; if ($this->getInterfaceSlug() && Str::length($this->getInterfaceSlug()) > 0) { $sub = $this->getInterfaceSlug() . '/'; } if ($this->languageInPath()) { $s...
php
private function setTemplexFeatures(): void { $url = $this->getSchemeAndHttpHost(); $sub = null; if ($this->getInterfaceSlug() && Str::length($this->getInterfaceSlug()) > 0) { $sub = $this->getInterfaceSlug() . '/'; } if ($this->languageInPath()) { $s...
[ "private", "function", "setTemplexFeatures", "(", ")", ":", "void", "{", "$", "url", "=", "$", "this", "->", "getSchemeAndHttpHost", "(", ")", ";", "$", "sub", "=", "null", ";", "if", "(", "$", "this", "->", "getInterfaceSlug", "(", ")", "&&", "Str", ...
Set templex template engine URL features @return void
[ "Set", "templex", "template", "engine", "URL", "features" ]
44a309553ef9f115ccfcfd71f2ac6e381c612082
https://github.com/phpffcms/ffcms-core/blob/44a309553ef9f115ccfcfd71f2ac6e381c612082/src/Network/Request.php#L167-L180
202,865
dms-org/common.structure
src/FileSystem/UploadedFileFactory.php
UploadedFileFactory.build
public static function build(string $fullPath, int $uploadStatus, string $clientFileName = null, string $clientMimeType = null) : \Dms\Core\File\IUploadedFile { if ($clientMimeType && stripos($clientMimeType, 'image') === 0) { return new UploadedImage( $fullPath, ...
php
public static function build(string $fullPath, int $uploadStatus, string $clientFileName = null, string $clientMimeType = null) : \Dms\Core\File\IUploadedFile { if ($clientMimeType && stripos($clientMimeType, 'image') === 0) { return new UploadedImage( $fullPath, ...
[ "public", "static", "function", "build", "(", "string", "$", "fullPath", ",", "int", "$", "uploadStatus", ",", "string", "$", "clientFileName", "=", "null", ",", "string", "$", "clientMimeType", "=", "null", ")", ":", "\\", "Dms", "\\", "Core", "\\", "Fi...
Builds a new uploaded file instance based on the given mime type. @param string $fullPath @param int $uploadStatus @param string|null $clientFileName @param string|null $clientMimeType @return IUploadedFile
[ "Builds", "a", "new", "uploaded", "file", "instance", "based", "on", "the", "given", "mime", "type", "." ]
23f122182f60df5ec847047a81a39c8aab019ff1
https://github.com/dms-org/common.structure/blob/23f122182f60df5ec847047a81a39c8aab019ff1/src/FileSystem/UploadedFileFactory.php#L24-L41
202,866
luxorphp/collections
src/Lists/InfiniteList.php
InfiniteList.get
public function get(int $address = null): int { if ($address == null) { $temp = $this->value++; $this->memory[$this->lenght] = $temp; $this->lenght++; return $temp; } else { if ($address > -1) { return $this->memory[$add...
php
public function get(int $address = null): int { if ($address == null) { $temp = $this->value++; $this->memory[$this->lenght] = $temp; $this->lenght++; return $temp; } else { if ($address > -1) { return $this->memory[$add...
[ "public", "function", "get", "(", "int", "$", "address", "=", "null", ")", ":", "int", "{", "if", "(", "$", "address", "==", "null", ")", "{", "$", "temp", "=", "$", "this", "->", "value", "++", ";", "$", "this", "->", "memory", "[", "$", "this...
Autogenera un numero entero de forma correlativa. @link http://php.net/manual/es/ @return int Se retorna un numero entero autogenerado.
[ "Autogenera", "un", "numero", "entero", "de", "forma", "correlativa", "." ]
4ee72e854874616c14938fdb40cabee00673edd9
https://github.com/luxorphp/collections/blob/4ee72e854874616c14938fdb40cabee00673edd9/src/Lists/InfiniteList.php#L36-L48
202,867
squareproton/Bond
src/Bond/Pg/Catalog/Repository/Index.php
Index.findByName
public function findByName( $name ) { // is this name schema qualified $call = sprintf( "findBy%s", ( false !== strpos( $name, '.' ) ) ? 'FullyQualifiedName' : 'Name' ); $found = $this->persistedGet()->$call( $name ); // return switch( $coun...
php
public function findByName( $name ) { // is this name schema qualified $call = sprintf( "findBy%s", ( false !== strpos( $name, '.' ) ) ? 'FullyQualifiedName' : 'Name' ); $found = $this->persistedGet()->$call( $name ); // return switch( $coun...
[ "public", "function", "findByName", "(", "$", "name", ")", "{", "// is this name schema qualified", "$", "call", "=", "sprintf", "(", "\"findBy%s\"", ",", "(", "false", "!==", "strpos", "(", "$", "name", ",", "'.'", ")", ")", "?", "'FullyQualifiedName'", ":"...
Return a index from it's name @param string @return Entity\Relation
[ "Return", "a", "index", "from", "it", "s", "name" ]
a04ad9dd1a35adeaec98237716c2a41ce02b4f1a
https://github.com/squareproton/Bond/blob/a04ad9dd1a35adeaec98237716c2a41ce02b4f1a/src/Bond/Pg/Catalog/Repository/Index.php#L88-L109
202,868
guide42/plan
library/MultipleInvalid.php
MultipleInvalid.getDepth
public function getDepth(): int { $depth = parent::getDepth(); $paths = array_filter(array_map( /** * Extracts error path. * * @param Invalid $error the exception * * @return array|null */ function(...
php
public function getDepth(): int { $depth = parent::getDepth(); $paths = array_filter(array_map( /** * Extracts error path. * * @param Invalid $error the exception * * @return array|null */ function(...
[ "public", "function", "getDepth", "(", ")", ":", "int", "{", "$", "depth", "=", "parent", "::", "getDepth", "(", ")", ";", "$", "paths", "=", "array_filter", "(", "array_map", "(", "/**\n * Extracts error path.\n *\n * @param Invali...
Calculate the maximum depth between its errors. @return int
[ "Calculate", "the", "maximum", "depth", "between", "its", "errors", "." ]
f1b23687fedaff5dcca11bda774613a0a6117d7e
https://github.com/guide42/plan/blob/f1b23687fedaff5dcca11bda774613a0a6117d7e/library/MultipleInvalid.php#L72-L94
202,869
guide42/plan
library/MultipleInvalid.php
MultipleInvalid.getFlatErrors
public function getFlatErrors(): array { /** * Reducer that flat the errors. * * @param array $carry previous error list * @param Invalid $item to append to $carry * * @return array<Invalid> */ $reduce = function(array $carry, Invalid...
php
public function getFlatErrors(): array { /** * Reducer that flat the errors. * * @param array $carry previous error list * @param Invalid $item to append to $carry * * @return array<Invalid> */ $reduce = function(array $carry, Invalid...
[ "public", "function", "getFlatErrors", "(", ")", ":", "array", "{", "/**\n * Reducer that flat the errors.\n *\n * @param array $carry previous error list\n * @param Invalid $item to append to $carry\n *\n * @return array<Invalid>\n */", "...
Retrieve a list of `Invalid` errors. The returning array will have one level deep only. @return array<Invalid>
[ "Retrieve", "a", "list", "of", "Invalid", "errors", ".", "The", "returning", "array", "will", "have", "one", "level", "deep", "only", "." ]
f1b23687fedaff5dcca11bda774613a0a6117d7e
https://github.com/guide42/plan/blob/f1b23687fedaff5dcca11bda774613a0a6117d7e/library/MultipleInvalid.php#L102-L126
202,870
Dhii/callback-abstract
src/InvokeCallableCapableTrait.php
InvokeCallableCapableTrait._invokeCallable
protected function _invokeCallable($callable, $args) { if (!is_callable($callable)) { throw $this->_createInvalidArgumentException($this->__('Callable is not callable'), null, null, $callable); } $args = $this->_normalizeArray($args); try { $reflection = $th...
php
protected function _invokeCallable($callable, $args) { if (!is_callable($callable)) { throw $this->_createInvalidArgumentException($this->__('Callable is not callable'), null, null, $callable); } $args = $this->_normalizeArray($args); try { $reflection = $th...
[ "protected", "function", "_invokeCallable", "(", "$", "callable", ",", "$", "args", ")", "{", "if", "(", "!", "is_callable", "(", "$", "callable", ")", ")", "{", "throw", "$", "this", "->", "_createInvalidArgumentException", "(", "$", "this", "->", "__", ...
Invokes a callable. @since [*next-version*] @param callable $callable The callable to invoke. @param array|Traversable|stdClass $args The arguments to invoke the callable with. @throws InvalidArgumentException If the callable is not callable. @throws InvalidArgumentException If the args...
[ "Invokes", "a", "callable", "." ]
43ed4e99fc6ccdaf46a25d06da482a2fba8d9b19
https://github.com/Dhii/callback-abstract/blob/43ed4e99fc6ccdaf46a25d06da482a2fba8d9b19/src/InvokeCallableCapableTrait.php#L40-L78
202,871
phpffcms/ffcms-core
src/Helper/FileSystem/Normalize.php
Normalize.diskFullPath
public static function diskFullPath($path) { $path = self::diskPath($path); if (!Str::startsWith(root, $path)) { $path = root . DIRECTORY_SEPARATOR . ltrim($path, '\\/'); } return $path; }
php
public static function diskFullPath($path) { $path = self::diskPath($path); if (!Str::startsWith(root, $path)) { $path = root . DIRECTORY_SEPARATOR . ltrim($path, '\\/'); } return $path; }
[ "public", "static", "function", "diskFullPath", "(", "$", "path", ")", "{", "$", "path", "=", "self", "::", "diskPath", "(", "$", "path", ")", ";", "if", "(", "!", "Str", "::", "startsWith", "(", "root", ",", "$", "path", ")", ")", "{", "$", "pat...
Normalize local disk-based ABSOLUTE path. @param string $path @return string
[ "Normalize", "local", "disk", "-", "based", "ABSOLUTE", "path", "." ]
44a309553ef9f115ccfcfd71f2ac6e381c612082
https://github.com/phpffcms/ffcms-core/blob/44a309553ef9f115ccfcfd71f2ac6e381c612082/src/Helper/FileSystem/Normalize.php#L54-L61
202,872
gplcart/cli
controllers/commands/Category.php
Category.cmdGetCategory
public function cmdGetCategory() { $result = $this->getListCategory(); $this->outputFormat($result); $this->outputFormatTableCategory($result); $this->output(); }
php
public function cmdGetCategory() { $result = $this->getListCategory(); $this->outputFormat($result); $this->outputFormatTableCategory($result); $this->output(); }
[ "public", "function", "cmdGetCategory", "(", ")", "{", "$", "result", "=", "$", "this", "->", "getListCategory", "(", ")", ";", "$", "this", "->", "outputFormat", "(", "$", "result", ")", ";", "$", "this", "->", "outputFormatTableCategory", "(", "$", "re...
Callback for "category-get" command
[ "Callback", "for", "category", "-", "get", "command" ]
e57dba53e291a225b4bff0c0d9b23d685dd1c125
https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/Category.php#L40-L46
202,873
gplcart/cli
controllers/commands/Category.php
Category.cmdUpdateCategory
public function cmdUpdateCategory() { $params = $this->getParam(); if (empty($params[0]) || count($params) < 2) { $this->errorAndExit($this->text('Invalid command')); } if (!is_numeric($params[0])) { $this->errorAndExit($this->text('Invalid argument')); ...
php
public function cmdUpdateCategory() { $params = $this->getParam(); if (empty($params[0]) || count($params) < 2) { $this->errorAndExit($this->text('Invalid command')); } if (!is_numeric($params[0])) { $this->errorAndExit($this->text('Invalid argument')); ...
[ "public", "function", "cmdUpdateCategory", "(", ")", "{", "$", "params", "=", "$", "this", "->", "getParam", "(", ")", ";", "if", "(", "empty", "(", "$", "params", "[", "0", "]", ")", "||", "count", "(", "$", "params", ")", "<", "2", ")", "{", ...
Callback for "category-update" command
[ "Callback", "for", "category", "-", "update", "command" ]
e57dba53e291a225b4bff0c0d9b23d685dd1c125
https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/Category.php#L113-L131
202,874
gplcart/cli
controllers/commands/Category.php
Category.getListCategory
protected function getListCategory() { $id = $this->getParam(0); if (!isset($id)) { return $this->category->getList(array('limit' => $this->getLimit())); } if (!is_numeric($id)) { $this->errorAndExit($this->text('Invalid argument')); } if ($...
php
protected function getListCategory() { $id = $this->getParam(0); if (!isset($id)) { return $this->category->getList(array('limit' => $this->getLimit())); } if (!is_numeric($id)) { $this->errorAndExit($this->text('Invalid argument')); } if ($...
[ "protected", "function", "getListCategory", "(", ")", "{", "$", "id", "=", "$", "this", "->", "getParam", "(", "0", ")", ";", "if", "(", "!", "isset", "(", "$", "id", ")", ")", "{", "return", "$", "this", "->", "category", "->", "getList", "(", "...
Returns an array of categories @return array
[ "Returns", "an", "array", "of", "categories" ]
e57dba53e291a225b4bff0c0d9b23d685dd1c125
https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/Category.php#L137-L164
202,875
gplcart/cli
controllers/commands/Category.php
Category.addCategory
protected function addCategory() { if (!$this->isError()) { $id = $this->category->add($this->getSubmitted()); if (empty($id)) { $this->errorAndExit($this->text('Unexpected result')); } $this->line($id); } }
php
protected function addCategory() { if (!$this->isError()) { $id = $this->category->add($this->getSubmitted()); if (empty($id)) { $this->errorAndExit($this->text('Unexpected result')); } $this->line($id); } }
[ "protected", "function", "addCategory", "(", ")", "{", "if", "(", "!", "$", "this", "->", "isError", "(", ")", ")", "{", "$", "id", "=", "$", "this", "->", "category", "->", "add", "(", "$", "this", "->", "getSubmitted", "(", ")", ")", ";", "if",...
Add a new category
[ "Add", "a", "new", "category" ]
e57dba53e291a225b4bff0c0d9b23d685dd1c125
https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/Category.php#L200-L209
202,876
gplcart/cli
controllers/commands/Category.php
Category.submitAddCategory
protected function submitAddCategory() { $this->setSubmitted(null, $this->getParam()); $this->validateComponent('category'); $this->addCategory(); }
php
protected function submitAddCategory() { $this->setSubmitted(null, $this->getParam()); $this->validateComponent('category'); $this->addCategory(); }
[ "protected", "function", "submitAddCategory", "(", ")", "{", "$", "this", "->", "setSubmitted", "(", "null", ",", "$", "this", "->", "getParam", "(", ")", ")", ";", "$", "this", "->", "validateComponent", "(", "'category'", ")", ";", "$", "this", "->", ...
Add a new category at once
[ "Add", "a", "new", "category", "at", "once" ]
e57dba53e291a225b4bff0c0d9b23d685dd1c125
https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/Category.php#L225-L230
202,877
gplcart/cli
controllers/commands/Category.php
Category.wizardAddCategory
protected function wizardAddCategory() { // Required $this->validatePrompt('title', $this->text('Title'), 'category'); $this->validatePrompt('category_group_id', $this->text('Category group ID'), 'category'); // Optional $this->validatePrompt('parent_id', $this->text('Parent...
php
protected function wizardAddCategory() { // Required $this->validatePrompt('title', $this->text('Title'), 'category'); $this->validatePrompt('category_group_id', $this->text('Category group ID'), 'category'); // Optional $this->validatePrompt('parent_id', $this->text('Parent...
[ "protected", "function", "wizardAddCategory", "(", ")", "{", "// Required", "$", "this", "->", "validatePrompt", "(", "'title'", ",", "$", "this", "->", "text", "(", "'Title'", ")", ",", "'category'", ")", ";", "$", "this", "->", "validatePrompt", "(", "'c...
Add a new category step by step
[ "Add", "a", "new", "category", "step", "by", "step" ]
e57dba53e291a225b4bff0c0d9b23d685dd1c125
https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/Category.php#L235-L252
202,878
Topolis/FunctionLibrary
src/Math.php
Math.baseToDec
public static function baseToDec($input, $Chars) { if (preg_match('/^[' . $Chars . ']+$/', $input)){ $Result = (string)'0'; for ($i=0; $i<strlen($input); $i++){ if ($i != 0) $Result = bcmul($Result, strlen($Chars),0); $Result = bcadd($Result, strpos($...
php
public static function baseToDec($input, $Chars) { if (preg_match('/^[' . $Chars . ']+$/', $input)){ $Result = (string)'0'; for ($i=0; $i<strlen($input); $i++){ if ($i != 0) $Result = bcmul($Result, strlen($Chars),0); $Result = bcadd($Result, strpos($...
[ "public", "static", "function", "baseToDec", "(", "$", "input", ",", "$", "Chars", ")", "{", "if", "(", "preg_match", "(", "'/^['", ".", "$", "Chars", ".", "']+$/'", ",", "$", "input", ")", ")", "{", "$", "Result", "=", "(", "string", ")", "'0'", ...
convert character string with arbitrary base to decimal string @param string $input arbitrary base string @param string $Chars list of letters in arbitrary base @return string decimal base string
[ "convert", "character", "string", "with", "arbitrary", "base", "to", "decimal", "string" ]
bc57f465932fbf297927c2a32765255131b907eb
https://github.com/Topolis/FunctionLibrary/blob/bc57f465932fbf297927c2a32765255131b907eb/src/Math.php#L17-L29
202,879
Topolis/FunctionLibrary
src/Math.php
Math.baseFromDec
public static function baseFromDec($input, $Chars) { if (preg_match('/^[0-9]+$/', $input)) { $Result = ''; do { $Result .= $Chars[bcmod($input, strlen($Chars))]; $input = bcdiv($input, strlen($Chars), 0); } w...
php
public static function baseFromDec($input, $Chars) { if (preg_match('/^[0-9]+$/', $input)) { $Result = ''; do { $Result .= $Chars[bcmod($input, strlen($Chars))]; $input = bcdiv($input, strlen($Chars), 0); } w...
[ "public", "static", "function", "baseFromDec", "(", "$", "input", ",", "$", "Chars", ")", "{", "if", "(", "preg_match", "(", "'/^[0-9]+$/'", ",", "$", "input", ")", ")", "{", "$", "Result", "=", "''", ";", "do", "{", "$", "Result", ".=", "$", "Char...
convert character string with decimal base to arbitrary base @param string $input decimal string @param string $Chars @return string|boolean
[ "convert", "character", "string", "with", "decimal", "base", "to", "arbitrary", "base" ]
bc57f465932fbf297927c2a32765255131b907eb
https://github.com/Topolis/FunctionLibrary/blob/bc57f465932fbf297927c2a32765255131b907eb/src/Math.php#L37-L52
202,880
jenskooij/cloudcontrol
src/search/Indexer.php
Indexer.updateIndex
public function updateIndex() { $this->startLogging(); $this->addLog('Indexing start.'); $this->addLog('Clearing index.'); $this->resetIndex(); $this->addLog('Cleaning Published Deleted Documents'); $this->storage->getDocuments()->cleanPublishedDeletedDocuments(); ...
php
public function updateIndex() { $this->startLogging(); $this->addLog('Indexing start.'); $this->addLog('Clearing index.'); $this->resetIndex(); $this->addLog('Cleaning Published Deleted Documents'); $this->storage->getDocuments()->cleanPublishedDeletedDocuments(); ...
[ "public", "function", "updateIndex", "(", ")", "{", "$", "this", "->", "startLogging", "(", ")", ";", "$", "this", "->", "addLog", "(", "'Indexing start.'", ")", ";", "$", "this", "->", "addLog", "(", "'Clearing index.'", ")", ";", "$", "this", "->", "...
Creates a new temporary search db, cleans it if it exists then calculates and stores the search index in this db and finally if indexing completed replaces the current search db with the temporary one. Returns the log in string format. @return string
[ "Creates", "a", "new", "temporary", "search", "db", "cleans", "it", "if", "it", "exists", "then", "calculates", "and", "stores", "the", "search", "index", "in", "this", "db", "and", "finally", "if", "indexing", "completed", "replaces", "the", "current", "sea...
76e5d9ac8f9c50d06d39a995d13cc03742536548
https://github.com/jenskooij/cloudcontrol/blob/76e5d9ac8f9c50d06d39a995d13cc03742536548/src/search/Indexer.php#L53-L75
202,881
jenskooij/cloudcontrol
src/search/Indexer.php
Indexer.createDocumentTermCount
public function createDocumentTermCount($documents) { $termCount = new TermCount($this->getSearchDbHandle(), $documents, $this->filters, $this->storage); $termCount->execute(); }
php
public function createDocumentTermCount($documents) { $termCount = new TermCount($this->getSearchDbHandle(), $documents, $this->filters, $this->storage); $termCount->execute(); }
[ "public", "function", "createDocumentTermCount", "(", "$", "documents", ")", "{", "$", "termCount", "=", "new", "TermCount", "(", "$", "this", "->", "getSearchDbHandle", "(", ")", ",", "$", "documents", ",", "$", "this", "->", "filters", ",", "$", "this", ...
Count how often a term is used in a document @param $documents
[ "Count", "how", "often", "a", "term", "is", "used", "in", "a", "document" ]
76e5d9ac8f9c50d06d39a995d13cc03742536548
https://github.com/jenskooij/cloudcontrol/blob/76e5d9ac8f9c50d06d39a995d13cc03742536548/src/search/Indexer.php#L82-L86
202,882
jenskooij/cloudcontrol
src/search/Indexer.php
Indexer.createInverseDocumentFrequency
public function createInverseDocumentFrequency() { $documentCount = $this->getTotalDocumentCount(); $inverseDocumentFrequency = new InverseDocumentFrequency($this->getSearchDbHandle(), $documentCount); $inverseDocumentFrequency->execute(); }
php
public function createInverseDocumentFrequency() { $documentCount = $this->getTotalDocumentCount(); $inverseDocumentFrequency = new InverseDocumentFrequency($this->getSearchDbHandle(), $documentCount); $inverseDocumentFrequency->execute(); }
[ "public", "function", "createInverseDocumentFrequency", "(", ")", "{", "$", "documentCount", "=", "$", "this", "->", "getTotalDocumentCount", "(", ")", ";", "$", "inverseDocumentFrequency", "=", "new", "InverseDocumentFrequency", "(", "$", "this", "->", "getSearchDb...
Calculates the inverse document frequency for each term. This is a representation of how often a certain term is used in comparison to all terms.
[ "Calculates", "the", "inverse", "document", "frequency", "for", "each", "term", ".", "This", "is", "a", "representation", "of", "how", "often", "a", "certain", "term", "is", "used", "in", "comparison", "to", "all", "terms", "." ]
76e5d9ac8f9c50d06d39a995d13cc03742536548
https://github.com/jenskooij/cloudcontrol/blob/76e5d9ac8f9c50d06d39a995d13cc03742536548/src/search/Indexer.php#L121-L126
202,883
jenskooij/cloudcontrol
src/search/Indexer.php
Indexer.startLogging
private function startLogging() { $this->loggingStart = round(microtime(true) * 1000); $this->lastLog = $this->loggingStart; }
php
private function startLogging() { $this->loggingStart = round(microtime(true) * 1000); $this->lastLog = $this->loggingStart; }
[ "private", "function", "startLogging", "(", ")", "{", "$", "this", "->", "loggingStart", "=", "round", "(", "microtime", "(", "true", ")", "*", "1000", ")", ";", "$", "this", "->", "lastLog", "=", "$", "this", "->", "loggingStart", ";", "}" ]
Stores the time the indexing started in memory
[ "Stores", "the", "time", "the", "indexing", "started", "in", "memory" ]
76e5d9ac8f9c50d06d39a995d13cc03742536548
https://github.com/jenskooij/cloudcontrol/blob/76e5d9ac8f9c50d06d39a995d13cc03742536548/src/search/Indexer.php#L151-L155
202,884
jenskooij/cloudcontrol
src/search/Indexer.php
Indexer.addLog
private function addLog($string) { $currentTime = round(microtime(true) * 1000); $this->log .= date('d-m-Y H:i:s - ') . str_pad($string, 50, " ", STR_PAD_RIGHT) . "\t" . ($currentTime - $this->lastLog) . 'ms since last log. ' . "\t" . ($currentTime - $this->loggingStart) . 'ms since ...
php
private function addLog($string) { $currentTime = round(microtime(true) * 1000); $this->log .= date('d-m-Y H:i:s - ') . str_pad($string, 50, " ", STR_PAD_RIGHT) . "\t" . ($currentTime - $this->lastLog) . 'ms since last log. ' . "\t" . ($currentTime - $this->loggingStart) . 'ms since ...
[ "private", "function", "addLog", "(", "$", "string", ")", "{", "$", "currentTime", "=", "round", "(", "microtime", "(", "true", ")", "*", "1000", ")", ";", "$", "this", "->", "log", ".=", "date", "(", "'d-m-Y H:i:s - '", ")", ".", "str_pad", "(", "$"...
Adds a logline with the time since last log @param $string
[ "Adds", "a", "logline", "with", "the", "time", "since", "last", "log" ]
76e5d9ac8f9c50d06d39a995d13cc03742536548
https://github.com/jenskooij/cloudcontrol/blob/76e5d9ac8f9c50d06d39a995d13cc03742536548/src/search/Indexer.php#L161-L167
202,885
jenskooij/cloudcontrol
src/search/Indexer.php
Indexer.getSearchDbHandle
protected function getSearchDbHandle() { if ($this->searchDbHandle === null) { $path = $this->storageDir . DIRECTORY_SEPARATOR; $this->searchDbHandle = new \PDO('sqlite:' . $path . self::SEARCH_TEMP_DB); } return $this->searchDbHandle; }
php
protected function getSearchDbHandle() { if ($this->searchDbHandle === null) { $path = $this->storageDir . DIRECTORY_SEPARATOR; $this->searchDbHandle = new \PDO('sqlite:' . $path . self::SEARCH_TEMP_DB); } return $this->searchDbHandle; }
[ "protected", "function", "getSearchDbHandle", "(", ")", "{", "if", "(", "$", "this", "->", "searchDbHandle", "===", "null", ")", "{", "$", "path", "=", "$", "this", "->", "storageDir", ".", "DIRECTORY_SEPARATOR", ";", "$", "this", "->", "searchDbHandle", "...
Creates the SQLite \PDO object if it doesnt exist and returns it. @return \PDO
[ "Creates", "the", "SQLite", "\\", "PDO", "object", "if", "it", "doesnt", "exist", "and", "returns", "it", "." ]
76e5d9ac8f9c50d06d39a995d13cc03742536548
https://github.com/jenskooij/cloudcontrol/blob/76e5d9ac8f9c50d06d39a995d13cc03742536548/src/search/Indexer.php#L174-L181
202,886
jenskooij/cloudcontrol
src/search/Indexer.php
Indexer.replaceOldIndex
public function replaceOldIndex() { $this->searchDbHandle = null; $path = $this->storageDir . DIRECTORY_SEPARATOR; rename($path . self::SEARCH_TEMP_DB, $path . 'search.db'); }
php
public function replaceOldIndex() { $this->searchDbHandle = null; $path = $this->storageDir . DIRECTORY_SEPARATOR; rename($path . self::SEARCH_TEMP_DB, $path . 'search.db'); }
[ "public", "function", "replaceOldIndex", "(", ")", "{", "$", "this", "->", "searchDbHandle", "=", "null", ";", "$", "path", "=", "$", "this", "->", "storageDir", ".", "DIRECTORY_SEPARATOR", ";", "rename", "(", "$", "path", ".", "self", "::", "SEARCH_TEMP_D...
Replaces the old search index database with the new one.
[ "Replaces", "the", "old", "search", "index", "database", "with", "the", "new", "one", "." ]
76e5d9ac8f9c50d06d39a995d13cc03742536548
https://github.com/jenskooij/cloudcontrol/blob/76e5d9ac8f9c50d06d39a995d13cc03742536548/src/search/Indexer.php#L186-L191
202,887
lanfisis/deflection
src/Deflection/Element/Functions.php
Functions.isPublic
public function isPublic($status = null) { $this->is_public = $status !== null ? $status : $this->is_public; return $this->is_public ; }
php
public function isPublic($status = null) { $this->is_public = $status !== null ? $status : $this->is_public; return $this->is_public ; }
[ "public", "function", "isPublic", "(", "$", "status", "=", "null", ")", "{", "$", "this", "->", "is_public", "=", "$", "status", "!==", "null", "?", "$", "status", ":", "$", "this", "->", "is_public", ";", "return", "$", "this", "->", "is_public", ";...
Is an public class @return \Deflection\Element\Functions
[ "Is", "an", "public", "class" ]
31deaf7f085d6456d8a323e7ac3cc9914fbe49a9
https://github.com/lanfisis/deflection/blob/31deaf7f085d6456d8a323e7ac3cc9914fbe49a9/src/Deflection/Element/Functions.php#L42-L46
202,888
lanfisis/deflection
src/Deflection/Element/Functions.php
Functions.isStatic
public function isStatic($status = null) { $this->is_static = $status !== null ? $status : $this->is_static; return $this->is_static ; }
php
public function isStatic($status = null) { $this->is_static = $status !== null ? $status : $this->is_static; return $this->is_static ; }
[ "public", "function", "isStatic", "(", "$", "status", "=", "null", ")", "{", "$", "this", "->", "is_static", "=", "$", "status", "!==", "null", "?", "$", "status", ":", "$", "this", "->", "is_static", ";", "return", "$", "this", "->", "is_static", ";...
Is an static class @return \Deflection\Element\Functions
[ "Is", "an", "static", "class" ]
31deaf7f085d6456d8a323e7ac3cc9914fbe49a9
https://github.com/lanfisis/deflection/blob/31deaf7f085d6456d8a323e7ac3cc9914fbe49a9/src/Deflection/Element/Functions.php#L53-L57
202,889
Nicklas766/Comment
src/Comment/ProfileController.php
ProfileController.renderProfile
public function renderProfile() { $this->checkIsLogin(); $name = $this->di->get('session')->get("user"); $user = $this->getUserDetails($name); $views = [ ["comment/user/profile/profile", ["user" => $user], "main"] ]; if ($user->authority == "admin") { ...
php
public function renderProfile() { $this->checkIsLogin(); $name = $this->di->get('session')->get("user"); $user = $this->getUserDetails($name); $views = [ ["comment/user/profile/profile", ["user" => $user], "main"] ]; if ($user->authority == "admin") { ...
[ "public", "function", "renderProfile", "(", ")", "{", "$", "this", "->", "checkIsLogin", "(", ")", ";", "$", "name", "=", "$", "this", "->", "di", "->", "get", "(", "'session'", ")", "->", "get", "(", "\"user\"", ")", ";", "$", "user", "=", "$", ...
Render profile page @return void
[ "Render", "profile", "page" ]
1483eaf1ebb120b8bd6c2a1552c084b3a288ff25
https://github.com/Nicklas766/Comment/blob/1483eaf1ebb120b8bd6c2a1552c084b3a288ff25/src/Comment/ProfileController.php#L33-L56
202,890
ErikTrapman/CQRankingParserBundle
Parser/CQParser.php
CQParser.getName
public function getName(Crawler $crawler) { $headers = $crawler->filter('table.borderNoOpac th.raceheader b'); $values = $headers->extract(array('_text', 'b')); $name = @$values[0][0]; if ($name === false) { return 'Naam kon niet worden opgehaald. Vul zelf in.'; ...
php
public function getName(Crawler $crawler) { $headers = $crawler->filter('table.borderNoOpac th.raceheader b'); $values = $headers->extract(array('_text', 'b')); $name = @$values[0][0]; if ($name === false) { return 'Naam kon niet worden opgehaald. Vul zelf in.'; ...
[ "public", "function", "getName", "(", "Crawler", "$", "crawler", ")", "{", "$", "headers", "=", "$", "crawler", "->", "filter", "(", "'table.borderNoOpac th.raceheader b'", ")", ";", "$", "values", "=", "$", "headers", "->", "extract", "(", "array", "(", "...
Naam van de uitslag.
[ "Naam", "van", "de", "uitslag", "." ]
59a6e989c7d0b157f7dce042ec58267aaf3ac6ee
https://github.com/ErikTrapman/CQRankingParserBundle/blob/59a6e989c7d0b157f7dce042ec58267aaf3ac6ee/Parser/CQParser.php#L34-L43
202,891
Talis90/HtmlMediaFinder
library/HtmlMediaFinder/HtmlMediaFinder.php
HtmlMediaFinder.getDownloadUrl
static function getDownloadUrl($videoUrl) { $toplevelDomain = parse_url($videoUrl); $toplevelDomain = $toplevelDomain['host']; if (!is_dir(__DIR__ . DIRECTORY_SEPARATOR . 'ProviderHandler' . DIRECTORY_SEPARATOR . $toplevelDomain)) { throw new \Exception('There is no special implementation for the provider '...
php
static function getDownloadUrl($videoUrl) { $toplevelDomain = parse_url($videoUrl); $toplevelDomain = $toplevelDomain['host']; if (!is_dir(__DIR__ . DIRECTORY_SEPARATOR . 'ProviderHandler' . DIRECTORY_SEPARATOR . $toplevelDomain)) { throw new \Exception('There is no special implementation for the provider '...
[ "static", "function", "getDownloadUrl", "(", "$", "videoUrl", ")", "{", "$", "toplevelDomain", "=", "parse_url", "(", "$", "videoUrl", ")", ";", "$", "toplevelDomain", "=", "$", "toplevelDomain", "[", "'host'", "]", ";", "if", "(", "!", "is_dir", "(", "_...
Get the download url of a video url @param string $videoUrl @return string
[ "Get", "the", "download", "url", "of", "a", "video", "url" ]
fd19212a88d5d3f78d20aeea1accf7be427643b0
https://github.com/Talis90/HtmlMediaFinder/blob/fd19212a88d5d3f78d20aeea1accf7be427643b0/library/HtmlMediaFinder/HtmlMediaFinder.php#L17-L28
202,892
Aviogram/Common
src/Hydrator/ByConfig.php
ByConfig.hydrate
public static function hydrate(array $data, ByConfigBuilder $config) { // When entity is not available. Only use the collection to set the data if ($config->getEntity() === false) { return $config->getCollectionEntity($data); } // When there is no collection speci...
php
public static function hydrate(array $data, ByConfigBuilder $config) { // When entity is not available. Only use the collection to set the data if ($config->getEntity() === false) { return $config->getCollectionEntity($data); } // When there is no collection speci...
[ "public", "static", "function", "hydrate", "(", "array", "$", "data", ",", "ByConfigBuilder", "$", "config", ")", "{", "// When entity is not available. Only use the collection to set the data\r", "if", "(", "$", "config", "->", "getEntity", "(", ")", "===", "false", ...
Hydrate array data to an object based on the configuration given @param array $data @param ByConfigBuilder $config @return object | \ArrayIterator on a collection
[ "Hydrate", "array", "data", "to", "an", "object", "based", "on", "the", "configuration", "given" ]
bcff2e409cccd4791a3f9bca0b2cdd70c25ddec5
https://github.com/Aviogram/Common/blob/bcff2e409cccd4791a3f9bca0b2cdd70c25ddec5/src/Hydrator/ByConfig.php#L23-L71
202,893
romm/configuration_object
Classes/Legacy/Validation/ValidatorResolver.php
ValidatorResolver.createValidator
public function createValidator($validatorType, array $validatorOptions = []) { try { /** * @todo remove throwing Exceptions in resolveValidatorObjectName */ $validatorObjectName = $this->resolveValidatorObjectName($validatorType); $validator = ...
php
public function createValidator($validatorType, array $validatorOptions = []) { try { /** * @todo remove throwing Exceptions in resolveValidatorObjectName */ $validatorObjectName = $this->resolveValidatorObjectName($validatorType); $validator = ...
[ "public", "function", "createValidator", "(", "$", "validatorType", ",", "array", "$", "validatorOptions", "=", "[", "]", ")", "{", "try", "{", "/**\n * @todo remove throwing Exceptions in resolveValidatorObjectName\n */", "$", "validatorObjectName", "...
Get a validator for a given data type. Returns a validator implementing the \TYPO3\CMS\Extbase\Validation\Validator\ValidatorInterface or NULL if no validator could be resolved. @param string $validatorType Either one of the built-in data types or fully qualified validator class name @param array $validatorOptions Opt...
[ "Get", "a", "validator", "for", "a", "given", "data", "type", ".", "Returns", "a", "validator", "implementing", "the", "\\", "TYPO3", "\\", "CMS", "\\", "Extbase", "\\", "Validation", "\\", "Validator", "\\", "ValidatorInterface", "or", "NULL", "if", "no", ...
d3a40903386c2e0766bd8279337fe6da45cf5ce3
https://github.com/romm/configuration_object/blob/d3a40903386c2e0766bd8279337fe6da45cf5ce3/Classes/Legacy/Validation/ValidatorResolver.php#L103-L121
202,894
romm/configuration_object
Classes/Legacy/Validation/ValidatorResolver.php
ValidatorResolver.resolveValidatorObjectName
protected function resolveValidatorObjectName($validatorName) { if (strpos($validatorName, ':') !== false || strpbrk($validatorName, '_\\') === false) { // Found shorthand validator, either extbase or foreign extension // NotEmpty or Acme.MyPck.Ext:MyValidator list($exten...
php
protected function resolveValidatorObjectName($validatorName) { if (strpos($validatorName, ':') !== false || strpbrk($validatorName, '_\\') === false) { // Found shorthand validator, either extbase or foreign extension // NotEmpty or Acme.MyPck.Ext:MyValidator list($exten...
[ "protected", "function", "resolveValidatorObjectName", "(", "$", "validatorName", ")", "{", "if", "(", "strpos", "(", "$", "validatorName", ",", "':'", ")", "!==", "false", "||", "strpbrk", "(", "$", "validatorName", ",", "'_\\\\'", ")", "===", "false", ")",...
Returns an object of an appropriate validator for the given class. If no validator is available FALSE is returned @param string $validatorName Either the fully qualified class name of the validator or the short name of a built-in validator @throws Exception\NoSuchValidatorException @return string Name of the validato...
[ "Returns", "an", "object", "of", "an", "appropriate", "validator", "for", "the", "given", "class", ".", "If", "no", "validator", "is", "available", "FALSE", "is", "returned" ]
d3a40903386c2e0766bd8279337fe6da45cf5ce3
https://github.com/romm/configuration_object/blob/d3a40903386c2e0766bd8279337fe6da45cf5ce3/Classes/Legacy/Validation/ValidatorResolver.php#L437-L483
202,895
duncan3dc/serial
src/Json.php
Json.decode
public static function decode($string) { if (!$string) { return new ArrayObject(); } $array = json_decode($string, true); static::checkLastError(); if (!is_array($array)) { $array = []; } return ArrayObject::make($array); }
php
public static function decode($string) { if (!$string) { return new ArrayObject(); } $array = json_decode($string, true); static::checkLastError(); if (!is_array($array)) { $array = []; } return ArrayObject::make($array); }
[ "public", "static", "function", "decode", "(", "$", "string", ")", "{", "if", "(", "!", "$", "string", ")", "{", "return", "new", "ArrayObject", "(", ")", ";", "}", "$", "array", "=", "json_decode", "(", "$", "string", ",", "true", ")", ";", "stati...
Convert a JSON string to an array. {@inheritDoc}
[ "Convert", "a", "JSON", "string", "to", "an", "array", "." ]
2e40127a0a364ee1bd6f655b0f5b5d4a035a5716
https://github.com/duncan3dc/serial/blob/2e40127a0a364ee1bd6f655b0f5b5d4a035a5716/src/Json.php#L36-L51
202,896
ZendExperts/phpids
docs/examples/cakephp/ids.php
IdsComponent.detect
public function detect(&$controller) { $this->controller = &$controller; $this->name = Inflector::singularize($this->controller->name); #set include path for IDS and store old one $path = get_include_path(); set_include_path( VENDORS . 'phpids/'); #require the needed ...
php
public function detect(&$controller) { $this->controller = &$controller; $this->name = Inflector::singularize($this->controller->name); #set include path for IDS and store old one $path = get_include_path(); set_include_path( VENDORS . 'phpids/'); #require the needed ...
[ "public", "function", "detect", "(", "&", "$", "controller", ")", "{", "$", "this", "->", "controller", "=", "&", "$", "controller", ";", "$", "this", "->", "name", "=", "Inflector", "::", "singularize", "(", "$", "this", "->", "controller", "->", "nam...
This function includes the IDS vendor parts and runs the detection routines on the request array. @param object cake controller object @return boolean
[ "This", "function", "includes", "the", "IDS", "vendor", "parts", "and", "runs", "the", "detection", "routines", "on", "the", "request", "array", "." ]
f30df04eea47b94d056e2ae9ec8fea1c626f1c03
https://github.com/ZendExperts/phpids/blob/f30df04eea47b94d056e2ae9ec8fea1c626f1c03/docs/examples/cakephp/ids.php#L105-L136
202,897
ZendExperts/phpids
docs/examples/cakephp/ids.php
IdsComponent.react
private function react(IDS_Report $result) { $new = $this->controller ->Session ->read('IDS.Impact') + $result->getImpact(); $this->controller->Session->write('IDS.Impact', $new); $impact = $this->controller->Session->read('IDS.Impact'); if ($impact >=...
php
private function react(IDS_Report $result) { $new = $this->controller ->Session ->read('IDS.Impact') + $result->getImpact(); $this->controller->Session->write('IDS.Impact', $new); $impact = $this->controller->Session->read('IDS.Impact'); if ($impact >=...
[ "private", "function", "react", "(", "IDS_Report", "$", "result", ")", "{", "$", "new", "=", "$", "this", "->", "controller", "->", "Session", "->", "read", "(", "'IDS.Impact'", ")", "+", "$", "result", "->", "getImpact", "(", ")", ";", "$", "this", ...
This function rects on the values in the incoming results array. Depending on the impact value certain actions are performed. @param IDS_Report $result @return boolean
[ "This", "function", "rects", "on", "the", "values", "in", "the", "incoming", "results", "array", "." ]
f30df04eea47b94d056e2ae9ec8fea1c626f1c03
https://github.com/ZendExperts/phpids/blob/f30df04eea47b94d056e2ae9ec8fea1c626f1c03/docs/examples/cakephp/ids.php#L148-L178
202,898
CismonX/CaptchaQueue
src/Captcha.php
Captcha.register
static function register(string $name, CaptchaInterface $captcha) { if (isset(self::$_captchaList[$name])) Console::warning("Overwriting captcha generator \"$name\"."); self::$_captchaList[$name] = $captcha; self::enable($name); }
php
static function register(string $name, CaptchaInterface $captcha) { if (isset(self::$_captchaList[$name])) Console::warning("Overwriting captcha generator \"$name\"."); self::$_captchaList[$name] = $captcha; self::enable($name); }
[ "static", "function", "register", "(", "string", "$", "name", ",", "CaptchaInterface", "$", "captcha", ")", "{", "if", "(", "isset", "(", "self", "::", "$", "_captchaList", "[", "$", "name", "]", ")", ")", "Console", "::", "warning", "(", "\"Overwriting ...
Register a new captcha generator. @param string $name @param CaptchaInterface $captcha
[ "Register", "a", "new", "captcha", "generator", "." ]
bcf0fbeb4d52de471a99e9f744c4ad7ca2e59975
https://github.com/CismonX/CaptchaQueue/blob/bcf0fbeb4d52de471a99e9f744c4ad7ca2e59975/src/Captcha.php#L39-L44
202,899
CismonX/CaptchaQueue
src/Captcha.php
Captcha.enable
static function enable(string $name) { if (!isset(self::$_captchaList[$name])) { Console::warning("Captcha generator \"$name\" do not exist."); return; } self::$_enableList = self::$_enableList + [$name]; }
php
static function enable(string $name) { if (!isset(self::$_captchaList[$name])) { Console::warning("Captcha generator \"$name\" do not exist."); return; } self::$_enableList = self::$_enableList + [$name]; }
[ "static", "function", "enable", "(", "string", "$", "name", ")", "{", "if", "(", "!", "isset", "(", "self", "::", "$", "_captchaList", "[", "$", "name", "]", ")", ")", "{", "Console", "::", "warning", "(", "\"Captcha generator \\\"$name\\\" do not exist.\"",...
Mark a captcha generator as enabled. @param string $name
[ "Mark", "a", "captcha", "generator", "as", "enabled", "." ]
bcf0fbeb4d52de471a99e9f744c4ad7ca2e59975
https://github.com/CismonX/CaptchaQueue/blob/bcf0fbeb4d52de471a99e9f744c4ad7ca2e59975/src/Captcha.php#L50-L56