repository_name
stringlengths
5
67
func_path_in_repository
stringlengths
4
234
func_name
stringlengths
0
314
whole_func_string
stringlengths
52
3.87M
language
stringclasses
6 values
func_code_string
stringlengths
52
3.87M
func_code_tokens
listlengths
15
672k
func_documentation_string
stringlengths
1
47.2k
func_documentation_tokens
listlengths
1
3.92k
split_name
stringclasses
1 value
func_code_url
stringlengths
85
339
joomlatools/joomlatools-platform-legacy
code/error/error.php
JError.setErrorHandling
public static function setErrorHandling($level, $mode, $options = null) { JLog::add('JError::setErrorHandling() is deprecated.', JLog::WARNING, 'deprecated'); $levels = self::$levels; $function = 'handle' . ucfirst($mode); if (!is_callable(array('JError', $function))) { return self::raiseError(E_ERROR,...
php
public static function setErrorHandling($level, $mode, $options = null) { JLog::add('JError::setErrorHandling() is deprecated.', JLog::WARNING, 'deprecated'); $levels = self::$levels; $function = 'handle' . ucfirst($mode); if (!is_callable(array('JError', $function))) { return self::raiseError(E_ERROR,...
[ "public", "static", "function", "setErrorHandling", "(", "$", "level", ",", "$", "mode", ",", "$", "options", "=", "null", ")", "{", "JLog", "::", "add", "(", "'JError::setErrorHandling() is deprecated.'", ",", "JLog", "::", "WARNING", ",", "'deprecated'", ")"...
Method to set the way the JError will handle different error levels. Use this if you want to override the default settings. Error handling modes: - ignore - echo - verbose - die - message - log - callback You may also set the error handling for several modes at once using PHP's bit operations. Examples: - E_ALL = Set...
[ "Method", "to", "set", "the", "way", "the", "JError", "will", "handle", "different", "error", "levels", ".", "Use", "this", "if", "you", "want", "to", "override", "the", "default", "settings", "." ]
train
https://github.com/joomlatools/joomlatools-platform-legacy/blob/3a76944e2f2c415faa6504754c75321a3b478c06/code/error/error.php#L370-L431
joomlatools/joomlatools-platform-legacy
code/error/error.php
JError.registerErrorLevel
public static function registerErrorLevel($level, $name, $handler = 'ignore') { JLog::add('JError::registerErrorLevel() is deprecated.', JLog::WARNING, 'deprecated'); if (isset(self::$levels[$level])) { return false; } self::$levels[$level] = $name; self::setErrorHandling($level, $handler); return ...
php
public static function registerErrorLevel($level, $name, $handler = 'ignore') { JLog::add('JError::registerErrorLevel() is deprecated.', JLog::WARNING, 'deprecated'); if (isset(self::$levels[$level])) { return false; } self::$levels[$level] = $name; self::setErrorHandling($level, $handler); return ...
[ "public", "static", "function", "registerErrorLevel", "(", "$", "level", ",", "$", "name", ",", "$", "handler", "=", "'ignore'", ")", "{", "JLog", "::", "add", "(", "'JError::registerErrorLevel() is deprecated.'", ",", "JLog", "::", "WARNING", ",", "'deprecated'...
Method to register a new error level for handling errors This allows you to add custom error levels to the built-in - E_NOTICE - E_WARNING - E_NOTICE @param integer $level Error level to register @param string $name Human readable name for the error level @param string $handler Error handler to set...
[ "Method", "to", "register", "a", "new", "error", "level", "for", "handling", "errors" ]
train
https://github.com/joomlatools/joomlatools-platform-legacy/blob/3a76944e2f2c415faa6504754c75321a3b478c06/code/error/error.php#L482-L495
joomlatools/joomlatools-platform-legacy
code/error/error.php
JError.translateErrorLevel
public static function translateErrorLevel($level) { JLog::add('JError::translateErrorLevel() is deprecated.', JLog::WARNING, 'deprecated'); if (isset(self::$levels[$level])) { return self::$levels[$level]; } return false; }
php
public static function translateErrorLevel($level) { JLog::add('JError::translateErrorLevel() is deprecated.', JLog::WARNING, 'deprecated'); if (isset(self::$levels[$level])) { return self::$levels[$level]; } return false; }
[ "public", "static", "function", "translateErrorLevel", "(", "$", "level", ")", "{", "JLog", "::", "add", "(", "'JError::translateErrorLevel() is deprecated.'", ",", "JLog", "::", "WARNING", ",", "'deprecated'", ")", ";", "if", "(", "isset", "(", "self", "::", ...
Translate an error level integer to a human readable string e.g. E_ERROR will be translated to 'Error' @param integer $level Error level to translate @return string|boolean Human readable error level name or boolean false if it doesn't exist @deprecated 12.1 @since 11.1
[ "Translate", "an", "error", "level", "integer", "to", "a", "human", "readable", "string", "e", ".", "g", ".", "E_ERROR", "will", "be", "translated", "to", "Error" ]
train
https://github.com/joomlatools/joomlatools-platform-legacy/blob/3a76944e2f2c415faa6504754c75321a3b478c06/code/error/error.php#L509-L519
joomlatools/joomlatools-platform-legacy
code/error/error.php
JError.handleEcho
public static function handleEcho(&$error, $options) { JLog::add('JError::handleEcho() is deprecated.', JLog::WARNING, 'deprecated'); $level_human = self::translateErrorLevel($error->get('level')); // If system debug is set, then output some more information. if (JDEBUG) { $backtrace = $error->getTrace(...
php
public static function handleEcho(&$error, $options) { JLog::add('JError::handleEcho() is deprecated.', JLog::WARNING, 'deprecated'); $level_human = self::translateErrorLevel($error->get('level')); // If system debug is set, then output some more information. if (JDEBUG) { $backtrace = $error->getTrace(...
[ "public", "static", "function", "handleEcho", "(", "&", "$", "error", ",", "$", "options", ")", "{", "JLog", "::", "add", "(", "'JError::handleEcho() is deprecated.'", ",", "JLog", "::", "WARNING", ",", "'deprecated'", ")", ";", "$", "level_human", "=", "sel...
Echo error handler - Echos the error message to output @param JException &$error Exception object to handle @param array $options Handler options @return JException The exception object @deprecated 12.1 @see JError::raise() @since 11.1
[ "Echo", "error", "handler", "-", "Echos", "the", "error", "message", "to", "output" ]
train
https://github.com/joomlatools/joomlatools-platform-legacy/blob/3a76944e2f2c415faa6504754c75321a3b478c06/code/error/error.php#L554-L615
joomlatools/joomlatools-platform-legacy
code/error/error.php
JError.handleVerbose
public static function handleVerbose(&$error, $options) { JLog::add('JError::handleVerbose() is deprecated.', JLog::WARNING, 'deprecated'); $level_human = self::translateErrorLevel($error->get('level')); $info = $error->get('info'); if (isset($_SERVER['HTTP_HOST'])) { // Output as html echo "<br /><b...
php
public static function handleVerbose(&$error, $options) { JLog::add('JError::handleVerbose() is deprecated.', JLog::WARNING, 'deprecated'); $level_human = self::translateErrorLevel($error->get('level')); $info = $error->get('info'); if (isset($_SERVER['HTTP_HOST'])) { // Output as html echo "<br /><b...
[ "public", "static", "function", "handleVerbose", "(", "&", "$", "error", ",", "$", "options", ")", "{", "JLog", "::", "add", "(", "'JError::handleVerbose() is deprecated.'", ",", "JLog", "::", "WARNING", ",", "'deprecated'", ")", ";", "$", "level_human", "=", ...
Verbose error handler - Echos the error message to output as well as related info @param JException &$error Exception object to handle @param array $options Handler options @return JException The exception object @deprecated 12.1 @see JError::raise() @since 11.1
[ "Verbose", "error", "handler", "-", "Echos", "the", "error", "message", "to", "output", "as", "well", "as", "related", "info" ]
train
https://github.com/joomlatools/joomlatools-platform-legacy/blob/3a76944e2f2c415faa6504754c75321a3b478c06/code/error/error.php#L630-L661
joomlatools/joomlatools-platform-legacy
code/error/error.php
JError.handleDie
public static function handleDie(&$error, $options) { JLog::add('JError::handleDie() is deprecated.', JLog::WARNING, 'deprecated'); $level_human = self::translateErrorLevel($error->get('level')); if (isset($_SERVER['HTTP_HOST'])) { // Output as html jexit("<br /><b>J$level_human</b>: " . $error->get('m...
php
public static function handleDie(&$error, $options) { JLog::add('JError::handleDie() is deprecated.', JLog::WARNING, 'deprecated'); $level_human = self::translateErrorLevel($error->get('level')); if (isset($_SERVER['HTTP_HOST'])) { // Output as html jexit("<br /><b>J$level_human</b>: " . $error->get('m...
[ "public", "static", "function", "handleDie", "(", "&", "$", "error", ",", "$", "options", ")", "{", "JLog", "::", "add", "(", "'JError::handleDie() is deprecated.'", ",", "JLog", "::", "WARNING", ",", "'deprecated'", ")", ";", "$", "level_human", "=", "self"...
Die error handler - Echos the error message to output and then dies @param JException &$error Exception object to handle @param array $options Handler options @return void Calls die() @deprecated 12.1 @see JError::raise() @since 11.1
[ "Die", "error", "handler", "-", "Echos", "the", "error", "message", "to", "output", "and", "then", "dies" ]
train
https://github.com/joomlatools/joomlatools-platform-legacy/blob/3a76944e2f2c415faa6504754c75321a3b478c06/code/error/error.php#L676-L702
joomlatools/joomlatools-platform-legacy
code/error/error.php
JError.handleMessage
public static function handleMessage(&$error, $options) { JLog::add('JError::hanleMessage() is deprecated.', JLog::WARNING, 'deprecated'); $appl = JFactory::getApplication(); $type = ($error->get('level') == E_NOTICE) ? 'notice' : 'error'; $appl->enqueueMessage($error->get('message'), $type); return $error...
php
public static function handleMessage(&$error, $options) { JLog::add('JError::hanleMessage() is deprecated.', JLog::WARNING, 'deprecated'); $appl = JFactory::getApplication(); $type = ($error->get('level') == E_NOTICE) ? 'notice' : 'error'; $appl->enqueueMessage($error->get('message'), $type); return $error...
[ "public", "static", "function", "handleMessage", "(", "&", "$", "error", ",", "$", "options", ")", "{", "JLog", "::", "add", "(", "'JError::hanleMessage() is deprecated.'", ",", "JLog", "::", "WARNING", ",", "'deprecated'", ")", ";", "$", "appl", "=", "JFact...
Message error handler Enqueues the error message into the system queue @param JException &$error Exception object to handle @param array $options Handler options @return JException The exception object @deprecated 12.1 @see JError::raise() @since 11.1
[ "Message", "error", "handler", "Enqueues", "the", "error", "message", "into", "the", "system", "queue" ]
train
https://github.com/joomlatools/joomlatools-platform-legacy/blob/3a76944e2f2c415faa6504754c75321a3b478c06/code/error/error.php#L717-L726
joomlatools/joomlatools-platform-legacy
code/error/error.php
JError.handleLog
public static function handleLog(&$error, $options) { JLog::add('JError::handleLog() is deprecated.', JLog::WARNING, 'deprecated'); static $log; if ($log == null) { $options['text_file'] = date('Y-m-d') . '.error.log'; $options['format'] = "{DATE}\t{TIME}\t{LEVEL}\t{CODE}\t{MESSAGE}"; JLog::addLogge...
php
public static function handleLog(&$error, $options) { JLog::add('JError::handleLog() is deprecated.', JLog::WARNING, 'deprecated'); static $log; if ($log == null) { $options['text_file'] = date('Y-m-d') . '.error.log'; $options['format'] = "{DATE}\t{TIME}\t{LEVEL}\t{CODE}\t{MESSAGE}"; JLog::addLogge...
[ "public", "static", "function", "handleLog", "(", "&", "$", "error", ",", "$", "options", ")", "{", "JLog", "::", "add", "(", "'JError::handleLog() is deprecated.'", ",", "JLog", "::", "WARNING", ",", "'deprecated'", ")", ";", "static", "$", "log", ";", "i...
Log error handler Logs the error message to a system log file @param JException &$error Exception object to handle @param array $options Handler options @return JException The exception object @deprecated 12.1 @see JError::raise() @since 11.1
[ "Log", "error", "handler", "Logs", "the", "error", "message", "to", "a", "system", "log", "file" ]
train
https://github.com/joomlatools/joomlatools-platform-legacy/blob/3a76944e2f2c415faa6504754c75321a3b478c06/code/error/error.php#L741-L763
joomlatools/joomlatools-platform-legacy
code/error/error.php
JError.handleCallback
public static function handleCallback(&$error, $options) { JLog::add('JError::handleCallback() is deprecated.', JLog::WARNING, 'deprecated'); return call_user_func($options, $error); }
php
public static function handleCallback(&$error, $options) { JLog::add('JError::handleCallback() is deprecated.', JLog::WARNING, 'deprecated'); return call_user_func($options, $error); }
[ "public", "static", "function", "handleCallback", "(", "&", "$", "error", ",", "$", "options", ")", "{", "JLog", "::", "add", "(", "'JError::handleCallback() is deprecated.'", ",", "JLog", "::", "WARNING", ",", "'deprecated'", ")", ";", "return", "call_user_func...
Callback error handler - Send the error object to a callback method for error handling @param JException &$error Exception object to handle @param array $options Handler options @return JException The exception object @deprecated 12.1 @see JError::raise() @since 11.1
[ "Callback", "error", "handler", "-", "Send", "the", "error", "object", "to", "a", "callback", "method", "for", "error", "handling" ]
train
https://github.com/joomlatools/joomlatools-platform-legacy/blob/3a76944e2f2c415faa6504754c75321a3b478c06/code/error/error.php#L778-L783
joomlatools/joomlatools-platform-legacy
code/error/error.php
JError.customErrorHandler
public static function customErrorHandler($level, $msg) { JLog::add('JError::customErrorHandler() is deprecated.', JLog::WARNING, 'deprecated'); self::raise($level, '', $msg); }
php
public static function customErrorHandler($level, $msg) { JLog::add('JError::customErrorHandler() is deprecated.', JLog::WARNING, 'deprecated'); self::raise($level, '', $msg); }
[ "public", "static", "function", "customErrorHandler", "(", "$", "level", ",", "$", "msg", ")", "{", "JLog", "::", "add", "(", "'JError::customErrorHandler() is deprecated.'", ",", "JLog", "::", "WARNING", ",", "'deprecated'", ")", ";", "self", "::", "raise", "...
Display a message to the user @param integer $level The error level - use any of PHP's own error levels for this: E_ERROR, E_WARNING, E_NOTICE, E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE. @param string $msg Error message, shown to user if need be. @return void @deprecated 12.1 @since 11.1
[ "Display", "a", "message", "to", "the", "user" ]
train
https://github.com/joomlatools/joomlatools-platform-legacy/blob/3a76944e2f2c415faa6504754c75321a3b478c06/code/error/error.php#L815-L820
joomlatools/joomlatools-platform-legacy
code/error/error.php
JError.renderBacktrace
public static function renderBacktrace($error) { JLog::add('JError::renderBacktrace() is deprecated.', JLog::WARNING, 'deprecated'); $contents = null; $backtrace = $error->getTrace(); if (is_array($backtrace)) { ob_start(); $j = 1; echo '<table cellpadding="0" cellspacing="0" class="Table">'; e...
php
public static function renderBacktrace($error) { JLog::add('JError::renderBacktrace() is deprecated.', JLog::WARNING, 'deprecated'); $contents = null; $backtrace = $error->getTrace(); if (is_array($backtrace)) { ob_start(); $j = 1; echo '<table cellpadding="0" cellspacing="0" class="Table">'; e...
[ "public", "static", "function", "renderBacktrace", "(", "$", "error", ")", "{", "JLog", "::", "add", "(", "'JError::renderBacktrace() is deprecated.'", ",", "JLog", "::", "WARNING", ",", "'deprecated'", ")", ";", "$", "contents", "=", "null", ";", "$", "backtr...
Render the backtrace @param Exception $error The error @return string Contents of the backtrace @deprecated 12.1 @since 11.1
[ "Render", "the", "backtrace" ]
train
https://github.com/joomlatools/joomlatools-platform-legacy/blob/3a76944e2f2c415faa6504754c75321a3b478c06/code/error/error.php#L832-L886
aedart/laravel-helpers
src/Traits/Filesystem/StorageTrait.php
StorageTrait.getStorage
public function getStorage(): ?Filesystem { if (!$this->hasStorage()) { $this->setStorage($this->getDefaultStorage()); } return $this->storage; }
php
public function getStorage(): ?Filesystem { if (!$this->hasStorage()) { $this->setStorage($this->getDefaultStorage()); } return $this->storage; }
[ "public", "function", "getStorage", "(", ")", ":", "?", "Filesystem", "{", "if", "(", "!", "$", "this", "->", "hasStorage", "(", ")", ")", "{", "$", "this", "->", "setStorage", "(", "$", "this", "->", "getDefaultStorage", "(", ")", ")", ";", "}", "...
Get storage If no storage has been set, this method will set and return a default storage, if any such value is available @see getDefaultStorage() @return Filesystem|null storage or null if none storage has been set
[ "Get", "storage" ]
train
https://github.com/aedart/laravel-helpers/blob/8b81a2d6658f3f8cb62b6be2c34773aaa2df219a/src/Traits/Filesystem/StorageTrait.php#L53-L59
aedart/laravel-helpers
src/Traits/Filesystem/StorageTrait.php
StorageTrait.getDefaultStorage
public function getDefaultStorage(): ?Filesystem { // By default, the Storage Facade does not return the // any actual storage fisk, but rather an // instance of \Illuminate\Filesystem\FilesystemManager. // Therefore, we make sure only to obtain its // "disk", to make sure th...
php
public function getDefaultStorage(): ?Filesystem { // By default, the Storage Facade does not return the // any actual storage fisk, but rather an // instance of \Illuminate\Filesystem\FilesystemManager. // Therefore, we make sure only to obtain its // "disk", to make sure th...
[ "public", "function", "getDefaultStorage", "(", ")", ":", "?", "Filesystem", "{", "// By default, the Storage Facade does not return the", "// any actual storage fisk, but rather an", "// instance of \\Illuminate\\Filesystem\\FilesystemManager.", "// Therefore, we make sure only to obtain it...
Get a default storage value, if any is available @return Filesystem|null A default storage value or Null if no default value is available
[ "Get", "a", "default", "storage", "value", "if", "any", "is", "available" ]
train
https://github.com/aedart/laravel-helpers/blob/8b81a2d6658f3f8cb62b6be2c34773aaa2df219a/src/Traits/Filesystem/StorageTrait.php#L76-L89
webforge-labs/psc-cms
lib/Psc/Data/Walker.php
Walker.walkArrayEntry
public function walkArrayEntry($entry, Type $entryType, $key, Array $array, Type $arrayType) { $walkedEntry = $this->walk($entry, $entryType); // demo zwecke (wir vergessen hier was mit key zu machen) return $this->decorateArrayEntry($walkedEntry, $key); }
php
public function walkArrayEntry($entry, Type $entryType, $key, Array $array, Type $arrayType) { $walkedEntry = $this->walk($entry, $entryType); // demo zwecke (wir vergessen hier was mit key zu machen) return $this->decorateArrayEntry($walkedEntry, $key); }
[ "public", "function", "walkArrayEntry", "(", "$", "entry", ",", "Type", "$", "entryType", ",", "$", "key", ",", "Array", "$", "array", ",", "Type", "$", "arrayType", ")", "{", "$", "walkedEntry", "=", "$", "this", "->", "walk", "(", "$", "entry", ","...
Wird aufgerufen für einen Eintrag in einem Array (kann auch unterverschachtelt sein) Entry kann noch ein nicht-Basis-Typ sein und kann dann mit $this->walk($entry, $entryType) aufgelöst werden
[ "Wird", "aufgerufen", "für", "einen", "Eintrag", "in", "einem", "Array", "(", "kann", "auch", "unterverschachtelt", "sein", ")" ]
train
https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/Data/Walker.php#L149-L152
webforge-labs/psc-cms
lib/Psc/Data/Walker.php
Walker.walkCollectionItem
public function walkCollectionItem($item, Type $itemType, $key, $collection, Type $collectionType) { $walkedItem = $this->walk($item, $itemType); // demo zwecke (wir vergessen hier was mit key zu machen) return $this->decorateCollectionItem($walkedItem, $key); }
php
public function walkCollectionItem($item, Type $itemType, $key, $collection, Type $collectionType) { $walkedItem = $this->walk($item, $itemType); // demo zwecke (wir vergessen hier was mit key zu machen) return $this->decorateCollectionItem($walkedItem, $key); }
[ "public", "function", "walkCollectionItem", "(", "$", "item", ",", "Type", "$", "itemType", ",", "$", "key", ",", "$", "collection", ",", "Type", "$", "collectionType", ")", "{", "$", "walkedItem", "=", "$", "this", "->", "walk", "(", "$", "item", ",",...
Wird aufgerufen für einen Eintrag in einer collection (kann auch unterverschachtelt sein) item kann noch ein nicht-Basis-Typ sein und kann dann mit $this->walk($item, $itemType) aufgelöst werden
[ "Wird", "aufgerufen", "für", "einen", "Eintrag", "in", "einer", "collection", "(", "kann", "auch", "unterverschachtelt", "sein", ")" ]
train
https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/Data/Walker.php#L159-L162
yuncms/framework
src/sms/gateways/YuntongxunGateway.php
YuntongxunGateway.buildEndpoint
protected function buildEndpoint($type, $resource, $datetime) { $accountType = $this->isSubAccount ? 'SubAccounts' : 'Accounts'; $sig = strtoupper(md5($this->accountSid . $this->accountToken . $datetime)); return sprintf(self::ENDPOINT_TEMPLATE, self::SERVER_IP, self::SERVER_PORT, self::SDK_...
php
protected function buildEndpoint($type, $resource, $datetime) { $accountType = $this->isSubAccount ? 'SubAccounts' : 'Accounts'; $sig = strtoupper(md5($this->accountSid . $this->accountToken . $datetime)); return sprintf(self::ENDPOINT_TEMPLATE, self::SERVER_IP, self::SERVER_PORT, self::SDK_...
[ "protected", "function", "buildEndpoint", "(", "$", "type", ",", "$", "resource", ",", "$", "datetime", ")", "{", "$", "accountType", "=", "$", "this", "->", "isSubAccount", "?", "'SubAccounts'", ":", "'Accounts'", ";", "$", "sig", "=", "strtoupper", "(", ...
Build endpoint url. @param string $type @param string $resource @param string $datetime @return string
[ "Build", "endpoint", "url", "." ]
train
https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/sms/gateways/YuntongxunGateway.php#L121-L126
titon/db
src/Titon/Db/Query/Predicate.php
Predicate.add
public function add($field, $op, $value) { $param = new Expr($field, $op, $value); $this->_params[] = $param; if ($param->useValue()) { $this->addBinding($field, $value); } return $this; }
php
public function add($field, $op, $value) { $param = new Expr($field, $op, $value); $this->_params[] = $param; if ($param->useValue()) { $this->addBinding($field, $value); } return $this; }
[ "public", "function", "add", "(", "$", "field", ",", "$", "op", ",", "$", "value", ")", "{", "$", "param", "=", "new", "Expr", "(", "$", "field", ",", "$", "op", ",", "$", "value", ")", ";", "$", "this", "->", "_params", "[", "]", "=", "$", ...
Process a parameter before adding it to the list. Set the primary predicate type if it has not been set. @param string $field @param string $op @param mixed $value @return $this
[ "Process", "a", "parameter", "before", "adding", "it", "to", "the", "list", ".", "Set", "the", "primary", "predicate", "type", "if", "it", "has", "not", "been", "set", "." ]
train
https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Query/Predicate.php#L58-L68
titon/db
src/Titon/Db/Query/Predicate.php
Predicate.also
public function also(Closure $callback) { $predicate = new Predicate(self::ALSO); $predicate->bindCallback($callback); $this->_params[] = $predicate; $this->addBinding(null, $predicate); return $this; }
php
public function also(Closure $callback) { $predicate = new Predicate(self::ALSO); $predicate->bindCallback($callback); $this->_params[] = $predicate; $this->addBinding(null, $predicate); return $this; }
[ "public", "function", "also", "(", "Closure", "$", "callback", ")", "{", "$", "predicate", "=", "new", "Predicate", "(", "self", "::", "ALSO", ")", ";", "$", "predicate", "->", "bindCallback", "(", "$", "callback", ")", ";", "$", "this", "->", "_params...
Generate a new sub-grouped AND predicate. @param \Closure $callback @return $this
[ "Generate", "a", "new", "sub", "-", "grouped", "AND", "predicate", "." ]
train
https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Query/Predicate.php#L76-L85
titon/db
src/Titon/Db/Query/Predicate.php
Predicate.between
public function between($field, $start, $end) { $this->add($field, Expr::BETWEEN, [$start, $end]); return $this; }
php
public function between($field, $start, $end) { $this->add($field, Expr::BETWEEN, [$start, $end]); return $this; }
[ "public", "function", "between", "(", "$", "field", ",", "$", "start", ",", "$", "end", ")", "{", "$", "this", "->", "add", "(", "$", "field", ",", "Expr", "::", "BETWEEN", ",", "[", "$", "start", ",", "$", "end", "]", ")", ";", "return", "$", ...
Adds a between range "BETWEEN" expression. @param string $field @param int $start @param int $end @return $this
[ "Adds", "a", "between", "range", "BETWEEN", "expression", "." ]
train
https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Query/Predicate.php#L95-L99
titon/db
src/Titon/Db/Query/Predicate.php
Predicate.bindCallback
public function bindCallback(Closure $callback, $query = null) { call_user_func_array($callback, [$this, $query]); return $this; }
php
public function bindCallback(Closure $callback, $query = null) { call_user_func_array($callback, [$this, $query]); return $this; }
[ "public", "function", "bindCallback", "(", "Closure", "$", "callback", ",", "$", "query", "=", "null", ")", "{", "call_user_func_array", "(", "$", "callback", ",", "[", "$", "this", ",", "$", "query", "]", ")", ";", "return", "$", "this", ";", "}" ]
Bind a Closure callback to this predicate and execute it. @param \Closure $callback @param \Titon\Db\Query $query @return $this
[ "Bind", "a", "Closure", "callback", "to", "this", "predicate", "and", "execute", "it", "." ]
train
https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Query/Predicate.php#L108-L112
titon/db
src/Titon/Db/Query/Predicate.php
Predicate.either
public function either(Closure $callback) { $predicate = new Predicate(self::EITHER); $predicate->bindCallback($callback); $this->_params[] = $predicate; $this->addBinding(null, $predicate); return $this; }
php
public function either(Closure $callback) { $predicate = new Predicate(self::EITHER); $predicate->bindCallback($callback); $this->_params[] = $predicate; $this->addBinding(null, $predicate); return $this; }
[ "public", "function", "either", "(", "Closure", "$", "callback", ")", "{", "$", "predicate", "=", "new", "Predicate", "(", "self", "::", "EITHER", ")", ";", "$", "predicate", "->", "bindCallback", "(", "$", "callback", ")", ";", "$", "this", "->", "_pa...
Generate a new sub-grouped OR predicate. @param \Closure $callback @return $this
[ "Generate", "a", "new", "sub", "-", "grouped", "OR", "predicate", "." ]
train
https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Query/Predicate.php#L120-L129
titon/db
src/Titon/Db/Query/Predicate.php
Predicate.eq
public function eq($field, $value) { if (is_array($value)) { $this->in($field, $value); } else if ($value === null) { $this->null($field); } else { $this->add($field, '=', $value); } return $this; }
php
public function eq($field, $value) { if (is_array($value)) { $this->in($field, $value); } else if ($value === null) { $this->null($field); } else { $this->add($field, '=', $value); } return $this; }
[ "public", "function", "eq", "(", "$", "field", ",", "$", "value", ")", "{", "if", "(", "is_array", "(", "$", "value", ")", ")", "{", "$", "this", "->", "in", "(", "$", "field", ",", "$", "value", ")", ";", "}", "else", "if", "(", "$", "value"...
Adds an equals "=" expression. @param string $field @param mixed $value @return $this
[ "Adds", "an", "equals", "=", "expression", "." ]
train
https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Query/Predicate.php#L138-L150
titon/db
src/Titon/Db/Query/Predicate.php
Predicate.hasParam
public function hasParam($field) { foreach ($this->getParams() as $param) { if ($param instanceof Expr && $param->getField() === $field) { return true; } } return false; }
php
public function hasParam($field) { foreach ($this->getParams() as $param) { if ($param instanceof Expr && $param->getField() === $field) { return true; } } return false; }
[ "public", "function", "hasParam", "(", "$", "field", ")", "{", "foreach", "(", "$", "this", "->", "getParams", "(", ")", "as", "$", "param", ")", "{", "if", "(", "$", "param", "instanceof", "Expr", "&&", "$", "param", "->", "getField", "(", ")", "=...
Return true if a field has been used in a param. @param string $field @return bool
[ "Return", "true", "if", "a", "field", "has", "been", "used", "in", "a", "param", "." ]
train
https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Query/Predicate.php#L214-L222
titon/db
src/Titon/Db/Query/Predicate.php
Predicate.in
public function in($field, $value) { $this->add($field, Expr::IN, (array) $value); return $this; }
php
public function in($field, $value) { $this->add($field, Expr::IN, (array) $value); return $this; }
[ "public", "function", "in", "(", "$", "field", ",", "$", "value", ")", "{", "$", "this", "->", "add", "(", "$", "field", ",", "Expr", "::", "IN", ",", "(", "array", ")", "$", "value", ")", ";", "return", "$", "this", ";", "}" ]
Adds an in array "IN()" expression. @param string $field @param mixed $value @return $this
[ "Adds", "an", "in", "array", "IN", "()", "expression", "." ]
train
https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Query/Predicate.php#L231-L235
titon/db
src/Titon/Db/Query/Predicate.php
Predicate.like
public function like($field, $value) { $this->add($field, Expr::LIKE, $value); return $this; }
php
public function like($field, $value) { $this->add($field, Expr::LIKE, $value); return $this; }
[ "public", "function", "like", "(", "$", "field", ",", "$", "value", ")", "{", "$", "this", "->", "add", "(", "$", "field", ",", "Expr", "::", "LIKE", ",", "$", "value", ")", ";", "return", "$", "this", ";", "}" ]
Adds a like wildcard "LIKE" expression. @param string $field @param mixed $value @return $this
[ "Adds", "a", "like", "wildcard", "LIKE", "expression", "." ]
train
https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Query/Predicate.php#L244-L248
titon/db
src/Titon/Db/Query/Predicate.php
Predicate.maybe
public function maybe(Closure $callback) { $predicate = new Predicate(self::MAYBE); $predicate->bindCallback($callback); $this->_params[] = $predicate; $this->addBinding(null, $predicate); return $this; }
php
public function maybe(Closure $callback) { $predicate = new Predicate(self::MAYBE); $predicate->bindCallback($callback); $this->_params[] = $predicate; $this->addBinding(null, $predicate); return $this; }
[ "public", "function", "maybe", "(", "Closure", "$", "callback", ")", "{", "$", "predicate", "=", "new", "Predicate", "(", "self", "::", "MAYBE", ")", ";", "$", "predicate", "->", "bindCallback", "(", "$", "callback", ")", ";", "$", "this", "->", "_para...
Generate a new sub-grouped XOR predicate. @param \Closure $callback @return $this
[ "Generate", "a", "new", "sub", "-", "grouped", "XOR", "predicate", "." ]
train
https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Query/Predicate.php#L282-L291
titon/db
src/Titon/Db/Query/Predicate.php
Predicate.neither
public function neither(Closure $callback) { $predicate = new Predicate(self::NEITHER); $predicate->bindCallback($callback); $this->_params[] = $predicate; $this->addBinding(null, $predicate); return $this; }
php
public function neither(Closure $callback) { $predicate = new Predicate(self::NEITHER); $predicate->bindCallback($callback); $this->_params[] = $predicate; $this->addBinding(null, $predicate); return $this; }
[ "public", "function", "neither", "(", "Closure", "$", "callback", ")", "{", "$", "predicate", "=", "new", "Predicate", "(", "self", "::", "NEITHER", ")", ";", "$", "predicate", "->", "bindCallback", "(", "$", "callback", ")", ";", "$", "this", "->", "_...
Generate a new sub-grouped NOR predicate. @param \Closure $callback @return $this
[ "Generate", "a", "new", "sub", "-", "grouped", "NOR", "predicate", "." ]
train
https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Query/Predicate.php#L299-L308
titon/db
src/Titon/Db/Query/Predicate.php
Predicate.notBetween
public function notBetween($field, $start, $end) { $this->add($field, Expr::NOT_BETWEEN, [$start, $end]); return $this; }
php
public function notBetween($field, $start, $end) { $this->add($field, Expr::NOT_BETWEEN, [$start, $end]); return $this; }
[ "public", "function", "notBetween", "(", "$", "field", ",", "$", "start", ",", "$", "end", ")", "{", "$", "this", "->", "add", "(", "$", "field", ",", "Expr", "::", "NOT_BETWEEN", ",", "[", "$", "start", ",", "$", "end", "]", ")", ";", "return", ...
Adds a not between range "NOT BETWEEN" expression. @param string $field @param int $start @param int $end @return $this
[ "Adds", "a", "not", "between", "range", "NOT", "BETWEEN", "expression", "." ]
train
https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Query/Predicate.php#L318-L322
titon/db
src/Titon/Db/Query/Predicate.php
Predicate.notEq
public function notEq($field, $value) { if (is_array($value)) { $this->notIn($field, $value); } else if ($value === null) { $this->notNull($field); } else { $this->add($field, '!=', $value); } return $this; }
php
public function notEq($field, $value) { if (is_array($value)) { $this->notIn($field, $value); } else if ($value === null) { $this->notNull($field); } else { $this->add($field, '!=', $value); } return $this; }
[ "public", "function", "notEq", "(", "$", "field", ",", "$", "value", ")", "{", "if", "(", "is_array", "(", "$", "value", ")", ")", "{", "$", "this", "->", "notIn", "(", "$", "field", ",", "$", "value", ")", ";", "}", "else", "if", "(", "$", "...
Adds a not equals "!=" expression. @param string $field @param mixed $value @return $this
[ "Adds", "a", "not", "equals", "!", "=", "expression", "." ]
train
https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Query/Predicate.php#L331-L343
titon/db
src/Titon/Db/Query/Predicate.php
Predicate.notIn
public function notIn($field, $value) { $this->add($field, Expr::NOT_IN, (array) $value); return $this; }
php
public function notIn($field, $value) { $this->add($field, Expr::NOT_IN, (array) $value); return $this; }
[ "public", "function", "notIn", "(", "$", "field", ",", "$", "value", ")", "{", "$", "this", "->", "add", "(", "$", "field", ",", "Expr", "::", "NOT_IN", ",", "(", "array", ")", "$", "value", ")", ";", "return", "$", "this", ";", "}" ]
Adds a not in array "NOT IN()" expression. @param string $field @param mixed $value @return $this
[ "Adds", "a", "not", "in", "array", "NOT", "IN", "()", "expression", "." ]
train
https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Query/Predicate.php#L352-L356
titon/db
src/Titon/Db/Query/Predicate.php
Predicate.notLike
public function notLike($field, $value) { $this->add($field, Expr::NOT_LIKE, $value); return $this; }
php
public function notLike($field, $value) { $this->add($field, Expr::NOT_LIKE, $value); return $this; }
[ "public", "function", "notLike", "(", "$", "field", ",", "$", "value", ")", "{", "$", "this", "->", "add", "(", "$", "field", ",", "Expr", "::", "NOT_LIKE", ",", "$", "value", ")", ";", "return", "$", "this", ";", "}" ]
Adds a not like wildcard "LIKE" expression. @param string $field @param mixed $value @return $this
[ "Adds", "a", "not", "like", "wildcard", "LIKE", "expression", "." ]
train
https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Query/Predicate.php#L365-L369
vorbind/influx-analytics
src/AnalyticsTrait.php
AnalyticsTrait.getTimezoneHourOffset
public function getTimezoneHourOffset($origin_tz = 'UTC', $format = 'h') { $remote_tz = 'UTC'; if ($origin_tz === 'UTC') { return 0 . 'h'; } $origin_dtz = new \DateTimeZone($origin_tz); $remote_dtz = new \DateTimeZone($remote_tz); $origin_dt = new \DateTime("n...
php
public function getTimezoneHourOffset($origin_tz = 'UTC', $format = 'h') { $remote_tz = 'UTC'; if ($origin_tz === 'UTC') { return 0 . 'h'; } $origin_dtz = new \DateTimeZone($origin_tz); $remote_dtz = new \DateTimeZone($remote_tz); $origin_dt = new \DateTime("n...
[ "public", "function", "getTimezoneHourOffset", "(", "$", "origin_tz", "=", "'UTC'", ",", "$", "format", "=", "'h'", ")", "{", "$", "remote_tz", "=", "'UTC'", ";", "if", "(", "$", "origin_tz", "===", "'UTC'", ")", "{", "return", "0", ".", "'h'", ";", ...
Get timezone offset in hours @param string $origin_tz @param string $format @return int
[ "Get", "timezone", "offset", "in", "hours" ]
train
https://github.com/vorbind/influx-analytics/blob/8c0c150351f045ccd3d57063f2b3b50a2c926e3e/src/AnalyticsTrait.php#L33-L45
vorbind/influx-analytics
src/AnalyticsTrait.php
AnalyticsTrait.normalizeUTC
public function normalizeUTC($date) { $parts = explode(" ", $date); if (!is_array($parts) || count($parts) != 2) { throw new AnalyticsNormalizeException("Error normalize date, wrong format[$date]"); } return $parts[0] . "T" . $parts[1] . "Z"; }
php
public function normalizeUTC($date) { $parts = explode(" ", $date); if (!is_array($parts) || count($parts) != 2) { throw new AnalyticsNormalizeException("Error normalize date, wrong format[$date]"); } return $parts[0] . "T" . $parts[1] . "Z"; }
[ "public", "function", "normalizeUTC", "(", "$", "date", ")", "{", "$", "parts", "=", "explode", "(", "\" \"", ",", "$", "date", ")", ";", "if", "(", "!", "is_array", "(", "$", "parts", ")", "||", "count", "(", "$", "parts", ")", "!=", "2", ")", ...
Normalize UTC @param string $date @return string
[ "Normalize", "UTC" ]
train
https://github.com/vorbind/influx-analytics/blob/8c0c150351f045ccd3d57063f2b3b50a2c926e3e/src/AnalyticsTrait.php#L53-L59
vorbind/influx-analytics
src/AnalyticsTrait.php
AnalyticsTrait.arrayMultiSearch
public function arrayMultiSearch($needle, $haystack) { foreach ($haystack as $key => $data) { if (in_array($needle, $data)) { return $key; } } return false; }
php
public function arrayMultiSearch($needle, $haystack) { foreach ($haystack as $key => $data) { if (in_array($needle, $data)) { return $key; } } return false; }
[ "public", "function", "arrayMultiSearch", "(", "$", "needle", ",", "$", "haystack", ")", "{", "foreach", "(", "$", "haystack", "as", "$", "key", "=>", "$", "data", ")", "{", "if", "(", "in_array", "(", "$", "needle", ",", "$", "data", ")", ")", "{"...
Find key by sub value @param string $needle @param array $haystack @return string
[ "Find", "key", "by", "sub", "value" ]
train
https://github.com/vorbind/influx-analytics/blob/8c0c150351f045ccd3d57063f2b3b50a2c926e3e/src/AnalyticsTrait.php#L68-L75
opis/container
src/Container.php
Container.resolve
protected function resolve(string $abstract, array &$stack = []): Dependency { if (isset($this->aliases[$abstract])) { $alias = $this->aliases[$abstract]; if (in_array($alias, $stack)) { $stack[] = $alias; $error = implode(' => ', $stack); ...
php
protected function resolve(string $abstract, array &$stack = []): Dependency { if (isset($this->aliases[$abstract])) { $alias = $this->aliases[$abstract]; if (in_array($alias, $stack)) { $stack[] = $alias; $error = implode(' => ', $stack); ...
[ "protected", "function", "resolve", "(", "string", "$", "abstract", ",", "array", "&", "$", "stack", "=", "[", "]", ")", ":", "Dependency", "{", "if", "(", "isset", "(", "$", "this", "->", "aliases", "[", "$", "abstract", "]", ")", ")", "{", "$", ...
Resolves an abstract type @param string $abstract @param array $stack @return Dependency
[ "Resolves", "an", "abstract", "type" ]
train
https://github.com/opis/container/blob/3cc9da8392e912ad8854ba584f2899a077e067e7/src/Container.php#L179-L199
opis/container
src/Container.php
Container.build
protected function build($concrete, array $arguments = []) { if (is_callable($concrete)) { return $concrete($this, $arguments); } if (isset($this->reflectionClass[$concrete])) { $reflection = $this->reflectionClass[$concrete]; } else { try { ...
php
protected function build($concrete, array $arguments = []) { if (is_callable($concrete)) { return $concrete($this, $arguments); } if (isset($this->reflectionClass[$concrete])) { $reflection = $this->reflectionClass[$concrete]; } else { try { ...
[ "protected", "function", "build", "(", "$", "concrete", ",", "array", "$", "arguments", "=", "[", "]", ")", "{", "if", "(", "is_callable", "(", "$", "concrete", ")", ")", "{", "return", "$", "concrete", "(", "$", "this", ",", "$", "arguments", ")", ...
Builds an instance of a concrete type @param string|callable $concrete @param array $arguments @return object
[ "Builds", "an", "instance", "of", "a", "concrete", "type" ]
train
https://github.com/opis/container/blob/3cc9da8392e912ad8854ba584f2899a077e067e7/src/Container.php#L208-L269
arsengoian/viper-framework
src/Viper/Template/Viper.php
Viper.parse
public function parse() { /** @noinspection PhpParamsInspection */ return $this -> execute(Util::cache( $this -> file, $this -> raw, 'viper', function($data): NodeCollection { $tokens = $this -> tokenize($data); return $this -> formLogicalTree($tokens); } ), $this -> data); }
php
public function parse() { /** @noinspection PhpParamsInspection */ return $this -> execute(Util::cache( $this -> file, $this -> raw, 'viper', function($data): NodeCollection { $tokens = $this -> tokenize($data); return $this -> formLogicalTree($tokens); } ), $this -> data); }
[ "public", "function", "parse", "(", ")", "{", "/** @noinspection PhpParamsInspection */", "return", "$", "this", "->", "execute", "(", "Util", "::", "cache", "(", "$", "this", "->", "file", ",", "$", "this", "->", "raw", ",", "'viper'", ",", "function", "(...
Chief executive viper function
[ "Chief", "executive", "viper", "function" ]
train
https://github.com/arsengoian/viper-framework/blob/22796c5cc219cae3ca0b4af370a347ba2acab0f2/src/Viper/Template/Viper.php#L39-L50
VincentChalnot/SidusEAVFilterBundle
Query/Handler/EAVQueryHandler.php
EAVQueryHandler.getFamily
public function getFamily(): FamilyInterface { $familyCode = $this->getConfiguration()->getOption('family'); if (null === $familyCode) { throw new UnexpectedValueException( "Missing 'family' configuration option for {$this->getConfiguration()->getCode()}" ); ...
php
public function getFamily(): FamilyInterface { $familyCode = $this->getConfiguration()->getOption('family'); if (null === $familyCode) { throw new UnexpectedValueException( "Missing 'family' configuration option for {$this->getConfiguration()->getCode()}" ); ...
[ "public", "function", "getFamily", "(", ")", ":", "FamilyInterface", "{", "$", "familyCode", "=", "$", "this", "->", "getConfiguration", "(", ")", "->", "getOption", "(", "'family'", ")", ";", "if", "(", "null", "===", "$", "familyCode", ")", "{", "throw...
@throws \UnexpectedValueException @return FamilyInterface
[ "@throws", "\\", "UnexpectedValueException" ]
train
https://github.com/VincentChalnot/SidusEAVFilterBundle/blob/25a9e0495fae30cb96ecded56c50cf7fe70c9032/Query/Handler/EAVQueryHandler.php#L78-L88
VincentChalnot/SidusEAVFilterBundle
Query/Handler/EAVQueryHandler.php
EAVQueryHandler.getEAVAttributeQueryBuilder
public function getEAVAttributeQueryBuilder( EAVQueryBuilderInterface $eavQueryBuilder, $attributePath ): AttributeQueryBuilderInterface { return $this->filterHelper->getEAVAttributeQueryBuilder( $eavQueryBuilder, $this->getFamily(), $attributePath, ...
php
public function getEAVAttributeQueryBuilder( EAVQueryBuilderInterface $eavQueryBuilder, $attributePath ): AttributeQueryBuilderInterface { return $this->filterHelper->getEAVAttributeQueryBuilder( $eavQueryBuilder, $this->getFamily(), $attributePath, ...
[ "public", "function", "getEAVAttributeQueryBuilder", "(", "EAVQueryBuilderInterface", "$", "eavQueryBuilder", ",", "$", "attributePath", ")", ":", "AttributeQueryBuilderInterface", "{", "return", "$", "this", "->", "filterHelper", "->", "getEAVAttributeQueryBuilder", "(", ...
@param EAVQueryBuilderInterface $eavQueryBuilder @param string $attributePath @throws \UnexpectedValueException @return AttributeQueryBuilderInterface
[ "@param", "EAVQueryBuilderInterface", "$eavQueryBuilder", "@param", "string", "$attributePath" ]
train
https://github.com/VincentChalnot/SidusEAVFilterBundle/blob/25a9e0495fae30cb96ecded56c50cf7fe70c9032/Query/Handler/EAVQueryHandler.php#L98-L108
VincentChalnot/SidusEAVFilterBundle
Query/Handler/EAVQueryHandler.php
EAVQueryHandler.getEAVAttributes
public function getEAVAttributes(FilterInterface $filter): array { return $this->filterHelper->getEAVAttributes($this->getFamily(), $filter->getAttributes()); }
php
public function getEAVAttributes(FilterInterface $filter): array { return $this->filterHelper->getEAVAttributes($this->getFamily(), $filter->getAttributes()); }
[ "public", "function", "getEAVAttributes", "(", "FilterInterface", "$", "filter", ")", ":", "array", "{", "return", "$", "this", "->", "filterHelper", "->", "getEAVAttributes", "(", "$", "this", "->", "getFamily", "(", ")", ",", "$", "filter", "->", "getAttri...
@param FilterInterface $filter @throws \UnexpectedValueException @return AttributeInterface[]
[ "@param", "FilterInterface", "$filter" ]
train
https://github.com/VincentChalnot/SidusEAVFilterBundle/blob/25a9e0495fae30cb96ecded56c50cf7fe70c9032/Query/Handler/EAVQueryHandler.php#L117-L120
VincentChalnot/SidusEAVFilterBundle
Query/Handler/EAVQueryHandler.php
EAVQueryHandler.isEAVFilter
public function isEAVFilter(FilterInterface $filter): bool { try { $this->getEAVAttributes($filter); return true; } catch (MissingAttributeException $e) { return false; } }
php
public function isEAVFilter(FilterInterface $filter): bool { try { $this->getEAVAttributes($filter); return true; } catch (MissingAttributeException $e) { return false; } }
[ "public", "function", "isEAVFilter", "(", "FilterInterface", "$", "filter", ")", ":", "bool", "{", "try", "{", "$", "this", "->", "getEAVAttributes", "(", "$", "filter", ")", ";", "return", "true", ";", "}", "catch", "(", "MissingAttributeException", "$", ...
@param FilterInterface $filter @throws \UnexpectedValueException @return bool
[ "@param", "FilterInterface", "$filter" ]
train
https://github.com/VincentChalnot/SidusEAVFilterBundle/blob/25a9e0495fae30cb96ecded56c50cf7fe70c9032/Query/Handler/EAVQueryHandler.php#L129-L138
VincentChalnot/SidusEAVFilterBundle
Query/Handler/EAVQueryHandler.php
EAVQueryHandler.getQueryBuilder
public function getQueryBuilder(): QueryBuilder { if (!$this->queryBuilder) { $this->queryBuilder = $this->repository->createQueryBuilder($this->getAlias()); if ($this->getConfiguration()->getOption('enforce_family_condition', true)) { $familyParam = uniqid('family', ...
php
public function getQueryBuilder(): QueryBuilder { if (!$this->queryBuilder) { $this->queryBuilder = $this->repository->createQueryBuilder($this->getAlias()); if ($this->getConfiguration()->getOption('enforce_family_condition', true)) { $familyParam = uniqid('family', ...
[ "public", "function", "getQueryBuilder", "(", ")", ":", "QueryBuilder", "{", "if", "(", "!", "$", "this", "->", "queryBuilder", ")", "{", "$", "this", "->", "queryBuilder", "=", "$", "this", "->", "repository", "->", "createQueryBuilder", "(", "$", "this",...
@throws \UnexpectedValueException @return QueryBuilder
[ "@throws", "\\", "UnexpectedValueException" ]
train
https://github.com/VincentChalnot/SidusEAVFilterBundle/blob/25a9e0495fae30cb96ecded56c50cf7fe70c9032/Query/Handler/EAVQueryHandler.php#L145-L158
VincentChalnot/SidusEAVFilterBundle
Query/Handler/EAVQueryHandler.php
EAVQueryHandler.getQueryContext
public function getQueryContext(): ?array { $queryContext = $this->getConfiguration()->getOption('query_context'); if ($queryContext && $this->getConfiguration()->getOption('use_global_context')) { $queryContext = array_merge($this->getFamily()->getContext(), (array) $queryContext); ...
php
public function getQueryContext(): ?array { $queryContext = $this->getConfiguration()->getOption('query_context'); if ($queryContext && $this->getConfiguration()->getOption('use_global_context')) { $queryContext = array_merge($this->getFamily()->getContext(), (array) $queryContext); ...
[ "public", "function", "getQueryContext", "(", ")", ":", "?", "array", "{", "$", "queryContext", "=", "$", "this", "->", "getConfiguration", "(", ")", "->", "getOption", "(", "'query_context'", ")", ";", "if", "(", "$", "queryContext", "&&", "$", "this", ...
@throws \UnexpectedValueException @return array|null
[ "@throws", "\\", "UnexpectedValueException" ]
train
https://github.com/VincentChalnot/SidusEAVFilterBundle/blob/25a9e0495fae30cb96ecded56c50cf7fe70c9032/Query/Handler/EAVQueryHandler.php#L165-L173
VincentChalnot/SidusEAVFilterBundle
Query/Handler/EAVQueryHandler.php
EAVQueryHandler.getResultContext
public function getResultContext(): ?array { $context = $this->getConfiguration()->getOption('result_context'); if ($context) { $context = array_merge($this->getFamily()->getContext(), (array) $context); } return $context; }
php
public function getResultContext(): ?array { $context = $this->getConfiguration()->getOption('result_context'); if ($context) { $context = array_merge($this->getFamily()->getContext(), (array) $context); } return $context; }
[ "public", "function", "getResultContext", "(", ")", ":", "?", "array", "{", "$", "context", "=", "$", "this", "->", "getConfiguration", "(", ")", "->", "getOption", "(", "'result_context'", ")", ";", "if", "(", "$", "context", ")", "{", "$", "context", ...
@throws \UnexpectedValueException @return array|null
[ "@throws", "\\", "UnexpectedValueException" ]
train
https://github.com/VincentChalnot/SidusEAVFilterBundle/blob/25a9e0495fae30cb96ecded56c50cf7fe70c9032/Query/Handler/EAVQueryHandler.php#L180-L188
VincentChalnot/SidusEAVFilterBundle
Query/Handler/EAVQueryHandler.php
EAVQueryHandler.applySort
protected function applySort(SortConfig $sortConfig) { $attributePath = $sortConfig->getColumn(); if (!$attributePath) { return; } $rootAttribute = explode('.', $attributePath)[0]; if (!$rootAttribute || !$this->getFamily()->hasAttribute($rootAttribute)) { ...
php
protected function applySort(SortConfig $sortConfig) { $attributePath = $sortConfig->getColumn(); if (!$attributePath) { return; } $rootAttribute = explode('.', $attributePath)[0]; if (!$rootAttribute || !$this->getFamily()->hasAttribute($rootAttribute)) { ...
[ "protected", "function", "applySort", "(", "SortConfig", "$", "sortConfig", ")", "{", "$", "attributePath", "=", "$", "sortConfig", "->", "getColumn", "(", ")", ";", "if", "(", "!", "$", "attributePath", ")", "{", "return", ";", "}", "$", "rootAttribute", ...
@param SortConfig $sortConfig @throws \Sidus\EAVModelBundle\Exception\MissingAttributeException @throws \UnexpectedValueException
[ "@param", "SortConfig", "$sortConfig" ]
train
https://github.com/VincentChalnot/SidusEAVFilterBundle/blob/25a9e0495fae30cb96ecded56c50cf7fe70c9032/Query/Handler/EAVQueryHandler.php#L196-L215
VincentChalnot/SidusEAVFilterBundle
Query/Handler/EAVQueryHandler.php
EAVQueryHandler.createPager
protected function createPager(): Pagerfanta { if ($this->dataLoader instanceof ContextualizedDataLoaderInterface && null !== $this->getResultContext()) { $this->dataLoader->setCurrentContext($this->getResultContext()); } return new Pagerfanta( EAVAdapter::create( ...
php
protected function createPager(): Pagerfanta { if ($this->dataLoader instanceof ContextualizedDataLoaderInterface && null !== $this->getResultContext()) { $this->dataLoader->setCurrentContext($this->getResultContext()); } return new Pagerfanta( EAVAdapter::create( ...
[ "protected", "function", "createPager", "(", ")", ":", "Pagerfanta", "{", "if", "(", "$", "this", "->", "dataLoader", "instanceof", "ContextualizedDataLoaderInterface", "&&", "null", "!==", "$", "this", "->", "getResultContext", "(", ")", ")", "{", "$", "this"...
{@inheritdoc} @throws \UnexpectedValueException
[ "{", "@inheritdoc", "}" ]
train
https://github.com/VincentChalnot/SidusEAVFilterBundle/blob/25a9e0495fae30cb96ecded56c50cf7fe70c9032/Query/Handler/EAVQueryHandler.php#L222-L235
xinix-technology/norm
src/Norm/Connection.php
Connection.factory
public function factory($collection) { if ($collection instanceof Collection) { $collectionName = $collection->getName(); } else { $collectionName = $collection; } if (!isset($this->collections[$collectionName])) { if (!($collection instanceof Col...
php
public function factory($collection) { if ($collection instanceof Collection) { $collectionName = $collection->getName(); } else { $collectionName = $collection; } if (!isset($this->collections[$collectionName])) { if (!($collection instanceof Col...
[ "public", "function", "factory", "(", "$", "collection", ")", "{", "if", "(", "$", "collection", "instanceof", "Collection", ")", "{", "$", "collectionName", "=", "$", "collection", "->", "getName", "(", ")", ";", "}", "else", "{", "$", "collectionName", ...
Factory to create new collection by its name or instance @param string|Norm\Collection $collection Collection name or instance @return Norm\Collection Conllection created by factory
[ "Factory", "to", "create", "new", "collection", "by", "its", "name", "or", "instance" ]
train
https://github.com/xinix-technology/norm/blob/c357f7d3a75d05324dd84b8f6a968a094c53d603/src/Norm/Connection.php#L102-L124
xinix-technology/norm
src/Norm/Connection.php
Connection.unmarshall
public function unmarshall($object) { if (isset($object['id'])) { $object['$id'] = $object['id']; unset($object['id']); } foreach ($object as $key => $value) { if ($key[0] === '_') { $key[0] = '$'; $object[$key] = $value; ...
php
public function unmarshall($object) { if (isset($object['id'])) { $object['$id'] = $object['id']; unset($object['id']); } foreach ($object as $key => $value) { if ($key[0] === '_') { $key[0] = '$'; $object[$key] = $value; ...
[ "public", "function", "unmarshall", "(", "$", "object", ")", "{", "if", "(", "isset", "(", "$", "object", "[", "'id'", "]", ")", ")", "{", "$", "object", "[", "'$id'", "]", "=", "$", "object", "[", "'id'", "]", ";", "unset", "(", "$", "object", ...
Unmarshall single object from data source to associative array. The unmarshall process is necessary due to different data type provided by data source. Proper unmarshall will make sure data from data source that will be consumed by Norm in the accepted form of data. @see Norm\Connection::marshall() @param mixed $obje...
[ "Unmarshall", "single", "object", "from", "data", "source", "to", "associative", "array", ".", "The", "unmarshall", "process", "is", "necessary", "due", "to", "different", "data", "type", "provided", "by", "data", "source", ".", "Proper", "unmarshall", "will", ...
train
https://github.com/xinix-technology/norm/blob/c357f7d3a75d05324dd84b8f6a968a094c53d603/src/Norm/Connection.php#L138-L153
nyeholt/silverstripe-external-content
thirdparty/Zend/Feed/Entry/Atom.php
Zend_Feed_Entry_Atom.delete
public function delete() { // Look for link rel="edit" in the entry object. $deleteUri = $this->link('edit'); if (!$deleteUri) { /** * @see Zend_Feed_Exception */ require_once 'Zend/Feed/Exception.php'; throw new Zend_Feed_Excepti...
php
public function delete() { // Look for link rel="edit" in the entry object. $deleteUri = $this->link('edit'); if (!$deleteUri) { /** * @see Zend_Feed_Exception */ require_once 'Zend/Feed/Exception.php'; throw new Zend_Feed_Excepti...
[ "public", "function", "delete", "(", ")", "{", "// Look for link rel=\"edit\" in the entry object.", "$", "deleteUri", "=", "$", "this", "->", "link", "(", "'edit'", ")", ";", "if", "(", "!", "$", "deleteUri", ")", "{", "/**\n * @see Zend_Feed_Exception\...
Delete an atom entry. Delete tries to delete this entry from its feed. If the entry does not contain a link rel="edit", we throw an error (either the entry does not yet exist or this is not an editable feed). If we have a link rel="edit", we do the empty-body HTTP DELETE to that URI and check for a response of 2xx. Us...
[ "Delete", "an", "atom", "entry", "." ]
train
https://github.com/nyeholt/silverstripe-external-content/blob/1c6da8c56ef717225ff904e1522aff94ed051601/thirdparty/Zend/Feed/Entry/Atom.php#L74-L114
nyeholt/silverstripe-external-content
thirdparty/Zend/Feed/Entry/Atom.php
Zend_Feed_Entry_Atom.save
public function save($postUri = null) { if ($this->id()) { // If id is set, look for link rel="edit" in the // entry object and PUT. $editUri = $this->link('edit'); if (!$editUri) { /** * @see Zend_Feed_Exception ...
php
public function save($postUri = null) { if ($this->id()) { // If id is set, look for link rel="edit" in the // entry object and PUT. $editUri = $this->link('edit'); if (!$editUri) { /** * @see Zend_Feed_Exception ...
[ "public", "function", "save", "(", "$", "postUri", "=", "null", ")", "{", "if", "(", "$", "this", "->", "id", "(", ")", ")", "{", "// If id is set, look for link rel=\"edit\" in the", "// entry object and PUT.", "$", "editUri", "=", "$", "this", "->", "link", ...
Save a new or updated Atom entry. Save is used to either create new entries or to save changes to existing ones. If we have a link rel="edit", we are changing an existing entry. In this case we re-serialize the entry and PUT it to the edit URI, checking for a 200 OK result. For posting new entries, you must specify t...
[ "Save", "a", "new", "or", "updated", "Atom", "entry", "." ]
train
https://github.com/nyeholt/silverstripe-external-content/blob/1c6da8c56ef717225ff904e1522aff94ed051601/thirdparty/Zend/Feed/Entry/Atom.php#L137-L234
shrink0r/workflux
src/Builder/StateMachineBuilder.php
StateMachineBuilder.build
public function build(): StateMachineInterface { $states = new StateSet($this->states->values()->toArray()); $transitions = new TransitionSet($this->transitions->values()->toArray()); return new $this->state_machine_class($this->state_machine_name, $states, $transitions); }
php
public function build(): StateMachineInterface { $states = new StateSet($this->states->values()->toArray()); $transitions = new TransitionSet($this->transitions->values()->toArray()); return new $this->state_machine_class($this->state_machine_name, $states, $transitions); }
[ "public", "function", "build", "(", ")", ":", "StateMachineInterface", "{", "$", "states", "=", "new", "StateSet", "(", "$", "this", "->", "states", "->", "values", "(", ")", "->", "toArray", "(", ")", ")", ";", "$", "transitions", "=", "new", "Transit...
@param string $class @return StateMachineInterface
[ "@param", "string", "$class" ]
train
https://github.com/shrink0r/workflux/blob/008f45c64f52b1f795ab7f6ddbfc1a55580254d9/src/Builder/StateMachineBuilder.php#L61-L66
shrink0r/workflux
src/Builder/StateMachineBuilder.php
StateMachineBuilder.addStateMachineName
public function addStateMachineName(string $state_machine_name): self { $builder = clone $this; $builder->state_machine_name = $state_machine_name; return $builder; }
php
public function addStateMachineName(string $state_machine_name): self { $builder = clone $this; $builder->state_machine_name = $state_machine_name; return $builder; }
[ "public", "function", "addStateMachineName", "(", "string", "$", "state_machine_name", ")", ":", "self", "{", "$", "builder", "=", "clone", "$", "this", ";", "$", "builder", "->", "state_machine_name", "=", "$", "state_machine_name", ";", "return", "$", "build...
@param string $state_machine_name @return self
[ "@param", "string", "$state_machine_name" ]
train
https://github.com/shrink0r/workflux/blob/008f45c64f52b1f795ab7f6ddbfc1a55580254d9/src/Builder/StateMachineBuilder.php#L73-L78
shrink0r/workflux
src/Builder/StateMachineBuilder.php
StateMachineBuilder.addState
public function addState(StateInterface $state): self { $builder = clone $this; $builder->states[$state->getName()] = $state; return $builder; }
php
public function addState(StateInterface $state): self { $builder = clone $this; $builder->states[$state->getName()] = $state; return $builder; }
[ "public", "function", "addState", "(", "StateInterface", "$", "state", ")", ":", "self", "{", "$", "builder", "=", "clone", "$", "this", ";", "$", "builder", "->", "states", "[", "$", "state", "->", "getName", "(", ")", "]", "=", "$", "state", ";", ...
@param StateInterface $state @return self
[ "@param", "StateInterface", "$state" ]
train
https://github.com/shrink0r/workflux/blob/008f45c64f52b1f795ab7f6ddbfc1a55580254d9/src/Builder/StateMachineBuilder.php#L85-L90
shrink0r/workflux
src/Builder/StateMachineBuilder.php
StateMachineBuilder.addStates
public function addStates(array $states): self { $builder = clone $this; foreach ($states as $state) { $builder->states[$state->getName()] = $state; } return $builder; }
php
public function addStates(array $states): self { $builder = clone $this; foreach ($states as $state) { $builder->states[$state->getName()] = $state; } return $builder; }
[ "public", "function", "addStates", "(", "array", "$", "states", ")", ":", "self", "{", "$", "builder", "=", "clone", "$", "this", ";", "foreach", "(", "$", "states", "as", "$", "state", ")", "{", "$", "builder", "->", "states", "[", "$", "state", "...
@param StateInterface[] $states @return self
[ "@param", "StateInterface", "[]", "$states" ]
train
https://github.com/shrink0r/workflux/blob/008f45c64f52b1f795ab7f6ddbfc1a55580254d9/src/Builder/StateMachineBuilder.php#L97-L104
shrink0r/workflux
src/Builder/StateMachineBuilder.php
StateMachineBuilder.addTransition
public function addTransition(TransitionInterface $transition): self { if (!$this->states->hasKey($transition->getFrom())) { throw new UnknownState('Trying to add transition from unknown state: ' . $transition->getFrom()); } if (!$this->states->hasKey($transition->getTo())) { ...
php
public function addTransition(TransitionInterface $transition): self { if (!$this->states->hasKey($transition->getFrom())) { throw new UnknownState('Trying to add transition from unknown state: ' . $transition->getFrom()); } if (!$this->states->hasKey($transition->getTo())) { ...
[ "public", "function", "addTransition", "(", "TransitionInterface", "$", "transition", ")", ":", "self", "{", "if", "(", "!", "$", "this", "->", "states", "->", "hasKey", "(", "$", "transition", "->", "getFrom", "(", ")", ")", ")", "{", "throw", "new", ...
@param TransitionInterface $transition @return self
[ "@param", "TransitionInterface", "$transition" ]
train
https://github.com/shrink0r/workflux/blob/008f45c64f52b1f795ab7f6ddbfc1a55580254d9/src/Builder/StateMachineBuilder.php#L111-L128
shrink0r/workflux
src/Builder/StateMachineBuilder.php
StateMachineBuilder.addTransitions
public function addTransitions(array $transitions): self { $builder = clone $this; foreach ($transitions as $transition) { $builder = $this->addTransition($transition); } return $builder; }
php
public function addTransitions(array $transitions): self { $builder = clone $this; foreach ($transitions as $transition) { $builder = $this->addTransition($transition); } return $builder; }
[ "public", "function", "addTransitions", "(", "array", "$", "transitions", ")", ":", "self", "{", "$", "builder", "=", "clone", "$", "this", ";", "foreach", "(", "$", "transitions", "as", "$", "transition", ")", "{", "$", "builder", "=", "$", "this", "-...
@param TransitionInterface[] $transitions @return self
[ "@param", "TransitionInterface", "[]", "$transitions" ]
train
https://github.com/shrink0r/workflux/blob/008f45c64f52b1f795ab7f6ddbfc1a55580254d9/src/Builder/StateMachineBuilder.php#L135-L142
2amigos/yiifoundation
widgets/Breadcrumbs.php
Breadcrumbs.initItems
public function initItems() { if (!empty($this->items)) { $links = array(); if ($this->homeLabel !== false) { $label = $this->homeLabel !== null ? $this->homeLabel : Icon::icon(Enum::ICON_HOME); $links[$label] = array('href' => $this->homeUrl !...
php
public function initItems() { if (!empty($this->items)) { $links = array(); if ($this->homeLabel !== false) { $label = $this->homeLabel !== null ? $this->homeLabel : Icon::icon(Enum::ICON_HOME); $links[$label] = array('href' => $this->homeUrl !...
[ "public", "function", "initItems", "(", ")", "{", "if", "(", "!", "empty", "(", "$", "this", "->", "items", ")", ")", "{", "$", "links", "=", "array", "(", ")", ";", "if", "(", "$", "this", "->", "homeLabel", "!==", "false", ")", "{", "$", "lab...
Initializes menu items
[ "Initializes", "menu", "items" ]
train
https://github.com/2amigos/yiifoundation/blob/49bed0d3ca1a9bac9299000e48a2661bdc8f9a29/widgets/Breadcrumbs.php#L71-L96
2amigos/yiifoundation
widgets/Breadcrumbs.php
Breadcrumbs.renderItems
public function renderItems() { if (empty($this->items)) return; Html::addCssClass($this->htmlOptions, Enum::BREADCRUMBS); echo \CHtml::openTag($this->tagName, $this->htmlOptions); foreach ($this->items as $label => $options) { $this->renderItem($label, $opti...
php
public function renderItems() { if (empty($this->items)) return; Html::addCssClass($this->htmlOptions, Enum::BREADCRUMBS); echo \CHtml::openTag($this->tagName, $this->htmlOptions); foreach ($this->items as $label => $options) { $this->renderItem($label, $opti...
[ "public", "function", "renderItems", "(", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "items", ")", ")", "return", ";", "Html", "::", "addCssClass", "(", "$", "this", "->", "htmlOptions", ",", "Enum", "::", "BREADCRUMBS", ")", ";", "echo", ...
Renders breadcrumbs
[ "Renders", "breadcrumbs" ]
train
https://github.com/2amigos/yiifoundation/blob/49bed0d3ca1a9bac9299000e48a2661bdc8f9a29/widgets/Breadcrumbs.php#L101-L113
2amigos/yiifoundation
widgets/Breadcrumbs.php
Breadcrumbs.renderItem
public function renderItem($label, $options = array()) { if ($this->tagName === 'nav') { $url = ArrayHelper::removeValue($options, 'href', '#'); $htmlOptions = ArrayHelper::removeValue($options, 'options', array()); echo \CHtml::openTag('li', $htmlOptions); ...
php
public function renderItem($label, $options = array()) { if ($this->tagName === 'nav') { $url = ArrayHelper::removeValue($options, 'href', '#'); $htmlOptions = ArrayHelper::removeValue($options, 'options', array()); echo \CHtml::openTag('li', $htmlOptions); ...
[ "public", "function", "renderItem", "(", "$", "label", ",", "$", "options", "=", "array", "(", ")", ")", "{", "if", "(", "$", "this", "->", "tagName", "===", "'nav'", ")", "{", "$", "url", "=", "ArrayHelper", "::", "removeValue", "(", "$", "options",...
Generates the rendering of a breadcrumb item @param string $label @param array $options
[ "Generates", "the", "rendering", "of", "a", "breadcrumb", "item" ]
train
https://github.com/2amigos/yiifoundation/blob/49bed0d3ca1a9bac9299000e48a2661bdc8f9a29/widgets/Breadcrumbs.php#L120-L132
titon/db
src/Titon/Db/Driver/AbstractDriver.php
AbstractDriver.cacheQuery
public function cacheQuery($cacheKey, Closure $callback, $cacheLength = '+1 hour') { $storage = $this->getStorage(); // Use the storage engine first if ($cacheKey) { if ($storage && $storage->has($cacheKey)) { return $storage->get($cacheKey); // Fallback...
php
public function cacheQuery($cacheKey, Closure $callback, $cacheLength = '+1 hour') { $storage = $this->getStorage(); // Use the storage engine first if ($cacheKey) { if ($storage && $storage->has($cacheKey)) { return $storage->get($cacheKey); // Fallback...
[ "public", "function", "cacheQuery", "(", "$", "cacheKey", ",", "Closure", "$", "callback", ",", "$", "cacheLength", "=", "'+1 hour'", ")", "{", "$", "storage", "=", "$", "this", "->", "getStorage", "(", ")", ";", "// Use the storage engine first", "if", "(",...
A helper method for executing a query (through a closure) and caching the result. Before the query is executed, the cache is checked for its existence by a key. If a cache is found, return it, else fetch a new result and cache it. @param string|array $cacheKey @param \Closure $callback @param string|int $cacheLength @...
[ "A", "helper", "method", "for", "executing", "a", "query", "(", "through", "a", "closure", ")", "and", "caching", "the", "result", ".", "Before", "the", "query", "is", "executed", "the", "cache", "is", "checked", "for", "its", "existence", "by", "a", "ke...
train
https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Driver/AbstractDriver.php#L131-L159
titon/db
src/Titon/Db/Driver/AbstractDriver.php
AbstractDriver.disconnect
public function disconnect($flush = false) { $this->reset(); if ($this->isConnected()) { if ($flush) { $this->_connections = []; } else { unset($this->_connections[$this->getContext()]); } return true; } r...
php
public function disconnect($flush = false) { $this->reset(); if ($this->isConnected()) { if ($flush) { $this->_connections = []; } else { unset($this->_connections[$this->getContext()]); } return true; } r...
[ "public", "function", "disconnect", "(", "$", "flush", "=", "false", ")", "{", "$", "this", "->", "reset", "(", ")", ";", "if", "(", "$", "this", "->", "isConnected", "(", ")", ")", "{", "if", "(", "$", "flush", ")", "{", "$", "this", "->", "_c...
{@inheritdoc}
[ "{" ]
train
https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Driver/AbstractDriver.php#L164-L178
titon/db
src/Titon/Db/Driver/AbstractDriver.php
AbstractDriver.getConnection
public function getConnection() { $context = $this->getContext(); if (empty($this->_connections[$context])) { $this->connect(); } return $this->_connections[$context]; }
php
public function getConnection() { $context = $this->getContext(); if (empty($this->_connections[$context])) { $this->connect(); } return $this->_connections[$context]; }
[ "public", "function", "getConnection", "(", ")", "{", "$", "context", "=", "$", "this", "->", "getContext", "(", ")", ";", "if", "(", "empty", "(", "$", "this", "->", "_connections", "[", "$", "context", "]", ")", ")", "{", "$", "this", "->", "conn...
{@inheritdoc}
[ "{" ]
train
https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Driver/AbstractDriver.php#L183-L191
titon/db
src/Titon/Db/Driver/AbstractDriver.php
AbstractDriver.getContextConfig
public function getContextConfig($key) { $config = $this->allConfig(); if (isset($config['contexts'][$key])) { $config = array_merge($config, $config['contexts'][$key]); } return Hash::reduce($config, ['user', 'pass', 'host', 'port', 'database']); }
php
public function getContextConfig($key) { $config = $this->allConfig(); if (isset($config['contexts'][$key])) { $config = array_merge($config, $config['contexts'][$key]); } return Hash::reduce($config, ['user', 'pass', 'host', 'port', 'database']); }
[ "public", "function", "getContextConfig", "(", "$", "key", ")", "{", "$", "config", "=", "$", "this", "->", "allConfig", "(", ")", ";", "if", "(", "isset", "(", "$", "config", "[", "'contexts'", "]", "[", "$", "key", "]", ")", ")", "{", "$", "con...
{@inheritdoc}
[ "{" ]
train
https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Driver/AbstractDriver.php#L210-L218
titon/db
src/Titon/Db/Driver/AbstractDriver.php
AbstractDriver.getType
public function getType($key) { $types = $this->getSupportedTypes(); if (isset($types[$key])) { return new $types[$key]($this); } throw new UnsupportedTypeException(sprintf('Unsupported data type %s', $key)); }
php
public function getType($key) { $types = $this->getSupportedTypes(); if (isset($types[$key])) { return new $types[$key]($this); } throw new UnsupportedTypeException(sprintf('Unsupported data type %s', $key)); }
[ "public", "function", "getType", "(", "$", "key", ")", "{", "$", "types", "=", "$", "this", "->", "getSupportedTypes", "(", ")", ";", "if", "(", "isset", "(", "$", "types", "[", "$", "key", "]", ")", ")", "{", "return", "new", "$", "types", "[", ...
{@inheritdoc} @uses \Titon\Common\Registry @throws \Titon\Db\Exception\UnsupportedTypeException
[ "{", "@inheritdoc", "}" ]
train
https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Driver/AbstractDriver.php#L316-L324
titon/db
src/Titon/Db/Driver/AbstractDriver.php
AbstractDriver.logQuery
public function logQuery(ResultSet $result) { $this->_logs[] = $result; // Cast the SQL to string and log it if ($logger = $this->getLogger()) { $logger->debug((string) $result); } return $this; }
php
public function logQuery(ResultSet $result) { $this->_logs[] = $result; // Cast the SQL to string and log it if ($logger = $this->getLogger()) { $logger->debug((string) $result); } return $this; }
[ "public", "function", "logQuery", "(", "ResultSet", "$", "result", ")", "{", "$", "this", "->", "_logs", "[", "]", "=", "$", "result", ";", "// Cast the SQL to string and log it", "if", "(", "$", "logger", "=", "$", "this", "->", "getLogger", "(", ")", "...
{@inheritdoc}
[ "{" ]
train
https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Driver/AbstractDriver.php#L343-L352
titon/db
src/Titon/Db/Driver/AbstractDriver.php
AbstractDriver.reset
public function reset() { if ($this->_result) { $this->_result->close(); $this->_result = null; } // Clear the cache $this->flushCache(); return $this; }
php
public function reset() { if ($this->_result) { $this->_result->close(); $this->_result = null; } // Clear the cache $this->flushCache(); return $this; }
[ "public", "function", "reset", "(", ")", "{", "if", "(", "$", "this", "->", "_result", ")", "{", "$", "this", "->", "_result", "->", "close", "(", ")", ";", "$", "this", "->", "_result", "=", "null", ";", "}", "// Clear the cache", "$", "this", "->...
{@inheritdoc}
[ "{" ]
train
https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Driver/AbstractDriver.php#L364-L374
titon/db
src/Titon/Db/Driver/AbstractDriver.php
AbstractDriver.transaction
public function transaction(Closure $bulk) { if (!$this->startTransaction()) { // @codeCoverageIgnoreStart throw new QueryFailureException('Failed to start database transaction'); // @codeCoverageIgnoreEnd } try { $result = call_user_func($bulk, $...
php
public function transaction(Closure $bulk) { if (!$this->startTransaction()) { // @codeCoverageIgnoreStart throw new QueryFailureException('Failed to start database transaction'); // @codeCoverageIgnoreEnd } try { $result = call_user_func($bulk, $...
[ "public", "function", "transaction", "(", "Closure", "$", "bulk", ")", "{", "if", "(", "!", "$", "this", "->", "startTransaction", "(", ")", ")", "{", "// @codeCoverageIgnoreStart", "throw", "new", "QueryFailureException", "(", "'Failed to start database transaction...
{@inheritdoc}
[ "{" ]
train
https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Driver/AbstractDriver.php#L419-L438
forxer/tao
src/Tao/Html/Modifiers.php
Modifiers.strToSlug
static public function strToSlug($string, $bWithSlashes = true) { switch ($GLOBALS['okt']->config->slug_type) { case 'utf8': return self::tidyURL($string, $bWithSlashes); case 'ascii': default: return self::strToLowerURL($string, $bWithSlashes); } }
php
static public function strToSlug($string, $bWithSlashes = true) { switch ($GLOBALS['okt']->config->slug_type) { case 'utf8': return self::tidyURL($string, $bWithSlashes); case 'ascii': default: return self::strToLowerURL($string, $bWithSlashes); } }
[ "static", "public", "function", "strToSlug", "(", "$", "string", ",", "$", "bWithSlashes", "=", "true", ")", "{", "switch", "(", "$", "GLOBALS", "[", "'okt'", "]", "->", "config", "->", "slug_type", ")", "{", "case", "'utf8'", ":", "return", "self", ":...
Transform a string in slug regarding to Okatea configuration. @param string $string String to transform @param boolean $bWithSlashes in URL @return string
[ "Transform", "a", "string", "in", "slug", "regarding", "to", "Okatea", "configuration", "." ]
train
https://github.com/forxer/tao/blob/b5e9109c244a29a72403ae6a58633ab96a67c660/src/Tao/Html/Modifiers.php#L28-L39
forxer/tao
src/Tao/Html/Modifiers.php
Modifiers.strToUrl
public static function strToUrl($string, $bWithSlashes = true) { $string = self::deaccent($string); $string = preg_replace('/[^A-Za-z0-9_\s\'\:\/[\]-]/', '', $string); return self::tidyUrl($string, $bWithSlashes); }
php
public static function strToUrl($string, $bWithSlashes = true) { $string = self::deaccent($string); $string = preg_replace('/[^A-Za-z0-9_\s\'\:\/[\]-]/', '', $string); return self::tidyUrl($string, $bWithSlashes); }
[ "public", "static", "function", "strToUrl", "(", "$", "string", ",", "$", "bWithSlashes", "=", "true", ")", "{", "$", "string", "=", "self", "::", "deaccent", "(", "$", "string", ")", ";", "$", "string", "=", "preg_replace", "(", "'/[^A-Za-z0-9_\\s\\'\\:\\...
String to URL Transforms a string to a proper URL. @copyright Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html @param string $string String to transform @param boolean $bWithSlashes in URL @return string
[ "String", "to", "URL" ]
train
https://github.com/forxer/tao/blob/b5e9109c244a29a72403ae6a58633ab96a67c660/src/Tao/Html/Modifiers.php#L53-L59
forxer/tao
src/Tao/Html/Modifiers.php
Modifiers.strToCamelCase
static public function strToCamelCase($string) { $string = self::strToLowerUrl($string, false); $string = implode('', array_map('ucfirst', explode('_', $string))); $string = implode('', array_map('ucfirst', explode('-', $string))); return strtolower(substr($string, 0, 1)) . substr($string, 1); }
php
static public function strToCamelCase($string) { $string = self::strToLowerUrl($string, false); $string = implode('', array_map('ucfirst', explode('_', $string))); $string = implode('', array_map('ucfirst', explode('-', $string))); return strtolower(substr($string, 0, 1)) . substr($string, 1); }
[ "static", "public", "function", "strToCamelCase", "(", "$", "string", ")", "{", "$", "string", "=", "self", "::", "strToLowerUrl", "(", "$", "string", ",", "false", ")", ";", "$", "string", "=", "implode", "(", "''", ",", "array_map", "(", "'ucfirst'", ...
Transform a string in a camelCase style. @param string $string @return string
[ "Transform", "a", "string", "in", "a", "camelCase", "style", "." ]
train
https://github.com/forxer/tao/blob/b5e9109c244a29a72403ae6a58633ab96a67c660/src/Tao/Html/Modifiers.php#L81-L89
forxer/tao
src/Tao/Html/Modifiers.php
Modifiers.deaccent
public static function deaccent($string) { $pattern = []; $pattern['A'] = '\x{00C0}-\x{00C5}'; $pattern['AE'] = '\x{00C6}'; $pattern['C'] = '\x{00C7}'; $pattern['D'] = '\x{00D0}'; $pattern['E'] = '\x{00C8}-\x{00CB}'; $pattern['I'] = '\x{00CC}-\x{00CF}'; $pattern['N'] = '\x{00D1}'; $pattern['O'] = '\...
php
public static function deaccent($string) { $pattern = []; $pattern['A'] = '\x{00C0}-\x{00C5}'; $pattern['AE'] = '\x{00C6}'; $pattern['C'] = '\x{00C7}'; $pattern['D'] = '\x{00D0}'; $pattern['E'] = '\x{00C8}-\x{00CB}'; $pattern['I'] = '\x{00CC}-\x{00CF}'; $pattern['N'] = '\x{00D1}'; $pattern['O'] = '\...
[ "public", "static", "function", "deaccent", "(", "$", "string", ")", "{", "$", "pattern", "=", "[", "]", ";", "$", "pattern", "[", "'A'", "]", "=", "'\\x{00C0}-\\x{00C5}'", ";", "$", "pattern", "[", "'AE'", "]", "=", "'\\x{00C6}'", ";", "$", "pattern",...
Accents replacement. Replaces some occidental accentuated characters by their ASCII representation. @copyright Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html @param string $string deaccent @return string
[ "Accents", "replacement", "." ]
train
https://github.com/forxer/tao/blob/b5e9109c244a29a72403ae6a58633ab96a67c660/src/Tao/Html/Modifiers.php#L117-L156
forxer/tao
src/Tao/Html/Modifiers.php
Modifiers.tidyUrl
public static function tidyUrl($string, $bKeepSlashes = true, $bKeepSpaces = false) { $string = strip_tags($string); $string = str_replace([ '?', '&', '#', '=', '+', '<', '>', '"', '%' ], '', $string); $string = str_replace("'", ' ', $string); $string = preg_replace('/[\s]+/u', ' '...
php
public static function tidyUrl($string, $bKeepSlashes = true, $bKeepSpaces = false) { $string = strip_tags($string); $string = str_replace([ '?', '&', '#', '=', '+', '<', '>', '"', '%' ], '', $string); $string = str_replace("'", ' ', $string); $string = preg_replace('/[\s]+/u', ' '...
[ "public", "static", "function", "tidyUrl", "(", "$", "string", ",", "$", "bKeepSlashes", "=", "true", ",", "$", "bKeepSpaces", "=", "false", ")", "{", "$", "string", "=", "strip_tags", "(", "$", "string", ")", ";", "$", "string", "=", "str_replace", "(...
URL cleanup. @copyright Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html @param string $string tidy @param boolean $bKeepSlashes in URL @param boolean $bKeepSpaces in URL @return string
[ "URL", "cleanup", "." ]
train
https://github.com/forxer/tao/blob/b5e9109c244a29a72403ae6a58633ab96a67c660/src/Tao/Html/Modifiers.php#L172-L204
forxer/tao
src/Tao/Html/Modifiers.php
Modifiers.splitWords
public static function splitWords($string) { $non_word = '\x{0000}-\x{002F}\x{003A}-\x{0040}\x{005b}-\x{0060}\x{007B}-\x{007E}\x{00A0}-\x{00BF}\s'; if (preg_match_all('/([^' . $non_word . ']{2,})/msu', strip_tags($string), $match)) { foreach ($match[1] as $i => $v) { $match[1][$i] = mb_strtolower($v); ...
php
public static function splitWords($string) { $non_word = '\x{0000}-\x{002F}\x{003A}-\x{0040}\x{005b}-\x{0060}\x{007B}-\x{007E}\x{00A0}-\x{00BF}\s'; if (preg_match_all('/([^' . $non_word . ']{2,})/msu', strip_tags($string), $match)) { foreach ($match[1] as $i => $v) { $match[1][$i] = mb_strtolower($v); ...
[ "public", "static", "function", "splitWords", "(", "$", "string", ")", "{", "$", "non_word", "=", "'\\x{0000}-\\x{002F}\\x{003A}-\\x{0040}\\x{005b}-\\x{0060}\\x{007B}-\\x{007E}\\x{00A0}-\\x{00BF}\\s'", ";", "if", "(", "preg_match_all", "(", "'/([^'", ".", "$", "non_word", ...
Split words Returns an array of words from a given string. @copyright Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html @param string $string split @return array
[ "Split", "words" ]
train
https://github.com/forxer/tao/blob/b5e9109c244a29a72403ae6a58633ab96a67c660/src/Tao/Html/Modifiers.php#L218-L230
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoPeer.php
BaseRemoteHistoryContaoPeer.getFieldNames
public static function getFieldNames($type = BasePeer::TYPE_PHPNAME) { if (!array_key_exists($type, RemoteHistoryContaoPeer::$fieldNames)) { throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDL...
php
public static function getFieldNames($type = BasePeer::TYPE_PHPNAME) { if (!array_key_exists($type, RemoteHistoryContaoPeer::$fieldNames)) { throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDL...
[ "public", "static", "function", "getFieldNames", "(", "$", "type", "=", "BasePeer", "::", "TYPE_PHPNAME", ")", "{", "if", "(", "!", "array_key_exists", "(", "$", "type", ",", "RemoteHistoryContaoPeer", "::", "$", "fieldNames", ")", ")", "{", "throw", "new", ...
Returns an array of field names. @param string $type The type of fieldnames to return: One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM @return array A list of field names @throws PropelException - i...
[ "Returns", "an", "array", "of", "field", "names", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoPeer.php#L170-L177
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoPeer.php
BaseRemoteHistoryContaoPeer.addSelectColumns
public static function addSelectColumns(Criteria $criteria, $alias = null) { if (null === $alias) { $criteria->addSelectColumn(RemoteHistoryContaoPeer::ID); $criteria->addSelectColumn(RemoteHistoryContaoPeer::REMOTE_APP_ID); $criteria->addSelectColumn(RemoteHistoryContaoP...
php
public static function addSelectColumns(Criteria $criteria, $alias = null) { if (null === $alias) { $criteria->addSelectColumn(RemoteHistoryContaoPeer::ID); $criteria->addSelectColumn(RemoteHistoryContaoPeer::REMOTE_APP_ID); $criteria->addSelectColumn(RemoteHistoryContaoP...
[ "public", "static", "function", "addSelectColumns", "(", "Criteria", "$", "criteria", ",", "$", "alias", "=", "null", ")", "{", "if", "(", "null", "===", "$", "alias", ")", "{", "$", "criteria", "->", "addSelectColumn", "(", "RemoteHistoryContaoPeer", "::", ...
Add all the columns needed to create a new object. Note: any columns that were marked with lazyLoad="true" in the XML schema will not be added to the select list and only loaded on demand. @param Criteria $criteria object containing the columns to add. @param string $alias optional table alias @throws ...
[ "Add", "all", "the", "columns", "needed", "to", "create", "a", "new", "object", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoPeer.php#L208-L251
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoPeer.php
BaseRemoteHistoryContaoPeer.getInstanceFromPool
public static function getInstanceFromPool($key) { if (Propel::isInstancePoolingEnabled()) { if (isset(RemoteHistoryContaoPeer::$instances[$key])) { return RemoteHistoryContaoPeer::$instances[$key]; } } return null; // just to be explicit }
php
public static function getInstanceFromPool($key) { if (Propel::isInstancePoolingEnabled()) { if (isset(RemoteHistoryContaoPeer::$instances[$key])) { return RemoteHistoryContaoPeer::$instances[$key]; } } return null; // just to be explicit }
[ "public", "static", "function", "getInstanceFromPool", "(", "$", "key", ")", "{", "if", "(", "Propel", "::", "isInstancePoolingEnabled", "(", ")", ")", "{", "if", "(", "isset", "(", "RemoteHistoryContaoPeer", "::", "$", "instances", "[", "$", "key", "]", "...
Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. For tables with a single-column primary key, that simple pkey value will be returned. For tables with a multi-column primary key, a serialize()d version of the primary key will be returne...
[ "Retrieves", "a", "string", "version", "of", "the", "primary", "key", "from", "the", "DB", "resultset", "row", "that", "can", "be", "used", "to", "uniquely", "identify", "a", "row", "in", "this", "table", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoPeer.php#L422-L431
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoPeer.php
BaseRemoteHistoryContaoPeer.buildTableMap
public static function buildTableMap() { $dbMap = Propel::getDatabaseMap(BaseRemoteHistoryContaoPeer::DATABASE_NAME); if (!$dbMap->hasTable(BaseRemoteHistoryContaoPeer::TABLE_NAME)) { $dbMap->addTableObject(new \Slashworks\AppBundle\Model\map\RemoteHistoryContaoTableMap()); } }
php
public static function buildTableMap() { $dbMap = Propel::getDatabaseMap(BaseRemoteHistoryContaoPeer::DATABASE_NAME); if (!$dbMap->hasTable(BaseRemoteHistoryContaoPeer::TABLE_NAME)) { $dbMap->addTableObject(new \Slashworks\AppBundle\Model\map\RemoteHistoryContaoTableMap()); } }
[ "public", "static", "function", "buildTableMap", "(", ")", "{", "$", "dbMap", "=", "Propel", "::", "getDatabaseMap", "(", "BaseRemoteHistoryContaoPeer", "::", "DATABASE_NAME", ")", ";", "if", "(", "!", "$", "dbMap", "->", "hasTable", "(", "BaseRemoteHistoryConta...
Add a TableMap instance to the database for this peer class.
[ "Add", "a", "TableMap", "instance", "to", "the", "database", "for", "this", "peer", "class", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoPeer.php#L803-L809
xinix-technology/norm
src/Norm/Norm.php
Norm.init
public static function init($config, $collectionConfig = array()) { $first = null; static::$collectionConfig = $collectionConfig; if (empty($config)) { return; } foreach ($config as $key => $value) { $value['name'] = $key; if (!isset($v...
php
public static function init($config, $collectionConfig = array()) { $first = null; static::$collectionConfig = $collectionConfig; if (empty($config)) { return; } foreach ($config as $key => $value) { $value['name'] = $key; if (!isset($v...
[ "public", "static", "function", "init", "(", "$", "config", ",", "$", "collectionConfig", "=", "array", "(", ")", ")", "{", "$", "first", "=", "null", ";", "static", "::", "$", "collectionConfig", "=", "$", "collectionConfig", ";", "if", "(", "empty", ...
Initialize framework from configuration. First connection registered from config will be the default connection. @param array $config @param array $collectionConfig @return void
[ "Initialize", "framework", "from", "configuration", ".", "First", "connection", "registered", "from", "config", "will", "be", "the", "default", "connection", "." ]
train
https://github.com/xinix-technology/norm/blob/c357f7d3a75d05324dd84b8f6a968a094c53d603/src/Norm/Norm.php#L53-L89
xinix-technology/norm
src/Norm/Norm.php
Norm.options
public static function options($key, $value = ':get:') { if (is_array($key)) { foreach ($key as $k => $v) { static::$options($k, $v); } return; } if ($value === ':get:') { return isset(static::$options[$key]) ? static::$option...
php
public static function options($key, $value = ':get:') { if (is_array($key)) { foreach ($key as $k => $v) { static::$options($k, $v); } return; } if ($value === ':get:') { return isset(static::$options[$key]) ? static::$option...
[ "public", "static", "function", "options", "(", "$", "key", ",", "$", "value", "=", "':get:'", ")", "{", "if", "(", "is_array", "(", "$", "key", ")", ")", "{", "foreach", "(", "$", "key", "as", "$", "k", "=>", "$", "v", ")", "{", "static", "::"...
Get the option of Norm configuration. @method options @param string $key @param string $value @return mixed
[ "Get", "the", "option", "of", "Norm", "configuration", "." ]
train
https://github.com/xinix-technology/norm/blob/c357f7d3a75d05324dd84b8f6a968a094c53d603/src/Norm/Norm.php#L101-L116
xinix-technology/norm
src/Norm/Norm.php
Norm.createCollection
public static function createCollection($options) { $defaultConfig = isset(static::$collectionConfig['default']) ? static::$collectionConfig['default'] : array(); $config = null; if (isset(static::$collectionConfig['mapping'][$options['name']])) { $confi...
php
public static function createCollection($options) { $defaultConfig = isset(static::$collectionConfig['default']) ? static::$collectionConfig['default'] : array(); $config = null; if (isset(static::$collectionConfig['mapping'][$options['name']])) { $confi...
[ "public", "static", "function", "createCollection", "(", "$", "options", ")", "{", "$", "defaultConfig", "=", "isset", "(", "static", "::", "$", "collectionConfig", "[", "'default'", "]", ")", "?", "static", "::", "$", "collectionConfig", "[", "'default'", "...
Create collection by configuration. @method createCollection @param array $options @return mixed|\Norm\Collection
[ "Create", "collection", "by", "configuration", "." ]
train
https://github.com/xinix-technology/norm/blob/c357f7d3a75d05324dd84b8f6a968a094c53d603/src/Norm/Norm.php#L142-L187
xinix-technology/norm
src/Norm/Norm.php
Norm.getConnection
public static function getConnection($connectionName = '') { if (!$connectionName) { $connectionName = static::$defaultConnection; } if (isset(static::$connections[$connectionName])) { return static::$connections[$connectionName]; } }
php
public static function getConnection($connectionName = '') { if (!$connectionName) { $connectionName = static::$defaultConnection; } if (isset(static::$connections[$connectionName])) { return static::$connections[$connectionName]; } }
[ "public", "static", "function", "getConnection", "(", "$", "connectionName", "=", "''", ")", "{", "if", "(", "!", "$", "connectionName", ")", "{", "$", "connectionName", "=", "static", "::", "$", "defaultConnection", ";", "}", "if", "(", "isset", "(", "s...
Get connection by its connection name, if no connection name provided then the function will return default connection. @param string $connectionName @return \Norm\Connection
[ "Get", "connection", "by", "its", "connection", "name", "if", "no", "connection", "name", "provided", "then", "the", "function", "will", "return", "default", "connection", "." ]
train
https://github.com/xinix-technology/norm/blob/c357f7d3a75d05324dd84b8f6a968a094c53d603/src/Norm/Norm.php#L196-L204
tableau-mkt/eggs-n-cereal
src/Utils/Data.php
Data.ensureArrayKeys
public static function ensureArrayKeys($key) { if (empty($key)) { return array(); } if (!is_array($key)) { if (strstr($key, '|')) { $key = str_replace('|', self::ARRAY_DELIMITER, $key); } $key = explode(self::ARRAY_DELIMITER, $key); } return $key; }
php
public static function ensureArrayKeys($key) { if (empty($key)) { return array(); } if (!is_array($key)) { if (strstr($key, '|')) { $key = str_replace('|', self::ARRAY_DELIMITER, $key); } $key = explode(self::ARRAY_DELIMITER, $key); } return $key; }
[ "public", "static", "function", "ensureArrayKeys", "(", "$", "key", ")", "{", "if", "(", "empty", "(", "$", "key", ")", ")", "{", "return", "array", "(", ")", ";", "}", "if", "(", "!", "is_array", "(", "$", "key", ")", ")", "{", "if", "(", "str...
Converts string keys to array keys. There are three conventions for data keys in use. This function accepts each and ensures an array of keys. @param array|string $key The key can be either be an array containing the keys of a nested array hierarchy path or a string with '][' or '|' as delimiter. @return array Array...
[ "Converts", "string", "keys", "to", "array", "keys", "." ]
train
https://github.com/tableau-mkt/eggs-n-cereal/blob/778b83ddae1dd687724a84545ce8afa1a31e4bcf/src/Utils/Data.php#L40-L51
tableau-mkt/eggs-n-cereal
src/Utils/Data.php
Data.flattenData
public static function flattenData(array $data, $prefix = NULL, $label = array()) { $flattened_data = array(); if (isset($data['#label'])) { $label[] = $data['#label']; } // Each element is either a text (has #text property defined) or has children, // not both. if (!empty($data['#text']))...
php
public static function flattenData(array $data, $prefix = NULL, $label = array()) { $flattened_data = array(); if (isset($data['#label'])) { $label[] = $data['#label']; } // Each element is either a text (has #text property defined) or has children, // not both. if (!empty($data['#text']))...
[ "public", "static", "function", "flattenData", "(", "array", "$", "data", ",", "$", "prefix", "=", "NULL", ",", "$", "label", "=", "array", "(", ")", ")", "{", "$", "flattened_data", "=", "array", "(", ")", ";", "if", "(", "isset", "(", "$", "data"...
Converts a nested data array into a flattened structure with a combined key. This function can be used by translators to help with the data conversion. Nested keys will be joined together using a colon, so for example $data['key1']['key2']['key3'] will be converted into $flattened_data['key1][key2][key3']. @param ar...
[ "Converts", "a", "nested", "data", "array", "into", "a", "flattened", "structure", "with", "a", "combined", "key", "." ]
train
https://github.com/tableau-mkt/eggs-n-cereal/blob/778b83ddae1dd687724a84545ce8afa1a31e4bcf/src/Utils/Data.php#L77-L95
tableau-mkt/eggs-n-cereal
src/Utils/Data.php
Data.unflattenData
public static function unflattenData($flattened_data) { $data = array(); foreach ($flattened_data as $key => $flattened_data_entry) { self::arraySetNestedValue($data, explode(self::ARRAY_DELIMITER, $key), $flattened_data_entry); } return $data; }
php
public static function unflattenData($flattened_data) { $data = array(); foreach ($flattened_data as $key => $flattened_data_entry) { self::arraySetNestedValue($data, explode(self::ARRAY_DELIMITER, $key), $flattened_data_entry); } return $data; }
[ "public", "static", "function", "unflattenData", "(", "$", "flattened_data", ")", "{", "$", "data", "=", "array", "(", ")", ";", "foreach", "(", "$", "flattened_data", "as", "$", "key", "=>", "$", "flattened_data_entry", ")", "{", "self", "::", "arraySetNe...
Converts a flattened data structure into a nested array. This function can be used by translators to help with the data conversion. Nested keys will be created based on the colon, so for example $flattened_data['key1][key2][key3'] will be converted into $data['key1']['key2']['key3']. @param array $flattened_data The...
[ "Converts", "a", "flattened", "data", "structure", "into", "a", "nested", "array", "." ]
train
https://github.com/tableau-mkt/eggs-n-cereal/blob/778b83ddae1dd687724a84545ce8afa1a31e4bcf/src/Utils/Data.php#L114-L120
tableau-mkt/eggs-n-cereal
src/Utils/Data.php
Data.elementChildren
public static function elementChildren($elements) { // Filter out properties from the element, leaving only children. $children = array(); foreach ($elements as $key => $value) { if ($key === '' || $key[0] !== '#') { $children[$key] = $value; } } return array_keys($children); }
php
public static function elementChildren($elements) { // Filter out properties from the element, leaving only children. $children = array(); foreach ($elements as $key => $value) { if ($key === '' || $key[0] !== '#') { $children[$key] = $value; } } return array_keys($children); }
[ "public", "static", "function", "elementChildren", "(", "$", "elements", ")", "{", "// Filter out properties from the element, leaving only children.", "$", "children", "=", "array", "(", ")", ";", "foreach", "(", "$", "elements", "as", "$", "key", "=>", "$", "val...
Identifies the children of an element array. The children of a element array are those key/value pairs whose key does not start with a '#'. @param array $elements The element array whose children are to be identified. @return array The array keys of the element's children.
[ "Identifies", "the", "children", "of", "an", "element", "array", "." ]
train
https://github.com/tableau-mkt/eggs-n-cereal/blob/778b83ddae1dd687724a84545ce8afa1a31e4bcf/src/Utils/Data.php#L150-L159
shrink0r/workflux
src/Transition/StateTransitions.php
StateTransitions.depthFirstScan
private function depthFirstScan(StateMap $states, StateInterface $state, StateSet $visited_states): StateSet { if ($visited_states->contains($state)) { return $visited_states; } $visited_states->add($state); $child_states = array_map( function (TransitionInter...
php
private function depthFirstScan(StateMap $states, StateInterface $state, StateSet $visited_states): StateSet { if ($visited_states->contains($state)) { return $visited_states; } $visited_states->add($state); $child_states = array_map( function (TransitionInter...
[ "private", "function", "depthFirstScan", "(", "StateMap", "$", "states", ",", "StateInterface", "$", "state", ",", "StateSet", "$", "visited_states", ")", ":", "StateSet", "{", "if", "(", "$", "visited_states", "->", "contains", "(", "$", "state", ")", ")", ...
@param StateMap $all_states @param StateTransitions $state_transitions @param StateInterface $state @param StateSet $visited_states @return StateSet
[ "@param", "StateMap", "$all_states", "@param", "StateTransitions", "$state_transitions", "@param", "StateInterface", "$state", "@param", "StateSet", "$visited_states" ]
train
https://github.com/shrink0r/workflux/blob/008f45c64f52b1f795ab7f6ddbfc1a55580254d9/src/Transition/StateTransitions.php#L109-L125
askupasoftware/amarkal
Template/Template.php
Template.render
public function render(){ $rendered_image = ''; if( file_exists( $this->script_path ) ) { ob_start(); include( $this->script_path ); $rendered_image = ob_get_clean(); } else throw new TemplateNotFoundException("The following...
php
public function render(){ $rendered_image = ''; if( file_exists( $this->script_path ) ) { ob_start(); include( $this->script_path ); $rendered_image = ob_get_clean(); } else throw new TemplateNotFoundException("The following...
[ "public", "function", "render", "(", ")", "{", "$", "rendered_image", "=", "''", ";", "if", "(", "file_exists", "(", "$", "this", "->", "script_path", ")", ")", "{", "ob_start", "(", ")", ";", "include", "(", "$", "this", "->", "script_path", ")", ";...
Render the template with the local properties. @return string The rendered template. @throws TemplateNotFoundException Thrown if the template file can not found.
[ "Render", "the", "template", "with", "the", "local", "properties", "." ]
train
https://github.com/askupasoftware/amarkal/blob/fe8283e2d6847ef697abec832da7ee741a85058c/Template/Template.php#L77-L90
jjanvier/CrowdinBundle
Command/ExtractCommand.php
ExtractCommand.execute
protected function execute(InputInterface $input, OutputInterface $output) { if (0 !== $returnCode = $this->exportFromCrowdin($input, $output)) { return $returnCode; } if (0 !== $returnCode = $this->downloadFromCrowdin($input, $output)) { return $returnCode; ...
php
protected function execute(InputInterface $input, OutputInterface $output) { if (0 !== $returnCode = $this->exportFromCrowdin($input, $output)) { return $returnCode; } if (0 !== $returnCode = $this->downloadFromCrowdin($input, $output)) { return $returnCode; ...
[ "protected", "function", "execute", "(", "InputInterface", "$", "input", ",", "OutputInterface", "$", "output", ")", "{", "if", "(", "0", "!==", "$", "returnCode", "=", "$", "this", "->", "exportFromCrowdin", "(", "$", "input", ",", "$", "output", ")", "...
{@inheritdoc}
[ "{" ]
train
https://github.com/jjanvier/CrowdinBundle/blob/ce8fa538fde7c3b9368186bf9e58e7da1c30bc69/Command/ExtractCommand.php#L47-L70
jjanvier/CrowdinBundle
Command/ExtractCommand.php
ExtractCommand.exportFromCrowdin
protected function exportFromCrowdin(InputInterface $input, OutputInterface $output) { $command = $this->getApplication()->find('crowdin:api:export'); $arguments = array( 'command' => 'crowdin:api:export' ); $input = new ArrayInput($arguments); return $command->r...
php
protected function exportFromCrowdin(InputInterface $input, OutputInterface $output) { $command = $this->getApplication()->find('crowdin:api:export'); $arguments = array( 'command' => 'crowdin:api:export' ); $input = new ArrayInput($arguments); return $command->r...
[ "protected", "function", "exportFromCrowdin", "(", "InputInterface", "$", "input", ",", "OutputInterface", "$", "output", ")", "{", "$", "command", "=", "$", "this", "->", "getApplication", "(", ")", "->", "find", "(", "'crowdin:api:export'", ")", ";", "$", ...
Generate translations package via the command crowdin:api:export @param InputInterface $input @param OutputInterface $output @return int status of the command
[ "Generate", "translations", "package", "via", "the", "command", "crowdin", ":", "api", ":", "export" ]
train
https://github.com/jjanvier/CrowdinBundle/blob/ce8fa538fde7c3b9368186bf9e58e7da1c30bc69/Command/ExtractCommand.php#L80-L89
jjanvier/CrowdinBundle
Command/ExtractCommand.php
ExtractCommand.downloadFromCrowdin
protected function downloadFromCrowdin(InputInterface $input, OutputInterface $output) { $command = $this->getApplication()->find('crowdin:api:download'); $arguments = array( 'command' => 'crowdin:api:download', '--path' => $input->getOption('path'), '--language' ...
php
protected function downloadFromCrowdin(InputInterface $input, OutputInterface $output) { $command = $this->getApplication()->find('crowdin:api:download'); $arguments = array( 'command' => 'crowdin:api:download', '--path' => $input->getOption('path'), '--language' ...
[ "protected", "function", "downloadFromCrowdin", "(", "InputInterface", "$", "input", ",", "OutputInterface", "$", "output", ")", "{", "$", "command", "=", "$", "this", "->", "getApplication", "(", ")", "->", "find", "(", "'crowdin:api:download'", ")", ";", "$"...
Download the translations package via the command crowdin:api:download @param InputInterface $input @param OutputInterface $output @return int status of the command
[ "Download", "the", "translations", "package", "via", "the", "command", "crowdin", ":", "api", ":", "download" ]
train
https://github.com/jjanvier/CrowdinBundle/blob/ce8fa538fde7c3b9368186bf9e58e7da1c30bc69/Command/ExtractCommand.php#L99-L110
wikimedia/CLDRPluralRuleParser
src/Evaluator.php
Evaluator.evaluate
public static function evaluate( $number, array $rules ) { $rules = self::compile( $rules ); return self::evaluateCompiled( $number, $rules ); }
php
public static function evaluate( $number, array $rules ) { $rules = self::compile( $rules ); return self::evaluateCompiled( $number, $rules ); }
[ "public", "static", "function", "evaluate", "(", "$", "number", ",", "array", "$", "rules", ")", "{", "$", "rules", "=", "self", "::", "compile", "(", "$", "rules", ")", ";", "return", "self", "::", "evaluateCompiled", "(", "$", "number", ",", "$", "...
Evaluate a number against a set of plural rules. If a rule passes, return the index of plural rule. @param int $number The number to be evaluated against the rules @param array $rules The associative array of plural rules in pluralform => rule format. @return int The index of the plural form which passed the evaluatio...
[ "Evaluate", "a", "number", "against", "a", "set", "of", "plural", "rules", ".", "If", "a", "rule", "passes", "return", "the", "index", "of", "plural", "rule", "." ]
train
https://github.com/wikimedia/CLDRPluralRuleParser/blob/4c5d71a3fd62a75871da8562310ca2258647ee6d/src/Evaluator.php#L26-L30
wikimedia/CLDRPluralRuleParser
src/Evaluator.php
Evaluator.compile
public static function compile( array $rules ) { // We can't use array_map() for this because it generates a warning if // there is an exception. foreach ( $rules as &$rule ) { $rule = Converter::convert( $rule ); } return $rules; }
php
public static function compile( array $rules ) { // We can't use array_map() for this because it generates a warning if // there is an exception. foreach ( $rules as &$rule ) { $rule = Converter::convert( $rule ); } return $rules; }
[ "public", "static", "function", "compile", "(", "array", "$", "rules", ")", "{", "// We can't use array_map() for this because it generates a warning if", "// there is an exception.", "foreach", "(", "$", "rules", "as", "&", "$", "rule", ")", "{", "$", "rule", "=", ...
Convert a set of rules to a compiled form which is optimised for fast evaluation. The result will be an array of strings, and may be cached. @param array $rules The rules to compile @return array An array of compile rules.
[ "Convert", "a", "set", "of", "rules", "to", "a", "compiled", "form", "which", "is", "optimised", "for", "fast", "evaluation", ".", "The", "result", "will", "be", "an", "array", "of", "strings", "and", "may", "be", "cached", "." ]
train
https://github.com/wikimedia/CLDRPluralRuleParser/blob/4c5d71a3fd62a75871da8562310ca2258647ee6d/src/Evaluator.php#L39-L47
wikimedia/CLDRPluralRuleParser
src/Evaluator.php
Evaluator.evaluateCompiled
public static function evaluateCompiled( $number, array $rules ) { // Calculate the values of the operand symbols $number = strval( $number ); if ( !preg_match( '/^ -? ( ([0-9]+) (?: \. ([0-9]+) )? )$/x', $number, $m ) ) { wfDebug( __METHOD__ . ": invalid number input, returning 'other'\n" ); return count(...
php
public static function evaluateCompiled( $number, array $rules ) { // Calculate the values of the operand symbols $number = strval( $number ); if ( !preg_match( '/^ -? ( ([0-9]+) (?: \. ([0-9]+) )? )$/x', $number, $m ) ) { wfDebug( __METHOD__ . ": invalid number input, returning 'other'\n" ); return count(...
[ "public", "static", "function", "evaluateCompiled", "(", "$", "number", ",", "array", "$", "rules", ")", "{", "// Calculate the values of the operand symbols", "$", "number", "=", "strval", "(", "$", "number", ")", ";", "if", "(", "!", "preg_match", "(", "'/^ ...
Evaluate a compiled set of rules returned by compile(). Do not allow the user to edit the compiled form, or else PHP errors may result. @param string $number The number to be evaluated against the rules, in English, or it may be a type convertible to string. @param array $rules The associative array of plural rules in...
[ "Evaluate", "a", "compiled", "set", "of", "rules", "returned", "by", "compile", "()", ".", "Do", "not", "allow", "the", "user", "to", "edit", "the", "compiled", "form", "or", "else", "PHP", "errors", "may", "result", "." ]
train
https://github.com/wikimedia/CLDRPluralRuleParser/blob/4c5d71a3fd62a75871da8562310ca2258647ee6d/src/Evaluator.php#L58-L116
wikimedia/CLDRPluralRuleParser
src/Evaluator.php
Evaluator.doOperation
private static function doOperation( $token, $left, $right ) { if ( in_array( $token, [ 'in', 'not-in', 'within', 'not-within' ] ) ) { if ( !$right instanceof Range ) { $right = new Range( $right ); } } switch ( $token ) { case 'or': return $left || $right; case 'and': return $left && $rig...
php
private static function doOperation( $token, $left, $right ) { if ( in_array( $token, [ 'in', 'not-in', 'within', 'not-within' ] ) ) { if ( !$right instanceof Range ) { $right = new Range( $right ); } } switch ( $token ) { case 'or': return $left || $right; case 'and': return $left && $rig...
[ "private", "static", "function", "doOperation", "(", "$", "token", ",", "$", "left", ",", "$", "right", ")", "{", "if", "(", "in_array", "(", "$", "token", ",", "[", "'in'", ",", "'not-in'", ",", "'within'", ",", "'not-within'", "]", ")", ")", "{", ...
Do a single operation @param string $token The token string @param mixed $left The left operand. If it is an object, its state may be destroyed. @param mixed $right The right operand @throws Error @return mixed The operation result
[ "Do", "a", "single", "operation" ]
train
https://github.com/wikimedia/CLDRPluralRuleParser/blob/4c5d71a3fd62a75871da8562310ca2258647ee6d/src/Evaluator.php#L127-L170
praxisnetau/silverware-spam-guard
src/Fields/SimpleSpamGuardField.php
SimpleSpamGuardField.setForm
public function setForm($form) { // Associate Fields with Form: $this->honeypot->setForm($form); $this->timestamp->setForm($form); // Call Parent Method: return parent::setForm($form); }
php
public function setForm($form) { // Associate Fields with Form: $this->honeypot->setForm($form); $this->timestamp->setForm($form); // Call Parent Method: return parent::setForm($form); }
[ "public", "function", "setForm", "(", "$", "form", ")", "{", "// Associate Fields with Form:", "$", "this", "->", "honeypot", "->", "setForm", "(", "$", "form", ")", ";", "$", "this", "->", "timestamp", "->", "setForm", "(", "$", "form", ")", ";", "// Ca...
Defines the form instance for the receiver. @param Form $form @return $this
[ "Defines", "the", "form", "instance", "for", "the", "receiver", "." ]
train
https://github.com/praxisnetau/silverware-spam-guard/blob/c5f8836a09141bd675173892a1e3d8c8cc8c1886/src/Fields/SimpleSpamGuardField.php#L112-L122
praxisnetau/silverware-spam-guard
src/Fields/SimpleSpamGuardField.php
SimpleSpamGuardField.Field
public function Field($properties = []) { Requirements::customCSS('.field.simpleguard { display: none !important; }'); return DBField::create_field('HTMLFragment', $this->honeypot->Field() . $this->timestamp->Field()); }
php
public function Field($properties = []) { Requirements::customCSS('.field.simpleguard { display: none !important; }'); return DBField::create_field('HTMLFragment', $this->honeypot->Field() . $this->timestamp->Field()); }
[ "public", "function", "Field", "(", "$", "properties", "=", "[", "]", ")", "{", "Requirements", "::", "customCSS", "(", "'.field.simpleguard { display: none !important; }'", ")", ";", "return", "DBField", "::", "create_field", "(", "'HTMLFragment'", ",", "$", "thi...
Renders the field for the template. @param array $properties @return DBHTMLText
[ "Renders", "the", "field", "for", "the", "template", "." ]
train
https://github.com/praxisnetau/silverware-spam-guard/blob/c5f8836a09141bd675173892a1e3d8c8cc8c1886/src/Fields/SimpleSpamGuardField.php#L161-L166
praxisnetau/silverware-spam-guard
src/Fields/SimpleSpamGuardField.php
SimpleSpamGuardField.setValue
public function setValue($value, $data = null) { // Check Value Type: if (is_array($value)) { // Define Field Values: $this->honeypot->setValue(isset($value['value']) ? $value['value'] : null); $this->timestamp->setValue(isset($v...
php
public function setValue($value, $data = null) { // Check Value Type: if (is_array($value)) { // Define Field Values: $this->honeypot->setValue(isset($value['value']) ? $value['value'] : null); $this->timestamp->setValue(isset($v...
[ "public", "function", "setValue", "(", "$", "value", ",", "$", "data", "=", "null", ")", "{", "// Check Value Type:", "if", "(", "is_array", "(", "$", "value", ")", ")", "{", "// Define Field Values:", "$", "this", "->", "honeypot", "->", "setValue", "(", ...
Defines the field value. @param mixed $value @param array $data @return $this
[ "Defines", "the", "field", "value", "." ]
train
https://github.com/praxisnetau/silverware-spam-guard/blob/c5f8836a09141bd675173892a1e3d8c8cc8c1886/src/Fields/SimpleSpamGuardField.php#L176-L196
praxisnetau/silverware-spam-guard
src/Fields/SimpleSpamGuardField.php
SimpleSpamGuardField.validate
public function validate($validator) { // Check Value and Timestamp: if (!empty($this->value) || $this->tooSoon()) { // Define Validation Error: $validator->validationError( $this->name, _t( ...
php
public function validate($validator) { // Check Value and Timestamp: if (!empty($this->value) || $this->tooSoon()) { // Define Validation Error: $validator->validationError( $this->name, _t( ...
[ "public", "function", "validate", "(", "$", "validator", ")", "{", "// Check Value and Timestamp:", "if", "(", "!", "empty", "(", "$", "this", "->", "value", ")", "||", "$", "this", "->", "tooSoon", "(", ")", ")", "{", "// Define Validation Error:", "$", "...
Answers true if the value is valid for the receiver. @param Validator $validator @return boolean
[ "Answers", "true", "if", "the", "value", "is", "valid", "for", "the", "receiver", "." ]
train
https://github.com/praxisnetau/silverware-spam-guard/blob/c5f8836a09141bd675173892a1e3d8c8cc8c1886/src/Fields/SimpleSpamGuardField.php#L215-L241
CakeCMS/Core
src/Controller/Component/ProcessComponent.php
ProcessComponent.getRequestVars
public function getRequestVars($name, $primaryKey = self::PRIMARY_KEY) { $name = Str::low(Inflector::singularize($name)); $requestIds = (array) $this->_request->getData($name); $action = $this->_request->getData('action'); $ids = $this->_getIds($requestIds, $primaryK...
php
public function getRequestVars($name, $primaryKey = self::PRIMARY_KEY) { $name = Str::low(Inflector::singularize($name)); $requestIds = (array) $this->_request->getData($name); $action = $this->_request->getData('action'); $ids = $this->_getIds($requestIds, $primaryK...
[ "public", "function", "getRequestVars", "(", "$", "name", ",", "$", "primaryKey", "=", "self", "::", "PRIMARY_KEY", ")", "{", "$", "name", "=", "Str", "::", "low", "(", "Inflector", "::", "singularize", "(", "$", "name", ")", ")", ";", "$", "requestIds...
Get actual request vars for process. @param string $name @param string $primaryKey @return array
[ "Get", "actual", "request", "vars", "for", "process", "." ]
train
https://github.com/CakeCMS/Core/blob/f9cba7aa0043a10e5c35bd45fbad158688a09a96/src/Controller/Component/ProcessComponent.php#L56-L64
CakeCMS/Core
src/Controller/Component/ProcessComponent.php
ProcessComponent.initialize
public function initialize(array $config) { parent::initialize($config); $_config = [ 'context' => __d('core', 'record'), 'redirect' => [ 'action' => 'index', 'prefix' => $this->_request->getParam('prefix'), 'plugin' ...
php
public function initialize(array $config) { parent::initialize($config); $_config = [ 'context' => __d('core', 'record'), 'redirect' => [ 'action' => 'index', 'prefix' => $this->_request->getParam('prefix'), 'plugin' ...
[ "public", "function", "initialize", "(", "array", "$", "config", ")", "{", "parent", "::", "initialize", "(", "$", "config", ")", ";", "$", "_config", "=", "[", "'context'", "=>", "__d", "(", "'core'", ",", "'record'", ")", ",", "'redirect'", "=>", "["...
Constructor hook method. @param array $config @return void
[ "Constructor", "hook", "method", "." ]
train
https://github.com/CakeCMS/Core/blob/f9cba7aa0043a10e5c35bd45fbad158688a09a96/src/Controller/Component/ProcessComponent.php#L72-L92