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
18,700
webforge-labs/psc-cms
lib/PHPWord/PHPWord/Style/TableFull.php
PHPWord_Style_TableFull.setBorderSize
public function setBorderSize($pValue = null) { $this->_borderTopSize = $pValue; $this->_borderLeftSize = $pValue; $this->_borderRightSize = $pValue; $this->_borderBottomSize = $pValue; $this->_borderInsideHSize = $pValue; $this->_borderInsideVSize = $pValue; }
php
public function setBorderSize($pValue = null) { $this->_borderTopSize = $pValue; $this->_borderLeftSize = $pValue; $this->_borderRightSize = $pValue; $this->_borderBottomSize = $pValue; $this->_borderInsideHSize = $pValue; $this->_borderInsideVSize = $pValue; }
[ "public", "function", "setBorderSize", "(", "$", "pValue", "=", "null", ")", "{", "$", "this", "->", "_borderTopSize", "=", "$", "pValue", ";", "$", "this", "->", "_borderLeftSize", "=", "$", "pValue", ";", "$", "this", "->", "_borderRightSize", "=", "$"...
Set TLRBVH Border Size @param int $pValue
[ "Set", "TLRBVH", "Border", "Size" ]
467bfa2547e6b4fa487d2d7f35fa6cc618dbc763
https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/PHPWord/PHPWord/Style/TableFull.php#L250-L257
18,701
webforge-labs/psc-cms
lib/PHPWord/PHPWord/Style/TableFull.php
PHPWord_Style_TableFull.getBorderSize
public function getBorderSize() { $t = $this->getBorderTopSize(); $l = $this->getBorderLeftSize(); $r = $this->getBorderRightSize(); $b = $this->getBorderBottomSize(); $h = $this->getBorderInsideHSize(); $v = $this->getBorderInsideVSize(); return array($t, $l, $r, $b, $h, $v); }
php
public function getBorderSize() { $t = $this->getBorderTopSize(); $l = $this->getBorderLeftSize(); $r = $this->getBorderRightSize(); $b = $this->getBorderBottomSize(); $h = $this->getBorderInsideHSize(); $v = $this->getBorderInsideVSize(); return array($t, $l, $r, $b, $h, $v); }
[ "public", "function", "getBorderSize", "(", ")", "{", "$", "t", "=", "$", "this", "->", "getBorderTopSize", "(", ")", ";", "$", "l", "=", "$", "this", "->", "getBorderLeftSize", "(", ")", ";", "$", "r", "=", "$", "this", "->", "getBorderRightSize", "...
Get TLRBVH Border Size @return array
[ "Get", "TLRBVH", "Border", "Size" ]
467bfa2547e6b4fa487d2d7f35fa6cc618dbc763
https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/PHPWord/PHPWord/Style/TableFull.php#L264-L273
18,702
webforge-labs/psc-cms
lib/PHPWord/PHPWord/Style/TableFull.php
PHPWord_Style_TableFull.getBorderColor
public function getBorderColor() { $t = $this->getBorderTopColor(); $l = $this->getBorderLeftColor(); $r = $this->getBorderRightColor(); $b = $this->getBorderBottomColor(); $h = $this->getBorderInsideHColor(); $v = $this->getBorderInsideVColor(); return array($t, $l, $r, $b, $h, $v); }
php
public function getBorderColor() { $t = $this->getBorderTopColor(); $l = $this->getBorderLeftColor(); $r = $this->getBorderRightColor(); $b = $this->getBorderBottomColor(); $h = $this->getBorderInsideHColor(); $v = $this->getBorderInsideVColor(); return array($t, $l, $r, $b, $h, $v); }
[ "public", "function", "getBorderColor", "(", ")", "{", "$", "t", "=", "$", "this", "->", "getBorderTopColor", "(", ")", ";", "$", "l", "=", "$", "this", "->", "getBorderLeftColor", "(", ")", ";", "$", "r", "=", "$", "this", "->", "getBorderRightColor",...
Get TLRB Border Color @return array
[ "Get", "TLRB", "Border", "Color" ]
467bfa2547e6b4fa487d2d7f35fa6cc618dbc763
https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/PHPWord/PHPWord/Style/TableFull.php#L292-L301
18,703
ClanCats/Core
src/classes/CCShipyard.php
CCShipyard.create
public static function create() { $arguments = func_get_args(); $name = array_shift( $arguments ); $class_name = "Core\\CCShipyard_".ucfirst( $name ); if ( !class_exists( $class_name ) ) { throw new CCException( "CCShipyard - invalid builder (".$name.") given." ); } $builder = new $class_n...
php
public static function create() { $arguments = func_get_args(); $name = array_shift( $arguments ); $class_name = "Core\\CCShipyard_".ucfirst( $name ); if ( !class_exists( $class_name ) ) { throw new CCException( "CCShipyard - invalid builder (".$name.") given." ); } $builder = new $class_n...
[ "public", "static", "function", "create", "(", ")", "{", "$", "arguments", "=", "func_get_args", "(", ")", ";", "$", "name", "=", "array_shift", "(", "$", "arguments", ")", ";", "$", "class_name", "=", "\"Core\\\\CCShipyard_\"", ".", "ucfirst", "(", "$", ...
Static call wrapper to require the right builder @param string $name @param array $arguments @return CCShipyard_Builder
[ "Static", "call", "wrapper", "to", "require", "the", "right", "builder" ]
9f6ec72c1a439de4b253d0223f1029f7f85b6ef8
https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/classes/CCShipyard.php#L21-L39
18,704
picamator/CacheManager
src/Operation/Search.php
Search.hasValidCacheItem
private function hasValidCacheItem(CacheItemInterface $cacheItem, array $fieldList) : bool { $data = $cacheItem->get(); if (is_null($data)) { return false; } $fieldDiff = array_diff($fieldList, array_keys($data)); return !$fieldDiff; }
php
private function hasValidCacheItem(CacheItemInterface $cacheItem, array $fieldList) : bool { $data = $cacheItem->get(); if (is_null($data)) { return false; } $fieldDiff = array_diff($fieldList, array_keys($data)); return !$fieldDiff; }
[ "private", "function", "hasValidCacheItem", "(", "CacheItemInterface", "$", "cacheItem", ",", "array", "$", "fieldList", ")", ":", "bool", "{", "$", "data", "=", "$", "cacheItem", "->", "get", "(", ")", ";", "if", "(", "is_null", "(", "$", "data", ")", ...
Has valid cache item. @param CacheItemInterface $cacheItem @param array $fieldList @return bool
[ "Has", "valid", "cache", "item", "." ]
5e5493910610b65ae31a362786d7963ba3e33806
https://github.com/picamator/CacheManager/blob/5e5493910610b65ae31a362786d7963ba3e33806/src/Operation/Search.php#L84-L94
18,705
picamator/CacheManager
src/Operation/Search.php
Search.getCacheItemGenerator
private function getCacheItemGenerator(SearchCriteriaInterface $searchCriteria) { try { foreach ($searchCriteria->getIdList() as $item) { $cacheKey = $this->keyGenerator->generate($item, $searchCriteria); yield $item => $this->cacheItemPool->getItem($cacheKey); ...
php
private function getCacheItemGenerator(SearchCriteriaInterface $searchCriteria) { try { foreach ($searchCriteria->getIdList() as $item) { $cacheKey = $this->keyGenerator->generate($item, $searchCriteria); yield $item => $this->cacheItemPool->getItem($cacheKey); ...
[ "private", "function", "getCacheItemGenerator", "(", "SearchCriteriaInterface", "$", "searchCriteria", ")", "{", "try", "{", "foreach", "(", "$", "searchCriteria", "->", "getIdList", "(", ")", "as", "$", "item", ")", "{", "$", "cacheKey", "=", "$", "this", "...
Retrieve cache data generator. @param SearchCriteriaInterface $searchCriteria @throws InvalidCacheKeyException @return void
[ "Retrieve", "cache", "data", "generator", "." ]
5e5493910610b65ae31a362786d7963ba3e33806
https://github.com/picamator/CacheManager/blob/5e5493910610b65ae31a362786d7963ba3e33806/src/Operation/Search.php#L105-L116
18,706
cohesion/cohesion-core
src/Structure/Factory/UtilityFactory.php
UtilityFactory.get
public function get($class) { if ($class instanceof ReflectionClass) { $reflection = $class; $class = $reflection->getName(); } if (isset($this->utils[$class])) { return $this->utils[$class]; } if (!isset($reflection)) { if (!class_...
php
public function get($class) { if ($class instanceof ReflectionClass) { $reflection = $class; $class = $reflection->getName(); } if (isset($this->utils[$class])) { return $this->utils[$class]; } if (!isset($reflection)) { if (!class_...
[ "public", "function", "get", "(", "$", "class", ")", "{", "if", "(", "$", "class", "instanceof", "ReflectionClass", ")", "{", "$", "reflection", "=", "$", "class", ";", "$", "class", "=", "$", "reflection", "->", "getName", "(", ")", ";", "}", "if", ...
Get a utility class @param mixed $class Either a string of the class name or an instance of a \ReflectionClass representing the utility to get @return mixed The utility matching the given class @throws InvalidClassException if either the utility class or the utility driver class doesn't exist @throws MissingConfigurat...
[ "Get", "a", "utility", "class" ]
c6352aef7336e06285f0943da68235dc45523998
https://github.com/cohesion/cohesion-core/blob/c6352aef7336e06285f0943da68235dc45523998/src/Structure/Factory/UtilityFactory.php#L25-L74
18,707
lmammino/e-foundation
src/Cart/Model/Cart.php
Cart.isExpired
public function isExpired() { if (null === $this->expiresAt) { return false; } $now = new \DateTime(); return $this->expiresAt < $now; }
php
public function isExpired() { if (null === $this->expiresAt) { return false; } $now = new \DateTime(); return $this->expiresAt < $now; }
[ "public", "function", "isExpired", "(", ")", "{", "if", "(", "null", "===", "$", "this", "->", "expiresAt", ")", "{", "return", "false", ";", "}", "$", "now", "=", "new", "\\", "DateTime", "(", ")", ";", "return", "$", "this", "->", "expiresAt", "<...
Checks whether the cart is expired or not. @return Boolean
[ "Checks", "whether", "the", "cart", "is", "expired", "or", "not", "." ]
198b7047d93eb11c9bc0c7ddf0bfa8229d42807a
https://github.com/lmammino/e-foundation/blob/198b7047d93eb11c9bc0c7ddf0bfa8229d42807a/src/Cart/Model/Cart.php#L146-L155
18,708
titon/db
src/Titon/Db/Query/BindingAware.php
BindingAware.addBinding
public function addBinding($field, $values) { if (!is_array($values)) { $values = [$values]; } foreach ($values as $value) { if ($value instanceof Predicate) { $this->resolvePredicate($value); } else if ($value instanceof SubQuery) { ...
php
public function addBinding($field, $values) { if (!is_array($values)) { $values = [$values]; } foreach ($values as $value) { if ($value instanceof Predicate) { $this->resolvePredicate($value); } else if ($value instanceof SubQuery) { ...
[ "public", "function", "addBinding", "(", "$", "field", ",", "$", "values", ")", "{", "if", "(", "!", "is_array", "(", "$", "values", ")", ")", "{", "$", "values", "=", "[", "$", "values", "]", ";", "}", "foreach", "(", "$", "values", "as", "$", ...
Add a value to use in SQL parameter binding. @param string $field @param mixed $values @return $this
[ "Add", "a", "value", "to", "use", "in", "SQL", "parameter", "binding", "." ]
fbc5159d1ce9d2139759c9367565986981485604
https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Query/BindingAware.php#L32-L53
18,709
titon/db
src/Titon/Db/Query/BindingAware.php
BindingAware.resolvePredicate
public function resolvePredicate(Predicate $predicate) { $this->_bindings = array_merge($this->_bindings, $predicate->getBindings()); return $this; }
php
public function resolvePredicate(Predicate $predicate) { $this->_bindings = array_merge($this->_bindings, $predicate->getBindings()); return $this; }
[ "public", "function", "resolvePredicate", "(", "Predicate", "$", "predicate", ")", "{", "$", "this", "->", "_bindings", "=", "array_merge", "(", "$", "this", "->", "_bindings", ",", "$", "predicate", "->", "getBindings", "(", ")", ")", ";", "return", "$", ...
Merge an external predicates bindings with the current bindings. @param \Titon\Db\Query\Predicate $predicate @return $this
[ "Merge", "an", "external", "predicates", "bindings", "with", "the", "current", "bindings", "." ]
fbc5159d1ce9d2139759c9367565986981485604
https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Query/BindingAware.php#L70-L74
18,710
titon/db
src/Titon/Db/Query/BindingAware.php
BindingAware.resolveSubQuery
public function resolveSubQuery(SubQuery $query) { foreach ($query->getGroupedBindings() as $bindings) { $this->_bindings = array_merge($this->_bindings, $bindings); } return $this; }
php
public function resolveSubQuery(SubQuery $query) { foreach ($query->getGroupedBindings() as $bindings) { $this->_bindings = array_merge($this->_bindings, $bindings); } return $this; }
[ "public", "function", "resolveSubQuery", "(", "SubQuery", "$", "query", ")", "{", "foreach", "(", "$", "query", "->", "getGroupedBindings", "(", ")", "as", "$", "bindings", ")", "{", "$", "this", "->", "_bindings", "=", "array_merge", "(", "$", "this", "...
Merge an external sub-queries bindings with the current bindings. @param \Titon\Db\Query\SubQuery $query @return $this
[ "Merge", "an", "external", "sub", "-", "queries", "bindings", "with", "the", "current", "bindings", "." ]
fbc5159d1ce9d2139759c9367565986981485604
https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Query/BindingAware.php#L82-L88
18,711
simple-php-mvc/simple-php-mvc
src/MVC/Injection/Extension.php
Extension.getRootDirModule
public function getRootDirModule() { $r = new \ReflectionObject($this); $injectionDir = str_replace('\\', '/', dirname($r->getFileName())); return $injectionDir . '/..'; }
php
public function getRootDirModule() { $r = new \ReflectionObject($this); $injectionDir = str_replace('\\', '/', dirname($r->getFileName())); return $injectionDir . '/..'; }
[ "public", "function", "getRootDirModule", "(", ")", "{", "$", "r", "=", "new", "\\", "ReflectionObject", "(", "$", "this", ")", ";", "$", "injectionDir", "=", "str_replace", "(", "'\\\\'", ",", "'/'", ",", "dirname", "(", "$", "r", "->", "getFileName", ...
Get Root Dir Module @return string Root Dir Module
[ "Get", "Root", "Dir", "Module" ]
e319eb09d29afad6993acb4a7e35f32a87dd0841
https://github.com/simple-php-mvc/simple-php-mvc/blob/e319eb09d29afad6993acb4a7e35f32a87dd0841/src/MVC/Injection/Extension.php#L74-L79
18,712
simple-php-mvc/simple-php-mvc
src/MVC/Injection/Extension.php
Extension.loadRoutes
public function loadRoutes() { $routesJsonFile = $this->configDir . '/routes.json'; $routesPhpFile = $this->configDir . '/routes.php'; if (file_exists($this->resourcesDir) && file_exists($this->configDir)) { if (file_exists($routesJsonFile)) return json_d...
php
public function loadRoutes() { $routesJsonFile = $this->configDir . '/routes.json'; $routesPhpFile = $this->configDir . '/routes.php'; if (file_exists($this->resourcesDir) && file_exists($this->configDir)) { if (file_exists($routesJsonFile)) return json_d...
[ "public", "function", "loadRoutes", "(", ")", "{", "$", "routesJsonFile", "=", "$", "this", "->", "configDir", ".", "'/routes.json'", ";", "$", "routesPhpFile", "=", "$", "this", "->", "configDir", ".", "'/routes.php'", ";", "if", "(", "file_exists", "(", ...
Load routes of the Module @return array
[ "Load", "routes", "of", "the", "Module" ]
e319eb09d29afad6993acb4a7e35f32a87dd0841
https://github.com/simple-php-mvc/simple-php-mvc/blob/e319eb09d29afad6993acb4a7e35f32a87dd0841/src/MVC/Injection/Extension.php#L86-L99
18,713
miisieq/InfaktClient
src/Infakt/Mapper/ReverseMapperTrait.php
ReverseMapperTrait.reverseMapPrice
public function reverseMapPrice(?float $price): ?int { if (null === $price) { return null; } if (0.00 === $price) { return 0; } return (int) str_replace('.', '', number_format($price, 2, '.', '')); }
php
public function reverseMapPrice(?float $price): ?int { if (null === $price) { return null; } if (0.00 === $price) { return 0; } return (int) str_replace('.', '', number_format($price, 2, '.', '')); }
[ "public", "function", "reverseMapPrice", "(", "?", "float", "$", "price", ")", ":", "?", "int", "{", "if", "(", "null", "===", "$", "price", ")", "{", "return", "null", ";", "}", "if", "(", "0.00", "===", "$", "price", ")", "{", "return", "0", ";...
Maps price to string. @param float|null $price @return int|null
[ "Maps", "price", "to", "string", "." ]
5f0ae58c7be32580f3c92c2a7e7a7808d83d4e81
https://github.com/miisieq/InfaktClient/blob/5f0ae58c7be32580f3c92c2a7e7a7808d83d4e81/src/Infakt/Mapper/ReverseMapperTrait.php#L16-L27
18,714
CakeCMS/Core
src/Notify/Email.php
Email.send
public function send($subject, $content, $to, $fromName = '', $fromEmail = '') { $mail = new CakeEmail(); $fromName = ($fromName !== '') ? $fromName : $this->_fromName; $fromEmail = ($fromEmail !== '') ? $fromEmail : $this->_fromEmail; $transport = new MailTransport(); ...
php
public function send($subject, $content, $to, $fromName = '', $fromEmail = '') { $mail = new CakeEmail(); $fromName = ($fromName !== '') ? $fromName : $this->_fromName; $fromEmail = ($fromEmail !== '') ? $fromEmail : $this->_fromEmail; $transport = new MailTransport(); ...
[ "public", "function", "send", "(", "$", "subject", ",", "$", "content", ",", "$", "to", ",", "$", "fromName", "=", "''", ",", "$", "fromEmail", "=", "''", ")", "{", "$", "mail", "=", "new", "CakeEmail", "(", ")", ";", "$", "fromName", "=", "(", ...
Send message method. @param string $subject @param string $content @param string|array $to @param string $fromName @param string $fromEmail @return array
[ "Send", "message", "method", "." ]
f9cba7aa0043a10e5c35bd45fbad158688a09a96
https://github.com/CakeCMS/Core/blob/f9cba7aa0043a10e5c35bd45fbad158688a09a96/src/Notify/Email.php#L95-L111
18,715
factorio-item-browser/export-data
src/Entity/Mod.php
Mod.setDependencies
public function setDependencies(array $dependencies) { $this->dependencies = array_values(array_filter($dependencies, function ($dependency): bool { return $dependency instanceof Dependency; })); return $this; }
php
public function setDependencies(array $dependencies) { $this->dependencies = array_values(array_filter($dependencies, function ($dependency): bool { return $dependency instanceof Dependency; })); return $this; }
[ "public", "function", "setDependencies", "(", "array", "$", "dependencies", ")", "{", "$", "this", "->", "dependencies", "=", "array_values", "(", "array_filter", "(", "$", "dependencies", ",", "function", "(", "$", "dependency", ")", ":", "bool", "{", "retu...
Sets the dependencies of the mod. @param array|Dependency[] $dependencies @return $this Implementing fluent interface.
[ "Sets", "the", "dependencies", "of", "the", "mod", "." ]
1413b2eed0fbfed0521457ac7ef0d668ac30c212
https://github.com/factorio-item-browser/export-data/blob/1413b2eed0fbfed0521457ac7ef0d668ac30c212/src/Entity/Mod.php#L258-L264
18,716
xinix-technology/norm
src/Norm/Connection/BonoConnection.php
BonoConnection.restGet
public function restGet($cursor) { if ($cursor instanceof Cursor) { $name = $cursor->getCollection()->getName(); $criteria = $cursor->getCriteria(); $limit = $cursor->limit(); $skip = $cursor->skip(); $sorts = $cursor->sort(); $query = arr...
php
public function restGet($cursor) { if ($cursor instanceof Cursor) { $name = $cursor->getCollection()->getName(); $criteria = $cursor->getCriteria(); $limit = $cursor->limit(); $skip = $cursor->skip(); $sorts = $cursor->sort(); $query = arr...
[ "public", "function", "restGet", "(", "$", "cursor", ")", "{", "if", "(", "$", "cursor", "instanceof", "Cursor", ")", "{", "$", "name", "=", "$", "cursor", "->", "getCollection", "(", ")", "->", "getName", "(", ")", ";", "$", "criteria", "=", "$", ...
Get data from rest service. @param \Norm\Cursor $cursor @throws \Exception @return array
[ "Get", "data", "from", "rest", "service", "." ]
c357f7d3a75d05324dd84b8f6a968a094c53d603
https://github.com/xinix-technology/norm/blob/c357f7d3a75d05324dd84b8f6a968a094c53d603/src/Norm/Connection/BonoConnection.php#L52-L107
18,717
steeffeen/FancyManiaLinks
FML/ManiaCode.php
ManiaCode.addInstallMacroblock
public function addInstallMacroblock($name, $file, $url) { $macroblockElement = new InstallMacroblock($name, $file, $url); return $this->addElement($macroblockElement); }
php
public function addInstallMacroblock($name, $file, $url) { $macroblockElement = new InstallMacroblock($name, $file, $url); return $this->addElement($macroblockElement); }
[ "public", "function", "addInstallMacroblock", "(", "$", "name", ",", "$", "file", ",", "$", "url", ")", "{", "$", "macroblockElement", "=", "new", "InstallMacroblock", "(", "$", "name", ",", "$", "file", ",", "$", "url", ")", ";", "return", "$", "this"...
Install a Macroblock @api @param string $name Macroblock name @param string $file Macroblock file @param string $url Macroblock url @return static
[ "Install", "a", "Macroblock" ]
227b0759306f0a3c75873ba50276e4163a93bfa6
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/ManiaCode.php#L99-L103
18,718
steeffeen/FancyManiaLinks
FML/ManiaCode.php
ManiaCode.addInstallMap
public function addInstallMap($name, $url) { $mapElement = new InstallMap($name, $url); return $this->addElement($mapElement); }
php
public function addInstallMap($name, $url) { $mapElement = new InstallMap($name, $url); return $this->addElement($mapElement); }
[ "public", "function", "addInstallMap", "(", "$", "name", ",", "$", "url", ")", "{", "$", "mapElement", "=", "new", "InstallMap", "(", "$", "name", ",", "$", "url", ")", ";", "return", "$", "this", "->", "addElement", "(", "$", "mapElement", ")", ";",...
Install a map @api @param string $name Map name @param string $url Map url @return static
[ "Install", "a", "map" ]
227b0759306f0a3c75873ba50276e4163a93bfa6
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/ManiaCode.php#L113-L117
18,719
steeffeen/FancyManiaLinks
FML/ManiaCode.php
ManiaCode.addPlayMap
public function addPlayMap($name, $url) { $mapElement = new PlayMap($name, $url); return $this->addElement($mapElement); }
php
public function addPlayMap($name, $url) { $mapElement = new PlayMap($name, $url); return $this->addElement($mapElement); }
[ "public", "function", "addPlayMap", "(", "$", "name", ",", "$", "url", ")", "{", "$", "mapElement", "=", "new", "PlayMap", "(", "$", "name", ",", "$", "url", ")", ";", "return", "$", "this", "->", "addElement", "(", "$", "mapElement", ")", ";", "}"...
Play a map @api @param string $name Map name @param string $url Map url @return static
[ "Play", "a", "map" ]
227b0759306f0a3c75873ba50276e4163a93bfa6
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/ManiaCode.php#L127-L131
18,720
steeffeen/FancyManiaLinks
FML/ManiaCode.php
ManiaCode.addInstallReplay
public function addInstallReplay($name, $url) { $replayElement = new InstallReplay($name, $url); return $this->addElement($replayElement); }
php
public function addInstallReplay($name, $url) { $replayElement = new InstallReplay($name, $url); return $this->addElement($replayElement); }
[ "public", "function", "addInstallReplay", "(", "$", "name", ",", "$", "url", ")", "{", "$", "replayElement", "=", "new", "InstallReplay", "(", "$", "name", ",", "$", "url", ")", ";", "return", "$", "this", "->", "addElement", "(", "$", "replayElement", ...
Install a replay @api @param string $name Replay name @param string $url Replay url @return static
[ "Install", "a", "replay" ]
227b0759306f0a3c75873ba50276e4163a93bfa6
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/ManiaCode.php#L141-L145
18,721
steeffeen/FancyManiaLinks
FML/ManiaCode.php
ManiaCode.addViewReplay
public function addViewReplay($name, $url) { $replayElement = new ViewReplay($name, $url); return $this->addElement($replayElement); }
php
public function addViewReplay($name, $url) { $replayElement = new ViewReplay($name, $url); return $this->addElement($replayElement); }
[ "public", "function", "addViewReplay", "(", "$", "name", ",", "$", "url", ")", "{", "$", "replayElement", "=", "new", "ViewReplay", "(", "$", "name", ",", "$", "url", ")", ";", "return", "$", "this", "->", "addElement", "(", "$", "replayElement", ")", ...
View a replay @api @param string $name Replay name @param string $url Replay url @return static
[ "View", "a", "replay" ]
227b0759306f0a3c75873ba50276e4163a93bfa6
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/ManiaCode.php#L155-L159
18,722
steeffeen/FancyManiaLinks
FML/ManiaCode.php
ManiaCode.addPlayReplay
public function addPlayReplay($name, $url) { $replayElement = new PlayReplay($name, $url); return $this->addElement($replayElement); }
php
public function addPlayReplay($name, $url) { $replayElement = new PlayReplay($name, $url); return $this->addElement($replayElement); }
[ "public", "function", "addPlayReplay", "(", "$", "name", ",", "$", "url", ")", "{", "$", "replayElement", "=", "new", "PlayReplay", "(", "$", "name", ",", "$", "url", ")", ";", "return", "$", "this", "->", "addElement", "(", "$", "replayElement", ")", ...
Play a replay @api @param string $name Replay name @param string $url Replay url @return static
[ "Play", "a", "replay" ]
227b0759306f0a3c75873ba50276e4163a93bfa6
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/ManiaCode.php#L169-L173
18,723
steeffeen/FancyManiaLinks
FML/ManiaCode.php
ManiaCode.addInstallSkin
public function addInstallSkin($name, $file, $url) { $skinElement = new InstallSkin($name, $file, $url); return $this->addElement($skinElement); }
php
public function addInstallSkin($name, $file, $url) { $skinElement = new InstallSkin($name, $file, $url); return $this->addElement($skinElement); }
[ "public", "function", "addInstallSkin", "(", "$", "name", ",", "$", "file", ",", "$", "url", ")", "{", "$", "skinElement", "=", "new", "InstallSkin", "(", "$", "name", ",", "$", "file", ",", "$", "url", ")", ";", "return", "$", "this", "->", "addEl...
Install a skin @api @param string $name Skin name @param string $file Skin file @param string $url Skin url @return static
[ "Install", "a", "skin" ]
227b0759306f0a3c75873ba50276e4163a93bfa6
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/ManiaCode.php#L184-L188
18,724
steeffeen/FancyManiaLinks
FML/ManiaCode.php
ManiaCode.addGetSkin
public function addGetSkin($name, $file, $url) { $skinElement = new GetSkin($name, $file, $url); return $this->addElement($skinElement); }
php
public function addGetSkin($name, $file, $url) { $skinElement = new GetSkin($name, $file, $url); return $this->addElement($skinElement); }
[ "public", "function", "addGetSkin", "(", "$", "name", ",", "$", "file", ",", "$", "url", ")", "{", "$", "skinElement", "=", "new", "GetSkin", "(", "$", "name", ",", "$", "file", ",", "$", "url", ")", ";", "return", "$", "this", "->", "addElement", ...
Get a skin @api @param string $name Skin name @param string $file Skin file @param string $url Skin url @return static
[ "Get", "a", "skin" ]
227b0759306f0a3c75873ba50276e4163a93bfa6
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/ManiaCode.php#L199-L203
18,725
steeffeen/FancyManiaLinks
FML/ManiaCode.php
ManiaCode.addJoinServer
public function addJoinServer($loginOrIp = null, $port = null) { $serverElement = new JoinServer($loginOrIp, $port); return $this->addElement($serverElement); }
php
public function addJoinServer($loginOrIp = null, $port = null) { $serverElement = new JoinServer($loginOrIp, $port); return $this->addElement($serverElement); }
[ "public", "function", "addJoinServer", "(", "$", "loginOrIp", "=", "null", ",", "$", "port", "=", "null", ")", "{", "$", "serverElement", "=", "new", "JoinServer", "(", "$", "loginOrIp", ",", "$", "port", ")", ";", "return", "$", "this", "->", "addElem...
Join a server @api @param string $loginOrIp (optional) Server login or ip @param int $port (optional) Server port @return static
[ "Join", "a", "server" ]
227b0759306f0a3c75873ba50276e4163a93bfa6
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/ManiaCode.php#L239-L243
18,726
steeffeen/FancyManiaLinks
FML/ManiaCode.php
ManiaCode.addAddFavorite
public function addAddFavorite($loginOrIp = null, $port = null) { $favoriteElement = new AddFavorite($loginOrIp, $port); return $this->addElement($favoriteElement); }
php
public function addAddFavorite($loginOrIp = null, $port = null) { $favoriteElement = new AddFavorite($loginOrIp, $port); return $this->addElement($favoriteElement); }
[ "public", "function", "addAddFavorite", "(", "$", "loginOrIp", "=", "null", ",", "$", "port", "=", "null", ")", "{", "$", "favoriteElement", "=", "new", "AddFavorite", "(", "$", "loginOrIp", ",", "$", "port", ")", ";", "return", "$", "this", "->", "add...
Add a server as favorite @api @param string $loginOrIp (optional) Server login or ip @param int $port (optional) Server port @return static
[ "Add", "a", "server", "as", "favorite" ]
227b0759306f0a3c75873ba50276e4163a93bfa6
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/ManiaCode.php#L253-L257
18,727
steeffeen/FancyManiaLinks
FML/ManiaCode.php
ManiaCode.addInstallScript
public function addInstallScript($name, $file, $url) { $scriptElement = new InstallScript($name, $file, $url); return $this->addElement($scriptElement); }
php
public function addInstallScript($name, $file, $url) { $scriptElement = new InstallScript($name, $file, $url); return $this->addElement($scriptElement); }
[ "public", "function", "addInstallScript", "(", "$", "name", ",", "$", "file", ",", "$", "url", ")", "{", "$", "scriptElement", "=", "new", "InstallScript", "(", "$", "name", ",", "$", "file", ",", "$", "url", ")", ";", "return", "$", "this", "->", ...
Install a script @api @param string $name Script name @param string $file Script file @param string $url Script url @return static
[ "Install", "a", "script" ]
227b0759306f0a3c75873ba50276e4163a93bfa6
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/ManiaCode.php#L268-L272
18,728
steeffeen/FancyManiaLinks
FML/ManiaCode.php
ManiaCode.addInstallPack
public function addInstallPack($name, $file, $url) { $packElement = new InstallPack($name, $file, $url); return $this->addElement($packElement); }
php
public function addInstallPack($name, $file, $url) { $packElement = new InstallPack($name, $file, $url); return $this->addElement($packElement); }
[ "public", "function", "addInstallPack", "(", "$", "name", ",", "$", "file", ",", "$", "url", ")", "{", "$", "packElement", "=", "new", "InstallPack", "(", "$", "name", ",", "$", "file", ",", "$", "url", ")", ";", "return", "$", "this", "->", "addEl...
Install a title pack @api @param string $name Pack name @param string $file Pack file @param string $url Pack url @return static
[ "Install", "a", "title", "pack" ]
227b0759306f0a3c75873ba50276e4163a93bfa6
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/ManiaCode.php#L283-L287
18,729
steeffeen/FancyManiaLinks
FML/ManiaCode.php
ManiaCode.addElement
public function addElement(Element $element) { if (!in_array($element, $this->elements, true)) { array_push($this->elements, $element); } return $this; }
php
public function addElement(Element $element) { if (!in_array($element, $this->elements, true)) { array_push($this->elements, $element); } return $this; }
[ "public", "function", "addElement", "(", "Element", "$", "element", ")", "{", "if", "(", "!", "in_array", "(", "$", "element", ",", "$", "this", "->", "elements", ",", "true", ")", ")", "{", "array_push", "(", "$", "this", "->", "elements", ",", "$",...
Add a ManiaCode Element @api @param Element $element Element to add @return static
[ "Add", "a", "ManiaCode", "Element" ]
227b0759306f0a3c75873ba50276e4163a93bfa6
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/ManiaCode.php#L307-L313
18,730
steeffeen/FancyManiaLinks
FML/ManiaCode.php
ManiaCode.render
public function render($echo = false) { $domDocument = new \DOMDocument("1.0", "utf-8"); $domDocument->xmlStandalone = true; $domElement = $domDocument->createElement("maniacode"); $domDocument->appendChild($domElement); if ($this->disableConfirmation) { ...
php
public function render($echo = false) { $domDocument = new \DOMDocument("1.0", "utf-8"); $domDocument->xmlStandalone = true; $domElement = $domDocument->createElement("maniacode"); $domDocument->appendChild($domElement); if ($this->disableConfirmation) { ...
[ "public", "function", "render", "(", "$", "echo", "=", "false", ")", "{", "$", "domDocument", "=", "new", "\\", "DOMDocument", "(", "\"1.0\"", ",", "\"utf-8\"", ")", ";", "$", "domDocument", "->", "xmlStandalone", "=", "true", ";", "$", "domElement", "="...
Render the ManiaCode @api @param bool $echo (optional) If the XML text should be echoed and the Content-Type header should be set @return \DOMDocument
[ "Render", "the", "ManiaCode" ]
227b0759306f0a3c75873ba50276e4163a93bfa6
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/ManiaCode.php#L362-L385
18,731
helthe/Chronos
Crontab.php
Crontab.render
private function render() { $output = ''; foreach ($this->jobs as $job) { $output .= $this->getTaskDefinition($job); } return $output; }
php
private function render() { $output = ''; foreach ($this->jobs as $job) { $output .= $this->getTaskDefinition($job); } return $output; }
[ "private", "function", "render", "(", ")", "{", "$", "output", "=", "''", ";", "foreach", "(", "$", "this", "->", "jobs", "as", "$", "job", ")", "{", "$", "output", ".=", "$", "this", "->", "getTaskDefinition", "(", "$", "job", ")", ";", "}", "re...
Render all the cron jobs. @return string
[ "Render", "all", "the", "cron", "jobs", "." ]
6c783c55c32b323550fc6f21cd644c2be82720b0
https://github.com/helthe/Chronos/blob/6c783c55c32b323550fc6f21cd644c2be82720b0/Crontab.php#L166-L175
18,732
joomlatools/joomlatools-platform-legacy
code/base/observable.php
JObservable.attach
public function attach($observer) { if (is_array($observer)) { if (!isset($observer['handler']) || !isset($observer['event']) || !is_callable($observer['handler'])) { return; } // Make sure we haven't already attached this array as an observer foreach ($this->_observers as $check) { if (...
php
public function attach($observer) { if (is_array($observer)) { if (!isset($observer['handler']) || !isset($observer['event']) || !is_callable($observer['handler'])) { return; } // Make sure we haven't already attached this array as an observer foreach ($this->_observers as $check) { if (...
[ "public", "function", "attach", "(", "$", "observer", ")", "{", "if", "(", "is_array", "(", "$", "observer", ")", ")", "{", "if", "(", "!", "isset", "(", "$", "observer", "[", "'handler'", "]", ")", "||", "!", "isset", "(", "$", "observer", "[", ...
Attach an observer object @param object $observer An observer object to attach @return void @since 11.1 @deprecated 12.3
[ "Attach", "an", "observer", "object" ]
3a76944e2f2c415faa6504754c75321a3b478c06
https://github.com/joomlatools/joomlatools-platform-legacy/blob/3a76944e2f2c415faa6504754c75321a3b478c06/code/base/observable.php#L102-L159
18,733
joomlatools/joomlatools-platform-legacy
code/base/observable.php
JObservable.detach
public function detach($observer) { $retval = false; $key = array_search($observer, $this->_observers); if ($key !== false) { unset($this->_observers[$key]); $retval = true; foreach ($this->_methods as &$method) { $k = array_search($key, $method); if ($k !== false) { unset($met...
php
public function detach($observer) { $retval = false; $key = array_search($observer, $this->_observers); if ($key !== false) { unset($this->_observers[$key]); $retval = true; foreach ($this->_methods as &$method) { $k = array_search($key, $method); if ($k !== false) { unset($met...
[ "public", "function", "detach", "(", "$", "observer", ")", "{", "$", "retval", "=", "false", ";", "$", "key", "=", "array_search", "(", "$", "observer", ",", "$", "this", "->", "_observers", ")", ";", "if", "(", "$", "key", "!==", "false", ")", "{"...
Detach an observer object @param object $observer An observer object to detach. @return boolean True if the observer object was detached. @since 11.1 @deprecated 12.3
[ "Detach", "an", "observer", "object" ]
3a76944e2f2c415faa6504754c75321a3b478c06
https://github.com/joomlatools/joomlatools-platform-legacy/blob/3a76944e2f2c415faa6504754c75321a3b478c06/code/base/observable.php#L171-L194
18,734
ClanCats/Core
src/bundles/UI/E.php
E.attr
public static function attr( $attr = array() ) { $buffer = " "; foreach( $attr as $key => $value ) { $buffer .= $key.'="'.$value.'" '; } return substr( $buffer, 0, -1 ); }
php
public static function attr( $attr = array() ) { $buffer = " "; foreach( $attr as $key => $value ) { $buffer .= $key.'="'.$value.'" '; } return substr( $buffer, 0, -1 ); }
[ "public", "static", "function", "attr", "(", "$", "attr", "=", "array", "(", ")", ")", "{", "$", "buffer", "=", "\" \"", ";", "foreach", "(", "$", "attr", "as", "$", "key", "=>", "$", "value", ")", "{", "$", "buffer", ".=", "$", "key", ".", "'=...
generates element attribute string @param array $attr
[ "generates", "element", "attribute", "string" ]
9f6ec72c1a439de4b253d0223f1029f7f85b6ef8
https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/bundles/UI/E.php#L44-L51
18,735
ClanCats/Core
src/bundles/UI/E.php
E.render
public function render() { // execute callback if we have one first if ( is_closure( $this->value ) ) { ob_start(); $return = call_user_func( $this->value ); $this->value = ob_get_clean().$return; } return '<'.$this->name.static::attr( $this->attr ). ( !is_null( $this->value ) ? '>'.$this->value.'</'.$thi...
php
public function render() { // execute callback if we have one first if ( is_closure( $this->value ) ) { ob_start(); $return = call_user_func( $this->value ); $this->value = ob_get_clean().$return; } return '<'.$this->name.static::attr( $this->attr ). ( !is_null( $this->value ) ? '>'.$this->value.'</'.$thi...
[ "public", "function", "render", "(", ")", "{", "// execute callback if we have one first", "if", "(", "is_closure", "(", "$", "this", "->", "value", ")", ")", "{", "ob_start", "(", ")", ";", "$", "return", "=", "call_user_func", "(", "$", "this", "->", "va...
render this element @return string
[ "render", "this", "element" ]
9f6ec72c1a439de4b253d0223f1029f7f85b6ef8
https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/bundles/UI/E.php#L143-L150
18,736
factorio-item-browser/export-data
src/Registry/Adapter/FileSystemAdapter.php
FileSystemAdapter.save
public function save(string $namespace, string $hash, string $content): void { $fileName = $this->getFileName($namespace, $hash); $this->ensureDirectory(dirname($fileName)); $success = false; if (!file_exists($fileName) || is_writable($fileName)) { $success = file_put_co...
php
public function save(string $namespace, string $hash, string $content): void { $fileName = $this->getFileName($namespace, $hash); $this->ensureDirectory(dirname($fileName)); $success = false; if (!file_exists($fileName) || is_writable($fileName)) { $success = file_put_co...
[ "public", "function", "save", "(", "string", "$", "namespace", ",", "string", "$", "hash", ",", "string", "$", "content", ")", ":", "void", "{", "$", "fileName", "=", "$", "this", "->", "getFileName", "(", "$", "namespace", ",", "$", "hash", ")", ";"...
Saves the content under the specified hash. @param string $namespace @param string $hash @param string $content @return void @throws ExportDataException
[ "Saves", "the", "content", "under", "the", "specified", "hash", "." ]
1413b2eed0fbfed0521457ac7ef0d668ac30c212
https://github.com/factorio-item-browser/export-data/blob/1413b2eed0fbfed0521457ac7ef0d668ac30c212/src/Registry/Adapter/FileSystemAdapter.php#L43-L55
18,737
factorio-item-browser/export-data
src/Registry/Adapter/FileSystemAdapter.php
FileSystemAdapter.load
public function load(string $namespace, string $hash): ?string { $result = null; $fileName = $this->getFileName($namespace, $hash); if (file_exists($fileName) && is_readable($fileName)) { $result = file_get_contents($fileName); } return is_string($result) ? $resul...
php
public function load(string $namespace, string $hash): ?string { $result = null; $fileName = $this->getFileName($namespace, $hash); if (file_exists($fileName) && is_readable($fileName)) { $result = file_get_contents($fileName); } return is_string($result) ? $resul...
[ "public", "function", "load", "(", "string", "$", "namespace", ",", "string", "$", "hash", ")", ":", "?", "string", "{", "$", "result", "=", "null", ";", "$", "fileName", "=", "$", "this", "->", "getFileName", "(", "$", "namespace", ",", "$", "hash",...
Loads and returns the content of the specified hash, if available. @param string $namespace @param string $hash @return string|null
[ "Loads", "and", "returns", "the", "content", "of", "the", "specified", "hash", "if", "available", "." ]
1413b2eed0fbfed0521457ac7ef0d668ac30c212
https://github.com/factorio-item-browser/export-data/blob/1413b2eed0fbfed0521457ac7ef0d668ac30c212/src/Registry/Adapter/FileSystemAdapter.php#L63-L71
18,738
factorio-item-browser/export-data
src/Registry/Adapter/FileSystemAdapter.php
FileSystemAdapter.delete
public function delete(string $namespace, string $hash): void { $fileName = $this->getFileName($namespace, $hash); if (file_exists($fileName)) { unlink($fileName); } }
php
public function delete(string $namespace, string $hash): void { $fileName = $this->getFileName($namespace, $hash); if (file_exists($fileName)) { unlink($fileName); } }
[ "public", "function", "delete", "(", "string", "$", "namespace", ",", "string", "$", "hash", ")", ":", "void", "{", "$", "fileName", "=", "$", "this", "->", "getFileName", "(", "$", "namespace", ",", "$", "hash", ")", ";", "if", "(", "file_exists", "...
Deletes the content under the specified hash. @param string $namespace @param string $hash
[ "Deletes", "the", "content", "under", "the", "specified", "hash", "." ]
1413b2eed0fbfed0521457ac7ef0d668ac30c212
https://github.com/factorio-item-browser/export-data/blob/1413b2eed0fbfed0521457ac7ef0d668ac30c212/src/Registry/Adapter/FileSystemAdapter.php#L78-L84
18,739
factorio-item-browser/export-data
src/Registry/Adapter/FileSystemAdapter.php
FileSystemAdapter.getFileName
protected function getFileName(string $namespace, string $hash): string { $fileName = implode(DIRECTORY_SEPARATOR, [ $this->directory, $namespace, substr($hash, 0, 2), $hash ]); return $fileName; }
php
protected function getFileName(string $namespace, string $hash): string { $fileName = implode(DIRECTORY_SEPARATOR, [ $this->directory, $namespace, substr($hash, 0, 2), $hash ]); return $fileName; }
[ "protected", "function", "getFileName", "(", "string", "$", "namespace", ",", "string", "$", "hash", ")", ":", "string", "{", "$", "fileName", "=", "implode", "(", "DIRECTORY_SEPARATOR", ",", "[", "$", "this", "->", "directory", ",", "$", "namespace", ",",...
Returns the filename to use to save the content with the specified namespace and hash. @param string $namespace @param string $hash @return string
[ "Returns", "the", "filename", "to", "use", "to", "save", "the", "content", "with", "the", "specified", "namespace", "and", "hash", "." ]
1413b2eed0fbfed0521457ac7ef0d668ac30c212
https://github.com/factorio-item-browser/export-data/blob/1413b2eed0fbfed0521457ac7ef0d668ac30c212/src/Registry/Adapter/FileSystemAdapter.php#L92-L101
18,740
factorio-item-browser/export-data
src/Registry/Adapter/FileSystemAdapter.php
FileSystemAdapter.ensureDirectory
protected function ensureDirectory(string $directory): void { if (!is_dir($directory)) { $success = @mkdir($directory, 0775, true); if (!$success && !is_dir($directory)) { throw new ExportDataException('Unable to create directory ' . $directory . '.'); } ...
php
protected function ensureDirectory(string $directory): void { if (!is_dir($directory)) { $success = @mkdir($directory, 0775, true); if (!$success && !is_dir($directory)) { throw new ExportDataException('Unable to create directory ' . $directory . '.'); } ...
[ "protected", "function", "ensureDirectory", "(", "string", "$", "directory", ")", ":", "void", "{", "if", "(", "!", "is_dir", "(", "$", "directory", ")", ")", "{", "$", "success", "=", "@", "mkdir", "(", "$", "directory", ",", "0775", ",", "true", ")...
Ensures that the specified directory is available and writable. @param string $directory @throws ExportDataException
[ "Ensures", "that", "the", "specified", "directory", "is", "available", "and", "writable", "." ]
1413b2eed0fbfed0521457ac7ef0d668ac30c212
https://github.com/factorio-item-browser/export-data/blob/1413b2eed0fbfed0521457ac7ef0d668ac30c212/src/Registry/Adapter/FileSystemAdapter.php#L108-L120
18,741
factorio-item-browser/export-data
src/Registry/Adapter/FileSystemAdapter.php
FileSystemAdapter.getAllHashes
public function getAllHashes(string $namespace): array { $directory = implode(DIRECTORY_SEPARATOR, [ $this->directory, $namespace, ]); $result = []; if (is_dir($directory)) { $directoryIterator = new RecursiveDirectoryIterator( $di...
php
public function getAllHashes(string $namespace): array { $directory = implode(DIRECTORY_SEPARATOR, [ $this->directory, $namespace, ]); $result = []; if (is_dir($directory)) { $directoryIterator = new RecursiveDirectoryIterator( $di...
[ "public", "function", "getAllHashes", "(", "string", "$", "namespace", ")", ":", "array", "{", "$", "directory", "=", "implode", "(", "DIRECTORY_SEPARATOR", ",", "[", "$", "this", "->", "directory", ",", "$", "namespace", ",", "]", ")", ";", "$", "result...
Returns all hashes currently known to the adapter. @param string $namespace @return array|string[]
[ "Returns", "all", "hashes", "currently", "known", "to", "the", "adapter", "." ]
1413b2eed0fbfed0521457ac7ef0d668ac30c212
https://github.com/factorio-item-browser/export-data/blob/1413b2eed0fbfed0521457ac7ef0d668ac30c212/src/Registry/Adapter/FileSystemAdapter.php#L127-L147
18,742
simple-php-mvc/simple-php-mvc
src/MVC/DataBase/Model.php
Model.delete
protected function delete(array $criteria = array()) { $conditions = array(); foreach ($criteria as $field => $value) { $conditions[] = "$field = ?"; } $sql = "DELETE FROM $this->_table WHERE " . implode(' AND ', $conditions); $pdos = $t...
php
protected function delete(array $criteria = array()) { $conditions = array(); foreach ($criteria as $field => $value) { $conditions[] = "$field = ?"; } $sql = "DELETE FROM $this->_table WHERE " . implode(' AND ', $conditions); $pdos = $t...
[ "protected", "function", "delete", "(", "array", "$", "criteria", "=", "array", "(", ")", ")", "{", "$", "conditions", "=", "array", "(", ")", ";", "foreach", "(", "$", "criteria", "as", "$", "field", "=>", "$", "value", ")", "{", "$", "conditions", ...
Function SQL DELETE @access protected @param array $criteria @return int
[ "Function", "SQL", "DELETE" ]
e319eb09d29afad6993acb4a7e35f32a87dd0841
https://github.com/simple-php-mvc/simple-php-mvc/blob/e319eb09d29afad6993acb4a7e35f32a87dd0841/src/MVC/DataBase/Model.php#L81-L96
18,743
simple-php-mvc/simple-php-mvc
src/MVC/DataBase/Model.php
Model.insert
protected function insert(array $data = array()) { $fields = array(); $values = array(); foreach ($data as $field => $value) { $fields[] = $field; $values[] = '?'; } $sql = "INSERT INTO $this->_table " . "(" . implode...
php
protected function insert(array $data = array()) { $fields = array(); $values = array(); foreach ($data as $field => $value) { $fields[] = $field; $values[] = '?'; } $sql = "INSERT INTO $this->_table " . "(" . implode...
[ "protected", "function", "insert", "(", "array", "$", "data", "=", "array", "(", ")", ")", "{", "$", "fields", "=", "array", "(", ")", ";", "$", "values", "=", "array", "(", ")", ";", "foreach", "(", "$", "data", "as", "$", "field", "=>", "$", ...
Function SQL INSERT @access protected @param array $data @return int
[ "Function", "SQL", "INSERT" ]
e319eb09d29afad6993acb4a7e35f32a87dd0841
https://github.com/simple-php-mvc/simple-php-mvc/blob/e319eb09d29afad6993acb4a7e35f32a87dd0841/src/MVC/DataBase/Model.php#L104-L123
18,744
simple-php-mvc/simple-php-mvc
src/MVC/DataBase/Model.php
Model.select
protected function select(array $fields, array $criteria = array(), array $operators = array(), array $conditions = array()) { $sql = ""; $stringConditions = array(); if ((!empty($criteria) && !empty($operators)) && !empty($conditions)) { if ((count($criteria) == count($...
php
protected function select(array $fields, array $criteria = array(), array $operators = array(), array $conditions = array()) { $sql = ""; $stringConditions = array(); if ((!empty($criteria) && !empty($operators)) && !empty($conditions)) { if ((count($criteria) == count($...
[ "protected", "function", "select", "(", "array", "$", "fields", ",", "array", "$", "criteria", "=", "array", "(", ")", ",", "array", "$", "operators", "=", "array", "(", ")", ",", "array", "$", "conditions", "=", "array", "(", ")", ")", "{", "$", "...
Function SQL SELECT @access protected @param array $fields @param array $criteria @param array $operators @param array $conditions @return array @throws \Exception
[ "Function", "SQL", "SELECT" ]
e319eb09d29afad6993acb4a7e35f32a87dd0841
https://github.com/simple-php-mvc/simple-php-mvc/blob/e319eb09d29afad6993acb4a7e35f32a87dd0841/src/MVC/DataBase/Model.php#L135-L185
18,745
simple-php-mvc/simple-php-mvc
src/MVC/DataBase/Model.php
Model.update
protected function update(array $data = array(), array $criteria) { $set = array(); foreach ($data as $columnName => $value) { $set[] = "$columnName = ?"; } $params = array_merge(array_values($data), array_values($criteria)); $sql = "UPDATE $this...
php
protected function update(array $data = array(), array $criteria) { $set = array(); foreach ($data as $columnName => $value) { $set[] = "$columnName = ?"; } $params = array_merge(array_values($data), array_values($criteria)); $sql = "UPDATE $this...
[ "protected", "function", "update", "(", "array", "$", "data", "=", "array", "(", ")", ",", "array", "$", "criteria", ")", "{", "$", "set", "=", "array", "(", ")", ";", "foreach", "(", "$", "data", "as", "$", "columnName", "=>", "$", "value", ")", ...
Function SQL UPDATE @access protected @param array $data @param array $criteria @return int
[ "Function", "SQL", "UPDATE" ]
e319eb09d29afad6993acb4a7e35f32a87dd0841
https://github.com/simple-php-mvc/simple-php-mvc/blob/e319eb09d29afad6993acb4a7e35f32a87dd0841/src/MVC/DataBase/Model.php#L194-L211
18,746
xinix-technology/norm
src/Norm/Connection/FlatFileConnection.php
FlatFileConnection.prepareDatabaseEcosystem
protected function prepareDatabaseEcosystem() { $basePath = realpath('../'); $dbPath = $basePath.'/'.$this->options['dbPath'].'/'.$this->options['database']; if (! is_dir($dbPath)) { mkdir($dbPath, 0755, true); } $this->dbPath = realpath($dbPath); }
php
protected function prepareDatabaseEcosystem() { $basePath = realpath('../'); $dbPath = $basePath.'/'.$this->options['dbPath'].'/'.$this->options['database']; if (! is_dir($dbPath)) { mkdir($dbPath, 0755, true); } $this->dbPath = realpath($dbPath); }
[ "protected", "function", "prepareDatabaseEcosystem", "(", ")", "{", "$", "basePath", "=", "realpath", "(", "'../'", ")", ";", "$", "dbPath", "=", "$", "basePath", ".", "'/'", ".", "$", "this", "->", "options", "[", "'dbPath'", "]", ".", "'/'", ".", "$"...
Prepare database file and folder structure. @return void
[ "Prepare", "database", "file", "and", "folder", "structure", "." ]
c357f7d3a75d05324dd84b8f6a968a094c53d603
https://github.com/xinix-technology/norm/blob/c357f7d3a75d05324dd84b8f6a968a094c53d603/src/Norm/Connection/FlatFileConnection.php#L63-L73
18,747
xinix-technology/norm
src/Norm/Connection/FlatFileConnection.php
FlatFileConnection.getCollectionData
public function getCollectionData($collection, $criteria = null) { if (is_null($this->dbPath)) { $this->prepareDatabaseEcosystem(); } if (! is_dir($this->dbPath.'/'.$collection)) { mkdir($this->dbPath.'/'.$collection, 0755, true); } $rows = array(); ...
php
public function getCollectionData($collection, $criteria = null) { if (is_null($this->dbPath)) { $this->prepareDatabaseEcosystem(); } if (! is_dir($this->dbPath.'/'.$collection)) { mkdir($this->dbPath.'/'.$collection, 0755, true); } $rows = array(); ...
[ "public", "function", "getCollectionData", "(", "$", "collection", ",", "$", "criteria", "=", "null", ")", "{", "if", "(", "is_null", "(", "$", "this", "->", "dbPath", ")", ")", "{", "$", "this", "->", "prepareDatabaseEcosystem", "(", ")", ";", "}", "i...
Getter for specific data for collection @return array
[ "Getter", "for", "specific", "data", "for", "collection" ]
c357f7d3a75d05324dd84b8f6a968a094c53d603
https://github.com/xinix-technology/norm/blob/c357f7d3a75d05324dd84b8f6a968a094c53d603/src/Norm/Connection/FlatFileConnection.php#L159-L207
18,748
spiral-modules/scaffolder
source/Scaffolder/AbstractCommand.php
AbstractCommand.writeDeclaration
protected function writeDeclaration(ClassDeclaration $declaration, string $type = null) { $type = $type ?? static::ELEMENT; $filename = $this->config->classFilename($type, $this->argument('name')); $filename = $this->files->normalizePath($filename); if ($this->files->exists($filena...
php
protected function writeDeclaration(ClassDeclaration $declaration, string $type = null) { $type = $type ?? static::ELEMENT; $filename = $this->config->classFilename($type, $this->argument('name')); $filename = $this->files->normalizePath($filename); if ($this->files->exists($filena...
[ "protected", "function", "writeDeclaration", "(", "ClassDeclaration", "$", "declaration", ",", "string", "$", "type", "=", "null", ")", "{", "$", "type", "=", "$", "type", "??", "static", "::", "ELEMENT", ";", "$", "filename", "=", "$", "this", "->", "co...
Write declaration into file. @param ClassDeclaration $declaration @param string $type If null static::ELEMENT to be used.
[ "Write", "declaration", "into", "file", "." ]
9be9dd0da6e4b02232db24e797fe5c288afbbddf
https://github.com/spiral-modules/scaffolder/blob/9be9dd0da6e4b02232db24e797fe5c288afbbddf/source/Scaffolder/AbstractCommand.php#L86-L121
18,749
joomlatools/joomlatools-platform-legacy
code/table/session.php
JTableSession.insert
public function insert($sessionId, $clientId) { $this->session_id = $sessionId; $this->client_id = $clientId; $this->time = time(); $ret = $this->_db->insertObject($this->_tbl, $this, 'session_id'); if (!$ret) { $this->setError(JText::sprintf('JLIB_DATABASE_ERROR_STORE_FAILED', strtolower(get_class($t...
php
public function insert($sessionId, $clientId) { $this->session_id = $sessionId; $this->client_id = $clientId; $this->time = time(); $ret = $this->_db->insertObject($this->_tbl, $this, 'session_id'); if (!$ret) { $this->setError(JText::sprintf('JLIB_DATABASE_ERROR_STORE_FAILED', strtolower(get_class($t...
[ "public", "function", "insert", "(", "$", "sessionId", ",", "$", "clientId", ")", "{", "$", "this", "->", "session_id", "=", "$", "sessionId", ";", "$", "this", "->", "client_id", "=", "$", "clientId", ";", "$", "this", "->", "time", "=", "time", "("...
Insert a session @param string $sessionId The session id @param integer $clientId The id of the client application @return boolean True on success @since 11.1 @deprecated 13.3 Use SQL queries to interact with the session table.
[ "Insert", "a", "session" ]
3a76944e2f2c415faa6504754c75321a3b478c06
https://github.com/joomlatools/joomlatools-platform-legacy/blob/3a76944e2f2c415faa6504754c75321a3b478c06/code/table/session.php#L48-L66
18,750
joomlatools/joomlatools-platform-legacy
code/table/session.php
JTableSession.update
public function update($updateNulls = false) { $this->time = time(); $ret = $this->_db->updateObject($this->_tbl, $this, 'session_id', $updateNulls); if (!$ret) { $this->setError(JText::sprintf('JLIB_DATABASE_ERROR_STORE_FAILED', strtolower(get_class($this)), $this->_db->stderr())); return false; } ...
php
public function update($updateNulls = false) { $this->time = time(); $ret = $this->_db->updateObject($this->_tbl, $this, 'session_id', $updateNulls); if (!$ret) { $this->setError(JText::sprintf('JLIB_DATABASE_ERROR_STORE_FAILED', strtolower(get_class($this)), $this->_db->stderr())); return false; } ...
[ "public", "function", "update", "(", "$", "updateNulls", "=", "false", ")", "{", "$", "this", "->", "time", "=", "time", "(", ")", ";", "$", "ret", "=", "$", "this", "->", "_db", "->", "updateObject", "(", "$", "this", "->", "_tbl", ",", "$", "th...
Updates the session @param boolean $updateNulls True to update fields even if they are null. @return boolean True on success. @since 11.1 @deprecated 13.3 Use SQL queries to interact with the session table.
[ "Updates", "the", "session" ]
3a76944e2f2c415faa6504754c75321a3b478c06
https://github.com/joomlatools/joomlatools-platform-legacy/blob/3a76944e2f2c415faa6504754c75321a3b478c06/code/table/session.php#L78-L93
18,751
joomlatools/joomlatools-platform-legacy
code/table/session.php
JTableSession.destroy
public function destroy($userId, $clientIds = array()) { $clientIds = implode(',', $clientIds); $query = $this->_db->getQuery(true) ->delete($this->_db->quoteName($this->_tbl)) ->where($this->_db->quoteName('userid') . ' = ' . $this->_db->quote($userId)) ->where($this->_db->quoteName('client_id') . ' IN ...
php
public function destroy($userId, $clientIds = array()) { $clientIds = implode(',', $clientIds); $query = $this->_db->getQuery(true) ->delete($this->_db->quoteName($this->_tbl)) ->where($this->_db->quoteName('userid') . ' = ' . $this->_db->quote($userId)) ->where($this->_db->quoteName('client_id') . ' IN ...
[ "public", "function", "destroy", "(", "$", "userId", ",", "$", "clientIds", "=", "array", "(", ")", ")", "{", "$", "clientIds", "=", "implode", "(", "','", ",", "$", "clientIds", ")", ";", "$", "query", "=", "$", "this", "->", "_db", "->", "getQuer...
Destroys the pre-existing session @param integer $userId Identifier of the user for this session. @param array $clientIds Array of client ids for which session(s) will be destroyed @return boolean True on success. @since 11.1 @deprecated 13.3 Use SQL queries to interact with the session table.
[ "Destroys", "the", "pre", "-", "existing", "session" ]
3a76944e2f2c415faa6504754c75321a3b478c06
https://github.com/joomlatools/joomlatools-platform-legacy/blob/3a76944e2f2c415faa6504754c75321a3b478c06/code/table/session.php#L106-L124
18,752
joomlatools/joomlatools-platform-legacy
code/table/session.php
JTableSession.purge
public function purge($maxLifetime = 1440) { $past = time() - $maxLifetime; $query = $this->_db->getQuery(true) ->delete($this->_db->quoteName($this->_tbl)) ->where($this->_db->quoteName('time') . ' < ' . (int) $past); $this->_db->setQuery($query); return $this->_db->execute(); }
php
public function purge($maxLifetime = 1440) { $past = time() - $maxLifetime; $query = $this->_db->getQuery(true) ->delete($this->_db->quoteName($this->_tbl)) ->where($this->_db->quoteName('time') . ' < ' . (int) $past); $this->_db->setQuery($query); return $this->_db->execute(); }
[ "public", "function", "purge", "(", "$", "maxLifetime", "=", "1440", ")", "{", "$", "past", "=", "time", "(", ")", "-", "$", "maxLifetime", ";", "$", "query", "=", "$", "this", "->", "_db", "->", "getQuery", "(", "true", ")", "->", "delete", "(", ...
Purge old sessions @param integer $maxLifetime Session age in seconds @return mixed Resource on success, null on fail @since 11.1 @deprecated 13.3 Use SQL queries to interact with the session table.
[ "Purge", "old", "sessions" ]
3a76944e2f2c415faa6504754c75321a3b478c06
https://github.com/joomlatools/joomlatools-platform-legacy/blob/3a76944e2f2c415faa6504754c75321a3b478c06/code/table/session.php#L136-L145
18,753
joomlatools/joomlatools-platform-legacy
code/table/session.php
JTableSession.exists
public function exists($userid) { $query = $this->_db->getQuery(true) ->select('COUNT(userid)') ->from($this->_db->quoteName($this->_tbl)) ->where($this->_db->quoteName('userid') . ' = ' . $this->_db->quote($userid)); $this->_db->setQuery($query); if (!$result = $this->_db->loadResult()) { $this->...
php
public function exists($userid) { $query = $this->_db->getQuery(true) ->select('COUNT(userid)') ->from($this->_db->quoteName($this->_tbl)) ->where($this->_db->quoteName('userid') . ' = ' . $this->_db->quote($userid)); $this->_db->setQuery($query); if (!$result = $this->_db->loadResult()) { $this->...
[ "public", "function", "exists", "(", "$", "userid", ")", "{", "$", "query", "=", "$", "this", "->", "_db", "->", "getQuery", "(", "true", ")", "->", "select", "(", "'COUNT(userid)'", ")", "->", "from", "(", "$", "this", "->", "_db", "->", "quoteName"...
Find out if a user has one or more active sessions @param integer $userid The identifier of the user @return boolean True if a session for this user exists @since 11.1 @deprecated 13.3 Use SQL queries to interact with the session table.
[ "Find", "out", "if", "a", "user", "has", "one", "or", "more", "active", "sessions" ]
3a76944e2f2c415faa6504754c75321a3b478c06
https://github.com/joomlatools/joomlatools-platform-legacy/blob/3a76944e2f2c415faa6504754c75321a3b478c06/code/table/session.php#L157-L173
18,754
joomlatools/joomlatools-platform-legacy
code/table/session.php
JTableSession.delete
public function delete($oid = null) { $k = $this->_tbl_key; if ($oid) { $this->$k = $oid; } $query = $this->_db->getQuery(true) ->delete($this->_db->quoteName($this->_tbl)) ->where($this->_db->quoteName($this->_tbl_key) . ' = ' . $this->_db->quote($this->$k)); $this->_db->setQuery($query); $t...
php
public function delete($oid = null) { $k = $this->_tbl_key; if ($oid) { $this->$k = $oid; } $query = $this->_db->getQuery(true) ->delete($this->_db->quoteName($this->_tbl)) ->where($this->_db->quoteName($this->_tbl_key) . ' = ' . $this->_db->quote($this->$k)); $this->_db->setQuery($query); $t...
[ "public", "function", "delete", "(", "$", "oid", "=", "null", ")", "{", "$", "k", "=", "$", "this", "->", "_tbl_key", ";", "if", "(", "$", "oid", ")", "{", "$", "this", "->", "$", "k", "=", "$", "oid", ";", "}", "$", "query", "=", "$", "thi...
Overloaded delete method We must override it because of the non-integer primary key @param integer $oid The object id (optional). @return mixed True if successful otherwise an error message @since 11.1 @deprecated 13.3 Use SQL queries to interact with the session table.
[ "Overloaded", "delete", "method" ]
3a76944e2f2c415faa6504754c75321a3b478c06
https://github.com/joomlatools/joomlatools-platform-legacy/blob/3a76944e2f2c415faa6504754c75321a3b478c06/code/table/session.php#L187-L204
18,755
steeffeen/FancyManiaLinks
FML/Controls/FrameInstance.php
FrameInstance.setModelId
public function setModelId($modelId) { $this->modelId = (string)$modelId; $this->model = null; return $this; }
php
public function setModelId($modelId) { $this->modelId = (string)$modelId; $this->model = null; return $this; }
[ "public", "function", "setModelId", "(", "$", "modelId", ")", "{", "$", "this", "->", "modelId", "=", "(", "string", ")", "$", "modelId", ";", "$", "this", "->", "model", "=", "null", ";", "return", "$", "this", ";", "}" ]
Set the FrameModel id @api @param string $modelId FrameModel id @return static
[ "Set", "the", "FrameModel", "id" ]
227b0759306f0a3c75873ba50276e4163a93bfa6
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Controls/FrameInstance.php#L74-L79
18,756
steeffeen/FancyManiaLinks
FML/Controls/FrameInstance.php
FrameInstance.setModel
public function setModel(FrameModel $frameModel) { $this->modelId = null; $this->model = $frameModel; return $this; }
php
public function setModel(FrameModel $frameModel) { $this->modelId = null; $this->model = $frameModel; return $this; }
[ "public", "function", "setModel", "(", "FrameModel", "$", "frameModel", ")", "{", "$", "this", "->", "modelId", "=", "null", ";", "$", "this", "->", "model", "=", "$", "frameModel", ";", "return", "$", "this", ";", "}" ]
Set the FrameModel @api @param FrameModel $frameModel FrameModel @return static
[ "Set", "the", "FrameModel" ]
227b0759306f0a3c75873ba50276e4163a93bfa6
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Controls/FrameInstance.php#L99-L104
18,757
steeffeen/FancyManiaLinks
FML/Script/Builder.php
Builder.escapeText
public static function escapeText($text, $addApostrophes = true) { $dangers = array('\\', '"', "\n"); $replacements = array('\\\\', '\\"', '\\n'); $escapedText = str_ireplace($dangers, $replacements, $text); if ($addApostrophes) { $escapedText = '"' . $escapedText ....
php
public static function escapeText($text, $addApostrophes = true) { $dangers = array('\\', '"', "\n"); $replacements = array('\\\\', '\\"', '\\n'); $escapedText = str_ireplace($dangers, $replacements, $text); if ($addApostrophes) { $escapedText = '"' . $escapedText ....
[ "public", "static", "function", "escapeText", "(", "$", "text", ",", "$", "addApostrophes", "=", "true", ")", "{", "$", "dangers", "=", "array", "(", "'\\\\'", ",", "'\"'", ",", "\"\\n\"", ")", ";", "$", "replacements", "=", "array", "(", "'\\\\\\\\'", ...
Escape dangerous characters in the given text @api @param string $text Text to escape @param bool $addApostrophes (optional) Add apostrophes before and after the text @return string
[ "Escape", "dangerous", "characters", "in", "the", "given", "text" ]
227b0759306f0a3c75873ba50276e4163a93bfa6
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Script/Builder.php#L52-L61
18,758
steeffeen/FancyManiaLinks
FML/Script/Builder.php
Builder.getReal
public static function getReal($value) { $value = (float)$value; $stringVal = (string)$value; if (!fmod($value, 1)) { $stringVal .= "."; } return $stringVal; }
php
public static function getReal($value) { $value = (float)$value; $stringVal = (string)$value; if (!fmod($value, 1)) { $stringVal .= "."; } return $stringVal; }
[ "public", "static", "function", "getReal", "(", "$", "value", ")", "{", "$", "value", "=", "(", "float", ")", "$", "value", ";", "$", "stringVal", "=", "(", "string", ")", "$", "value", ";", "if", "(", "!", "fmod", "(", "$", "value", ",", "1", ...
Get the 'Real' string representation of the given value @api @param float $value Float value to convert to a ManiaScript 'Real' @return string
[ "Get", "the", "Real", "string", "representation", "of", "the", "given", "value" ]
227b0759306f0a3c75873ba50276e4163a93bfa6
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Script/Builder.php#L105-L113
18,759
steeffeen/FancyManiaLinks
FML/Script/Builder.php
Builder.getArray
public static function getArray(array $array, $associative = true) { $arrayText = "["; $index = 0; $count = count($array); foreach ($array as $key => $value) { if ($associative) { $arrayText .= static::getValue($key); $arrayText .= ...
php
public static function getArray(array $array, $associative = true) { $arrayText = "["; $index = 0; $count = count($array); foreach ($array as $key => $value) { if ($associative) { $arrayText .= static::getValue($key); $arrayText .= ...
[ "public", "static", "function", "getArray", "(", "array", "$", "array", ",", "$", "associative", "=", "true", ")", "{", "$", "arrayText", "=", "\"[\"", ";", "$", "index", "=", "0", ";", "$", "count", "=", "count", "(", "$", "array", ")", ";", "fore...
Get the string representation of the given array @api @param array $array Array to convert to a ManiaScript array @param bool $associative (optional) Whether the array should be associative @return string
[ "Get", "the", "string", "representation", "of", "the", "given", "array" ]
227b0759306f0a3c75873ba50276e4163a93bfa6
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Script/Builder.php#L175-L192
18,760
steeffeen/FancyManiaLinks
FML/Script/Builder.php
Builder.getValue
public static function getValue($value) { if (is_string($value)) { return static::escapeText($value); } if (is_bool($value)) { return static::getBoolean($value); } if (is_array($value)) { return static::getArray($value); } r...
php
public static function getValue($value) { if (is_string($value)) { return static::escapeText($value); } if (is_bool($value)) { return static::getBoolean($value); } if (is_array($value)) { return static::getArray($value); } r...
[ "public", "static", "function", "getValue", "(", "$", "value", ")", "{", "if", "(", "is_string", "(", "$", "value", ")", ")", "{", "return", "static", "::", "escapeText", "(", "$", "value", ")", ";", "}", "if", "(", "is_bool", "(", "$", "value", ")...
Get the string representation for the given value @api @param mixed $value Value @return string
[ "Get", "the", "string", "representation", "for", "the", "given", "value" ]
227b0759306f0a3c75873ba50276e4163a93bfa6
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Script/Builder.php#L201-L213
18,761
steeffeen/FancyManiaLinks
FML/Script/Builder.php
Builder.getInclude
public static function getInclude($file, $namespace = null) { if (!$namespace && stripos($file, ".") === false) { $namespace = $file; } $file = static::escapeText($file); $includeText = "#Include {$file}"; if ($namespace) { $includeText .= " as ...
php
public static function getInclude($file, $namespace = null) { if (!$namespace && stripos($file, ".") === false) { $namespace = $file; } $file = static::escapeText($file); $includeText = "#Include {$file}"; if ($namespace) { $includeText .= " as ...
[ "public", "static", "function", "getInclude", "(", "$", "file", ",", "$", "namespace", "=", "null", ")", "{", "if", "(", "!", "$", "namespace", "&&", "stripos", "(", "$", "file", ",", "\".\"", ")", "===", "false", ")", "{", "$", "namespace", "=", "...
Get the include command for the given file and namespace @api @param string $file Include file @param string $namespace (optional) Include namespace @return string
[ "Get", "the", "include", "command", "for", "the", "given", "file", "and", "namespace" ]
227b0759306f0a3c75873ba50276e4163a93bfa6
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Script/Builder.php#L223-L235
18,762
ppetermann/king23
src/Mongo/MongoService.php
MongoService.getByCriteria
public function getByCriteria($collection, $criteria) { if ($data = $this->findOne($collection, $criteria)) { /** @var MongoObject $obj */ $obj = $this->container->get( $this->classMap->getClassForResult($collection, $data) ); $obj->setCollect...
php
public function getByCriteria($collection, $criteria) { if ($data = $this->findOne($collection, $criteria)) { /** @var MongoObject $obj */ $obj = $this->container->get( $this->classMap->getClassForResult($collection, $data) ); $obj->setCollect...
[ "public", "function", "getByCriteria", "(", "$", "collection", ",", "$", "criteria", ")", "{", "if", "(", "$", "data", "=", "$", "this", "->", "findOne", "(", "$", "collection", ",", "$", "criteria", ")", ")", "{", "/** @var MongoObject $obj */", "$", "o...
convenience method to retrieve object by criteria, should be used in public static method by the derived class @param string $collection @param array $criteria @return MongoObject @throws \MongoException
[ "convenience", "method", "to", "retrieve", "object", "by", "criteria", "should", "be", "used", "in", "public", "static", "method", "by", "the", "derived", "class" ]
603896083ec89f5ac4d744abd3b1b4db3e914c95
https://github.com/ppetermann/king23/blob/603896083ec89f5ac4d744abd3b1b4db3e914c95/src/Mongo/MongoService.php#L92-L107
18,763
ppetermann/king23
src/Mongo/MongoService.php
MongoService.aggregate
public function aggregate($collection, array $pipeline, $options = []) { $data = $this->dbConnection->selectCollection($collection)->aggregate($pipeline); if ($data['ok'] != 1) { throw new Exception("Tool Aggregation Error: ".$data['errmsg'], $data['code']); } return $da...
php
public function aggregate($collection, array $pipeline, $options = []) { $data = $this->dbConnection->selectCollection($collection)->aggregate($pipeline); if ($data['ok'] != 1) { throw new Exception("Tool Aggregation Error: ".$data['errmsg'], $data['code']); } return $da...
[ "public", "function", "aggregate", "(", "$", "collection", ",", "array", "$", "pipeline", ",", "$", "options", "=", "[", "]", ")", "{", "$", "data", "=", "$", "this", "->", "dbConnection", "->", "selectCollection", "(", "$", "collection", ")", "->", "a...
Run Aggregation through the Aggregation Pipeline @param string $collection @param array $pipeline @param array $options @return mixed @throws Exception
[ "Run", "Aggregation", "through", "the", "Aggregation", "Pipeline" ]
603896083ec89f5ac4d744abd3b1b4db3e914c95
https://github.com/ppetermann/king23/blob/603896083ec89f5ac4d744abd3b1b4db3e914c95/src/Mongo/MongoService.php#L137-L145
18,764
ppetermann/king23
src/Mongo/MongoService.php
MongoService.findOne
public function findOne($collection, array $criteria, array $fields = []) { return $this->dbConnection->selectCollection($collection)->findOne($criteria, $fields); }
php
public function findOne($collection, array $criteria, array $fields = []) { return $this->dbConnection->selectCollection($collection)->findOne($criteria, $fields); }
[ "public", "function", "findOne", "(", "$", "collection", ",", "array", "$", "criteria", ",", "array", "$", "fields", "=", "[", "]", ")", "{", "return", "$", "this", "->", "dbConnection", "->", "selectCollection", "(", "$", "collection", ")", "->", "findO...
returns the first found matching document @param string $collection @param array $criteria @param array $fields @return array @throws \Exception
[ "returns", "the", "first", "found", "matching", "document" ]
603896083ec89f5ac4d744abd3b1b4db3e914c95
https://github.com/ppetermann/king23/blob/603896083ec89f5ac4d744abd3b1b4db3e914c95/src/Mongo/MongoService.php#L168-L171
18,765
ppetermann/king23
src/Mongo/MongoService.php
MongoService.newObject
public function newObject($collection) { /** @var MongoObject $obj */ $obj =$this->container->get($this->classMap->getClassForResult($collection, [])); $obj->setCollection($collection); return $obj; }
php
public function newObject($collection) { /** @var MongoObject $obj */ $obj =$this->container->get($this->classMap->getClassForResult($collection, [])); $obj->setCollection($collection); return $obj; }
[ "public", "function", "newObject", "(", "$", "collection", ")", "{", "/** @var MongoObject $obj */", "$", "obj", "=", "$", "this", "->", "container", "->", "get", "(", "$", "this", "->", "classMap", "->", "getClassForResult", "(", "$", "collection", ",", "["...
conveniant method to create new instances @param string $collection @return MongoObject @throws \MongoException
[ "conveniant", "method", "to", "create", "new", "instances" ]
603896083ec89f5ac4d744abd3b1b4db3e914c95
https://github.com/ppetermann/king23/blob/603896083ec89f5ac4d744abd3b1b4db3e914c95/src/Mongo/MongoService.php#L179-L186
18,766
CakeCMS/Core
src/View/Helper/AssetsHelper.php
AssetsHelper.jquery
public function jquery() { $this->Html->script('libs/jquery.min.js', $this->_setOptions([ 'alias' => __FUNCTION__, 'weight' => self::WEIGHT_CORE ])); return $this; }
php
public function jquery() { $this->Html->script('libs/jquery.min.js', $this->_setOptions([ 'alias' => __FUNCTION__, 'weight' => self::WEIGHT_CORE ])); return $this; }
[ "public", "function", "jquery", "(", ")", "{", "$", "this", "->", "Html", "->", "script", "(", "'libs/jquery.min.js'", ",", "$", "this", "->", "_setOptions", "(", "[", "'alias'", "=>", "__FUNCTION__", ",", "'weight'", "=>", "self", "::", "WEIGHT_CORE", "]"...
Include jquery lib. @return $this
[ "Include", "jquery", "lib", "." ]
f9cba7aa0043a10e5c35bd45fbad158688a09a96
https://github.com/CakeCMS/Core/blob/f9cba7aa0043a10e5c35bd45fbad158688a09a96/src/View/Helper/AssetsHelper.php#L153-L161
18,767
CakeCMS/Core
src/View/Helper/AssetsHelper.php
AssetsHelper.jqueryFactory
public function jqueryFactory() { $this->jquery(); $this->Html->script('libs/utils.min.js', $this->_setOptions([ 'alias' => 'jquery-utils', 'weight' => self::WEIGHT_LIB ])); $this->Html->script('libs/jquery-factory.min.js', $this->_setOptions([ ...
php
public function jqueryFactory() { $this->jquery(); $this->Html->script('libs/utils.min.js', $this->_setOptions([ 'alias' => 'jquery-utils', 'weight' => self::WEIGHT_LIB ])); $this->Html->script('libs/jquery-factory.min.js', $this->_setOptions([ ...
[ "public", "function", "jqueryFactory", "(", ")", "{", "$", "this", "->", "jquery", "(", ")", ";", "$", "this", "->", "Html", "->", "script", "(", "'libs/utils.min.js'", ",", "$", "this", "->", "_setOptions", "(", "[", "'alias'", "=>", "'jquery-utils'", "...
Include jquery factory. @return $this
[ "Include", "jquery", "factory", "." ]
f9cba7aa0043a10e5c35bd45fbad158688a09a96
https://github.com/CakeCMS/Core/blob/f9cba7aa0043a10e5c35bd45fbad158688a09a96/src/View/Helper/AssetsHelper.php#L168-L183
18,768
CakeCMS/Core
src/View/Helper/AssetsHelper.php
AssetsHelper.loadPluginAssets
public function loadPluginAssets() { $plugin = (string) $this->request->getParam('plugin'); $prefix = ($this->request->getParam('prefix')) ? $this->request->getParam('prefix') . '/' : null; $action = (string) $this->request->getParam('action'); $controller = (string) $this->request-...
php
public function loadPluginAssets() { $plugin = (string) $this->request->getParam('plugin'); $prefix = ($this->request->getParam('prefix')) ? $this->request->getParam('prefix') . '/' : null; $action = (string) $this->request->getParam('action'); $controller = (string) $this->request-...
[ "public", "function", "loadPluginAssets", "(", ")", "{", "$", "plugin", "=", "(", "string", ")", "$", "this", "->", "request", "->", "getParam", "(", "'plugin'", ")", ";", "$", "prefix", "=", "(", "$", "this", "->", "request", "->", "getParam", "(", ...
Autoload plugin assets. @return void @throws \JBZoo\Less\Exception
[ "Autoload", "plugin", "assets", "." ]
f9cba7aa0043a10e5c35bd45fbad158688a09a96
https://github.com/CakeCMS/Core/blob/f9cba7aa0043a10e5c35bd45fbad158688a09a96/src/View/Helper/AssetsHelper.php#L192-L208
18,769
CakeCMS/Core
src/View/Helper/AssetsHelper.php
AssetsHelper.materialize
public function materialize() { $this->jquery(); $this->Html->script('libs/materialize.min.js', $this->_setOptions([ 'alias' => __FUNCTION__, 'weight' => self::WEIGHT_LIB ])); $this->Html->css('libs/materialize.min.css', $this->_setOptions([ 'al...
php
public function materialize() { $this->jquery(); $this->Html->script('libs/materialize.min.js', $this->_setOptions([ 'alias' => __FUNCTION__, 'weight' => self::WEIGHT_LIB ])); $this->Html->css('libs/materialize.min.css', $this->_setOptions([ 'al...
[ "public", "function", "materialize", "(", ")", "{", "$", "this", "->", "jquery", "(", ")", ";", "$", "this", "->", "Html", "->", "script", "(", "'libs/materialize.min.js'", ",", "$", "this", "->", "_setOptions", "(", "[", "'alias'", "=>", "__FUNCTION__", ...
Include materialize design. @return $this
[ "Include", "materialize", "design", "." ]
f9cba7aa0043a10e5c35bd45fbad158688a09a96
https://github.com/CakeCMS/Core/blob/f9cba7aa0043a10e5c35bd45fbad158688a09a96/src/View/Helper/AssetsHelper.php#L215-L230
18,770
CakeCMS/Core
src/View/Helper/AssetsHelper.php
AssetsHelper.toggleField
public function toggleField($selector = '.jsToggleField', $widget = 'JBZoo.FieldToggle', array $options = []) { $this->jqueryFactory(); $this->Html->script('Core.admin/widget/field-toggle.js', $this->_setOptions([ 'alias' => __FUNCTION__, 'weight' => self::WEIGHT_WIDGET ...
php
public function toggleField($selector = '.jsToggleField', $widget = 'JBZoo.FieldToggle', array $options = []) { $this->jqueryFactory(); $this->Html->script('Core.admin/widget/field-toggle.js', $this->_setOptions([ 'alias' => __FUNCTION__, 'weight' => self::WEIGHT_WIDGET ...
[ "public", "function", "toggleField", "(", "$", "selector", "=", "'.jsToggleField'", ",", "$", "widget", "=", "'JBZoo.FieldToggle'", ",", "array", "$", "options", "=", "[", "]", ")", "{", "$", "this", "->", "jqueryFactory", "(", ")", ";", "$", "this", "->...
Include toggle field js widget. @param string $selector @param string $widget @param array $options @return $this
[ "Include", "toggle", "field", "js", "widget", "." ]
f9cba7aa0043a10e5c35bd45fbad158688a09a96
https://github.com/CakeCMS/Core/blob/f9cba7aa0043a10e5c35bd45fbad158688a09a96/src/View/Helper/AssetsHelper.php#L296-L309
18,771
restruct/silverstripe-namedlinkfield
src/NamedLinkField.php
NamedLinkField.exists
public function exists() { return ($this->page_id > 0 || $this->file_id > 0 || $this->custom_url !== null || $this->shortcode !== null && $this->title !== null); }
php
public function exists() { return ($this->page_id > 0 || $this->file_id > 0 || $this->custom_url !== null || $this->shortcode !== null && $this->title !== null); }
[ "public", "function", "exists", "(", ")", "{", "return", "(", "$", "this", "->", "page_id", ">", "0", "||", "$", "this", "->", "file_id", ">", "0", "||", "$", "this", "->", "custom_url", "!==", "null", "||", "$", "this", "->", "shortcode", "!==", "...
Determines if any of the properties in this field have a value, meaning at least one of them is not NULL. @return boolean
[ "Determines", "if", "any", "of", "the", "properties", "in", "this", "field", "have", "a", "value", "meaning", "at", "least", "one", "of", "them", "is", "not", "NULL", "." ]
567c49fdc1b24c219dec2e989fc2013b1c7951af
https://github.com/restruct/silverstripe-namedlinkfield/blob/567c49fdc1b24c219dec2e989fc2013b1c7951af/src/NamedLinkField.php#L321-L325
18,772
helsingborg-stad/acf-export-manager
src/AcfExportManager.php
AcfExportManager.addGroupKeyToPostbox
public function addGroupKeyToPostbox($post) { if ($post->post_type !== 'acf-field-group') { return; } // Check if aldready added global $acfExportManagerHasGroupIdInSidebar; if ($acfExportManagerHasGroupIdInSidebar) { return; } $acfEx...
php
public function addGroupKeyToPostbox($post) { if ($post->post_type !== 'acf-field-group') { return; } // Check if aldready added global $acfExportManagerHasGroupIdInSidebar; if ($acfExportManagerHasGroupIdInSidebar) { return; } $acfEx...
[ "public", "function", "addGroupKeyToPostbox", "(", "$", "post", ")", "{", "if", "(", "$", "post", "->", "post_type", "!==", "'acf-field-group'", ")", "{", "return", ";", "}", "// Check if aldready added", "global", "$", "acfExportManagerHasGroupIdInSidebar", ";", ...
Displays the fieldgroup key in misc publishing actions @param WP_Post $post
[ "Displays", "the", "fieldgroup", "key", "in", "misc", "publishing", "actions" ]
27e904a24eb013cac5c8f3d3c30e88b5b9b7859b
https://github.com/helsingborg-stad/acf-export-manager/blob/27e904a24eb013cac5c8f3d3c30e88b5b9b7859b/src/AcfExportManager.php#L31-L48
18,773
helsingborg-stad/acf-export-manager
src/AcfExportManager.php
AcfExportManager.deleteExport
public function deleteExport(array $fieldgroup) : bool { $filename = $this->getExportFilename($fieldgroup); $this->maybeUnlink($this->exportFolder . 'php/' . $filename['php']); $this->maybeUnlink($this->exportFolder . 'json/' . $filename['json']); return true; }
php
public function deleteExport(array $fieldgroup) : bool { $filename = $this->getExportFilename($fieldgroup); $this->maybeUnlink($this->exportFolder . 'php/' . $filename['php']); $this->maybeUnlink($this->exportFolder . 'json/' . $filename['json']); return true; }
[ "public", "function", "deleteExport", "(", "array", "$", "fieldgroup", ")", ":", "bool", "{", "$", "filename", "=", "$", "this", "->", "getExportFilename", "(", "$", "fieldgroup", ")", ";", "$", "this", "->", "maybeUnlink", "(", "$", "this", "->", "expor...
Deletes export file for deleted fieldgroup @param array $fieldgroup @return boolean
[ "Deletes", "export", "file", "for", "deleted", "fieldgroup" ]
27e904a24eb013cac5c8f3d3c30e88b5b9b7859b
https://github.com/helsingborg-stad/acf-export-manager/blob/27e904a24eb013cac5c8f3d3c30e88b5b9b7859b/src/AcfExportManager.php#L75-L83
18,774
helsingborg-stad/acf-export-manager
src/AcfExportManager.php
AcfExportManager.export
public function export(array $fieldgroup, bool $restrictToExportPosts = true, bool $translate = true) : array { global $locale; $locale = "en_US"; // Bail if the fieldgroup shouldn't be exported if ($restrictToExportPosts && !in_array($fieldgroup['key'], $this->exportPosts)) { ...
php
public function export(array $fieldgroup, bool $restrictToExportPosts = true, bool $translate = true) : array { global $locale; $locale = "en_US"; // Bail if the fieldgroup shouldn't be exported if ($restrictToExportPosts && !in_array($fieldgroup['key'], $this->exportPosts)) { ...
[ "public", "function", "export", "(", "array", "$", "fieldgroup", ",", "bool", "$", "restrictToExportPosts", "=", "true", ",", "bool", "$", "translate", "=", "true", ")", ":", "array", "{", "global", "$", "locale", ";", "$", "locale", "=", "\"en_US\"", ";...
Does the actual export of the php fields @param array $fieldgroup Fieldgroup data @return array Paths to exported files
[ "Does", "the", "actual", "export", "of", "the", "php", "fields" ]
27e904a24eb013cac5c8f3d3c30e88b5b9b7859b
https://github.com/helsingborg-stad/acf-export-manager/blob/27e904a24eb013cac5c8f3d3c30e88b5b9b7859b/src/AcfExportManager.php#L101-L139
18,775
helsingborg-stad/acf-export-manager
src/AcfExportManager.php
AcfExportManager.getJson
public function getJson(array $fieldgroup) : string { $json = json_encode($fieldgroup, JSON_PRETTY_PRINT); // Remove translation stuff from json $json = str_replace('!!__(!!\'', '', $json); $json = str_replace("!!', !!'" . $this->textdomain . "!!')!!", '', $json); return '[...
php
public function getJson(array $fieldgroup) : string { $json = json_encode($fieldgroup, JSON_PRETTY_PRINT); // Remove translation stuff from json $json = str_replace('!!__(!!\'', '', $json); $json = str_replace("!!', !!'" . $this->textdomain . "!!')!!", '', $json); return '[...
[ "public", "function", "getJson", "(", "array", "$", "fieldgroup", ")", ":", "string", "{", "$", "json", "=", "json_encode", "(", "$", "fieldgroup", ",", "JSON_PRETTY_PRINT", ")", ";", "// Remove translation stuff from json", "$", "json", "=", "str_replace", "(",...
Get fieldgroup as json @param array $fieldgroup @return string
[ "Get", "fieldgroup", "as", "json" ]
27e904a24eb013cac5c8f3d3c30e88b5b9b7859b
https://github.com/helsingborg-stad/acf-export-manager/blob/27e904a24eb013cac5c8f3d3c30e88b5b9b7859b/src/AcfExportManager.php#L146-L155
18,776
helsingborg-stad/acf-export-manager
src/AcfExportManager.php
AcfExportManager.maybeCreateExportFolders
public function maybeCreateExportFolders() { if (!is_writable($this->exportFolder)) { trigger_error('The export folder (' . $this->exportFolder .') is not writable. Exports will not be saved.', E_USER_ERROR); } if (!file_exists($this->exportFolder . 'json')) { mkdir(...
php
public function maybeCreateExportFolders() { if (!is_writable($this->exportFolder)) { trigger_error('The export folder (' . $this->exportFolder .') is not writable. Exports will not be saved.', E_USER_ERROR); } if (!file_exists($this->exportFolder . 'json')) { mkdir(...
[ "public", "function", "maybeCreateExportFolders", "(", ")", "{", "if", "(", "!", "is_writable", "(", "$", "this", "->", "exportFolder", ")", ")", "{", "trigger_error", "(", "'The export folder ('", ".", "$", "this", "->", "exportFolder", ".", "') is not writable...
Creates export folders if needed @return void
[ "Creates", "export", "folders", "if", "needed" ]
27e904a24eb013cac5c8f3d3c30e88b5b9b7859b
https://github.com/helsingborg-stad/acf-export-manager/blob/27e904a24eb013cac5c8f3d3c30e88b5b9b7859b/src/AcfExportManager.php#L161-L176
18,777
helsingborg-stad/acf-export-manager
src/AcfExportManager.php
AcfExportManager.getExportFilename
public function getExportFilename(array $fieldgroup) : array { if ($key = array_search($fieldgroup['key'], $this->exportPosts)) { return array( 'php' => $key . '.php', 'json' => $key . '.json' ); } return array( 'php' => sa...
php
public function getExportFilename(array $fieldgroup) : array { if ($key = array_search($fieldgroup['key'], $this->exportPosts)) { return array( 'php' => $key . '.php', 'json' => $key . '.json' ); } return array( 'php' => sa...
[ "public", "function", "getExportFilename", "(", "array", "$", "fieldgroup", ")", ":", "array", "{", "if", "(", "$", "key", "=", "array_search", "(", "$", "fieldgroup", "[", "'key'", "]", ",", "$", "this", "->", "exportPosts", ")", ")", "{", "return", "...
Get filename for the export file @param array $fieldgroup Fieldgroup data @return array
[ "Get", "filename", "for", "the", "export", "file" ]
27e904a24eb013cac5c8f3d3c30e88b5b9b7859b
https://github.com/helsingborg-stad/acf-export-manager/blob/27e904a24eb013cac5c8f3d3c30e88b5b9b7859b/src/AcfExportManager.php#L192-L205
18,778
helsingborg-stad/acf-export-manager
src/AcfExportManager.php
AcfExportManager.generatePhp
protected function generatePhp(int $fieldgroupId, bool $translate = true) : string { $strReplace = array( " " => " ", "!!\'" => "'", "'!!" => "", "!!'" => "", "array (" => "array(", " => \n" => " => " ); ...
php
protected function generatePhp(int $fieldgroupId, bool $translate = true) : string { $strReplace = array( " " => " ", "!!\'" => "'", "'!!" => "", "!!'" => "", "array (" => "array(", " => \n" => " => " ); ...
[ "protected", "function", "generatePhp", "(", "int", "$", "fieldgroupId", ",", "bool", "$", "translate", "=", "true", ")", ":", "string", "{", "$", "strReplace", "=", "array", "(", "\" \"", "=>", "\" \"", ",", "\"!!\\'\"", "=>", "\"'\"", ",", "\"'!!\"",...
Generates PHP exportcode for a fieldgroup @param int $fieldgroupId @return string
[ "Generates", "PHP", "exportcode", "for", "a", "fieldgroup" ]
27e904a24eb013cac5c8f3d3c30e88b5b9b7859b
https://github.com/helsingborg-stad/acf-export-manager/blob/27e904a24eb013cac5c8f3d3c30e88b5b9b7859b/src/AcfExportManager.php#L212-L242
18,779
helsingborg-stad/acf-export-manager
src/AcfExportManager.php
AcfExportManager.getFieldgroupParams
public function getFieldgroupParams(int $fieldgroupId, bool $translate = true) : array { // Get the fieldgroup $fieldgroup = acf_get_field_group($fieldgroupId); // Bail if fieldgroup is empty if (empty($fieldgroup)) { trigger_error('The fieldgroup with id "' . $fieldgrou...
php
public function getFieldgroupParams(int $fieldgroupId, bool $translate = true) : array { // Get the fieldgroup $fieldgroup = acf_get_field_group($fieldgroupId); // Bail if fieldgroup is empty if (empty($fieldgroup)) { trigger_error('The fieldgroup with id "' . $fieldgrou...
[ "public", "function", "getFieldgroupParams", "(", "int", "$", "fieldgroupId", ",", "bool", "$", "translate", "=", "true", ")", ":", "array", "{", "// Get the fieldgroup", "$", "fieldgroup", "=", "acf_get_field_group", "(", "$", "fieldgroupId", ")", ";", "// Bail...
Get exportable fieldgroup params @param int $fieldgroupId @return array
[ "Get", "exportable", "fieldgroup", "params" ]
27e904a24eb013cac5c8f3d3c30e88b5b9b7859b
https://github.com/helsingborg-stad/acf-export-manager/blob/27e904a24eb013cac5c8f3d3c30e88b5b9b7859b/src/AcfExportManager.php#L249-L270
18,780
helsingborg-stad/acf-export-manager
src/AcfExportManager.php
AcfExportManager.translateFieldParams
public function translateFieldParams(array $field) : array { $keys = array('prepend', 'append', 'placeholder', 'default_value'); foreach ($keys as $key) { if (!isset($field[$key])) { continue; } $field[$key] = acf_translate($field[$key]); ...
php
public function translateFieldParams(array $field) : array { $keys = array('prepend', 'append', 'placeholder', 'default_value'); foreach ($keys as $key) { if (!isset($field[$key])) { continue; } $field[$key] = acf_translate($field[$key]); ...
[ "public", "function", "translateFieldParams", "(", "array", "$", "field", ")", ":", "array", "{", "$", "keys", "=", "array", "(", "'prepend'", ",", "'append'", ",", "'placeholder'", ",", "'default_value'", ")", ";", "foreach", "(", "$", "keys", "as", "$", ...
Translate field params @param array $field ACF Field params @return array Translated ACF field params
[ "Translate", "field", "params" ]
27e904a24eb013cac5c8f3d3c30e88b5b9b7859b
https://github.com/helsingborg-stad/acf-export-manager/blob/27e904a24eb013cac5c8f3d3c30e88b5b9b7859b/src/AcfExportManager.php#L294-L316
18,781
helsingborg-stad/acf-export-manager
src/AcfExportManager.php
AcfExportManager.setExportFolder
public function setExportFolder(string $folder) { $folder = trailingslashit($folder); if (!file_exists($folder)) { if (!mkdir($folder)) { trigger_error('The export folder (' . $folder .') can not be found. Exports will not be saved.', E_USER_WARNING); } else ...
php
public function setExportFolder(string $folder) { $folder = trailingslashit($folder); if (!file_exists($folder)) { if (!mkdir($folder)) { trigger_error('The export folder (' . $folder .') can not be found. Exports will not be saved.', E_USER_WARNING); } else ...
[ "public", "function", "setExportFolder", "(", "string", "$", "folder", ")", "{", "$", "folder", "=", "trailingslashit", "(", "$", "folder", ")", ";", "if", "(", "!", "file_exists", "(", "$", "folder", ")", ")", "{", "if", "(", "!", "mkdir", "(", "$",...
Set exports folder @param string $folder Path to exports folder @return void
[ "Set", "exports", "folder" ]
27e904a24eb013cac5c8f3d3c30e88b5b9b7859b
https://github.com/helsingborg-stad/acf-export-manager/blob/27e904a24eb013cac5c8f3d3c30e88b5b9b7859b/src/AcfExportManager.php#L323-L336
18,782
helsingborg-stad/acf-export-manager
src/AcfExportManager.php
AcfExportManager.autoExport
public function autoExport(array $ids) { $this->exportPosts = array_replace($this->exportPosts, $ids); $this->exportPosts = array_unique($this->exportPosts); }
php
public function autoExport(array $ids) { $this->exportPosts = array_replace($this->exportPosts, $ids); $this->exportPosts = array_unique($this->exportPosts); }
[ "public", "function", "autoExport", "(", "array", "$", "ids", ")", "{", "$", "this", "->", "exportPosts", "=", "array_replace", "(", "$", "this", "->", "exportPosts", ",", "$", "ids", ")", ";", "$", "this", "->", "exportPosts", "=", "array_unique", "(", ...
Sets which acf-fieldgroups postids to autoexport @param array $ids @return void
[ "Sets", "which", "acf", "-", "fieldgroups", "postids", "to", "autoexport" ]
27e904a24eb013cac5c8f3d3c30e88b5b9b7859b
https://github.com/helsingborg-stad/acf-export-manager/blob/27e904a24eb013cac5c8f3d3c30e88b5b9b7859b/src/AcfExportManager.php#L343-L347
18,783
helsingborg-stad/acf-export-manager
src/AcfExportManager.php
AcfExportManager.handleBulkExport
public function handleBulkExport($redirectTo, $doaction, $postIds) { if ($doaction !== 'acfExportManager-export') { return $redirectTo; } foreach ($postIds as $postId) { $fieldgroup = acf_get_field_group($postId); if (!in_array($fieldgroup['key'], $this...
php
public function handleBulkExport($redirectTo, $doaction, $postIds) { if ($doaction !== 'acfExportManager-export') { return $redirectTo; } foreach ($postIds as $postId) { $fieldgroup = acf_get_field_group($postId); if (!in_array($fieldgroup['key'], $this...
[ "public", "function", "handleBulkExport", "(", "$", "redirectTo", ",", "$", "doaction", ",", "$", "postIds", ")", "{", "if", "(", "$", "doaction", "!==", "'acfExportManager-export'", ")", "{", "return", "$", "redirectTo", ";", "}", "foreach", "(", "$", "po...
Handles bulk exporting @param string $redirectTo Redirect @param string $doaction The bulk action to do @param array $postIds Selected posts @return string The redirect
[ "Handles", "bulk", "exporting" ]
27e904a24eb013cac5c8f3d3c30e88b5b9b7859b
https://github.com/helsingborg-stad/acf-export-manager/blob/27e904a24eb013cac5c8f3d3c30e88b5b9b7859b/src/AcfExportManager.php#L375-L394
18,784
forkiss/pharest
src/Pharest/ExceptionHandler.php
ExceptionHandler.hasCustomHandler
public function hasCustomHandler() { if (!class_exists(\App\Exception\Handler::class)) { return false; } if (!in_array(\Pharest\Exception\ExceptionHandler::class, class_implements(\App\Exception\Handler::class))) { return false; } return true; }
php
public function hasCustomHandler() { if (!class_exists(\App\Exception\Handler::class)) { return false; } if (!in_array(\Pharest\Exception\ExceptionHandler::class, class_implements(\App\Exception\Handler::class))) { return false; } return true; }
[ "public", "function", "hasCustomHandler", "(", ")", "{", "if", "(", "!", "class_exists", "(", "\\", "App", "\\", "Exception", "\\", "Handler", "::", "class", ")", ")", "{", "return", "false", ";", "}", "if", "(", "!", "in_array", "(", "\\", "Pharest", ...
Determine if the app has custom exception handler @return bool
[ "Determine", "if", "the", "app", "has", "custom", "exception", "handler" ]
f8b444f9bba446bf7994d98f27585529aefed565
https://github.com/forkiss/pharest/blob/f8b444f9bba446bf7994d98f27585529aefed565/src/Pharest/ExceptionHandler.php#L34-L45
18,785
ClanCats/Core
src/classes/CCDate.php
CCDate.relative
public static function relative($ts) { if(!ctype_digit($ts)) $ts = strtotime($ts); $diff = time() - $ts; if($diff == 0) return __('Core::common.date.now'); elseif($diff > 0) { $day_diff = floor($diff / 86400); if($day_diff == 0) { if($diff < 60) return __('Core::common.date.just_now'); ...
php
public static function relative($ts) { if(!ctype_digit($ts)) $ts = strtotime($ts); $diff = time() - $ts; if($diff == 0) return __('Core::common.date.now'); elseif($diff > 0) { $day_diff = floor($diff / 86400); if($day_diff == 0) { if($diff < 60) return __('Core::common.date.just_now'); ...
[ "public", "static", "function", "relative", "(", "$", "ts", ")", "{", "if", "(", "!", "ctype_digit", "(", "$", "ts", ")", ")", "$", "ts", "=", "strtotime", "(", "$", "ts", ")", ";", "$", "diff", "=", "time", "(", ")", "-", "$", "ts", ";", "if...
to string relative string @param int $ts @return string
[ "to", "string", "relative", "string" ]
9f6ec72c1a439de4b253d0223f1029f7f85b6ef8
https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/classes/CCDate.php#L100-L143
18,786
ppetermann/king23
src/TwigIntegration/TwigController.php
TwigController.render
protected function render($template, $context = []) { $context = array_merge($this->_context, $context); $body = $this->twig->render($template, $context); return $body; }
php
protected function render($template, $context = []) { $context = array_merge($this->_context, $context); $body = $this->twig->render($template, $context); return $body; }
[ "protected", "function", "render", "(", "$", "template", ",", "$", "context", "=", "[", "]", ")", "{", "$", "context", "=", "array_merge", "(", "$", "this", "->", "_context", ",", "$", "context", ")", ";", "$", "body", "=", "$", "this", "->", "twig...
render template with context, will merge context with allready known context @param string $template @param array $context @return string
[ "render", "template", "with", "context", "will", "merge", "context", "with", "allready", "known", "context" ]
603896083ec89f5ac4d744abd3b1b4db3e914c95
https://github.com/ppetermann/king23/blob/603896083ec89f5ac4d744abd3b1b4db3e914c95/src/TwigIntegration/TwigController.php#L95-L100
18,787
iocaste/microservice-foundation
src/Seeder/Seeder.php
Seeder.truncateTables
public function truncateTables() { $dbName = env('DB_DATABASE'); // Get all tables list, except migrations table $tables = DB::select('SHOW TABLES WHERE `Tables_in_'.$dbName.'` != ?', ['migrations']); DB::statement('SET FOREIGN_KEY_CHECKS=0;'); foreach ($tables as $table) {...
php
public function truncateTables() { $dbName = env('DB_DATABASE'); // Get all tables list, except migrations table $tables = DB::select('SHOW TABLES WHERE `Tables_in_'.$dbName.'` != ?', ['migrations']); DB::statement('SET FOREIGN_KEY_CHECKS=0;'); foreach ($tables as $table) {...
[ "public", "function", "truncateTables", "(", ")", "{", "$", "dbName", "=", "env", "(", "'DB_DATABASE'", ")", ";", "// Get all tables list, except migrations table", "$", "tables", "=", "DB", "::", "select", "(", "'SHOW TABLES WHERE `Tables_in_'", ".", "$", "dbName",...
Truncates all tables except migrations.
[ "Truncates", "all", "tables", "except", "migrations", "." ]
274a154de4299e8a57314bab972e09f6d8cdae9e
https://github.com/iocaste/microservice-foundation/blob/274a154de4299e8a57314bab972e09f6d8cdae9e/src/Seeder/Seeder.php#L16-L28
18,788
SachaMorard/phalcon-console
Library/Phalcon/Builder/Path.php
Path.getConfig
public function getConfig($type = null) { $types = ['php' => true, 'ini' => true]; $type = isset($types[$type]) ? $type : 'ini'; foreach (['app/config/', 'config/', 'apps/config/', 'apps/frontend/config/'] as $configPath) { if ('ini' == $type && file_exists($this->rootPath . $c...
php
public function getConfig($type = null) { $types = ['php' => true, 'ini' => true]; $type = isset($types[$type]) ? $type : 'ini'; foreach (['app/config/', 'config/', 'apps/config/', 'apps/frontend/config/'] as $configPath) { if ('ini' == $type && file_exists($this->rootPath . $c...
[ "public", "function", "getConfig", "(", "$", "type", "=", "null", ")", "{", "$", "types", "=", "[", "'php'", "=>", "true", ",", "'ini'", "=>", "true", "]", ";", "$", "type", "=", "isset", "(", "$", "types", "[", "$", "type", "]", ")", "?", "$",...
Tries to find the current configuration in the application @param string $type Config type: ini | php @return \Phalcon\Config @throws BuilderException
[ "Tries", "to", "find", "the", "current", "configuration", "in", "the", "application" ]
a7922e4c488ea19bc0ecce793e6f01cf9cf3c0c3
https://github.com/SachaMorard/phalcon-console/blob/a7922e4c488ea19bc0ecce793e6f01cf9cf3c0c3/Library/Phalcon/Builder/Path.php#L50-L88
18,789
SachaMorard/phalcon-console
Library/Phalcon/Builder/Path.php
Path.isAbsolutePath
public function isAbsolutePath($path) { if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { if (preg_match('/^[A-Z]:\\\\/', $path)) { return true; } } else { if (substr($path, 0, 1) == DIRECTORY_SEPARATOR) { return true; }...
php
public function isAbsolutePath($path) { if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { if (preg_match('/^[A-Z]:\\\\/', $path)) { return true; } } else { if (substr($path, 0, 1) == DIRECTORY_SEPARATOR) { return true; }...
[ "public", "function", "isAbsolutePath", "(", "$", "path", ")", "{", "if", "(", "strtoupper", "(", "substr", "(", "PHP_OS", ",", "0", ",", "3", ")", ")", "===", "'WIN'", ")", "{", "if", "(", "preg_match", "(", "'/^[A-Z]:\\\\\\\\/'", ",", "$", "path", ...
Check if a path is absolute @param string $path Path to check @return bool
[ "Check", "if", "a", "path", "is", "absolute" ]
a7922e4c488ea19bc0ecce793e6f01cf9cf3c0c3
https://github.com/SachaMorard/phalcon-console/blob/a7922e4c488ea19bc0ecce793e6f01cf9cf3c0c3/Library/Phalcon/Builder/Path.php#L115-L128
18,790
ClanCats/Core
src/classes/CCAsset/Holder.php
CCAsset_Holder.add
public function add( $item ) { // when the first character is a "smaller than" we simply assume // that a custom tag has been passed and not a filepath if ( strpos( $item, "<" ) !== false ) { $macro = '_'; } else { $macro = CCStr::extension( $item ); } if ( !isset( $this->assets[$macro] ) ) ...
php
public function add( $item ) { // when the first character is a "smaller than" we simply assume // that a custom tag has been passed and not a filepath if ( strpos( $item, "<" ) !== false ) { $macro = '_'; } else { $macro = CCStr::extension( $item ); } if ( !isset( $this->assets[$macro] ) ) ...
[ "public", "function", "add", "(", "$", "item", ")", "{", "// when the first character is a \"smaller than\" we simply assume", "// that a custom tag has been passed and not a filepath", "if", "(", "strpos", "(", "$", "item", ",", "\"<\"", ")", "!==", "false", ")", "{", ...
Add an asset to the holder. Basically this method checks the file extension to sort them and generate the correct code using the macros. $holder->add( 'jquery.js' ); $holder->add( 'style.css' ); $holder->add( '<script>document.write( "Hello World" );</script>' ); @param string $item @return void
[ "Add", "an", "asset", "to", "the", "holder", ".", "Basically", "this", "method", "checks", "the", "file", "extension", "to", "sort", "them", "and", "generate", "the", "correct", "code", "using", "the", "macros", "." ]
9f6ec72c1a439de4b253d0223f1029f7f85b6ef8
https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/classes/CCAsset/Holder.php#L39-L56
18,791
Lansoweb/LosBase
src/LosBase/Controller/ODM/AbstractCrudController.php
AbstractCrudController.getForm
public function getForm($documentClass = null) { if (null === $documentClass) { $documentClass = $this->getDocumentClass(); } $builder = new AnnotationBuilder(); $form = $builder->createForm($documentClass); $hasDocument = false; foreach ($form->getEleme...
php
public function getForm($documentClass = null) { if (null === $documentClass) { $documentClass = $this->getDocumentClass(); } $builder = new AnnotationBuilder(); $form = $builder->createForm($documentClass); $hasDocument = false; foreach ($form->getEleme...
[ "public", "function", "getForm", "(", "$", "documentClass", "=", "null", ")", "{", "if", "(", "null", "===", "$", "documentClass", ")", "{", "$", "documentClass", "=", "$", "this", "->", "getDocumentClass", "(", ")", ";", "}", "$", "builder", "=", "new...
Retorna a form para o cadastro do documento.
[ "Retorna", "a", "form", "para", "o", "cadastro", "do", "documento", "." ]
90e18a53d29c1bd841c149dca43aa365eecc656d
https://github.com/Lansoweb/LosBase/blob/90e18a53d29c1bd841c149dca43aa365eecc656d/src/LosBase/Controller/ODM/AbstractCrudController.php#L135-L196
18,792
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseCustomerPeer.php
BaseCustomerPeer.doSelectJoinCountry
public static function doSelectJoinCountry(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) { $criteria = clone $criteria; // Set the correct dbName if it has not been overridden if ($criteria->getDbName() == Propel::getDefaultDB()) { $criteria->setDbName(C...
php
public static function doSelectJoinCountry(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) { $criteria = clone $criteria; // Set the correct dbName if it has not been overridden if ($criteria->getDbName() == Propel::getDefaultDB()) { $criteria->setDbName(C...
[ "public", "static", "function", "doSelectJoinCountry", "(", "Criteria", "$", "criteria", ",", "$", "con", "=", "null", ",", "$", "join_behavior", "=", "Criteria", "::", "LEFT_JOIN", ")", "{", "$", "criteria", "=", "clone", "$", "criteria", ";", "// Set the c...
Selects a collection of Customer objects pre-filled with their Country objects. @param Criteria $criteria @param PropelPDO $con @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN @return array Array of Customer objects. @throws PropelException Any excepti...
[ "Selects", "a", "collection", "of", "Customer", "objects", "pre", "-", "filled", "with", "their", "Country", "objects", "." ]
2ba86d96f1f41f9424e2229c4e2b13017e973f89
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseCustomerPeer.php#L589-L644
18,793
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseCustomerPeer.php
BaseCustomerPeer.doDeleteAll
public static function doDeleteAll(PropelPDO $con = null) { if ($con === null) { $con = Propel::getConnection(CustomerPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); } $affectedRows = 0; // initialize var to track total num of affected rows try { // use transa...
php
public static function doDeleteAll(PropelPDO $con = null) { if ($con === null) { $con = Propel::getConnection(CustomerPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); } $affectedRows = 0; // initialize var to track total num of affected rows try { // use transa...
[ "public", "static", "function", "doDeleteAll", "(", "PropelPDO", "$", "con", "=", "null", ")", "{", "if", "(", "$", "con", "===", "null", ")", "{", "$", "con", "=", "Propel", "::", "getConnection", "(", "CustomerPeer", "::", "DATABASE_NAME", ",", "Propel...
Deletes all rows from the customer table. @param PropelPDO $con the connection to use @return int The number of affected rows (if supported by underlying database driver). @throws PropelException
[ "Deletes", "all", "rows", "from", "the", "customer", "table", "." ]
2ba86d96f1f41f9424e2229c4e2b13017e973f89
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseCustomerPeer.php#L889-L914
18,794
whisller/IrcBotBundle
EventListener/Irc/ServerRequestListener.php
ServerRequestListener.processStringData
private function processStringData(DataFromServerEvent $event) { $regex = "/^(?:[:@]([^\\s]+) )?([^\\s]+)(?: ((?:[^:\\s][^\\s]* ?)*))?(?: ?:(.*))?$/"; // @author Joshua Lückers (http://joshualuckers.nl/2010/01/10/regular-expression-to-match-raw-irc-messages/) preg_match($regex, $event->getData(), $m...
php
private function processStringData(DataFromServerEvent $event) { $regex = "/^(?:[:@]([^\\s]+) )?([^\\s]+)(?: ((?:[^:\\s][^\\s]* ?)*))?(?: ?:(.*))?$/"; // @author Joshua Lückers (http://joshualuckers.nl/2010/01/10/regular-expression-to-match-raw-irc-messages/) preg_match($regex, $event->getData(), $m...
[ "private", "function", "processStringData", "(", "DataFromServerEvent", "$", "event", ")", "{", "$", "regex", "=", "\"/^(?:[:@]([^\\\\s]+) )?([^\\\\s]+)(?: ((?:[^:\\\\s][^\\\\s]* ?)*))?(?: ?:(.*))?$/\"", ";", "// @author Joshua Lückers (http://joshualuckers.nl/2010/01/10/regular-expressi...
Process string response from server. @param DataFromServerEvent $event
[ "Process", "string", "response", "from", "server", "." ]
d8bcafc1599cbbc7756b0a59f51ee988a2de0f2e
https://github.com/whisller/IrcBotBundle/blob/d8bcafc1599cbbc7756b0a59f51ee988a2de0f2e/EventListener/Irc/ServerRequestListener.php#L45-L53
18,795
EvanDotPro/EdpGithub
src/EdpGithub/Listener/Auth/HttpToken.php
HttpToken.preSend
public function preSend(Event $e) { $validator = new NotEmpty(); if (!isset($this->options['tokenOrLogin']) || !$validator->isValid($this->options['tokenOrLogin']) ) { throw new Exception\InvalidArgumentException('You need to set OAuth token!'); } /*...
php
public function preSend(Event $e) { $validator = new NotEmpty(); if (!isset($this->options['tokenOrLogin']) || !$validator->isValid($this->options['tokenOrLogin']) ) { throw new Exception\InvalidArgumentException('You need to set OAuth token!'); } /*...
[ "public", "function", "preSend", "(", "Event", "$", "e", ")", "{", "$", "validator", "=", "new", "NotEmpty", "(", ")", ";", "if", "(", "!", "isset", "(", "$", "this", "->", "options", "[", "'tokenOrLogin'", "]", ")", "||", "!", "$", "validator", "-...
Add Authorization Token to Header @throws Exception\InvalidArgumentException
[ "Add", "Authorization", "Token", "to", "Header" ]
51f3e33e02edbef011103e3c2c1629d46af011a3
https://github.com/EvanDotPro/EdpGithub/blob/51f3e33e02edbef011103e3c2c1629d46af011a3/src/EdpGithub/Listener/Auth/HttpToken.php#L17-L35
18,796
ClanCats/Core
src/console/migrator.php
migrator.action_create
public function action_create( $params ) { $name = array_shift( $params ); $file = \DB\Migrator::path( $name ); \CCFile::write( $file, "# ---> up\n\n\n\n# ---> down\n\n" ); }
php
public function action_create( $params ) { $name = array_shift( $params ); $file = \DB\Migrator::path( $name ); \CCFile::write( $file, "# ---> up\n\n\n\n# ---> down\n\n" ); }
[ "public", "function", "action_create", "(", "$", "params", ")", "{", "$", "name", "=", "array_shift", "(", "$", "params", ")", ";", "$", "file", "=", "\\", "DB", "\\", "Migrator", "::", "path", "(", "$", "name", ")", ";", "\\", "CCFile", "::", "wri...
Create new migration @param array $params @return void
[ "Create", "new", "migration" ]
9f6ec72c1a439de4b253d0223f1029f7f85b6ef8
https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/console/migrator.php#L66-L73
18,797
PortaText/php-sdk
src/PortaText/Command/Api/Sms.php
Sms.schedule
public function schedule($type, $details) { $schedule = array(); $schedule[$type] = $details; return $this->setArgument("schedule", $schedule); }
php
public function schedule($type, $details) { $schedule = array(); $schedule[$type] = $details; return $this->setArgument("schedule", $schedule); }
[ "public", "function", "schedule", "(", "$", "type", ",", "$", "details", ")", "{", "$", "schedule", "=", "array", "(", ")", ";", "$", "schedule", "[", "$", "type", "]", "=", "$", "details", ";", "return", "$", "this", "->", "setArgument", "(", "\"s...
Schedule this message @param integer $type Schedule type. @param array $details Schedule configuration. @return PortaText\Command\ICommand @see https://github.com/PortaText/docs/wiki/REST-API#schedules
[ "Schedule", "this", "message" ]
dbe04ef043db5b251953f9de57aa4d0f1785dfcc
https://github.com/PortaText/php-sdk/blob/dbe04ef043db5b251953f9de57aa4d0f1785dfcc/src/PortaText/Command/Api/Sms.php#L140-L145
18,798
yuncms/framework
src/helpers/SearchHelper.php
SearchHelper._getCharMap
private static function _getCharMap(): array { // Keep local copy static $map = []; if (empty($map)) { // This will replace accented chars with non-accented chars foreach (StringHelper::asciiCharMap() as $asciiChar => $charsArray) { foreach ($charsArr...
php
private static function _getCharMap(): array { // Keep local copy static $map = []; if (empty($map)) { // This will replace accented chars with non-accented chars foreach (StringHelper::asciiCharMap() as $asciiChar => $charsArray) { foreach ($charsArr...
[ "private", "static", "function", "_getCharMap", "(", ")", ":", "array", "{", "// Keep local copy", "static", "$", "map", "=", "[", "]", ";", "if", "(", "empty", "(", "$", "map", ")", ")", "{", "// This will replace accented chars with non-accented chars", "forea...
Get array of chars to be used for conversion. @return array
[ "Get", "array", "of", "chars", "to", "be", "used", "for", "conversion", "." ]
af42e28ea4ae15ab8eead3f6d119f93863b94154
https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/helpers/SearchHelper.php#L71-L92
18,799
gibilogic/crud-bundle
Utility/FlashableTrait.php
FlashableTrait.addUserFlash
protected function addUserFlash(SessionInterface $session, $type, $message) { $session->getFlashBag()->add($type, $message); }
php
protected function addUserFlash(SessionInterface $session, $type, $message) { $session->getFlashBag()->add($type, $message); }
[ "protected", "function", "addUserFlash", "(", "SessionInterface", "$", "session", ",", "$", "type", ",", "$", "message", ")", "{", "$", "session", "->", "getFlashBag", "(", ")", "->", "add", "(", "$", "type", ",", "$", "message", ")", ";", "}" ]
Adds a flash message to the given session. @param \Symfony\Component\HttpFoundation\Session\SessionInterface $session @param string $type @param string $message
[ "Adds", "a", "flash", "message", "to", "the", "given", "session", "." ]
847e7c7bee4016026411eb230154f24986335633
https://github.com/gibilogic/crud-bundle/blob/847e7c7bee4016026411eb230154f24986335633/Utility/FlashableTrait.php#L64-L67