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
197,100
modulusphp/http
Middleware/AuthenticateWithBasicAuth.php
AuthenticateWithBasicAuth.hasBasicAuth
protected function hasBasicAuth($request) : bool { if ($request->headers->has('Authorization') && starts_with($request->header('Authorization'), 'Basic ')) { return true; } return false; }
php
protected function hasBasicAuth($request) : bool { if ($request->headers->has('Authorization') && starts_with($request->header('Authorization'), 'Basic ')) { return true; } return false; }
[ "protected", "function", "hasBasicAuth", "(", "$", "request", ")", ":", "bool", "{", "if", "(", "$", "request", "->", "headers", "->", "has", "(", "'Authorization'", ")", "&&", "starts_with", "(", "$", "request", "->", "header", "(", "'Authorization'", ")"...
Check if request has Basic Authentication header @param \Modulus\Http\Request $request @return bool
[ "Check", "if", "request", "has", "Basic", "Authentication", "header" ]
fc5c0f2b582a04de1685578d3fb790686a0a240c
https://github.com/modulusphp/http/blob/fc5c0f2b582a04de1685578d3fb790686a0a240c/Middleware/AuthenticateWithBasicAuth.php#L94-L101
197,101
chalasr/RCHCapistranoBundle
Util/CanGenerateTrait.php
CanGenerateTrait.generate
public function generate(GeneratorInterface $generator) { $callback = function () use ($generator) { $handler = Handler::create($generator); $handler->generate(); }; return $callback(); }
php
public function generate(GeneratorInterface $generator) { $callback = function () use ($generator) { $handler = Handler::create($generator); $handler->generate(); }; return $callback(); }
[ "public", "function", "generate", "(", "GeneratorInterface", "$", "generator", ")", "{", "$", "callback", "=", "function", "(", ")", "use", "(", "$", "generator", ")", "{", "$", "handler", "=", "Handler", "::", "create", "(", "$", "generator", ")", ";", ...
Generates a document from given configuration using given generator. @param GeneratorInterface $generator Instance of AbstractGeneratord @return callable
[ "Generates", "a", "document", "from", "given", "configuration", "using", "given", "generator", "." ]
c4a4cbaa2bc05f33bf431fd3afe6cac39947640e
https://github.com/chalasr/RCHCapistranoBundle/blob/c4a4cbaa2bc05f33bf431fd3afe6cac39947640e/Util/CanGenerateTrait.php#L32-L40
197,102
chalasr/RCHCapistranoBundle
Util/CanGenerateTrait.php
CanGenerateTrait.parseYamlStaging
public function parseYamlStaging($yamlFile) { $container = !(property_exists(get_called_class(), 'container')) ? $this->getContainer() : $this->container; $capitalizer = $container->get('rch_capistrano.capitalizer'); $params = Yaml::parse(file_get_contents($yamlFile)); return $capit...
php
public function parseYamlStaging($yamlFile) { $container = !(property_exists(get_called_class(), 'container')) ? $this->getContainer() : $this->container; $capitalizer = $container->get('rch_capistrano.capitalizer'); $params = Yaml::parse(file_get_contents($yamlFile)); return $capit...
[ "public", "function", "parseYamlStaging", "(", "$", "yamlFile", ")", "{", "$", "container", "=", "!", "(", "property_exists", "(", "get_called_class", "(", ")", ",", "'container'", ")", ")", "?", "$", "this", "->", "getContainer", "(", ")", ":", "$", "th...
Read staging parameters from YAML staging file. @param string $yamlFile The YAML staging filename @return array
[ "Read", "staging", "parameters", "from", "YAML", "staging", "file", "." ]
c4a4cbaa2bc05f33bf431fd3afe6cac39947640e
https://github.com/chalasr/RCHCapistranoBundle/blob/c4a4cbaa2bc05f33bf431fd3afe6cac39947640e/Util/CanGenerateTrait.php#L61-L68
197,103
ZendExperts/phpids
lib/IDS/Log/Database.php
IDS_Log_Database.execute
public function execute(IDS_Report $data) { if (!isset($_SERVER['REQUEST_URI'])) { $_SERVER['REQUEST_URI'] = substr($_SERVER['PHP_SELF'], 1); if (isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING']) { $_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING']...
php
public function execute(IDS_Report $data) { if (!isset($_SERVER['REQUEST_URI'])) { $_SERVER['REQUEST_URI'] = substr($_SERVER['PHP_SELF'], 1); if (isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING']) { $_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING']...
[ "public", "function", "execute", "(", "IDS_Report", "$", "data", ")", "{", "if", "(", "!", "isset", "(", "$", "_SERVER", "[", "'REQUEST_URI'", "]", ")", ")", "{", "$", "_SERVER", "[", "'REQUEST_URI'", "]", "=", "substr", "(", "$", "_SERVER", "[", "'P...
Stores given data into the database @param object $data IDS_Report instance @throws Exception if db error occurred @return boolean
[ "Stores", "given", "data", "into", "the", "database" ]
f30df04eea47b94d056e2ae9ec8fea1c626f1c03
https://github.com/ZendExperts/phpids/blob/f30df04eea47b94d056e2ae9ec8fea1c626f1c03/lib/IDS/Log/Database.php#L253-L291
197,104
jacksleight/coast
library/Path.php
Path.isWithin
public function isWithin(\Coast\Path $parent) { $path = $this->_name; $parts = \explode(PATH_SEPARATOR, (string) $parent); foreach ($parts as $part) { if (\preg_match('/^' . \preg_quote($part, '/') . '/', $path)) { return true; } } ...
php
public function isWithin(\Coast\Path $parent) { $path = $this->_name; $parts = \explode(PATH_SEPARATOR, (string) $parent); foreach ($parts as $part) { if (\preg_match('/^' . \preg_quote($part, '/') . '/', $path)) { return true; } } ...
[ "public", "function", "isWithin", "(", "\\", "Coast", "\\", "Path", "$", "parent", ")", "{", "$", "path", "=", "$", "this", "->", "_name", ";", "$", "parts", "=", "\\", "explode", "(", "PATH_SEPARATOR", ",", "(", "string", ")", "$", "parent", ")", ...
Check if path is within another @param Coast\Path $target path to check against. @return bool
[ "Check", "if", "path", "is", "within", "another" ]
cd6cd41e8304adce41f59f799d4183adcaf666f9
https://github.com/jacksleight/coast/blob/cd6cd41e8304adce41f59f799d4183adcaf666f9/library/Path.php#L167-L177
197,105
jacksleight/coast
library/Path.php
Path.toAbsolute
public function toAbsolute(\Coast\Path $base) { if (!$this->isRelative() || !$base->isAbsolute()) { throw new \Exception("Path '{$this}' is not relative or base path '{$base}' is not absolute"); } $source = explode('/', (string) $base); $target = explode('/', $this->_nam...
php
public function toAbsolute(\Coast\Path $base) { if (!$this->isRelative() || !$base->isAbsolute()) { throw new \Exception("Path '{$this}' is not relative or base path '{$base}' is not absolute"); } $source = explode('/', (string) $base); $target = explode('/', $this->_nam...
[ "public", "function", "toAbsolute", "(", "\\", "Coast", "\\", "Path", "$", "base", ")", "{", "if", "(", "!", "$", "this", "->", "isRelative", "(", ")", "||", "!", "$", "base", "->", "isAbsolute", "(", ")", ")", "{", "throw", "new", "\\", "Exception...
Get absolute path from relative path. @param Coast\Path $base base absolute path. @return Coast\Path
[ "Get", "absolute", "path", "from", "relative", "path", "." ]
cd6cd41e8304adce41f59f799d4183adcaf666f9
https://github.com/jacksleight/coast/blob/cd6cd41e8304adce41f59f799d4183adcaf666f9/library/Path.php#L184-L206
197,106
jacksleight/coast
library/Path.php
Path.toRelative
public function toRelative(\Coast\Path $base) { if (!$this->isAbsolute() || !$base->isAbsolute()) { throw new \Exception("Source path '{$this}' is not absolute or base path '{$base}' is not absolute"); } $source = explode('/', (string) $base); $target = explode('...
php
public function toRelative(\Coast\Path $base) { if (!$this->isAbsolute() || !$base->isAbsolute()) { throw new \Exception("Source path '{$this}' is not absolute or base path '{$base}' is not absolute"); } $source = explode('/', (string) $base); $target = explode('...
[ "public", "function", "toRelative", "(", "\\", "Coast", "\\", "Path", "$", "base", ")", "{", "if", "(", "!", "$", "this", "->", "isAbsolute", "(", ")", "||", "!", "$", "base", "->", "isAbsolute", "(", ")", ")", "{", "throw", "new", "\\", "Exception...
Get relative path from absolute path. @param Coast\Path $base Base absolute path. @return Coast\Path
[ "Get", "relative", "path", "from", "absolute", "path", "." ]
cd6cd41e8304adce41f59f799d4183adcaf666f9
https://github.com/jacksleight/coast/blob/cd6cd41e8304adce41f59f799d4183adcaf666f9/library/Path.php#L213-L235
197,107
jacksleight/coast
library/Path.php
Path.toReal
public function toReal() { if (!$this->isAbsolute()) { throw new \Exception("Path '{$this}' is not absolute"); } $target = explode('/', $this->_name); $name = []; foreach ($target as $part) { if ($part == '..') { array_pop($na...
php
public function toReal() { if (!$this->isAbsolute()) { throw new \Exception("Path '{$this}' is not absolute"); } $target = explode('/', $this->_name); $name = []; foreach ($target as $part) { if ($part == '..') { array_pop($na...
[ "public", "function", "toReal", "(", ")", "{", "if", "(", "!", "$", "this", "->", "isAbsolute", "(", ")", ")", "{", "throw", "new", "\\", "Exception", "(", "\"Path '{$this}' is not absolute\"", ")", ";", "}", "$", "target", "=", "explode", "(", "'/'", ...
Reduce absolute path with relative parts to real path. @return Coast\Path
[ "Reduce", "absolute", "path", "with", "relative", "parts", "to", "real", "path", "." ]
cd6cd41e8304adce41f59f799d4183adcaf666f9
https://github.com/jacksleight/coast/blob/cd6cd41e8304adce41f59f799d4183adcaf666f9/library/Path.php#L241-L261
197,108
hiqdev/minii-widgets
src/BaseListView.php
BaseListView.init
public function init() { if ($this->dataProvider === null) { throw new InvalidConfigException('The "dataProvider" property must be set.'); } if ($this->emptyText === null) { $this->emptyText = Yii::t('yii', 'No results found.'); } if (!isset($this->opt...
php
public function init() { if ($this->dataProvider === null) { throw new InvalidConfigException('The "dataProvider" property must be set.'); } if ($this->emptyText === null) { $this->emptyText = Yii::t('yii', 'No results found.'); } if (!isset($this->opt...
[ "public", "function", "init", "(", ")", "{", "if", "(", "$", "this", "->", "dataProvider", "===", "null", ")", "{", "throw", "new", "InvalidConfigException", "(", "'The \"dataProvider\" property must be set.'", ")", ";", "}", "if", "(", "$", "this", "->", "e...
Initializes the view.
[ "Initializes", "the", "view", "." ]
b8bc54a3645e9e45c228e3ec81b11ff4775385c3
https://github.com/hiqdev/minii-widgets/blob/b8bc54a3645e9e45c228e3ec81b11ff4775385c3/src/BaseListView.php#L106-L117
197,109
PenoaksDev/Milky-Framework
src/Milky/Database/Connectors/SqlServerConnector.php
SqlServerConnector.buildConnectString
protected function buildConnectString($driver, array $arguments) { $options = array_map(function ($key) use ($arguments) { return sprintf('%s=%s', $key, $arguments[$key]); }, array_keys($arguments)); return $driver.':'.implode(';', $options); }
php
protected function buildConnectString($driver, array $arguments) { $options = array_map(function ($key) use ($arguments) { return sprintf('%s=%s', $key, $arguments[$key]); }, array_keys($arguments)); return $driver.':'.implode(';', $options); }
[ "protected", "function", "buildConnectString", "(", "$", "driver", ",", "array", "$", "arguments", ")", "{", "$", "options", "=", "array_map", "(", "function", "(", "$", "key", ")", "use", "(", "$", "arguments", ")", "{", "return", "sprintf", "(", "'%s=%...
Build a connection string from the given arguments. @param string $driver @param array $arguments @return string
[ "Build", "a", "connection", "string", "from", "the", "given", "arguments", "." ]
8afd7156610a70371aa5b1df50b8a212bf7b142c
https://github.com/PenoaksDev/Milky-Framework/blob/8afd7156610a70371aa5b1df50b8a212bf7b142c/src/Milky/Database/Connectors/SqlServerConnector.php#L138-L145
197,110
Becklyn/Gluggi
src/Model/ElementTypesModel.php
ElementTypesModel.getAllElements
public function getAllElements ($elementType) { $iterator = new \DirectoryIterator($this->getUserSubDirectory("{$elementType}s")); $allElements = []; /** @var \SplFileInfo $file */ foreach ($iterator as $file) { if ($file->isDir() || ("twig" !== $file->getExtensi...
php
public function getAllElements ($elementType) { $iterator = new \DirectoryIterator($this->getUserSubDirectory("{$elementType}s")); $allElements = []; /** @var \SplFileInfo $file */ foreach ($iterator as $file) { if ($file->isDir() || ("twig" !== $file->getExtensi...
[ "public", "function", "getAllElements", "(", "$", "elementType", ")", "{", "$", "iterator", "=", "new", "\\", "DirectoryIterator", "(", "$", "this", "->", "getUserSubDirectory", "(", "\"{$elementType}s\"", ")", ")", ";", "$", "allElements", "=", "[", "]", ";...
Returns a list of all elements @param string $elementType @return Element[]
[ "Returns", "a", "list", "of", "all", "elements" ]
837e7ee8d34f5b16a7f1ef53ca64b1ea8722b786
https://github.com/Becklyn/Gluggi/blob/837e7ee8d34f5b16a7f1ef53ca64b1ea8722b786/src/Model/ElementTypesModel.php#L66-L85
197,111
Becklyn/Gluggi
src/Model/ElementTypesModel.php
ElementTypesModel.getListedElements
public function getListedElements ($elementType) { $allElements = $this->getAllElements($elementType); usort($allElements, function (Element $element1, Element $element2) { return strnatcasecmp($element1->getKey(), $element2->getKey()); } )...
php
public function getListedElements ($elementType) { $allElements = $this->getAllElements($elementType); usort($allElements, function (Element $element1, Element $element2) { return strnatcasecmp($element1->getKey(), $element2->getKey()); } )...
[ "public", "function", "getListedElements", "(", "$", "elementType", ")", "{", "$", "allElements", "=", "$", "this", "->", "getAllElements", "(", "$", "elementType", ")", ";", "usort", "(", "$", "allElements", ",", "function", "(", "Element", "$", "element1",...
Returns the listed elements @param string $elementType @return Element[]
[ "Returns", "the", "listed", "elements" ]
837e7ee8d34f5b16a7f1ef53ca64b1ea8722b786
https://github.com/Becklyn/Gluggi/blob/837e7ee8d34f5b16a7f1ef53ca64b1ea8722b786/src/Model/ElementTypesModel.php#L96-L113
197,112
Becklyn/Gluggi
src/Model/ElementTypesModel.php
ElementTypesModel.getElement
public function getElement ($key, $elementType) { $elements = $this->getAllElements($elementType); return array_key_exists($key, $elements) ? $elements[$key] : null; }
php
public function getElement ($key, $elementType) { $elements = $this->getAllElements($elementType); return array_key_exists($key, $elements) ? $elements[$key] : null; }
[ "public", "function", "getElement", "(", "$", "key", ",", "$", "elementType", ")", "{", "$", "elements", "=", "$", "this", "->", "getAllElements", "(", "$", "elementType", ")", ";", "return", "array_key_exists", "(", "$", "key", ",", "$", "elements", ")"...
Returns the preview by key @param string $key @param string $elementType @return Element|null
[ "Returns", "the", "preview", "by", "key" ]
837e7ee8d34f5b16a7f1ef53ca64b1ea8722b786
https://github.com/Becklyn/Gluggi/blob/837e7ee8d34f5b16a7f1ef53ca64b1ea8722b786/src/Model/ElementTypesModel.php#L125-L132
197,113
Becklyn/Gluggi
src/Model/ElementTypesModel.php
ElementTypesModel.isFullPageElementType
public function isFullPageElementType ($key) { return array_key_exists($key, $this->elementTypes) ? $this->elementTypes[$key]["isFullPage"] : null; }
php
public function isFullPageElementType ($key) { return array_key_exists($key, $this->elementTypes) ? $this->elementTypes[$key]["isFullPage"] : null; }
[ "public", "function", "isFullPageElementType", "(", "$", "key", ")", "{", "return", "array_key_exists", "(", "$", "key", ",", "$", "this", "->", "elementTypes", ")", "?", "$", "this", "->", "elementTypes", "[", "$", "key", "]", "[", "\"isFullPage\"", "]", ...
Returns whether the given element type is full page @param string $key @return bool
[ "Returns", "whether", "the", "given", "element", "type", "is", "full", "page" ]
837e7ee8d34f5b16a7f1ef53ca64b1ea8722b786
https://github.com/Becklyn/Gluggi/blob/837e7ee8d34f5b16a7f1ef53ca64b1ea8722b786/src/Model/ElementTypesModel.php#L169-L174
197,114
Kris-Kuiper/sFire-Framework
src/Routing/Router.php
Router.__callstatic
public static function __callstatic($method, $arguments) { $route = new Route(); if(false === is_callable([$route, $method])) { return trigger_error(sprintf('Call to undefined method %s::%s', __CLASS__, $method), E_USER_ERROR); } $route = call_user_func_array([$route, $method], $argume...
php
public static function __callstatic($method, $arguments) { $route = new Route(); if(false === is_callable([$route, $method])) { return trigger_error(sprintf('Call to undefined method %s::%s', __CLASS__, $method), E_USER_ERROR); } $route = call_user_func_array([$route, $method], $argume...
[ "public", "static", "function", "__callstatic", "(", "$", "method", ",", "$", "arguments", ")", "{", "$", "route", "=", "new", "Route", "(", ")", ";", "if", "(", "false", "===", "is_callable", "(", "[", "$", "route", ",", "$", "method", "]", ")", "...
Creates a new route and calls the dynamic given method if exists @param string $method @param array $arguments @return sFire\Routing\Extend\Route
[ "Creates", "a", "new", "route", "and", "calls", "the", "dynamic", "given", "method", "if", "exists" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Routing/Router.php#L128-L139
197,115
Kris-Kuiper/sFire-Framework
src/Routing/Router.php
Router.setUrl
public static function setUrl($url) { if(false === is_string($url) && false === $url instanceof URLParser) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string or instance of sFire\\Utils\\URLParser, "%s" given', __METHOD__, gettype($url)), E_USER_ERROR); } if(true === i...
php
public static function setUrl($url) { if(false === is_string($url) && false === $url instanceof URLParser) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string or instance of sFire\\Utils\\URLParser, "%s" given', __METHOD__, gettype($url)), E_USER_ERROR); } if(true === i...
[ "public", "static", "function", "setUrl", "(", "$", "url", ")", "{", "if", "(", "false", "===", "is_string", "(", "$", "url", ")", "&&", "false", "===", "$", "url", "instanceof", "URLParser", ")", "{", "return", "trigger_error", "(", "sprintf", "(", "'...
Set the current URL @param string|sFire\Utils\URLParser $url @return sFire\Utils\URLParser
[ "Set", "the", "current", "URL" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Routing/Router.php#L156-L168
197,116
Kris-Kuiper/sFire-Framework
src/Routing/Router.php
Router.routeExists
public static function routeExists($identifier, $domain = null) { if(false === is_string($identifier)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($identifier)), E_USER_ERROR); } if(null !== $domain && false === is_s...
php
public static function routeExists($identifier, $domain = null) { if(false === is_string($identifier)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($identifier)), E_USER_ERROR); } if(null !== $domain && false === is_s...
[ "public", "static", "function", "routeExists", "(", "$", "identifier", ",", "$", "domain", "=", "null", ")", "{", "if", "(", "false", "===", "is_string", "(", "$", "identifier", ")", ")", "{", "return", "trigger_error", "(", "sprintf", "(", "'Argument 1 pa...
Check if a Route exists by identifier with optional domain @param string $identifier @param string|null $domain @return boolean
[ "Check", "if", "a", "Route", "exists", "by", "identifier", "with", "optional", "domain" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Routing/Router.php#L311-L332
197,117
Kris-Kuiper/sFire-Framework
src/Routing/Router.php
Router.domainExists
public static function domainExists($domain) { if(false === is_string($domain)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($domain)), E_USER_ERROR); } $routes = static :: getRoutes(); foreach($routes as $route) { $do...
php
public static function domainExists($domain) { if(false === is_string($domain)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($domain)), E_USER_ERROR); } $routes = static :: getRoutes(); foreach($routes as $route) { $do...
[ "public", "static", "function", "domainExists", "(", "$", "domain", ")", "{", "if", "(", "false", "===", "is_string", "(", "$", "domain", ")", ")", "{", "return", "trigger_error", "(", "sprintf", "(", "'Argument 1 passed to %s() must be of the type string, \"%s\" gi...
Checks if a given domain exists @param string $domain @return boolean
[ "Checks", "if", "a", "given", "domain", "exists" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Routing/Router.php#L340-L364
197,118
Kris-Kuiper/sFire-Framework
src/Routing/Router.php
Router.getRoute
public static function getRoute($identifier = null) { if(null !== $identifier && false === is_string($identifier)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($identifier)), E_USER_ERROR); } if(null !== $identifier) { if(f...
php
public static function getRoute($identifier = null) { if(null !== $identifier && false === is_string($identifier)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($identifier)), E_USER_ERROR); } if(null !== $identifier) { if(f...
[ "public", "static", "function", "getRoute", "(", "$", "identifier", "=", "null", ")", "{", "if", "(", "null", "!==", "$", "identifier", "&&", "false", "===", "is_string", "(", "$", "identifier", ")", ")", "{", "return", "trigger_error", "(", "sprintf", "...
Gets the current route or a route based on identifier @param null|string $identifier @return sFire\Routing\Extend\Method
[ "Gets", "the", "current", "route", "or", "a", "route", "based", "on", "identifier" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Routing/Router.php#L392-L408
197,119
Kris-Kuiper/sFire-Framework
src/Routing/Router.php
Router.addGroup
public static function addGroup($group) { if(false === is_array($group)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type array, "%s" given', __METHOD__, gettype($group)), E_USER_ERROR); } static :: $group[] = $group; }
php
public static function addGroup($group) { if(false === is_array($group)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type array, "%s" given', __METHOD__, gettype($group)), E_USER_ERROR); } static :: $group[] = $group; }
[ "public", "static", "function", "addGroup", "(", "$", "group", ")", "{", "if", "(", "false", "===", "is_array", "(", "$", "group", ")", ")", "{", "return", "trigger_error", "(", "sprintf", "(", "'Argument 1 passed to %s() must be of the type array, \"%s\" given'", ...
Add a new group element to the stack @param array $group
[ "Add", "a", "new", "group", "element", "to", "the", "stack" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Routing/Router.php#L415-L422
197,120
Kris-Kuiper/sFire-Framework
src/Routing/Router.php
Router.getGroup
public static function getGroup() { $attr = []; foreach(static :: $group as $group) { $attr = static :: arrayRecursiveMerge($attr, $group); } return $attr; }
php
public static function getGroup() { $attr = []; foreach(static :: $group as $group) { $attr = static :: arrayRecursiveMerge($attr, $group); } return $attr; }
[ "public", "static", "function", "getGroup", "(", ")", "{", "$", "attr", "=", "[", "]", ";", "foreach", "(", "static", "::", "$", "group", "as", "$", "group", ")", "{", "$", "attr", "=", "static", "::", "arrayRecursiveMerge", "(", "$", "attr", ",", ...
Return all the groups as one merged array @return array
[ "Return", "all", "the", "groups", "as", "one", "merged", "array" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Routing/Router.php#L438-L447
197,121
Kris-Kuiper/sFire-Framework
src/Routing/Router.php
Router.getErrorRoute
public static function getErrorRoute($type, $index = 0) { if(false === ('-' . intval($type) == '-' . $type)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type integer, "%s" given', __METHOD__, gettype($type)), E_USER_ERROR); } if(false === ('-' . intval($index) == '-' . $ind...
php
public static function getErrorRoute($type, $index = 0) { if(false === ('-' . intval($type) == '-' . $type)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type integer, "%s" given', __METHOD__, gettype($type)), E_USER_ERROR); } if(false === ('-' . intval($index) == '-' . $ind...
[ "public", "static", "function", "getErrorRoute", "(", "$", "type", ",", "$", "index", "=", "0", ")", "{", "if", "(", "false", "===", "(", "'-'", ".", "intval", "(", "$", "type", ")", "==", "'-'", ".", "$", "type", ")", ")", "{", "return", "trigge...
Retrieve a route from the error route stack. Default the first on the stack, or route with optional index @param string|integer $type @param integer $index @return null|sFire\Routing\Extend\Route
[ "Retrieve", "a", "route", "from", "the", "error", "route", "stack", ".", "Default", "the", "first", "on", "the", "stack", "or", "route", "with", "optional", "index" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Routing/Router.php#L456-L471
197,122
Kris-Kuiper/sFire-Framework
src/Routing/Router.php
Router.addErrorRoute
public static function addErrorRoute($type, Route $route, $default = false) { if(false === ('-' . intval($type) == '-' . $type)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type integer, "%s" given', __METHOD__, gettype($type)), E_USER_ERROR); } static :: $error['types'][$t...
php
public static function addErrorRoute($type, Route $route, $default = false) { if(false === ('-' . intval($type) == '-' . $type)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type integer, "%s" given', __METHOD__, gettype($type)), E_USER_ERROR); } static :: $error['types'][$t...
[ "public", "static", "function", "addErrorRoute", "(", "$", "type", ",", "Route", "$", "route", ",", "$", "default", "=", "false", ")", "{", "if", "(", "false", "===", "(", "'-'", ".", "intval", "(", "$", "type", ")", "==", "'-'", ".", "$", "type", ...
Adds a new error route to the error routes stack @param integer $type @param sFire\Routing\Extend\Route $route @param boolean $default
[ "Adds", "a", "new", "error", "route", "to", "the", "error", "routes", "stack" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Routing/Router.php#L480-L491
197,123
Kris-Kuiper/sFire-Framework
src/Routing/Router.php
Router.setRedirect
public static function setRedirect($bool) { if(null !== $bool && false === is_bool($bool)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type boolean, "%s" given', __METHOD__, gettype($bool)), E_USER_ERROR); } static :: $isRedirect = $bool; }
php
public static function setRedirect($bool) { if(null !== $bool && false === is_bool($bool)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type boolean, "%s" given', __METHOD__, gettype($bool)), E_USER_ERROR); } static :: $isRedirect = $bool; }
[ "public", "static", "function", "setRedirect", "(", "$", "bool", ")", "{", "if", "(", "null", "!==", "$", "bool", "&&", "false", "===", "is_bool", "(", "$", "bool", ")", ")", "{", "return", "trigger_error", "(", "sprintf", "(", "'Argument 1 passed to %s() ...
Set the redirect @param boolean $redirect
[ "Set", "the", "redirect" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Routing/Router.php#L530-L537
197,124
Kris-Kuiper/sFire-Framework
src/Routing/Router.php
Router.arrayRecursiveMerge
private static function arrayRecursiveMerge($array1, $array2) { if(false === is_array($array1) || false === is_array($array2)) { return $array2; } foreach($array2 as $key => $value) { $array1[$key] = static :: arrayRecursiveMerge(@$array1[$key], $value); } return $array1; }
php
private static function arrayRecursiveMerge($array1, $array2) { if(false === is_array($array1) || false === is_array($array2)) { return $array2; } foreach($array2 as $key => $value) { $array1[$key] = static :: arrayRecursiveMerge(@$array1[$key], $value); } return $array1; }
[ "private", "static", "function", "arrayRecursiveMerge", "(", "$", "array1", ",", "$", "array2", ")", "{", "if", "(", "false", "===", "is_array", "(", "$", "array1", ")", "||", "false", "===", "is_array", "(", "$", "array2", ")", ")", "{", "return", "$"...
Recursive merge arrays @param array $array1 @param array $array2 @return array
[ "Recursive", "merge", "arrays" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Routing/Router.php#L555-L566
197,125
Kris-Kuiper/sFire-Framework
src/Routing/Router.php
Router.request
private static function request() { if($uri = Request :: getUri()) { $url = ''; $host = null; if(!($scheme = Request :: getScheme())) { $scheme = 'php'; $host = '127.0.0.1'; Request :: setScheme($scheme); } $url .= $scheme . '://'; if($hostname = Request :: g...
php
private static function request() { if($uri = Request :: getUri()) { $url = ''; $host = null; if(!($scheme = Request :: getScheme())) { $scheme = 'php'; $host = '127.0.0.1'; Request :: setScheme($scheme); } $url .= $scheme . '://'; if($hostname = Request :: g...
[ "private", "static", "function", "request", "(", ")", "{", "if", "(", "$", "uri", "=", "Request", "::", "getUri", "(", ")", ")", "{", "$", "url", "=", "''", ";", "$", "host", "=", "null", ";", "if", "(", "!", "(", "$", "scheme", "=", "Request",...
Try to add the request uri
[ "Try", "to", "add", "the", "request", "uri" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Routing/Router.php#L572-L599
197,126
Kris-Kuiper/sFire-Framework
src/Routing/Router.php
Router.format
private static function format() { $routes = static :: getRoutes(); foreach($routes as $identifier => $route) { $url = preg_quote($route -> getUrl(), '/'); //Prepend prefix for url if($prefix = $route -> getPrefix()) { $url = $prefix['url'] . $url; } if(preg_match_all('#(\\\/)*...
php
private static function format() { $routes = static :: getRoutes(); foreach($routes as $identifier => $route) { $url = preg_quote($route -> getUrl(), '/'); //Prepend prefix for url if($prefix = $route -> getPrefix()) { $url = $prefix['url'] . $url; } if(preg_match_all('#(\\\/)*...
[ "private", "static", "function", "format", "(", ")", "{", "$", "routes", "=", "static", "::", "getRoutes", "(", ")", ";", "foreach", "(", "$", "routes", "as", "$", "identifier", "=>", "$", "route", ")", "{", "$", "url", "=", "preg_quote", "(", "$", ...
Formats all the routes urls to a regex pattern that sFire understands to match the current url to the route url
[ "Formats", "all", "the", "routes", "urls", "to", "a", "regex", "pattern", "that", "sFire", "understands", "to", "match", "the", "current", "url", "to", "the", "route", "url" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Routing/Router.php#L605-L670
197,127
os-pek/ospek
src/OspekBackend.php
OspekBackend.getOutput
public function getOutput(String $file=null):Array { $file = ($file)?$file:$this->_logFile; if (file_exists($file)) { return file($file); } throw new \RunTimeException("file not found!"); }
php
public function getOutput(String $file=null):Array { $file = ($file)?$file:$this->_logFile; if (file_exists($file)) { return file($file); } throw new \RunTimeException("file not found!"); }
[ "public", "function", "getOutput", "(", "String", "$", "file", "=", "null", ")", ":", "Array", "{", "$", "file", "=", "(", "$", "file", ")", "?", "$", "file", ":", "$", "this", "->", "_logFile", ";", "if", "(", "file_exists", "(", "$", "file", ")...
end kill method
[ "end", "kill", "method" ]
1b2994e7103886f75c0d04d9d7d704ee40f5b7cd
https://github.com/os-pek/ospek/blob/1b2994e7103886f75c0d04d9d7d704ee40f5b7cd/src/OspekBackend.php#L82-L89
197,128
ColonelBlimp/NsanjaCore
src/Nsanja/Core/Traits/PropertySetterTrait.php
PropertySetterTrait.setProperty
protected function setProperty(string $key, array $data, &$property, $default = null): void { if (isset($data[$key])) { $property = $data[$key]; return; } // Only set the property to the default IF it is NOT null. Otherwise leave the value of the property as set ...
php
protected function setProperty(string $key, array $data, &$property, $default = null): void { if (isset($data[$key])) { $property = $data[$key]; return; } // Only set the property to the default IF it is NOT null. Otherwise leave the value of the property as set ...
[ "protected", "function", "setProperty", "(", "string", "$", "key", ",", "array", "$", "data", ",", "&", "$", "property", ",", "$", "default", "=", "null", ")", ":", "void", "{", "if", "(", "isset", "(", "$", "data", "[", "$", "key", "]", ")", ")"...
Checks the given key is set in the data array, if so, the given property is set with the value. @param string $key @param array $data @param mixed $property Must be a property of the class. @param mixed $default. The default value (if this parameter is set) and the key is not found in the data array.
[ "Checks", "the", "given", "key", "is", "set", "in", "the", "data", "array", "if", "so", "the", "given", "property", "is", "set", "with", "the", "value", "." ]
935b7363ae21b340eaa5867560a29f965ec7d012
https://github.com/ColonelBlimp/NsanjaCore/blob/935b7363ae21b340eaa5867560a29f965ec7d012/src/Nsanja/Core/Traits/PropertySetterTrait.php#L19-L31
197,129
balintsera/evista-perform
src/Form/Form.php
Form.addCSRFTokenField
private function addCSRFTokenField() { $this->nonceValue = $this->createNonce(); $nonce = new FormField(FormField::TYPE_HIDDEN); $nonce ->setName('nonce') ->setValue($this->createNonce()) ->setValidationCallback( function ($value) { ...
php
private function addCSRFTokenField() { $this->nonceValue = $this->createNonce(); $nonce = new FormField(FormField::TYPE_HIDDEN); $nonce ->setName('nonce') ->setValue($this->createNonce()) ->setValidationCallback( function ($value) { ...
[ "private", "function", "addCSRFTokenField", "(", ")", "{", "$", "this", "->", "nonceValue", "=", "$", "this", "->", "createNonce", "(", ")", ";", "$", "nonce", "=", "new", "FormField", "(", "FormField", "::", "TYPE_HIDDEN", ")", ";", "$", "nonce", "->", ...
Add CSRF token hidden input field
[ "Add", "CSRF", "token", "hidden", "input", "field" ]
2b8723852ebe824ed721f30293e1e0d2c14f4b21
https://github.com/balintsera/evista-perform/blob/2b8723852ebe824ed721f30293e1e0d2c14f4b21/src/Form/Form.php#L117-L146
197,130
balintsera/evista-perform
src/Form/Form.php
Form.populateFields
public function populateFields() { if (count($this->submittedData) < 1) { return; } array_map( function (FormField &$field) { if (isset($this->submittedData[$field->getName()])) { $raw = $this->submittedData[$field->getName()]; ...
php
public function populateFields() { if (count($this->submittedData) < 1) { return; } array_map( function (FormField &$field) { if (isset($this->submittedData[$field->getName()])) { $raw = $this->submittedData[$field->getName()]; ...
[ "public", "function", "populateFields", "(", ")", "{", "if", "(", "count", "(", "$", "this", "->", "submittedData", ")", "<", "1", ")", "{", "return", ";", "}", "array_map", "(", "function", "(", "FormField", "&", "$", "field", ")", "{", "if", "(", ...
populates form from POST after submission
[ "populates", "form", "from", "POST", "after", "submission" ]
2b8723852ebe824ed721f30293e1e0d2c14f4b21
https://github.com/balintsera/evista-perform/blob/2b8723852ebe824ed721f30293e1e0d2c14f4b21/src/Form/Form.php#L173-L194
197,131
balintsera/evista-perform
src/Form/Form.php
Form.addFields
public function addFields(array $fields) { array_walk( $fields, function ($field, $key) { $this->addField($key, $field); } ); }
php
public function addFields(array $fields) { array_walk( $fields, function ($field, $key) { $this->addField($key, $field); } ); }
[ "public", "function", "addFields", "(", "array", "$", "fields", ")", "{", "array_walk", "(", "$", "fields", ",", "function", "(", "$", "field", ",", "$", "key", ")", "{", "$", "this", "->", "addField", "(", "$", "key", ",", "$", "field", ")", ";", ...
Add fields to the form @param array $fields
[ "Add", "fields", "to", "the", "form" ]
2b8723852ebe824ed721f30293e1e0d2c14f4b21
https://github.com/balintsera/evista-perform/blob/2b8723852ebe824ed721f30293e1e0d2c14f4b21/src/Form/Form.php#L351-L359
197,132
TiMESPLiNTER/tsFramework
src/ch/timesplinter/auth/AuthHandlerDB.php
AuthHandlerDB.generateSalt
public static function generateSalt($length = 32) { $salt = ''; for($i = 0; $i < $length; ++$i) $salt .= chr(rand(0,127)); return $salt; }
php
public static function generateSalt($length = 32) { $salt = ''; for($i = 0; $i < $length; ++$i) $salt .= chr(rand(0,127)); return $salt; }
[ "public", "static", "function", "generateSalt", "(", "$", "length", "=", "32", ")", "{", "$", "salt", "=", "''", ";", "for", "(", "$", "i", "=", "0", ";", "$", "i", "<", "$", "length", ";", "++", "$", "i", ")", "$", "salt", ".=", "chr", "(", ...
Generates a random string which can be used to salt the password @param int $length @return string
[ "Generates", "a", "random", "string", "which", "can", "be", "used", "to", "salt", "the", "password" ]
b3b9fd98f6d456a9e571015877ecca203786fd0c
https://github.com/TiMESPLiNTER/tsFramework/blob/b3b9fd98f6d456a9e571015877ecca203786fd0c/src/ch/timesplinter/auth/AuthHandlerDB.php#L231-L239
197,133
AlexHowansky/ork-core
src/ConfigurableTrait.php
ConfigurableTrait.filterConfig
protected function filterConfig(string $name, $value = null) { $class = 'filterConfig' . ucfirst($name); if (method_exists($this, $class) === true) { $value = call_user_func([$this, $class], $value); } return $value; }
php
protected function filterConfig(string $name, $value = null) { $class = 'filterConfig' . ucfirst($name); if (method_exists($this, $class) === true) { $value = call_user_func([$this, $class], $value); } return $value; }
[ "protected", "function", "filterConfig", "(", "string", "$", "name", ",", "$", "value", "=", "null", ")", "{", "$", "class", "=", "'filterConfig'", ".", "ucfirst", "(", "$", "name", ")", ";", "if", "(", "method_exists", "(", "$", "this", ",", "$", "c...
Filter a configuration attribute value as it's being set. @param string $name The name of the configuration to filter. @param mixed $value The value to filter. @return mixed The filtered value.
[ "Filter", "a", "configuration", "attribute", "value", "as", "it", "s", "being", "set", "." ]
b9c7ff50028cb63f67cb42c693fca84b8dc82796
https://github.com/AlexHowansky/ork-core/blob/b9c7ff50028cb63f67cb42c693fca84b8dc82796/src/ConfigurableTrait.php#L60-L67
197,134
AlexHowansky/ork-core
src/ConfigurableTrait.php
ConfigurableTrait.loadConfig
public function loadConfig(string $file): self { if (file_exists($file) === false) { throw new \RuntimeException('No such config file.'); } $data = json_decode(file_get_contents($file), true); if ($data === null) { throw new \RuntimeException('Invalid config f...
php
public function loadConfig(string $file): self { if (file_exists($file) === false) { throw new \RuntimeException('No such config file.'); } $data = json_decode(file_get_contents($file), true); if ($data === null) { throw new \RuntimeException('Invalid config f...
[ "public", "function", "loadConfig", "(", "string", "$", "file", ")", ":", "self", "{", "if", "(", "file_exists", "(", "$", "file", ")", "===", "false", ")", "{", "throw", "new", "\\", "RuntimeException", "(", "'No such config file.'", ")", ";", "}", "$",...
Set configuration from a JSON file. @param string $file The file containing the configuration attributes. @return self Allow method chaining. @throws \RuntimeException On error.
[ "Set", "configuration", "from", "a", "JSON", "file", "." ]
b9c7ff50028cb63f67cb42c693fca84b8dc82796
https://github.com/AlexHowansky/ork-core/blob/b9c7ff50028cb63f67cb42c693fca84b8dc82796/src/ConfigurableTrait.php#L100-L110
197,135
offworks/laraquent
src/Schema.php
Schema.table
public function table($table, \Closure $callback) { try { parent::create($table, $callback); } catch(\Exception $e) { try { parent::table($table, $callback); } catch(\Exception $e) { echo $e->getMessage(); } } }
php
public function table($table, \Closure $callback) { try { parent::create($table, $callback); } catch(\Exception $e) { try { parent::table($table, $callback); } catch(\Exception $e) { echo $e->getMessage(); } } }
[ "public", "function", "table", "(", "$", "table", ",", "\\", "Closure", "$", "callback", ")", "{", "try", "{", "parent", "::", "create", "(", "$", "table", ",", "$", "callback", ")", ";", "}", "catch", "(", "\\", "Exception", "$", "e", ")", "{", ...
Create table if not exist. @param string table @param \Closure $callback
[ "Create", "table", "if", "not", "exist", "." ]
74cbc6258acfda8f7213c701887a7b223aff954f
https://github.com/offworks/laraquent/blob/74cbc6258acfda8f7213c701887a7b223aff954f/src/Schema.php#L19-L36
197,136
koolkode/view-express
src/Helper/AbstractViewHelper.php
AbstractViewHelper.isDynamic
protected function isDynamic(array $attributeNames) { foreach($attributeNames as $name) { if(isset($this->__attr[$name])) { return true; } } return false; }
php
protected function isDynamic(array $attributeNames) { foreach($attributeNames as $name) { if(isset($this->__attr[$name])) { return true; } } return false; }
[ "protected", "function", "isDynamic", "(", "array", "$", "attributeNames", ")", "{", "foreach", "(", "$", "attributeNames", "as", "$", "name", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "__attr", "[", "$", "name", "]", ")", ")", "{", "retu...
Check if any of the given attribute names refers to a dynamic attribute. @param array<string> $attributeNames @return boolean
[ "Check", "if", "any", "of", "the", "given", "attribute", "names", "refers", "to", "a", "dynamic", "attribute", "." ]
a8ebe6f373b6bfe8b8818d6264535e8fe063a596
https://github.com/koolkode/view-express/blob/a8ebe6f373b6bfe8b8818d6264535e8fe063a596/src/Helper/AbstractViewHelper.php#L185-L196
197,137
koolkode/view-express
src/Helper/AbstractViewHelper.php
AbstractViewHelper.createIterator
protected function createIterator($subject) { if($subject === NULL) { return new \ArrayIterator([]); } if(is_array($subject)) { return new \ArrayIterator($subject); } if($subject instanceof \Generator) { return $subject; } if($subject instanceof \Iterator) { $subject->rewind(...
php
protected function createIterator($subject) { if($subject === NULL) { return new \ArrayIterator([]); } if(is_array($subject)) { return new \ArrayIterator($subject); } if($subject instanceof \Generator) { return $subject; } if($subject instanceof \Iterator) { $subject->rewind(...
[ "protected", "function", "createIterator", "(", "$", "subject", ")", "{", "if", "(", "$", "subject", "===", "NULL", ")", "{", "return", "new", "\\", "ArrayIterator", "(", "[", "]", ")", ";", "}", "if", "(", "is_array", "(", "$", "subject", ")", ")", ...
Create an iterator from the given input, will create an ArrayIterator backed by an empty array when the input is NULL. This method will rewind any Iterator given as input (with the exception of a Generator which cannot be reset to it's initial position). @param mixed $subject @return \Iterator @throws \InvalidArgume...
[ "Create", "an", "iterator", "from", "the", "given", "input", "will", "create", "an", "ArrayIterator", "backed", "by", "an", "empty", "array", "when", "the", "input", "is", "NULL", "." ]
a8ebe6f373b6bfe8b8818d6264535e8fe063a596
https://github.com/koolkode/view-express/blob/a8ebe6f373b6bfe8b8818d6264535e8fe063a596/src/Helper/AbstractViewHelper.php#L255-L295
197,138
Facebook-Anonymous-Publisher/graph-api
src/GraphApi.php
GraphApi.status
public function status($message, $link = null) { $this->response = $this->fb->post('/me/feed', [ 'message' => $message, 'link' => $link, ]); return $this; }
php
public function status($message, $link = null) { $this->response = $this->fb->post('/me/feed', [ 'message' => $message, 'link' => $link, ]); return $this; }
[ "public", "function", "status", "(", "$", "message", ",", "$", "link", "=", "null", ")", "{", "$", "this", "->", "response", "=", "$", "this", "->", "fb", "->", "post", "(", "'/me/feed'", ",", "[", "'message'", "=>", "$", "message", ",", "'link'", ...
Create a status. @param string $message @param null|string $link @return $this
[ "Create", "a", "status", "." ]
a42b8b832ca5b9a9b0c7e056c0fc10433ca1babd
https://github.com/Facebook-Anonymous-Publisher/graph-api/blob/a42b8b832ca5b9a9b0c7e056c0fc10433ca1babd/src/GraphApi.php#L41-L49
197,139
Facebook-Anonymous-Publisher/graph-api
src/GraphApi.php
GraphApi.photo
public function photo($source, $caption = null) { $this->response = $this->fb->post('/me/photos', [ 'source' => new FacebookFile($source), 'caption' => $caption, ]); return $this; }
php
public function photo($source, $caption = null) { $this->response = $this->fb->post('/me/photos', [ 'source' => new FacebookFile($source), 'caption' => $caption, ]); return $this; }
[ "public", "function", "photo", "(", "$", "source", ",", "$", "caption", "=", "null", ")", "{", "$", "this", "->", "response", "=", "$", "this", "->", "fb", "->", "post", "(", "'/me/photos'", ",", "[", "'source'", "=>", "new", "FacebookFile", "(", "$"...
Create a photo. @param string $source @param null|string $caption @return $this
[ "Create", "a", "photo", "." ]
a42b8b832ca5b9a9b0c7e056c0fc10433ca1babd
https://github.com/Facebook-Anonymous-Publisher/graph-api/blob/a42b8b832ca5b9a9b0c7e056c0fc10433ca1babd/src/GraphApi.php#L59-L67
197,140
Facebook-Anonymous-Publisher/graph-api
src/GraphApi.php
GraphApi.photos
public function photos(array $sources, $caption = null) { $images = $this->unpublishedPhotos($sources); $this->response = $this->fb->post('/me/feed', array_merge([ 'message' => $caption, ], $images)); return $this; }
php
public function photos(array $sources, $caption = null) { $images = $this->unpublishedPhotos($sources); $this->response = $this->fb->post('/me/feed', array_merge([ 'message' => $caption, ], $images)); return $this; }
[ "public", "function", "photos", "(", "array", "$", "sources", ",", "$", "caption", "=", "null", ")", "{", "$", "images", "=", "$", "this", "->", "unpublishedPhotos", "(", "$", "sources", ")", ";", "$", "this", "->", "response", "=", "$", "this", "->"...
Create multiple photos. @param array $sources @param null|string $caption @return $this
[ "Create", "multiple", "photos", "." ]
a42b8b832ca5b9a9b0c7e056c0fc10433ca1babd
https://github.com/Facebook-Anonymous-Publisher/graph-api/blob/a42b8b832ca5b9a9b0c7e056c0fc10433ca1babd/src/GraphApi.php#L77-L86
197,141
Facebook-Anonymous-Publisher/graph-api
src/GraphApi.php
GraphApi.unpublishedPhotos
protected function unpublishedPhotos(array $sources) { $images = []; foreach ($sources as $index => $source) { $response = $this->fb ->post('/me/photos', [ 'source' => new FacebookFile($source), 'published' => false, ...
php
protected function unpublishedPhotos(array $sources) { $images = []; foreach ($sources as $index => $source) { $response = $this->fb ->post('/me/photos', [ 'source' => new FacebookFile($source), 'published' => false, ...
[ "protected", "function", "unpublishedPhotos", "(", "array", "$", "sources", ")", "{", "$", "images", "=", "[", "]", ";", "foreach", "(", "$", "sources", "as", "$", "index", "=>", "$", "source", ")", "{", "$", "response", "=", "$", "this", "->", "fb",...
Create unpublished photos. @param array $sources @return array
[ "Create", "unpublished", "photos", "." ]
a42b8b832ca5b9a9b0c7e056c0fc10433ca1babd
https://github.com/Facebook-Anonymous-Publisher/graph-api/blob/a42b8b832ca5b9a9b0c7e056c0fc10433ca1babd/src/GraphApi.php#L95-L111
197,142
Facebook-Anonymous-Publisher/graph-api
src/GraphApi.php
GraphApi.getId
public function getId() { if (is_null($this->response)) { return false; } return $this->explodeId($this->response->getDecodedBody()); }
php
public function getId() { if (is_null($this->response)) { return false; } return $this->explodeId($this->response->getDecodedBody()); }
[ "public", "function", "getId", "(", ")", "{", "if", "(", "is_null", "(", "$", "this", "->", "response", ")", ")", "{", "return", "false", ";", "}", "return", "$", "this", "->", "explodeId", "(", "$", "this", "->", "response", "->", "getDecodedBody", ...
Get facebook response id. @return array|bool
[ "Get", "facebook", "response", "id", "." ]
a42b8b832ca5b9a9b0c7e056c0fc10433ca1babd
https://github.com/Facebook-Anonymous-Publisher/graph-api/blob/a42b8b832ca5b9a9b0c7e056c0fc10433ca1babd/src/GraphApi.php#L118-L125
197,143
Facebook-Anonymous-Publisher/graph-api
src/GraphApi.php
GraphApi.explodeId
protected function explodeId(array $body) { if (isset($body['post_id'])) { $key = 'post_id'; } elseif (isset($body['id'])) { $key = 'id'; } else { return false; } return array_combine(['id', 'fbid'], explode('_', $body[$key])); }
php
protected function explodeId(array $body) { if (isset($body['post_id'])) { $key = 'post_id'; } elseif (isset($body['id'])) { $key = 'id'; } else { return false; } return array_combine(['id', 'fbid'], explode('_', $body[$key])); }
[ "protected", "function", "explodeId", "(", "array", "$", "body", ")", "{", "if", "(", "isset", "(", "$", "body", "[", "'post_id'", "]", ")", ")", "{", "$", "key", "=", "'post_id'", ";", "}", "elseif", "(", "isset", "(", "$", "body", "[", "'id'", ...
Explode facebook response id field. @param array $body @return array|bool
[ "Explode", "facebook", "response", "id", "field", "." ]
a42b8b832ca5b9a9b0c7e056c0fc10433ca1babd
https://github.com/Facebook-Anonymous-Publisher/graph-api/blob/a42b8b832ca5b9a9b0c7e056c0fc10433ca1babd/src/GraphApi.php#L134-L145
197,144
ezra-obiwale/dSCore
src/View/View.php
View.file
final public function file($_) { $args = func_get_args(); if (count($args) > 3) { for ($i = 3; $i < count($args); $i++) { unset($args[$i]); } } switch (count($args)) { case 1: $this->viewFile[2] = Util::camelToHyphen($...
php
final public function file($_) { $args = func_get_args(); if (count($args) > 3) { for ($i = 3; $i < count($args); $i++) { unset($args[$i]); } } switch (count($args)) { case 1: $this->viewFile[2] = Util::camelToHyphen($...
[ "final", "public", "function", "file", "(", "$", "_", ")", "{", "$", "args", "=", "func_get_args", "(", ")", ";", "if", "(", "count", "(", "$", "args", ")", ">", "3", ")", "{", "for", "(", "$", "i", "=", "3", ";", "$", "i", "<", "count", "(...
Determines which action's view to use instead of current's @param string $_ You may pass 1 to 3 parameters as [module],[controller],action @return View
[ "Determines", "which", "action", "s", "view", "to", "use", "instead", "of", "current", "s" ]
dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d
https://github.com/ezra-obiwale/dSCore/blob/dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d/src/View/View.php#L192-L217
197,145
ezra-obiwale/dSCore
src/View/View.php
View.getViewFile
final public function getViewFile($addOthers = true) { if ($addOthers) { if (!isset($this->viewFile[0])) $this->viewFile[0] = ucfirst(Util::hyphenToCamel(engineGet('module'))); if (!isset($this->viewFile[1])) $this->viewFile[1] = Util::camelToHyphen(engine...
php
final public function getViewFile($addOthers = true) { if ($addOthers) { if (!isset($this->viewFile[0])) $this->viewFile[0] = ucfirst(Util::hyphenToCamel(engineGet('module'))); if (!isset($this->viewFile[1])) $this->viewFile[1] = Util::camelToHyphen(engine...
[ "final", "public", "function", "getViewFile", "(", "$", "addOthers", "=", "true", ")", "{", "if", "(", "$", "addOthers", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "viewFile", "[", "0", "]", ")", ")", "$", "this", "->", "viewFile", ...
Fetches the view file array @param boolean $addOthers Indicates whether to add missing parameters i.e. module, controller, or action @return array
[ "Fetches", "the", "view", "file", "array" ]
dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d
https://github.com/ezra-obiwale/dSCore/blob/dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d/src/View/View.php#L225-L237
197,146
ezra-obiwale/dSCore
src/View/View.php
View.url
final public function url($module, $controller = null, $action = null, array $params = array(), $hash = null) { $module = ucfirst(Util::hyphenToCamel($module)); $moduleOptions = engineGet('config', 'modules', $module, false); $module = (isset($moduleOptions['alias'])) ? $moduleOptions['alias'] :...
php
final public function url($module, $controller = null, $action = null, array $params = array(), $hash = null) { $module = ucfirst(Util::hyphenToCamel($module)); $moduleOptions = engineGet('config', 'modules', $module, false); $module = (isset($moduleOptions['alias'])) ? $moduleOptions['alias'] :...
[ "final", "public", "function", "url", "(", "$", "module", ",", "$", "controller", "=", "null", ",", "$", "action", "=", "null", ",", "array", "$", "params", "=", "array", "(", ")", ",", "$", "hash", "=", "null", ")", "{", "$", "module", "=", "ucf...
Fetches the relative path to a resource @param string $module @param string $controller @param string $action @param array $params @param string $hash @return string
[ "Fetches", "the", "relative", "path", "to", "a", "resource" ]
dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d
https://github.com/ezra-obiwale/dSCore/blob/dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d/src/View/View.php#L248-L264
197,147
ezra-obiwale/dSCore
src/View/View.php
View.getOutput
final public function getOutput($module, $controller, $action, array $params = array(), $partial = true) { $view = new View(); $controllerClass = ucfirst(\Util::hyphenToCamel($module)) . '\Controllers\\' . ucfirst(\Util::hyphenToCamel($controller)) . 'Controller'; $controllerClass = new $control...
php
final public function getOutput($module, $controller, $action, array $params = array(), $partial = true) { $view = new View(); $controllerClass = ucfirst(\Util::hyphenToCamel($module)) . '\Controllers\\' . ucfirst(\Util::hyphenToCamel($controller)) . 'Controller'; $controllerClass = new $control...
[ "final", "public", "function", "getOutput", "(", "$", "module", ",", "$", "controller", ",", "$", "action", ",", "array", "$", "params", "=", "array", "(", ")", ",", "$", "partial", "=", "true", ")", "{", "$", "view", "=", "new", "View", "(", ")", ...
Fetches the output of an action @param string $module @param string $controller @param string $action @param array $params @param boolean $partial Indicates whether to return partial or full view @return string
[ "Fetches", "the", "output", "of", "an", "action" ]
dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d
https://github.com/ezra-obiwale/dSCore/blob/dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d/src/View/View.php#L300-L335
197,148
FlorianWolters/PHP-Component-Core-Enum
src/php/FlorianWolters/Component/Core/Enum/EnumUtils.php
EnumUtils.getNameForOrdinal
public static function getNameForOrdinal($enumType, $ordinal) { $constants = $enumType::values(); $result = null; foreach ($constants as $constant) { if ($constant->getOrdinal() === $ordinal) { $result = $constant->getName(); break; } ...
php
public static function getNameForOrdinal($enumType, $ordinal) { $constants = $enumType::values(); $result = null; foreach ($constants as $constant) { if ($constant->getOrdinal() === $ordinal) { $result = $constant->getName(); break; } ...
[ "public", "static", "function", "getNameForOrdinal", "(", "$", "enumType", ",", "$", "ordinal", ")", "{", "$", "constants", "=", "$", "enumType", "::", "values", "(", ")", ";", "$", "result", "=", "null", ";", "foreach", "(", "$", "constants", "as", "$...
Returns the name of the enumeration constant of the specified enumeration type with the specified ordinal. @param string $enumType The class name of the enumeration type from which to return the ordinal of the enumeration constant. @param integer $ordinal The ordinal of the enumeration constant to return. @return s...
[ "Returns", "the", "name", "of", "the", "enumeration", "constant", "of", "the", "specified", "enumeration", "type", "with", "the", "specified", "ordinal", "." ]
838dcdc5705c3e1a2c0ff879987590b0a455db38
https://github.com/FlorianWolters/PHP-Component-Core-Enum/blob/838dcdc5705c3e1a2c0ff879987590b0a455db38/src/php/FlorianWolters/Component/Core/Enum/EnumUtils.php#L177-L190
197,149
FlorianWolters/PHP-Component-Core-Enum
src/php/FlorianWolters/Component/Core/Enum/EnumUtils.php
EnumUtils.getOrdinalForName
public static function getOrdinalForName($enumType, $name) { $constants = $enumType::values(); $result = null; foreach ($constants as $constant) { if ($constant->getName() === $name) { $result = $constant->getOrdinal(); break; } ...
php
public static function getOrdinalForName($enumType, $name) { $constants = $enumType::values(); $result = null; foreach ($constants as $constant) { if ($constant->getName() === $name) { $result = $constant->getOrdinal(); break; } ...
[ "public", "static", "function", "getOrdinalForName", "(", "$", "enumType", ",", "$", "name", ")", "{", "$", "constants", "=", "$", "enumType", "::", "values", "(", ")", ";", "$", "result", "=", "null", ";", "foreach", "(", "$", "constants", "as", "$", ...
Returns the ordinal of the enumeration constant of the specified enumeration type with the specified name. @param string $enumType The class name of the enumeration type from which to return the name of the enumeration constant. @param string $name The name of the enumeration constant to return. @return integer|n...
[ "Returns", "the", "ordinal", "of", "the", "enumeration", "constant", "of", "the", "specified", "enumeration", "type", "with", "the", "specified", "name", "." ]
838dcdc5705c3e1a2c0ff879987590b0a455db38
https://github.com/FlorianWolters/PHP-Component-Core-Enum/blob/838dcdc5705c3e1a2c0ff879987590b0a455db38/src/php/FlorianWolters/Component/Core/Enum/EnumUtils.php#L204-L217
197,150
FlorianWolters/PHP-Component-Core-Enum
src/php/FlorianWolters/Component/Core/Enum/EnumUtils.php
EnumUtils.isDefinedName
public static function isDefinedName($enumType, $name) { $names = $enumType::names(); $result = false; foreach ($names as $item) { if ($item === $name) { $result = true; break; } } return $result; }
php
public static function isDefinedName($enumType, $name) { $names = $enumType::names(); $result = false; foreach ($names as $item) { if ($item === $name) { $result = true; break; } } return $result; }
[ "public", "static", "function", "isDefinedName", "(", "$", "enumType", ",", "$", "name", ")", "{", "$", "names", "=", "$", "enumType", "::", "names", "(", ")", ";", "$", "result", "=", "false", ";", "foreach", "(", "$", "names", "as", "$", "item", ...
Checks whether an enumeration constant with the specified name exists in the specified enumeration type. @param string $enumType The class name of the enumeration type to check. @param string $name The name of the enumeration constant to check. @return boolean `true` if the enumeration constant with the specified...
[ "Checks", "whether", "an", "enumeration", "constant", "with", "the", "specified", "name", "exists", "in", "the", "specified", "enumeration", "type", "." ]
838dcdc5705c3e1a2c0ff879987590b0a455db38
https://github.com/FlorianWolters/PHP-Component-Core-Enum/blob/838dcdc5705c3e1a2c0ff879987590b0a455db38/src/php/FlorianWolters/Component/Core/Enum/EnumUtils.php#L230-L243
197,151
FlorianWolters/PHP-Component-Core-Enum
src/php/FlorianWolters/Component/Core/Enum/EnumUtils.php
EnumUtils.isDefinedOrdinal
public static function isDefinedOrdinal($enumType, $ordinal) { $constants = $enumType::values(); $result = false; foreach ($constants as $constant) { if ($constant->getOrdinal() === $ordinal) { $result = true; break; } } ...
php
public static function isDefinedOrdinal($enumType, $ordinal) { $constants = $enumType::values(); $result = false; foreach ($constants as $constant) { if ($constant->getOrdinal() === $ordinal) { $result = true; break; } } ...
[ "public", "static", "function", "isDefinedOrdinal", "(", "$", "enumType", ",", "$", "ordinal", ")", "{", "$", "constants", "=", "$", "enumType", "::", "values", "(", ")", ";", "$", "result", "=", "false", ";", "foreach", "(", "$", "constants", "as", "$...
Checks whether an enumeration constant with the specified ordinal exists in the specified enumeration type. @param string $enumType The class name of the enumeration type to check. @param integer $ordinal The ordinal of the enumeration constant to check. @return boolean `true` if the enumeration constant with the s...
[ "Checks", "whether", "an", "enumeration", "constant", "with", "the", "specified", "ordinal", "exists", "in", "the", "specified", "enumeration", "type", "." ]
838dcdc5705c3e1a2c0ff879987590b0a455db38
https://github.com/FlorianWolters/PHP-Component-Core-Enum/blob/838dcdc5705c3e1a2c0ff879987590b0a455db38/src/php/FlorianWolters/Component/Core/Enum/EnumUtils.php#L257-L270
197,152
imsamurai/CakePHP-AdvancedShell
Console/Command/Task/Scheduled/ScheduleSplitByRange.php
ScheduleSplitByRange.split
public function split(array $arguments = array()) { $splittedArguments = new AppendIterator(); foreach ($this->_options['Period'] as $Date) { $_arguments = $arguments; $_arguments['--range'] = $Date->format(Configure::read('Task.dateFormat')); $splittedArguments->append($this->splitInner($_arguments)); ...
php
public function split(array $arguments = array()) { $splittedArguments = new AppendIterator(); foreach ($this->_options['Period'] as $Date) { $_arguments = $arguments; $_arguments['--range'] = $Date->format(Configure::read('Task.dateFormat')); $splittedArguments->append($this->splitInner($_arguments)); ...
[ "public", "function", "split", "(", "array", "$", "arguments", "=", "array", "(", ")", ")", "{", "$", "splittedArguments", "=", "new", "AppendIterator", "(", ")", ";", "foreach", "(", "$", "this", "->", "_options", "[", "'Period'", "]", "as", "$", "Dat...
Split arguments by date range @param array $arguments
[ "Split", "arguments", "by", "date", "range" ]
087d483742e2a76bee45e35b8d94957b0d20f857
https://github.com/imsamurai/CakePHP-AdvancedShell/blob/087d483742e2a76bee45e35b8d94957b0d20f857/Console/Command/Task/Scheduled/ScheduleSplitByRange.php#L23-L33
197,153
fuelphp-storage/security
src/Manager.php
Manager.csrf
public function csrf() { if ( ! $this->csrf) { $this->csrf = \Dependency::resolve('security.csrf', array($this->config, \Application::getInstance()->getSession())); } return $this->csrf; }
php
public function csrf() { if ( ! $this->csrf) { $this->csrf = \Dependency::resolve('security.csrf', array($this->config, \Application::getInstance()->getSession())); } return $this->csrf; }
[ "public", "function", "csrf", "(", ")", "{", "if", "(", "!", "$", "this", "->", "csrf", ")", "{", "$", "this", "->", "csrf", "=", "\\", "Dependency", "::", "resolve", "(", "'security.csrf'", ",", "array", "(", "$", "this", "->", "config", ",", "\\"...
Returns a Csrf instance @return Csrf
[ "Returns", "a", "Csrf", "instance" ]
2cad42a8432bc9c9de46486623b71e105ff84b1b
https://github.com/fuelphp-storage/security/blob/2cad42a8432bc9c9de46486623b71e105ff84b1b/src/Manager.php#L68-L76
197,154
KDF5000/EasyThink
src/ThinkPHP/Library/Vendor/Smarty/sysplugins/smarty_internal_templatebase.php
Smarty_Internal_TemplateBase.unregisterResource
public function unregisterResource($type) { if (isset($this->smarty->registered_resources[$type])) { unset($this->smarty->registered_resources[$type]); } }
php
public function unregisterResource($type) { if (isset($this->smarty->registered_resources[$type])) { unset($this->smarty->registered_resources[$type]); } }
[ "public", "function", "unregisterResource", "(", "$", "type", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "smarty", "->", "registered_resources", "[", "$", "type", "]", ")", ")", "{", "unset", "(", "$", "this", "->", "smarty", "->", "register...
Unregisters a resource @param string $type name of resource type
[ "Unregisters", "a", "resource" ]
86efc9c8a0d504e01e2fea55868227fdc8928841
https://github.com/KDF5000/EasyThink/blob/86efc9c8a0d504e01e2fea55868227fdc8928841/src/ThinkPHP/Library/Vendor/Smarty/sysplugins/smarty_internal_templatebase.php#L450-L455
197,155
KDF5000/EasyThink
src/ThinkPHP/Library/Vendor/Smarty/sysplugins/smarty_internal_templatebase.php
Smarty_Internal_TemplateBase.unregisterCacheResource
public function unregisterCacheResource($type) { if (isset($this->smarty->registered_cache_resources[$type])) { unset($this->smarty->registered_cache_resources[$type]); } }
php
public function unregisterCacheResource($type) { if (isset($this->smarty->registered_cache_resources[$type])) { unset($this->smarty->registered_cache_resources[$type]); } }
[ "public", "function", "unregisterCacheResource", "(", "$", "type", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "smarty", "->", "registered_cache_resources", "[", "$", "type", "]", ")", ")", "{", "unset", "(", "$", "this", "->", "smarty", "->", ...
Unregisters a cache resource @param string $type name of cache resource type
[ "Unregisters", "a", "cache", "resource" ]
86efc9c8a0d504e01e2fea55868227fdc8928841
https://github.com/KDF5000/EasyThink/blob/86efc9c8a0d504e01e2fea55868227fdc8928841/src/ThinkPHP/Library/Vendor/Smarty/sysplugins/smarty_internal_templatebase.php#L473-L478
197,156
enikeishik/ufoframework
src/Ufo/StorableCache/StorableCache.php
StorableCache.expired
public function expired(string $key): bool { try { return $this->storage->expired($key); } catch (BadPacketException $e) { return true; } }
php
public function expired(string $key): bool { try { return $this->storage->expired($key); } catch (BadPacketException $e) { return true; } }
[ "public", "function", "expired", "(", "string", "$", "key", ")", ":", "bool", "{", "try", "{", "return", "$", "this", "->", "storage", "->", "expired", "(", "$", "key", ")", ";", "}", "catch", "(", "BadPacketException", "$", "e", ")", "{", "return", ...
Determines whether an item is present in the cache and life time expired. @param string $key The unique cache key of the item to check for expiring. @return bool True if the item was expired. False if not.
[ "Determines", "whether", "an", "item", "is", "present", "in", "the", "cache", "and", "life", "time", "expired", "." ]
fb44461bcb0506dbc3257724a2281f756594f62f
https://github.com/enikeishik/ufoframework/blob/fb44461bcb0506dbc3257724a2281f756594f62f/src/Ufo/StorableCache/StorableCache.php#L182-L189
197,157
nhlm/pipechain
src/Collections/PipeChainCollection.php
PipeChainCollection.attach
public function attach(callable $stage, callable $fallback = null) { $this->storage->attach( $this->marshalClosure($stage), [ 'fallback' => is_callable($fallback) ? $this->marshalClosure($fallback) : null ] ); }
php
public function attach(callable $stage, callable $fallback = null) { $this->storage->attach( $this->marshalClosure($stage), [ 'fallback' => is_callable($fallback) ? $this->marshalClosure($fallback) : null ] ); }
[ "public", "function", "attach", "(", "callable", "$", "stage", ",", "callable", "$", "fallback", "=", "null", ")", "{", "$", "this", "->", "storage", "->", "attach", "(", "$", "this", "->", "marshalClosure", "(", "$", "stage", ")", ",", "[", "'fallback...
Attaches a stage and assigns a fallback to the attached stage. @param callable $stage @param callable|null $fallback @return void
[ "Attaches", "a", "stage", "and", "assigns", "a", "fallback", "to", "the", "attached", "stage", "." ]
7f67b54372415a66c42ce074bc359c55fda218a5
https://github.com/nhlm/pipechain/blob/7f67b54372415a66c42ce074bc359c55fda218a5/src/Collections/PipeChainCollection.php#L57-L65
197,158
modulusphp/utility
Reflect.php
Reflect.hasRequest
private function hasRequest($params, $variables, $i = null) : array { foreach($params as $key => $param) { $class = '\\' . $param->getType(); if (class_exists($class) && new $class() instanceof Request) { $i = $key; } } if ($i !== null) $variables = $this->insert($variables, $i,...
php
private function hasRequest($params, $variables, $i = null) : array { foreach($params as $key => $param) { $class = '\\' . $param->getType(); if (class_exists($class) && new $class() instanceof Request) { $i = $key; } } if ($i !== null) $variables = $this->insert($variables, $i,...
[ "private", "function", "hasRequest", "(", "$", "params", ",", "$", "variables", ",", "$", "i", "=", "null", ")", ":", "array", "{", "foreach", "(", "$", "params", "as", "$", "key", "=>", "$", "param", ")", "{", "$", "class", "=", "'\\\\'", ".", "...
Check if the request class exists and insert it if it doesn't @param mixed $params @param mixed $variables @param mixed $i @return array
[ "Check", "if", "the", "request", "class", "exists", "and", "insert", "it", "if", "it", "doesn", "t" ]
c1e127539b13d3ec8381e41c64b881e0701807f5
https://github.com/modulusphp/utility/blob/c1e127539b13d3ec8381e41c64b881e0701807f5/Reflect.php#L128-L139
197,159
spoom-php/core
src/extension/Storage.php
Storage.clean
protected function clean( $meta = null ) { // if( $meta && !( $meta instanceof StorageMeta ) ) { $meta = $this->getMeta( $meta ); } // clear the cache if( !$meta || empty( $meta->token ) ) $this->cache = []; else foreach( $this->cache as $i => $_ ) { if( empty( $i ) || $i == $meta...
php
protected function clean( $meta = null ) { // if( $meta && !( $meta instanceof StorageMeta ) ) { $meta = $this->getMeta( $meta ); } // clear the cache if( !$meta || empty( $meta->token ) ) $this->cache = []; else foreach( $this->cache as $i => $_ ) { if( empty( $i ) || $i == $meta...
[ "protected", "function", "clean", "(", "$", "meta", "=", "null", ")", "{", "//", "if", "(", "$", "meta", "&&", "!", "(", "$", "meta", "instanceof", "StorageMeta", ")", ")", "{", "$", "meta", "=", "$", "this", "->", "getMeta", "(", "$", "meta", ")...
Clean the search cache based on the index @param string|StorageMeta|null $meta
[ "Clean", "the", "search", "cache", "based", "on", "the", "index" ]
ea7184213352fa2fad7636927a019e5798734e04
https://github.com/spoom-php/core/blob/ea7184213352fa2fad7636927a019e5798734e04/src/extension/Storage.php#L321-L336
197,160
cubicmushroom/valueobjects
src/Geography/Coordinate.php
Coordinate.fromNative
public static function fromNative() { $args = \func_get_args(); if (\count($args) < 2 || \count($args) > 3) { throw new \BadMethodCallException('You must provide 2 to 3 arguments: 1) latitude, 2) longitude, 3) valid ellipsoid type (optional)'); } $coordinate = new BaseC...
php
public static function fromNative() { $args = \func_get_args(); if (\count($args) < 2 || \count($args) > 3) { throw new \BadMethodCallException('You must provide 2 to 3 arguments: 1) latitude, 2) longitude, 3) valid ellipsoid type (optional)'); } $coordinate = new BaseC...
[ "public", "static", "function", "fromNative", "(", ")", "{", "$", "args", "=", "\\", "func_get_args", "(", ")", ";", "if", "(", "\\", "count", "(", "$", "args", ")", "<", "2", "||", "\\", "count", "(", "$", "args", ")", ">", "3", ")", "{", "thr...
Returns a new Coordinate object from native PHP arguments @return self @throws \BadMethodCallException
[ "Returns", "a", "new", "Coordinate", "object", "from", "native", "PHP", "arguments" ]
4554239ab75d65eeb9773219aa5b07e9fbfabb92
https://github.com/cubicmushroom/valueobjects/blob/4554239ab75d65eeb9773219aa5b07e9fbfabb92/src/Geography/Coordinate.php#L31-L47
197,161
cubicmushroom/valueobjects
src/Geography/Coordinate.php
Coordinate.sameValueAs
public function sameValueAs(ValueObjectInterface $coordinate) { if (false === Util::classEquals($this, $coordinate)) { return false; } return $this->getLatitude()->sameValueAs($coordinate->getLatitude()) && $this->getLongitude()->sameValueAs($coordinate->getLong...
php
public function sameValueAs(ValueObjectInterface $coordinate) { if (false === Util::classEquals($this, $coordinate)) { return false; } return $this->getLatitude()->sameValueAs($coordinate->getLatitude()) && $this->getLongitude()->sameValueAs($coordinate->getLong...
[ "public", "function", "sameValueAs", "(", "ValueObjectInterface", "$", "coordinate", ")", "{", "if", "(", "false", "===", "Util", "::", "classEquals", "(", "$", "this", ",", "$", "coordinate", ")", ")", "{", "return", "false", ";", "}", "return", "$", "t...
Tells whether tow Coordinate objects are equal @param ValueObjectInterface $coordinate @return bool
[ "Tells", "whether", "tow", "Coordinate", "objects", "are", "equal" ]
4554239ab75d65eeb9773219aa5b07e9fbfabb92
https://github.com/cubicmushroom/valueobjects/blob/4554239ab75d65eeb9773219aa5b07e9fbfabb92/src/Geography/Coordinate.php#L73-L83
197,162
cubicmushroom/valueobjects
src/Geography/Coordinate.php
Coordinate.toDecimalMinutes
public function toDecimalMinutes() { $coordinate = self::getBaseCoordinate($this); $convert = new Convert($coordinate); $dm = $convert->toDecimalMinutes(); return new StringLiteral($dm); }
php
public function toDecimalMinutes() { $coordinate = self::getBaseCoordinate($this); $convert = new Convert($coordinate); $dm = $convert->toDecimalMinutes(); return new StringLiteral($dm); }
[ "public", "function", "toDecimalMinutes", "(", ")", "{", "$", "coordinate", "=", "self", "::", "getBaseCoordinate", "(", "$", "this", ")", ";", "$", "convert", "=", "new", "Convert", "(", "$", "coordinate", ")", ";", "$", "dm", "=", "$", "convert", "->...
Returns a decimal minutes representation of the coordinate @return String
[ "Returns", "a", "decimal", "minutes", "representation", "of", "the", "coordinate" ]
4554239ab75d65eeb9773219aa5b07e9fbfabb92
https://github.com/cubicmushroom/valueobjects/blob/4554239ab75d65eeb9773219aa5b07e9fbfabb92/src/Geography/Coordinate.php#L134-L141
197,163
cubicmushroom/valueobjects
src/Geography/Coordinate.php
Coordinate.toUniversalTransverseMercator
public function toUniversalTransverseMercator() { $coordinate = self::getBaseCoordinate($this); $convert = new Convert($coordinate); $utm = $convert->toUniversalTransverseMercator(); return new StringLiteral($utm); }
php
public function toUniversalTransverseMercator() { $coordinate = self::getBaseCoordinate($this); $convert = new Convert($coordinate); $utm = $convert->toUniversalTransverseMercator(); return new StringLiteral($utm); }
[ "public", "function", "toUniversalTransverseMercator", "(", ")", "{", "$", "coordinate", "=", "self", "::", "getBaseCoordinate", "(", "$", "this", ")", ";", "$", "convert", "=", "new", "Convert", "(", "$", "coordinate", ")", ";", "$", "utm", "=", "$", "c...
Returns a Universal Transverse Mercator projection representation of the coordinate in meters @return String
[ "Returns", "a", "Universal", "Transverse", "Mercator", "projection", "representation", "of", "the", "coordinate", "in", "meters" ]
4554239ab75d65eeb9773219aa5b07e9fbfabb92
https://github.com/cubicmushroom/valueobjects/blob/4554239ab75d65eeb9773219aa5b07e9fbfabb92/src/Geography/Coordinate.php#L148-L155
197,164
cubicmushroom/valueobjects
src/Geography/Coordinate.php
Coordinate.distanceFrom
public function distanceFrom(Coordinate $coordinate, DistanceUnit $unit = null, DistanceFormula $formula = null) { if (null === $unit) { $unit = DistanceUnit::METER(); } if (null === $formula) { $formula = DistanceFormula::FLAT(); } $baseThis =...
php
public function distanceFrom(Coordinate $coordinate, DistanceUnit $unit = null, DistanceFormula $formula = null) { if (null === $unit) { $unit = DistanceUnit::METER(); } if (null === $formula) { $formula = DistanceFormula::FLAT(); } $baseThis =...
[ "public", "function", "distanceFrom", "(", "Coordinate", "$", "coordinate", ",", "DistanceUnit", "$", "unit", "=", "null", ",", "DistanceFormula", "$", "formula", "=", "null", ")", "{", "if", "(", "null", "===", "$", "unit", ")", "{", "$", "unit", "=", ...
Calculates the distance between two Coordinate objects @param Coordinate $coordinate @param DistanceUnit $unit @param DistanceFormula $formula @return Real
[ "Calculates", "the", "distance", "between", "two", "Coordinate", "objects" ]
4554239ab75d65eeb9773219aa5b07e9fbfabb92
https://github.com/cubicmushroom/valueobjects/blob/4554239ab75d65eeb9773219aa5b07e9fbfabb92/src/Geography/Coordinate.php#L165-L188
197,165
cubicmushroom/valueobjects
src/Geography/Coordinate.php
Coordinate.getBaseCoordinate
protected static function getBaseCoordinate(self $coordinate) { $latitude = $coordinate->getLatitude()->toNative(); $longitude = $coordinate->getLongitude()->toNative(); $ellipsoid = BaseEllipsoid::createFromName($coordinate->getEllipsoid()->toNative()); $coordinate = new BaseCoo...
php
protected static function getBaseCoordinate(self $coordinate) { $latitude = $coordinate->getLatitude()->toNative(); $longitude = $coordinate->getLongitude()->toNative(); $ellipsoid = BaseEllipsoid::createFromName($coordinate->getEllipsoid()->toNative()); $coordinate = new BaseCoo...
[ "protected", "static", "function", "getBaseCoordinate", "(", "self", "$", "coordinate", ")", "{", "$", "latitude", "=", "$", "coordinate", "->", "getLatitude", "(", ")", "->", "toNative", "(", ")", ";", "$", "longitude", "=", "$", "coordinate", "->", "getL...
Returns the underlying Coordinate object @param self $coordinate @return BaseCoordinate
[ "Returns", "the", "underlying", "Coordinate", "object" ]
4554239ab75d65eeb9773219aa5b07e9fbfabb92
https://github.com/cubicmushroom/valueobjects/blob/4554239ab75d65eeb9773219aa5b07e9fbfabb92/src/Geography/Coordinate.php#L206-L214
197,166
judus/minimal-event
src/Subscriber.php
Subscriber.getEventActions
public function getEventActions($eventName) { $events = isset($this->events[$eventName]) ? $this->events[$eventName] : []; return is_array($events) ? $events : [$events]; }
php
public function getEventActions($eventName) { $events = isset($this->events[$eventName]) ? $this->events[$eventName] : []; return is_array($events) ? $events : [$events]; }
[ "public", "function", "getEventActions", "(", "$", "eventName", ")", "{", "$", "events", "=", "isset", "(", "$", "this", "->", "events", "[", "$", "eventName", "]", ")", "?", "$", "this", "->", "events", "[", "$", "eventName", "]", ":", "[", "]", "...
Returns a list of methods associated with a event @param $name @return array|mixed
[ "Returns", "a", "list", "of", "methods", "associated", "with", "a", "event" ]
031c634080b434c68466bb8207351055120a51e0
https://github.com/judus/minimal-event/blob/031c634080b434c68466bb8207351055120a51e0/src/Subscriber.php#L37-L42
197,167
judus/minimal-event
src/Subscriber.php
Subscriber.handle
public function handle($eventName, $data = null) { $results = []; if ($actions = $this->getEventActions($eventName)) { $actions = is_array($actions) ? $actions : [$actions]; $data = is_array($data) ? $data : [$data]; foreach ($actions as $action) { ...
php
public function handle($eventName, $data = null) { $results = []; if ($actions = $this->getEventActions($eventName)) { $actions = is_array($actions) ? $actions : [$actions]; $data = is_array($data) ? $data : [$data]; foreach ($actions as $action) { ...
[ "public", "function", "handle", "(", "$", "eventName", ",", "$", "data", "=", "null", ")", "{", "$", "results", "=", "[", "]", ";", "if", "(", "$", "actions", "=", "$", "this", "->", "getEventActions", "(", "$", "eventName", ")", ")", "{", "$", "...
Handles the event @param $eventName @param null $data @return array|mixed
[ "Handles", "the", "event" ]
031c634080b434c68466bb8207351055120a51e0
https://github.com/judus/minimal-event/blob/031c634080b434c68466bb8207351055120a51e0/src/Subscriber.php#L52-L69
197,168
judus/minimal-event
src/Subscriber.php
Subscriber.call
protected function call($eventName, $method, $data = null) { if (method_exists($this, $method)) { $result = call_user_func_array([$this, $method], $data); return $result; } return null; }
php
protected function call($eventName, $method, $data = null) { if (method_exists($this, $method)) { $result = call_user_func_array([$this, $method], $data); return $result; } return null; }
[ "protected", "function", "call", "(", "$", "eventName", ",", "$", "method", ",", "$", "data", "=", "null", ")", "{", "if", "(", "method_exists", "(", "$", "this", ",", "$", "method", ")", ")", "{", "$", "result", "=", "call_user_func_array", "(", "["...
Calls a event method @param $method @param null $data @return mixed|null
[ "Calls", "a", "event", "method" ]
031c634080b434c68466bb8207351055120a51e0
https://github.com/judus/minimal-event/blob/031c634080b434c68466bb8207351055120a51e0/src/Subscriber.php#L79-L87
197,169
fridge-project/dbal
src/Fridge/DBAL/Schema/Diff/TableDiff.php
TableDiff.hasColumnDifference
private function hasColumnDifference() { return !empty($this->createdColumns) || !empty($this->alteredColumns) || !empty($this->droppedColumns); }
php
private function hasColumnDifference() { return !empty($this->createdColumns) || !empty($this->alteredColumns) || !empty($this->droppedColumns); }
[ "private", "function", "hasColumnDifference", "(", ")", "{", "return", "!", "empty", "(", "$", "this", "->", "createdColumns", ")", "||", "!", "empty", "(", "$", "this", "->", "alteredColumns", ")", "||", "!", "empty", "(", "$", "this", "->", "droppedCol...
Checks if the table diff has column difference. @return boolean TRUE if the table has column difference else FALSE.
[ "Checks", "if", "the", "table", "diff", "has", "column", "difference", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Schema/Diff/TableDiff.php#L249-L252
197,170
SetBased/php-affirm
src/ErrorHandler.php
ErrorHandler.handleError
public function handleError($errno, $errstr, $errfile, $errline) { if (error_reporting()===0) { // Error was suppressed with the @-operator. Don't throw an exception. return false; } $exception = new ErrorException($errstr, $errno, $errno, $errfile, $errline); // In case error appear...
php
public function handleError($errno, $errstr, $errfile, $errline) { if (error_reporting()===0) { // Error was suppressed with the @-operator. Don't throw an exception. return false; } $exception = new ErrorException($errstr, $errno, $errno, $errfile, $errline); // In case error appear...
[ "public", "function", "handleError", "(", "$", "errno", ",", "$", "errstr", ",", "$", "errfile", ",", "$", "errline", ")", "{", "if", "(", "error_reporting", "(", ")", "===", "0", ")", "{", "// Error was suppressed with the @-operator. Don't throw an exception.", ...
An error handler function that throws exceptions. @param int $errno The level of the error raised. @param string $errstr The error message. @param string $errfile The filename that the error was raised in. @param string $errline The line number the error was raised at. @return bool See http://php.net/manual/en...
[ "An", "error", "handler", "function", "that", "throws", "exceptions", "." ]
79394b5ced13bb675546652819dbcd94c4f9ac73
https://github.com/SetBased/php-affirm/blob/79394b5ced13bb675546652819dbcd94c4f9ac73/src/ErrorHandler.php#L39-L63
197,171
SetBased/php-affirm
src/ErrorHandler.php
ErrorHandler.register
public function register($theDebug = false, $theErrorTypes = null) { // PHP 5.6 set default value with expression. if ($theErrorTypes===null) { $theErrorTypes = E_ALL | E_STRICT; } $this->myDebug = $theDebug; ini_set('display_errors', false); set_exception_handler([$this, 'handleEx...
php
public function register($theDebug = false, $theErrorTypes = null) { // PHP 5.6 set default value with expression. if ($theErrorTypes===null) { $theErrorTypes = E_ALL | E_STRICT; } $this->myDebug = $theDebug; ini_set('display_errors', false); set_exception_handler([$this, 'handleEx...
[ "public", "function", "register", "(", "$", "theDebug", "=", "false", ",", "$", "theErrorTypes", "=", "null", ")", "{", "// PHP 5.6 set default value with expression.", "if", "(", "$", "theErrorTypes", "===", "null", ")", "{", "$", "theErrorTypes", "=", "E_ALL",...
Registers this error handler. @param bool $theDebug If true details and call trace of exceptions are shown. @param null|int $theErrorTypes The mask for triggering this error handler. Defaults to E_ALL | E_STRICT.
[ "Registers", "this", "error", "handler", "." ]
79394b5ced13bb675546652819dbcd94c4f9ac73
https://github.com/SetBased/php-affirm/blob/79394b5ced13bb675546652819dbcd94c4f9ac73/src/ErrorHandler.php#L114-L127
197,172
dms-org/common.structure
src/Web/IpAddress.php
IpAddress.validateString
protected function validateString(string $string) { if (strlen($string) > self::MAX_LENGTH || !filter_var($string, FILTER_VALIDATE_IP)) { throw InvalidArgumentException::format( 'Cannot construct class %s: argument must be a valid ip address, \'%s\' given', ...
php
protected function validateString(string $string) { if (strlen($string) > self::MAX_LENGTH || !filter_var($string, FILTER_VALIDATE_IP)) { throw InvalidArgumentException::format( 'Cannot construct class %s: argument must be a valid ip address, \'%s\' given', ...
[ "protected", "function", "validateString", "(", "string", "$", "string", ")", "{", "if", "(", "strlen", "(", "$", "string", ")", ">", "self", "::", "MAX_LENGTH", "||", "!", "filter_var", "(", "$", "string", ",", "FILTER_VALIDATE_IP", ")", ")", "{", "thro...
Validates the string is in the required format. @param string $string @return void @throws InvalidArgumentException
[ "Validates", "the", "string", "is", "in", "the", "required", "format", "." ]
23f122182f60df5ec847047a81a39c8aab019ff1
https://github.com/dms-org/common.structure/blob/23f122182f60df5ec847047a81a39c8aab019ff1/src/Web/IpAddress.php#L28-L36
197,173
djmattyg007/Handlebars
src/Compiler.php
Compiler.parseArguments
protected function parseArguments(string $string): ArgumentList { $argParser = $this->argumentParserFactory->create($string); return $argParser->tokenise(); }
php
protected function parseArguments(string $string): ArgumentList { $argParser = $this->argumentParserFactory->create($string); return $argParser->tokenise(); }
[ "protected", "function", "parseArguments", "(", "string", "$", "string", ")", ":", "ArgumentList", "{", "$", "argParser", "=", "$", "this", "->", "argumentParserFactory", "->", "create", "(", "$", "string", ")", ";", "return", "$", "argParser", "->", "tokeni...
Handlebars will give arguments in a string. This will transform them into a legitimate argument array. @param string $string The argument string. @return ArgumentList @throws Exception
[ "Handlebars", "will", "give", "arguments", "in", "a", "string", ".", "This", "will", "transform", "them", "into", "a", "legitimate", "argument", "array", "." ]
3f5b36ec22194cdc5d937a77aa71d500a760ebed
https://github.com/djmattyg007/Handlebars/blob/3f5b36ec22194cdc5d937a77aa71d500a760ebed/src/Compiler.php#L509-L513
197,174
erenmustafaozdal/laravel-modules-base
src/LaravelModulesBaseServiceProvider.php
LaravelModulesBaseServiceProvider.registerValidationRules
protected function registerValidationRules($validator) { /** * elfinder validator */ $validator->resolver(function($translator, $data, $rules, $messages) { return new BaseValidator($translator, $data, $rules, $messages); }); $validator->replacer(...
php
protected function registerValidationRules($validator) { /** * elfinder validator */ $validator->resolver(function($translator, $data, $rules, $messages) { return new BaseValidator($translator, $data, $rules, $messages); }); $validator->replacer(...
[ "protected", "function", "registerValidationRules", "(", "$", "validator", ")", "{", "/**\n * elfinder validator\n */", "$", "validator", "->", "resolver", "(", "function", "(", "$", "translator", ",", "$", "data", ",", "$", "rules", ",", "$", "mes...
Registers validation rules @param \Illuminate\Validation\Validator $validator @return void
[ "Registers", "validation", "rules" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/LaravelModulesBaseServiceProvider.php#L121-L137
197,175
gplcart/cli
controllers/commands/PriceRule.php
PriceRule.cmdGetPriceRule
public function cmdGetPriceRule() { $result = $this->getListPriceRule(); $this->outputFormat($result); $this->outputFormatTablePriceRule($result); $this->output(); }
php
public function cmdGetPriceRule() { $result = $this->getListPriceRule(); $this->outputFormat($result); $this->outputFormatTablePriceRule($result); $this->output(); }
[ "public", "function", "cmdGetPriceRule", "(", ")", "{", "$", "result", "=", "$", "this", "->", "getListPriceRule", "(", ")", ";", "$", "this", "->", "outputFormat", "(", "$", "result", ")", ";", "$", "this", "->", "outputFormatTablePriceRule", "(", "$", ...
Callback for "pricerule-get" command
[ "Callback", "for", "pricerule", "-", "get", "command" ]
e57dba53e291a225b4bff0c0d9b23d685dd1c125
https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/PriceRule.php#L67-L73
197,176
gplcart/cli
controllers/commands/PriceRule.php
PriceRule.cmdUpdatePriceRule
public function cmdUpdatePriceRule() { $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 cmdUpdatePriceRule() { $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", "cmdUpdatePriceRule", "(", ")", "{", "$", "params", "=", "$", "this", "->", "getParam", "(", ")", ";", "if", "(", "empty", "(", "$", "params", "[", "0", "]", ")", "||", "count", "(", "$", "params", ")", "<", "2", ")", "{", ...
Callback for "pricerule-update" command
[ "Callback", "for", "pricerule", "-", "update", "command" ]
e57dba53e291a225b4bff0c0d9b23d685dd1c125
https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/PriceRule.php#L140-L158
197,177
gplcart/cli
controllers/commands/PriceRule.php
PriceRule.addPriceRule
protected function addPriceRule() { if (!$this->isError()) { $id = $this->price_rule->add($this->getSubmitted()); if (empty($id)) { $this->errorAndExit($this->text('Unexpected result')); } $this->line($id); } }
php
protected function addPriceRule() { if (!$this->isError()) { $id = $this->price_rule->add($this->getSubmitted()); if (empty($id)) { $this->errorAndExit($this->text('Unexpected result')); } $this->line($id); } }
[ "protected", "function", "addPriceRule", "(", ")", "{", "if", "(", "!", "$", "this", "->", "isError", "(", ")", ")", "{", "$", "id", "=", "$", "this", "->", "price_rule", "->", "add", "(", "$", "this", "->", "getSubmitted", "(", ")", ")", ";", "i...
Add a new price rule
[ "Add", "a", "new", "price", "rule" ]
e57dba53e291a225b4bff0c0d9b23d685dd1c125
https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/PriceRule.php#L229-L238
197,178
gplcart/cli
controllers/commands/PriceRule.php
PriceRule.submitAddPriceRule
protected function submitAddPriceRule() { $this->setSubmitted(null, $this->getParam()); $this->validateComponent('price_rule'); $this->addPriceRule(); }
php
protected function submitAddPriceRule() { $this->setSubmitted(null, $this->getParam()); $this->validateComponent('price_rule'); $this->addPriceRule(); }
[ "protected", "function", "submitAddPriceRule", "(", ")", "{", "$", "this", "->", "setSubmitted", "(", "null", ",", "$", "this", "->", "getParam", "(", ")", ")", ";", "$", "this", "->", "validateComponent", "(", "'price_rule'", ")", ";", "$", "this", "->"...
Add a new price rule at once
[ "Add", "a", "new", "price", "rule", "at", "once" ]
e57dba53e291a225b4bff0c0d9b23d685dd1c125
https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/PriceRule.php#L254-L259
197,179
gplcart/cli
controllers/commands/PriceRule.php
PriceRule.wizardAddPriceRule
protected function wizardAddPriceRule() { $this->validatePrompt('name', $this->text('Name'), 'price_rule'); $this->validatePrompt('trigger_id', $this->text('Trigger ID'), 'price_rule'); $types = array(); foreach ($this->price_rule->getTypes() as $id => $type) { $types[$i...
php
protected function wizardAddPriceRule() { $this->validatePrompt('name', $this->text('Name'), 'price_rule'); $this->validatePrompt('trigger_id', $this->text('Trigger ID'), 'price_rule'); $types = array(); foreach ($this->price_rule->getTypes() as $id => $type) { $types[$i...
[ "protected", "function", "wizardAddPriceRule", "(", ")", "{", "$", "this", "->", "validatePrompt", "(", "'name'", ",", "$", "this", "->", "text", "(", "'Name'", ")", ",", "'price_rule'", ")", ";", "$", "this", "->", "validatePrompt", "(", "'trigger_id'", "...
Add a new price rule step by step
[ "Add", "a", "new", "price", "rule", "step", "by", "step" ]
e57dba53e291a225b4bff0c0d9b23d685dd1c125
https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/PriceRule.php#L264-L283
197,180
gplcart/cli
controllers/commands/PriceRule.php
PriceRule.setStatusPriceRule
protected function setStatusPriceRule($status) { $id = $this->getParam(0); $all = $this->getParam('all'); if (!isset($id) && !$all) { $this->errorAndExit($this->text('Invalid command')); } $result = $options = null; if (isset($id)) { if (em...
php
protected function setStatusPriceRule($status) { $id = $this->getParam(0); $all = $this->getParam('all'); if (!isset($id) && !$all) { $this->errorAndExit($this->text('Invalid command')); } $result = $options = null; if (isset($id)) { if (em...
[ "protected", "function", "setStatusPriceRule", "(", "$", "status", ")", "{", "$", "id", "=", "$", "this", "->", "getParam", "(", "0", ")", ";", "$", "all", "=", "$", "this", "->", "getParam", "(", "'all'", ")", ";", "if", "(", "!", "isset", "(", ...
Sets status for one or several price rules @param bool $status
[ "Sets", "status", "for", "one", "or", "several", "price", "rules" ]
e57dba53e291a225b4bff0c0d9b23d685dd1c125
https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/PriceRule.php#L289-L332
197,181
sinri/Ark-Cache
src/ArkCache.php
ArkCache.turnDateIntervalToSeconds
public static function turnDateIntervalToSeconds(DateInterval $dateInterval) { return $dateInterval->y * 365 * 24 * 3600 + $dateInterval->m * 30 * 24 * 3600 + $dateInterval->d * 24 * 3600 + $dateInterval->h * 3600 + $dateInterval->i * 60 + $dateInt...
php
public static function turnDateIntervalToSeconds(DateInterval $dateInterval) { return $dateInterval->y * 365 * 24 * 3600 + $dateInterval->m * 30 * 24 * 3600 + $dateInterval->d * 24 * 3600 + $dateInterval->h * 3600 + $dateInterval->i * 60 + $dateInt...
[ "public", "static", "function", "turnDateIntervalToSeconds", "(", "DateInterval", "$", "dateInterval", ")", "{", "return", "$", "dateInterval", "->", "y", "*", "365", "*", "24", "*", "3600", "+", "$", "dateInterval", "->", "m", "*", "30", "*", "24", "*", ...
1 Year is defined as 365 days and 1 Month is defined as 30 days @param DateInterval $dateInterval @return float|int turn to seconds
[ "1", "Year", "is", "defined", "as", "365", "days", "and", "1", "Month", "is", "defined", "as", "30", "days" ]
224d0b4aa9ae54c3f05348cd11b918c2836b1d3d
https://github.com/sinri/Ark-Cache/blob/224d0b4aa9ae54c3f05348cd11b918c2836b1d3d/src/ArkCache.php#L74-L82
197,182
hiqdev/minii-widgets
src/ListView.php
ListView.renderItem
public function renderItem($model, $key, $index) { if ($this->itemView === null) { $content = $key; } elseif (is_string($this->itemView)) { $content = $this->getView()->render($this->itemView, array_merge([ 'model' => $model, 'key' => $key, ...
php
public function renderItem($model, $key, $index) { if ($this->itemView === null) { $content = $key; } elseif (is_string($this->itemView)) { $content = $this->getView()->render($this->itemView, array_merge([ 'model' => $model, 'key' => $key, ...
[ "public", "function", "renderItem", "(", "$", "model", ",", "$", "key", ",", "$", "index", ")", "{", "if", "(", "$", "this", "->", "itemView", "===", "null", ")", "{", "$", "content", "=", "$", "key", ";", "}", "elseif", "(", "is_string", "(", "$...
Renders a single data model. @param mixed $model the data model to be rendered @param mixed $key the key value associated with the data model @param integer $index the zero-based index of the data model in the model array returned by [[dataProvider]]. @return string the rendering result
[ "Renders", "a", "single", "data", "model", "." ]
b8bc54a3645e9e45c228e3ec81b11ff4775385c3
https://github.com/hiqdev/minii-widgets/blob/b8bc54a3645e9e45c228e3ec81b11ff4775385c3/src/ListView.php#L90-L113
197,183
rafrsr/lib-array2object
src/Utils.php
Utils.getClassProperties
public static function getClassProperties($class) { if (is_string($class)) { if (isset(self::$classPropertyes[$class])) { return self::$classPropertyes[$class]; } $class = new \ReflectionClass($class); } if (!$class instanceof \Reflection...
php
public static function getClassProperties($class) { if (is_string($class)) { if (isset(self::$classPropertyes[$class])) { return self::$classPropertyes[$class]; } $class = new \ReflectionClass($class); } if (!$class instanceof \Reflection...
[ "public", "static", "function", "getClassProperties", "(", "$", "class", ")", "{", "if", "(", "is_string", "(", "$", "class", ")", ")", "{", "if", "(", "isset", "(", "self", "::", "$", "classPropertyes", "[", "$", "class", "]", ")", ")", "{", "return...
Get array of class properties including parents private properties. @param \ReflectionClass|string $class @return array|\ReflectionProperty[] @throws \ReflectionException @throws \InvalidArgumentException
[ "Get", "array", "of", "class", "properties", "including", "parents", "private", "properties", "." ]
d15db63b5f5740dbc7c2213373320445785856ef
https://github.com/rafrsr/lib-array2object/blob/d15db63b5f5740dbc7c2213373320445785856ef/src/Utils.php#L33-L68
197,184
jabernardo/lollipop-php
Library/HTTP/URL/Pretty.php
Pretty.getUrl
public function getUrl(array $data = []) { // Guess the what URL should be looked like $translation_guess = preg_replace(['/\[([^\[]+)\]/is', '/{(\w*?)}/is', '/{(\w*?):(:?.*?)}/is'], '{$1}', $this->_path); $keys = []; preg_match_all('/{(\w*?)}/is', $translation_guess, $keys); ...
php
public function getUrl(array $data = []) { // Guess the what URL should be looked like $translation_guess = preg_replace(['/\[([^\[]+)\]/is', '/{(\w*?)}/is', '/{(\w*?):(:?.*?)}/is'], '{$1}', $this->_path); $keys = []; preg_match_all('/{(\w*?)}/is', $translation_guess, $keys); ...
[ "public", "function", "getUrl", "(", "array", "$", "data", "=", "[", "]", ")", "{", "// Guess the what URL should be looked like", "$", "translation_guess", "=", "preg_replace", "(", "[", "'/\\[([^\\[]+)\\]/is'", ",", "'/{(\\w*?)}/is'", ",", "'/{(\\w*?):(:?.*?)}/is'", ...
Get route URL with parameters passed on. @example // Url: /categories/pages/{page} $pretty->getUrl(['page' => 10]); // Ouput: /categories/pages/10 @access public @param array $data URL parameters @return string Generated URL
[ "Get", "route", "URL", "with", "parameters", "passed", "on", "." ]
004d80b21f7246bb3e08c7b9f74a165b0d3ca0f5
https://github.com/jabernardo/lollipop-php/blob/004d80b21f7246bb3e08c7b9f74a165b0d3ca0f5/Library/HTTP/URL/Pretty.php#L140-L164
197,185
AnonymPHP/Anonym-Session
Stroge.php
Stroge.registerToHandler
protected function registerToHandler($name, $value, $crypt = false) { if (is_array($value) || is_object($value)) { $value = base64_encode(serialize($value)); } if (true === $crypt) { $value = $this->getCrypt()->encode($crypt); } $this->getHandler()->...
php
protected function registerToHandler($name, $value, $crypt = false) { if (is_array($value) || is_object($value)) { $value = base64_encode(serialize($value)); } if (true === $crypt) { $value = $this->getCrypt()->encode($crypt); } $this->getHandler()->...
[ "protected", "function", "registerToHandler", "(", "$", "name", ",", "$", "value", ",", "$", "crypt", "=", "false", ")", "{", "if", "(", "is_array", "(", "$", "value", ")", "||", "is_object", "(", "$", "value", ")", ")", "{", "$", "value", "=", "ba...
register a new session to handler @param string $name @param mixed $value @param bool|false $crypt
[ "register", "a", "new", "session", "to", "handler" ]
e13458c8d0f5df346cb86fca45c16f062098046d
https://github.com/AnonymPHP/Anonym-Session/blob/e13458c8d0f5df346cb86fca45c16f062098046d/Stroge.php#L145-L156
197,186
AnonymPHP/Anonym-Session
Stroge.php
Stroge.has
public function has($name) { $value = $this->get($name); return isset($value) ? $value : false; }
php
public function has($name) { $value = $this->get($name); return isset($value) ? $value : false; }
[ "public", "function", "has", "(", "$", "name", ")", "{", "$", "value", "=", "$", "this", "->", "get", "(", "$", "name", ")", ";", "return", "isset", "(", "$", "value", ")", "?", "$", "value", ":", "false", ";", "}" ]
check the value is exists @return mixed
[ "check", "the", "value", "is", "exists" ]
e13458c8d0f5df346cb86fca45c16f062098046d
https://github.com/AnonymPHP/Anonym-Session/blob/e13458c8d0f5df346cb86fca45c16f062098046d/Stroge.php#L201-L206
197,187
kaiohken1982/Neobazaar
src/Neobazaar/Form/View/Helper/FormDropdown.php
FormDropdown.renderOptions
public function renderOptions(array $options, array $selectedOptions = array()) { $template = '<li %s><a href="#">%s</a></li>'; $optionStrings = array(); $escapeHtml = $this->getEscapeHtmlHelper(); foreach ($options as $key => $optionSpec) { $value = ''; ...
php
public function renderOptions(array $options, array $selectedOptions = array()) { $template = '<li %s><a href="#">%s</a></li>'; $optionStrings = array(); $escapeHtml = $this->getEscapeHtmlHelper(); foreach ($options as $key => $optionSpec) { $value = ''; ...
[ "public", "function", "renderOptions", "(", "array", "$", "options", ",", "array", "$", "selectedOptions", "=", "array", "(", ")", ")", "{", "$", "template", "=", "'<li %s><a href=\"#\">%s</a></li>'", ";", "$", "optionStrings", "=", "array", "(", ")", ";", "...
Render an array of options Individual options should be of the form: <code> array( 'value' => 'value', 'label' => 'label', 'disabled' => $booleanFlag, 'selected' => $booleanFlag, ) </code> @param array $options @param array $selectedOptions Option values that should be marked as selected @return string
[ "Render", "an", "array", "of", "options" ]
288c972dea981d715c4e136edb5dba0318c9e6cb
https://github.com/kaiohken1982/Neobazaar/blob/288c972dea981d715c4e136edb5dba0318c9e6cb/src/Neobazaar/Form/View/Helper/FormDropdown.php#L165-L227
197,188
kaiohken1982/Neobazaar
src/Neobazaar/Form/View/Helper/FormDropdown.php
FormDropdown.renderOptgroup
public function renderOptgroup(array $optgroup, array $selectedOptions = array()) { $template = '<optgroup%s>%s</optgroup>'; $options = array(); if (isset($optgroup['options']) && is_array($optgroup['options'])) { $options = $optgroup['options']; unset($optgroup['opt...
php
public function renderOptgroup(array $optgroup, array $selectedOptions = array()) { $template = '<optgroup%s>%s</optgroup>'; $options = array(); if (isset($optgroup['options']) && is_array($optgroup['options'])) { $options = $optgroup['options']; unset($optgroup['opt...
[ "public", "function", "renderOptgroup", "(", "array", "$", "optgroup", ",", "array", "$", "selectedOptions", "=", "array", "(", ")", ")", "{", "$", "template", "=", "'<optgroup%s>%s</optgroup>'", ";", "$", "options", "=", "array", "(", ")", ";", "if", "(",...
Render an optgroup See {@link renderOptions()} for the options specification. Basically, an optgroup is simply an option that has an additional "options" key with an array following the specification for renderOptions(). @param array $optgroup @param array $selectedOptions @return string
[ "Render", "an", "optgroup" ]
288c972dea981d715c4e136edb5dba0318c9e6cb
https://github.com/kaiohken1982/Neobazaar/blob/288c972dea981d715c4e136edb5dba0318c9e6cb/src/Neobazaar/Form/View/Helper/FormDropdown.php#L240-L261
197,189
kaiohken1982/Neobazaar
src/Neobazaar/Form/View/Helper/FormDropdown.php
FormDropdown.validateMultiValue
protected function validateMultiValue($value, array $attributes) { if (null === $value) { return array(); } if (!is_array($value)) { return (array) $value; } if (!isset($attributes['multiple']) || !$attributes['multiple']) { throw new Exc...
php
protected function validateMultiValue($value, array $attributes) { if (null === $value) { return array(); } if (!is_array($value)) { return (array) $value; } if (!isset($attributes['multiple']) || !$attributes['multiple']) { throw new Exc...
[ "protected", "function", "validateMultiValue", "(", "$", "value", ",", "array", "$", "attributes", ")", "{", "if", "(", "null", "===", "$", "value", ")", "{", "return", "array", "(", ")", ";", "}", "if", "(", "!", "is_array", "(", "$", "value", ")", ...
Ensure that the value is set appropriately If the element's value attribute is an array, but there is no multiple attribute, or that attribute does not evaluate to true, then we have a domain issue -- you cannot have multiple options selected unless the multiple attribute is present and enabled. @param mixed $value ...
[ "Ensure", "that", "the", "value", "is", "set", "appropriately" ]
288c972dea981d715c4e136edb5dba0318c9e6cb
https://github.com/kaiohken1982/Neobazaar/blob/288c972dea981d715c4e136edb5dba0318c9e6cb/src/Neobazaar/Form/View/Helper/FormDropdown.php#L276-L294
197,190
kaiohken1982/Neobazaar
src/Neobazaar/Form/View/Helper/FormDropdown.php
FormDropdown.renderHidden
protected function renderHidden(\Zend\Form\Element\Select $element, array $attributes) { $attributes['type'] = 'select'; $attributes['name'] .= '[id]'; // if (isset($attributes['id'])) { // $attributes['id'] .= '-hidden'; // } if (method_exists($element, 'getId...
php
protected function renderHidden(\Zend\Form\Element\Select $element, array $attributes) { $attributes['type'] = 'select'; $attributes['name'] .= '[id]'; // if (isset($attributes['id'])) { // $attributes['id'] .= '-hidden'; // } if (method_exists($element, 'getId...
[ "protected", "function", "renderHidden", "(", "\\", "Zend", "\\", "Form", "\\", "Element", "\\", "Select", "$", "element", ",", "array", "$", "attributes", ")", "{", "$", "attributes", "[", "'type'", "]", "=", "'select'", ";", "$", "attributes", "[", "'n...
Render the hidden input with the captcha identifier @param CaptchaAdapter $captcha @param array $attributes @return string
[ "Render", "the", "hidden", "input", "with", "the", "captcha", "identifier" ]
288c972dea981d715c4e136edb5dba0318c9e6cb
https://github.com/kaiohken1982/Neobazaar/blob/288c972dea981d715c4e136edb5dba0318c9e6cb/src/Neobazaar/Form/View/Helper/FormDropdown.php#L328-L353
197,191
koolkode/http
src/Uri.php
Uri.toString
public function toString($to = self::TO_FRAGMENT, $schemaRelative = false) { if($to == static::TO_SCHEME) { return $this->scheme; } if($schemaRelative || empty($this->scheme)) { $uri = empty($this->host) ? '' : '//'; } else { $uri = empty($this->host) ? '' : ($this->scheme . '://'); } ...
php
public function toString($to = self::TO_FRAGMENT, $schemaRelative = false) { if($to == static::TO_SCHEME) { return $this->scheme; } if($schemaRelative || empty($this->scheme)) { $uri = empty($this->host) ? '' : '//'; } else { $uri = empty($this->host) ? '' : ($this->scheme . '://'); } ...
[ "public", "function", "toString", "(", "$", "to", "=", "self", "::", "TO_FRAGMENT", ",", "$", "schemaRelative", "=", "false", ")", "{", "if", "(", "$", "to", "==", "static", "::", "TO_SCHEME", ")", "{", "return", "$", "this", "->", "scheme", ";", "}"...
Renders an encoded URI. @param integer $to Render parts (left to right) up to this part. @param boolean $schemaRelative Create a schema-relative URI? @return string
[ "Renders", "an", "encoded", "URI", "." ]
3c1626d409d5ce5d71d26f0e8f31ae3683a2a966
https://github.com/koolkode/http/blob/3c1626d409d5ce5d71d26f0e8f31ae3683a2a966/src/Uri.php#L144-L202
197,192
koolkode/http
src/Uri.php
Uri.encode
public static function encode($string, $encodeSlashes = false) { if($encodeSlashes) { return rawurlencode($string); } return implode('/', array_map('rawurlencode', explode('/', (string)$string))); }
php
public static function encode($string, $encodeSlashes = false) { if($encodeSlashes) { return rawurlencode($string); } return implode('/', array_map('rawurlencode', explode('/', (string)$string))); }
[ "public", "static", "function", "encode", "(", "$", "string", ",", "$", "encodeSlashes", "=", "false", ")", "{", "if", "(", "$", "encodeSlashes", ")", "{", "return", "rawurlencode", "(", "$", "string", ")", ";", "}", "return", "implode", "(", "'/'", ",...
URL-encode the given string. @param string $string @param boolean $encodeSlashes Apply percent encoding to slashes? @return string
[ "URL", "-", "encode", "the", "given", "string", "." ]
3c1626d409d5ce5d71d26f0e8f31ae3683a2a966
https://github.com/koolkode/http/blob/3c1626d409d5ce5d71d26f0e8f31ae3683a2a966/src/Uri.php#L400-L408
197,193
eureka-framework/component-http
src/Http/Message/Uri.php
Uri.setUserInfo
private function setUserInfo($user, $pass) { $this->userInfo = $user . (!empty($pass) ? ':' . $pass : ''); return $this; }
php
private function setUserInfo($user, $pass) { $this->userInfo = $user . (!empty($pass) ? ':' . $pass : ''); return $this; }
[ "private", "function", "setUserInfo", "(", "$", "user", ",", "$", "pass", ")", "{", "$", "this", "->", "userInfo", "=", "$", "user", ".", "(", "!", "empty", "(", "$", "pass", ")", "?", "':'", ".", "$", "pass", ":", "''", ")", ";", "return", "$"...
Set user info @param string $user @param string $pass @return self
[ "Set", "user", "info" ]
698c3b73581a9703a9c932890c57e50f8774607a
https://github.com/eureka-framework/component-http/blob/698c3b73581a9703a9c932890c57e50f8774607a/src/Http/Message/Uri.php#L610-L615
197,194
fiiSoft/fiisoft-logger
src/Logger/SmartLogger/AbstractSmartLogger.php
AbstractSmartLogger.setMinLevel
final public function setMinLevel($minLevel) { if (isset($this->levels[$minLevel])) { $this->minLevel = $this->levels[$minLevel]; } return $this; }
php
final public function setMinLevel($minLevel) { if (isset($this->levels[$minLevel])) { $this->minLevel = $this->levels[$minLevel]; } return $this; }
[ "final", "public", "function", "setMinLevel", "(", "$", "minLevel", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "levels", "[", "$", "minLevel", "]", ")", ")", "{", "$", "this", "->", "minLevel", "=", "$", "this", "->", "levels", "[", "$",...
If set then only messages with level equal or greater then minLevel will be logged. @param string $minLevel @return $this fluent interface
[ "If", "set", "then", "only", "messages", "with", "level", "equal", "or", "greater", "then", "minLevel", "will", "be", "logged", "." ]
3d2eb9d18a785ec119d2fbeb9d34b74265e7dcf5
https://github.com/fiiSoft/fiisoft-logger/blob/3d2eb9d18a785ec119d2fbeb9d34b74265e7dcf5/src/Logger/SmartLogger/AbstractSmartLogger.php#L63-L70
197,195
atk14/StringBuffer
src/stringbuffer.php
StringBuffer.addString
function addString($string_to_add){ settype($string_to_add,"string"); if(strlen($string_to_add)>0){ $this->_Buffer[] = new StringBufferItem($string_to_add); } }
php
function addString($string_to_add){ settype($string_to_add,"string"); if(strlen($string_to_add)>0){ $this->_Buffer[] = new StringBufferItem($string_to_add); } }
[ "function", "addString", "(", "$", "string_to_add", ")", "{", "settype", "(", "$", "string_to_add", ",", "\"string\"", ")", ";", "if", "(", "strlen", "(", "$", "string_to_add", ")", ">", "0", ")", "{", "$", "this", "->", "_Buffer", "[", "]", "=", "ne...
Adds another string to the buffer. @param string $string_to_add
[ "Adds", "another", "string", "to", "the", "buffer", "." ]
32f1580f23aff4d729a0a4ff82d3bd82b9194cc8
https://github.com/atk14/StringBuffer/blob/32f1580f23aff4d729a0a4ff82d3bd82b9194cc8/src/stringbuffer.php#L66-L71
197,196
atk14/StringBuffer
src/stringbuffer.php
StringBuffer.addStringBuffer
function addStringBuffer($stringbuffer_to_add){ if(!isset($stringbuffer_to_add)){ return;} for($i=0;$i<sizeof($stringbuffer_to_add->_Buffer);$i++){ $this->_Buffer[] = $stringbuffer_to_add->_Buffer[$i]; } }
php
function addStringBuffer($stringbuffer_to_add){ if(!isset($stringbuffer_to_add)){ return;} for($i=0;$i<sizeof($stringbuffer_to_add->_Buffer);$i++){ $this->_Buffer[] = $stringbuffer_to_add->_Buffer[$i]; } }
[ "function", "addStringBuffer", "(", "$", "stringbuffer_to_add", ")", "{", "if", "(", "!", "isset", "(", "$", "stringbuffer_to_add", ")", ")", "{", "return", ";", "}", "for", "(", "$", "i", "=", "0", ";", "$", "i", "<", "sizeof", "(", "$", "stringbuff...
Adds content of another StringBuffer to the buffer. @param StringBuffer $stringbuffer_to_add
[ "Adds", "content", "of", "another", "StringBuffer", "to", "the", "buffer", "." ]
32f1580f23aff4d729a0a4ff82d3bd82b9194cc8
https://github.com/atk14/StringBuffer/blob/32f1580f23aff4d729a0a4ff82d3bd82b9194cc8/src/stringbuffer.php#L89-L94
197,197
atk14/StringBuffer
src/stringbuffer.php
StringBuffer.getLength
function getLength(){ $out = 0; for($i=0;$i<sizeof($this->_Buffer);$i++){ $out = $out + $this->_Buffer[$i]->getLength(); } return $out; }
php
function getLength(){ $out = 0; for($i=0;$i<sizeof($this->_Buffer);$i++){ $out = $out + $this->_Buffer[$i]->getLength(); } return $out; }
[ "function", "getLength", "(", ")", "{", "$", "out", "=", "0", ";", "for", "(", "$", "i", "=", "0", ";", "$", "i", "<", "sizeof", "(", "$", "this", "->", "_Buffer", ")", ";", "$", "i", "++", ")", "{", "$", "out", "=", "$", "out", "+", "$",...
Returns length of buffer content. @return integer
[ "Returns", "length", "of", "buffer", "content", "." ]
32f1580f23aff4d729a0a4ff82d3bd82b9194cc8
https://github.com/atk14/StringBuffer/blob/32f1580f23aff4d729a0a4ff82d3bd82b9194cc8/src/stringbuffer.php#L101-L107
197,198
atk14/StringBuffer
src/stringbuffer.php
StringBuffer.printOut
function printOut(){ for($i=0;$i<sizeof($this->_Buffer);$i++){ $this->_Buffer[$i]->flush(); } }
php
function printOut(){ for($i=0;$i<sizeof($this->_Buffer);$i++){ $this->_Buffer[$i]->flush(); } }
[ "function", "printOut", "(", ")", "{", "for", "(", "$", "i", "=", "0", ";", "$", "i", "<", "sizeof", "(", "$", "this", "->", "_Buffer", ")", ";", "$", "i", "++", ")", "{", "$", "this", "->", "_Buffer", "[", "$", "i", "]", "->", "flush", "("...
Echoes content of buffer.
[ "Echoes", "content", "of", "buffer", "." ]
32f1580f23aff4d729a0a4ff82d3bd82b9194cc8
https://github.com/atk14/StringBuffer/blob/32f1580f23aff4d729a0a4ff82d3bd82b9194cc8/src/stringbuffer.php#L112-L116
197,199
atk14/StringBuffer
src/stringbuffer.php
StringBuffer.replace
function replace($search,$replace){ settype($search,"string"); // prevod StringBuffer na string if(is_object($replace)){ $replace = $replace->toString(); } for($i=0;$i<sizeof($this->_Buffer);$i++){ $this->_Buffer[$i]->replace($search,$replace); } }
php
function replace($search,$replace){ settype($search,"string"); // prevod StringBuffer na string if(is_object($replace)){ $replace = $replace->toString(); } for($i=0;$i<sizeof($this->_Buffer);$i++){ $this->_Buffer[$i]->replace($search,$replace); } }
[ "function", "replace", "(", "$", "search", ",", "$", "replace", ")", "{", "settype", "(", "$", "search", ",", "\"string\"", ")", ";", "// prevod StringBuffer na string", "if", "(", "is_object", "(", "$", "replace", ")", ")", "{", "$", "replace", "=", "$"...
Replaces string in buffer with replacement string. @access public @param string $search replaced string @param string|StringBuffer $replace replacement string. or another StringBuffer object
[ "Replaces", "string", "in", "buffer", "with", "replacement", "string", "." ]
32f1580f23aff4d729a0a4ff82d3bd82b9194cc8
https://github.com/atk14/StringBuffer/blob/32f1580f23aff4d729a0a4ff82d3bd82b9194cc8/src/stringbuffer.php#L133-L144