repo
stringlengths
6
63
path
stringlengths
5
140
func_name
stringlengths
3
151
original_string
stringlengths
84
13k
language
stringclasses
1 value
code
stringlengths
84
13k
code_tokens
list
docstring
stringlengths
3
47.2k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
91
247
partition
stringclasses
1 value
t3v/t3v_core
Classes/Domain/Repository/AbstractRepository.php
AbstractRepository.getRawObjectByUid
public function getRawObjectByUid(int $uid, int $languageUid = 0, array $querySettings = ['respectSysLanguage' => false]) { if ($uid && $uid > 0) { // Create a new query. $query = $this->createquery(); // Set the passend language UID. $settings = $query->getQuerySettings(); $settings-...
php
public function getRawObjectByUid(int $uid, int $languageUid = 0, array $querySettings = ['respectSysLanguage' => false]) { if ($uid && $uid > 0) { // Create a new query. $query = $this->createquery(); // Set the passend language UID. $settings = $query->getQuerySettings(); $settings-...
[ "public", "function", "getRawObjectByUid", "(", "int", "$", "uid", ",", "int", "$", "languageUid", "=", "0", ",", "array", "$", "querySettings", "=", "[", "'respectSysLanguage'", "=>", "false", "]", ")", "{", "if", "(", "$", "uid", "&&", "$", "uid", ">...
Gets a raw object by UID. @param int $uid The UID @param int $languageUid The language UID, defaults to `0` @param array $querySettings The optional query settings to apply @return object|null The raw object or null if no object was found
[ "Gets", "a", "raw", "object", "by", "UID", "." ]
8c04b7688cc2773f11fcc87fda3f7cd53d80a980
https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Domain/Repository/AbstractRepository.php#L114-L136
train
t3v/t3v_core
Classes/Domain/Repository/AbstractRepository.php
AbstractRepository.getRawModelByUid
public function getRawModelByUid(int $uid, int $languageUid = 0, array $querySettings = ['respectSysLanguage' => false]) { return $this->getRawObjectByUid($uid, $languageUid, $querySettings); }
php
public function getRawModelByUid(int $uid, int $languageUid = 0, array $querySettings = ['respectSysLanguage' => false]) { return $this->getRawObjectByUid($uid, $languageUid, $querySettings); }
[ "public", "function", "getRawModelByUid", "(", "int", "$", "uid", ",", "int", "$", "languageUid", "=", "0", ",", "array", "$", "querySettings", "=", "[", "'respectSysLanguage'", "=>", "false", "]", ")", "{", "return", "$", "this", "->", "getRawObjectByUid", ...
Gets a raw model by UID, alias for `getRawObjectByUid`. @param int $uid The UID @param int $languageUid The language UID, defaults to `0` @param array $querySettings The optional query settings to apply @return object|null The raw model or null if no model was found
[ "Gets", "a", "raw", "model", "by", "UID", "alias", "for", "getRawObjectByUid", "." ]
8c04b7688cc2773f11fcc87fda3f7cd53d80a980
https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Domain/Repository/AbstractRepository.php#L146-L148
train
t3v/t3v_core
Classes/Domain/Repository/AbstractRepository.php
AbstractRepository.findByPid
public function findByPid(int $pid, int $limit = 0, array $querySettings = ['respectSysLanguage' => true]) { if ($pid && $pid > 0) { // Create a new query. $query = $this->createquery(); // Apply the passed query settings. $query = $this->applyQuerySettings($query, $querySettings); /...
php
public function findByPid(int $pid, int $limit = 0, array $querySettings = ['respectSysLanguage' => true]) { if ($pid && $pid > 0) { // Create a new query. $query = $this->createquery(); // Apply the passed query settings. $query = $this->applyQuerySettings($query, $querySettings); /...
[ "public", "function", "findByPid", "(", "int", "$", "pid", ",", "int", "$", "limit", "=", "0", ",", "array", "$", "querySettings", "=", "[", "'respectSysLanguage'", "=>", "true", "]", ")", "{", "if", "(", "$", "pid", "&&", "$", "pid", ">", "0", ")"...
Finds objects by PID. @param int $pid The PID @param int $limit The optional limit, defaults to `0` @param array $querySettings The optional query settings to apply @return \TYPO3\CMS\Extbase\Persistence\Generic\QueryResult|null The found objects or null if no objects were found
[ "Finds", "objects", "by", "PID", "." ]
8c04b7688cc2773f11fcc87fda3f7cd53d80a980
https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Domain/Repository/AbstractRepository.php#L158-L181
train
t3v/t3v_core
Classes/Domain/Repository/AbstractRepository.php
AbstractRepository.findByPids
public function findByPids($pids, int $limit = 0, array $querySettings = ['respectSysLanguage' => true]) { if (is_string($pids)) { $pids = GeneralUtility::intExplode(',', $pids, true); } if (!empty($pids)) { // Create query $query = $this->createquery(); // Apply the passed query s...
php
public function findByPids($pids, int $limit = 0, array $querySettings = ['respectSysLanguage' => true]) { if (is_string($pids)) { $pids = GeneralUtility::intExplode(',', $pids, true); } if (!empty($pids)) { // Create query $query = $this->createquery(); // Apply the passed query s...
[ "public", "function", "findByPids", "(", "$", "pids", ",", "int", "$", "limit", "=", "0", ",", "array", "$", "querySettings", "=", "[", "'respectSysLanguage'", "=>", "true", "]", ")", "{", "if", "(", "is_string", "(", "$", "pids", ")", ")", "{", "$",...
Finds objects by multiple PIDs. @param array|string $pids The PIDs as array or as string, seperated by `,` @param int $limit The optional limit, defaults to `0` @param array $querySettings The optional query settings @return \TYPO3\CMS\Extbase\Persistence\Generic\QueryResult|null The found objects or null if no object...
[ "Finds", "objects", "by", "multiple", "PIDs", "." ]
8c04b7688cc2773f11fcc87fda3f7cd53d80a980
https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Domain/Repository/AbstractRepository.php#L191-L218
train
t3v/t3v_core
Classes/Domain/Repository/AbstractRepository.php
AbstractRepository.applyQuerySettings
protected function applyQuerySettings($query, array $settings) { if (!empty($settings)) { $respectStoragePage = $settings['respectStoragePage']; if (is_bool($respectStoragePage)) { $query->getQuerySettings()->setRespectStoragePage($respectStoragePage); } $respectSysLanguage = $sett...
php
protected function applyQuerySettings($query, array $settings) { if (!empty($settings)) { $respectStoragePage = $settings['respectStoragePage']; if (is_bool($respectStoragePage)) { $query->getQuerySettings()->setRespectStoragePage($respectStoragePage); } $respectSysLanguage = $sett...
[ "protected", "function", "applyQuerySettings", "(", "$", "query", ",", "array", "$", "settings", ")", "{", "if", "(", "!", "empty", "(", "$", "settings", ")", ")", "{", "$", "respectStoragePage", "=", "$", "settings", "[", "'respectStoragePage'", "]", ";",...
Applies settings on a query. @param object $query The query @param array $settings The settings to apply @return object The query with the applied settings
[ "Applies", "settings", "on", "a", "query", "." ]
8c04b7688cc2773f11fcc87fda3f7cd53d80a980
https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Domain/Repository/AbstractRepository.php#L227-L249
train
t3v/t3v_core
Classes/Domain/Repository/AbstractRepository.php
AbstractRepository.getOrderingsByField
protected function getOrderingsByField(string $field, array $values, string $order = QueryInterface::ORDER_DESCENDING): array { $orderings = []; if (!empty($values)) { foreach ($values as $value) { $orderings["$field={$value}"] = $order; } } return $orderings; }
php
protected function getOrderingsByField(string $field, array $values, string $order = QueryInterface::ORDER_DESCENDING): array { $orderings = []; if (!empty($values)) { foreach ($values as $value) { $orderings["$field={$value}"] = $order; } } return $orderings; }
[ "protected", "function", "getOrderingsByField", "(", "string", "$", "field", ",", "array", "$", "values", ",", "string", "$", "order", "=", "QueryInterface", "::", "ORDER_DESCENDING", ")", ":", "array", "{", "$", "orderings", "=", "[", "]", ";", "if", "(",...
Gets the orderings by a field. @param string $field The field @param array $values The values @param string $order The optional order, defaults to `QueryInterface::ORDER_DESCENDING` @return array The orderings
[ "Gets", "the", "orderings", "by", "a", "field", "." ]
8c04b7688cc2773f11fcc87fda3f7cd53d80a980
https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Domain/Repository/AbstractRepository.php#L259-L269
train
Retentio/Boomgo
src/Boomgo/Mapper/SimpleMapper.php
SimpleMapper.serialize
public function serialize($object) { if (!is_object($object)) { throw new \InvalidArgumentException('Argument must be an object'); } $reflectedObject = new \ReflectionObject($object); $reflectedProperties = $reflectedObject->getProperties(); $array = array(); ...
php
public function serialize($object) { if (!is_object($object)) { throw new \InvalidArgumentException('Argument must be an object'); } $reflectedObject = new \ReflectionObject($object); $reflectedProperties = $reflectedObject->getProperties(); $array = array(); ...
[ "public", "function", "serialize", "(", "$", "object", ")", "{", "if", "(", "!", "is_object", "(", "$", "object", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'Argument must be an object'", ")", ";", "}", "$", "reflectedObject", "="...
Convert an object to a mongoable array @param mixed $object @return array
[ "Convert", "an", "object", "to", "a", "mongoable", "array" ]
95cc53777425dd76cd0034046fa4f9e72c04d73a
https://github.com/Retentio/Boomgo/blob/95cc53777425dd76cd0034046fa4f9e72c04d73a/src/Boomgo/Mapper/SimpleMapper.php#L93-L117
train
Retentio/Boomgo
src/Boomgo/Mapper/SimpleMapper.php
SimpleMapper.getValue
private function getValue($object, \ReflectionProperty $property) { $value = null; if ($property->isPublic()) { $value = $property->getValue($object); } else { // Try to use accessor if property is not public $accessorName = $this->formatter->getPhpAccess...
php
private function getValue($object, \ReflectionProperty $property) { $value = null; if ($property->isPublic()) { $value = $property->getValue($object); } else { // Try to use accessor if property is not public $accessorName = $this->formatter->getPhpAccess...
[ "private", "function", "getValue", "(", "$", "object", ",", "\\", "ReflectionProperty", "$", "property", ")", "{", "$", "value", "=", "null", ";", "if", "(", "$", "property", "->", "isPublic", "(", ")", ")", "{", "$", "value", "=", "$", "property", "...
Return a value for an object property @param mixed $object @param \ReflectionProperty $property @return mixed
[ "Return", "a", "value", "for", "an", "object", "property" ]
95cc53777425dd76cd0034046fa4f9e72c04d73a
https://github.com/Retentio/Boomgo/blob/95cc53777425dd76cd0034046fa4f9e72c04d73a/src/Boomgo/Mapper/SimpleMapper.php#L161-L179
train
Retentio/Boomgo
src/Boomgo/Mapper/SimpleMapper.php
SimpleMapper.setValue
private function setValue($object, \ReflectionProperty $property, $value) { if ($property->isPublic()) { $property->setValue($object, $value); } else { // Try to use mutator if property is not public $mutatorName = $this->formatter->getPhpMutator($property->getNam...
php
private function setValue($object, \ReflectionProperty $property, $value) { if ($property->isPublic()) { $property->setValue($object, $value); } else { // Try to use mutator if property is not public $mutatorName = $this->formatter->getPhpMutator($property->getNam...
[ "private", "function", "setValue", "(", "$", "object", ",", "\\", "ReflectionProperty", "$", "property", ",", "$", "value", ")", "{", "if", "(", "$", "property", "->", "isPublic", "(", ")", ")", "{", "$", "property", "->", "setValue", "(", "$", "object...
Define a value for an object property @param mixed $object @param \ReflectionProperty $property @param mixed $value
[ "Define", "a", "value", "for", "an", "object", "property" ]
95cc53777425dd76cd0034046fa4f9e72c04d73a
https://github.com/Retentio/Boomgo/blob/95cc53777425dd76cd0034046fa4f9e72c04d73a/src/Boomgo/Mapper/SimpleMapper.php#L188-L202
train
kaiohken1982/NeobazaarDocumentModule
src/Document/Model/ModelFetcher.php
ModelFetcher.get
public function get($idOrDocument, $type = Document::DOCUMENT_TYPE_CLASSIFIED) { $neobazaarService = $this->getServiceLocator()->get('neobazaar.service.main'); $classifiedService = $this->getServiceLocator()->get('document.service.classified'); $documentRepository = $neobazaarService->getDo...
php
public function get($idOrDocument, $type = Document::DOCUMENT_TYPE_CLASSIFIED) { $neobazaarService = $this->getServiceLocator()->get('neobazaar.service.main'); $classifiedService = $this->getServiceLocator()->get('document.service.classified'); $documentRepository = $neobazaarService->getDo...
[ "public", "function", "get", "(", "$", "idOrDocument", ",", "$", "type", "=", "Document", "::", "DOCUMENT_TYPE_CLASSIFIED", ")", "{", "$", "neobazaarService", "=", "$", "this", "->", "getServiceLocator", "(", ")", "->", "get", "(", "'neobazaar.service.main'", ...
Fetch the correct model depending on user auth @param string|int|object $entity @param unknown $type @return object
[ "Fetch", "the", "correct", "model", "depending", "on", "user", "auth" ]
edb0223878fe02e791d2a0266c5a7c0f2029e3fe
https://github.com/kaiohken1982/NeobazaarDocumentModule/blob/edb0223878fe02e791d2a0266c5a7c0f2029e3fe/src/Document/Model/ModelFetcher.php#L44-L77
train
ciims/ciims-themes-default
Theme.php
Theme.afterSave
public function afterSave() { // Bust the cache Yii::app()->cache->delete($this->theme . '_settings_tweets'); Yii::app()->cache->delete($this->theme . '_settings_facebook_data'); Yii::app()->cache->delete($this->theme . '_settings_g+_activities'); return parent::afterSave(); }
php
public function afterSave() { // Bust the cache Yii::app()->cache->delete($this->theme . '_settings_tweets'); Yii::app()->cache->delete($this->theme . '_settings_facebook_data'); Yii::app()->cache->delete($this->theme . '_settings_g+_activities'); return parent::afterSave(); }
[ "public", "function", "afterSave", "(", ")", "{", "// Bust the cache", "Yii", "::", "app", "(", ")", "->", "cache", "->", "delete", "(", "$", "this", "->", "theme", ".", "'_settings_tweets'", ")", ";", "Yii", "::", "app", "(", ")", "->", "cache", "->",...
AfterSave Event Clears the local cache
[ "AfterSave", "Event", "Clears", "the", "local", "cache" ]
62c64e11f003bf61e137a7ebeed9804caa379f8e
https://github.com/ciims/ciims-themes-default/blob/62c64e11f003bf61e137a7ebeed9804caa379f8e/Theme.php#L79-L86
train
ciims/ciims-themes-default
Theme.php
Theme.getTweets
public function getTweets($postData=NULL) { header("Content-Type: application/json"); if ($this->twitterHandle == NULL || $this->twitterTweetsToFetch == 0) return false; try { $connection = new TwitterOAuth( Cii::getConfig('ha_twitter_key', NULL, NULL), Cii::getConfig('ha_twitte...
php
public function getTweets($postData=NULL) { header("Content-Type: application/json"); if ($this->twitterHandle == NULL || $this->twitterTweetsToFetch == 0) return false; try { $connection = new TwitterOAuth( Cii::getConfig('ha_twitter_key', NULL, NULL), Cii::getConfig('ha_twitte...
[ "public", "function", "getTweets", "(", "$", "postData", "=", "NULL", ")", "{", "header", "(", "\"Content-Type: application/json\"", ")", ";", "if", "(", "$", "this", "->", "twitterHandle", "==", "NULL", "||", "$", "this", "->", "twitterTweetsToFetch", "==", ...
getTweets callback method @param array $postdata $_POST response data
[ "getTweets", "callback", "method" ]
62c64e11f003bf61e137a7ebeed9804caa379f8e
https://github.com/ciims/ciims-themes-default/blob/62c64e11f003bf61e137a7ebeed9804caa379f8e/Theme.php#L92-L131
train
ciims/ciims-themes-default
Theme.php
Theme.getGooglePlusPosts
public function getGooglePlusPosts($postData=NULL) { $key = Cii::getConfig('google_plus_public_server_key'); if ($key == NULL || $this->googlePlusUserId == NULL) return false; $result = Yii::app()->cache->get($this->theme . '_settings_g+_activities'); if ($result == false) { $client = new Googl...
php
public function getGooglePlusPosts($postData=NULL) { $key = Cii::getConfig('google_plus_public_server_key'); if ($key == NULL || $this->googlePlusUserId == NULL) return false; $result = Yii::app()->cache->get($this->theme . '_settings_g+_activities'); if ($result == false) { $client = new Googl...
[ "public", "function", "getGooglePlusPosts", "(", "$", "postData", "=", "NULL", ")", "{", "$", "key", "=", "Cii", "::", "getConfig", "(", "'google_plus_public_server_key'", ")", ";", "if", "(", "$", "key", "==", "NULL", "||", "$", "this", "->", "googlePlusU...
getGooglePlusPosts callback method Retrieves recent activities from Google+ @param array $postdata $_POST response data
[ "getGooglePlusPosts", "callback", "method", "Retrieves", "recent", "activities", "from", "Google", "+" ]
62c64e11f003bf61e137a7ebeed9804caa379f8e
https://github.com/ciims/ciims-themes-default/blob/62c64e11f003bf61e137a7ebeed9804caa379f8e/Theme.php#L175-L196
train
austinkregel/Menu
src/Menu/Interfaces/AbstractMenu.php
AbstractMenu.generateLink
protected function generateLink($route, $params = null) { if ($route instanceof Closure) { // Have to stringify this before calling Route::has because it will // Fail if we don't pass a string in $route = $this->stringify($route); } if (\Route::has($route)...
php
protected function generateLink($route, $params = null) { if ($route instanceof Closure) { // Have to stringify this before calling Route::has because it will // Fail if we don't pass a string in $route = $this->stringify($route); } if (\Route::has($route)...
[ "protected", "function", "generateLink", "(", "$", "route", ",", "$", "params", "=", "null", ")", "{", "if", "(", "$", "route", "instanceof", "Closure", ")", "{", "// Have to stringify this before calling Route::has because it will", "// Fail if we don't pass a string in"...
This will generate a url relating to the given route, whether that is from a raw url or if it is a route. It will also grab the params for the values. @param string $route @param mixed $params @return string
[ "This", "will", "generate", "a", "url", "relating", "to", "the", "given", "route", "whether", "that", "is", "from", "a", "raw", "url", "or", "if", "it", "is", "a", "route", ".", "It", "will", "also", "grab", "the", "params", "for", "the", "values", "...
6bbae2ad210afc47f7eca1051a8cedf6a29a78ab
https://github.com/austinkregel/Menu/blob/6bbae2ad210afc47f7eca1051a8cedf6a29a78ab/src/Menu/Interfaces/AbstractMenu.php#L90-L112
train
austinkregel/Menu
src/Menu/Interfaces/AbstractMenu.php
AbstractMenu.run
private function run($callback) { $injects = []; $reflectionFunction = new \ReflectionFunction($callback); foreach ($reflectionFunction->getParameters() as $parameter) { if ($class = $parameter->getClass()) { $injects[] = app($class->name); } }...
php
private function run($callback) { $injects = []; $reflectionFunction = new \ReflectionFunction($callback); foreach ($reflectionFunction->getParameters() as $parameter) { if ($class = $parameter->getClass()) { $injects[] = app($class->name); } }...
[ "private", "function", "run", "(", "$", "callback", ")", "{", "$", "injects", "=", "[", "]", ";", "$", "reflectionFunction", "=", "new", "\\", "ReflectionFunction", "(", "$", "callback", ")", ";", "foreach", "(", "$", "reflectionFunction", "->", "getParame...
This is a dependancy injection function which allows the config function to have new classes without needing them to have a need for actually newing up the new objects. @param Callback $callback @return Closure
[ "This", "is", "a", "dependancy", "injection", "function", "which", "allows", "the", "config", "function", "to", "have", "new", "classes", "without", "needing", "them", "to", "have", "a", "need", "for", "actually", "newing", "up", "the", "new", "objects", "."...
6bbae2ad210afc47f7eca1051a8cedf6a29a78ab
https://github.com/austinkregel/Menu/blob/6bbae2ad210afc47f7eca1051a8cedf6a29a78ab/src/Menu/Interfaces/AbstractMenu.php#L171-L182
train
Fulfillment-dot-com/api-wrapper-php
src/Http/Request.php
Request.makeRequest
function makeRequest($method, $url, $apiRequest = null, $queryString = null) { $urlEndPoint = $this->config->getEndpoint() . '/' . $url; //we want to see the url being called $this->climate->out($this->config->getLoggerPrefix() . 'URL: ' . $urlEndPoint); $data = [ 'headers' => [ 'Authorization' => 'Be...
php
function makeRequest($method, $url, $apiRequest = null, $queryString = null) { $urlEndPoint = $this->config->getEndpoint() . '/' . $url; //we want to see the url being called $this->climate->out($this->config->getLoggerPrefix() . 'URL: ' . $urlEndPoint); $data = [ 'headers' => [ 'Authorization' => 'Be...
[ "function", "makeRequest", "(", "$", "method", ",", "$", "url", ",", "$", "apiRequest", "=", "null", ",", "$", "queryString", "=", "null", ")", "{", "$", "urlEndPoint", "=", "$", "this", "->", "config", "->", "getEndpoint", "(", ")", ".", "'/'", ".",...
Make a request to the API using Guzzle @param $method string The HTTP VERB to use for this request @param $url string The relative URL after the hostname @param null $apiRequest array The contents of the api body @param null $queryString array Data to add as a queryString to the url @return mi...
[ "Make", "a", "request", "to", "the", "API", "using", "Guzzle" ]
f4352843d060bc1b460c1283f25c210c9b94d324
https://github.com/Fulfillment-dot-com/api-wrapper-php/blob/f4352843d060bc1b460c1283f25c210c9b94d324/src/Http/Request.php#L118-L185
train
ZendExperts/phpids
lib/IDS/Init.php
IDS_Init.setConfigPath
public function setConfigPath($path) { if (file_exists($path)) { $this->configPath = $path; } else { throw new Exception( 'Configuration file could not be found at ' . htmlspecialchars($path, ENT_QUOTES, 'UTF-8') ); } }
php
public function setConfigPath($path) { if (file_exists($path)) { $this->configPath = $path; } else { throw new Exception( 'Configuration file could not be found at ' . htmlspecialchars($path, ENT_QUOTES, 'UTF-8') ); } }
[ "public", "function", "setConfigPath", "(", "$", "path", ")", "{", "if", "(", "file_exists", "(", "$", "path", ")", ")", "{", "$", "this", "->", "configPath", "=", "$", "path", ";", "}", "else", "{", "throw", "new", "Exception", "(", "'Configuration fi...
Sets the path to the configuration file @param string $path the path to the config @throws Exception if file not found @return void
[ "Sets", "the", "path", "to", "the", "configuration", "file" ]
f30df04eea47b94d056e2ae9ec8fea1c626f1c03
https://github.com/ZendExperts/phpids/blob/f30df04eea47b94d056e2ae9ec8fea1c626f1c03/lib/IDS/Init.php#L132-L142
train
ZendExperts/phpids
lib/IDS/Init.php
IDS_Init._mergeConfig
protected function _mergeConfig($current, $successor) { if (is_array($current) and is_array($successor)) { foreach ($successor as $key => $value) { if (isset($current[$key]) and is_array($value) and is_array($current[$key])) { ...
php
protected function _mergeConfig($current, $successor) { if (is_array($current) and is_array($successor)) { foreach ($successor as $key => $value) { if (isset($current[$key]) and is_array($value) and is_array($current[$key])) { ...
[ "protected", "function", "_mergeConfig", "(", "$", "current", ",", "$", "successor", ")", "{", "if", "(", "is_array", "(", "$", "current", ")", "and", "is_array", "(", "$", "successor", ")", ")", "{", "foreach", "(", "$", "successor", "as", "$", "key",...
Merge config hashes recursivly The algorithm merges configuration arrays recursively. If an element is an array in both, the values will be appended. If it is a scalar in both, the value will be replaced. @param array $current The legacy hash @param array $successor The hash which values count more when in doubt @r...
[ "Merge", "config", "hashes", "recursivly" ]
f30df04eea47b94d056e2ae9ec8fea1c626f1c03
https://github.com/ZendExperts/phpids/blob/f30df04eea47b94d056e2ae9ec8fea1c626f1c03/lib/IDS/Init.php#L198-L213
train
zarathustra323/modlr-data
src/Zarathustra/ModlrData/Metadata/EntityMetadata.php
EntityMetadata.merge
public function merge(EntityMetadata $metadata) { $this->setType($metadata->type); $this->setAbstract($metadata->isAbstract()); $this->setPolymorphic($metadata->isPolymorphic()); $this->extends = $metadata->extends; $this->mergeAttributes($metadata->getAttributes()); ...
php
public function merge(EntityMetadata $metadata) { $this->setType($metadata->type); $this->setAbstract($metadata->isAbstract()); $this->setPolymorphic($metadata->isPolymorphic()); $this->extends = $metadata->extends; $this->mergeAttributes($metadata->getAttributes()); ...
[ "public", "function", "merge", "(", "EntityMetadata", "$", "metadata", ")", "{", "$", "this", "->", "setType", "(", "$", "metadata", "->", "type", ")", ";", "$", "this", "->", "setAbstract", "(", "$", "metadata", "->", "isAbstract", "(", ")", ")", ";",...
Merges an EntityMetadata instance with this instance. For use with entity class extension. @param EntityMetadata $metadata @return self
[ "Merges", "an", "EntityMetadata", "instance", "with", "this", "instance", ".", "For", "use", "with", "entity", "class", "extension", "." ]
7c2c767216055f75abf8cf22e2200f11998ed24e
https://github.com/zarathustra323/modlr-data/blob/7c2c767216055f75abf8cf22e2200f11998ed24e/src/Zarathustra/ModlrData/Metadata/EntityMetadata.php#L83-L92
train
zarathustra323/modlr-data
src/Zarathustra/ModlrData/Metadata/EntityMetadata.php
EntityMetadata.setType
public function setType($type) { if (!is_string($type) || empty($type)) { throw MetadataException::invalidEntityType(); } $this->type = $type; return $this; }
php
public function setType($type) { if (!is_string($type) || empty($type)) { throw MetadataException::invalidEntityType(); } $this->type = $type; return $this; }
[ "public", "function", "setType", "(", "$", "type", ")", "{", "if", "(", "!", "is_string", "(", "$", "type", ")", "||", "empty", "(", "$", "type", ")", ")", "{", "throw", "MetadataException", "::", "invalidEntityType", "(", ")", ";", "}", "$", "this",...
Sets the entity type. @param string $type @return self @throws MetadataException If the type is not a string or is empty.
[ "Sets", "the", "entity", "type", "." ]
7c2c767216055f75abf8cf22e2200f11998ed24e
https://github.com/zarathustra323/modlr-data/blob/7c2c767216055f75abf8cf22e2200f11998ed24e/src/Zarathustra/ModlrData/Metadata/EntityMetadata.php#L101-L108
train
zarathustra323/modlr-data
src/Zarathustra/ModlrData/Metadata/EntityMetadata.php
EntityMetadata.mergeAttributes
private function mergeAttributes(array $toAdd) { $this->attributes = array_merge($this->attributes, $toAdd); ksort($this->attributes); return $this; }
php
private function mergeAttributes(array $toAdd) { $this->attributes = array_merge($this->attributes, $toAdd); ksort($this->attributes); return $this; }
[ "private", "function", "mergeAttributes", "(", "array", "$", "toAdd", ")", "{", "$", "this", "->", "attributes", "=", "array_merge", "(", "$", "this", "->", "attributes", ",", "$", "toAdd", ")", ";", "ksort", "(", "$", "this", "->", "attributes", ")", ...
Merges attributes with this instance's attributes. @param array $toAdd @return self
[ "Merges", "attributes", "with", "this", "instance", "s", "attributes", "." ]
7c2c767216055f75abf8cf22e2200f11998ed24e
https://github.com/zarathustra323/modlr-data/blob/7c2c767216055f75abf8cf22e2200f11998ed24e/src/Zarathustra/ModlrData/Metadata/EntityMetadata.php#L116-L121
train
zarathustra323/modlr-data
src/Zarathustra/ModlrData/Metadata/EntityMetadata.php
EntityMetadata.mergeRelationships
private function mergeRelationships(array $toAdd) { $this->relationships = array_merge($this->relationships, $toAdd); ksort($this->relationships); return $this; }
php
private function mergeRelationships(array $toAdd) { $this->relationships = array_merge($this->relationships, $toAdd); ksort($this->relationships); return $this; }
[ "private", "function", "mergeRelationships", "(", "array", "$", "toAdd", ")", "{", "$", "this", "->", "relationships", "=", "array_merge", "(", "$", "this", "->", "relationships", ",", "$", "toAdd", ")", ";", "ksort", "(", "$", "this", "->", "relationships...
Merges relationships with this instance's relationships. @param array $toAdd @return self
[ "Merges", "relationships", "with", "this", "instance", "s", "relationships", "." ]
7c2c767216055f75abf8cf22e2200f11998ed24e
https://github.com/zarathustra323/modlr-data/blob/7c2c767216055f75abf8cf22e2200f11998ed24e/src/Zarathustra/ModlrData/Metadata/EntityMetadata.php#L129-L134
train
zarathustra323/modlr-data
src/Zarathustra/ModlrData/Metadata/EntityMetadata.php
EntityMetadata.addAttribute
public function addAttribute(AttributeMetadata $attribute) { if (isset($this->relationships[$attribute->getKey()])) { throw MetadataException::fieldKeyInUse('attribute', 'relationship', $attribute->getKey(), $this->type); } $this->attributes[$attribute->getKey()] = $attribute; ...
php
public function addAttribute(AttributeMetadata $attribute) { if (isset($this->relationships[$attribute->getKey()])) { throw MetadataException::fieldKeyInUse('attribute', 'relationship', $attribute->getKey(), $this->type); } $this->attributes[$attribute->getKey()] = $attribute; ...
[ "public", "function", "addAttribute", "(", "AttributeMetadata", "$", "attribute", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "relationships", "[", "$", "attribute", "->", "getKey", "(", ")", "]", ")", ")", "{", "throw", "MetadataException", "::"...
Adds an attribute field to this entity. @param AttributeMetadata $attribute @return self @throws MetadataException If the attribute key already exists as a relationship.
[ "Adds", "an", "attribute", "field", "to", "this", "entity", "." ]
7c2c767216055f75abf8cf22e2200f11998ed24e
https://github.com/zarathustra323/modlr-data/blob/7c2c767216055f75abf8cf22e2200f11998ed24e/src/Zarathustra/ModlrData/Metadata/EntityMetadata.php#L208-L216
train
gplcart/backup
handlers/Module.php
Module.backup
public function backup(array $data, $model) { $directory = gplcart_file_private_module('backup'); if (!file_exists($directory) && !mkdir($directory, 0775, true)) { return false; } $data['type'] = 'module'; $data['name'] = $this->translation->text('Module @name',...
php
public function backup(array $data, $model) { $directory = gplcart_file_private_module('backup'); if (!file_exists($directory) && !mkdir($directory, 0775, true)) { return false; } $data['type'] = 'module'; $data['name'] = $this->translation->text('Module @name',...
[ "public", "function", "backup", "(", "array", "$", "data", ",", "$", "model", ")", "{", "$", "directory", "=", "gplcart_file_private_module", "(", "'backup'", ")", ";", "if", "(", "!", "file_exists", "(", "$", "directory", ")", "&&", "!", "mkdir", "(", ...
Creates a module backup @param array $data @param \gplcart\modules\backup\models\Backup $model @return boolean
[ "Creates", "a", "module", "backup" ]
5838e2f47f0bb8c2e18b6697e20bec5682b71393
https://github.com/gplcart/backup/blob/5838e2f47f0bb8c2e18b6697e20bec5682b71393/handlers/Module.php#L49-L71
train
phossa/phossa-logger
src/Phossa/Logger/Handler/BrowserHandler.php
BrowserHandler.flush
public static function flush() { // Check content type $html = true; foreach (headers_list() as $header) { if (stripos($header, 'content-type:') === 0) { if (stripos($header, 'application/javascript') !== false || stripos($header, 'text/javascr...
php
public static function flush() { // Check content type $html = true; foreach (headers_list() as $header) { if (stripos($header, 'content-type:') === 0) { if (stripos($header, 'application/javascript') !== false || stripos($header, 'text/javascr...
[ "public", "static", "function", "flush", "(", ")", "{", "// Check content type", "$", "html", "=", "true", ";", "foreach", "(", "headers_list", "(", ")", "as", "$", "header", ")", "{", "if", "(", "stripos", "(", "$", "header", ",", "'content-type:'", ")"...
flush the messages to browser by adding to HTML page @return void @access public @static @api
[ "flush", "the", "messages", "to", "browser", "by", "adding", "to", "HTML", "page" ]
dfec8a1e6015c66d2aa77134077902fd3d49e41d
https://github.com/phossa/phossa-logger/blob/dfec8a1e6015c66d2aa77134077902fd3d49e41d/src/Phossa/Logger/Handler/BrowserHandler.php#L93-L118
train
itkg/core
src/Itkg/Core/Command/CommandExecuterAbstract.php
CommandExecuterAbstract.execute
public function execute(InputInterface $input, OutputInterface $output) { $this->output = $output; try { $this->doExecute($input, $output); } catch (\Exception $e) { $this->writeException($e); } }
php
public function execute(InputInterface $input, OutputInterface $output) { $this->output = $output; try { $this->doExecute($input, $output); } catch (\Exception $e) { $this->writeException($e); } }
[ "public", "function", "execute", "(", "InputInterface", "$", "input", ",", "OutputInterface", "$", "output", ")", "{", "$", "this", "->", "output", "=", "$", "output", ";", "try", "{", "$", "this", "->", "doExecute", "(", "$", "input", ",", "$", "outpu...
Execute command and type @param InputInterface $input @param OutputInterface $output @throws \RuntimeException @throws \LogicException @return void
[ "Execute", "command", "and", "type" ]
e5e4efb05feb4d23b0df41f2b21fd095103e593b
https://github.com/itkg/core/blob/e5e4efb05feb4d23b0df41f2b21fd095103e593b/src/Itkg/Core/Command/CommandExecuterAbstract.php#L63-L71
train
itkg/core
src/Itkg/Core/Command/CommandExecuterAbstract.php
CommandExecuterAbstract.write
protected function write($message, array $record = array()) { $record = array_merge($this->defautlRecord, $record); $record['msg'] = $message; $this->output->writeln($this->formatter->format($record)); }
php
protected function write($message, array $record = array()) { $record = array_merge($this->defautlRecord, $record); $record['msg'] = $message; $this->output->writeln($this->formatter->format($record)); }
[ "protected", "function", "write", "(", "$", "message", ",", "array", "$", "record", "=", "array", "(", ")", ")", "{", "$", "record", "=", "array_merge", "(", "$", "this", "->", "defautlRecord", ",", "$", "record", ")", ";", "$", "record", "[", "'msg'...
Write a message with extra record params @param string $message @param array $record
[ "Write", "a", "message", "with", "extra", "record", "params" ]
e5e4efb05feb4d23b0df41f2b21fd095103e593b
https://github.com/itkg/core/blob/e5e4efb05feb4d23b0df41f2b21fd095103e593b/src/Itkg/Core/Command/CommandExecuterAbstract.php#L90-L95
train
itkg/core
src/Itkg/Core/Command/CommandExecuterAbstract.php
CommandExecuterAbstract.writeException
protected function writeException(\Exception $exception, array $record = array()) { $record = array_merge($this->defautlRecord, $record); $this->output->writeln($this->formatter->formatException($exception, $record)); }
php
protected function writeException(\Exception $exception, array $record = array()) { $record = array_merge($this->defautlRecord, $record); $this->output->writeln($this->formatter->formatException($exception, $record)); }
[ "protected", "function", "writeException", "(", "\\", "Exception", "$", "exception", ",", "array", "$", "record", "=", "array", "(", ")", ")", "{", "$", "record", "=", "array_merge", "(", "$", "this", "->", "defautlRecord", ",", "$", "record", ")", ";", ...
Write an exception with extra record params @param \Exception $exception @param array $record
[ "Write", "an", "exception", "with", "extra", "record", "params" ]
e5e4efb05feb4d23b0df41f2b21fd095103e593b
https://github.com/itkg/core/blob/e5e4efb05feb4d23b0df41f2b21fd095103e593b/src/Itkg/Core/Command/CommandExecuterAbstract.php#L128-L132
train
web-chefs/LaraAppSpawn
src/Components/Database.php
Database.boot
public function boot(Application $app, ConfigContract &$appConfig) { // Setup test DB $appConfig->set('database.connections.' . $this->connection, $this->options); $appConfig->set('database.default', $this->connection); // Set database migration path EG: /mysite/database/ $a...
php
public function boot(Application $app, ConfigContract &$appConfig) { // Setup test DB $appConfig->set('database.connections.' . $this->connection, $this->options); $appConfig->set('database.default', $this->connection); // Set database migration path EG: /mysite/database/ $a...
[ "public", "function", "boot", "(", "Application", "$", "app", ",", "ConfigContract", "&", "$", "appConfig", ")", "{", "// Setup test DB", "$", "appConfig", "->", "set", "(", "'database.connections.'", ".", "$", "this", "->", "connection", ",", "$", "this", "...
Run setup component. @return
[ "Run", "setup", "component", "." ]
0eda486590fe7ca450836b9927a2498ff853cba6
https://github.com/web-chefs/LaraAppSpawn/blob/0eda486590fe7ca450836b9927a2498ff853cba6/src/Components/Database.php#L58-L66
train
Torann/skosh-generator
src/Site.php
Site.addContent
public function addContent($content) { if ($content instanceof Page) { $this->addPage($content); } else { if ($content) { $this->addChild($content); } else { throw new Exception("Unknown content type."); ...
php
public function addContent($content) { if ($content instanceof Page) { $this->addPage($content); } else { if ($content) { $this->addChild($content); } else { throw new Exception("Unknown content type."); ...
[ "public", "function", "addContent", "(", "$", "content", ")", "{", "if", "(", "$", "content", "instanceof", "Page", ")", "{", "$", "this", "->", "addPage", "(", "$", "content", ")", ";", "}", "else", "{", "if", "(", "$", "content", ")", "{", "$", ...
Add content to site. @param Page|Content $content @throws Exception
[ "Add", "content", "to", "site", "." ]
ea60e037d92398d7c146eb2349735d5692e3c48c
https://github.com/Torann/skosh-generator/blob/ea60e037d92398d7c146eb2349735d5692e3c48c/src/Site.php#L69-L82
train
Torann/skosh-generator
src/Site.php
Site.addChild
public function addChild(Content $child) { $this->pages[$child->id] = $child; // Group by category if (!isset($this->categories[$child->category])) { $this->categories[$child->category] = []; } // Add post to category $this->categories[$child->category][...
php
public function addChild(Content $child) { $this->pages[$child->id] = $child; // Group by category if (!isset($this->categories[$child->category])) { $this->categories[$child->category] = []; } // Add post to category $this->categories[$child->category][...
[ "public", "function", "addChild", "(", "Content", "$", "child", ")", "{", "$", "this", "->", "pages", "[", "$", "child", "->", "id", "]", "=", "$", "child", ";", "// Group by category", "if", "(", "!", "isset", "(", "$", "this", "->", "categories", "...
Add child to page. @param Content $child
[ "Add", "child", "to", "page", "." ]
ea60e037d92398d7c146eb2349735d5692e3c48c
https://github.com/Torann/skosh-generator/blob/ea60e037d92398d7c146eb2349735d5692e3c48c/src/Site.php#L99-L110
train
shgysk8zer0/core_api
traits/pdo_backups.php
PDO_Backups.restore
final public function restore($fname = null) { if (is_null($fname)) { $fname = $this->database; } if ($this->pathExtension($fname) === '') { $fname .= '.sql'; } if ($this->pathDirname($fname) === '.') { $fname = $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . $fname; } if (@file_exists($fname...
php
final public function restore($fname = null) { if (is_null($fname)) { $fname = $this->database; } if ($this->pathExtension($fname) === '') { $fname .= '.sql'; } if ($this->pathDirname($fname) === '.') { $fname = $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . $fname; } if (@file_exists($fname...
[ "final", "public", "function", "restore", "(", "$", "fname", "=", "null", ")", "{", "if", "(", "is_null", "(", "$", "fname", ")", ")", "{", "$", "fname", "=", "$", "this", "->", "database", ";", "}", "if", "(", "$", "this", "->", "pathExtension", ...
Restore a file from a mysqldump @param string $fname Name of file, defaults to database name @return bool
[ "Restore", "a", "file", "from", "a", "mysqldump" ]
9e9b8baf761af874b95256ad2462e55fbb2b2e58
https://github.com/shgysk8zer0/core_api/blob/9e9b8baf761af874b95256ad2462e55fbb2b2e58/traits/pdo_backups.php#L76-L92
train
ARCANESOFT/Media
src/Media.php
Media.all
public function all($directory = '/') { $directories = $this->directories($directory)->transform(function ($item) { return $item + ['type' => self::MEDIA_TYPE_DIRECTORY]; }); $files = $this->files($directory)->transform(function (array $item) { return $item + ['type'...
php
public function all($directory = '/') { $directories = $this->directories($directory)->transform(function ($item) { return $item + ['type' => self::MEDIA_TYPE_DIRECTORY]; }); $files = $this->files($directory)->transform(function (array $item) { return $item + ['type'...
[ "public", "function", "all", "(", "$", "directory", "=", "'/'", ")", "{", "$", "directories", "=", "$", "this", "->", "directories", "(", "$", "directory", ")", "->", "transform", "(", "function", "(", "$", "item", ")", "{", "return", "$", "item", "+...
Get all the directories & files from a given location. @param string $directory @return array
[ "Get", "all", "the", "directories", "&", "files", "from", "a", "given", "location", "." ]
e98aad52f94e6587fcbf79c56f7bf7072929bfc9
https://github.com/ARCANESOFT/Media/blob/e98aad52f94e6587fcbf79c56f7bf7072929bfc9/src/Media.php#L136-L147
train
ARCANESOFT/Media
src/Media.php
Media.files
public function files($directory) { $this->checkDirectory($directory); $disk = $this->disk(); // TODO: Add a feature to exclude unwanted files. $files = array_map(function ($filePath) use ($disk, $directory) { return [ 'name' => str_replace("$dir...
php
public function files($directory) { $this->checkDirectory($directory); $disk = $this->disk(); // TODO: Add a feature to exclude unwanted files. $files = array_map(function ($filePath) use ($disk, $directory) { return [ 'name' => str_replace("$dir...
[ "public", "function", "files", "(", "$", "directory", ")", "{", "$", "this", "->", "checkDirectory", "(", "$", "directory", ")", ";", "$", "disk", "=", "$", "this", "->", "disk", "(", ")", ";", "// TODO: Add a feature to exclude unwanted files.", "$", "files...
Get a collection of all files in a directory. @param string $directory @return \Arcanesoft\Media\Entities\FileCollection
[ "Get", "a", "collection", "of", "all", "files", "in", "a", "directory", "." ]
e98aad52f94e6587fcbf79c56f7bf7072929bfc9
https://github.com/ARCANESOFT/Media/blob/e98aad52f94e6587fcbf79c56f7bf7072929bfc9/src/Media.php#L178-L198
train
ARCANESOFT/Media
src/Media.php
Media.file
public function file($path) { return $this->files(dirname($path))->first(function ($file) use ($path) { return $file['path'] === $path; }, function () use ($path) { throw new FileNotFoundException("File [$path] not found!"); }); }
php
public function file($path) { return $this->files(dirname($path))->first(function ($file) use ($path) { return $file['path'] === $path; }, function () use ($path) { throw new FileNotFoundException("File [$path] not found!"); }); }
[ "public", "function", "file", "(", "$", "path", ")", "{", "return", "$", "this", "->", "files", "(", "dirname", "(", "$", "path", ")", ")", "->", "first", "(", "function", "(", "$", "file", ")", "use", "(", "$", "path", ")", "{", "return", "$", ...
Get the file details. @param string $path @return array
[ "Get", "the", "file", "details", "." ]
e98aad52f94e6587fcbf79c56f7bf7072929bfc9
https://github.com/ARCANESOFT/Media/blob/e98aad52f94e6587fcbf79c56f7bf7072929bfc9/src/Media.php#L207-L214
train
ARCANESOFT/Media
src/Media.php
Media.storeMany
public function storeMany($directory, array $files) { $uploaded = []; foreach ($files as $file) { /** @var \Illuminate\Http\UploadedFile $file */ $uploaded[$directory.'/'.$file->getClientOriginalName()] = $this->store($directory, $file); } return $uploaded; ...
php
public function storeMany($directory, array $files) { $uploaded = []; foreach ($files as $file) { /** @var \Illuminate\Http\UploadedFile $file */ $uploaded[$directory.'/'.$file->getClientOriginalName()] = $this->store($directory, $file); } return $uploaded; ...
[ "public", "function", "storeMany", "(", "$", "directory", ",", "array", "$", "files", ")", "{", "$", "uploaded", "=", "[", "]", ";", "foreach", "(", "$", "files", "as", "$", "file", ")", "{", "/** @var \\Illuminate\\Http\\UploadedFile $file */", "$", "upload...
Store an array of files. @param string $directory @param array $files @return array
[ "Store", "an", "array", "of", "files", "." ]
e98aad52f94e6587fcbf79c56f7bf7072929bfc9
https://github.com/ARCANESOFT/Media/blob/e98aad52f94e6587fcbf79c56f7bf7072929bfc9/src/Media.php#L224-L234
train
ARCANESOFT/Media
src/Media.php
Media.isExcludedDirectory
public function isExcludedDirectory($directory) { foreach ($this->getExcludedDirectories() as $pattern) { if (Str::is($pattern, $directory)) return true; } return false; }
php
public function isExcludedDirectory($directory) { foreach ($this->getExcludedDirectories() as $pattern) { if (Str::is($pattern, $directory)) return true; } return false; }
[ "public", "function", "isExcludedDirectory", "(", "$", "directory", ")", "{", "foreach", "(", "$", "this", "->", "getExcludedDirectories", "(", ")", "as", "$", "pattern", ")", "{", "if", "(", "Str", "::", "is", "(", "$", "pattern", ",", "$", "directory",...
Check if the directory is excluded. @param string $directory @return bool
[ "Check", "if", "the", "directory", "is", "excluded", "." ]
e98aad52f94e6587fcbf79c56f7bf7072929bfc9
https://github.com/ARCANESOFT/Media/blob/e98aad52f94e6587fcbf79c56f7bf7072929bfc9/src/Media.php#L345-L352
train
ARCANESOFT/Media
src/Media.php
Media.checkDirectory
protected function checkDirectory(&$directory) { $directory = trim($directory, '/'); $this->checkDirectoryExists($directory); $this->checkDirectoryAccess($directory); }
php
protected function checkDirectory(&$directory) { $directory = trim($directory, '/'); $this->checkDirectoryExists($directory); $this->checkDirectoryAccess($directory); }
[ "protected", "function", "checkDirectory", "(", "&", "$", "directory", ")", "{", "$", "directory", "=", "trim", "(", "$", "directory", ",", "'/'", ")", ";", "$", "this", "->", "checkDirectoryExists", "(", "$", "directory", ")", ";", "$", "this", "->", ...
Check the given directory location. @param string &$directory @throws \Arcanesoft\Media\Exceptions\DirectoryNotFound @throws \Arcanesoft\Media\Exceptions\AccessNotAllowed
[ "Check", "the", "given", "directory", "location", "." ]
e98aad52f94e6587fcbf79c56f7bf7072929bfc9
https://github.com/ARCANESOFT/Media/blob/e98aad52f94e6587fcbf79c56f7bf7072929bfc9/src/Media.php#L367-L373
train
azhai/code-refactor
examples/class-wp-site.php
WP_Site.get_instance
public static function get_instance($site_id) { global $wpdb; $site_id = (int) $site_id; if (! $site_id) { return false; } $_site = wp_cache_get($site_id, 'sites'); if (! $_site) { $_site = $wpdb->get_row($wpdb->prepare("SELECT * FROM {$wpdb...
php
public static function get_instance($site_id) { global $wpdb; $site_id = (int) $site_id; if (! $site_id) { return false; } $_site = wp_cache_get($site_id, 'sites'); if (! $_site) { $_site = $wpdb->get_row($wpdb->prepare("SELECT * FROM {$wpdb...
[ "public", "static", "function", "get_instance", "(", "$", "site_id", ")", "{", "global", "$", "wpdb", ";", "$", "site_id", "=", "(", "int", ")", "$", "site_id", ";", "if", "(", "!", "$", "site_id", ")", "{", "return", "false", ";", "}", "$", "_site...
Retrieves a site from the database by its ID. @static @since 4.5.0 @global wpdb $wpdb WordPress database abstraction object. @param int $site_id The ID of the site to retrieve. @return WP_Site|false The site's object if found. False if not.
[ "Retrieves", "a", "site", "from", "the", "database", "by", "its", "ID", "." ]
cddb437d72f8239957daeba8211dda5e9366d6ca
https://github.com/azhai/code-refactor/blob/cddb437d72f8239957daeba8211dda5e9366d6ca/examples/class-wp-site.php#L157-L179
train
azhai/code-refactor
examples/class-wp-site.php
WP_Site.__isset
public function __isset($key) { switch ($key) { case 'id': case 'network_id': return true; case 'blogname': case 'siteurl': case 'post_count': case 'home': if (! did_action('ms_loaded')) { ...
php
public function __isset($key) { switch ($key) { case 'id': case 'network_id': return true; case 'blogname': case 'siteurl': case 'post_count': case 'home': if (! did_action('ms_loaded')) { ...
[ "public", "function", "__isset", "(", "$", "key", ")", "{", "switch", "(", "$", "key", ")", "{", "case", "'id'", ":", "case", "'network_id'", ":", "return", "true", ";", "case", "'blogname'", ":", "case", "'siteurl'", ":", "case", "'post_count'", ":", ...
Isset-er. Allows current multisite naming conventions when checking for properties. Checks for extended site properties. @since 4.6.0 @param string $key Property to check if set. @return bool Whether the property is set.
[ "Isset", "-", "er", "." ]
cddb437d72f8239957daeba8211dda5e9366d6ca
https://github.com/azhai/code-refactor/blob/cddb437d72f8239957daeba8211dda5e9366d6ca/examples/class-wp-site.php#L257-L283
train
azhai/code-refactor
examples/class-wp-site.php
WP_Site.get_details
private function get_details() { $details = wp_cache_get($this->blog_id, 'site-details'); if (false === $details) { switch_to_blog($this->blog_id); // Create a raw copy of the object for backwards compatibility with the filter below. $details = new stdClass(); ...
php
private function get_details() { $details = wp_cache_get($this->blog_id, 'site-details'); if (false === $details) { switch_to_blog($this->blog_id); // Create a raw copy of the object for backwards compatibility with the filter below. $details = new stdClass(); ...
[ "private", "function", "get_details", "(", ")", "{", "$", "details", "=", "wp_cache_get", "(", "$", "this", "->", "blog_id", ",", "'site-details'", ")", ";", "if", "(", "false", "===", "$", "details", ")", "{", "switch_to_blog", "(", "$", "this", "->", ...
Retrieves the details for this site. This method is used internally to lazy-load the extended properties of a site. @since 4.6.0 @see WP_Site::__get() @return stdClass A raw site object with all details included.
[ "Retrieves", "the", "details", "for", "this", "site", "." ]
cddb437d72f8239957daeba8211dda5e9366d6ca
https://github.com/azhai/code-refactor/blob/cddb437d72f8239957daeba8211dda5e9366d6ca/examples/class-wp-site.php#L320-L353
train
hd-deman/ShortMessage
lib/ShortMessage/Client/DevinoClient.php
DevinoClient.getsessionIdApiCall
public static function getsessionIdApiCall($login, $password) { $sessionId = ""; try { $response = self::$buzz->get(self::BASE_URL.'/User/sessionId?login='.$login.'&password='.$password); $sessionId = str_replace('"', '', $response->getContent()); } catch (\Exception...
php
public static function getsessionIdApiCall($login, $password) { $sessionId = ""; try { $response = self::$buzz->get(self::BASE_URL.'/User/sessionId?login='.$login.'&password='.$password); $sessionId = str_replace('"', '', $response->getContent()); } catch (\Exception...
[ "public", "static", "function", "getsessionIdApiCall", "(", "$", "login", ",", "$", "password", ")", "{", "$", "sessionId", "=", "\"\"", ";", "try", "{", "$", "response", "=", "self", "::", "$", "buzz", "->", "get", "(", "self", "::", "BASE_URL", ".", ...
Session ID Queue @access public @static @param string $login User name @param string $password Password @return string Session ID @throws DevinoException
[ "Session", "ID", "Queue" ]
b18595fa11fcff34d3d6dbb95dc1011bcbcd09ac
https://github.com/hd-deman/ShortMessage/blob/b18595fa11fcff34d3d6dbb95dc1011bcbcd09ac/lib/ShortMessage/Client/DevinoClient.php#L37-L50
train
hd-deman/ShortMessage
lib/ShortMessage/Client/DevinoClient.php
DevinoClient.createRequestParameters
protected static function createRequestParameters($sessionId, $sourceAddres, $destinationAddress, $data, $sendDate = null, $validity = 0) { $parameters = array( 'sessionId' => $sessionId, 'sourceAddress' => $sourceAddres, 'data' => $data ); if (gettype($d...
php
protected static function createRequestParameters($sessionId, $sourceAddres, $destinationAddress, $data, $sendDate = null, $validity = 0) { $parameters = array( 'sessionId' => $sessionId, 'sourceAddress' => $sourceAddres, 'data' => $data ); if (gettype($d...
[ "protected", "static", "function", "createRequestParameters", "(", "$", "sessionId", ",", "$", "sourceAddres", ",", "$", "destinationAddress", ",", "$", "data", ",", "$", "sendDate", "=", "null", ",", "$", "validity", "=", "0", ")", "{", "$", "parameters", ...
SMS send request parameters preparation @access public @static @param string $sessionId Session ID. @see getsessionId_St @param string $sourceAddres sender name(up to 11 chars) or phone number(up to 15 digits) @param string $destinationAddress destination phone. Country code+cellular code+phone numb...
[ "SMS", "send", "request", "parameters", "preparation" ]
b18595fa11fcff34d3d6dbb95dc1011bcbcd09ac
https://github.com/hd-deman/ShortMessage/blob/b18595fa11fcff34d3d6dbb95dc1011bcbcd09ac/lib/ShortMessage/Client/DevinoClient.php#L107-L134
train
Linkvalue-Interne/MajoraFrameworkExtraBundle
src/Majora/Bundle/FrameworkExtraBundle/Controller/ControllerTrait.php
ControllerTrait.checkSecurity
protected function checkSecurity($intention, $resource = null) { $securityMapping = $this->getSecurityMapping(); return $this->container->get('security.authorization_checker')->isGranted( (array) (empty($securityMapping[$intention]) ? $intention : $securi...
php
protected function checkSecurity($intention, $resource = null) { $securityMapping = $this->getSecurityMapping(); return $this->container->get('security.authorization_checker')->isGranted( (array) (empty($securityMapping[$intention]) ? $intention : $securi...
[ "protected", "function", "checkSecurity", "(", "$", "intention", ",", "$", "resource", "=", "null", ")", "{", "$", "securityMapping", "=", "$", "this", "->", "getSecurityMapping", "(", ")", ";", "return", "$", "this", "->", "container", "->", "get", "(", ...
checks security for given intention @param string $intention @param mixed $resource @return boolean
[ "checks", "security", "for", "given", "intention" ]
6f368380cfc39d27fafb0844e9a53b4d86d7c034
https://github.com/Linkvalue-Interne/MajoraFrameworkExtraBundle/blob/6f368380cfc39d27fafb0844e9a53b4d86d7c034/src/Majora/Bundle/FrameworkExtraBundle/Controller/ControllerTrait.php#L43-L54
train
Linkvalue-Interne/MajoraFrameworkExtraBundle
src/Majora/Bundle/FrameworkExtraBundle/Controller/ControllerTrait.php
ControllerTrait.extractQueryFilter
protected function extractQueryFilter(Request $request) { return array_map( function ($value) { return array_filter(explode(',', trim($value, ',')), function ($var) { return !empty($var); }); }, $request->query->all() ...
php
protected function extractQueryFilter(Request $request) { return array_map( function ($value) { return array_filter(explode(',', trim($value, ',')), function ($var) { return !empty($var); }); }, $request->query->all() ...
[ "protected", "function", "extractQueryFilter", "(", "Request", "$", "request", ")", "{", "return", "array_map", "(", "function", "(", "$", "value", ")", "{", "return", "array_filter", "(", "explode", "(", "','", ",", "trim", "(", "$", "value", ",", "','", ...
Extract available query filter from request. @param Request $request @return array
[ "Extract", "available", "query", "filter", "from", "request", "." ]
6f368380cfc39d27fafb0844e9a53b4d86d7c034
https://github.com/Linkvalue-Interne/MajoraFrameworkExtraBundle/blob/6f368380cfc39d27fafb0844e9a53b4d86d7c034/src/Majora/Bundle/FrameworkExtraBundle/Controller/ControllerTrait.php#L63-L73
train
Linkvalue-Interne/MajoraFrameworkExtraBundle
src/Majora/Bundle/FrameworkExtraBundle/Controller/ControllerTrait.php
ControllerTrait.retrieveOr404
protected function retrieveOr404($entityId, $loaderId) { if (!$this->container->has($loaderId)) { throw new NotFoundHttpException(sprintf('Unknow required loader : "%s"', $loaderId )); } if (!$entity = $this->container->get($loaderId)->retrieve($entit...
php
protected function retrieveOr404($entityId, $loaderId) { if (!$this->container->has($loaderId)) { throw new NotFoundHttpException(sprintf('Unknow required loader : "%s"', $loaderId )); } if (!$entity = $this->container->get($loaderId)->retrieve($entit...
[ "protected", "function", "retrieveOr404", "(", "$", "entityId", ",", "$", "loaderId", ")", "{", "if", "(", "!", "$", "this", "->", "container", "->", "has", "(", "$", "loaderId", ")", ")", "{", "throw", "new", "NotFoundHttpException", "(", "sprintf", "("...
Retrieves entity for given id into given repository service. @param $entityId @param $loaderId @return Object @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
[ "Retrieves", "entity", "for", "given", "id", "into", "given", "repository", "service", "." ]
6f368380cfc39d27fafb0844e9a53b4d86d7c034
https://github.com/Linkvalue-Interne/MajoraFrameworkExtraBundle/blob/6f368380cfc39d27fafb0844e9a53b4d86d7c034/src/Majora/Bundle/FrameworkExtraBundle/Controller/ControllerTrait.php#L85-L98
train
Linkvalue-Interne/MajoraFrameworkExtraBundle
src/Majora/Bundle/FrameworkExtraBundle/Controller/ControllerTrait.php
ControllerTrait.create404
protected function create404($entityId, $loaderId) { return new NotFoundHttpException(sprintf('Entity with id "%s" not found%s.', $entityId, $this->container->getParameter('kernel.debug') ? sprintf(' : (looked into "%s")', $loaderId) : '' )); ...
php
protected function create404($entityId, $loaderId) { return new NotFoundHttpException(sprintf('Entity with id "%s" not found%s.', $entityId, $this->container->getParameter('kernel.debug') ? sprintf(' : (looked into "%s")', $loaderId) : '' )); ...
[ "protected", "function", "create404", "(", "$", "entityId", ",", "$", "loaderId", ")", "{", "return", "new", "NotFoundHttpException", "(", "sprintf", "(", "'Entity with id \"%s\" not found%s.'", ",", "$", "entityId", ",", "$", "this", "->", "container", "->", "g...
create a formatted http not found exception. @param string $entityId @param string $loaderId @return NotFoundHttpException
[ "create", "a", "formatted", "http", "not", "found", "exception", "." ]
6f368380cfc39d27fafb0844e9a53b4d86d7c034
https://github.com/Linkvalue-Interne/MajoraFrameworkExtraBundle/blob/6f368380cfc39d27fafb0844e9a53b4d86d7c034/src/Majora/Bundle/FrameworkExtraBundle/Controller/ControllerTrait.php#L108-L116
train
erenmustafaozdal/laravel-modules-base
src/Controllers/OperationTrait.php
OperationTrait.destroyModel
public function destroyModel($model, $path = null) { $this->model = $model; try { if ( ! $this->model->delete()) { throw new DestroyException($this->model); } event(new $this->events['success']($this->model)); if (is_null($path)) { ...
php
public function destroyModel($model, $path = null) { $this->model = $model; try { if ( ! $this->model->delete()) { throw new DestroyException($this->model); } event(new $this->events['success']($this->model)); if (is_null($path)) { ...
[ "public", "function", "destroyModel", "(", "$", "model", ",", "$", "path", "=", "null", ")", "{", "$", "this", "->", "model", "=", "$", "model", ";", "try", "{", "if", "(", "!", "$", "this", "->", "model", "->", "delete", "(", ")", ")", "{", "t...
destroy data of the eloquent model or models @param \Illuminate\Database\Eloquent\Model|array $model [Model|ids] @param string|null $path @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
[ "destroy", "data", "of", "the", "eloquent", "model", "or", "models" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Controllers/OperationTrait.php#L209-L233
train
erenmustafaozdal/laravel-modules-base
src/Controllers/OperationTrait.php
OperationTrait.destroyGroupAction
protected function destroyGroupAction($class) { $result = $class::destroy($this->request->id); if ( is_integer($result) && $result > 0) { return true; } return false; }
php
protected function destroyGroupAction($class) { $result = $class::destroy($this->request->id); if ( is_integer($result) && $result > 0) { return true; } return false; }
[ "protected", "function", "destroyGroupAction", "(", "$", "class", ")", "{", "$", "result", "=", "$", "class", "::", "destroy", "(", "$", "this", "->", "request", "->", "id", ")", ";", "if", "(", "is_integer", "(", "$", "result", ")", "&&", "$", "resu...
destroy group action @param $class @return boolean
[ "destroy", "group", "action" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Controllers/OperationTrait.php#L261-L268
train
erenmustafaozdal/laravel-modules-base
src/Controllers/OperationTrait.php
OperationTrait.notPublishGroupAction
protected function notPublishGroupAction($class) { try { if ( ! $class::whereIn('id', $this->request->id)->update(['is_publish' => false])) { throw new UpdateException($this->request->id, 'group not not published'); } event(new $this->events['success']($th...
php
protected function notPublishGroupAction($class) { try { if ( ! $class::whereIn('id', $this->request->id)->update(['is_publish' => false])) { throw new UpdateException($this->request->id, 'group not not published'); } event(new $this->events['success']($th...
[ "protected", "function", "notPublishGroupAction", "(", "$", "class", ")", "{", "try", "{", "if", "(", "!", "$", "class", "::", "whereIn", "(", "'id'", ",", "$", "this", "->", "request", "->", "id", ")", "->", "update", "(", "[", "'is_publish'", "=>", ...
not publish group action @param $class @return boolean
[ "not", "publish", "group", "action" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Controllers/OperationTrait.php#L276-L288
train
erenmustafaozdal/laravel-modules-base
src/Controllers/OperationTrait.php
OperationTrait.fillModel
protected function fillModel($datas) { $grouped = collect($datas)->groupBy('relation_type'); foreach($grouped as $key => $groups) { // no relation if ($key === 'not') { foreach($groups as $group) { $this->model->fill($group['datas'])->save...
php
protected function fillModel($datas) { $grouped = collect($datas)->groupBy('relation_type'); foreach($grouped as $key => $groups) { // no relation if ($key === 'not') { foreach($groups as $group) { $this->model->fill($group['datas'])->save...
[ "protected", "function", "fillModel", "(", "$", "datas", ")", "{", "$", "grouped", "=", "collect", "(", "$", "datas", ")", "->", "groupBy", "(", "'relation_type'", ")", ";", "foreach", "(", "$", "grouped", "as", "$", "key", "=>", "$", "groups", ")", ...
fill model datas to database @param array $datas @return boolean
[ "fill", "model", "datas", "to", "database" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Controllers/OperationTrait.php#L296-L351
train
erenmustafaozdal/laravel-modules-base
src/Controllers/OperationTrait.php
OperationTrait.getData
protected function getData() { if ( ! $this->fileOptions) { return $this->request->all(); } $excepts = collect($this->fileOptions)->keyBy(function ($item) { $columns = explode('.', $item['column']); return count($columns) === 1 ? $columns[0] : $columns[1]...
php
protected function getData() { if ( ! $this->fileOptions) { return $this->request->all(); } $excepts = collect($this->fileOptions)->keyBy(function ($item) { $columns = explode('.', $item['column']); return count($columns) === 1 ? $columns[0] : $columns[1]...
[ "protected", "function", "getData", "(", ")", "{", "if", "(", "!", "$", "this", "->", "fileOptions", ")", "{", "return", "$", "this", "->", "request", "->", "all", "(", ")", ";", "}", "$", "excepts", "=", "collect", "(", "$", "this", "->", "fileOpt...
get data, if image column passed, except it
[ "get", "data", "if", "image", "column", "passed", "except", "it" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Controllers/OperationTrait.php#L356-L367
train
erenmustafaozdal/laravel-modules-base
src/Controllers/OperationTrait.php
OperationTrait.preUploadFile
private function preUploadFile($exception) { $datas = []; foreach($this->fileOptions as $options) { $result = $this->uploadFile($options); if ($result !== false) { $datas[] = $result; } } if ( ! empty($datas) && ! $this->fillModel(...
php
private function preUploadFile($exception) { $datas = []; foreach($this->fileOptions as $options) { $result = $this->uploadFile($options); if ($result !== false) { $datas[] = $result; } } if ( ! empty($datas) && ! $this->fillModel(...
[ "private", "function", "preUploadFile", "(", "$", "exception", ")", "{", "$", "datas", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "fileOptions", "as", "$", "options", ")", "{", "$", "result", "=", "$", "this", "->", "uploadFile", "(", "$"...
pre upload file control function @param $exception
[ "pre", "upload", "file", "control", "function" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Controllers/OperationTrait.php#L374-L387
train
erenmustafaozdal/laravel-modules-base
src/Controllers/OperationTrait.php
OperationTrait.uploadFile
protected function uploadFile($options) { if ( $options['type'] === 'file' ) { $this->repo = new FileRepository($options); $this->hasFile = true; } else { $this->repo = new ImageRepository($options); $this->hasPhoto = true; } if ( ! $t...
php
protected function uploadFile($options) { if ( $options['type'] === 'file' ) { $this->repo = new FileRepository($options); $this->hasFile = true; } else { $this->repo = new ImageRepository($options); $this->hasPhoto = true; } if ( ! $t...
[ "protected", "function", "uploadFile", "(", "$", "options", ")", "{", "if", "(", "$", "options", "[", "'type'", "]", "===", "'file'", ")", "{", "$", "this", "->", "repo", "=", "new", "FileRepository", "(", "$", "options", ")", ";", "$", "this", "->",...
upload file or files @param array $options @return array|boolean
[ "upload", "file", "or", "files" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Controllers/OperationTrait.php#L395-L410
train
erenmustafaozdal/laravel-modules-base
src/Controllers/OperationTrait.php
OperationTrait.returnData
protected function returnData($type) { $data = ['result' => $type]; if ( $this->hasPhoto ){ $data['photos'] = $this->repo->files; } if ( $this->hasFile ) { $data['files'] = $this->repo->files; } return $data; }
php
protected function returnData($type) { $data = ['result' => $type]; if ( $this->hasPhoto ){ $data['photos'] = $this->repo->files; } if ( $this->hasFile ) { $data['files'] = $this->repo->files; } return $data; }
[ "protected", "function", "returnData", "(", "$", "type", ")", "{", "$", "data", "=", "[", "'result'", "=>", "$", "type", "]", ";", "if", "(", "$", "this", "->", "hasPhoto", ")", "{", "$", "data", "[", "'photos'", "]", "=", "$", "this", "->", "rep...
return data for api @param string $type @return array
[ "return", "data", "for", "api" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Controllers/OperationTrait.php#L418-L428
train
erenmustafaozdal/laravel-modules-base
src/Controllers/OperationTrait.php
OperationTrait.redirectRoute
protected function redirectRoute($path, $isUpdate = false) { $indexPos = strpos($path,'index'); $dotPos = strpos($path,'.'); $slug = getModelSlug($this->model); // İlişkisiz yalın sayfalardan index hariç if ( $indexPos === false && $dotPos === false ) { return re...
php
protected function redirectRoute($path, $isUpdate = false) { $indexPos = strpos($path,'index'); $dotPos = strpos($path,'.'); $slug = getModelSlug($this->model); // İlişkisiz yalın sayfalardan index hariç if ( $indexPos === false && $dotPos === false ) { return re...
[ "protected", "function", "redirectRoute", "(", "$", "path", ",", "$", "isUpdate", "=", "false", ")", "{", "$", "indexPos", "=", "strpos", "(", "$", "path", ",", "'index'", ")", ";", "$", "dotPos", "=", "strpos", "(", "$", "path", ",", "'.'", ")", "...
return redirect url path @param string $path @param boolean $isUpdate @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
[ "return", "redirect", "url", "path" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Controllers/OperationTrait.php#L437-L464
train
erenmustafaozdal/laravel-modules-base
src/Controllers/OperationTrait.php
OperationTrait.setElfinderToOptions
protected function setElfinderToOptions($column) { $this->fileOptions = collect($this->fileOptions)->map(function($item, $key) use($column) { if ( (is_array($column) && $key === $column['index'] && $item['column'] === $column['column']) || $item['column'] ...
php
protected function setElfinderToOptions($column) { $this->fileOptions = collect($this->fileOptions)->map(function($item, $key) use($column) { if ( (is_array($column) && $key === $column['index'] && $item['column'] === $column['column']) || $item['column'] ...
[ "protected", "function", "setElfinderToOptions", "(", "$", "column", ")", "{", "$", "this", "->", "fileOptions", "=", "collect", "(", "$", "this", "->", "fileOptions", ")", "->", "map", "(", "function", "(", "$", "item", ",", "$", "key", ")", "use", "(...
set to file options is file from elfinder @param string|array $column
[ "set", "to", "file", "options", "is", "file", "from", "elfinder" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Controllers/OperationTrait.php#L481-L493
train
erenmustafaozdal/laravel-modules-base
src/Controllers/OperationTrait.php
OperationTrait.updateAlias
protected function updateAlias($model, $events = [], $path = null) { $namespace = getBaseName($model, 'Events'); $events = $events ? $events : [ 'success' => "{$namespace}\\UpdateSuccess", 'fail' => "{$namespace}\\UpdateFail", ]; $this->setEvents($even...
php
protected function updateAlias($model, $events = [], $path = null) { $namespace = getBaseName($model, 'Events'); $events = $events ? $events : [ 'success' => "{$namespace}\\UpdateSuccess", 'fail' => "{$namespace}\\UpdateFail", ]; $this->setEvents($even...
[ "protected", "function", "updateAlias", "(", "$", "model", ",", "$", "events", "=", "[", "]", ",", "$", "path", "=", "null", ")", "{", "$", "namespace", "=", "getBaseName", "(", "$", "model", ",", "'Events'", ")", ";", "$", "events", "=", "$", "eve...
update alias method @param \Illuminate\Database\Eloquent\Model $model @param array $events @param string|null $path @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
[ "update", "alias", "method" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Controllers/OperationTrait.php#L555-L565
train
erenmustafaozdal/laravel-modules-base
src/Controllers/OperationTrait.php
OperationTrait.groupAlias
protected function groupAlias($model, $subBase = 'Events') { $namespace = getBaseName($model, $subBase); $events = []; switch($this->request->action) { case 'activate': $events['activationSuccess'] = \ErenMustafaOzdal\LaravelUserModule\Events\Auth\ActivateSuccess:...
php
protected function groupAlias($model, $subBase = 'Events') { $namespace = getBaseName($model, $subBase); $events = []; switch($this->request->action) { case 'activate': $events['activationSuccess'] = \ErenMustafaOzdal\LaravelUserModule\Events\Auth\ActivateSuccess:...
[ "protected", "function", "groupAlias", "(", "$", "model", ",", "$", "subBase", "=", "'Events'", ")", "{", "$", "namespace", "=", "getBaseName", "(", "$", "model", ",", "$", "subBase", ")", ";", "$", "events", "=", "[", "]", ";", "switch", "(", "$", ...
group operation alias method @param \Illuminate\Database\Eloquent\Model $model @param string $subBase @return boolean
[ "group", "operation", "alias", "method" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Controllers/OperationTrait.php#L574-L604
train
erenmustafaozdal/laravel-modules-base
src/Controllers/OperationTrait.php
OperationTrait.cloneModel
protected function cloneModel($model, $lastCopy, $changeColumns = [], $relations = []) { // model copy $clone = $model->replicate(); $clone->copied_id = $model->id; if ( is_null($lastCopy) ) { foreach($changeColumns as $column) { $clone->$column = "{$model...
php
protected function cloneModel($model, $lastCopy, $changeColumns = [], $relations = []) { // model copy $clone = $model->replicate(); $clone->copied_id = $model->id; if ( is_null($lastCopy) ) { foreach($changeColumns as $column) { $clone->$column = "{$model...
[ "protected", "function", "cloneModel", "(", "$", "model", ",", "$", "lastCopy", ",", "$", "changeColumns", "=", "[", "]", ",", "$", "relations", "=", "[", "]", ")", "{", "// model copy", "$", "clone", "=", "$", "model", "->", "replicate", "(", ")", "...
clone model and relation @param $model @param $lastCopy @param array $changeColumns @param array $relations @return \Illuminate\Database\Eloquent\Model|boolean
[ "clone", "model", "and", "relation" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Controllers/OperationTrait.php#L615-L658
train
erenmustafaozdal/laravel-modules-base
src/Controllers/OperationTrait.php
OperationTrait.setModuleThumbnails
protected function setModuleThumbnails($category, $model, $uploadType) { $module = getModule(get_called_class()); if (is_null($category->thumbnails)) { return; } Config::set("{$module}.{$model}.uploads.{$uploadType}.thumbnails",$category->thumbnails->map(function($item) ...
php
protected function setModuleThumbnails($category, $model, $uploadType) { $module = getModule(get_called_class()); if (is_null($category->thumbnails)) { return; } Config::set("{$module}.{$model}.uploads.{$uploadType}.thumbnails",$category->thumbnails->map(function($item) ...
[ "protected", "function", "setModuleThumbnails", "(", "$", "category", ",", "$", "model", ",", "$", "uploadType", ")", "{", "$", "module", "=", "getModule", "(", "get_called_class", "(", ")", ")", ";", "if", "(", "is_null", "(", "$", "category", "->", "th...
set the module config @param $category @param string $model @param string $uploadType @return void
[ "set", "the", "module", "config" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Controllers/OperationTrait.php#L681-L695
train
PhoxPHP/Console
src/Command/Help.php
Help.listRunnables
protected function listRunnables() { $commands = array_values(Command::getRegisteredCommands()); $format = "| %8.60s | %-50.30s\n"; printf($format, "id", "class"); $this->env->sendOutput('-----------------------------------'); foreach($commands as $runnable) { printf($format, $runnable->getId(), get_cl...
php
protected function listRunnables() { $commands = array_values(Command::getRegisteredCommands()); $format = "| %8.60s | %-50.30s\n"; printf($format, "id", "class"); $this->env->sendOutput('-----------------------------------'); foreach($commands as $runnable) { printf($format, $runnable->getId(), get_cl...
[ "protected", "function", "listRunnables", "(", ")", "{", "$", "commands", "=", "array_values", "(", "Command", "::", "getRegisteredCommands", "(", ")", ")", ";", "$", "format", "=", "\"| %8.60s | %-50.30s\\n\"", ";", "printf", "(", "$", "format", ",", "\"id\""...
Lists all registered runnables id. @access protected @return <void>
[ "Lists", "all", "registered", "runnables", "id", "." ]
fee1238cfdb3592964bb5d5a2336e70b8ffd20e9
https://github.com/PhoxPHP/Console/blob/fee1238cfdb3592964bb5d5a2336e70b8ffd20e9/src/Command/Help.php#L113-L124
train
PhoxPHP/Console
src/Command/Help.php
Help.createRunnable
protected function createRunnable() { $runnable = new StdClass(); $response = $this->cmd->question('1. Runnable class name? [required]'); if (strlen($response) < 3) { return $this->env->sendOutput('runnable class name is required.', 'red'); } $runnable->name = rtrim($response); $response = $this->cmd->...
php
protected function createRunnable() { $runnable = new StdClass(); $response = $this->cmd->question('1. Runnable class name? [required]'); if (strlen($response) < 3) { return $this->env->sendOutput('runnable class name is required.', 'red'); } $runnable->name = rtrim($response); $response = $this->cmd->...
[ "protected", "function", "createRunnable", "(", ")", "{", "$", "runnable", "=", "new", "StdClass", "(", ")", ";", "$", "response", "=", "$", "this", "->", "cmd", "->", "question", "(", "'1. Runnable class name? [required]'", ")", ";", "if", "(", "strlen", ...
Creates a new runnable class. @param $arguments <Array> @access protected @return <void>
[ "Creates", "a", "new", "runnable", "class", "." ]
fee1238cfdb3592964bb5d5a2336e70b8ffd20e9
https://github.com/PhoxPHP/Console/blob/fee1238cfdb3592964bb5d5a2336e70b8ffd20e9/src/Command/Help.php#L133-L171
train
PhoxPHP/Console
src/Command/Help.php
Help.listRunnableCommands
protected function listRunnableCommands(String $runnableId) { if (!Command::hasCommand($runnableId)) { $this->cmd->error(sprintf('[%s] is not a valid runnable id', $runnableId)); } $runnable = Command::getCommandById($runnableId); $commands = $runnable->runnableCommands(); $format = "| %8.60s | %-50.30s...
php
protected function listRunnableCommands(String $runnableId) { if (!Command::hasCommand($runnableId)) { $this->cmd->error(sprintf('[%s] is not a valid runnable id', $runnableId)); } $runnable = Command::getCommandById($runnableId); $commands = $runnable->runnableCommands(); $format = "| %8.60s | %-50.30s...
[ "protected", "function", "listRunnableCommands", "(", "String", "$", "runnableId", ")", "{", "if", "(", "!", "Command", "::", "hasCommand", "(", "$", "runnableId", ")", ")", "{", "$", "this", "->", "cmd", "->", "error", "(", "sprintf", "(", "'[%s] is not a...
Lists commands available in a runnable object. @param $runnableId <String> @access protected @return <void>
[ "Lists", "commands", "available", "in", "a", "runnable", "object", "." ]
fee1238cfdb3592964bb5d5a2336e70b8ffd20e9
https://github.com/PhoxPHP/Console/blob/fee1238cfdb3592964bb5d5a2336e70b8ffd20e9/src/Command/Help.php#L180-L195
train
PhoxPHP/Console
src/Command/Help.php
Help.displayHelpInformation
protected function displayHelpInformation() { $this->env->sendOutput('PhoxPHP Command Line Interface help.', 'green'); $this->env->sendOutput('Usage:'. $this->env->addTab() . 'php console [command id] [...arguments]'); $this->env->sendOutput($this->env->addTab() . 'E.g: ' . 'php console help list-commands' . $th...
php
protected function displayHelpInformation() { $this->env->sendOutput('PhoxPHP Command Line Interface help.', 'green'); $this->env->sendOutput('Usage:'. $this->env->addTab() . 'php console [command id] [...arguments]'); $this->env->sendOutput($this->env->addTab() . 'E.g: ' . 'php console help list-commands' . $th...
[ "protected", "function", "displayHelpInformation", "(", ")", "{", "$", "this", "->", "env", "->", "sendOutput", "(", "'PhoxPHP Command Line Interface help.'", ",", "'green'", ")", ";", "$", "this", "->", "env", "->", "sendOutput", "(", "'Usage:'", ".", "$", "t...
Displays cli help information. @access protected @return <void>
[ "Displays", "cli", "help", "information", "." ]
fee1238cfdb3592964bb5d5a2336e70b8ffd20e9
https://github.com/PhoxPHP/Console/blob/fee1238cfdb3592964bb5d5a2336e70b8ffd20e9/src/Command/Help.php#L203-L211
train
eureka-framework/component-orm
src/Orm/Config/ConfigAbstract.php
ConfigAbstract.validate
protected function validate() { if (empty($this->author)) { throw new \Exception('Author is empty!'); } if (empty($this->classname)) { throw new \Exception('Class name is empty!'); } if (empty($this->namespace)) { throw new \Exception('Na...
php
protected function validate() { if (empty($this->author)) { throw new \Exception('Author is empty!'); } if (empty($this->classname)) { throw new \Exception('Class name is empty!'); } if (empty($this->namespace)) { throw new \Exception('Na...
[ "protected", "function", "validate", "(", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "author", ")", ")", "{", "throw", "new", "\\", "Exception", "(", "'Author is empty!'", ")", ";", "}", "if", "(", "empty", "(", "$", "this", "->", "classna...
Check if config has required values. @return self @throws \Exception
[ "Check", "if", "config", "has", "required", "values", "." ]
bce48121d26c4e923534f9dc70da597634184316
https://github.com/eureka-framework/component-orm/blob/bce48121d26c4e923534f9dc70da597634184316/src/Orm/Config/ConfigAbstract.php#L212-L243
train
netgen/site-legacy-bundle
bundle/Command/SymlinkLegacyCommand.php
SymlinkLegacyCommand.symlinkLegacyExtensionSiteAccesses
protected function symlinkLegacyExtensionSiteAccesses(string $legacyExtensionPath, OutputInterface $output): void { $legacyRootDir = $this->getContainer()->getParameter('ezpublish_legacy.root_dir'); /** @var \DirectoryIterator[] $directories */ $directories = []; $path = $legacyExt...
php
protected function symlinkLegacyExtensionSiteAccesses(string $legacyExtensionPath, OutputInterface $output): void { $legacyRootDir = $this->getContainer()->getParameter('ezpublish_legacy.root_dir'); /** @var \DirectoryIterator[] $directories */ $directories = []; $path = $legacyExt...
[ "protected", "function", "symlinkLegacyExtensionSiteAccesses", "(", "string", "$", "legacyExtensionPath", ",", "OutputInterface", "$", "output", ")", ":", "void", "{", "$", "legacyRootDir", "=", "$", "this", "->", "getContainer", "(", ")", "->", "getParameter", "(...
Symlinks siteccesses from a legacy extension.
[ "Symlinks", "siteccesses", "from", "a", "legacy", "extension", "." ]
943224cdee28cfb9ef07854c11c91d060456b394
https://github.com/netgen/site-legacy-bundle/blob/943224cdee28cfb9ef07854c11c91d060456b394/bundle/Command/SymlinkLegacyCommand.php#L104-L140
train
netgen/site-legacy-bundle
bundle/Command/SymlinkLegacyCommand.php
SymlinkLegacyCommand.symlinkLegacyExtensionOverride
protected function symlinkLegacyExtensionOverride(string $legacyExtensionPath, OutputInterface $output): void { $legacyRootDir = $this->getContainer()->getParameter('ezpublish_legacy.root_dir'); // If settings/override folder exists in "root_*", obviously we cannot use the one in "root", //...
php
protected function symlinkLegacyExtensionOverride(string $legacyExtensionPath, OutputInterface $output): void { $legacyRootDir = $this->getContainer()->getParameter('ezpublish_legacy.root_dir'); // If settings/override folder exists in "root_*", obviously we cannot use the one in "root", //...
[ "protected", "function", "symlinkLegacyExtensionOverride", "(", "string", "$", "legacyExtensionPath", ",", "OutputInterface", "$", "output", ")", ":", "void", "{", "$", "legacyRootDir", "=", "$", "this", "->", "getContainer", "(", ")", "->", "getParameter", "(", ...
Symlinks override folder from a legacy extension.
[ "Symlinks", "override", "folder", "from", "a", "legacy", "extension", "." ]
943224cdee28cfb9ef07854c11c91d060456b394
https://github.com/netgen/site-legacy-bundle/blob/943224cdee28cfb9ef07854c11c91d060456b394/bundle/Command/SymlinkLegacyCommand.php#L145-L162
train
svpernova09/HomesteadSkeleton
src/Commands/HomesteadCreateCommand.php
HomesteadCreateCommand.getRootPath
public function getRootPath() { $appPath = app_path(); $folders = explode(DIRECTORY_SEPARATOR, $appPath); array_pop($folders); $rootPath = implode(DIRECTORY_SEPARATOR, $folders); return $rootPath . '/'; }
php
public function getRootPath() { $appPath = app_path(); $folders = explode(DIRECTORY_SEPARATOR, $appPath); array_pop($folders); $rootPath = implode(DIRECTORY_SEPARATOR, $folders); return $rootPath . '/'; }
[ "public", "function", "getRootPath", "(", ")", "{", "$", "appPath", "=", "app_path", "(", ")", ";", "$", "folders", "=", "explode", "(", "DIRECTORY_SEPARATOR", ",", "$", "appPath", ")", ";", "array_pop", "(", "$", "folders", ")", ";", "$", "rootPath", ...
Return path to the Laravel project root @return string
[ "Return", "path", "to", "the", "Laravel", "project", "root" ]
b617713bb516fc10a190db91df1524d47b1de0b9
https://github.com/svpernova09/HomesteadSkeleton/blob/b617713bb516fc10a190db91df1524d47b1de0b9/src/Commands/HomesteadCreateCommand.php#L105-L113
train
anime-db/catalog-bundle
src/Controller/LabelController.php
LabelController.indexAction
public function indexAction(Request $request) { $response = $this->getCacheTimeKeeper()->getResponse('AnimeDbCatalogBundle:Label'); // response was not modified for this request if ($response->isNotModified($request)) { return $response; } /* @var $rep Label */ ...
php
public function indexAction(Request $request) { $response = $this->getCacheTimeKeeper()->getResponse('AnimeDbCatalogBundle:Label'); // response was not modified for this request if ($response->isNotModified($request)) { return $response; } /* @var $rep Label */ ...
[ "public", "function", "indexAction", "(", "Request", "$", "request", ")", "{", "$", "response", "=", "$", "this", "->", "getCacheTimeKeeper", "(", ")", "->", "getResponse", "(", "'AnimeDbCatalogBundle:Label'", ")", ";", "// response was not modified for this request",...
Edit labels. @param Request $request @return Response
[ "Edit", "labels", "." ]
631b6f92a654e91bee84f46218c52cf42bdb8606
https://github.com/anime-db/catalog-bundle/blob/631b6f92a654e91bee84f46218c52cf42bdb8606/src/Controller/LabelController.php#L31-L53
train
aVigorousDev/numbers
src/drmyersii/Numbers.php
Numbers.MakeWords
private function MakeWords($chunks) { $words = array(); $index = 0; foreach ($chunks as $chunk) { $one = isset($chunk{0}) ? intval($chunk{0}) : null; $ten = isset($chunk{1}) ? intval($chunk{1}) : null; $hundred = isset($chunk{2}) ? intval($chunk{2}) : null; if ($index > 0) { $words[] ...
php
private function MakeWords($chunks) { $words = array(); $index = 0; foreach ($chunks as $chunk) { $one = isset($chunk{0}) ? intval($chunk{0}) : null; $ten = isset($chunk{1}) ? intval($chunk{1}) : null; $hundred = isset($chunk{2}) ? intval($chunk{2}) : null; if ($index > 0) { $words[] ...
[ "private", "function", "MakeWords", "(", "$", "chunks", ")", "{", "$", "words", "=", "array", "(", ")", ";", "$", "index", "=", "0", ";", "foreach", "(", "$", "chunks", "as", "$", "chunk", ")", "{", "$", "one", "=", "isset", "(", "$", "chunk", ...
Takes an array of number chunks in string form and generates the corresponding word forms of those chunks. It then reorganizes the chunks into the correct order. @param $chunks array[string] @return string
[ "Takes", "an", "array", "of", "number", "chunks", "in", "string", "form", "and", "generates", "the", "corresponding", "word", "forms", "of", "those", "chunks", ".", "It", "then", "reorganizes", "the", "chunks", "into", "the", "correct", "order", "." ]
02124e75286758d216a22d1d963946dab9e8582b
https://github.com/aVigorousDev/numbers/blob/02124e75286758d216a22d1d963946dab9e8582b/src/drmyersii/Numbers.php#L105-L165
train
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByMime
public function filterByMime($mime = null, $comparison = null) { if (null === $comparison) { if (is_array($mime)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_MIME, $mime, $comparison); }
php
public function filterByMime($mime = null, $comparison = null) { if (null === $comparison) { if (is_array($mime)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_MIME, $mime, $comparison); }
[ "public", "function", "filterByMime", "(", "$", "mime", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "mime", ")", ")", "{", "$", "comparison", "=...
Filter the query on the mime column Example usage: <code> $query->filterByMime('fooValue'); // WHERE mime = 'fooValue' $query->filterByMime('%fooValue%', Criteria::LIKE); // WHERE mime LIKE '%fooValue%' </code> @param string $mime The value to use as filter. @param string $comparison Operator to use for the...
[ "Filter", "the", "query", "on", "the", "mime", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L611-L620
train
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterBySha1
public function filterBySha1($sha1 = null, $comparison = null) { if (null === $comparison) { if (is_array($sha1)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_SHA1, $sha1, $comparison); }
php
public function filterBySha1($sha1 = null, $comparison = null) { if (null === $comparison) { if (is_array($sha1)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_SHA1, $sha1, $comparison); }
[ "public", "function", "filterBySha1", "(", "$", "sha1", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "sha1", ")", ")", "{", "$", "comparison", "=...
Filter the query on the sha1 column Example usage: <code> $query->filterBySha1('fooValue'); // WHERE sha1 = 'fooValue' $query->filterBySha1('%fooValue%', Criteria::LIKE); // WHERE sha1 LIKE '%fooValue%' </code> @param string $sha1 The value to use as filter. @param string $comparison Operator to use for the...
[ "Filter", "the", "query", "on", "the", "sha1", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L759-L768
train
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByThumburl
public function filterByThumburl($thumburl = null, $comparison = null) { if (null === $comparison) { if (is_array($thumburl)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_THUMBURL, $thumburl, $comparison); }
php
public function filterByThumburl($thumburl = null, $comparison = null) { if (null === $comparison) { if (is_array($thumburl)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_THUMBURL, $thumburl, $comparison); }
[ "public", "function", "filterByThumburl", "(", "$", "thumburl", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "thumburl", ")", ")", "{", "$", "compa...
Filter the query on the thumburl column Example usage: <code> $query->filterByThumburl('fooValue'); // WHERE thumburl = 'fooValue' $query->filterByThumburl('%fooValue%', Criteria::LIKE); // WHERE thumburl LIKE '%fooValue%' </code> @param string $thumburl The value to use as filter. @param string $comparison...
[ "Filter", "the", "query", "on", "the", "thumburl", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L784-L793
train
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByThumbmime
public function filterByThumbmime($thumbmime = null, $comparison = null) { if (null === $comparison) { if (is_array($thumbmime)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_THUMBMIME, $thumbmime, $comparison); ...
php
public function filterByThumbmime($thumbmime = null, $comparison = null) { if (null === $comparison) { if (is_array($thumbmime)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_THUMBMIME, $thumbmime, $comparison); ...
[ "public", "function", "filterByThumbmime", "(", "$", "thumbmime", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "thumbmime", ")", ")", "{", "$", "co...
Filter the query on the thumbmime column Example usage: <code> $query->filterByThumbmime('fooValue'); // WHERE thumbmime = 'fooValue' $query->filterByThumbmime('%fooValue%', Criteria::LIKE); // WHERE thumbmime LIKE '%fooValue%' </code> @param string $thumbmime The value to use as filter. @param string $comp...
[ "Filter", "the", "query", "on", "the", "thumbmime", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L809-L818
train
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByThumbwidth
public function filterByThumbwidth($thumbwidth = null, $comparison = null) { if (is_array($thumbwidth)) { $useMinMax = false; if (isset($thumbwidth['min'])) { $this->addUsingAlias(MediaTableMap::COL_THUMBWIDTH, $thumbwidth['min'], Criteria::GREATER_EQUAL); ...
php
public function filterByThumbwidth($thumbwidth = null, $comparison = null) { if (is_array($thumbwidth)) { $useMinMax = false; if (isset($thumbwidth['min'])) { $this->addUsingAlias(MediaTableMap::COL_THUMBWIDTH, $thumbwidth['min'], Criteria::GREATER_EQUAL); ...
[ "public", "function", "filterByThumbwidth", "(", "$", "thumbwidth", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "is_array", "(", "$", "thumbwidth", ")", ")", "{", "$", "useMinMax", "=", "false", ";", "if", "(", "isset", "(", ...
Filter the query on the thumbwidth column Example usage: <code> $query->filterByThumbwidth(1234); // WHERE thumbwidth = 1234 $query->filterByThumbwidth(array(12, 34)); // WHERE thumbwidth IN (12, 34) $query->filterByThumbwidth(array('min' => 12)); // WHERE thumbwidth > 12 </code> @param mixed $thumbwidth The valu...
[ "Filter", "the", "query", "on", "the", "thumbwidth", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L838-L859
train
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByThumbheight
public function filterByThumbheight($thumbheight = null, $comparison = null) { if (is_array($thumbheight)) { $useMinMax = false; if (isset($thumbheight['min'])) { $this->addUsingAlias(MediaTableMap::COL_THUMBHEIGHT, $thumbheight['min'], Criteria::GREATER_EQUAL); ...
php
public function filterByThumbheight($thumbheight = null, $comparison = null) { if (is_array($thumbheight)) { $useMinMax = false; if (isset($thumbheight['min'])) { $this->addUsingAlias(MediaTableMap::COL_THUMBHEIGHT, $thumbheight['min'], Criteria::GREATER_EQUAL); ...
[ "public", "function", "filterByThumbheight", "(", "$", "thumbheight", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "is_array", "(", "$", "thumbheight", ")", ")", "{", "$", "useMinMax", "=", "false", ";", "if", "(", "isset", "(...
Filter the query on the thumbheight column Example usage: <code> $query->filterByThumbheight(1234); // WHERE thumbheight = 1234 $query->filterByThumbheight(array(12, 34)); // WHERE thumbheight IN (12, 34) $query->filterByThumbheight(array('min' => 12)); // WHERE thumbheight > 12 </code> @param mixed $thumbheight ...
[ "Filter", "the", "query", "on", "the", "thumbheight", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L879-L900
train
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByThumbsize
public function filterByThumbsize($thumbsize = null, $comparison = null) { if (is_array($thumbsize)) { $useMinMax = false; if (isset($thumbsize['min'])) { $this->addUsingAlias(MediaTableMap::COL_THUMBSIZE, $thumbsize['min'], Criteria::GREATER_EQUAL); $...
php
public function filterByThumbsize($thumbsize = null, $comparison = null) { if (is_array($thumbsize)) { $useMinMax = false; if (isset($thumbsize['min'])) { $this->addUsingAlias(MediaTableMap::COL_THUMBSIZE, $thumbsize['min'], Criteria::GREATER_EQUAL); $...
[ "public", "function", "filterByThumbsize", "(", "$", "thumbsize", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "is_array", "(", "$", "thumbsize", ")", ")", "{", "$", "useMinMax", "=", "false", ";", "if", "(", "isset", "(", "...
Filter the query on the thumbsize column Example usage: <code> $query->filterByThumbsize(1234); // WHERE thumbsize = 1234 $query->filterByThumbsize(array(12, 34)); // WHERE thumbsize IN (12, 34) $query->filterByThumbsize(array('min' => 12)); // WHERE thumbsize > 12 </code> @param mixed $thumbsize The value to use...
[ "Filter", "the", "query", "on", "the", "thumbsize", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L920-L941
train
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByDescriptionurl
public function filterByDescriptionurl($descriptionurl = null, $comparison = null) { if (null === $comparison) { if (is_array($descriptionurl)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_DESCRIPTIONURL, $descripti...
php
public function filterByDescriptionurl($descriptionurl = null, $comparison = null) { if (null === $comparison) { if (is_array($descriptionurl)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_DESCRIPTIONURL, $descripti...
[ "public", "function", "filterByDescriptionurl", "(", "$", "descriptionurl", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "descriptionurl", ")", ")", "{...
Filter the query on the descriptionurl column Example usage: <code> $query->filterByDescriptionurl('fooValue'); // WHERE descriptionurl = 'fooValue' $query->filterByDescriptionurl('%fooValue%', Criteria::LIKE); // WHERE descriptionurl LIKE '%fooValue%' </code> @param string $descriptionurl The value to use as f...
[ "Filter", "the", "query", "on", "the", "descriptionurl", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L957-L966
train
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByDescriptionurlshort
public function filterByDescriptionurlshort($descriptionurlshort = null, $comparison = null) { if (null === $comparison) { if (is_array($descriptionurlshort)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_DESCRIPTION...
php
public function filterByDescriptionurlshort($descriptionurlshort = null, $comparison = null) { if (null === $comparison) { if (is_array($descriptionurlshort)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_DESCRIPTION...
[ "public", "function", "filterByDescriptionurlshort", "(", "$", "descriptionurlshort", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "descriptionurlshort", "...
Filter the query on the descriptionurlshort column Example usage: <code> $query->filterByDescriptionurlshort('fooValue'); // WHERE descriptionurlshort = 'fooValue' $query->filterByDescriptionurlshort('%fooValue%', Criteria::LIKE); // WHERE descriptionurlshort LIKE '%fooValue%' </code> @param string $description...
[ "Filter", "the", "query", "on", "the", "descriptionurlshort", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L982-L991
train
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByImagedescription
public function filterByImagedescription($imagedescription = null, $comparison = null) { if (null === $comparison) { if (is_array($imagedescription)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_IMAGEDESCRIPTION, $i...
php
public function filterByImagedescription($imagedescription = null, $comparison = null) { if (null === $comparison) { if (is_array($imagedescription)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_IMAGEDESCRIPTION, $i...
[ "public", "function", "filterByImagedescription", "(", "$", "imagedescription", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "imagedescription", ")", ")"...
Filter the query on the imagedescription column Example usage: <code> $query->filterByImagedescription('fooValue'); // WHERE imagedescription = 'fooValue' $query->filterByImagedescription('%fooValue%', Criteria::LIKE); // WHERE imagedescription LIKE '%fooValue%' </code> @param string $imagedescription The value...
[ "Filter", "the", "query", "on", "the", "imagedescription", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L1007-L1016
train
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByDatetimeoriginal
public function filterByDatetimeoriginal($datetimeoriginal = null, $comparison = null) { if (null === $comparison) { if (is_array($datetimeoriginal)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_DATETIMEORIGINAL, $d...
php
public function filterByDatetimeoriginal($datetimeoriginal = null, $comparison = null) { if (null === $comparison) { if (is_array($datetimeoriginal)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_DATETIMEORIGINAL, $d...
[ "public", "function", "filterByDatetimeoriginal", "(", "$", "datetimeoriginal", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "datetimeoriginal", ")", ")"...
Filter the query on the datetimeoriginal column Example usage: <code> $query->filterByDatetimeoriginal('fooValue'); // WHERE datetimeoriginal = 'fooValue' $query->filterByDatetimeoriginal('%fooValue%', Criteria::LIKE); // WHERE datetimeoriginal LIKE '%fooValue%' </code> @param string $datetimeoriginal The value...
[ "Filter", "the", "query", "on", "the", "datetimeoriginal", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L1032-L1041
train
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByArtist
public function filterByArtist($artist = null, $comparison = null) { if (null === $comparison) { if (is_array($artist)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_ARTIST, $artist, $comparison); }
php
public function filterByArtist($artist = null, $comparison = null) { if (null === $comparison) { if (is_array($artist)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_ARTIST, $artist, $comparison); }
[ "public", "function", "filterByArtist", "(", "$", "artist", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "artist", ")", ")", "{", "$", "comparison"...
Filter the query on the artist column Example usage: <code> $query->filterByArtist('fooValue'); // WHERE artist = 'fooValue' $query->filterByArtist('%fooValue%', Criteria::LIKE); // WHERE artist LIKE '%fooValue%' </code> @param string $artist The value to use as filter. @param string $comparison Operator to...
[ "Filter", "the", "query", "on", "the", "artist", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L1057-L1066
train
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByLicenseshortname
public function filterByLicenseshortname($licenseshortname = null, $comparison = null) { if (null === $comparison) { if (is_array($licenseshortname)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_LICENSESHORTNAME, $l...
php
public function filterByLicenseshortname($licenseshortname = null, $comparison = null) { if (null === $comparison) { if (is_array($licenseshortname)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_LICENSESHORTNAME, $l...
[ "public", "function", "filterByLicenseshortname", "(", "$", "licenseshortname", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "licenseshortname", ")", ")"...
Filter the query on the licenseshortname column Example usage: <code> $query->filterByLicenseshortname('fooValue'); // WHERE licenseshortname = 'fooValue' $query->filterByLicenseshortname('%fooValue%', Criteria::LIKE); // WHERE licenseshortname LIKE '%fooValue%' </code> @param string $licenseshortname The value...
[ "Filter", "the", "query", "on", "the", "licenseshortname", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L1082-L1091
train
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByUsageterms
public function filterByUsageterms($usageterms = null, $comparison = null) { if (null === $comparison) { if (is_array($usageterms)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_USAGETERMS, $usageterms, $comparison);...
php
public function filterByUsageterms($usageterms = null, $comparison = null) { if (null === $comparison) { if (is_array($usageterms)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_USAGETERMS, $usageterms, $comparison);...
[ "public", "function", "filterByUsageterms", "(", "$", "usageterms", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "usageterms", ")", ")", "{", "$", ...
Filter the query on the usageterms column Example usage: <code> $query->filterByUsageterms('fooValue'); // WHERE usageterms = 'fooValue' $query->filterByUsageterms('%fooValue%', Criteria::LIKE); // WHERE usageterms LIKE '%fooValue%' </code> @param string $usageterms The value to use as filter. @param string...
[ "Filter", "the", "query", "on", "the", "usageterms", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L1107-L1116
train
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByAttributionrequired
public function filterByAttributionrequired($attributionrequired = null, $comparison = null) { if (null === $comparison) { if (is_array($attributionrequired)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_ATTRIBUTION...
php
public function filterByAttributionrequired($attributionrequired = null, $comparison = null) { if (null === $comparison) { if (is_array($attributionrequired)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_ATTRIBUTION...
[ "public", "function", "filterByAttributionrequired", "(", "$", "attributionrequired", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "attributionrequired", "...
Filter the query on the attributionrequired column Example usage: <code> $query->filterByAttributionrequired('fooValue'); // WHERE attributionrequired = 'fooValue' $query->filterByAttributionrequired('%fooValue%', Criteria::LIKE); // WHERE attributionrequired LIKE '%fooValue%' </code> @param string $attribution...
[ "Filter", "the", "query", "on", "the", "attributionrequired", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L1132-L1141
train
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByRestrictions
public function filterByRestrictions($restrictions = null, $comparison = null) { if (null === $comparison) { if (is_array($restrictions)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_RESTRICTIONS, $restrictions, $co...
php
public function filterByRestrictions($restrictions = null, $comparison = null) { if (null === $comparison) { if (is_array($restrictions)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_RESTRICTIONS, $restrictions, $co...
[ "public", "function", "filterByRestrictions", "(", "$", "restrictions", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "restrictions", ")", ")", "{", "...
Filter the query on the restrictions column Example usage: <code> $query->filterByRestrictions('fooValue'); // WHERE restrictions = 'fooValue' $query->filterByRestrictions('%fooValue%', Criteria::LIKE); // WHERE restrictions LIKE '%fooValue%' </code> @param string $restrictions The value to use as filter. @para...
[ "Filter", "the", "query", "on", "the", "restrictions", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L1157-L1166
train
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByTimestamp
public function filterByTimestamp($timestamp = null, $comparison = null) { if (is_array($timestamp)) { $useMinMax = false; if (isset($timestamp['min'])) { $this->addUsingAlias(MediaTableMap::COL_TIMESTAMP, $timestamp['min'], Criteria::GREATER_EQUAL); $...
php
public function filterByTimestamp($timestamp = null, $comparison = null) { if (is_array($timestamp)) { $useMinMax = false; if (isset($timestamp['min'])) { $this->addUsingAlias(MediaTableMap::COL_TIMESTAMP, $timestamp['min'], Criteria::GREATER_EQUAL); $...
[ "public", "function", "filterByTimestamp", "(", "$", "timestamp", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "is_array", "(", "$", "timestamp", ")", ")", "{", "$", "useMinMax", "=", "false", ";", "if", "(", "isset", "(", "...
Filter the query on the timestamp column Example usage: <code> $query->filterByTimestamp('2011-03-14'); // WHERE timestamp = '2011-03-14' $query->filterByTimestamp('now'); // WHERE timestamp = '2011-03-14' $query->filterByTimestamp(array('max' => 'yesterday')); // WHERE timestamp > '2011-03-13' </code> @param mix...
[ "Filter", "the", "query", "on", "the", "timestamp", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L1188-L1209
train
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByUser
public function filterByUser($user = null, $comparison = null) { if (null === $comparison) { if (is_array($user)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_USER, $user, $comparison); }
php
public function filterByUser($user = null, $comparison = null) { if (null === $comparison) { if (is_array($user)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_USER, $user, $comparison); }
[ "public", "function", "filterByUser", "(", "$", "user", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "user", ")", ")", "{", "$", "comparison", "=...
Filter the query on the user column Example usage: <code> $query->filterByUser('fooValue'); // WHERE user = 'fooValue' $query->filterByUser('%fooValue%', Criteria::LIKE); // WHERE user LIKE '%fooValue%' </code> @param string $user The value to use as filter. @param string $comparison Operator to use for the...
[ "Filter", "the", "query", "on", "the", "user", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L1225-L1234
train
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByMissing
public function filterByMissing($missing = null, $comparison = null) { if (is_string($missing)) { $missing = in_array(strtolower($missing), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true; } return $this->addUsingAlias(MediaTableMap::COL_MISSING, $missing, $compar...
php
public function filterByMissing($missing = null, $comparison = null) { if (is_string($missing)) { $missing = in_array(strtolower($missing), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true; } return $this->addUsingAlias(MediaTableMap::COL_MISSING, $missing, $compar...
[ "public", "function", "filterByMissing", "(", "$", "missing", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "is_string", "(", "$", "missing", ")", ")", "{", "$", "missing", "=", "in_array", "(", "strtolower", "(", "$", "missing...
Filter the query on the missing column Example usage: <code> $query->filterByMissing(true); // WHERE missing = true $query->filterByMissing('yes'); // WHERE missing = true </code> @param boolean|string $missing The value to use as filter. Non-boolean arguments are converted using the following rules: * 1, '1', 't...
[ "Filter", "the", "query", "on", "the", "missing", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L1295-L1302
train
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByKnown
public function filterByKnown($known = null, $comparison = null) { if (is_string($known)) { $known = in_array(strtolower($known), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true; } return $this->addUsingAlias(MediaTableMap::COL_KNOWN, $known, $comparison); }
php
public function filterByKnown($known = null, $comparison = null) { if (is_string($known)) { $known = in_array(strtolower($known), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true; } return $this->addUsingAlias(MediaTableMap::COL_KNOWN, $known, $comparison); }
[ "public", "function", "filterByKnown", "(", "$", "known", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "is_string", "(", "$", "known", ")", ")", "{", "$", "known", "=", "in_array", "(", "strtolower", "(", "$", "known", ")", ...
Filter the query on the known column Example usage: <code> $query->filterByKnown(true); // WHERE known = true $query->filterByKnown('yes'); // WHERE known = true </code> @param boolean|string $known The value to use as filter. Non-boolean arguments are converted using the following rules: * 1, '1', 'true', 'on',...
[ "Filter", "the", "query", "on", "the", "known", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L1322-L1329
train
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByImagerepository
public function filterByImagerepository($imagerepository = null, $comparison = null) { if (null === $comparison) { if (is_array($imagerepository)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_IMAGEREPOSITORY, $image...
php
public function filterByImagerepository($imagerepository = null, $comparison = null) { if (null === $comparison) { if (is_array($imagerepository)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_IMAGEREPOSITORY, $image...
[ "public", "function", "filterByImagerepository", "(", "$", "imagerepository", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "imagerepository", ")", ")", ...
Filter the query on the imagerepository column Example usage: <code> $query->filterByImagerepository('fooValue'); // WHERE imagerepository = 'fooValue' $query->filterByImagerepository('%fooValue%', Criteria::LIKE); // WHERE imagerepository LIKE '%fooValue%' </code> @param string $imagerepository The value to us...
[ "Filter", "the", "query", "on", "the", "imagerepository", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L1345-L1354
train
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.useC2MQuery
public function useC2MQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { return $this ->joinC2M($relationAlias, $joinType) ->useQuery($relationAlias ? $relationAlias : 'C2M', '\Attogram\SharedMedia\Orm\C2MQuery'); }
php
public function useC2MQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { return $this ->joinC2M($relationAlias, $joinType) ->useQuery($relationAlias ? $relationAlias : 'C2M', '\Attogram\SharedMedia\Orm\C2MQuery'); }
[ "public", "function", "useC2MQuery", "(", "$", "relationAlias", "=", "null", ",", "$", "joinType", "=", "Criteria", "::", "INNER_JOIN", ")", "{", "return", "$", "this", "->", "joinC2M", "(", "$", "relationAlias", ",", "$", "joinType", ")", "->", "useQuery"...
Use the C2M relation C2M object @see useQuery() @param string $relationAlias optional alias for the relation, to be used as main alias in the secondary query @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' @return \Attogram\SharedMedia\Orm\C2MQuery A secondary query ...
[ "Use", "the", "C2M", "relation", "C2M", "object" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L1585-L1590
train
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByM2P
public function filterByM2P($m2P, $comparison = null) { if ($m2P instanceof \Attogram\SharedMedia\Orm\M2P) { return $this ->addUsingAlias(MediaTableMap::COL_ID, $m2P->getMediaId(), $comparison); } elseif ($m2P instanceof ObjectCollection) { return $this ...
php
public function filterByM2P($m2P, $comparison = null) { if ($m2P instanceof \Attogram\SharedMedia\Orm\M2P) { return $this ->addUsingAlias(MediaTableMap::COL_ID, $m2P->getMediaId(), $comparison); } elseif ($m2P instanceof ObjectCollection) { return $this ...
[ "public", "function", "filterByM2P", "(", "$", "m2P", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "$", "m2P", "instanceof", "\\", "Attogram", "\\", "SharedMedia", "\\", "Orm", "\\", "M2P", ")", "{", "return", "$", "this", "->", "addUsingA...
Filter the query by a related \Attogram\SharedMedia\Orm\M2P object @param \Attogram\SharedMedia\Orm\M2P|ObjectCollection $m2P the related object to use as filter @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL @return ChildMediaQuery The current query, for fluid interf...
[ "Filter", "the", "query", "by", "a", "related", "\\", "Attogram", "\\", "SharedMedia", "\\", "Orm", "\\", "M2P", "object" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L1600-L1613
train
Blipfoto/php-sdk
src/Blipfoto/Api/OAuth.php
OAuth.authorize
public function authorize($redirect_uri, $scope = Client::SCOPE_READ) { header('Location: ' . $this->getAuthorizeUri($redirect_uri, $scope)); exit; }
php
public function authorize($redirect_uri, $scope = Client::SCOPE_READ) { header('Location: ' . $this->getAuthorizeUri($redirect_uri, $scope)); exit; }
[ "public", "function", "authorize", "(", "$", "redirect_uri", ",", "$", "scope", "=", "Client", "::", "SCOPE_READ", ")", "{", "header", "(", "'Location: '", ".", "$", "this", "->", "getAuthorizeUri", "(", "$", "redirect_uri", ",", "$", "scope", ")", ")", ...
Begin authorization. @param string $redirect_uri @param string $scope (optional) @redirect
[ "Begin", "authorization", "." ]
04f770ac7427e79d15f97b993c787651079cdeb4
https://github.com/Blipfoto/php-sdk/blob/04f770ac7427e79d15f97b993c787651079cdeb4/src/Blipfoto/Api/OAuth.php#L34-L37
train
Blipfoto/php-sdk
src/Blipfoto/Api/OAuth.php
OAuth.getAuthorizeUri
public function getAuthorizeUri($redirect_uri, $scope = Client::SCOPE_READ) { $state = sha1(mt_rand()); $_SESSION[$this->oauth_key] = [ 'redirect_uri' => $redirect_uri, 'scope' => $scope, 'state' => $state, ]; return $this->client->authorizationEndpoint() . '?' . http_build_query([ 'response_...
php
public function getAuthorizeUri($redirect_uri, $scope = Client::SCOPE_READ) { $state = sha1(mt_rand()); $_SESSION[$this->oauth_key] = [ 'redirect_uri' => $redirect_uri, 'scope' => $scope, 'state' => $state, ]; return $this->client->authorizationEndpoint() . '?' . http_build_query([ 'response_...
[ "public", "function", "getAuthorizeUri", "(", "$", "redirect_uri", ",", "$", "scope", "=", "Client", "::", "SCOPE_READ", ")", "{", "$", "state", "=", "sha1", "(", "mt_rand", "(", ")", ")", ";", "$", "_SESSION", "[", "$", "this", "->", "oauth_key", "]",...
Generate and return the authorization URI. @param string $redirect_uri @param string $scope (optional) @return string
[ "Generate", "and", "return", "the", "authorization", "URI", "." ]
04f770ac7427e79d15f97b993c787651079cdeb4
https://github.com/Blipfoto/php-sdk/blob/04f770ac7427e79d15f97b993c787651079cdeb4/src/Blipfoto/Api/OAuth.php#L46-L64
train
Blipfoto/php-sdk
src/Blipfoto/Api/OAuth.php
OAuth.getAuthorizationCode
public function getAuthorizationCode() { if (isset($_GET['error'])) { throw new OAuthException($_GET['error'], 1); } elseif (!isset($_GET['code']) || !isset($_GET['state'])) { throw new OAuthException('Invalid parameters', 2); } elseif (!isset($_SESSION[$this->oauth_key]['state'])) { throw new OAuthExc...
php
public function getAuthorizationCode() { if (isset($_GET['error'])) { throw new OAuthException($_GET['error'], 1); } elseif (!isset($_GET['code']) || !isset($_GET['state'])) { throw new OAuthException('Invalid parameters', 2); } elseif (!isset($_SESSION[$this->oauth_key]['state'])) { throw new OAuthExc...
[ "public", "function", "getAuthorizationCode", "(", ")", "{", "if", "(", "isset", "(", "$", "_GET", "[", "'error'", "]", ")", ")", "{", "throw", "new", "OAuthException", "(", "$", "_GET", "[", "'error'", "]", ",", "1", ")", ";", "}", "elseif", "(", ...
Obtain an authorization code. @return string @throws OAuthException
[ "Obtain", "an", "authorization", "code", "." ]
04f770ac7427e79d15f97b993c787651079cdeb4
https://github.com/Blipfoto/php-sdk/blob/04f770ac7427e79d15f97b993c787651079cdeb4/src/Blipfoto/Api/OAuth.php#L72-L85
train
Blipfoto/php-sdk
src/Blipfoto/Api/OAuth.php
OAuth.getToken
public function getToken($authorization_code = null) { if ($authorization_code == null) { $authorization_code = $this->getAuthorizationCode(); } $params = $_SESSION[$this->oauth_key]; unset($_SESSION[$this->oauth_key]); $response = $this->client->post('oauth/token', [ 'client_id' => $this->client->i...
php
public function getToken($authorization_code = null) { if ($authorization_code == null) { $authorization_code = $this->getAuthorizationCode(); } $params = $_SESSION[$this->oauth_key]; unset($_SESSION[$this->oauth_key]); $response = $this->client->post('oauth/token', [ 'client_id' => $this->client->i...
[ "public", "function", "getToken", "(", "$", "authorization_code", "=", "null", ")", "{", "if", "(", "$", "authorization_code", "==", "null", ")", "{", "$", "authorization_code", "=", "$", "this", "->", "getAuthorizationCode", "(", ")", ";", "}", "$", "para...
Swap an authorization code for a token. @param string $authorization_code (optional) @return array
[ "Swap", "an", "authorization", "code", "for", "a", "token", "." ]
04f770ac7427e79d15f97b993c787651079cdeb4
https://github.com/Blipfoto/php-sdk/blob/04f770ac7427e79d15f97b993c787651079cdeb4/src/Blipfoto/Api/OAuth.php#L93-L110
train
Vectrex/vxPHP
src/Database/Adapter/Mysql.php
Mysql.getEnumValues
public function getEnumValues($tableName, $columnName) { // check whether column exists if(!$this->columnExists($tableName, $columnName)) { throw new \PDOException(sprintf("Unknown column '%s' in table '%s'.", $columnName, $tableName)); } // wrong data type $dataType = $this->tableStructureCache[$t...
php
public function getEnumValues($tableName, $columnName) { // check whether column exists if(!$this->columnExists($tableName, $columnName)) { throw new \PDOException(sprintf("Unknown column '%s' in table '%s'.", $columnName, $tableName)); } // wrong data type $dataType = $this->tableStructureCache[$t...
[ "public", "function", "getEnumValues", "(", "$", "tableName", ",", "$", "columnName", ")", "{", "// check whether column exists", "if", "(", "!", "$", "this", "->", "columnExists", "(", "$", "tableName", ",", "$", "columnName", ")", ")", "{", "throw", "new",...
return all possible options of an enum or set attribute @param string $tableName @param string $columnName @return array @throws \PDOException
[ "return", "all", "possible", "options", "of", "an", "enum", "or", "set", "attribute" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Database/Adapter/Mysql.php#L157-L187
train
libreworks/caridea-container
src/Objects.php
Objects.publish
public function publish(\Caridea\Event\Event $event) { foreach (iterator_to_array($this->listeners) as $listener) { $listener->notify($event); } }
php
public function publish(\Caridea\Event\Event $event) { foreach (iterator_to_array($this->listeners) as $listener) { $listener->notify($event); } }
[ "public", "function", "publish", "(", "\\", "Caridea", "\\", "Event", "\\", "Event", "$", "event", ")", "{", "foreach", "(", "iterator_to_array", "(", "$", "this", "->", "listeners", ")", "as", "$", "listener", ")", "{", "$", "listener", "->", "notify", ...
Queues an event to be sent to Listeners. @param \Caridea\Event\Event $event The event to publish
[ "Queues", "an", "event", "to", "be", "sent", "to", "Listeners", "." ]
b93087ff5bf49f5885025da691575093335bfe8f
https://github.com/libreworks/caridea-container/blob/b93087ff5bf49f5885025da691575093335bfe8f/src/Objects.php#L134-L139
train