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
24,300
NuclearCMS/Hierarchy
src/Node.php
Node.getMetaImage
public function getMetaImage() { $metaImage = $this->getTranslationAttribute('meta_image'); if ($metaImage = get_nuclear_cover($metaImage)) { return $metaImage; } if ($coverImage = $this->getCoverImage()) { return $coverImage; } ...
php
public function getMetaImage() { $metaImage = $this->getTranslationAttribute('meta_image'); if ($metaImage = get_nuclear_cover($metaImage)) { return $metaImage; } if ($coverImage = $this->getCoverImage()) { return $coverImage; } ...
[ "public", "function", "getMetaImage", "(", ")", "{", "$", "metaImage", "=", "$", "this", "->", "getTranslationAttribute", "(", "'meta_image'", ")", ";", "if", "(", "$", "metaImage", "=", "get_nuclear_cover", "(", "$", "metaImage", ")", ")", "{", "return", ...
Meta image getter @return Image|null
[ "Meta", "image", "getter" ]
535171c5e2db72265313fd2110aec8456e46f459
https://github.com/NuclearCMS/Hierarchy/blob/535171c5e2db72265313fd2110aec8456e46f459/src/Node.php#L1414-L1429
24,301
NuclearCMS/Hierarchy
src/Node.php
Node.getCoverImage
public function getCoverImage() { if ($this->coverImage) { return $this->coverImage; } $modelName = source_model_name($this->getNodeTypeName(), true); $mutatables = call_user_func([$modelName, 'getMutatables']); foreach ($mutatables as $mutatable => $ty...
php
public function getCoverImage() { if ($this->coverImage) { return $this->coverImage; } $modelName = source_model_name($this->getNodeTypeName(), true); $mutatables = call_user_func([$modelName, 'getMutatables']); foreach ($mutatables as $mutatable => $ty...
[ "public", "function", "getCoverImage", "(", ")", "{", "if", "(", "$", "this", "->", "coverImage", ")", "{", "return", "$", "this", "->", "coverImage", ";", "}", "$", "modelName", "=", "source_model_name", "(", "$", "this", "->", "getNodeTypeName", "(", "...
Gets the cover image @return Image|null
[ "Gets", "the", "cover", "image" ]
535171c5e2db72265313fd2110aec8456e46f459
https://github.com/NuclearCMS/Hierarchy/blob/535171c5e2db72265313fd2110aec8456e46f459/src/Node.php#L1436-L1471
24,302
Jimdo/jimphle-data-structure
src/Jimphle/DataStructure/Map.php
Map.setIn
public function setIn($keys, $value) { $lastKey = array_shift($keys); if (count($keys) > 0 && !isset($this->$lastKey->{$keys[0]})) { throw new \RuntimeException(sprintf("Key '%s->%s' does not exist.", $lastKey, $keys[0])); } if (count($keys) > 0 && $this->$lastKey instanc...
php
public function setIn($keys, $value) { $lastKey = array_shift($keys); if (count($keys) > 0 && !isset($this->$lastKey->{$keys[0]})) { throw new \RuntimeException(sprintf("Key '%s->%s' does not exist.", $lastKey, $keys[0])); } if (count($keys) > 0 && $this->$lastKey instanc...
[ "public", "function", "setIn", "(", "$", "keys", ",", "$", "value", ")", "{", "$", "lastKey", "=", "array_shift", "(", "$", "keys", ")", ";", "if", "(", "count", "(", "$", "keys", ")", ">", "0", "&&", "!", "isset", "(", "$", "this", "->", "$", ...
set a value in a nested map @param array $keys @param mixed $value @return Map
[ "set", "a", "value", "in", "a", "nested", "map" ]
15f784e4af48520079f8639748ab68b074dbc005
https://github.com/Jimdo/jimphle-data-structure/blob/15f784e4af48520079f8639748ab68b074dbc005/src/Jimphle/DataStructure/Map.php#L74-L84
24,303
oroinc/OroLayoutComponent
AliasCollection.php
AliasCollection.getId
public function getId($alias) { if (!isset($this->aliases[$alias])) { return null; } $id = $this->aliases[$alias]; while (isset($this->aliases[$id])) { $id = $this->aliases[$id]; } return $id; }
php
public function getId($alias) { if (!isset($this->aliases[$alias])) { return null; } $id = $this->aliases[$alias]; while (isset($this->aliases[$id])) { $id = $this->aliases[$id]; } return $id; }
[ "public", "function", "getId", "(", "$", "alias", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "aliases", "[", "$", "alias", "]", ")", ")", "{", "return", "null", ";", "}", "$", "id", "=", "$", "this", "->", "aliases", "[", "$", ...
Returns the identifier of the item which has the given alias @param string $alias The item alias @return string|null The item identifier or null if no one item has the given alias
[ "Returns", "the", "identifier", "of", "the", "item", "which", "has", "the", "given", "alias" ]
682a96672393d81c63728e47c4a4c3618c515be0
https://github.com/oroinc/OroLayoutComponent/blob/682a96672393d81c63728e47c4a4c3618c515be0/AliasCollection.php#L50-L62
24,304
oroinc/OroLayoutComponent
AliasCollection.php
AliasCollection.add
public function add($alias, $id) { if (isset($this->aliases[$alias])) { if ($this->aliases[$alias] === $id) { // exactly the same alias for the specified item is already exists return $this; } throw new Exception\AliasAlreadyExistsExceptio...
php
public function add($alias, $id) { if (isset($this->aliases[$alias])) { if ($this->aliases[$alias] === $id) { // exactly the same alias for the specified item is already exists return $this; } throw new Exception\AliasAlreadyExistsExceptio...
[ "public", "function", "add", "(", "$", "alias", ",", "$", "id", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "aliases", "[", "$", "alias", "]", ")", ")", "{", "if", "(", "$", "this", "->", "aliases", "[", "$", "alias", "]", "===", "$...
Registers an alias for the specified identifier @param string $alias A string that can be used as an alias for the item id @param string $id The item identifier or already registered item alias @return self @throws Exception\AliasAlreadyExistsException if the alias is used for another item
[ "Registers", "an", "alias", "for", "the", "specified", "identifier" ]
682a96672393d81c63728e47c4a4c3618c515be0
https://github.com/oroinc/OroLayoutComponent/blob/682a96672393d81c63728e47c4a4c3618c515be0/AliasCollection.php#L88-L113
24,305
oroinc/OroLayoutComponent
AliasCollection.php
AliasCollection.remove
public function remove($alias) { $id = $this->getId($alias); if ($id) { unset($this->aliases[$alias]); $aliases = &$this->ids[$id]; unset($aliases[array_search($alias, $aliases, true)]); if (!empty($aliases)) { $this->removeDependedAlia...
php
public function remove($alias) { $id = $this->getId($alias); if ($id) { unset($this->aliases[$alias]); $aliases = &$this->ids[$id]; unset($aliases[array_search($alias, $aliases, true)]); if (!empty($aliases)) { $this->removeDependedAlia...
[ "public", "function", "remove", "(", "$", "alias", ")", "{", "$", "id", "=", "$", "this", "->", "getId", "(", "$", "alias", ")", ";", "if", "(", "$", "id", ")", "{", "unset", "(", "$", "this", "->", "aliases", "[", "$", "alias", "]", ")", ";"...
Removes the alias @param string $alias The item alias @return self
[ "Removes", "the", "alias" ]
682a96672393d81c63728e47c4a4c3618c515be0
https://github.com/oroinc/OroLayoutComponent/blob/682a96672393d81c63728e47c4a4c3618c515be0/AliasCollection.php#L122-L137
24,306
oroinc/OroLayoutComponent
AliasCollection.php
AliasCollection.removeById
public function removeById($id) { if (isset($this->ids[$id])) { foreach ($this->ids[$id] as $alias) { unset($this->aliases[$alias]); } unset($this->ids[$id]); } return $this; }
php
public function removeById($id) { if (isset($this->ids[$id])) { foreach ($this->ids[$id] as $alias) { unset($this->aliases[$alias]); } unset($this->ids[$id]); } return $this; }
[ "public", "function", "removeById", "(", "$", "id", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "ids", "[", "$", "id", "]", ")", ")", "{", "foreach", "(", "$", "this", "->", "ids", "[", "$", "id", "]", "as", "$", "alias", ")", "{", ...
Removes all aliases for the specified item @param string $id The identifier of item which aliases should be removed @return self
[ "Removes", "all", "aliases", "for", "the", "specified", "item" ]
682a96672393d81c63728e47c4a4c3618c515be0
https://github.com/oroinc/OroLayoutComponent/blob/682a96672393d81c63728e47c4a4c3618c515be0/AliasCollection.php#L146-L156
24,307
oroinc/OroLayoutComponent
AliasCollection.php
AliasCollection.removeDependedAliases
protected function removeDependedAliases($alias, $id) { foreach ($this->ids[$id] as $otherAlias) { if (isset($this->aliases[$otherAlias]) && $this->aliases[$otherAlias] === $alias) { unset($this->aliases[$otherAlias]); $aliases = &$this->ids[$id]; ...
php
protected function removeDependedAliases($alias, $id) { foreach ($this->ids[$id] as $otherAlias) { if (isset($this->aliases[$otherAlias]) && $this->aliases[$otherAlias] === $alias) { unset($this->aliases[$otherAlias]); $aliases = &$this->ids[$id]; ...
[ "protected", "function", "removeDependedAliases", "(", "$", "alias", ",", "$", "id", ")", "{", "foreach", "(", "$", "this", "->", "ids", "[", "$", "id", "]", "as", "$", "otherAlias", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "aliases", ...
Removes all depended aliases For example if "alias3" is removed in alias chain like "alias1 -> alias2 -> alias3 -> id" than both "alias1" and "alias2" are removed as well @param string $alias @param string $id
[ "Removes", "all", "depended", "aliases", "For", "example", "if", "alias3", "is", "removed", "in", "alias", "chain", "like", "alias1", "-", ">", "alias2", "-", ">", "alias3", "-", ">", "id", "than", "both", "alias1", "and", "alias2", "are", "removed", "as...
682a96672393d81c63728e47c4a4c3618c515be0
https://github.com/oroinc/OroLayoutComponent/blob/682a96672393d81c63728e47c4a4c3618c515be0/AliasCollection.php#L185-L199
24,308
CupOfTea696/WordPress-Composer
src/Plugin.php
Plugin.getRootDirectory
public function getRootDirectory() { $config = $this->composer->getConfig(); return str_replace($config->get('vendor-dir', Config::RELATIVE_PATHS), '', $config->get('vendor-dir')); }
php
public function getRootDirectory() { $config = $this->composer->getConfig(); return str_replace($config->get('vendor-dir', Config::RELATIVE_PATHS), '', $config->get('vendor-dir')); }
[ "public", "function", "getRootDirectory", "(", ")", "{", "$", "config", "=", "$", "this", "->", "composer", "->", "getConfig", "(", ")", ";", "return", "str_replace", "(", "$", "config", "->", "get", "(", "'vendor-dir'", ",", "Config", "::", "RELATIVE_PATH...
Get the root directory. @return string
[ "Get", "the", "root", "directory", "." ]
8c0abc10f82b8ce1db5354f6a041c7587ad3fb90
https://github.com/CupOfTea696/WordPress-Composer/blob/8c0abc10f82b8ce1db5354f6a041c7587ad3fb90/src/Plugin.php#L165-L170
24,309
CupOfTea696/WordPress-Composer
src/Plugin.php
Plugin.getPublicDirectory
public function getPublicDirectory() { if (isset($this->publicDirectory)) { return $this->publicDirectory; } $rootPkg = $this->composer->getPackage(); if ($rootPkg) { $extra = $rootPkg->getExtra(); if ($extra && ! emp...
php
public function getPublicDirectory() { if (isset($this->publicDirectory)) { return $this->publicDirectory; } $rootPkg = $this->composer->getPackage(); if ($rootPkg) { $extra = $rootPkg->getExtra(); if ($extra && ! emp...
[ "public", "function", "getPublicDirectory", "(", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "publicDirectory", ")", ")", "{", "return", "$", "this", "->", "publicDirectory", ";", "}", "$", "rootPkg", "=", "$", "this", "->", "composer", "->", ...
Get the public directory. @return string
[ "Get", "the", "public", "directory", "." ]
8c0abc10f82b8ce1db5354f6a041c7587ad3fb90
https://github.com/CupOfTea696/WordPress-Composer/blob/8c0abc10f82b8ce1db5354f6a041c7587ad3fb90/src/Plugin.php#L187-L238
24,310
mothership-ec/composer
src/Composer/Util/Filesystem.php
Filesystem.removeDirectoryPhp
public function removeDirectoryPhp($directory) { $it = new RecursiveDirectoryIterator($directory, RecursiveDirectoryIterator::SKIP_DOTS); $ri = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST); foreach ($ri as $file) { if ($file->isDir()) { ...
php
public function removeDirectoryPhp($directory) { $it = new RecursiveDirectoryIterator($directory, RecursiveDirectoryIterator::SKIP_DOTS); $ri = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST); foreach ($ri as $file) { if ($file->isDir()) { ...
[ "public", "function", "removeDirectoryPhp", "(", "$", "directory", ")", "{", "$", "it", "=", "new", "RecursiveDirectoryIterator", "(", "$", "directory", ",", "RecursiveDirectoryIterator", "::", "SKIP_DOTS", ")", ";", "$", "ri", "=", "new", "RecursiveIteratorIterat...
Recursively delete directory using PHP iterators. Uses a CHILD_FIRST RecursiveIteratorIterator to sort files before directories, creating a single non-recursive loop to delete files/directories in the correct order. @param string $directory @return bool
[ "Recursively", "delete", "directory", "using", "PHP", "iterators", "." ]
fa6ad031a939d8d33b211e428fdbdd28cfce238c
https://github.com/mothership-ec/composer/blob/fa6ad031a939d8d33b211e428fdbdd28cfce238c/src/Composer/Util/Filesystem.php#L142-L156
24,311
tttptd/laravel-responder
src/Traits/HandlesApiErrors.php
HandlesApiErrors.transformException
protected function transformException(Exception $exception) { if (Request::capture()->wantsJson()) { $this->transformAuthException($exception); $this->transformEloquentException($exception); $this->transformValidationException($exception); } }
php
protected function transformException(Exception $exception) { if (Request::capture()->wantsJson()) { $this->transformAuthException($exception); $this->transformEloquentException($exception); $this->transformValidationException($exception); } }
[ "protected", "function", "transformException", "(", "Exception", "$", "exception", ")", "{", "if", "(", "Request", "::", "capture", "(", ")", "->", "wantsJson", "(", ")", ")", "{", "$", "this", "->", "transformAuthException", "(", "$", "exception", ")", ";...
Transform a Laravel exception into an API exception. @param Exception $exception @return void
[ "Transform", "a", "Laravel", "exception", "into", "an", "API", "exception", "." ]
0e4a32701f0de755c1f1af458045829e1bd6caf6
https://github.com/tttptd/laravel-responder/blob/0e4a32701f0de755c1f1af458045829e1bd6caf6/src/Traits/HandlesApiErrors.php#L36-L43
24,312
tttptd/laravel-responder
src/Traits/HandlesApiErrors.php
HandlesApiErrors.renderApiError
protected function renderApiError(ApiException $exception):JsonResponse { return app('responder.error') ->setError($exception->getErrorCode(), $exception->getMessage()) ->addData($exception->getData() ?: []) ->respond($exception->getStatusCode()); }
php
protected function renderApiError(ApiException $exception):JsonResponse { return app('responder.error') ->setError($exception->getErrorCode(), $exception->getMessage()) ->addData($exception->getData() ?: []) ->respond($exception->getStatusCode()); }
[ "protected", "function", "renderApiError", "(", "ApiException", "$", "exception", ")", ":", "JsonResponse", "{", "return", "app", "(", "'responder.error'", ")", "->", "setError", "(", "$", "exception", "->", "getErrorCode", "(", ")", ",", "$", "exception", "->...
Renders any API exception into a JSON error response. @param ApiException $exception @return JsonResponse
[ "Renders", "any", "API", "exception", "into", "a", "JSON", "error", "response", "." ]
0e4a32701f0de755c1f1af458045829e1bd6caf6
https://github.com/tttptd/laravel-responder/blob/0e4a32701f0de755c1f1af458045829e1bd6caf6/src/Traits/HandlesApiErrors.php#L103-L109
24,313
thecodingmachine/mvc.splash-common
src/Mouf/Mvc/Splash/Utils/ExceptionUtils.php
ExceptionUtils.getHTMLBackTrace
private static function getHTMLBackTrace($backtrace) { $str = ''; foreach ($backtrace as $step) { if ($step['function'] != 'getHTMLBackTrace' && $step['function'] != 'handle_error') { $str .= '<tr><td style="border-bottom: 1px solid #EEEEEE">'; $str .= ((...
php
private static function getHTMLBackTrace($backtrace) { $str = ''; foreach ($backtrace as $step) { if ($step['function'] != 'getHTMLBackTrace' && $step['function'] != 'handle_error') { $str .= '<tr><td style="border-bottom: 1px solid #EEEEEE">'; $str .= ((...
[ "private", "static", "function", "getHTMLBackTrace", "(", "$", "backtrace", ")", "{", "$", "str", "=", "''", ";", "foreach", "(", "$", "backtrace", "as", "$", "step", ")", "{", "if", "(", "$", "step", "[", "'function'", "]", "!=", "'getHTMLBackTrace'", ...
Returns the Exception Backtrace as a nice HTML view. @param array $backtrace @return string
[ "Returns", "the", "Exception", "Backtrace", "as", "a", "nice", "HTML", "view", "." ]
eed0269ceda4d7d090a330a220490906a7aa60bd
https://github.com/thecodingmachine/mvc.splash-common/blob/eed0269ceda4d7d090a330a220490906a7aa60bd/src/Mouf/Mvc/Splash/Utils/ExceptionUtils.php#L14-L48
24,314
thecodingmachine/mvc.splash-common
src/Mouf/Mvc/Splash/Utils/ExceptionUtils.php
ExceptionUtils.getPhpVariableAsText
private static function getPhpVariableAsText($var) { if (is_string($var)) { return('"'.str_replace(array("\x00", "\x0a", "\x0d", "\x1a", "\x09"), array('\0', '\n', '\r', '\Z', '\t'), $var).'"'); } elseif (is_int($var) || is_float($var)) { return($var); } elseif (is_bo...
php
private static function getPhpVariableAsText($var) { if (is_string($var)) { return('"'.str_replace(array("\x00", "\x0a", "\x0d", "\x1a", "\x09"), array('\0', '\n', '\r', '\Z', '\t'), $var).'"'); } elseif (is_int($var) || is_float($var)) { return($var); } elseif (is_bo...
[ "private", "static", "function", "getPhpVariableAsText", "(", "$", "var", ")", "{", "if", "(", "is_string", "(", "$", "var", ")", ")", "{", "return", "(", "'\"'", ".", "str_replace", "(", "array", "(", "\"\\x00\"", ",", "\"\\x0a\"", ",", "\"\\x0d\"", ","...
Used by the debug function to display a nice view of the parameters. @param mixed $var @return string
[ "Used", "by", "the", "debug", "function", "to", "display", "a", "nice", "view", "of", "the", "parameters", "." ]
eed0269ceda4d7d090a330a220490906a7aa60bd
https://github.com/thecodingmachine/mvc.splash-common/blob/eed0269ceda4d7d090a330a220490906a7aa60bd/src/Mouf/Mvc/Splash/Utils/ExceptionUtils.php#L152-L181
24,315
thecodingmachine/mvc.splash-common
src/Mouf/Mvc/Splash/Utils/ExceptionUtils.php
ExceptionUtils.getRelativePath
private static function getRelativePath($from, $to) { $from = explode('/', $from); $to = explode('/', $to); $relPath = $to; foreach ($from as $depth => $dir) { // find first non-matching dir if (isset($to[$depth]) && $dir === $to[$depth]) { //...
php
private static function getRelativePath($from, $to) { $from = explode('/', $from); $to = explode('/', $to); $relPath = $to; foreach ($from as $depth => $dir) { // find first non-matching dir if (isset($to[$depth]) && $dir === $to[$depth]) { //...
[ "private", "static", "function", "getRelativePath", "(", "$", "from", ",", "$", "to", ")", "{", "$", "from", "=", "explode", "(", "'/'", ",", "$", "from", ")", ";", "$", "to", "=", "explode", "(", "'/'", ",", "$", "to", ")", ";", "$", "relPath", ...
Returns a relative path based on 2 absolute paths. @param string $from @param string $to @return string
[ "Returns", "a", "relative", "path", "based", "on", "2", "absolute", "paths", "." ]
eed0269ceda4d7d090a330a220490906a7aa60bd
https://github.com/thecodingmachine/mvc.splash-common/blob/eed0269ceda4d7d090a330a220490906a7aa60bd/src/Mouf/Mvc/Splash/Utils/ExceptionUtils.php#L204-L230
24,316
rafalkot/yii2-settings
Settings.php
Settings.get
public function get($category, $key = null, $default = null) { $this->load($category); if ($key === null) { return isset($this->items[$category]) && !empty($this->items[$category]) ? $this->items[$category] : $default; } if (is_string($key)) { return isset($...
php
public function get($category, $key = null, $default = null) { $this->load($category); if ($key === null) { return isset($this->items[$category]) && !empty($this->items[$category]) ? $this->items[$category] : $default; } if (is_string($key)) { return isset($...
[ "public", "function", "get", "(", "$", "category", ",", "$", "key", "=", "null", ",", "$", "default", "=", "null", ")", "{", "$", "this", "->", "load", "(", "$", "category", ")", ";", "if", "(", "$", "key", "===", "null", ")", "{", "return", "i...
Returns settings. @param string $category Category name @param string|array $key Single or multiple keys in array @param mixed $default Default value when setting does not exist @return mixed Setting value @throws Exception
[ "Returns", "settings", "." ]
b601b58809322f617273093766dc28c08e74d566
https://github.com/rafalkot/yii2-settings/blob/b601b58809322f617273093766dc28c08e74d566/Settings.php#L56-L77
24,317
rafalkot/yii2-settings
Settings.php
Settings.load
public function load($categories) { if (is_string($categories)) { $categories = [$categories]; } foreach ($categories as $idx => $category) { if (isset($this->items[$category])) { unset($categories[$idx]); } else { $this->i...
php
public function load($categories) { if (is_string($categories)) { $categories = [$categories]; } foreach ($categories as $idx => $category) { if (isset($this->items[$category])) { unset($categories[$idx]); } else { $this->i...
[ "public", "function", "load", "(", "$", "categories", ")", "{", "if", "(", "is_string", "(", "$", "categories", ")", ")", "{", "$", "categories", "=", "[", "$", "categories", "]", ";", "}", "foreach", "(", "$", "categories", "as", "$", "idx", "=>", ...
Loads settings from category or multiple categories @param array|string $categories Category name
[ "Loads", "settings", "from", "category", "or", "multiple", "categories" ]
b601b58809322f617273093766dc28c08e74d566
https://github.com/rafalkot/yii2-settings/blob/b601b58809322f617273093766dc28c08e74d566/Settings.php#L147-L176
24,318
rafalkot/yii2-settings
Settings.php
Settings.dbInsert
protected function dbInsert($category, $key, $value) { $created_by = \Yii::$app->user->getId(); $this->getDb()->createCommand(' INSERT INTO {{setting}} (`category`, `key`, `value`, `created_at`, `created_by`) VALUES (:category, :key, :value, NOW(), :created_by...
php
protected function dbInsert($category, $key, $value) { $created_by = \Yii::$app->user->getId(); $this->getDb()->createCommand(' INSERT INTO {{setting}} (`category`, `key`, `value`, `created_at`, `created_by`) VALUES (:category, :key, :value, NOW(), :created_by...
[ "protected", "function", "dbInsert", "(", "$", "category", ",", "$", "key", ",", "$", "value", ")", "{", "$", "created_by", "=", "\\", "Yii", "::", "$", "app", "->", "user", "->", "getId", "(", ")", ";", "$", "this", "->", "getDb", "(", ")", "->"...
Stores settings in database @param string $category Category name @param string $key Setting key @param string $value Setting value @throws \yii\db\Exception
[ "Stores", "settings", "in", "database" ]
b601b58809322f617273093766dc28c08e74d566
https://github.com/rafalkot/yii2-settings/blob/b601b58809322f617273093766dc28c08e74d566/Settings.php#L194-L203
24,319
rafalkot/yii2-settings
Settings.php
Settings.dbUpdate
protected function dbUpdate($category, $key, $value) { $updated_by = \Yii::$app->user->getId(); $this->getDb()->createCommand(' UPDATE {{setting}} SET `value` = :value, `updated_at` = NOW(), `updated_by` = :updat...
php
protected function dbUpdate($category, $key, $value) { $updated_by = \Yii::$app->user->getId(); $this->getDb()->createCommand(' UPDATE {{setting}} SET `value` = :value, `updated_at` = NOW(), `updated_by` = :updat...
[ "protected", "function", "dbUpdate", "(", "$", "category", ",", "$", "key", ",", "$", "value", ")", "{", "$", "updated_by", "=", "\\", "Yii", "::", "$", "app", "->", "user", "->", "getId", "(", ")", ";", "$", "this", "->", "getDb", "(", ")", "->"...
Updates setting in database @param string $category Category name @param string $key Setting key @param string $value Setting value @throws \yii\db\Exception
[ "Updates", "setting", "in", "database" ]
b601b58809322f617273093766dc28c08e74d566
https://github.com/rafalkot/yii2-settings/blob/b601b58809322f617273093766dc28c08e74d566/Settings.php#L213-L227
24,320
rafalkot/yii2-settings
Settings.php
Settings.dbDelete
protected function dbDelete($category, $key = null) { if ($key === null) { $this->getDb()->createCommand(' DELETE FROM {{setting}} WHERE `category` = :category ', compact('category'))->execute(); } ...
php
protected function dbDelete($category, $key = null) { if ($key === null) { $this->getDb()->createCommand(' DELETE FROM {{setting}} WHERE `category` = :category ', compact('category'))->execute(); } ...
[ "protected", "function", "dbDelete", "(", "$", "category", ",", "$", "key", "=", "null", ")", "{", "if", "(", "$", "key", "===", "null", ")", "{", "$", "this", "->", "getDb", "(", ")", "->", "createCommand", "(", "'\n DELETE FROM\n ...
Deletes setting from database @param string|array $category Category name(s) @param string|array|null $key Setting key(s) or null to delete all values from category @throws \yii\db\Exception
[ "Deletes", "setting", "from", "database" ]
b601b58809322f617273093766dc28c08e74d566
https://github.com/rafalkot/yii2-settings/blob/b601b58809322f617273093766dc28c08e74d566/Settings.php#L236-L262
24,321
antaresproject/notifications
src/Repository/StackRepository.php
StackRepository.push
public function push($type, $name, $value) { $typeModel = NotificationTypes::where('name', $type)->first(); if (is_null($typeModel)) { return false; } $tId = $typeModel->id; $model = $this->makeModel()->getModel()->newInstance([ 'type_id' => $tId, ...
php
public function push($type, $name, $value) { $typeModel = NotificationTypes::where('name', $type)->first(); if (is_null($typeModel)) { return false; } $tId = $typeModel->id; $model = $this->makeModel()->getModel()->newInstance([ 'type_id' => $tId, ...
[ "public", "function", "push", "(", "$", "type", ",", "$", "name", ",", "$", "value", ")", "{", "$", "typeModel", "=", "NotificationTypes", "::", "where", "(", "'name'", ",", "$", "type", ")", "->", "first", "(", ")", ";", "if", "(", "is_null", "(",...
push notification to database @param String $type @param String $name @param array $value @return boolean
[ "push", "notification", "to", "database" ]
60de743477b7e9cbb51de66da5fd9461adc9dd8a
https://github.com/antaresproject/notifications/blob/60de743477b7e9cbb51de66da5fd9461adc9dd8a/src/Repository/StackRepository.php#L58-L72
24,322
antaresproject/notifications
src/Repository/StackRepository.php
StackRepository.findAllNew
public function findAllNew($ids = []) { $query = $model = $this->makeModel()->where('broadcasted', 0); if (!empty($ids)) { $values = array_values($ids); $query->whereNotIn('id', $values); } return $query->get(); }
php
public function findAllNew($ids = []) { $query = $model = $this->makeModel()->where('broadcasted', 0); if (!empty($ids)) { $values = array_values($ids); $query->whereNotIn('id', $values); } return $query->get(); }
[ "public", "function", "findAllNew", "(", "$", "ids", "=", "[", "]", ")", "{", "$", "query", "=", "$", "model", "=", "$", "this", "->", "makeModel", "(", ")", "->", "where", "(", "'broadcasted'", ",", "0", ")", ";", "if", "(", "!", "empty", "(", ...
finds all new notification messages @param array $ids @return \Illuminate\Database\Query\Builder
[ "finds", "all", "new", "notification", "messages" ]
60de743477b7e9cbb51de66da5fd9461adc9dd8a
https://github.com/antaresproject/notifications/blob/60de743477b7e9cbb51de66da5fd9461adc9dd8a/src/Repository/StackRepository.php#L80-L88
24,323
antaresproject/notifications
src/Repository/StackRepository.php
StackRepository.query
public function query() { $read = NotificationsStackRead::select(['stack_id']) ->withTrashed() ->where('user_id', user()->id) ->whereNotNull('deleted_at') ->pluck('stack_id'); return $this->makeModel()->newQuery() ...
php
public function query() { $read = NotificationsStackRead::select(['stack_id']) ->withTrashed() ->where('user_id', user()->id) ->whereNotNull('deleted_at') ->pluck('stack_id'); return $this->makeModel()->newQuery() ...
[ "public", "function", "query", "(", ")", "{", "$", "read", "=", "NotificationsStackRead", "::", "select", "(", "[", "'stack_id'", "]", ")", "->", "withTrashed", "(", ")", "->", "where", "(", "'user_id'", ",", "user", "(", ")", "->", "id", ")", "->", ...
Gets base query builder for notifications and alerts @return \Illuminate\Database\Query\Builder
[ "Gets", "base", "query", "builder", "for", "notifications", "and", "alerts" ]
60de743477b7e9cbb51de66da5fd9461adc9dd8a
https://github.com/antaresproject/notifications/blob/60de743477b7e9cbb51de66da5fd9461adc9dd8a/src/Repository/StackRepository.php#L115-L152
24,324
antaresproject/notifications
src/Repository/StackRepository.php
StackRepository.count
protected function count($builder) { $read = NotificationsStackRead::select(['stack_id'])->withTrashed()->where('user_id', user()->id)->pluck('stack_id'); return $builder->whereNotIn('id', $read)->count(); }
php
protected function count($builder) { $read = NotificationsStackRead::select(['stack_id'])->withTrashed()->where('user_id', user()->id)->pluck('stack_id'); return $builder->whereNotIn('id', $read)->count(); }
[ "protected", "function", "count", "(", "$", "builder", ")", "{", "$", "read", "=", "NotificationsStackRead", "::", "select", "(", "[", "'stack_id'", "]", ")", "->", "withTrashed", "(", ")", "->", "where", "(", "'user_id'", ",", "user", "(", ")", "->", ...
Assign counter query @param \Illuminate\Database\Query\Builder $builder @return \Illuminate\Database\Eloquent\Model
[ "Assign", "counter", "query" ]
60de743477b7e9cbb51de66da5fd9461adc9dd8a
https://github.com/antaresproject/notifications/blob/60de743477b7e9cbb51de66da5fd9461adc9dd8a/src/Repository/StackRepository.php#L184-L188
24,325
antaresproject/notifications
src/Repository/StackRepository.php
StackRepository.clear
public function clear($type = 'notifications') { $builder = ($type === 'alerts') ? $this->getAlerts() : $this->getNotifications(); return $this->makeModel() ->getModel() ->read() ->getModel() ->newQuery(...
php
public function clear($type = 'notifications') { $builder = ($type === 'alerts') ? $this->getAlerts() : $this->getNotifications(); return $this->makeModel() ->getModel() ->read() ->getModel() ->newQuery(...
[ "public", "function", "clear", "(", "$", "type", "=", "'notifications'", ")", "{", "$", "builder", "=", "(", "$", "type", "===", "'alerts'", ")", "?", "$", "this", "->", "getAlerts", "(", ")", ":", "$", "this", "->", "getNotifications", "(", ")", ";"...
Deletes all messages @param String $type @return boolean
[ "Deletes", "all", "messages" ]
60de743477b7e9cbb51de66da5fd9461adc9dd8a
https://github.com/antaresproject/notifications/blob/60de743477b7e9cbb51de66da5fd9461adc9dd8a/src/Repository/StackRepository.php#L209-L219
24,326
antaresproject/notifications
src/Repository/StackRepository.php
StackRepository.markAsRead
public function markAsRead($type = 'notifications') { DB::beginTransaction(); try { $builder = ($type === 'alerts') ? $this->getAlerts() : $this->getNotifications(); $read = NotificationsStackRead::select(['stack_id'])->withTrashed()->where('user_id', user()->id)->pluck('s...
php
public function markAsRead($type = 'notifications') { DB::beginTransaction(); try { $builder = ($type === 'alerts') ? $this->getAlerts() : $this->getNotifications(); $read = NotificationsStackRead::select(['stack_id'])->withTrashed()->where('user_id', user()->id)->pluck('s...
[ "public", "function", "markAsRead", "(", "$", "type", "=", "'notifications'", ")", "{", "DB", "::", "beginTransaction", "(", ")", ";", "try", "{", "$", "builder", "=", "(", "$", "type", "===", "'alerts'", ")", "?", "$", "this", "->", "getAlerts", "(", ...
Mark notifications or alerts as read @param String $type @return boolean
[ "Mark", "notifications", "or", "alerts", "as", "read" ]
60de743477b7e9cbb51de66da5fd9461adc9dd8a
https://github.com/antaresproject/notifications/blob/60de743477b7e9cbb51de66da5fd9461adc9dd8a/src/Repository/StackRepository.php#L227-L246
24,327
antaresproject/notifications
src/Repository/StackRepository.php
StackRepository.deleteById
public function deleteById($id) { $read = NotificationsStackRead::where([ 'stack_id' => $id, 'user_id' => user()->id ])->first(); if (!is_null($read)) { return $read->delete(); } return false; }
php
public function deleteById($id) { $read = NotificationsStackRead::where([ 'stack_id' => $id, 'user_id' => user()->id ])->first(); if (!is_null($read)) { return $read->delete(); } return false; }
[ "public", "function", "deleteById", "(", "$", "id", ")", "{", "$", "read", "=", "NotificationsStackRead", "::", "where", "(", "[", "'stack_id'", "=>", "$", "id", ",", "'user_id'", "=>", "user", "(", ")", "->", "id", "]", ")", "->", "first", "(", ")",...
Deletes item by id @param mixed $id @return boolean
[ "Deletes", "item", "by", "id" ]
60de743477b7e9cbb51de66da5fd9461adc9dd8a
https://github.com/antaresproject/notifications/blob/60de743477b7e9cbb51de66da5fd9461adc9dd8a/src/Repository/StackRepository.php#L254-L264
24,328
antaresproject/notifications
src/Repository/StackRepository.php
StackRepository.resolveJsonCastableColumns
protected function resolveJsonCastableColumns(&$log) { foreach ($log as $name => $value) { if (!is_array($value)) { continue; } $log[$name] = json_encode($value); } return $log; }
php
protected function resolveJsonCastableColumns(&$log) { foreach ($log as $name => $value) { if (!is_array($value)) { continue; } $log[$name] = json_encode($value); } return $log; }
[ "protected", "function", "resolveJsonCastableColumns", "(", "&", "$", "log", ")", "{", "foreach", "(", "$", "log", "as", "$", "name", "=>", "$", "value", ")", "{", "if", "(", "!", "is_array", "(", "$", "value", ")", ")", "{", "continue", ";", "}", ...
Resolves json castable columns @return array
[ "Resolves", "json", "castable", "columns" ]
60de743477b7e9cbb51de66da5fd9461adc9dd8a
https://github.com/antaresproject/notifications/blob/60de743477b7e9cbb51de66da5fd9461adc9dd8a/src/Repository/StackRepository.php#L312-L321
24,329
antaresproject/notifications
src/Repository/StackRepository.php
StackRepository.fetchOne
public function fetchOne(int $id): Builder { return $this->makeModel()->newQuery()->withoutGlobalScopes()->distinct() ->select(['tbl_notifications_stack.*'])->with('content')->with('content.lang')->with('notification.type') ->where(function ($query) { ...
php
public function fetchOne(int $id): Builder { return $this->makeModel()->newQuery()->withoutGlobalScopes()->distinct() ->select(['tbl_notifications_stack.*'])->with('content')->with('content.lang')->with('notification.type') ->where(function ($query) { ...
[ "public", "function", "fetchOne", "(", "int", "$", "id", ")", ":", "Builder", "{", "return", "$", "this", "->", "makeModel", "(", ")", "->", "newQuery", "(", ")", "->", "withoutGlobalScopes", "(", ")", "->", "distinct", "(", ")", "->", "select", "(", ...
Fetch one stack item @param int $id @return Builder
[ "Fetch", "one", "stack", "item" ]
60de743477b7e9cbb51de66da5fd9461adc9dd8a
https://github.com/antaresproject/notifications/blob/60de743477b7e9cbb51de66da5fd9461adc9dd8a/src/Repository/StackRepository.php#L366-L379
24,330
Danzabar/config-builder
src/Data/Extracter.php
Extracter.load
public function load($file, $extension = 'json') { $this->file = $file; $this->extension = $extension; return $this; }
php
public function load($file, $extension = 'json') { $this->file = $file; $this->extension = $extension; return $this; }
[ "public", "function", "load", "(", "$", "file", ",", "$", "extension", "=", "'json'", ")", "{", "$", "this", "->", "file", "=", "$", "file", ";", "$", "this", "->", "extension", "=", "$", "extension", ";", "return", "$", "this", ";", "}" ]
Load the file details @param String $file @param String $extension @return Extracter @author Dan Cox
[ "Load", "the", "file", "details" ]
3b237be578172c32498bbcdfb360e69a6243739d
https://github.com/Danzabar/config-builder/blob/3b237be578172c32498bbcdfb360e69a6243739d/src/Data/Extracter.php#L65-L71
24,331
Danzabar/config-builder
src/Data/Extracter.php
Extracter.extract
public function extract() { $this->reader->read($this->file); $this->converter ->setExtension($this->extension) ->process($this->reader->getData()); }
php
public function extract() { $this->reader->read($this->file); $this->converter ->setExtension($this->extension) ->process($this->reader->getData()); }
[ "public", "function", "extract", "(", ")", "{", "$", "this", "->", "reader", "->", "read", "(", "$", "this", "->", "file", ")", ";", "$", "this", "->", "converter", "->", "setExtension", "(", "$", "this", "->", "extension", ")", "->", "process", "(",...
Extracts the raw data from the file for conversion @return Extracter @author Dan Cox
[ "Extracts", "the", "raw", "data", "from", "the", "file", "for", "conversion" ]
3b237be578172c32498bbcdfb360e69a6243739d
https://github.com/Danzabar/config-builder/blob/3b237be578172c32498bbcdfb360e69a6243739d/src/Data/Extracter.php#L79-L86
24,332
kouks/laravel-filters
src/Filters/Behavior/Orderable.php
Orderable.resolveOrder
protected function resolveOrder($column, $key) { $this->resolve($column, $key, $this->getTableName(), function ($query, $pattern) { $this->builder->orderBy($query, $pattern); }); }
php
protected function resolveOrder($column, $key) { $this->resolve($column, $key, $this->getTableName(), function ($query, $pattern) { $this->builder->orderBy($query, $pattern); }); }
[ "protected", "function", "resolveOrder", "(", "$", "column", ",", "$", "key", ")", "{", "$", "this", "->", "resolve", "(", "$", "column", ",", "$", "key", ",", "$", "this", "->", "getTableName", "(", ")", ",", "function", "(", "$", "query", ",", "$...
Recursively build up the order query. @param string $column @param string $key @return void
[ "Recursively", "build", "up", "the", "order", "query", "." ]
c1a594fd40173dcbb454ea7ec59818a919fff6bd
https://github.com/kouks/laravel-filters/blob/c1a594fd40173dcbb454ea7ec59818a919fff6bd/src/Filters/Behavior/Orderable.php#L30-L35
24,333
flextype-components/assets
Assets.php
Assets.add
public static function add(string $asset_type, string $asset, string $namespace, int $priority = 1) : void { Assets::$assets[$namespace][$asset_type][$priority][] = [ 'asset' => $asset ]; }
php
public static function add(string $asset_type, string $asset, string $namespace, int $priority = 1) : void { Assets::$assets[$namespace][$asset_type][$priority][] = [ 'asset' => $asset ]; }
[ "public", "static", "function", "add", "(", "string", "$", "asset_type", ",", "string", "$", "asset", ",", "string", "$", "namespace", ",", "int", "$", "priority", "=", "1", ")", ":", "void", "{", "Assets", "::", "$", "assets", "[", "$", "namespace", ...
Add new asset Assets::add('js', 'jquery.js', 'site', 1); Assets::add('js', 'site.js', 'site', 2); Assets::add('css', 'site.css', 'site', 1); Assets::add('css', 'theme.css', 'site', 2); @param string $asset_type @param string $asset @param string $namespace @param int $priority @return void
[ "Add", "new", "asset" ]
fd30d051ceff7491d1fd6dd67913e58c451df2f8
https://github.com/flextype-components/assets/blob/fd30d051ceff7491d1fd6dd67913e58c451df2f8/Assets.php#L38-L43
24,334
flextype-components/assets
Assets.php
Assets.get
public static function get(string $asset_type, string $namespace) : array { $assets = []; // is there some registered $assets for current $namespace ? if (isset(Assets::$assets[$namespace]) && isset(Assets::$assets[$namespace][$asset_type]) && count(Assets::$assets[$...
php
public static function get(string $asset_type, string $namespace) : array { $assets = []; // is there some registered $assets for current $namespace ? if (isset(Assets::$assets[$namespace]) && isset(Assets::$assets[$namespace][$asset_type]) && count(Assets::$assets[$...
[ "public", "static", "function", "get", "(", "string", "$", "asset_type", ",", "string", "$", "namespace", ")", ":", "array", "{", "$", "assets", "=", "[", "]", ";", "// is there some registered $assets for current $namespace ?", "if", "(", "isset", "(", "Assets"...
Get assets for current namespace and asset type $css = Assets::get('css', 'site'); $js = Assets::get('js', 'site'); @param string $asset_type @param string $namespace @return array
[ "Get", "assets", "for", "current", "namespace", "and", "asset", "type" ]
fd30d051ceff7491d1fd6dd67913e58c451df2f8
https://github.com/flextype-components/assets/blob/fd30d051ceff7491d1fd6dd67913e58c451df2f8/Assets.php#L55-L73
24,335
ekuiter/feature-php
FeaturePhp/Generator/TemplateGenerator.php
TemplateGenerator.getSpecification
protected function getSpecification($file, $settings, $artifact) { return fphp\Specification\TemplateSpecification::fromArrayAndSettings($file, $settings, $artifact); }
php
protected function getSpecification($file, $settings, $artifact) { return fphp\Specification\TemplateSpecification::fromArrayAndSettings($file, $settings, $artifact); }
[ "protected", "function", "getSpecification", "(", "$", "file", ",", "$", "settings", ",", "$", "artifact", ")", "{", "return", "fphp", "\\", "Specification", "\\", "TemplateSpecification", "::", "fromArrayAndSettings", "(", "$", "file", ",", "$", "settings", "...
Returns a template specification from a plain settings array. @param array $file a plain settings array @param Settings $settings the generator's settings @param \FeaturePhp\Artifact\Artifact $artifact the currently processed artifact @return \FeaturePhp\Specification\TemplateSpecification
[ "Returns", "a", "template", "specification", "from", "a", "plain", "settings", "array", "." ]
daf4a59098802fedcfd1f1a1d07847fcf2fea7bf
https://github.com/ekuiter/feature-php/blob/daf4a59098802fedcfd1f1a1d07847fcf2fea7bf/FeaturePhp/Generator/TemplateGenerator.php#L34-L36
24,336
Humanized/yii2-lookup
controllers/DefaultController.php
DefaultController.actionIndex
public function actionIndex($caller) { $model = new $this->modelClass(); if ($model->load(Yii::$app->request->post()) && $model->save()) { $model = new $this->modelClass(); } if (Yii::$app->request->post('hasEditable')) { $this->_update(); return; ...
php
public function actionIndex($caller) { $model = new $this->modelClass(); if ($model->load(Yii::$app->request->post()) && $model->save()) { $model = new $this->modelClass(); } if (Yii::$app->request->post('hasEditable')) { $this->_update(); return; ...
[ "public", "function", "actionIndex", "(", "$", "caller", ")", "{", "$", "model", "=", "new", "$", "this", "->", "modelClass", "(", ")", ";", "if", "(", "$", "model", "->", "load", "(", "Yii", "::", "$", "app", "->", "request", "->", "post", "(", ...
Single interface for all CRUD Operations. @return mixed
[ "Single", "interface", "for", "all", "CRUD", "Operations", "." ]
80982195cca9eb6f502e26fa1a27f72ed28ae25d
https://github.com/Humanized/yii2-lookup/blob/80982195cca9eb6f502e26fa1a27f72ed28ae25d/controllers/DefaultController.php#L50-L70
24,337
Humanized/yii2-lookup
controllers/DefaultController.php
DefaultController.actionDelete
public function actionDelete($caller, $id) { $this->findModel($id)->delete(); return $this->redirect(['index', 'caller' => $caller]); }
php
public function actionDelete($caller, $id) { $this->findModel($id)->delete(); return $this->redirect(['index', 'caller' => $caller]); }
[ "public", "function", "actionDelete", "(", "$", "caller", ",", "$", "id", ")", "{", "$", "this", "->", "findModel", "(", "$", "id", ")", "->", "delete", "(", ")", ";", "return", "$", "this", "->", "redirect", "(", "[", "'index'", ",", "'caller'", "...
Deletes an existing ArtifactType model. If deletion is successful, the browser will be redirected to the 'index' page. @param integer $id @return mixed
[ "Deletes", "an", "existing", "ArtifactType", "model", ".", "If", "deletion", "is", "successful", "the", "browser", "will", "be", "redirected", "to", "the", "index", "page", "." ]
80982195cca9eb6f502e26fa1a27f72ed28ae25d
https://github.com/Humanized/yii2-lookup/blob/80982195cca9eb6f502e26fa1a27f72ed28ae25d/controllers/DefaultController.php#L110-L114
24,338
Humanized/yii2-lookup
controllers/DefaultController.php
DefaultController.findModel
protected function findModel($id) { $class = $this->modelClass; if (($model = $class::findOne($id)) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }
php
protected function findModel($id) { $class = $this->modelClass; if (($model = $class::findOne($id)) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }
[ "protected", "function", "findModel", "(", "$", "id", ")", "{", "$", "class", "=", "$", "this", "->", "modelClass", ";", "if", "(", "(", "$", "model", "=", "$", "class", "::", "findOne", "(", "$", "id", ")", ")", "!==", "null", ")", "{", "return"...
Finds the ArtifactType model based on its primary key value. If the model is not found, a 404 HTTP exception will be thrown. @param integer $id @return ArtifactType the loaded model @throws NotFoundHttpException if the model cannot be found
[ "Finds", "the", "ArtifactType", "model", "based", "on", "its", "primary", "key", "value", ".", "If", "the", "model", "is", "not", "found", "a", "404", "HTTP", "exception", "will", "be", "thrown", "." ]
80982195cca9eb6f502e26fa1a27f72ed28ae25d
https://github.com/Humanized/yii2-lookup/blob/80982195cca9eb6f502e26fa1a27f72ed28ae25d/controllers/DefaultController.php#L123-L131
24,339
wenbinye/PhalconX
src/Db/Dialect/Mysql.php
Mysql.getColumnDefinition
public function getColumnDefinition(ColumnInterface $column) { $sql = parent::getColumnDefinition($column); if ($column instanceof Column && $column->getComment()) { $sql .= " COMMENT \"" . addcslashes($column->getComment(), '"') . "\""; } $def = $column->getDefault(); ...
php
public function getColumnDefinition(ColumnInterface $column) { $sql = parent::getColumnDefinition($column); if ($column instanceof Column && $column->getComment()) { $sql .= " COMMENT \"" . addcslashes($column->getComment(), '"') . "\""; } $def = $column->getDefault(); ...
[ "public", "function", "getColumnDefinition", "(", "ColumnInterface", "$", "column", ")", "{", "$", "sql", "=", "parent", "::", "getColumnDefinition", "(", "$", "column", ")", ";", "if", "(", "$", "column", "instanceof", "Column", "&&", "$", "column", "->", ...
supports comment and tinyint
[ "supports", "comment", "and", "tinyint" ]
0d2e1480e722dde56ccd23b2e8a5c8ac6ac2f8e1
https://github.com/wenbinye/PhalconX/blob/0d2e1480e722dde56ccd23b2e8a5c8ac6ac2f8e1/src/Db/Dialect/Mysql.php#L24-L40
24,340
Xety/Breadcrumbs
src/Breadcrumbs.php
Breadcrumbs.addBreadcrumbs
public function addBreadcrumbs(array $breadcrumbs = []) { foreach ($breadcrumbs as $breadcrumb) { $this->addCrumb( isset($breadcrumb['name']) ? $breadcrumb['name'] : '', isset($breadcrumb['href']) ? $breadcrumb['href'] : '' ); } return...
php
public function addBreadcrumbs(array $breadcrumbs = []) { foreach ($breadcrumbs as $breadcrumb) { $this->addCrumb( isset($breadcrumb['name']) ? $breadcrumb['name'] : '', isset($breadcrumb['href']) ? $breadcrumb['href'] : '' ); } return...
[ "public", "function", "addBreadcrumbs", "(", "array", "$", "breadcrumbs", "=", "[", "]", ")", "{", "foreach", "(", "$", "breadcrumbs", "as", "$", "breadcrumb", ")", "{", "$", "this", "->", "addCrumb", "(", "isset", "(", "$", "breadcrumb", "[", "'name'", ...
Add the breadcrumbs to the current list. @param array $breadcrumbs The breadcrumbs to add to the list. @throws \InvalidArgumentException When the breadcrumb is not well formated. @return \Xety\Breadcrumbs\Breadcrumbs
[ "Add", "the", "breadcrumbs", "to", "the", "current", "list", "." ]
aded39bdbf4f6e857f0154a810339d71897a94b0
https://github.com/Xety/Breadcrumbs/blob/aded39bdbf4f6e857f0154a810339d71897a94b0/src/Breadcrumbs.php#L81-L91
24,341
Xety/Breadcrumbs
src/Breadcrumbs.php
Breadcrumbs.addCrumb
public function addCrumb(string $name = '', string $href = ''): Breadcrumbs { $breadcrumb = [ 'name' => $name, 'href' => $href ]; if (!$this->validateCrumb($breadcrumb)) { throw new InvalidArgumentException( 'Breadcrumbs::addCrumb() only ac...
php
public function addCrumb(string $name = '', string $href = ''): Breadcrumbs { $breadcrumb = [ 'name' => $name, 'href' => $href ]; if (!$this->validateCrumb($breadcrumb)) { throw new InvalidArgumentException( 'Breadcrumbs::addCrumb() only ac...
[ "public", "function", "addCrumb", "(", "string", "$", "name", "=", "''", ",", "string", "$", "href", "=", "''", ")", ":", "Breadcrumbs", "{", "$", "breadcrumb", "=", "[", "'name'", "=>", "$", "name", ",", "'href'", "=>", "$", "href", "]", ";", "if"...
Add a crumb to the internal array. @param string $name The name of the crumb. @param string $href The link of the crumb. @return \Xety\Breadcrumbs\Breadcrumbs
[ "Add", "a", "crumb", "to", "the", "internal", "array", "." ]
aded39bdbf4f6e857f0154a810339d71897a94b0
https://github.com/Xety/Breadcrumbs/blob/aded39bdbf4f6e857f0154a810339d71897a94b0/src/Breadcrumbs.php#L101-L121
24,342
Xety/Breadcrumbs
src/Breadcrumbs.php
Breadcrumbs.firstFormated
public function firstFormated(): string { if ($this->isEmpty()) { return ''; } $crumb = reset($this->breadcrumbs); return $this->renderCrumb($crumb['name'], $crumb['href'], false, 1); }
php
public function firstFormated(): string { if ($this->isEmpty()) { return ''; } $crumb = reset($this->breadcrumbs); return $this->renderCrumb($crumb['name'], $crumb['href'], false, 1); }
[ "public", "function", "firstFormated", "(", ")", ":", "string", "{", "if", "(", "$", "this", "->", "isEmpty", "(", ")", ")", "{", "return", "''", ";", "}", "$", "crumb", "=", "reset", "(", "$", "this", "->", "breadcrumbs", ")", ";", "return", "$", ...
Get the first crumb formated as HTML. @return string
[ "Get", "the", "first", "crumb", "formated", "as", "HTML", "." ]
aded39bdbf4f6e857f0154a810339d71897a94b0
https://github.com/Xety/Breadcrumbs/blob/aded39bdbf4f6e857f0154a810339d71897a94b0/src/Breadcrumbs.php#L195-L204
24,343
Xety/Breadcrumbs
src/Breadcrumbs.php
Breadcrumbs.lastFormated
public function lastFormated(): string { if ($this->isEmpty()) { return ''; } $crumb = end($this->breadcrumbs); return $this->renderCrumb($crumb['name'], $crumb['href'], false, 1); }
php
public function lastFormated(): string { if ($this->isEmpty()) { return ''; } $crumb = end($this->breadcrumbs); return $this->renderCrumb($crumb['name'], $crumb['href'], false, 1); }
[ "public", "function", "lastFormated", "(", ")", ":", "string", "{", "if", "(", "$", "this", "->", "isEmpty", "(", ")", ")", "{", "return", "''", ";", "}", "$", "crumb", "=", "end", "(", "$", "this", "->", "breadcrumbs", ")", ";", "return", "$", "...
Get the last crumb formated as HTML. @return string
[ "Get", "the", "last", "crumb", "formated", "as", "HTML", "." ]
aded39bdbf4f6e857f0154a810339d71897a94b0
https://github.com/Xety/Breadcrumbs/blob/aded39bdbf4f6e857f0154a810339d71897a94b0/src/Breadcrumbs.php#L225-L234
24,344
Xety/Breadcrumbs
src/Breadcrumbs.php
Breadcrumbs.renderCrumb
protected function renderCrumb($name, $href, $isLast = false, $position = null): string { $positionAttribute = ''; if ($this->getOption('position')) { $positionAttribute = "data-position=\"{$position}\""; } if ($isLast) { $element = $this->getOption('listActi...
php
protected function renderCrumb($name, $href, $isLast = false, $position = null): string { $positionAttribute = ''; if ($this->getOption('position')) { $positionAttribute = "data-position=\"{$position}\""; } if ($isLast) { $element = $this->getOption('listActi...
[ "protected", "function", "renderCrumb", "(", "$", "name", ",", "$", "href", ",", "$", "isLast", "=", "false", ",", "$", "position", "=", "null", ")", ":", "string", "{", "$", "positionAttribute", "=", "''", ";", "if", "(", "$", "this", "->", "getOpti...
Render a crumb. @param string $name The text/HTML to render within the element. @param string $href The link of the crumb. @param bool $isLast Whether the crumb is the last item. @param number $position The current position of the crumb. @return string
[ "Render", "a", "crumb", "." ]
aded39bdbf4f6e857f0154a810339d71897a94b0
https://github.com/Xety/Breadcrumbs/blob/aded39bdbf4f6e857f0154a810339d71897a94b0/src/Breadcrumbs.php#L268-L295
24,345
Xety/Breadcrumbs
src/Breadcrumbs.php
Breadcrumbs.getClasses
protected function getClasses(string $option, string $separator = ' '): string { return implode($separator, $this->getOption($option)); }
php
protected function getClasses(string $option, string $separator = ' '): string { return implode($separator, $this->getOption($option)); }
[ "protected", "function", "getClasses", "(", "string", "$", "option", ",", "string", "$", "separator", "=", "' '", ")", ":", "string", "{", "return", "implode", "(", "$", "separator", ",", "$", "this", "->", "getOption", "(", "$", "option", ")", ")", ";...
Get the imploded classes for the given option. @param string $option The option where to get the classes from. @param string $separator The separator used by the implode function. @return string
[ "Get", "the", "imploded", "classes", "for", "the", "given", "option", "." ]
aded39bdbf4f6e857f0154a810339d71897a94b0
https://github.com/Xety/Breadcrumbs/blob/aded39bdbf4f6e857f0154a810339d71897a94b0/src/Breadcrumbs.php#L305-L308
24,346
Xety/Breadcrumbs
src/Breadcrumbs.php
Breadcrumbs.renderCrumbs
protected function renderCrumbs(): string { end($this->breadcrumbs); $lastKey = key($this->breadcrumbs); $output = ''; $position = 1; foreach ($this->breadcrumbs as $key => $crumb) { $isLast = ($lastKey === $key); $href = $crumb['href']; ...
php
protected function renderCrumbs(): string { end($this->breadcrumbs); $lastKey = key($this->breadcrumbs); $output = ''; $position = 1; foreach ($this->breadcrumbs as $key => $crumb) { $isLast = ($lastKey === $key); $href = $crumb['href']; ...
[ "protected", "function", "renderCrumbs", "(", ")", ":", "string", "{", "end", "(", "$", "this", "->", "breadcrumbs", ")", ";", "$", "lastKey", "=", "key", "(", "$", "this", "->", "breadcrumbs", ")", ";", "$", "output", "=", "''", ";", "$", "position"...
Renders the crumbs. @return string
[ "Renders", "the", "crumbs", "." ]
aded39bdbf4f6e857f0154a810339d71897a94b0
https://github.com/Xety/Breadcrumbs/blob/aded39bdbf4f6e857f0154a810339d71897a94b0/src/Breadcrumbs.php#L315-L339
24,347
Xety/Breadcrumbs
src/Breadcrumbs.php
Breadcrumbs.render
public function render(): string { if (empty($this->breadcrumbs)) { return ''; } $classes = $this->getClasses('listElementClasses'); $element = $this->getOption('listElement'); return "<{$element} class=\"{$classes}\">" . $this->renderCrumbs() . "</{$element}>";...
php
public function render(): string { if (empty($this->breadcrumbs)) { return ''; } $classes = $this->getClasses('listElementClasses'); $element = $this->getOption('listElement'); return "<{$element} class=\"{$classes}\">" . $this->renderCrumbs() . "</{$element}>";...
[ "public", "function", "render", "(", ")", ":", "string", "{", "if", "(", "empty", "(", "$", "this", "->", "breadcrumbs", ")", ")", "{", "return", "''", ";", "}", "$", "classes", "=", "$", "this", "->", "getClasses", "(", "'listElementClasses'", ")", ...
Renders the complete breadcrumbs into HTML. @return string
[ "Renders", "the", "complete", "breadcrumbs", "into", "HTML", "." ]
aded39bdbf4f6e857f0154a810339d71897a94b0
https://github.com/Xety/Breadcrumbs/blob/aded39bdbf4f6e857f0154a810339d71897a94b0/src/Breadcrumbs.php#L346-L356
24,348
qlake/framework
src/Qlake/Http/Header.php
Header.set
public function set($name, $value) { $this->data[$this->normalizeKey($name)] = $value; return $this; }
php
public function set($name, $value) { $this->data[$this->normalizeKey($name)] = $value; return $this; }
[ "public", "function", "set", "(", "$", "name", ",", "$", "value", ")", "{", "$", "this", "->", "data", "[", "$", "this", "->", "normalizeKey", "(", "$", "name", ")", "]", "=", "$", "value", ";", "return", "$", "this", ";", "}" ]
Set a HTTP header. @param string $name @param string $value @return Qlake\Http\Header
[ "Set", "a", "HTTP", "header", "." ]
0b7bad459ae0721bc5cdd141344f9dfc1acee28a
https://github.com/qlake/framework/blob/0b7bad459ae0721bc5cdd141344f9dfc1acee28a/src/Qlake/Http/Header.php#L48-L53
24,349
qlake/framework
src/Qlake/Http/Header.php
Header.normalizeKey
protected function normalizeKey($name) { $name = strtolower($name); $name = str_replace(array('-', '_'), ' ', $name); $name = preg_replace('#^http #', '', $name); $name = ucwords($name); $name = str_replace(' ', '-', $name); return $name; }
php
protected function normalizeKey($name) { $name = strtolower($name); $name = str_replace(array('-', '_'), ' ', $name); $name = preg_replace('#^http #', '', $name); $name = ucwords($name); $name = str_replace(' ', '-', $name); return $name; }
[ "protected", "function", "normalizeKey", "(", "$", "name", ")", "{", "$", "name", "=", "strtolower", "(", "$", "name", ")", ";", "$", "name", "=", "str_replace", "(", "array", "(", "'-'", ",", "'_'", ")", ",", "' '", ",", "$", "name", ")", ";", "...
Normalize HTTP header name. @param string $name @return string
[ "Normalize", "HTTP", "header", "name", "." ]
0b7bad459ae0721bc5cdd141344f9dfc1acee28a
https://github.com/qlake/framework/blob/0b7bad459ae0721bc5cdd141344f9dfc1acee28a/src/Qlake/Http/Header.php#L137-L146
24,350
webandco/neos-wireframe
Classes/Fusion/WireframeContentImplementation.php
WireframeContentImplementation.evaluate
public function evaluate() { $httpRequest = Request::createFromEnvironment(); /** @var UserInterfaceMode $mode */ $mode = $this->interfaceRenderModeService->findModeByCurrentUser(); /** @var integer $renderMode */ $renderMode = 0; switch (true) { case ...
php
public function evaluate() { $httpRequest = Request::createFromEnvironment(); /** @var UserInterfaceMode $mode */ $mode = $this->interfaceRenderModeService->findModeByCurrentUser(); /** @var integer $renderMode */ $renderMode = 0; switch (true) { case ...
[ "public", "function", "evaluate", "(", ")", "{", "$", "httpRequest", "=", "Request", "::", "createFromEnvironment", "(", ")", ";", "/** @var UserInterfaceMode $mode */", "$", "mode", "=", "$", "this", "->", "interfaceRenderModeService", "->", "findModeByCurrentUser", ...
Evaluate wireframe rendering mode @return integer
[ "Evaluate", "wireframe", "rendering", "mode" ]
b1dfd9bedee80001a9a0cf0f483d0261633d12cb
https://github.com/webandco/neos-wireframe/blob/b1dfd9bedee80001a9a0cf0f483d0261633d12cb/Classes/Fusion/WireframeContentImplementation.php#L30-L51
24,351
SporkCode/Spork
src/Mvc/Listener/Limit/Storage/Db.php
Db.setServiceLocator
public function setServiceLocator(ServiceLocatorInterface $serviceManager) { if (!$this->dbAdapter instanceof DbAdapter) { $this->dbAdapter = $serviceManager->getServiceLocator()->get($this->dbAdapter); } }
php
public function setServiceLocator(ServiceLocatorInterface $serviceManager) { if (!$this->dbAdapter instanceof DbAdapter) { $this->dbAdapter = $serviceManager->getServiceLocator()->get($this->dbAdapter); } }
[ "public", "function", "setServiceLocator", "(", "ServiceLocatorInterface", "$", "serviceManager", ")", "{", "if", "(", "!", "$", "this", "->", "dbAdapter", "instanceof", "DbAdapter", ")", "{", "$", "this", "->", "dbAdapter", "=", "$", "serviceManager", "->", "...
Use Service Manager to inject database adapter @see \Zend\ServiceManager\ServiceLocatorAwareInterface::setServiceLocator() @param ServiceLocatorInterface $serviceManager
[ "Use", "Service", "Manager", "to", "inject", "database", "adapter" ]
7f569efdc0ceb4a9c1c7a8b648b6a7ed50d2088a
https://github.com/SporkCode/Spork/blob/7f569efdc0ceb4a9c1c7a8b648b6a7ed50d2088a/src/Mvc/Listener/Limit/Storage/Db.php#L114-L119
24,352
SporkCode/Spork
src/Mvc/Listener/Limit/Storage/Db.php
Db.getCleanInterval
public function getCleanInterval() { if (!$this->cleanInterval instanceof DateInterval) { $this->cleanInterval = new DateInterval($this->cleanInterval); } return $this->cleanInterval; }
php
public function getCleanInterval() { if (!$this->cleanInterval instanceof DateInterval) { $this->cleanInterval = new DateInterval($this->cleanInterval); } return $this->cleanInterval; }
[ "public", "function", "getCleanInterval", "(", ")", "{", "if", "(", "!", "$", "this", "->", "cleanInterval", "instanceof", "DateInterval", ")", "{", "$", "this", "->", "cleanInterval", "=", "new", "DateInterval", "(", "$", "this", "->", "cleanInterval", ")",...
Get clean interval @return \Spork\DateTime\DateInterval
[ "Get", "clean", "interval" ]
7f569efdc0ceb4a9c1c7a8b648b6a7ed50d2088a
https://github.com/SporkCode/Spork/blob/7f569efdc0ceb4a9c1c7a8b648b6a7ed50d2088a/src/Mvc/Listener/Limit/Storage/Db.php#L157-L163
24,353
SporkCode/Spork
src/Mvc/Listener/Limit/Storage/Db.php
Db.increment
public function increment($ip, $type) { $this->assertReady(); $sql = sprintf("INSERT INTO %s SET %s=:type, %s=:ip", $this->dbAdapter->platform->quoteIdentifier($this->table), $this->dbAdapter->platform->quoteIdentifier($this->typeColumn), $this->dbAdapter...
php
public function increment($ip, $type) { $this->assertReady(); $sql = sprintf("INSERT INTO %s SET %s=:type, %s=:ip", $this->dbAdapter->platform->quoteIdentifier($this->table), $this->dbAdapter->platform->quoteIdentifier($this->typeColumn), $this->dbAdapter...
[ "public", "function", "increment", "(", "$", "ip", ",", "$", "type", ")", "{", "$", "this", "->", "assertReady", "(", ")", ";", "$", "sql", "=", "sprintf", "(", "\"INSERT INTO %s SET %s=:type, %s=:ip\"", ",", "$", "this", "->", "dbAdapter", "->", "platform...
Add record to database @see \Spork\Mvc\Listener\Limit\Storage\StorageInterface::increment() @param unknown $ip @param unknown $type
[ "Add", "record", "to", "database" ]
7f569efdc0ceb4a9c1c7a8b648b6a7ed50d2088a
https://github.com/SporkCode/Spork/blob/7f569efdc0ceb4a9c1c7a8b648b6a7ed50d2088a/src/Mvc/Listener/Limit/Storage/Db.php#L292-L307
24,354
SporkCode/Spork
src/Mvc/Listener/Limit/Storage/Db.php
Db.check
public function check($ip, Limit $limit) { $this->assertReady(); if ($this->cleanOnCheck) { $this->clean(); } $sql = sprintf("SELECT count(*) as count FROM %s WHERE %s=:ip AND %s=:type AND %s >= NOW() - INTERVAL %d SECOND", $this->dbAdapter->...
php
public function check($ip, Limit $limit) { $this->assertReady(); if ($this->cleanOnCheck) { $this->clean(); } $sql = sprintf("SELECT count(*) as count FROM %s WHERE %s=:ip AND %s=:type AND %s >= NOW() - INTERVAL %d SECOND", $this->dbAdapter->...
[ "public", "function", "check", "(", "$", "ip", ",", "Limit", "$", "limit", ")", "{", "$", "this", "->", "assertReady", "(", ")", ";", "if", "(", "$", "this", "->", "cleanOnCheck", ")", "{", "$", "this", "->", "clean", "(", ")", ";", "}", "$", "...
Check if the number or records in the database exceeds the set limit @see \Spork\Mvc\Listener\Limit\Storage\StorageInterface::check() @param string $ip @param Limit $limit @return boolean
[ "Check", "if", "the", "number", "or", "records", "in", "the", "database", "exceeds", "the", "set", "limit" ]
7f569efdc0ceb4a9c1c7a8b648b6a7ed50d2088a
https://github.com/SporkCode/Spork/blob/7f569efdc0ceb4a9c1c7a8b648b6a7ed50d2088a/src/Mvc/Listener/Limit/Storage/Db.php#L317-L340
24,355
SporkCode/Spork
src/Mvc/Listener/Limit/Storage/Db.php
Db.clean
public function clean() { $this->assertReady(); $sql = sprintf("DELETE FROM %s WHERE %s < NOW() - INTERVAL %d SECOND", $this->dbAdapter->platform->quoteIdentifier($this->table), $this->dbAdapter->platform->quoteIdentifier($this->timestampColumn), $this->g...
php
public function clean() { $this->assertReady(); $sql = sprintf("DELETE FROM %s WHERE %s < NOW() - INTERVAL %d SECOND", $this->dbAdapter->platform->quoteIdentifier($this->table), $this->dbAdapter->platform->quoteIdentifier($this->timestampColumn), $this->g...
[ "public", "function", "clean", "(", ")", "{", "$", "this", "->", "assertReady", "(", ")", ";", "$", "sql", "=", "sprintf", "(", "\"DELETE FROM %s WHERE %s < NOW() - INTERVAL %d SECOND\"", ",", "$", "this", "->", "dbAdapter", "->", "platform", "->", "quoteIdentif...
Remove expired records from database @see \Spork\Mvc\Listener\Limit\Storage\StorageInterface::clean()
[ "Remove", "expired", "records", "from", "database" ]
7f569efdc0ceb4a9c1c7a8b648b6a7ed50d2088a
https://github.com/SporkCode/Spork/blob/7f569efdc0ceb4a9c1c7a8b648b6a7ed50d2088a/src/Mvc/Listener/Limit/Storage/Db.php#L347-L357
24,356
newmythmedia/di
src/DI.php
DI.register
public function register($alias, $class) { $alias = strtolower($alias); if (array_key_exists($alias, $this->instances)) { throw new \RuntimeException('You cannot register a provider when an instance of that class has already been created.'); } $this->services[$alias] = $class; return $this; }
php
public function register($alias, $class) { $alias = strtolower($alias); if (array_key_exists($alias, $this->instances)) { throw new \RuntimeException('You cannot register a provider when an instance of that class has already been created.'); } $this->services[$alias] = $class; return $this; }
[ "public", "function", "register", "(", "$", "alias", ",", "$", "class", ")", "{", "$", "alias", "=", "strtolower", "(", "$", "alias", ")", ";", "if", "(", "array_key_exists", "(", "$", "alias", ",", "$", "this", "->", "instances", ")", ")", "{", "t...
Registers a specific class name with the corresponding alias for the dependency inversion. @param $name @param $class @return $this
[ "Registers", "a", "specific", "class", "name", "with", "the", "corresponding", "alias", "for", "the", "dependency", "inversion", "." ]
bc7397ea447de6a2d7564d7c95abf03f15e7756a
https://github.com/newmythmedia/di/blob/bc7397ea447de6a2d7564d7c95abf03f15e7756a/src/DI.php#L125-L137
24,357
newmythmedia/di
src/DI.php
DI.unregister
public function unregister($alias, $remove_instances=false) { $alias = strtolower($alias); if ($remove_instances && array_key_exists($alias, $this->instances)) { $this->instances[$alias] = null; unset($this->instances[$alias]); } unset($this->services[$alias]); return $this; }
php
public function unregister($alias, $remove_instances=false) { $alias = strtolower($alias); if ($remove_instances && array_key_exists($alias, $this->instances)) { $this->instances[$alias] = null; unset($this->instances[$alias]); } unset($this->services[$alias]); return $this; }
[ "public", "function", "unregister", "(", "$", "alias", ",", "$", "remove_instances", "=", "false", ")", "{", "$", "alias", "=", "strtolower", "(", "$", "alias", ")", ";", "if", "(", "$", "remove_instances", "&&", "array_key_exists", "(", "$", "alias", ",...
Unregisters a single service provider. If an instance of that provider has already been created, it will be destroyed. @param $alias @return $this
[ "Unregisters", "a", "single", "service", "provider", ".", "If", "an", "instance", "of", "that", "provider", "has", "already", "been", "created", "it", "will", "be", "destroyed", "." ]
bc7397ea447de6a2d7564d7c95abf03f15e7756a
https://github.com/newmythmedia/di/blob/bc7397ea447de6a2d7564d7c95abf03f15e7756a/src/DI.php#L149-L162
24,358
newmythmedia/di
src/DI.php
DI.saveInstance
public function saveInstance($alias, &$class) { $alias = strtolower($alias); if (array_key_exists($alias, $this->instances)) { unset($this->instances[$alias]); } $this->instances[$alias] = $class; return $this; }
php
public function saveInstance($alias, &$class) { $alias = strtolower($alias); if (array_key_exists($alias, $this->instances)) { unset($this->instances[$alias]); } $this->instances[$alias] = $class; return $this; }
[ "public", "function", "saveInstance", "(", "$", "alias", ",", "&", "$", "class", ")", "{", "$", "alias", "=", "strtolower", "(", "$", "alias", ")", ";", "if", "(", "array_key_exists", "(", "$", "alias", ",", "$", "this", "->", "instances", ")", ")", ...
Registers an instantiated class as a Service Provider. todo Register savedInstance class with the services array. @param $alias @param $class @return $this
[ "Registers", "an", "instantiated", "class", "as", "a", "Service", "Provider", "." ]
bc7397ea447de6a2d7564d7c95abf03f15e7756a
https://github.com/newmythmedia/di/blob/bc7397ea447de6a2d7564d7c95abf03f15e7756a/src/DI.php#L176-L188
24,359
newmythmedia/di
src/DI.php
DI.single
public function single($alias) { $alias = strtolower($alias); // Return the existing object if it exists. if (! empty($this->instances[$alias]) && is_object($this->instances[$alias])) { return $this->instances[$alias]; } // Die if we don't know what class to use. if (empty($this->services[$alias])) ...
php
public function single($alias) { $alias = strtolower($alias); // Return the existing object if it exists. if (! empty($this->instances[$alias]) && is_object($this->instances[$alias])) { return $this->instances[$alias]; } // Die if we don't know what class to use. if (empty($this->services[$alias])) ...
[ "public", "function", "single", "(", "$", "alias", ")", "{", "$", "alias", "=", "strtolower", "(", "$", "alias", ")", ";", "// Return the existing object if it exists.", "if", "(", "!", "empty", "(", "$", "this", "->", "instances", "[", "$", "alias", "]", ...
Allows you to create a new instance of an object as a singleton, passing in arguments. @param $alias @return mixed
[ "Allows", "you", "to", "create", "a", "new", "instance", "of", "an", "object", "as", "a", "singleton", "passing", "in", "arguments", "." ]
bc7397ea447de6a2d7564d7c95abf03f15e7756a
https://github.com/newmythmedia/di/blob/bc7397ea447de6a2d7564d7c95abf03f15e7756a/src/DI.php#L242-L263
24,360
newmythmedia/di
src/DI.php
DI.getParams
protected function getParams(\ReflectionMethod $mirror, $single=false) { $params = []; foreach ($mirror->getParameters() as $param) { $alias = strtolower($param->name); // Is this a mapped alias? if (! empty($this->services[$alias])) { $params[] = $single ? $this->single($alias) : $this->make($...
php
protected function getParams(\ReflectionMethod $mirror, $single=false) { $params = []; foreach ($mirror->getParameters() as $param) { $alias = strtolower($param->name); // Is this a mapped alias? if (! empty($this->services[$alias])) { $params[] = $single ? $this->single($alias) : $this->make($...
[ "protected", "function", "getParams", "(", "\\", "ReflectionMethod", "$", "mirror", ",", "$", "single", "=", "false", ")", "{", "$", "params", "=", "[", "]", ";", "foreach", "(", "$", "mirror", "->", "getParameters", "(", ")", "as", "$", "param", ")", ...
Given a reflection method, will get or create an array of objects ready to be inserted into the class' constructor. If $single is true, will return a singleton version of dependencies else will create a new class. @param \ReflectionMethod $mirror @param bool $single @return array
[ "Given", "a", "reflection", "method", "will", "get", "or", "create", "an", "array", "of", "objects", "ready", "to", "be", "inserted", "into", "the", "class", "constructor", "." ]
bc7397ea447de6a2d7564d7c95abf03f15e7756a
https://github.com/newmythmedia/di/blob/bc7397ea447de6a2d7564d7c95abf03f15e7756a/src/DI.php#L406-L433
24,361
SporkCode/Spork
src/CSS/AbstractCompiler.php
AbstractCompiler.compile
public function compile($source, $destination = null, $include = null) { $include = array_merge($this->includes, (array) $include); $useCache = null == $destination && null !== $this->cache; if ($useCache) { if ($this->cache->hasItem($source)) { ...
php
public function compile($source, $destination = null, $include = null) { $include = array_merge($this->includes, (array) $include); $useCache = null == $destination && null !== $this->cache; if ($useCache) { if ($this->cache->hasItem($source)) { ...
[ "public", "function", "compile", "(", "$", "source", ",", "$", "destination", "=", "null", ",", "$", "include", "=", "null", ")", "{", "$", "include", "=", "array_merge", "(", "$", "this", "->", "includes", ",", "(", "array", ")", "$", "include", ")"...
Compile to file. If destination is not specified return CSS. @param string $source @param string|null $destination @param array|string|null $include Include path(s) to use @throws \Exception on compilation error @return string Compiled CSS
[ "Compile", "to", "file", ".", "If", "destination", "is", "not", "specified", "return", "CSS", "." ]
7f569efdc0ceb4a9c1c7a8b648b6a7ed50d2088a
https://github.com/SporkCode/Spork/blob/7f569efdc0ceb4a9c1c7a8b648b6a7ed50d2088a/src/CSS/AbstractCompiler.php#L91-L122
24,362
SporkCode/Spork
src/CSS/AbstractCompiler.php
AbstractCompiler.setCache
public function setCache($cache) { if (is_string($cache) && class_exists($cache)) { $cache = new $cache(); } if (is_array($cache)) { $cache = StorageFactory::factory($cache); } if (!$cache instanceof AbstractCacheAdapter) { ...
php
public function setCache($cache) { if (is_string($cache) && class_exists($cache)) { $cache = new $cache(); } if (is_array($cache)) { $cache = StorageFactory::factory($cache); } if (!$cache instanceof AbstractCacheAdapter) { ...
[ "public", "function", "setCache", "(", "$", "cache", ")", "{", "if", "(", "is_string", "(", "$", "cache", ")", "&&", "class_exists", "(", "$", "cache", ")", ")", "{", "$", "cache", "=", "new", "$", "cache", "(", ")", ";", "}", "if", "(", "is_arra...
Set cache for CSS Preprocessor Cache parameter can be an instance of \Zend\Cache\Storage\Adapter\AbstractAdapter, the name of a cache adapter class or an array of options to be passed to AbstractAdapter::factory() @param string|array|\Zend\Cache\Storage\Adapter\AbstractAdapter $cache @throws \Exception on invalid cac...
[ "Set", "cache", "for", "CSS", "Preprocessor" ]
7f569efdc0ceb4a9c1c7a8b648b6a7ed50d2088a
https://github.com/SporkCode/Spork/blob/7f569efdc0ceb4a9c1c7a8b648b6a7ed50d2088a/src/CSS/AbstractCompiler.php#L162-L177
24,363
SporkCode/Spork
src/CSS/AbstractCompiler.php
AbstractCompiler.getOptions
protected function getOptions(ServiceLocatorInterface $services, $key) { $appConfig = $services->get('config'); $options = array_key_exists($key, $appConfig) ? $appConfig[$key] : array(); if (array_key_exists('cache', $options) && is_string($options['cache']) ...
php
protected function getOptions(ServiceLocatorInterface $services, $key) { $appConfig = $services->get('config'); $options = array_key_exists($key, $appConfig) ? $appConfig[$key] : array(); if (array_key_exists('cache', $options) && is_string($options['cache']) ...
[ "protected", "function", "getOptions", "(", "ServiceLocatorInterface", "$", "services", ",", "$", "key", ")", "{", "$", "appConfig", "=", "$", "services", "->", "get", "(", "'config'", ")", ";", "$", "options", "=", "array_key_exists", "(", "$", "key", ","...
Get options from application configuration @param ServiceLocatorInterface $services @param string $key @return array
[ "Get", "options", "from", "application", "configuration" ]
7f569efdc0ceb4a9c1c7a8b648b6a7ed50d2088a
https://github.com/SporkCode/Spork/blob/7f569efdc0ceb4a9c1c7a8b648b6a7ed50d2088a/src/CSS/AbstractCompiler.php#L322-L332
24,364
cartalyst/assetic-filters
src/UriRewriteFilter.php
UriRewriteFilter.realPath
protected function realPath($path) { if (php_sapi_name() == 'cli' && ! $path) { $path = $_SERVER['DOCUMENT_ROOT']; } if ($realPath = realpath($path)) { $path = $realPath; } return rtrim($path, '/\\'); }
php
protected function realPath($path) { if (php_sapi_name() == 'cli' && ! $path) { $path = $_SERVER['DOCUMENT_ROOT']; } if ($realPath = realpath($path)) { $path = $realPath; } return rtrim($path, '/\\'); }
[ "protected", "function", "realPath", "(", "$", "path", ")", "{", "if", "(", "php_sapi_name", "(", ")", "==", "'cli'", "&&", "!", "$", "path", ")", "{", "$", "path", "=", "$", "_SERVER", "[", "'DOCUMENT_ROOT'", "]", ";", "}", "if", "(", "$", "realPa...
Takes a path and transforms it to a real path. @param string $path @return string
[ "Takes", "a", "path", "and", "transforms", "it", "to", "a", "real", "path", "." ]
5e26328f7e46937bf1daa0bee2f744ab3493f471
https://github.com/cartalyst/assetic-filters/blob/5e26328f7e46937bf1daa0bee2f744ab3493f471/src/UriRewriteFilter.php#L165-L176
24,365
kenphp/ken
src/Log/Logger.php
Logger.applyConfig
private function applyConfig($config) { try { if (isset($config['enabledLevels'])) { $this->setEnabledLevels($config['enabledLevels']); } else { $this->setEnabledLevels(['error', 'warning']); } if (isset($config['flushIntervals...
php
private function applyConfig($config) { try { if (isset($config['enabledLevels'])) { $this->setEnabledLevels($config['enabledLevels']); } else { $this->setEnabledLevels(['error', 'warning']); } if (isset($config['flushIntervals...
[ "private", "function", "applyConfig", "(", "$", "config", ")", "{", "try", "{", "if", "(", "isset", "(", "$", "config", "[", "'enabledLevels'", "]", ")", ")", "{", "$", "this", "->", "setEnabledLevels", "(", "$", "config", "[", "'enabledLevels'", "]", ...
Applies log configuration @param array $config
[ "Applies", "log", "configuration" ]
c454a86f0ab55c52c88e9bff5bc6fb4e7bd9e0eb
https://github.com/kenphp/ken/blob/c454a86f0ab55c52c88e9bff5bc6fb4e7bd9e0eb/src/Log/Logger.php#L51-L79
24,366
kenphp/ken
src/Log/Logger.php
Logger.setEnabledLevels
public function setEnabledLevels(array $levels) { $enabledLevels = array(); foreach ($levels as $value) { if ($this->validLevel($value)) { array_push($enabledLevels, $value); } } $this->_enabledLevels = $enabledLevels; }
php
public function setEnabledLevels(array $levels) { $enabledLevels = array(); foreach ($levels as $value) { if ($this->validLevel($value)) { array_push($enabledLevels, $value); } } $this->_enabledLevels = $enabledLevels; }
[ "public", "function", "setEnabledLevels", "(", "array", "$", "levels", ")", "{", "$", "enabledLevels", "=", "array", "(", ")", ";", "foreach", "(", "$", "levels", "as", "$", "value", ")", "{", "if", "(", "$", "this", "->", "validLevel", "(", "$", "va...
Sets enabled logging levels. @param array $levels
[ "Sets", "enabled", "logging", "levels", "." ]
c454a86f0ab55c52c88e9bff5bc6fb4e7bd9e0eb
https://github.com/kenphp/ken/blob/c454a86f0ab55c52c88e9bff5bc6fb4e7bd9e0eb/src/Log/Logger.php#L173-L184
24,367
netvlies/NetvliesFormBundle
Twig/Extension/FormExtension.php
FormExtension.showForm
public function showForm($id) { $form = $this->container->get('netvlies.form')->get($id); if ($form->getSuccess()) { return $this->container->get('templating')->render('NetvliesFormBundle:Twig:form_success.html.twig', array( 'successMessage' => $form->getSuccessMessage()...
php
public function showForm($id) { $form = $this->container->get('netvlies.form')->get($id); if ($form->getSuccess()) { return $this->container->get('templating')->render('NetvliesFormBundle:Twig:form_success.html.twig', array( 'successMessage' => $form->getSuccessMessage()...
[ "public", "function", "showForm", "(", "$", "id", ")", "{", "$", "form", "=", "$", "this", "->", "container", "->", "get", "(", "'netvlies.form'", ")", "->", "get", "(", "$", "id", ")", ";", "if", "(", "$", "form", "->", "getSuccess", "(", ")", "...
Twig function that displays the form with the requested ID. If the form post was successful, the success message is shown by the Twig renderer. @param $id @return mixed
[ "Twig", "function", "that", "displays", "the", "form", "with", "the", "requested", "ID", ".", "If", "the", "form", "post", "was", "successful", "the", "success", "message", "is", "shown", "by", "the", "Twig", "renderer", "." ]
93f9a3321d9925040111374e7c1014a6400a2d08
https://github.com/netvlies/NetvliesFormBundle/blob/93f9a3321d9925040111374e7c1014a6400a2d08/Twig/Extension/FormExtension.php#L51-L70
24,368
Duffleman/json-client
src/Collections/Generic.php
Generic.all
public function all() { $attributes = $this->attributes; return array_map(function ($item) { if (is_object($item) && get_class($item) === Generic::class) { $item = $item->all(); } return $item; }, $attributes); }
php
public function all() { $attributes = $this->attributes; return array_map(function ($item) { if (is_object($item) && get_class($item) === Generic::class) { $item = $item->all(); } return $item; }, $attributes); }
[ "public", "function", "all", "(", ")", "{", "$", "attributes", "=", "$", "this", "->", "attributes", ";", "return", "array_map", "(", "function", "(", "$", "item", ")", "{", "if", "(", "is_object", "(", "$", "item", ")", "&&", "get_class", "(", "$", ...
Return the base attribute array. @return array
[ "Return", "the", "base", "attribute", "array", "." ]
83432875a000e79243424a1e8676acb9969d0c18
https://github.com/Duffleman/json-client/blob/83432875a000e79243424a1e8676acb9969d0c18/src/Collections/Generic.php#L80-L91
24,369
wenbinye/PhalconX
src/Queue/Beanstalk.php
Beanstalk.ignore
public function ignore($tube) { $this->write('ignore ' . $tube); $response = $this->readStatus(); if ($response[0] != "WATCHING") { return false; } return $response[1]; }
php
public function ignore($tube) { $this->write('ignore ' . $tube); $response = $this->readStatus(); if ($response[0] != "WATCHING") { return false; } return $response[1]; }
[ "public", "function", "ignore", "(", "$", "tube", ")", "{", "$", "this", "->", "write", "(", "'ignore '", ".", "$", "tube", ")", ";", "$", "response", "=", "$", "this", "->", "readStatus", "(", ")", ";", "if", "(", "$", "response", "[", "0", "]",...
Ignores the tube
[ "Ignores", "the", "tube" ]
0d2e1480e722dde56ccd23b2e8a5c8ac6ac2f8e1
https://github.com/wenbinye/PhalconX/blob/0d2e1480e722dde56ccd23b2e8a5c8ac6ac2f8e1/src/Queue/Beanstalk.php#L51-L59
24,370
wenbinye/PhalconX
src/Queue/Beanstalk.php
Beanstalk.put
public function put($job, $options = null) { if ($job instanceof JobInterface) { if ($job->isRunOnce()) { $cacheKey = self::CACHE_JOB . get_class($job); if ($this->getCache()->get($cacheKey) === null) { $expire = $job->getDelay() + $job->getTtr...
php
public function put($job, $options = null) { if ($job instanceof JobInterface) { if ($job->isRunOnce()) { $cacheKey = self::CACHE_JOB . get_class($job); if ($this->getCache()->get($cacheKey) === null) { $expire = $job->getDelay() + $job->getTtr...
[ "public", "function", "put", "(", "$", "job", ",", "$", "options", "=", "null", ")", "{", "if", "(", "$", "job", "instanceof", "JobInterface", ")", "{", "if", "(", "$", "job", "->", "isRunOnce", "(", ")", ")", "{", "$", "cacheKey", "=", "self", "...
Inserts jobs into the queue @param mixed $job JobInterface or any data @param array options
[ "Inserts", "jobs", "into", "the", "queue" ]
0d2e1480e722dde56ccd23b2e8a5c8ac6ac2f8e1
https://github.com/wenbinye/PhalconX/blob/0d2e1480e722dde56ccd23b2e8a5c8ac6ac2f8e1/src/Queue/Beanstalk.php#L75-L95
24,371
wenbinye/PhalconX
src/Queue/Beanstalk.php
Beanstalk.delete
public function delete(JobInterface $job) { if ($job->isRunOnce()) { $this->getCache()->delete(self::CACHE_JOB.get_class($job)); } return $job->getBeanstalkJob()->delete(); }
php
public function delete(JobInterface $job) { if ($job->isRunOnce()) { $this->getCache()->delete(self::CACHE_JOB.get_class($job)); } return $job->getBeanstalkJob()->delete(); }
[ "public", "function", "delete", "(", "JobInterface", "$", "job", ")", "{", "if", "(", "$", "job", "->", "isRunOnce", "(", ")", ")", "{", "$", "this", "->", "getCache", "(", ")", "->", "delete", "(", "self", "::", "CACHE_JOB", ".", "get_class", "(", ...
deletes job from queue @var JobInterface $job
[ "deletes", "job", "from", "queue" ]
0d2e1480e722dde56ccd23b2e8a5c8ac6ac2f8e1
https://github.com/wenbinye/PhalconX/blob/0d2e1480e722dde56ccd23b2e8a5c8ac6ac2f8e1/src/Queue/Beanstalk.php#L102-L108
24,372
phergie/phergie-irc-generator
src/Generator.php
Generator.getIrcMessage
protected function getIrcMessage($type, array $params = array()) { $message = ''; if ($this->prefix) { $message .= ':' . $this->prefix . ' '; } $message .= $type; $params = array_filter($params, function($param) { return $param !== null; }); ...
php
protected function getIrcMessage($type, array $params = array()) { $message = ''; if ($this->prefix) { $message .= ':' . $this->prefix . ' '; } $message .= $type; $params = array_filter($params, function($param) { return $param !== null; }); ...
[ "protected", "function", "getIrcMessage", "(", "$", "type", ",", "array", "$", "params", "=", "array", "(", ")", ")", "{", "$", "message", "=", "''", ";", "if", "(", "$", "this", "->", "prefix", ")", "{", "$", "message", ".=", "':'", ".", "$", "t...
Returns a formatted IRC message. @param string $type Command or response code @param array $params Optional message parameters @return string
[ "Returns", "a", "formatted", "IRC", "message", "." ]
8e7871f6d4e6c0f409a7912fb967e6cf2ead4ed8
https://github.com/phergie/phergie-irc-generator/blob/8e7871f6d4e6c0f409a7912fb967e6cf2ead4ed8/src/Generator.php#L45-L64
24,373
phergie/phergie-irc-generator
src/Generator.php
Generator.ircUser
public function ircUser($username, $hostname, $servername, $realname) { return $this->getIrcMessage('USER', array($username, $hostname, $servername, $realname)); }
php
public function ircUser($username, $hostname, $servername, $realname) { return $this->getIrcMessage('USER', array($username, $hostname, $servername, $realname)); }
[ "public", "function", "ircUser", "(", "$", "username", ",", "$", "hostname", ",", "$", "servername", ",", "$", "realname", ")", "{", "return", "$", "this", "->", "getIrcMessage", "(", "'USER'", ",", "array", "(", "$", "username", ",", "$", "hostname", ...
Returns a USER message. @param string $username @param string $hostname @param string $servername @param string $realname @return string
[ "Returns", "a", "USER", "message", "." ]
8e7871f6d4e6c0f409a7912fb967e6cf2ead4ed8
https://github.com/phergie/phergie-irc-generator/blob/8e7871f6d4e6c0f409a7912fb967e6cf2ead4ed8/src/Generator.php#L98-L101
24,374
phergie/phergie-irc-generator
src/Generator.php
Generator.ircMode
public function ircMode($target, $mode = null, $param = null) { return $this->getIrcMessage('MODE', array($target, $mode, $param)); }
php
public function ircMode($target, $mode = null, $param = null) { return $this->getIrcMessage('MODE', array($target, $mode, $param)); }
[ "public", "function", "ircMode", "(", "$", "target", ",", "$", "mode", "=", "null", ",", "$", "param", "=", "null", ")", "{", "return", "$", "this", "->", "getIrcMessage", "(", "'MODE'", ",", "array", "(", "$", "target", ",", "$", "mode", ",", "$",...
Returns a MODE message. @param string $target @param string|null $mode @param string|null $param @return string
[ "Returns", "a", "MODE", "message", "." ]
8e7871f6d4e6c0f409a7912fb967e6cf2ead4ed8
https://github.com/phergie/phergie-irc-generator/blob/8e7871f6d4e6c0f409a7912fb967e6cf2ead4ed8/src/Generator.php#L183-L186
24,375
phergie/phergie-irc-generator
src/Generator.php
Generator.ircKick
public function ircKick($channel, $user, $comment = null) { return $this->getIrcMessage('KICK', array($channel, $user, $comment)); }
php
public function ircKick($channel, $user, $comment = null) { return $this->getIrcMessage('KICK', array($channel, $user, $comment)); }
[ "public", "function", "ircKick", "(", "$", "channel", ",", "$", "user", ",", "$", "comment", "=", "null", ")", "{", "return", "$", "this", "->", "getIrcMessage", "(", "'KICK'", ",", "array", "(", "$", "channel", ",", "$", "user", ",", "$", "comment",...
Returns a KICK message. @param string $channel @param string $user @param string $comment @return string
[ "Returns", "a", "KICK", "message", "." ]
8e7871f6d4e6c0f409a7912fb967e6cf2ead4ed8
https://github.com/phergie/phergie-irc-generator/blob/8e7871f6d4e6c0f409a7912fb967e6cf2ead4ed8/src/Generator.php#L243-L246
24,376
phergie/phergie-irc-generator
src/Generator.php
Generator.ircConnect
public function ircConnect($targetserver, $port = null, $remoteserver = null) { return $this->getIrcMessage('CONNECT', array($targetserver, $port, $remoteserver)); }
php
public function ircConnect($targetserver, $port = null, $remoteserver = null) { return $this->getIrcMessage('CONNECT', array($targetserver, $port, $remoteserver)); }
[ "public", "function", "ircConnect", "(", "$", "targetserver", ",", "$", "port", "=", "null", ",", "$", "remoteserver", "=", "null", ")", "{", "return", "$", "this", "->", "getIrcMessage", "(", "'CONNECT'", ",", "array", "(", "$", "targetserver", ",", "$"...
Returns a CONNECT message. @param string $targetserver @param int $port @param string $remoteserver @return string
[ "Returns", "a", "CONNECT", "message", "." ]
8e7871f6d4e6c0f409a7912fb967e6cf2ead4ed8
https://github.com/phergie/phergie-irc-generator/blob/8e7871f6d4e6c0f409a7912fb967e6cf2ead4ed8/src/Generator.php#L306-L309
24,377
phergie/phergie-irc-generator
src/Generator.php
Generator.ircWhowas
public function ircWhowas($nickname, $count = null, $server = null) { return $this->getIrcMessage('WHOWAS', array($nickname, $count, $server)); }
php
public function ircWhowas($nickname, $count = null, $server = null) { return $this->getIrcMessage('WHOWAS', array($nickname, $count, $server)); }
[ "public", "function", "ircWhowas", "(", "$", "nickname", ",", "$", "count", "=", "null", ",", "$", "server", "=", "null", ")", "{", "return", "$", "this", "->", "getIrcMessage", "(", "'WHOWAS'", ",", "array", "(", "$", "nickname", ",", "$", "count", ...
Returns a WHOWAS message. @param string $nickname @param int $count @param string $server @return string
[ "Returns", "a", "WHOWAS", "message", "." ]
8e7871f6d4e6c0f409a7912fb967e6cf2ead4ed8
https://github.com/phergie/phergie-irc-generator/blob/8e7871f6d4e6c0f409a7912fb967e6cf2ead4ed8/src/Generator.php#L400-L403
24,378
phergie/phergie-irc-generator
src/Generator.php
Generator.ctcpVersionResponse
public function ctcpVersionResponse($nickname, $name, $version, $environment) { return $this->getCtcpResponse($nickname, 'VERSION ' . $name . ':' . $version . ':' . $environment); }
php
public function ctcpVersionResponse($nickname, $name, $version, $environment) { return $this->getCtcpResponse($nickname, 'VERSION ' . $name . ':' . $version . ':' . $environment); }
[ "public", "function", "ctcpVersionResponse", "(", "$", "nickname", ",", "$", "name", ",", "$", "version", ",", "$", "environment", ")", "{", "return", "$", "this", "->", "getCtcpResponse", "(", "$", "nickname", ",", "'VERSION '", ".", "$", "name", ".", "...
Returns a CTCP VERSION reply message. @param string $nickname @param string $name @param string $version @param string $environment @return string
[ "Returns", "a", "CTCP", "VERSION", "reply", "message", "." ]
8e7871f6d4e6c0f409a7912fb967e6cf2ead4ed8
https://github.com/phergie/phergie-irc-generator/blob/8e7871f6d4e6c0f409a7912fb967e6cf2ead4ed8/src/Generator.php#L621-L624
24,379
phergie/phergie-irc-generator
src/Generator.php
Generator.ctcpSourceResponse
public function ctcpSourceResponse($nickname, $host, $directories, $files) { return $this->getCtcpResponse($nickname, 'SOURCE ' . $host . ':' . $directories . ':' . $files); }
php
public function ctcpSourceResponse($nickname, $host, $directories, $files) { return $this->getCtcpResponse($nickname, 'SOURCE ' . $host . ':' . $directories . ':' . $files); }
[ "public", "function", "ctcpSourceResponse", "(", "$", "nickname", ",", "$", "host", ",", "$", "directories", ",", "$", "files", ")", "{", "return", "$", "this", "->", "getCtcpResponse", "(", "$", "nickname", ",", "'SOURCE '", ".", "$", "host", ".", "':'"...
Returns a CTCP SOURCE reply message. @param string $nickname @param string $host @param string $directories @param string $files @return string
[ "Returns", "a", "CTCP", "SOURCE", "reply", "message", "." ]
8e7871f6d4e6c0f409a7912fb967e6cf2ead4ed8
https://github.com/phergie/phergie-irc-generator/blob/8e7871f6d4e6c0f409a7912fb967e6cf2ead4ed8/src/Generator.php#L646-L649
24,380
GrupaZero/api
src/Gzero/Api/ServiceProvider.php
ServiceProvider.bind
private function bind() { $this->app->bind( 'League\Fractal\Manager', function () { $manager = new Manager(); $manager->setSerializer(new ArraySerializer()); return $manager; } ); }
php
private function bind() { $this->app->bind( 'League\Fractal\Manager', function () { $manager = new Manager(); $manager->setSerializer(new ArraySerializer()); return $manager; } ); }
[ "private", "function", "bind", "(", ")", "{", "$", "this", "->", "app", "->", "bind", "(", "'League\\Fractal\\Manager'", ",", "function", "(", ")", "{", "$", "manager", "=", "new", "Manager", "(", ")", ";", "$", "manager", "->", "setSerializer", "(", "...
Bind additional classes @return void
[ "Bind", "additional", "classes" ]
fc544bb6057274e9d5e7b617346c3f854ea5effd
https://github.com/GrupaZero/api/blob/fc544bb6057274e9d5e7b617346c3f854ea5effd/src/Gzero/Api/ServiceProvider.php#L81-L91
24,381
42mate/towel
src/Towel/Migration/BaseMigration.php
BaseMigration.setDone
public function setDone() { $migration = $this->getMigration(); if ($migration['state']) { return true; //alredy done } $this->db()->update($this->table, array('state' => true), array('id' => $migration['id'])); }
php
public function setDone() { $migration = $this->getMigration(); if ($migration['state']) { return true; //alredy done } $this->db()->update($this->table, array('state' => true), array('id' => $migration['id'])); }
[ "public", "function", "setDone", "(", ")", "{", "$", "migration", "=", "$", "this", "->", "getMigration", "(", ")", ";", "if", "(", "$", "migration", "[", "'state'", "]", ")", "{", "return", "true", ";", "//alredy done", "}", "$", "this", "->", "db",...
Sets that the migration was done. @return bool
[ "Sets", "that", "the", "migration", "was", "done", "." ]
5316c3075fc844e8a5cbae113712b26556227dff
https://github.com/42mate/towel/blob/5316c3075fc844e8a5cbae113712b26556227dff/src/Towel/Migration/BaseMigration.php#L79-L85
24,382
42mate/towel
src/Towel/Migration/BaseMigration.php
BaseMigration.unsetDone
public function unsetDone() { $migration = $this->getMigration(); if (!$migration['state']) { return true; //alredy undone } $this->db()->update($this->table, array('state' => false), array('id' => $migration['id'])); }
php
public function unsetDone() { $migration = $this->getMigration(); if (!$migration['state']) { return true; //alredy undone } $this->db()->update($this->table, array('state' => false), array('id' => $migration['id'])); }
[ "public", "function", "unsetDone", "(", ")", "{", "$", "migration", "=", "$", "this", "->", "getMigration", "(", ")", ";", "if", "(", "!", "$", "migration", "[", "'state'", "]", ")", "{", "return", "true", ";", "//alredy undone", "}", "$", "this", "-...
Sets that the migration was reverted. @return bool
[ "Sets", "that", "the", "migration", "was", "reverted", "." ]
5316c3075fc844e8a5cbae113712b26556227dff
https://github.com/42mate/towel/blob/5316c3075fc844e8a5cbae113712b26556227dff/src/Towel/Migration/BaseMigration.php#L92-L98
24,383
42mate/towel
src/Towel/Migration/BaseMigration.php
BaseMigration.create
public function create() { $migration = $this->getMessages(); if (!$migration) { $this->db()->insert($this->table, array('migration' => get_class($this), 'state' => false)); } else { throw new \Exception('Migration ' . get_class($this) . ' already created'); } ...
php
public function create() { $migration = $this->getMessages(); if (!$migration) { $this->db()->insert($this->table, array('migration' => get_class($this), 'state' => false)); } else { throw new \Exception('Migration ' . get_class($this) . ' already created'); } ...
[ "public", "function", "create", "(", ")", "{", "$", "migration", "=", "$", "this", "->", "getMessages", "(", ")", ";", "if", "(", "!", "$", "migration", ")", "{", "$", "this", "->", "db", "(", ")", "->", "insert", "(", "$", "this", "->", "table",...
Creates the record in the database of the migration. @throws \Exception
[ "Creates", "the", "record", "in", "the", "database", "of", "the", "migration", "." ]
5316c3075fc844e8a5cbae113712b26556227dff
https://github.com/42mate/towel/blob/5316c3075fc844e8a5cbae113712b26556227dff/src/Towel/Migration/BaseMigration.php#L105-L112
24,384
42mate/towel
src/Towel/Migration/BaseMigration.php
BaseMigration.getMigration
public function getMigration() { $query = $this->db()->createQueryBuilder() ->select('m.*') ->from($this->table, 'm') ->where('migration = ?') ->setParameter(0, get_class($this)); $results = $query->execute(); $migration = $results->fetch(); if (!...
php
public function getMigration() { $query = $this->db()->createQueryBuilder() ->select('m.*') ->from($this->table, 'm') ->where('migration = ?') ->setParameter(0, get_class($this)); $results = $query->execute(); $migration = $results->fetch(); if (!...
[ "public", "function", "getMigration", "(", ")", "{", "$", "query", "=", "$", "this", "->", "db", "(", ")", "->", "createQueryBuilder", "(", ")", "->", "select", "(", "'m.*'", ")", "->", "from", "(", "$", "this", "->", "table", ",", "'m'", ")", "->"...
Gets the information in the DB of this migration. @return mixed
[ "Gets", "the", "information", "in", "the", "DB", "of", "this", "migration", "." ]
5316c3075fc844e8a5cbae113712b26556227dff
https://github.com/42mate/towel/blob/5316c3075fc844e8a5cbae113712b26556227dff/src/Towel/Migration/BaseMigration.php#L118-L133
24,385
42mate/towel
src/Towel/Migration/BaseMigration.php
BaseMigration.addMessage
public function addMessage($message) { $migrationName = get_class($this); $this->messages[] = sprintf("%s: %s\n", $migrationName, $message); }
php
public function addMessage($message) { $migrationName = get_class($this); $this->messages[] = sprintf("%s: %s\n", $migrationName, $message); }
[ "public", "function", "addMessage", "(", "$", "message", ")", "{", "$", "migrationName", "=", "get_class", "(", "$", "this", ")", ";", "$", "this", "->", "messages", "[", "]", "=", "sprintf", "(", "\"%s: %s\\n\"", ",", "$", "migrationName", ",", "$", ...
Adds messages in the migration for later use.
[ "Adds", "messages", "in", "the", "migration", "for", "later", "use", "." ]
5316c3075fc844e8a5cbae113712b26556227dff
https://github.com/42mate/towel/blob/5316c3075fc844e8a5cbae113712b26556227dff/src/Towel/Migration/BaseMigration.php#L138-L141
24,386
rhosocial/yii2-user
models/LoginMethod/ID.php
ID.validate
public static function validate($attribute) { $userClass = Yii::$app->user->identityClass; $regex = $userClass::$idRegex; $result = preg_match($regex, $attribute); return is_int($result) && $result > 0; }
php
public static function validate($attribute) { $userClass = Yii::$app->user->identityClass; $regex = $userClass::$idRegex; $result = preg_match($regex, $attribute); return is_int($result) && $result > 0; }
[ "public", "static", "function", "validate", "(", "$", "attribute", ")", "{", "$", "userClass", "=", "Yii", "::", "$", "app", "->", "user", "->", "identityClass", ";", "$", "regex", "=", "$", "userClass", "::", "$", "idRegex", ";", "$", "result", "=", ...
Validate whether the attribute is valid. @param mixed $attribute @return bool
[ "Validate", "whether", "the", "attribute", "is", "valid", "." ]
96737a9d8ca7e9c42cd2b7736d6c0a90ede6e5bc
https://github.com/rhosocial/yii2-user/blob/96737a9d8ca7e9c42cd2b7736d6c0a90ede6e5bc/models/LoginMethod/ID.php#L44-L50
24,387
arndtteunissen/column-layout
Classes/User/Tca.php
Tca.generateSelectItems
public function generateSelectItems(array &$params) { $pageUid = $params['flexParentDatabaseRow']['_tx_column_layout_orig_pid'] ?? $params['flexParentDatabaseRow']['pid']; $size = $params['config']['txColumnLayout']['size']; $type = $params['config']['txColumnLayout']['type']; $colu...
php
public function generateSelectItems(array &$params) { $pageUid = $params['flexParentDatabaseRow']['_tx_column_layout_orig_pid'] ?? $params['flexParentDatabaseRow']['pid']; $size = $params['config']['txColumnLayout']['size']; $type = $params['config']['txColumnLayout']['type']; $colu...
[ "public", "function", "generateSelectItems", "(", "array", "&", "$", "params", ")", "{", "$", "pageUid", "=", "$", "params", "[", "'flexParentDatabaseRow'", "]", "[", "'_tx_column_layout_orig_pid'", "]", "??", "$", "params", "[", "'flexParentDatabaseRow'", "]", ...
Generates select items for the gridsystem flexform @param array $params @throws Exception when size or type was not defined
[ "Generates", "select", "items", "for", "the", "gridsystem", "flexform" ]
ad737068eef3b084d4d0e3a48e6a3d8277af9560
https://github.com/arndtteunissen/column-layout/blob/ad737068eef3b084d4d0e3a48e6a3d8277af9560/Classes/User/Tca.php#L26-L62
24,388
bit3archive/php-remote-objects
src/RemoteObjects/Encode/AesEncoder.php
AesEncoder.getCryptAes
protected function getCryptAes() { if ($this->aes === null) { $this->aes = new \Crypt_AES(); $this->aes->setKey($this->psk); } return $this->aes; }
php
protected function getCryptAes() { if ($this->aes === null) { $this->aes = new \Crypt_AES(); $this->aes->setKey($this->psk); } return $this->aes; }
[ "protected", "function", "getCryptAes", "(", ")", "{", "if", "(", "$", "this", "->", "aes", "===", "null", ")", "{", "$", "this", "->", "aes", "=", "new", "\\", "Crypt_AES", "(", ")", ";", "$", "this", "->", "aes", "->", "setKey", "(", "$", "this...
Get the crypt aes component. @return \Crypt_RSA
[ "Get", "the", "crypt", "aes", "component", "." ]
0a917cdb261d83b1e89bdbdce3627584823bff5f
https://github.com/bit3archive/php-remote-objects/blob/0a917cdb261d83b1e89bdbdce3627584823bff5f/src/RemoteObjects/Encode/AesEncoder.php#L69-L77
24,389
mslib/resource-proxy
Msl/ResourceProxy/Source/Imap.php
Imap.postParseUnitAction
public function postParseUnitAction($uniqueId, $success = true) { // Setting parsed message flag to SEEN $result = new ParseResult(); try { if ($success) { $this->storage->setFlags($uniqueId, array(ZendStorage::FLAG_SEEN)); } else { $th...
php
public function postParseUnitAction($uniqueId, $success = true) { // Setting parsed message flag to SEEN $result = new ParseResult(); try { if ($success) { $this->storage->setFlags($uniqueId, array(ZendStorage::FLAG_SEEN)); } else { $th...
[ "public", "function", "postParseUnitAction", "(", "$", "uniqueId", ",", "$", "success", "=", "true", ")", "{", "// Setting parsed message flag to SEEN", "$", "result", "=", "new", "ParseResult", "(", ")", ";", "try", "{", "if", "(", "$", "success", ")", "{",...
Action to be run after a single set of data retrieved from the remote source has been parsed. @param string $uniqueId Unique id of the single set to be treated (e.g. unique id of a message in a mail box) @param bool $success True if the data of a given resource have been downloaded and used correctly; false otherwi...
[ "Action", "to", "be", "run", "after", "a", "single", "set", "of", "data", "retrieved", "from", "the", "remote", "source", "has", "been", "parsed", "." ]
be3f8589753f738f5114443a3465f5e84aecd156
https://github.com/mslib/resource-proxy/blob/be3f8589753f738f5114443a3465f5e84aecd156/Msl/ResourceProxy/Source/Imap.php#L120-L138
24,390
snapwp/snap-blade
src/Blade_Strategy.php
Blade_Strategy.get_template_name
public function get_template_name($slug) { $slug = \str_replace( [ Config::get('theme.templates_directory') . '/', $this->blade->getFileExtension(), ], '', $slug ); if (\strpos($slug, 'views/') !== 0) { ...
php
public function get_template_name($slug) { $slug = \str_replace( [ Config::get('theme.templates_directory') . '/', $this->blade->getFileExtension(), ], '', $slug ); if (\strpos($slug, 'views/') !== 0) { ...
[ "public", "function", "get_template_name", "(", "$", "slug", ")", "{", "$", "slug", "=", "\\", "str_replace", "(", "[", "Config", "::", "get", "(", "'theme.templates_directory'", ")", ".", "'/'", ",", "$", "this", "->", "blade", "->", "getFileExtension", "...
Generate the template file name from the slug. @since 1.0.0 @param string $slug The slug for the generic template. @return string
[ "Generate", "the", "template", "file", "name", "from", "the", "slug", "." ]
41e004e93440f6b58638b64dc8d20cca4a0546fa
https://github.com/snapwp/snap-blade/blob/41e004e93440f6b58638b64dc8d20cca4a0546fa/src/Blade_Strategy.php#L87-L103
24,391
snapwp/snap-blade
src/Blade_Strategy.php
Blade_Strategy.add_default_data
private function add_default_data($data = []) { global $wp_query, $post; $data['wp_query'] = $wp_query; $data['post'] = &$post; $data['current_view'] = $this->current_view; $data['request'] = Request::get_root_instance(); $data['errors'] = Validation::$errors...
php
private function add_default_data($data = []) { global $wp_query, $post; $data['wp_query'] = $wp_query; $data['post'] = &$post; $data['current_view'] = $this->current_view; $data['request'] = Request::get_root_instance(); $data['errors'] = Validation::$errors...
[ "private", "function", "add_default_data", "(", "$", "data", "=", "[", "]", ")", "{", "global", "$", "wp_query", ",", "$", "post", ";", "$", "data", "[", "'wp_query'", "]", "=", "$", "wp_query", ";", "$", "data", "[", "'post'", "]", "=", "&", "$", ...
Add default data to template. @since 1.0.0 @param array $data Data array. @return array
[ "Add", "default", "data", "to", "template", "." ]
41e004e93440f6b58638b64dc8d20cca4a0546fa
https://github.com/snapwp/snap-blade/blob/41e004e93440f6b58638b64dc8d20cca4a0546fa/src/Blade_Strategy.php#L125-L136
24,392
DataDo/data
src/main/php/DataDo/Data/Parser/DefaultMethodNameParser.php
DefaultMethodNameParser.getTokens
private function getTokens($methodName) { preg_match_all('([A-Z_-][^A-Z_-]*)', $methodName, $rawTokens); $result = array(); $lastToken = null; $seenBy = false; foreach ($rawTokens[0] as $token) { $newToken = $this->getToken($token, $seenBy); if ($newT...
php
private function getTokens($methodName) { preg_match_all('([A-Z_-][^A-Z_-]*)', $methodName, $rawTokens); $result = array(); $lastToken = null; $seenBy = false; foreach ($rawTokens[0] as $token) { $newToken = $this->getToken($token, $seenBy); if ($newT...
[ "private", "function", "getTokens", "(", "$", "methodName", ")", "{", "preg_match_all", "(", "'([A-Z_-][^A-Z_-]*)'", ",", "$", "methodName", ",", "$", "rawTokens", ")", ";", "$", "result", "=", "array", "(", ")", ";", "$", "lastToken", "=", "null", ";", ...
Split the method name into tokens and parse them. @param $methodName string the method name @return Token[]
[ "Split", "the", "method", "name", "into", "tokens", "and", "parse", "them", "." ]
555b02a27755032fcd53e165b0674e81a68067c0
https://github.com/DataDo/data/blob/555b02a27755032fcd53e165b0674e81a68067c0/src/main/php/DataDo/Data/Parser/DefaultMethodNameParser.php#L50-L79
24,393
DataDo/data
src/main/php/DataDo/Data/Parser/DefaultMethodNameParser.php
DefaultMethodNameParser.getToken
private function getToken($token, &$hasSeenBy) { switch ($token) { case 'And': return new AndToken(); case 'Or': return new OrToken(); case 'By': case 'Where': $hasSeenBy = true; return new ByToke...
php
private function getToken($token, &$hasSeenBy) { switch ($token) { case 'And': return new AndToken(); case 'Or': return new OrToken(); case 'By': case 'Where': $hasSeenBy = true; return new ByToke...
[ "private", "function", "getToken", "(", "$", "token", ",", "&", "$", "hasSeenBy", ")", "{", "switch", "(", "$", "token", ")", "{", "case", "'And'", ":", "return", "new", "AndToken", "(", ")", ";", "case", "'Or'", ":", "return", "new", "OrToken", "(",...
Translate a token source to a token object. @param $token string the token source @return Token the token object
[ "Translate", "a", "token", "source", "to", "a", "token", "object", "." ]
555b02a27755032fcd53e165b0674e81a68067c0
https://github.com/DataDo/data/blob/555b02a27755032fcd53e165b0674e81a68067c0/src/main/php/DataDo/Data/Parser/DefaultMethodNameParser.php#L87-L115
24,394
byu-oit/byu-jwt-php
src/BYUJWT.php
BYUJWT.getWellKnown
public function getWellKnown() { $cached = $this->getCache('wellKnown'); if (!empty($cached)) { return $cached; } try { $response = $this->client->get($this->wellKnownUrl); } catch (RequestException $e) { $this->lastException = $e; ...
php
public function getWellKnown() { $cached = $this->getCache('wellKnown'); if (!empty($cached)) { return $cached; } try { $response = $this->client->get($this->wellKnownUrl); } catch (RequestException $e) { $this->lastException = $e; ...
[ "public", "function", "getWellKnown", "(", ")", "{", "$", "cached", "=", "$", "this", "->", "getCache", "(", "'wellKnown'", ")", ";", "if", "(", "!", "empty", "(", "$", "cached", ")", ")", "{", "return", "$", "cached", ";", "}", "try", "{", "$", ...
Get the response of the specified .well-known URL. @return object Parsed JSON response from the well known URL
[ "Get", "the", "response", "of", "the", "specified", ".", "well", "-", "known", "URL", "." ]
9e55be8928a2c4925176303c100caf293d6a2cf9
https://github.com/byu-oit/byu-jwt-php/blob/9e55be8928a2c4925176303c100caf293d6a2cf9/src/BYUJWT.php#L63-L85
24,395
byu-oit/byu-jwt-php
src/BYUJWT.php
BYUJWT.getPublicKey
public function getPublicKey() { $cached = $this->getCache('publicKey'); if (!empty($cached)) { return $cached; } $wellKnown = $this->getWellKnown(); if (empty($wellKnown->jwks_uri)) { return null; } try { $response = $thi...
php
public function getPublicKey() { $cached = $this->getCache('publicKey'); if (!empty($cached)) { return $cached; } $wellKnown = $this->getWellKnown(); if (empty($wellKnown->jwks_uri)) { return null; } try { $response = $thi...
[ "public", "function", "getPublicKey", "(", ")", "{", "$", "cached", "=", "$", "this", "->", "getCache", "(", "'publicKey'", ")", ";", "if", "(", "!", "empty", "(", "$", "cached", ")", ")", "{", "return", "$", "cached", ";", "}", "$", "wellKnown", "...
Get the public key of the current well-known URL @return string
[ "Get", "the", "public", "key", "of", "the", "current", "well", "-", "known", "URL" ]
9e55be8928a2c4925176303c100caf293d6a2cf9
https://github.com/byu-oit/byu-jwt-php/blob/9e55be8928a2c4925176303c100caf293d6a2cf9/src/BYUJWT.php#L92-L126
24,396
byu-oit/byu-jwt-php
src/BYUJWT.php
BYUJWT.validateJWT
public function validateJWT($jwt) { try { $decoded = $this->decode($jwt); return !empty($decoded); } catch (Exception $e) { //For simple true/false validation we don't throw exceptions; //just return false but store exception in case further ...
php
public function validateJWT($jwt) { try { $decoded = $this->decode($jwt); return !empty($decoded); } catch (Exception $e) { //For simple true/false validation we don't throw exceptions; //just return false but store exception in case further ...
[ "public", "function", "validateJWT", "(", "$", "jwt", ")", "{", "try", "{", "$", "decoded", "=", "$", "this", "->", "decode", "(", "$", "jwt", ")", ";", "return", "!", "empty", "(", "$", "decoded", ")", ";", "}", "catch", "(", "Exception", "$", "...
Check if a JWT is valid @param string $jwt JWT @return bool true if $jwt is a valid JWT, false if not
[ "Check", "if", "a", "JWT", "is", "valid" ]
9e55be8928a2c4925176303c100caf293d6a2cf9
https://github.com/byu-oit/byu-jwt-php/blob/9e55be8928a2c4925176303c100caf293d6a2cf9/src/BYUJWT.php#L135-L147
24,397
byu-oit/byu-jwt-php
src/BYUJWT.php
BYUJWT.decode
public function decode($jwt) { $wellKnown = $this->getWellKnown(); $key = $this->getPublicKey(); $decodedObject = JWT::decode( $jwt, $key, $wellKnown->id_token_signing_alg_values_supported ); //Firebase\JWT\JWT::decode does not verify that...
php
public function decode($jwt) { $wellKnown = $this->getWellKnown(); $key = $this->getPublicKey(); $decodedObject = JWT::decode( $jwt, $key, $wellKnown->id_token_signing_alg_values_supported ); //Firebase\JWT\JWT::decode does not verify that...
[ "public", "function", "decode", "(", "$", "jwt", ")", "{", "$", "wellKnown", "=", "$", "this", "->", "getWellKnown", "(", ")", ";", "$", "key", "=", "$", "this", "->", "getPublicKey", "(", ")", ";", "$", "decodedObject", "=", "JWT", "::", "decode", ...
Decode a JWT @param string $jwt JWT @return object decoded JWT @throws Exception Various exceptions for various problems with JWT (see Firebase\JWT\JWT::decode for details)
[ "Decode", "a", "JWT" ]
9e55be8928a2c4925176303c100caf293d6a2cf9
https://github.com/byu-oit/byu-jwt-php/blob/9e55be8928a2c4925176303c100caf293d6a2cf9/src/BYUJWT.php#L159-L188
24,398
byu-oit/byu-jwt-php
src/BYUJWT.php
BYUJWT.getCache
protected function getCache($key) { if (array_key_exists($key, $this->cache)) { return $this->cache[$key]; } return false; }
php
protected function getCache($key) { if (array_key_exists($key, $this->cache)) { return $this->cache[$key]; } return false; }
[ "protected", "function", "getCache", "(", "$", "key", ")", "{", "if", "(", "array_key_exists", "(", "$", "key", ",", "$", "this", "->", "cache", ")", ")", "{", "return", "$", "this", "->", "cache", "[", "$", "key", "]", ";", "}", "return", "false",...
Simple cache reader. Implemented as a function so that if you don't want caching, you can make a subclass that overrides this function and always returns false @param string $key Cache key @return various
[ "Simple", "cache", "reader", ".", "Implemented", "as", "a", "function", "so", "that", "if", "you", "don", "t", "want", "caching", "you", "can", "make", "a", "subclass", "that", "overrides", "this", "function", "and", "always", "returns", "false" ]
9e55be8928a2c4925176303c100caf293d6a2cf9
https://github.com/byu-oit/byu-jwt-php/blob/9e55be8928a2c4925176303c100caf293d6a2cf9/src/BYUJWT.php#L275-L281
24,399
Xety/Breadcrumbs
src/BreadcrumbsTrait.php
BreadcrumbsTrait.setDividerElement
public function setDividerElement(string $element): Breadcrumbs { $this->validateElement('allowedDividerElement', $element); $this->setOption('dividerElement', $element); return $this; }
php
public function setDividerElement(string $element): Breadcrumbs { $this->validateElement('allowedDividerElement', $element); $this->setOption('dividerElement', $element); return $this; }
[ "public", "function", "setDividerElement", "(", "string", "$", "element", ")", ":", "Breadcrumbs", "{", "$", "this", "->", "validateElement", "(", "'allowedDividerElement'", ",", "$", "element", ")", ";", "$", "this", "->", "setOption", "(", "'dividerElement'", ...
Set the divider list DOM Element. @param string $element The Element to set. @return \Xety\Breadcrumbs\Breadcrumbs
[ "Set", "the", "divider", "list", "DOM", "Element", "." ]
aded39bdbf4f6e857f0154a810339d71897a94b0
https://github.com/Xety/Breadcrumbs/blob/aded39bdbf4f6e857f0154a810339d71897a94b0/src/BreadcrumbsTrait.php#L80-L87