id
int32
0
241k
repo
stringlengths
6
63
path
stringlengths
5
140
func_name
stringlengths
3
151
original_string
stringlengths
84
13k
language
stringclasses
1 value
code
stringlengths
84
13k
code_tokens
list
docstring
stringlengths
3
47.2k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
91
247
199,700
Vectrex/vxPHP
src/Webpage/MenuEntry/MenuEntry.php
MenuEntry.getHref
public function getHref() { if(is_null($this->href)) { if($this->localPage) { $pathSegments = []; $e = $this; do { $pathSegments[] = $e->path; } while ($e = $e->menu->getParentEntry()); if(Application::getInstance()->getRouter()->getServerSideRewrite()) { if(($script = basename(...
php
public function getHref() { if(is_null($this->href)) { if($this->localPage) { $pathSegments = []; $e = $this; do { $pathSegments[] = $e->path; } while ($e = $e->menu->getParentEntry()); if(Application::getInstance()->getRouter()->getServerSideRewrite()) { if(($script = basename(...
[ "public", "function", "getHref", "(", ")", "{", "if", "(", "is_null", "(", "$", "this", "->", "href", ")", ")", "{", "if", "(", "$", "this", "->", "localPage", ")", "{", "$", "pathSegments", "=", "[", "]", ";", "$", "e", "=", "$", "this", ";", ...
get href attribute value of menu entry
[ "get", "href", "attribute", "value", "of", "menu", "entry" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Webpage/MenuEntry/MenuEntry.php#L172-L212
199,701
judus/minimal-http
src/Response.php
Response.arrayToJson
public function arrayToJson($content = null) { if ($this->getJsonEncodeArray() && is_array($content)) { $this->header('Content-Type: application/json'); return json_encode($content); } return $content; }
php
public function arrayToJson($content = null) { if ($this->getJsonEncodeArray() && is_array($content)) { $this->header('Content-Type: application/json'); return json_encode($content); } return $content; }
[ "public", "function", "arrayToJson", "(", "$", "content", "=", "null", ")", "{", "if", "(", "$", "this", "->", "getJsonEncodeArray", "(", ")", "&&", "is_array", "(", "$", "content", ")", ")", "{", "$", "this", "->", "header", "(", "'Content-Type: applica...
Encode array to json if configured @param $content @return string
[ "Encode", "array", "to", "json", "if", "configured" ]
13c49e1350488acea8acf44ab5ed7796a39a9f1a
https://github.com/judus/minimal-http/blob/13c49e1350488acea8acf44ab5ed7796a39a9f1a/src/Response.php#L165-L173
199,702
judus/minimal-http
src/Response.php
Response.objectToJson
public function objectToJson($content = null) { if ($this->getJsonEncodeObject() && is_object($content)) { if (method_exists($content, '__toString')) { return (string)$content; } if (method_exists($content, 'toJson')) { $this->header('Con...
php
public function objectToJson($content = null) { if ($this->getJsonEncodeObject() && is_object($content)) { if (method_exists($content, '__toString')) { return (string)$content; } if (method_exists($content, 'toJson')) { $this->header('Con...
[ "public", "function", "objectToJson", "(", "$", "content", "=", "null", ")", "{", "if", "(", "$", "this", "->", "getJsonEncodeObject", "(", ")", "&&", "is_object", "(", "$", "content", ")", ")", "{", "if", "(", "method_exists", "(", "$", "content", ","...
Encode object to json if configured @param $content @return string
[ "Encode", "object", "to", "json", "if", "configured" ]
13c49e1350488acea8acf44ab5ed7796a39a9f1a
https://github.com/judus/minimal-http/blob/13c49e1350488acea8acf44ab5ed7796a39a9f1a/src/Response.php#L182-L204
199,703
judus/minimal-http
src/Response.php
Response.printRecursiveNonAlphaNum
public function printRecursiveNonAlphaNum($content = null) { if (is_array($content) || is_object($content)) { ob_start(); /** @noinspection PhpUndefinedFunctionInspection */ if (php_sapi_name() != 'cli' && !defined('STDIN')) { d($content); } ...
php
public function printRecursiveNonAlphaNum($content = null) { if (is_array($content) || is_object($content)) { ob_start(); /** @noinspection PhpUndefinedFunctionInspection */ if (php_sapi_name() != 'cli' && !defined('STDIN')) { d($content); } ...
[ "public", "function", "printRecursiveNonAlphaNum", "(", "$", "content", "=", "null", ")", "{", "if", "(", "is_array", "(", "$", "content", ")", "||", "is_object", "(", "$", "content", ")", ")", "{", "ob_start", "(", ")", ";", "/** @noinspection PhpUndefinedF...
Does a print_r with objects and array recursive @param $content @return string
[ "Does", "a", "print_r", "with", "objects", "and", "array", "recursive" ]
13c49e1350488acea8acf44ab5ed7796a39a9f1a
https://github.com/judus/minimal-http/blob/13c49e1350488acea8acf44ab5ed7796a39a9f1a/src/Response.php#L213-L231
199,704
ZendExperts/phpids
lib/IDS/Monitor.php
IDS_Monitor.getReport
public function getReport() { if (isset($this->centrifuge) && $this->centrifuge) { $this->report->setCentrifuge($this->centrifuge); } return $this->report; }
php
public function getReport() { if (isset($this->centrifuge) && $this->centrifuge) { $this->report->setCentrifuge($this->centrifuge); } return $this->report; }
[ "public", "function", "getReport", "(", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "centrifuge", ")", "&&", "$", "this", "->", "centrifuge", ")", "{", "$", "this", "->", "report", "->", "setCentrifuge", "(", "$", "this", "->", "centrifuge", ...
Returns report object providing various functions to work with detected results. Also the centrifuge data is being set as property of the report object. @return object IDS_Report
[ "Returns", "report", "object", "providing", "various", "functions", "to", "work", "with", "detected", "results", ".", "Also", "the", "centrifuge", "data", "is", "being", "set", "as", "property", "of", "the", "report", "object", "." ]
f30df04eea47b94d056e2ae9ec8fea1c626f1c03
https://github.com/ZendExperts/phpids/blob/f30df04eea47b94d056e2ae9ec8fea1c626f1c03/lib/IDS/Monitor.php#L761-L768
199,705
ptlis/grep-db
src/Replace/Result/RowReplaceResult.php
RowReplaceResult.getReplacedCount
public function getReplacedCount(): int { return intval(array_reduce( $this->fieldResultList, function (int $count, FieldReplaceResult $fieldResult) { return $count + $fieldResult->getReplacedCount(); }, 0 )); }
php
public function getReplacedCount(): int { return intval(array_reduce( $this->fieldResultList, function (int $count, FieldReplaceResult $fieldResult) { return $count + $fieldResult->getReplacedCount(); }, 0 )); }
[ "public", "function", "getReplacedCount", "(", ")", ":", "int", "{", "return", "intval", "(", "array_reduce", "(", "$", "this", "->", "fieldResultList", ",", "function", "(", "int", "$", "count", ",", "FieldReplaceResult", "$", "fieldResult", ")", "{", "retu...
Get the number of replacements in all fields in this row.
[ "Get", "the", "number", "of", "replacements", "in", "all", "fields", "in", "this", "row", "." ]
7abff68982d426690d0515ccd7adc7a2e3d72a3f
https://github.com/ptlis/grep-db/blob/7abff68982d426690d0515ccd7adc7a2e3d72a3f/src/Replace/Result/RowReplaceResult.php#L45-L54
199,706
ptlis/grep-db
src/Replace/Result/RowReplaceResult.php
RowReplaceResult.getErrorList
public function getErrorList(): array { $errorList = $this->errorList; foreach ($this->fieldResultList as $fieldResult) { foreach ($fieldResult->getErrorList() as $error) { $errorList[] = $error; } } return $errorList; }
php
public function getErrorList(): array { $errorList = $this->errorList; foreach ($this->fieldResultList as $fieldResult) { foreach ($fieldResult->getErrorList() as $error) { $errorList[] = $error; } } return $errorList; }
[ "public", "function", "getErrorList", "(", ")", ":", "array", "{", "$", "errorList", "=", "$", "this", "->", "errorList", ";", "foreach", "(", "$", "this", "->", "fieldResultList", "as", "$", "fieldResult", ")", "{", "foreach", "(", "$", "fieldResult", "...
Get any replacement errors. @return string[]
[ "Get", "any", "replacement", "errors", "." ]
7abff68982d426690d0515ccd7adc7a2e3d72a3f
https://github.com/ptlis/grep-db/blob/7abff68982d426690d0515ccd7adc7a2e3d72a3f/src/Replace/Result/RowReplaceResult.php#L61-L71
199,707
ScaraMVC/Framework
src/Scara/Foundation/Environment.php
Environment.get
public function get($key, $default = '') { if (!is_null($this->_env)) { $item = ($this->has($key)) ? getenv($key) : $default; if (is_numeric($item)) { if (strrpos($item, '.') !== false) { return floatval($item); } else { ...
php
public function get($key, $default = '') { if (!is_null($this->_env)) { $item = ($this->has($key)) ? getenv($key) : $default; if (is_numeric($item)) { if (strrpos($item, '.') !== false) { return floatval($item); } else { ...
[ "public", "function", "get", "(", "$", "key", ",", "$", "default", "=", "''", ")", "{", "if", "(", "!", "is_null", "(", "$", "this", "->", "_env", ")", ")", "{", "$", "item", "=", "(", "$", "this", "->", "has", "(", "$", "key", ")", ")", "?...
Gets an environment variable. @param string $key @param string $default @return string
[ "Gets", "an", "environment", "variable", "." ]
199b08b45fadf5dae14ac4732af03b36e15bbef2
https://github.com/ScaraMVC/Framework/blob/199b08b45fadf5dae14ac4732af03b36e15bbef2/src/Scara/Foundation/Environment.php#L45-L71
199,708
phossa/phossa-cache
src/Phossa/Cache/Driver/FilesystemDriver.php
FilesystemDriver.getPath
protected function getPath(/*# string */ $key)/*# : string */ { // get directory first if (($pos = strrpos($key, '/')) !== false) { $dir = $this->dir_root . DIRECTORY_SEPARATOR . substr($key, 0, $pos) . DIRECTORY_SEPARATOR; $key = substr($key, $pos + 1);...
php
protected function getPath(/*# string */ $key)/*# : string */ { // get directory first if (($pos = strrpos($key, '/')) !== false) { $dir = $this->dir_root . DIRECTORY_SEPARATOR . substr($key, 0, $pos) . DIRECTORY_SEPARATOR; $key = substr($key, $pos + 1);...
[ "protected", "function", "getPath", "(", "/*# string */", "$", "key", ")", "/*# : string */", "{", "// get directory first", "if", "(", "(", "$", "pos", "=", "strrpos", "(", "$", "key", ",", "'/'", ")", ")", "!==", "false", ")", "{", "$", "dir", "=", "...
Get path base on key. $key may contain '/' to signal a path @param string $key item key @return string @access protected
[ "Get", "path", "base", "on", "key", "." ]
ad86bee9c5c646fbae09f6f58a346b379d16276e
https://github.com/phossa/phossa-cache/blob/ad86bee9c5c646fbae09f6f58a346b379d16276e/src/Phossa/Cache/Driver/FilesystemDriver.php#L255-L277
199,709
phossa/phossa-cache
src/Phossa/Cache/Driver/FilesystemDriver.php
FilesystemDriver.hashIt
protected function hashIt(/*# string */ $key)/*# : string */ { $md5 = md5($key); $hash = $this->file_pref . $md5 . $this->file_suff; // no hash if (!$this->hash_level) { return $hash; } // hash $pref = ''; for ($i = 0; $i < $this->hash_l...
php
protected function hashIt(/*# string */ $key)/*# : string */ { $md5 = md5($key); $hash = $this->file_pref . $md5 . $this->file_suff; // no hash if (!$this->hash_level) { return $hash; } // hash $pref = ''; for ($i = 0; $i < $this->hash_l...
[ "protected", "function", "hashIt", "(", "/*# string */", "$", "key", ")", "/*# : string */", "{", "$", "md5", "=", "md5", "(", "$", "key", ")", ";", "$", "hash", "=", "$", "this", "->", "file_pref", ".", "$", "md5", ".", "$", "this", "->", "file_suff...
Get hashed filename @param string $key the key @return string @access protected
[ "Get", "hashed", "filename" ]
ad86bee9c5c646fbae09f6f58a346b379d16276e
https://github.com/phossa/phossa-cache/blob/ad86bee9c5c646fbae09f6f58a346b379d16276e/src/Phossa/Cache/Driver/FilesystemDriver.php#L286-L302
199,710
phossa/phossa-cache
src/Phossa/Cache/Driver/FilesystemDriver.php
FilesystemDriver.deleteFromDir
protected function deleteFromDir( /*# string */ $dir, /*# int */ $maxlife = 0, /*# bool */ $removeDir = false )/*# : bool */ { $now = time(); if (is_dir($dir)) { $files = scandir($dir); foreach ($files as $file) { if ($file == "." || $f...
php
protected function deleteFromDir( /*# string */ $dir, /*# int */ $maxlife = 0, /*# bool */ $removeDir = false )/*# : bool */ { $now = time(); if (is_dir($dir)) { $files = scandir($dir); foreach ($files as $file) { if ($file == "." || $f...
[ "protected", "function", "deleteFromDir", "(", "/*# string */", "$", "dir", ",", "/*# int */", "$", "maxlife", "=", "0", ",", "/*# bool */", "$", "removeDir", "=", "false", ")", "/*# : bool */", "{", "$", "now", "=", "time", "(", ")", ";", "if", "(", "is...
Remove all contents under one directory @param string $dir directory @param int $maxlife delete those older than $maxlife seconds @param bool $removeDir remove the directory also @return bool @access protected
[ "Remove", "all", "contents", "under", "one", "directory" ]
ad86bee9c5c646fbae09f6f58a346b379d16276e
https://github.com/phossa/phossa-cache/blob/ad86bee9c5c646fbae09f6f58a346b379d16276e/src/Phossa/Cache/Driver/FilesystemDriver.php#L313-L349
199,711
railken/amethyst-authentication
src/Providers/AuthenticationServiceProvider.php
AuthenticationServiceProvider.register
public function register() { $this->app->register(\Laravel\Passport\PassportServiceProvider::class); $this->app->register(\Railken\Amethyst\Providers\ApiServiceProvider::class); $this->app->register(\Railken\Amethyst\Providers\UserServiceProvider::class); $this->mergeConfigFrom(__DIR...
php
public function register() { $this->app->register(\Laravel\Passport\PassportServiceProvider::class); $this->app->register(\Railken\Amethyst\Providers\ApiServiceProvider::class); $this->app->register(\Railken\Amethyst\Providers\UserServiceProvider::class); $this->mergeConfigFrom(__DIR...
[ "public", "function", "register", "(", ")", "{", "$", "this", "->", "app", "->", "register", "(", "\\", "Laravel", "\\", "Passport", "\\", "PassportServiceProvider", "::", "class", ")", ";", "$", "this", "->", "app", "->", "register", "(", "\\", "Railken...
Register any application services.so.
[ "Register", "any", "application", "services", ".", "so", "." ]
59f28ddffa41a5f7fae4d5504eacf7c664e54b46
https://github.com/railken/amethyst-authentication/blob/59f28ddffa41a5f7fae4d5504eacf7c664e54b46/src/Providers/AuthenticationServiceProvider.php#L37-L43
199,712
AdamB7586/UK_Counties
src/Counties.php
Counties.getCountyID
public static function getCountyID($county){ if(in_array($county, self::$counties)){ $names = array_keys(self::$counties, $county); return $names[0]; } return false; }
php
public static function getCountyID($county){ if(in_array($county, self::$counties)){ $names = array_keys(self::$counties, $county); return $names[0]; } return false; }
[ "public", "static", "function", "getCountyID", "(", "$", "county", ")", "{", "if", "(", "in_array", "(", "$", "county", ",", "self", "::", "$", "counties", ")", ")", "{", "$", "names", "=", "array_keys", "(", "self", "::", "$", "counties", ",", "$", ...
Returns the id of a given county name @param string $county This should be the county name you wish to find the id for @return int|false Returns the id of the given county name if it exists else returns false
[ "Returns", "the", "id", "of", "a", "given", "county", "name" ]
8e9d34048acde404fce545506750f77b8f8d7275
https://github.com/AdamB7586/UK_Counties/blob/8e9d34048acde404fce545506750f77b8f8d7275/src/Counties.php#L160-L166
199,713
AdamB7586/UK_Counties
src/Counties.php
Counties.getCountyName
public static function getCountyName($id){ if(is_numeric($id) && array_key_exists(intval($id), self::$counties)){ return self::$counties[intval($id)]; } return false; }
php
public static function getCountyName($id){ if(is_numeric($id) && array_key_exists(intval($id), self::$counties)){ return self::$counties[intval($id)]; } return false; }
[ "public", "static", "function", "getCountyName", "(", "$", "id", ")", "{", "if", "(", "is_numeric", "(", "$", "id", ")", "&&", "array_key_exists", "(", "intval", "(", "$", "id", ")", ",", "self", "::", "$", "counties", ")", ")", "{", "return", "self"...
Returns the county name of a given county id @param int $id This should be the id of the county you wish to know the name of @return string|false Will return the county name of the id if it exists else will return false
[ "Returns", "the", "county", "name", "of", "a", "given", "county", "id" ]
8e9d34048acde404fce545506750f77b8f8d7275
https://github.com/AdamB7586/UK_Counties/blob/8e9d34048acde404fce545506750f77b8f8d7275/src/Counties.php#L173-L178
199,714
GrottoPress/form-field
src/Field.php
Field.metaString
protected function metaString(): string { if (!$this->meta) { return ''; } return \join(' ', \array_map(function (string $key, $value): string { return $this->slugify($key).'="'.$this->escape->attr($value).'"'; }, \array_keys($this->meta), \array_values($this...
php
protected function metaString(): string { if (!$this->meta) { return ''; } return \join(' ', \array_map(function (string $key, $value): string { return $this->slugify($key).'="'.$this->escape->attr($value).'"'; }, \array_keys($this->meta), \array_values($this...
[ "protected", "function", "metaString", "(", ")", ":", "string", "{", "if", "(", "!", "$", "this", "->", "meta", ")", "{", "return", "''", ";", "}", "return", "\\", "join", "(", "' '", ",", "\\", "array_map", "(", "function", "(", "string", "$", "ke...
Convert meta to string
[ "Convert", "meta", "to", "string" ]
6566ee2e0d1bab2176c74dedae3f01f86048ac11
https://github.com/GrottoPress/form-field/blob/6566ee2e0d1bab2176c74dedae3f01f86048ac11/src/Field.php#L369-L378
199,715
GrottoPress/form-field
src/Field.php
Field.equiv
protected function equiv($a, $b): bool { if (\is_array($a) && \is_scalar($b)) { return \in_array($b, $a); } if (\is_array($b) && \is_scalar($a)) { return \in_array($a, $b); } return ($a == $b); }
php
protected function equiv($a, $b): bool { if (\is_array($a) && \is_scalar($b)) { return \in_array($b, $a); } if (\is_array($b) && \is_scalar($a)) { return \in_array($a, $b); } return ($a == $b); }
[ "protected", "function", "equiv", "(", "$", "a", ",", "$", "b", ")", ":", "bool", "{", "if", "(", "\\", "is_array", "(", "$", "a", ")", "&&", "\\", "is_scalar", "(", "$", "b", ")", ")", "{", "return", "\\", "in_array", "(", "$", "b", ",", "$"...
Are two values equivalent. For the purposes of this class, equivalence is defined as: - When the two variables have equal values; - When the two variables have identical values; - When one variable's value is contained in the other variable's value, where any one of the variables is a set/array. @param mixed $a @para...
[ "Are", "two", "values", "equivalent", "." ]
6566ee2e0d1bab2176c74dedae3f01f86048ac11
https://github.com/GrottoPress/form-field/blob/6566ee2e0d1bab2176c74dedae3f01f86048ac11/src/Field.php#L419-L430
199,716
Gendoria/command-queue
src/Gendoria/CommandQueue/Worker/WorkerRunnerManager.php
WorkerRunnerManager.addRunner
public function addRunner($name, WorkerRunnerInterface $runner, array $options = array()) { $this->runners[$name] = array( 'runner' => $runner, 'options' => $options, ); }
php
public function addRunner($name, WorkerRunnerInterface $runner, array $options = array()) { $this->runners[$name] = array( 'runner' => $runner, 'options' => $options, ); }
[ "public", "function", "addRunner", "(", "$", "name", ",", "WorkerRunnerInterface", "$", "runner", ",", "array", "$", "options", "=", "array", "(", ")", ")", "{", "$", "this", "->", "runners", "[", "$", "name", "]", "=", "array", "(", "'runner'", "=>", ...
Register runner. @param string $name Worker name. @param WorkerRunnerInterface $runner Worker runner. @param array $options Worker options.
[ "Register", "runner", "." ]
4e1094570705942f2ce3b2c976b5b251c3c84b40
https://github.com/Gendoria/command-queue/blob/4e1094570705942f2ce3b2c976b5b251c3c84b40/src/Gendoria/CommandQueue/Worker/WorkerRunnerManager.php#L30-L36
199,717
Gendoria/command-queue
src/Gendoria/CommandQueue/Worker/WorkerRunnerManager.php
WorkerRunnerManager.run
public function run($name, OutputInterface $output = null) { if (!$this->has($name)) { throw new InvalidArgumentException("No runner service registered for provided name."); } /* @var $runner WorkerRunnerInterface */ $runner = $this->runners[$name]['runner']; $run...
php
public function run($name, OutputInterface $output = null) { if (!$this->has($name)) { throw new InvalidArgumentException("No runner service registered for provided name."); } /* @var $runner WorkerRunnerInterface */ $runner = $this->runners[$name]['runner']; $run...
[ "public", "function", "run", "(", "$", "name", ",", "OutputInterface", "$", "output", "=", "null", ")", "{", "if", "(", "!", "$", "this", "->", "has", "(", "$", "name", ")", ")", "{", "throw", "new", "InvalidArgumentException", "(", "\"No runner service ...
Run worker. @param string $name @param OutputInterface $output @return void @throws InvalidArgumentException Thrown, if worker cannto be found for provided name. @throws Exception Can be thrown, if runner resulted with an error.
[ "Run", "worker", "." ]
4e1094570705942f2ce3b2c976b5b251c3c84b40
https://github.com/Gendoria/command-queue/blob/4e1094570705942f2ce3b2c976b5b251c3c84b40/src/Gendoria/CommandQueue/Worker/WorkerRunnerManager.php#L58-L66
199,718
wb-crowdfusion/crowdfusion
system/core/classes/systemdb/config/ConfigService.php
ConfigService.insertSnippet
public function insertSnippet(Plugin $plugin, $text, &$log = '') { $snippetProperties = $this->readProperties($text); $configContents = file_get_contents($this->configFileLocation); if (stripos($configContents, "BEGIN PLUGIN CONFIG: {$plugin->Slug}") === false) { /* foreach(...
php
public function insertSnippet(Plugin $plugin, $text, &$log = '') { $snippetProperties = $this->readProperties($text); $configContents = file_get_contents($this->configFileLocation); if (stripos($configContents, "BEGIN PLUGIN CONFIG: {$plugin->Slug}") === false) { /* foreach(...
[ "public", "function", "insertSnippet", "(", "Plugin", "$", "plugin", ",", "$", "text", ",", "&", "$", "log", "=", "''", ")", "{", "$", "snippetProperties", "=", "$", "this", "->", "readProperties", "(", "$", "text", ")", ";", "$", "configContents", "="...
Write the specified text to the config file @param Plugin $plugin The plugin that requested the addition @param string $text The text to add @param string &$log Holds a log of the changes made @return true
[ "Write", "the", "specified", "text", "to", "the", "config", "file" ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/systemdb/config/ConfigService.php#L84-L128
199,719
wb-crowdfusion/crowdfusion
system/core/classes/systemdb/config/ConfigService.php
ConfigService.readProperties
public function readProperties($config = null, $filter = null) { if(is_null($config)) $config = file_get_contents($this->configFileLocation); $props = preg_match_all('/\s*\$properties\[[\'\"]([^\"^\']+)[\'\"]\]\s*=\s*(.*?);[\n\r\t]?/s', $config, $m); $config = array(); ...
php
public function readProperties($config = null, $filter = null) { if(is_null($config)) $config = file_get_contents($this->configFileLocation); $props = preg_match_all('/\s*\$properties\[[\'\"]([^\"^\']+)[\'\"]\]\s*=\s*(.*?);[\n\r\t]?/s', $config, $m); $config = array(); ...
[ "public", "function", "readProperties", "(", "$", "config", "=", "null", ",", "$", "filter", "=", "null", ")", "{", "if", "(", "is_null", "(", "$", "config", ")", ")", "$", "config", "=", "file_get_contents", "(", "$", "this", "->", "configFileLocation",...
Parses the properties file. NOTE: Even though the properties file looks like php, and ends in a .php extension, we just parse it out all by hand here. @param string $config The contents of the config file to parse. If not specified, it will use the config file from $this->configFileLocation @param string $filter If s...
[ "Parses", "the", "properties", "file", "." ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/systemdb/config/ConfigService.php#L142-L157
199,720
wb-crowdfusion/crowdfusion
system/core/classes/systemdb/config/ConfigService.php
ConfigService.saveContents
public function saveContents($contents) { $path = pathinfo($this->configFileLocation); //BACKUP CURRENT config.php $backup = $this->backupPath.'/pluginconfig.'.date('Y_m_d_His').'.php'; FileSystemUtils::safeCopy($this->configFileLocation, $backup); //OVERWRITE config.php W...
php
public function saveContents($contents) { $path = pathinfo($this->configFileLocation); //BACKUP CURRENT config.php $backup = $this->backupPath.'/pluginconfig.'.date('Y_m_d_His').'.php'; FileSystemUtils::safeCopy($this->configFileLocation, $backup); //OVERWRITE config.php W...
[ "public", "function", "saveContents", "(", "$", "contents", ")", "{", "$", "path", "=", "pathinfo", "(", "$", "this", "->", "configFileLocation", ")", ";", "//BACKUP CURRENT config.php", "$", "backup", "=", "$", "this", "->", "backupPath", ".", "'/pluginconfig...
Writes the contents to the config file, after first backing up the current config @param string $contents The contents to write to the config file @return void
[ "Writes", "the", "contents", "to", "the", "config", "file", "after", "first", "backing", "up", "the", "current", "config" ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/systemdb/config/ConfigService.php#L167-L181
199,721
Blipfoto/php-sdk
src/Blipfoto/Api/Request.php
Request.header
public function header() { $args = func_get_args(); $name = $args[0]; if (count($args) == 2) { $this->headers[$name] = $args[1]; } return $this->headers[$name]; }
php
public function header() { $args = func_get_args(); $name = $args[0]; if (count($args) == 2) { $this->headers[$name] = $args[1]; } return $this->headers[$name]; }
[ "public", "function", "header", "(", ")", "{", "$", "args", "=", "func_get_args", "(", ")", ";", "$", "name", "=", "$", "args", "[", "0", "]", ";", "if", "(", "count", "(", "$", "args", ")", "==", "2", ")", "{", "$", "this", "->", "headers", ...
Get and optionally set a header. @param string $name @param mixed $value (optional) @return mixed
[ "Get", "and", "optionally", "set", "a", "header", "." ]
04f770ac7427e79d15f97b993c787651079cdeb4
https://github.com/Blipfoto/php-sdk/blob/04f770ac7427e79d15f97b993c787651079cdeb4/src/Blipfoto/Api/Request.php#L88-L95
199,722
Blipfoto/php-sdk
src/Blipfoto/Api/Request.php
Request.url
public function url() { $url = $this->client->endpoint() . $this->resource . '.json'; if (in_array($this->method, ['GET', 'DELETE']) && $this->params !== null) { $url .= '?' . http_build_query($this->params); } return $url; }
php
public function url() { $url = $this->client->endpoint() . $this->resource . '.json'; if (in_array($this->method, ['GET', 'DELETE']) && $this->params !== null) { $url .= '?' . http_build_query($this->params); } return $url; }
[ "public", "function", "url", "(", ")", "{", "$", "url", "=", "$", "this", "->", "client", "->", "endpoint", "(", ")", ".", "$", "this", "->", "resource", ".", "'.json'", ";", "if", "(", "in_array", "(", "$", "this", "->", "method", ",", "[", "'GE...
Return the request url. @return string
[ "Return", "the", "request", "url", "." ]
04f770ac7427e79d15f97b993c787651079cdeb4
https://github.com/Blipfoto/php-sdk/blob/04f770ac7427e79d15f97b993c787651079cdeb4/src/Blipfoto/Api/Request.php#L111-L117
199,723
Blipfoto/php-sdk
src/Blipfoto/Api/Request.php
Request.send
public function send() { $url = $this->url(); // Set fields for post or put requests. $this->curl = curl_init(); curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, $this->method); if (in_array($this->method, ['POST', 'PUT'])) { $this->buildBody(); } else { $this->header('Content-Type', null); } c...
php
public function send() { $url = $this->url(); // Set fields for post or put requests. $this->curl = curl_init(); curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, $this->method); if (in_array($this->method, ['POST', 'PUT'])) { $this->buildBody(); } else { $this->header('Content-Type', null); } c...
[ "public", "function", "send", "(", ")", "{", "$", "url", "=", "$", "this", "->", "url", "(", ")", ";", "// Set fields for post or put requests.", "$", "this", "->", "curl", "=", "curl_init", "(", ")", ";", "curl_setopt", "(", "$", "this", "->", "curl", ...
Make a request and return the response data if successful. @return Response @throws NetworkException
[ "Make", "a", "request", "and", "return", "the", "response", "data", "if", "successful", "." ]
04f770ac7427e79d15f97b993c787651079cdeb4
https://github.com/Blipfoto/php-sdk/blob/04f770ac7427e79d15f97b993c787651079cdeb4/src/Blipfoto/Api/Request.php#L125-L194
199,724
Blipfoto/php-sdk
src/Blipfoto/Api/Request.php
Request.buildBody
protected function buildBody() { // If we are uploading files, we have to build the request body manually since the stupid syntax for file uploads // will break non-file values beginning with '@'. When we no longer support PHP 5.4 we can just turn this syntax off // and use CurlFile. if (count($this->files(...
php
protected function buildBody() { // If we are uploading files, we have to build the request body manually since the stupid syntax for file uploads // will break non-file values beginning with '@'. When we no longer support PHP 5.4 we can just turn this syntax off // and use CurlFile. if (count($this->files(...
[ "protected", "function", "buildBody", "(", ")", "{", "// If we are uploading files, we have to build the request body manually since the stupid syntax for file uploads", "// will break non-file values beginning with '@'. When we no longer support PHP 5.4 we can just turn this syntax off", "// and us...
Build the request body.
[ "Build", "the", "request", "body", "." ]
04f770ac7427e79d15f97b993c787651079cdeb4
https://github.com/Blipfoto/php-sdk/blob/04f770ac7427e79d15f97b993c787651079cdeb4/src/Blipfoto/Api/Request.php#L208-L239
199,725
gplcart/cli
controllers/commands/Trigger.php
Trigger.cmdGetTrigger
public function cmdGetTrigger() { $result = $this->getListTrigger(); $this->outputFormat($result); $this->outputFormatTableTrigger($result); $this->output(); }
php
public function cmdGetTrigger() { $result = $this->getListTrigger(); $this->outputFormat($result); $this->outputFormatTableTrigger($result); $this->output(); }
[ "public", "function", "cmdGetTrigger", "(", ")", "{", "$", "result", "=", "$", "this", "->", "getListTrigger", "(", ")", ";", "$", "this", "->", "outputFormat", "(", "$", "result", ")", ";", "$", "this", "->", "outputFormatTableTrigger", "(", "$", "resul...
Callback for "trigger-get" command
[ "Callback", "for", "trigger", "-", "get", "command" ]
e57dba53e291a225b4bff0c0d9b23d685dd1c125
https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/Trigger.php#L40-L46
199,726
gplcart/cli
controllers/commands/Trigger.php
Trigger.cmdUpdateTrigger
public function cmdUpdateTrigger() { $params = $this->getParam(); if (empty($params[0]) || count($params) < 2) { $this->errorAndExit($this->text('Invalid command')); } if (!is_numeric($params[0])) { $this->errorAndExit($this->text('Invalid argument')); ...
php
public function cmdUpdateTrigger() { $params = $this->getParam(); if (empty($params[0]) || count($params) < 2) { $this->errorAndExit($this->text('Invalid command')); } if (!is_numeric($params[0])) { $this->errorAndExit($this->text('Invalid argument')); ...
[ "public", "function", "cmdUpdateTrigger", "(", ")", "{", "$", "params", "=", "$", "this", "->", "getParam", "(", ")", ";", "if", "(", "empty", "(", "$", "params", "[", "0", "]", ")", "||", "count", "(", "$", "params", ")", "<", "2", ")", "{", "...
Callback for "trigger-update" command
[ "Callback", "for", "trigger", "-", "update", "command" ]
e57dba53e291a225b4bff0c0d9b23d685dd1c125
https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/Trigger.php#L96-L117
199,727
gplcart/cli
controllers/commands/Trigger.php
Trigger.addTrigger
protected function addTrigger() { if (!$this->isError()) { $state_id = $this->trigger->add($this->getSubmitted()); if (empty($state_id)) { $this->errorAndExit($this->text('Unexpected result')); } $this->line($state_id); } }
php
protected function addTrigger() { if (!$this->isError()) { $state_id = $this->trigger->add($this->getSubmitted()); if (empty($state_id)) { $this->errorAndExit($this->text('Unexpected result')); } $this->line($state_id); } }
[ "protected", "function", "addTrigger", "(", ")", "{", "if", "(", "!", "$", "this", "->", "isError", "(", ")", ")", "{", "$", "state_id", "=", "$", "this", "->", "trigger", "->", "add", "(", "$", "this", "->", "getSubmitted", "(", ")", ")", ";", "...
Add a new trigger
[ "Add", "a", "new", "trigger" ]
e57dba53e291a225b4bff0c0d9b23d685dd1c125
https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/Trigger.php#L180-L189
199,728
gplcart/cli
controllers/commands/Trigger.php
Trigger.submitAddTrigger
protected function submitAddTrigger() { $this->setSubmitted(null, $this->getParam()); $this->setSubmitted('data.conditions', $this->getSubmitted('conditions')); $this->setSubmittedList('data.conditions'); $this->validateComponent('trigger'); $this->addTrigger(); }
php
protected function submitAddTrigger() { $this->setSubmitted(null, $this->getParam()); $this->setSubmitted('data.conditions', $this->getSubmitted('conditions')); $this->setSubmittedList('data.conditions'); $this->validateComponent('trigger'); $this->addTrigger(); }
[ "protected", "function", "submitAddTrigger", "(", ")", "{", "$", "this", "->", "setSubmitted", "(", "null", ",", "$", "this", "->", "getParam", "(", ")", ")", ";", "$", "this", "->", "setSubmitted", "(", "'data.conditions'", ",", "$", "this", "->", "getS...
Add a new trigger at once
[ "Add", "a", "new", "trigger", "at", "once" ]
e57dba53e291a225b4bff0c0d9b23d685dd1c125
https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/Trigger.php#L205-L213
199,729
gplcart/cli
controllers/commands/Trigger.php
Trigger.wizardAddTrigger
protected function wizardAddTrigger() { $this->validatePrompt('name', $this->text('Name'), 'trigger'); $this->validatePrompt('store_id', $this->text('Store'), 'trigger'); $this->validatePromptList('data.conditions', $this->text('Conditions'), 'trigger'); $this->validatePrompt('status...
php
protected function wizardAddTrigger() { $this->validatePrompt('name', $this->text('Name'), 'trigger'); $this->validatePrompt('store_id', $this->text('Store'), 'trigger'); $this->validatePromptList('data.conditions', $this->text('Conditions'), 'trigger'); $this->validatePrompt('status...
[ "protected", "function", "wizardAddTrigger", "(", ")", "{", "$", "this", "->", "validatePrompt", "(", "'name'", ",", "$", "this", "->", "text", "(", "'Name'", ")", ",", "'trigger'", ")", ";", "$", "this", "->", "validatePrompt", "(", "'store_id'", ",", "...
Add a trigger step by step
[ "Add", "a", "trigger", "step", "by", "step" ]
e57dba53e291a225b4bff0c0d9b23d685dd1c125
https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/Trigger.php#L218-L229
199,730
valu-digital/valusetup
src/ValuSetup/Service/AuthService.php
AuthService.getIdentity
public function getIdentity() { if($this->hasIdentity()){ if($this->identity === null){ $identity = $this->authenticationService->getIdentity(); $identity = array_merge( $identity, $this->getOption('identity...
php
public function getIdentity() { if($this->hasIdentity()){ if($this->identity === null){ $identity = $this->authenticationService->getIdentity(); $identity = array_merge( $identity, $this->getOption('identity...
[ "public", "function", "getIdentity", "(", ")", "{", "if", "(", "$", "this", "->", "hasIdentity", "(", ")", ")", "{", "if", "(", "$", "this", "->", "identity", "===", "null", ")", "{", "$", "identity", "=", "$", "this", "->", "authenticationService", ...
Returns the identity or null if no identity is available @return mixed|null
[ "Returns", "the", "identity", "or", "null", "if", "no", "identity", "is", "available" ]
db1a0bfe1262d555eb11cd0d99625b9ee43d6744
https://github.com/valu-digital/valusetup/blob/db1a0bfe1262d555eb11cd0d99625b9ee43d6744/src/ValuSetup/Service/AuthService.php#L95-L131
199,731
valu-digital/valusetup
src/ValuSetup/Service/AuthService.php
AuthService.getStorage
public function getStorage() { if(!$this->storage && $this->getServiceLocator()->has(self::STORAGE_LOCATOR_KEY)){ $this->setStorage($this->getServiceLocator()->get(self::STORAGE_LOCATOR_KEY)); } return $this->storage; }
php
public function getStorage() { if(!$this->storage && $this->getServiceLocator()->has(self::STORAGE_LOCATOR_KEY)){ $this->setStorage($this->getServiceLocator()->get(self::STORAGE_LOCATOR_KEY)); } return $this->storage; }
[ "public", "function", "getStorage", "(", ")", "{", "if", "(", "!", "$", "this", "->", "storage", "&&", "$", "this", "->", "getServiceLocator", "(", ")", "->", "has", "(", "self", "::", "STORAGE_LOCATOR_KEY", ")", ")", "{", "$", "this", "->", "setStorag...
Retrieve storage instance @return \Zend\Authentication\Storage\StorageInterface @ValuService\Exclude
[ "Retrieve", "storage", "instance" ]
db1a0bfe1262d555eb11cd0d99625b9ee43d6744
https://github.com/valu-digital/valusetup/blob/db1a0bfe1262d555eb11cd0d99625b9ee43d6744/src/ValuSetup/Service/AuthService.php#L172-L179
199,732
valu-digital/valusetup
src/ValuSetup/Service/AuthService.php
AuthService.getAuthenticationService
protected function getAuthenticationService() { if ($this->authenticationService === null) { $this->authenticationService = new AuthenticationService($this->getStorage()); } return $this->authenticationService; }
php
protected function getAuthenticationService() { if ($this->authenticationService === null) { $this->authenticationService = new AuthenticationService($this->getStorage()); } return $this->authenticationService; }
[ "protected", "function", "getAuthenticationService", "(", ")", "{", "if", "(", "$", "this", "->", "authenticationService", "===", "null", ")", "{", "$", "this", "->", "authenticationService", "=", "new", "AuthenticationService", "(", "$", "this", "->", "getStora...
Retrieve AuthenticationService instance @return \Zend\Authentication\AuthenticationService
[ "Retrieve", "AuthenticationService", "instance" ]
db1a0bfe1262d555eb11cd0d99625b9ee43d6744
https://github.com/valu-digital/valusetup/blob/db1a0bfe1262d555eb11cd0d99625b9ee43d6744/src/ValuSetup/Service/AuthService.php#L206-L213
199,733
Stillat/Common
src/Stillat/Common/Traits/Expectations.php
Expectations.expectNumberNotZeroForDivision
protected function expectNumberNotZeroForDivision($number, $message = '') { $this->expectValidNumber($number, $message); if ($number == 0) { throw new DivideByZeroException($message); } }
php
protected function expectNumberNotZeroForDivision($number, $message = '') { $this->expectValidNumber($number, $message); if ($number == 0) { throw new DivideByZeroException($message); } }
[ "protected", "function", "expectNumberNotZeroForDivision", "(", "$", "number", ",", "$", "message", "=", "''", ")", "{", "$", "this", "->", "expectValidNumber", "(", "$", "number", ",", "$", "message", ")", ";", "if", "(", "$", "number", "==", "0", ")", ...
Expects a number not to be zero when using for division. @param $number @param string $message @throws \Stillat\Common\Exceptions\Arithmetic\DivideByZeroException @throws \Stillat\Common\Exceptions\Arithmetic\NotFiniteNumberException
[ "Expects", "a", "number", "not", "to", "be", "zero", "when", "using", "for", "division", "." ]
9f69105292740c307aece588cf58a85892bad350
https://github.com/Stillat/Common/blob/9f69105292740c307aece588cf58a85892bad350/src/Stillat/Common/Traits/Expectations.php#L68-L74
199,734
joegreen88/zf1-component-validate
src/Zend/Validate/File/Hash.php
Zend_Validate_File_Hash.addHash
public function addHash($options) { if (is_string($options)) { $options = array($options); } else if (!is_array($options)) { throw new Zend_Validate_Exception("False parameter given"); } $known = hash_algos(); if (!isset($options['algorithm'])) { ...
php
public function addHash($options) { if (is_string($options)) { $options = array($options); } else if (!is_array($options)) { throw new Zend_Validate_Exception("False parameter given"); } $known = hash_algos(); if (!isset($options['algorithm'])) { ...
[ "public", "function", "addHash", "(", "$", "options", ")", "{", "if", "(", "is_string", "(", "$", "options", ")", ")", "{", "$", "options", "=", "array", "(", "$", "options", ")", ";", "}", "else", "if", "(", "!", "is_array", "(", "$", "options", ...
Adds the hash for one or multiple files @param string|array $options @return Zend_Validate_File_Hash Provides a fluent interface
[ "Adds", "the", "hash", "for", "one", "or", "multiple", "files" ]
88d9ea016f73d48ff0ba7d06ecbbf28951fd279e
https://github.com/joegreen88/zf1-component-validate/blob/88d9ea016f73d48ff0ba7d06ecbbf28951fd279e/src/Zend/Validate/File/Hash.php#L114-L141
199,735
ARCANESOFT/Blog
src/Http/Controllers/Admin/DashboardController.php
DashboardController.index
public function index() { $this->authorize(DashboardPolicy::PERMISSION_STATS); $this->setTitle(trans('blog::dashboard.titles.statistics')); return $this->view('admin.dashboard'); }
php
public function index() { $this->authorize(DashboardPolicy::PERMISSION_STATS); $this->setTitle(trans('blog::dashboard.titles.statistics')); return $this->view('admin.dashboard'); }
[ "public", "function", "index", "(", ")", "{", "$", "this", "->", "authorize", "(", "DashboardPolicy", "::", "PERMISSION_STATS", ")", ";", "$", "this", "->", "setTitle", "(", "trans", "(", "'blog::dashboard.titles.statistics'", ")", ")", ";", "return", "$", "...
Get the dashboard page. @return \Illuminate\View\View
[ "Get", "the", "dashboard", "page", "." ]
2078fdfdcbccda161c02899b9e1f344f011b2859
https://github.com/ARCANESOFT/Blog/blob/2078fdfdcbccda161c02899b9e1f344f011b2859/src/Http/Controllers/Admin/DashboardController.php#L39-L46
199,736
Marwelln/Notifier
src/Marwelln/Notifier/Notify.php
Notify.flash
public function flash($message = null, $type = null) { if ($message !== null) $this->attributes['message'] = (array) $message; if ($type !== null) $this->attributes['type'] = $type; $this->session->flash('notifier', $this->attributes); }
php
public function flash($message = null, $type = null) { if ($message !== null) $this->attributes['message'] = (array) $message; if ($type !== null) $this->attributes['type'] = $type; $this->session->flash('notifier', $this->attributes); }
[ "public", "function", "flash", "(", "$", "message", "=", "null", ",", "$", "type", "=", "null", ")", "{", "if", "(", "$", "message", "!==", "null", ")", "$", "this", "->", "attributes", "[", "'message'", "]", "=", "(", "array", ")", "$", "message",...
Save the setup to a session flash. @return void
[ "Save", "the", "setup", "to", "a", "session", "flash", "." ]
f3a17802f4bd0ce13f23ca54d32c254617cf2f17
https://github.com/Marwelln/Notifier/blob/f3a17802f4bd0ce13f23ca54d32c254617cf2f17/src/Marwelln/Notifier/Notify.php#L91-L96
199,737
RocketPropelledTortoise/Core
src/Taxonomy/Utils/CommonTableExpressionQuery.php
CommonTableExpressionQuery.runQuery
protected function runQuery($raw_query, $id) { $query = str_replace(':id', $id, $raw_query); $start = microtime(true); // Does not work as a prepared statement; we have to execute it directly $results = DB::getReadPdo()->query($query)->fetchAll(\PDO::FETCH_OBJ); // Log the...
php
protected function runQuery($raw_query, $id) { $query = str_replace(':id', $id, $raw_query); $start = microtime(true); // Does not work as a prepared statement; we have to execute it directly $results = DB::getReadPdo()->query($query)->fetchAll(\PDO::FETCH_OBJ); // Log the...
[ "protected", "function", "runQuery", "(", "$", "raw_query", ",", "$", "id", ")", "{", "$", "query", "=", "str_replace", "(", "':id'", ",", "$", "id", ",", "$", "raw_query", ")", ";", "$", "start", "=", "microtime", "(", "true", ")", ";", "// Does not...
Execute the query with the current PDO connection. Will log the time taken manually @param string $raw_query @param int $id @return \Illuminate\Support\Collection
[ "Execute", "the", "query", "with", "the", "current", "PDO", "connection", ".", "Will", "log", "the", "time", "taken", "manually" ]
78b65663fc463e21e494257140ddbed0a9ccb3c3
https://github.com/RocketPropelledTortoise/Core/blob/78b65663fc463e21e494257140ddbed0a9ccb3c3/src/Taxonomy/Utils/CommonTableExpressionQuery.php#L27-L40
199,738
RocketPropelledTortoise/Core
src/Taxonomy/Utils/CommonTableExpressionQuery.php
CommonTableExpressionQuery.assembleQuery
protected function assembleQuery($initial, $recursive) { $tmp_tbl = 'name_tree'; $recursive = str_replace(':tmp_tbl', $tmp_tbl, $recursive); $final = "select distinct * from $tmp_tbl"; if (DB::connection()->getDriverName() == 'mysql') { return "Call WITH_EMULATOR('$tmp_...
php
protected function assembleQuery($initial, $recursive) { $tmp_tbl = 'name_tree'; $recursive = str_replace(':tmp_tbl', $tmp_tbl, $recursive); $final = "select distinct * from $tmp_tbl"; if (DB::connection()->getDriverName() == 'mysql') { return "Call WITH_EMULATOR('$tmp_...
[ "protected", "function", "assembleQuery", "(", "$", "initial", ",", "$", "recursive", ")", "{", "$", "tmp_tbl", "=", "'name_tree'", ";", "$", "recursive", "=", "str_replace", "(", "':tmp_tbl'", ",", "$", "tmp_tbl", ",", "$", "recursive", ")", ";", "$", "...
Prepare the complete query to run on the DB to get the data recursively. @param string $initial The initial query bootstrapping the recursive query @param string $recursive The query to dig deeper in the hierarchy @return string
[ "Prepare", "the", "complete", "query", "to", "run", "on", "the", "DB", "to", "get", "the", "data", "recursively", "." ]
78b65663fc463e21e494257140ddbed0a9ccb3c3
https://github.com/RocketPropelledTortoise/Core/blob/78b65663fc463e21e494257140ddbed0a9ccb3c3/src/Taxonomy/Utils/CommonTableExpressionQuery.php#L49-L61
199,739
patrickisgreat/da-php-fuel-sdk
src/ET_Client.php
ET_Client.getConfig
public function getConfig() { $config = false; if (file_exists(realpath(__DIR__ . "/../ExactTargetLaravelConfig.php"))) { $config = include __DIR__ . "/../ExactTargetLaravelConfig.php"; return $config; } return $config; }
php
public function getConfig() { $config = false; if (file_exists(realpath(__DIR__ . "/../ExactTargetLaravelConfig.php"))) { $config = include __DIR__ . "/../ExactTargetLaravelConfig.php"; return $config; } return $config; }
[ "public", "function", "getConfig", "(", ")", "{", "$", "config", "=", "false", ";", "if", "(", "file_exists", "(", "realpath", "(", "__DIR__", ".", "\"/../ExactTargetLaravelConfig.php\"", ")", ")", ")", "{", "$", "config", "=", "include", "__DIR__", ".", "...
Gets the Configuration @return array
[ "Gets", "the", "Configuration" ]
6935f51b4d3dbd0923aed746620955fd63789549
https://github.com/patrickisgreat/da-php-fuel-sdk/blob/6935f51b4d3dbd0923aed746620955fd63789549/src/ET_Client.php#L239-L247
199,740
patrickisgreat/da-php-fuel-sdk
src/ET_Client.php
ET_Client.refreshToken
public function refreshToken($forceRefresh = false) { if (property_exists($this, "sdl") && $this->sdl == 0) { parent::__construct($this->xmlLoc, array('trace'=>1, 'exceptions'=>0)); } try { $currentTime = new DateTime(); if (is_null($this->getAuthTokenExpi...
php
public function refreshToken($forceRefresh = false) { if (property_exists($this, "sdl") && $this->sdl == 0) { parent::__construct($this->xmlLoc, array('trace'=>1, 'exceptions'=>0)); } try { $currentTime = new DateTime(); if (is_null($this->getAuthTokenExpi...
[ "public", "function", "refreshToken", "(", "$", "forceRefresh", "=", "false", ")", "{", "if", "(", "property_exists", "(", "$", "this", ",", "\"sdl\"", ")", "&&", "$", "this", "->", "sdl", "==", "0", ")", "{", "parent", "::", "__construct", "(", "$", ...
Gets the refresh token using the authentication URL. @param boolean $forceRefresh Flag to indicate a force refresh of authentication toekn. @return void
[ "Gets", "the", "refresh", "token", "using", "the", "authentication", "URL", "." ]
6935f51b4d3dbd0923aed746620955fd63789549
https://github.com/patrickisgreat/da-php-fuel-sdk/blob/6935f51b4d3dbd0923aed746620955fd63789549/src/ET_Client.php#L255-L300
199,741
patrickisgreat/da-php-fuel-sdk
src/ET_Client.php
ET_Client.setAuthToken
public function setAuthToken($tenantKey, $authToken, $authTokenExpiration) { if ($this->tenantTokens[$tenantKey] == null) { $this->tenantTokens[$tenantKey] = array(); } $this->tenantTokens[$tenantKey]['authToken'] = $authToken; $this->tenantTokens[$tenantKey]['authTokenEx...
php
public function setAuthToken($tenantKey, $authToken, $authTokenExpiration) { if ($this->tenantTokens[$tenantKey] == null) { $this->tenantTokens[$tenantKey] = array(); } $this->tenantTokens[$tenantKey]['authToken'] = $authToken; $this->tenantTokens[$tenantKey]['authTokenEx...
[ "public", "function", "setAuthToken", "(", "$", "tenantKey", ",", "$", "authToken", ",", "$", "authTokenExpiration", ")", "{", "if", "(", "$", "this", "->", "tenantTokens", "[", "$", "tenantKey", "]", "==", "null", ")", "{", "$", "this", "->", "tenantTok...
Set the authentication token in the tenantTokens array. @param string $tenantKey Tenant key for which auth toke to be set @param string $authToken Authentication token to be set @param string $authTokenExpiration Authentication token expiration value
[ "Set", "the", "authentication", "token", "in", "the", "tenantTokens", "array", "." ]
6935f51b4d3dbd0923aed746620955fd63789549
https://github.com/patrickisgreat/da-php-fuel-sdk/blob/6935f51b4d3dbd0923aed746620955fd63789549/src/ET_Client.php#L474-L481
199,742
patrickisgreat/da-php-fuel-sdk
src/ET_Client.php
ET_Client.getAuthTokenExpiration
public function getAuthTokenExpiration($tenantKey) { $tenantKey = $tenantKey == null ? $this->tenantKey : $tenantKey; if ($this->tenantTokens[$tenantKey] == null) { $this->tenantTokens[$tenantKey] = array(); } return isset($this->tenantTokens[$tenantKey]['authTokenExpirat...
php
public function getAuthTokenExpiration($tenantKey) { $tenantKey = $tenantKey == null ? $this->tenantKey : $tenantKey; if ($this->tenantTokens[$tenantKey] == null) { $this->tenantTokens[$tenantKey] = array(); } return isset($this->tenantTokens[$tenantKey]['authTokenExpirat...
[ "public", "function", "getAuthTokenExpiration", "(", "$", "tenantKey", ")", "{", "$", "tenantKey", "=", "$", "tenantKey", "==", "null", "?", "$", "this", "->", "tenantKey", ":", "$", "tenantKey", ";", "if", "(", "$", "this", "->", "tenantTokens", "[", "$...
Get the Auth Token Expiration. @param string $tenantKey Tenant key for which authenication token is returned @return string Authenticaiton token for the tenant key
[ "Get", "the", "Auth", "Token", "Expiration", "." ]
6935f51b4d3dbd0923aed746620955fd63789549
https://github.com/patrickisgreat/da-php-fuel-sdk/blob/6935f51b4d3dbd0923aed746620955fd63789549/src/ET_Client.php#L488-L497
199,743
patrickisgreat/da-php-fuel-sdk
src/ET_Client.php
ET_Client.setInternalAuthToken
public function setInternalAuthToken($tenantKey, $internalAuthToken) { if ($this->tenantTokens[$tenantKey] == null) { $this->tenantTokens[$tenantKey] = array(); } $this->tenantTokens[$tenantKey]['internalAuthToken'] = $internalAuthToken; }
php
public function setInternalAuthToken($tenantKey, $internalAuthToken) { if ($this->tenantTokens[$tenantKey] == null) { $this->tenantTokens[$tenantKey] = array(); } $this->tenantTokens[$tenantKey]['internalAuthToken'] = $internalAuthToken; }
[ "public", "function", "setInternalAuthToken", "(", "$", "tenantKey", ",", "$", "internalAuthToken", ")", "{", "if", "(", "$", "this", "->", "tenantTokens", "[", "$", "tenantKey", "]", "==", "null", ")", "{", "$", "this", "->", "tenantTokens", "[", "$", "...
Set the internal auth tokan. @param string $tenantKey @param string $internalAuthToken
[ "Set", "the", "internal", "auth", "tokan", "." ]
6935f51b4d3dbd0923aed746620955fd63789549
https://github.com/patrickisgreat/da-php-fuel-sdk/blob/6935f51b4d3dbd0923aed746620955fd63789549/src/ET_Client.php#L520-L526
199,744
patrickisgreat/da-php-fuel-sdk
src/ET_Client.php
ET_Client.setRefreshToken
public function setRefreshToken($tenantKey, $refreshToken) { if ($this->tenantTokens[$tenantKey] == null) { $this->tenantTokens[$tenantKey] = array(); } $this->tenantTokens[$tenantKey]['refreshToken'] = $refreshToken; }
php
public function setRefreshToken($tenantKey, $refreshToken) { if ($this->tenantTokens[$tenantKey] == null) { $this->tenantTokens[$tenantKey] = array(); } $this->tenantTokens[$tenantKey]['refreshToken'] = $refreshToken; }
[ "public", "function", "setRefreshToken", "(", "$", "tenantKey", ",", "$", "refreshToken", ")", "{", "if", "(", "$", "this", "->", "tenantTokens", "[", "$", "tenantKey", "]", "==", "null", ")", "{", "$", "this", "->", "tenantTokens", "[", "$", "tenantKey"...
Set the refresh authentication token. @param string $tenantKey Tenant key to which refresh token is set @param string $refreshToken Refresh authenication token
[ "Set", "the", "refresh", "authentication", "token", "." ]
6935f51b4d3dbd0923aed746620955fd63789549
https://github.com/patrickisgreat/da-php-fuel-sdk/blob/6935f51b4d3dbd0923aed746620955fd63789549/src/ET_Client.php#L533-L539
199,745
patrickisgreat/da-php-fuel-sdk
src/ET_Client.php
ET_Client.getRefreshToken
public function getRefreshToken($tenantKey) { $tenantKey = $tenantKey == null ? $this->tenantKey : $tenantKey; if ($this->tenantTokens[$tenantKey] == null) { $this->tenantTokens[$tenantKey] = array(); } return isset($this->tenantTokens[$tenantKey]['refreshToken']) ...
php
public function getRefreshToken($tenantKey) { $tenantKey = $tenantKey == null ? $this->tenantKey : $tenantKey; if ($this->tenantTokens[$tenantKey] == null) { $this->tenantTokens[$tenantKey] = array(); } return isset($this->tenantTokens[$tenantKey]['refreshToken']) ...
[ "public", "function", "getRefreshToken", "(", "$", "tenantKey", ")", "{", "$", "tenantKey", "=", "$", "tenantKey", "==", "null", "?", "$", "this", "->", "tenantKey", ":", "$", "tenantKey", ";", "if", "(", "$", "this", "->", "tenantTokens", "[", "$", "t...
Get the refresh token for the tenant. @param string $tenantKey @return string Refresh token for the tenant
[ "Get", "the", "refresh", "token", "for", "the", "tenant", "." ]
6935f51b4d3dbd0923aed746620955fd63789549
https://github.com/patrickisgreat/da-php-fuel-sdk/blob/6935f51b4d3dbd0923aed746620955fd63789549/src/ET_Client.php#L547-L556
199,746
patrickisgreat/da-php-fuel-sdk
src/ET_Client.php
ET_Client.AddSubscriberToList
public function AddSubscriberToList($emailAddress, $listIDs, $subscriberKey = null) { $newSub = new ET_Subscriber; $newSub->authStub = $this; $lists = array(); foreach ($listIDs as $key => $value) { $lists[] = array("ID" => $value); } //if (is_string($em...
php
public function AddSubscriberToList($emailAddress, $listIDs, $subscriberKey = null) { $newSub = new ET_Subscriber; $newSub->authStub = $this; $lists = array(); foreach ($listIDs as $key => $value) { $lists[] = array("ID" => $value); } //if (is_string($em...
[ "public", "function", "AddSubscriberToList", "(", "$", "emailAddress", ",", "$", "listIDs", ",", "$", "subscriberKey", "=", "null", ")", "{", "$", "newSub", "=", "new", "ET_Subscriber", ";", "$", "newSub", "->", "authStub", "=", "$", "this", ";", "$", "l...
Add subscriber to list. @param string $emailAddress Email address of the subscriber @param array $listIDs Array of list id to which the subscriber is added @param string $subscriberKey Newly added subscriber key @return mixed post or patch response object. If the subscriber already existing patch response is returned ...
[ "Add", "subscriber", "to", "list", "." ]
6935f51b4d3dbd0923aed746620955fd63789549
https://github.com/patrickisgreat/da-php-fuel-sdk/blob/6935f51b4d3dbd0923aed746620955fd63789549/src/ET_Client.php#L566-L593
199,747
patrickisgreat/da-php-fuel-sdk
src/ET_Client.php
ET_Client.CreateDataExtensions
public function CreateDataExtensions($dataExtensionDefinitions) { $newDEs = new ET_DataExtension(); $newDEs->authStub = $this; $newDEs->props = $dataExtensionDefinitions; $postResponse = $newDEs->post(); return $postResponse; }
php
public function CreateDataExtensions($dataExtensionDefinitions) { $newDEs = new ET_DataExtension(); $newDEs->authStub = $this; $newDEs->props = $dataExtensionDefinitions; $postResponse = $newDEs->post(); return $postResponse; }
[ "public", "function", "CreateDataExtensions", "(", "$", "dataExtensionDefinitions", ")", "{", "$", "newDEs", "=", "new", "ET_DataExtension", "(", ")", ";", "$", "newDEs", "->", "authStub", "=", "$", "this", ";", "$", "newDEs", "->", "props", "=", "$", "dat...
Create a new data extension based on the definition passed @param array $dataExtensionDefinitions Data extension definition properties as an array @return mixed post response object
[ "Create", "a", "new", "data", "extension", "based", "on", "the", "definition", "passed" ]
6935f51b4d3dbd0923aed746620955fd63789549
https://github.com/patrickisgreat/da-php-fuel-sdk/blob/6935f51b4d3dbd0923aed746620955fd63789549/src/ET_Client.php#L623-L631
199,748
patrickisgreat/da-php-fuel-sdk
src/ET_Client.php
ET_Client.SendTriggeredSends
public function SendTriggeredSends($arrayOfTriggeredRecords) { $sendTS = new ET_TriggeredSend(); $sendTS->authStub = $this; $sendTS->props = $arrayOfTriggeredRecords; $sendResponse = $sendTS->send(); return $sendResponse; }
php
public function SendTriggeredSends($arrayOfTriggeredRecords) { $sendTS = new ET_TriggeredSend(); $sendTS->authStub = $this; $sendTS->props = $arrayOfTriggeredRecords; $sendResponse = $sendTS->send(); return $sendResponse; }
[ "public", "function", "SendTriggeredSends", "(", "$", "arrayOfTriggeredRecords", ")", "{", "$", "sendTS", "=", "new", "ET_TriggeredSend", "(", ")", ";", "$", "sendTS", "->", "authStub", "=", "$", "this", ";", "$", "sendTS", "->", "props", "=", "$", "arrayO...
Starts an send operation for the TriggerredSend records @param array $arrayOfTriggeredRecords Array of TriggeredSend records @return mixed Send reponse object
[ "Starts", "an", "send", "operation", "for", "the", "TriggerredSend", "records" ]
6935f51b4d3dbd0923aed746620955fd63789549
https://github.com/patrickisgreat/da-php-fuel-sdk/blob/6935f51b4d3dbd0923aed746620955fd63789549/src/ET_Client.php#L638-L645
199,749
patrickisgreat/da-php-fuel-sdk
src/ET_Client.php
ET_Client.SendEmailToDataExtension
public function SendEmailToDataExtension($emailID, $sendableDataExtensionCustomerKey, $sendClassficationCustomerKey) { $email = new ET_Email_SendDefinition(); $email->props = array("Name"=>uniqid(), "CustomerKey"=>uniqid(), "Description"=>"Created with FuelSDK"); $email->props["SendClassific...
php
public function SendEmailToDataExtension($emailID, $sendableDataExtensionCustomerKey, $sendClassficationCustomerKey) { $email = new ET_Email_SendDefinition(); $email->props = array("Name"=>uniqid(), "CustomerKey"=>uniqid(), "Description"=>"Created with FuelSDK"); $email->props["SendClassific...
[ "public", "function", "SendEmailToDataExtension", "(", "$", "emailID", ",", "$", "sendableDataExtensionCustomerKey", ",", "$", "sendClassficationCustomerKey", ")", "{", "$", "email", "=", "new", "ET_Email_SendDefinition", "(", ")", ";", "$", "email", "->", "props", ...
Create an email send definition, send the email based on the definition and delete the definition. @param string $emailID Email identifier for which the email is sent @param string $sendableDataExtensionCustomerKey Sendable data extension customer key @param string $sendClassficationCustomerKey Send classification cus...
[ "Create", "an", "email", "send", "definition", "send", "the", "email", "based", "on", "the", "definition", "and", "delete", "the", "definition", "." ]
6935f51b4d3dbd0923aed746620955fd63789549
https://github.com/patrickisgreat/da-php-fuel-sdk/blob/6935f51b4d3dbd0923aed746620955fd63789549/src/ET_Client.php#L684-L704
199,750
patrickisgreat/da-php-fuel-sdk
src/ET_Client.php
ET_Client.CreateProfileAttributes
public function CreateProfileAttributes($allAttributes) { $attrs = new ET_ProfileAttribute(); $attrs->authStub = $this; $attrs->props = $allAttributes; return $attrs->post(); }
php
public function CreateProfileAttributes($allAttributes) { $attrs = new ET_ProfileAttribute(); $attrs->authStub = $this; $attrs->props = $allAttributes; return $attrs->post(); }
[ "public", "function", "CreateProfileAttributes", "(", "$", "allAttributes", ")", "{", "$", "attrs", "=", "new", "ET_ProfileAttribute", "(", ")", ";", "$", "attrs", "->", "authStub", "=", "$", "this", ";", "$", "attrs", "->", "props", "=", "$", "allAttribut...
Create a profile attribute @param array $allAttributes Profile attribute properties as an array. @return mixed Post operation result
[ "Create", "a", "profile", "attribute" ]
6935f51b4d3dbd0923aed746620955fd63789549
https://github.com/patrickisgreat/da-php-fuel-sdk/blob/6935f51b4d3dbd0923aed746620955fd63789549/src/ET_Client.php#L775-L781
199,751
patrickisgreat/da-php-fuel-sdk
src/ET_Client.php
ET_Client.CreateContentAreas
public function CreateContentAreas($arrayOfContentAreas) { $postC = new ET_ContentArea(); $postC->authStub = $this; $postC->props = $arrayOfContentAreas; $sendResponse = $postC->post(); return $sendResponse; }
php
public function CreateContentAreas($arrayOfContentAreas) { $postC = new ET_ContentArea(); $postC->authStub = $this; $postC->props = $arrayOfContentAreas; $sendResponse = $postC->post(); return $sendResponse; }
[ "public", "function", "CreateContentAreas", "(", "$", "arrayOfContentAreas", ")", "{", "$", "postC", "=", "new", "ET_ContentArea", "(", ")", ";", "$", "postC", "->", "authStub", "=", "$", "this", ";", "$", "postC", "->", "props", "=", "$", "arrayOfContentA...
Create one or more content areas @param array $arrayOfContentAreas Content areas properties as an array @return void
[ "Create", "one", "or", "more", "content", "areas" ]
6935f51b4d3dbd0923aed746620955fd63789549
https://github.com/patrickisgreat/da-php-fuel-sdk/blob/6935f51b4d3dbd0923aed746620955fd63789549/src/ET_Client.php#L788-L795
199,752
SagittariusX/Beluga.IO
src/Beluga/IO/Folder.php
Folder.Create
public static function Create( string $folder, int $mode = 0700 ) { if ( \is_dir( $folder ) ) { // No folder = do nothing return; } if ( ! static::CanCreate( $folder ) ) { // No rights to create the required folder throw new FolderAccessError( ...
php
public static function Create( string $folder, int $mode = 0700 ) { if ( \is_dir( $folder ) ) { // No folder = do nothing return; } if ( ! static::CanCreate( $folder ) ) { // No rights to create the required folder throw new FolderAccessError( ...
[ "public", "static", "function", "Create", "(", "string", "$", "folder", ",", "int", "$", "mode", "=", "0700", ")", "{", "if", "(", "\\", "is_dir", "(", "$", "folder", ")", ")", "{", "// No folder = do nothing", "return", ";", "}", "if", "(", "!", "st...
Creates a new folder with defined mode. The mode only works on unixoid systems. @param string $folder The folder to create. @param integer $mode Mode for new folder (0700) only used for unixoide systems @throws \Beluga\IO\FolderAccessError If creation fails
[ "Creates", "a", "new", "folder", "with", "defined", "mode", ".", "The", "mode", "only", "works", "on", "unixoid", "systems", "." ]
c8af09a1b3cc8a955e43c89b70779d11b30ae29e
https://github.com/SagittariusX/Beluga.IO/blob/c8af09a1b3cc8a955e43c89b70779d11b30ae29e/src/Beluga/IO/Folder.php#L136-L195
199,753
SagittariusX/Beluga.IO
src/Beluga/IO/Folder.php
Folder.ListFilteredFiles
public static function ListFilteredFiles( string $folder, $filter, bool $recursive = false ) : array { // Init the array that should contain the resulting file paths $files = array(); if ( ! \is_dir( $folder ) ) { // No folder = we are done here return $files; } ...
php
public static function ListFilteredFiles( string $folder, $filter, bool $recursive = false ) : array { // Init the array that should contain the resulting file paths $files = array(); if ( ! \is_dir( $folder ) ) { // No folder = we are done here return $files; } ...
[ "public", "static", "function", "ListFilteredFiles", "(", "string", "$", "folder", ",", "$", "filter", ",", "bool", "$", "recursive", "=", "false", ")", ":", "array", "{", "// Init the array that should contain the resulting file paths", "$", "files", "=", "array", ...
Returns all files, matching the defined filter. If $recursive is TRUE, it also includes al sub folders. If the filter is a callback function/method, so it must accept 2 parameters. - string $itemName The name of the current filter item - string $itemPath THe absolute path of the item. @param string $folde...
[ "Returns", "all", "files", "matching", "the", "defined", "filter", "." ]
c8af09a1b3cc8a955e43c89b70779d11b30ae29e
https://github.com/SagittariusX/Beluga.IO/blob/c8af09a1b3cc8a955e43c89b70779d11b30ae29e/src/Beluga/IO/Folder.php#L323-L378
199,754
shgysk8zer0/core_api
traits/arraymethods.php
ArrayMethods.slice
final public function slice($offset, $length = null, $preserve_keys = false) { $arr = array_unshift($this->{self::MAGIC_PROPERTY}, $offset, $length, $preserve_keys); return static::createFromArray($arr); }
php
final public function slice($offset, $length = null, $preserve_keys = false) { $arr = array_unshift($this->{self::MAGIC_PROPERTY}, $offset, $length, $preserve_keys); return static::createFromArray($arr); }
[ "final", "public", "function", "slice", "(", "$", "offset", ",", "$", "length", "=", "null", ",", "$", "preserve_keys", "=", "false", ")", "{", "$", "arr", "=", "array_unshift", "(", "$", "this", "->", "{", "self", "::", "MAGIC_PROPERTY", "}", ",", "...
Extract a slice of the array @param int $offset Starting position in the array @param int $length Number of items to include, starting from $offset @param bool $preserve_keys Prevent override of indices @return [type] Returns the slice. @see https://secure.php.net/manual/en/funct...
[ "Extract", "a", "slice", "of", "the", "array" ]
9e9b8baf761af874b95256ad2462e55fbb2b2e58
https://github.com/shgysk8zer0/core_api/blob/9e9b8baf761af874b95256ad2462e55fbb2b2e58/traits/arraymethods.php#L110-L114
199,755
shgysk8zer0/core_api
traits/arraymethods.php
ArrayMethods.chunk
final public function chunk($size, $preserve_keys = false) { $arr = array_chunk($this->{self::MAGIC_PROPERTY}, $size, $preserve_keys); return static::createFromArray($arr); }
php
final public function chunk($size, $preserve_keys = false) { $arr = array_chunk($this->{self::MAGIC_PROPERTY}, $size, $preserve_keys); return static::createFromArray($arr); }
[ "final", "public", "function", "chunk", "(", "$", "size", ",", "$", "preserve_keys", "=", "false", ")", "{", "$", "arr", "=", "array_chunk", "(", "$", "this", "->", "{", "self", "::", "MAGIC_PROPERTY", "}", ",", "$", "size", ",", "$", "preserve_keys", ...
Split an array into chunks @param int $size The size of each chunk @param bool $preserve_keys Whether or not to preserve array keys @return [type] Multidimensional numerically indexed array of size $size @see https://secure.php.net/manual/en/function.array-chunk.php
[ "Split", "an", "array", "into", "chunks" ]
9e9b8baf761af874b95256ad2462e55fbb2b2e58
https://github.com/shgysk8zer0/core_api/blob/9e9b8baf761af874b95256ad2462e55fbb2b2e58/traits/arraymethods.php#L137-L141
199,756
shgysk8zer0/core_api
traits/arraymethods.php
ArrayMethods.search
final public function search($needle, $strict = false) { return array_search($needle, $this->{self::MAGIC_PROPERTY}, $strict); }
php
final public function search($needle, $strict = false) { return array_search($needle, $this->{self::MAGIC_PROPERTY}, $strict); }
[ "final", "public", "function", "search", "(", "$", "needle", ",", "$", "strict", "=", "false", ")", "{", "return", "array_search", "(", "$", "needle", ",", "$", "this", "->", "{", "self", "::", "MAGIC_PROPERTY", "}", ",", "$", "strict", ")", ";", "}"...
Searches the array for a given value and returns the corresponding key if successful @param mixed $needle [description] @param bool $strict [description] @return mixed Returns the key for needle if it is found in the array, FALSE otherwise. @see https://secure.php.net/manual/en/function.array-search.php
[ "Searches", "the", "array", "for", "a", "given", "value", "and", "returns", "the", "corresponding", "key", "if", "successful" ]
9e9b8baf761af874b95256ad2462e55fbb2b2e58
https://github.com/shgysk8zer0/core_api/blob/9e9b8baf761af874b95256ad2462e55fbb2b2e58/traits/arraymethods.php#L158-L161
199,757
shgysk8zer0/core_api
traits/arraymethods.php
ArrayMethods.keys
final public function keys($search_value = null, $strict = false) { if (isset($search_value)) { return static::createFromArray(array_keys($this->{self::MAGIC_PROPERTY}, $search_value, $strict)); } else { return static::createFromArray(array_keys($this->{self::MAGIC_PROPERTY})); } }
php
final public function keys($search_value = null, $strict = false) { if (isset($search_value)) { return static::createFromArray(array_keys($this->{self::MAGIC_PROPERTY}, $search_value, $strict)); } else { return static::createFromArray(array_keys($this->{self::MAGIC_PROPERTY})); } }
[ "final", "public", "function", "keys", "(", "$", "search_value", "=", "null", ",", "$", "strict", "=", "false", ")", "{", "if", "(", "isset", "(", "$", "search_value", ")", ")", "{", "return", "static", "::", "createFromArray", "(", "array_keys", "(", ...
Return all the keys or a subset of the keys of an array @param mixed $search_value If specified, then only keys containing these values are returned. @param bool $strict Determines if strict comparison (===) should be used during the search. @return array Returns an array of all the keys in ar...
[ "Return", "all", "the", "keys", "or", "a", "subset", "of", "the", "keys", "of", "an", "array" ]
9e9b8baf761af874b95256ad2462e55fbb2b2e58
https://github.com/shgysk8zer0/core_api/blob/9e9b8baf761af874b95256ad2462e55fbb2b2e58/traits/arraymethods.php#L179-L186
199,758
shgysk8zer0/core_api
traits/arraymethods.php
ArrayMethods.replace
final public function replace() { $args = func_get_args(); array_unshift($this->{self::MAGIC_PROPERTY}, $args); $arr = call_user_func_array('array_replace', $args); return static::createFromArray($arr); }
php
final public function replace() { $args = func_get_args(); array_unshift($this->{self::MAGIC_PROPERTY}, $args); $arr = call_user_func_array('array_replace', $args); return static::createFromArray($arr); }
[ "final", "public", "function", "replace", "(", ")", "{", "$", "args", "=", "func_get_args", "(", ")", ";", "array_unshift", "(", "$", "this", "->", "{", "self", "::", "MAGIC_PROPERTY", "}", ",", "$", "args", ")", ";", "$", "arr", "=", "call_user_func_a...
Replaces elements from passed arrays into the first array @param array ... Arrays with values to be extracted @return [type] Returns an array, or NULL if an error occurs. @see https://secure.php.net/manual/en/function.array-replace.php
[ "Replaces", "elements", "from", "passed", "arrays", "into", "the", "first", "array" ]
9e9b8baf761af874b95256ad2462e55fbb2b2e58
https://github.com/shgysk8zer0/core_api/blob/9e9b8baf761af874b95256ad2462e55fbb2b2e58/traits/arraymethods.php#L217-L223
199,759
shgysk8zer0/core_api
traits/arraymethods.php
ArrayMethods.pad
final public function pad($size, $value) { return static::createFromArray(array_pad($this->{self::MAGIC_PROPERTY}, $size, $value)); }
php
final public function pad($size, $value) { return static::createFromArray(array_pad($this->{self::MAGIC_PROPERTY}, $size, $value)); }
[ "final", "public", "function", "pad", "(", "$", "size", ",", "$", "value", ")", "{", "return", "static", "::", "createFromArray", "(", "array_pad", "(", "$", "this", "->", "{", "self", "::", "MAGIC_PROPERTY", "}", ",", "$", "size", ",", "$", "value", ...
Pad array to the specified length with a value @param int $size New size of the array. @param mixed $value Value to pad if array is less than size. @return [type] Copy of the array padded to size specified by size with value value.
[ "Pad", "array", "to", "the", "specified", "length", "with", "a", "value" ]
9e9b8baf761af874b95256ad2462e55fbb2b2e58
https://github.com/shgysk8zer0/core_api/blob/9e9b8baf761af874b95256ad2462e55fbb2b2e58/traits/arraymethods.php#L231-L234
199,760
shgysk8zer0/core_api
traits/arraymethods.php
ArrayMethods.multisort
final public function multisort( $array1_sort_order = SORT_ASC, $array1_sort_flags = SORT_REGULAR ) { return array_multisort($this->{self::MAGIC_PROPERTY}, $array1_sort_order, $array1_sort_flags); }
php
final public function multisort( $array1_sort_order = SORT_ASC, $array1_sort_flags = SORT_REGULAR ) { return array_multisort($this->{self::MAGIC_PROPERTY}, $array1_sort_order, $array1_sort_flags); }
[ "final", "public", "function", "multisort", "(", "$", "array1_sort_order", "=", "SORT_ASC", ",", "$", "array1_sort_flags", "=", "SORT_REGULAR", ")", "{", "return", "array_multisort", "(", "$", "this", "->", "{", "self", "::", "MAGIC_PROPERTY", "}", ",", "$", ...
Sort multiple or multi-dimensional arrays @param mixed $array1_sort_order SORT_ASC or SORT_DESC @param mixed $array1_sort_flags Sorting type flags @return [type] Returns TRUE on success or FALSE on failure. @see https://secure.php.net/manual/en/function.array-multisort.php
[ "Sort", "multiple", "or", "multi", "-", "dimensional", "arrays" ]
9e9b8baf761af874b95256ad2462e55fbb2b2e58
https://github.com/shgysk8zer0/core_api/blob/9e9b8baf761af874b95256ad2462e55fbb2b2e58/traits/arraymethods.php#L255-L261
199,761
shgysk8zer0/core_api
traits/arraymethods.php
ArrayMethods.unique
final public function unique($sort_flags = SORT_STRING) { $arr = array_unique($this->{self::MAGIC_PROPERTY}, $sort_flags); return static::createFromArray($arr); }
php
final public function unique($sort_flags = SORT_STRING) { $arr = array_unique($this->{self::MAGIC_PROPERTY}, $sort_flags); return static::createFromArray($arr); }
[ "final", "public", "function", "unique", "(", "$", "sort_flags", "=", "SORT_STRING", ")", "{", "$", "arr", "=", "array_unique", "(", "$", "this", "->", "{", "self", "::", "MAGIC_PROPERTY", "}", ",", "$", "sort_flags", ")", ";", "return", "static", "::", ...
Removes duplicate values from an array @param int $sort_flags May be used to modify the sorting behavior @return [type] Returns the filtered array. @see https://secure.php.net/manual/en/function.array-unique.php
[ "Removes", "duplicate", "values", "from", "an", "array" ]
9e9b8baf761af874b95256ad2462e55fbb2b2e58
https://github.com/shgysk8zer0/core_api/blob/9e9b8baf761af874b95256ad2462e55fbb2b2e58/traits/arraymethods.php#L269-L273
199,762
shgysk8zer0/core_api
traits/arraymethods.php
ArrayMethods.map
final public function map(Callable $callback) { $arr = array_map( $callback, array_values($this->{self::MAGIC_PROPERTY}), array_keys($this->{self::MAGIC_PROPERTY}) ); return static::createFromArray($arr); }
php
final public function map(Callable $callback) { $arr = array_map( $callback, array_values($this->{self::MAGIC_PROPERTY}), array_keys($this->{self::MAGIC_PROPERTY}) ); return static::createFromArray($arr); }
[ "final", "public", "function", "map", "(", "Callable", "$", "callback", ")", "{", "$", "arr", "=", "array_map", "(", "$", "callback", ",", "array_values", "(", "$", "this", "->", "{", "self", "::", "MAGIC_PROPERTY", "}", ")", ",", "array_keys", "(", "$...
Applies the callback to the elements of the array @param Callable $callback Callback function to run for each element in the array. @return self An array containing elements from current array with callback applied
[ "Applies", "the", "callback", "to", "the", "elements", "of", "the", "array" ]
9e9b8baf761af874b95256ad2462e55fbb2b2e58
https://github.com/shgysk8zer0/core_api/blob/9e9b8baf761af874b95256ad2462e55fbb2b2e58/traits/arraymethods.php#L312-L320
199,763
shgysk8zer0/core_api
traits/arraymethods.php
ArrayMethods.walk
final public function walk(Callable $callback, $userdata = null) { array_walk($this->{self::MAGIC_PROPERTY}, $callback); return $this; }
php
final public function walk(Callable $callback, $userdata = null) { array_walk($this->{self::MAGIC_PROPERTY}, $callback); return $this; }
[ "final", "public", "function", "walk", "(", "Callable", "$", "callback", ",", "$", "userdata", "=", "null", ")", "{", "array_walk", "(", "$", "this", "->", "{", "self", "::", "MAGIC_PROPERTY", "}", ",", "$", "callback", ")", ";", "return", "$", "this",...
Apply a user supplied function to every member of an array @param Callable $callback Typically, callback takes on two parameters. ($value, $index) @param mixed $userdata Optional third paramater for third paramater of $callback @return self
[ "Apply", "a", "user", "supplied", "function", "to", "every", "member", "of", "an", "array" ]
9e9b8baf761af874b95256ad2462e55fbb2b2e58
https://github.com/shgysk8zer0/core_api/blob/9e9b8baf761af874b95256ad2462e55fbb2b2e58/traits/arraymethods.php#L328-L332
199,764
shgysk8zer0/core_api
traits/arraymethods.php
ArrayMethods.filter
final public function filter(Callable $callback, $flags = 0) { $arr = array_filter($this->{self::MAGIC_PROPERTY}, $callback); return static::createFromArray($arr); }
php
final public function filter(Callable $callback, $flags = 0) { $arr = array_filter($this->{self::MAGIC_PROPERTY}, $callback); return static::createFromArray($arr); }
[ "final", "public", "function", "filter", "(", "Callable", "$", "callback", ",", "$", "flags", "=", "0", ")", "{", "$", "arr", "=", "array_filter", "(", "$", "this", "->", "{", "self", "::", "MAGIC_PROPERTY", "}", ",", "$", "callback", ")", ";", "retu...
Filters elements of an array using a callback function @param Callable $callback The callback function to use @param int $flags Flag determining what arguments are sent to callback @return array Returns the filtered array. @see https://secure.php.net/manual/en/function.array-filter.php
[ "Filters", "elements", "of", "an", "array", "using", "a", "callback", "function" ]
9e9b8baf761af874b95256ad2462e55fbb2b2e58
https://github.com/shgysk8zer0/core_api/blob/9e9b8baf761af874b95256ad2462e55fbb2b2e58/traits/arraymethods.php#L341-L345
199,765
shgysk8zer0/core_api
traits/arraymethods.php
ArrayMethods.reduce
final public function reduce(Callable $callback, $initial = null) { $result = array_reduce($this->{self::MAGIC_PROPERTY}, $callback, $initial); return static::from($result); }
php
final public function reduce(Callable $callback, $initial = null) { $result = array_reduce($this->{self::MAGIC_PROPERTY}, $callback, $initial); return static::from($result); }
[ "final", "public", "function", "reduce", "(", "Callable", "$", "callback", ",", "$", "initial", "=", "null", ")", "{", "$", "result", "=", "array_reduce", "(", "$", "this", "->", "{", "self", "::", "MAGIC_PROPERTY", "}", ",", "$", "callback", ",", "$",...
Iteratively reduce the array to a single value using a callback function @param Callable $callback mixed callback ( mixed $carry , mixed $item ) @param mixed $initial Optional intitial value of $carry in $callback @return mixed Returns the resulting value.
[ "Iteratively", "reduce", "the", "array", "to", "a", "single", "value", "using", "a", "callback", "function" ]
9e9b8baf761af874b95256ad2462e55fbb2b2e58
https://github.com/shgysk8zer0/core_api/blob/9e9b8baf761af874b95256ad2462e55fbb2b2e58/traits/arraymethods.php#L353-L358
199,766
gplcart/cli
controllers/commands/Payment.php
Payment.cmdGetPayment
public function cmdGetPayment() { $result = $this->getListPayment(); $this->outputFormat($result); $this->outputFormatTablePayment($result); $this->output(); }
php
public function cmdGetPayment() { $result = $this->getListPayment(); $this->outputFormat($result); $this->outputFormatTablePayment($result); $this->output(); }
[ "public", "function", "cmdGetPayment", "(", ")", "{", "$", "result", "=", "$", "this", "->", "getListPayment", "(", ")", ";", "$", "this", "->", "outputFormat", "(", "$", "result", ")", ";", "$", "this", "->", "outputFormatTablePayment", "(", "$", "resul...
Callback for "payment-get" command
[ "Callback", "for", "payment", "-", "get", "command" ]
e57dba53e291a225b4bff0c0d9b23d685dd1c125
https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/Payment.php#L40-L46
199,767
DreadLabs/VantomasWebsite
src/Disqus/Response/AbstractResponse.php
AbstractResponse.getErrorCode
protected function getErrorCode() { $content = $this->content; return is_object($content) && property_exists($content, 'code') ? (integer) $content->code : 0; }
php
protected function getErrorCode() { $content = $this->content; return is_object($content) && property_exists($content, 'code') ? (integer) $content->code : 0; }
[ "protected", "function", "getErrorCode", "(", ")", "{", "$", "content", "=", "$", "this", "->", "content", ";", "return", "is_object", "(", "$", "content", ")", "&&", "property_exists", "(", "$", "content", ",", "'code'", ")", "?", "(", "integer", ")", ...
returns the response error code @return int
[ "returns", "the", "response", "error", "code" ]
7f85f2b45bdf5ed9fa9d320c805c416bf99cd668
https://github.com/DreadLabs/VantomasWebsite/blob/7f85f2b45bdf5ed9fa9d320c805c416bf99cd668/src/Disqus/Response/AbstractResponse.php#L81-L85
199,768
SlabPHP/cache-manager
src/Providers/Memcache.php
Memcache.flush
public function flush() { if (empty($this->memcache)) { return false; } $flushStatus = $this->memcache->flush(); return $flushStatus; }
php
public function flush() { if (empty($this->memcache)) { return false; } $flushStatus = $this->memcache->flush(); return $flushStatus; }
[ "public", "function", "flush", "(", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "memcache", ")", ")", "{", "return", "false", ";", "}", "$", "flushStatus", "=", "$", "this", "->", "memcache", "->", "flush", "(", ")", ";", "return", "$", ...
Flush the server @return boolean
[ "Flush", "the", "server" ]
7bbf9fe6519071fe14d382e98925cd3e10010a3a
https://github.com/SlabPHP/cache-manager/blob/7bbf9fe6519071fe14d382e98925cd3e10010a3a/src/Providers/Memcache.php#L113-L122
199,769
dms-org/common.structure
src/FileSystem/File.php
File.createTemporary
public static function createTemporary(string $data, string $clientFileName = null) : File { $tempFilePath = tempnam(sys_get_temp_dir(), 'dms'); file_put_contents($tempFilePath, $data); return new self($tempFilePath, $clientFileName); }
php
public static function createTemporary(string $data, string $clientFileName = null) : File { $tempFilePath = tempnam(sys_get_temp_dir(), 'dms'); file_put_contents($tempFilePath, $data); return new self($tempFilePath, $clientFileName); }
[ "public", "static", "function", "createTemporary", "(", "string", "$", "data", ",", "string", "$", "clientFileName", "=", "null", ")", ":", "File", "{", "$", "tempFilePath", "=", "tempnam", "(", "sys_get_temp_dir", "(", ")", ",", "'dms'", ")", ";", "file_p...
Create a temporary temporary file. @param string $data @param string|null $clientFileName @return File
[ "Create", "a", "temporary", "temporary", "file", "." ]
23f122182f60df5ec847047a81a39c8aab019ff1
https://github.com/dms-org/common.structure/blob/23f122182f60df5ec847047a81a39c8aab019ff1/src/FileSystem/File.php#L76-L82
199,770
koolkode/stream
src/ChunkDecodedOutputStream.php
ChunkDecodedOutputStream.readChunkHeader
protected function readChunkHeader() { static $m = NULL; if(preg_match("'([a-fA-F0-9]+).*\r\n'", $this->buffer, $m)) { $this->remainder = hexdec($m[1]); $this->buffer = (string)substr($this->buffer, strlen($m[0])); } else { $this->remainder = 0; } }
php
protected function readChunkHeader() { static $m = NULL; if(preg_match("'([a-fA-F0-9]+).*\r\n'", $this->buffer, $m)) { $this->remainder = hexdec($m[1]); $this->buffer = (string)substr($this->buffer, strlen($m[0])); } else { $this->remainder = 0; } }
[ "protected", "function", "readChunkHeader", "(", ")", "{", "static", "$", "m", "=", "NULL", ";", "if", "(", "preg_match", "(", "\"'([a-fA-F0-9]+).*\\r\\n'\"", ",", "$", "this", "->", "buffer", ",", "$", "m", ")", ")", "{", "$", "this", "->", "remainder",...
Compute number of remaining bytes using chunk header
[ "Compute", "number", "of", "remaining", "bytes", "using", "chunk", "header" ]
05e83efd76e1cb9e40a972711986b4a7e38bc141
https://github.com/koolkode/stream/blob/05e83efd76e1cb9e40a972711986b4a7e38bc141/src/ChunkDecodedOutputStream.php#L87-L100
199,771
agentmedia/phine-core
src/Core/Modules/Backend/JsonAreaList.php
JsonAreaList.BeforeDelete
protected function BeforeDelete() { foreach (self::$deleteHooks as $hook) { $hook->BeforeDelete($this->item); } $logger = new Logger(BackendModule::Guard()->GetUser()); $logger->ReportAreaAction($this->item, Action::Delete()); }
php
protected function BeforeDelete() { foreach (self::$deleteHooks as $hook) { $hook->BeforeDelete($this->item); } $logger = new Logger(BackendModule::Guard()->GetUser()); $logger->ReportAreaAction($this->item, Action::Delete()); }
[ "protected", "function", "BeforeDelete", "(", ")", "{", "foreach", "(", "self", "::", "$", "deleteHooks", "as", "$", "hook", ")", "{", "$", "hook", "->", "BeforeDelete", "(", "$", "this", "->", "item", ")", ";", "}", "$", "logger", "=", "new", "Logge...
Execute delete hooks
[ "Execute", "delete", "hooks" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Modules/Backend/JsonAreaList.php#L45-L53
199,772
wobblecode/WobbleCodeUserBundle
OAuth/OAuthMapper.php
OAuthMapper.normalizeData
public function normalizeData(PathUserResponse $response) { $return = $response->getResponse(); $provider = $response->getResourceOwner()->getName(); $token = $response->getAccessToken(); switch ($provider) { case 'google': $data = $this->normalizeGo...
php
public function normalizeData(PathUserResponse $response) { $return = $response->getResponse(); $provider = $response->getResourceOwner()->getName(); $token = $response->getAccessToken(); switch ($provider) { case 'google': $data = $this->normalizeGo...
[ "public", "function", "normalizeData", "(", "PathUserResponse", "$", "response", ")", "{", "$", "return", "=", "$", "response", "->", "getResponse", "(", ")", ";", "$", "provider", "=", "$", "response", "->", "getResourceOwner", "(", ")", "->", "getName", ...
Get oAuth data and normalize it to same var names @param HttpMessageInterface $response oAuth response @return array with normalized data
[ "Get", "oAuth", "data", "and", "normalize", "it", "to", "same", "var", "names" ]
7b8206f8b4a50fbc61f7bfe4f83eb466cad96440
https://github.com/wobblecode/WobbleCodeUserBundle/blob/7b8206f8b4a50fbc61f7bfe4f83eb466cad96440/OAuth/OAuthMapper.php#L72-L96
199,773
wobblecode/WobbleCodeUserBundle
OAuth/OAuthMapper.php
OAuthMapper.normalizeGoogle
public function normalizeGoogle($return) { $genders = [ 'male' => 'M', 'female' => 'F' ]; $data = [ 'id' => $return['id'], 'name' => $this->ensureUtf8($return['name']), 'firstName' => $this->ensureUtf8($re...
php
public function normalizeGoogle($return) { $genders = [ 'male' => 'M', 'female' => 'F' ]; $data = [ 'id' => $return['id'], 'name' => $this->ensureUtf8($return['name']), 'firstName' => $this->ensureUtf8($re...
[ "public", "function", "normalizeGoogle", "(", "$", "return", ")", "{", "$", "genders", "=", "[", "'male'", "=>", "'M'", ",", "'female'", "=>", "'F'", "]", ";", "$", "data", "=", "[", "'id'", "=>", "$", "return", "[", "'id'", "]", ",", "'name'", "=>...
Mapping data from Google @param Reponse $response @return array contains normalized user data
[ "Mapping", "data", "from", "Google" ]
7b8206f8b4a50fbc61f7bfe4f83eb466cad96440
https://github.com/wobblecode/WobbleCodeUserBundle/blob/7b8206f8b4a50fbc61f7bfe4f83eb466cad96440/OAuth/OAuthMapper.php#L105-L148
199,774
wobblecode/WobbleCodeUserBundle
OAuth/OAuthMapper.php
OAuthMapper.normalizeFacebook
public function normalizeFacebook($return) { $genders = [ 'male' => 'M', 'female' => 'F' ]; $data = [ 'id' => $return['id'], 'name' => $return['name'], 'firstName' => $return['first_name'...
php
public function normalizeFacebook($return) { $genders = [ 'male' => 'M', 'female' => 'F' ]; $data = [ 'id' => $return['id'], 'name' => $return['name'], 'firstName' => $return['first_name'...
[ "public", "function", "normalizeFacebook", "(", "$", "return", ")", "{", "$", "genders", "=", "[", "'male'", "=>", "'M'", ",", "'female'", "=>", "'F'", "]", ";", "$", "data", "=", "[", "'id'", "=>", "$", "return", "[", "'id'", "]", ",", "'name'", "...
Mapping data from facbook @todo replace Buzz with Guzzle @param Reponse $response @return array contains normalized user data
[ "Mapping", "data", "from", "facbook" ]
7b8206f8b4a50fbc61f7bfe4f83eb466cad96440
https://github.com/wobblecode/WobbleCodeUserBundle/blob/7b8206f8b4a50fbc61f7bfe4f83eb466cad96440/OAuth/OAuthMapper.php#L159-L200
199,775
wobblecode/WobbleCodeUserBundle
OAuth/OAuthMapper.php
OAuthMapper.normalizeGithub
public function normalizeGithub($return, $token) { $data = [ 'id' => $return['id'], 'username' => $return['login'], 'name' => $return['name'], 'email' => $return['email'], 'gravatar' => $ret...
php
public function normalizeGithub($return, $token) { $data = [ 'id' => $return['id'], 'username' => $return['login'], 'name' => $return['name'], 'email' => $return['email'], 'gravatar' => $ret...
[ "public", "function", "normalizeGithub", "(", "$", "return", ",", "$", "token", ")", "{", "$", "data", "=", "[", "'id'", "=>", "$", "return", "[", "'id'", "]", ",", "'username'", "=>", "$", "return", "[", "'login'", "]", ",", "'name'", "=>", "$", "...
Mapping data from github @todo replace Buzz with Guzzle @param Reponse $response @return array contains normalized user data
[ "Mapping", "data", "from", "github" ]
7b8206f8b4a50fbc61f7bfe4f83eb466cad96440
https://github.com/wobblecode/WobbleCodeUserBundle/blob/7b8206f8b4a50fbc61f7bfe4f83eb466cad96440/OAuth/OAuthMapper.php#L211-L249
199,776
wobblecode/WobbleCodeUserBundle
OAuth/OAuthMapper.php
OAuthMapper.httpRequest
protected function httpRequest($url, $resource = '/', $content = null, $headers = [], $method = 'GET') { $request = new HttpRequest($method, $resource, $url); $response = new HttpResponse(); $headers = array_merge(['User-Agent: WobbleCodeUserBundle'], $headers); $request->setHeader...
php
protected function httpRequest($url, $resource = '/', $content = null, $headers = [], $method = 'GET') { $request = new HttpRequest($method, $resource, $url); $response = new HttpResponse(); $headers = array_merge(['User-Agent: WobbleCodeUserBundle'], $headers); $request->setHeader...
[ "protected", "function", "httpRequest", "(", "$", "url", ",", "$", "resource", "=", "'/'", ",", "$", "content", "=", "null", ",", "$", "headers", "=", "[", "]", ",", "$", "method", "=", "'GET'", ")", "{", "$", "request", "=", "new", "HttpRequest", ...
Performs an HTTP request @todo replace Buzz with Guzzle @param string $url The url to fetch @param string $content The content of the request @param array $headers The headers of the request @param string $method The HTTP method to use @return HttpMessageInterface The response content
[ "Performs", "an", "HTTP", "request" ]
7b8206f8b4a50fbc61f7bfe4f83eb466cad96440
https://github.com/wobblecode/WobbleCodeUserBundle/blob/7b8206f8b4a50fbc61f7bfe4f83eb466cad96440/OAuth/OAuthMapper.php#L263-L279
199,777
agentmedia/phine-builtin
src/BuiltIn/Logic/Logging/ContainerReferenceResolver.php
ContainerReferenceResolver.GetReferencedContainer
public function GetReferencedContainer(Content $content) { $contentContainer = ContentContainer::Schema()->ByContent($content); return $contentContainer ? $contentContainer->GetContainer() : null; }
php
public function GetReferencedContainer(Content $content) { $contentContainer = ContentContainer::Schema()->ByContent($content); return $contentContainer ? $contentContainer->GetContainer() : null; }
[ "public", "function", "GetReferencedContainer", "(", "Content", "$", "content", ")", "{", "$", "contentContainer", "=", "ContentContainer", "::", "Schema", "(", ")", "->", "ByContent", "(", "$", "content", ")", ";", "return", "$", "contentContainer", "?", "$",...
Gets a container referenced by a content @param Content $content The content @return Container Returns The referenced container, if exists
[ "Gets", "a", "container", "referenced", "by", "a", "content" ]
4dd05bc406a71e997bd4eaa16b12e23dbe62a456
https://github.com/agentmedia/phine-builtin/blob/4dd05bc406a71e997bd4eaa16b12e23dbe62a456/src/BuiltIn/Logic/Logging/ContainerReferenceResolver.php#L15-L19
199,778
erenmustafaozdal/laravel-modules-base
src/Controllers/BaseUserController.php
BaseUserController.activationComplete
protected function activationComplete() { try { $activation = Activation::create($this->model); if ( ! Activation::complete($this->model, $activation->code)) { throw new ActivateException($this->model->id, $activation->code, 'fail'); } if ($th...
php
protected function activationComplete() { try { $activation = Activation::create($this->model); if ( ! Activation::complete($this->model, $activation->code)) { throw new ActivateException($this->model->id, $activation->code, 'fail'); } if ($th...
[ "protected", "function", "activationComplete", "(", ")", "{", "try", "{", "$", "activation", "=", "Activation", "::", "create", "(", "$", "this", "->", "model", ")", ";", "if", "(", "!", "Activation", "::", "complete", "(", "$", "this", "->", "model", ...
set activation complete @return boolean
[ "set", "activation", "complete" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Controllers/BaseUserController.php#L64-L85
199,779
erenmustafaozdal/laravel-modules-base
src/Controllers/BaseUserController.php
BaseUserController.activateGroupAction
protected function activateGroupAction($class) { $users = $class::whereIn('id', $this->request->id)->get(); foreach($users as $user) { $this->setModel($user); $this->activationComplete(); } return true; }
php
protected function activateGroupAction($class) { $users = $class::whereIn('id', $this->request->id)->get(); foreach($users as $user) { $this->setModel($user); $this->activationComplete(); } return true; }
[ "protected", "function", "activateGroupAction", "(", "$", "class", ")", "{", "$", "users", "=", "$", "class", "::", "whereIn", "(", "'id'", ",", "$", "this", "->", "request", "->", "id", ")", "->", "get", "(", ")", ";", "foreach", "(", "$", "users", ...
activate group action @param $class @return boolean
[ "activate", "group", "action" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Controllers/BaseUserController.php#L122-L130
199,780
erenmustafaozdal/laravel-modules-base
src/Controllers/BaseUserController.php
BaseUserController.notActivateGroupAction
protected function notActivateGroupAction($class) { $users = $class::whereIn('id', $this->request->id)->get(); foreach($users as $user) { $this->setModel($user); $this->activationRemove(); } return true; }
php
protected function notActivateGroupAction($class) { $users = $class::whereIn('id', $this->request->id)->get(); foreach($users as $user) { $this->setModel($user); $this->activationRemove(); } return true; }
[ "protected", "function", "notActivateGroupAction", "(", "$", "class", ")", "{", "$", "users", "=", "$", "class", "::", "whereIn", "(", "'id'", ",", "$", "this", "->", "request", "->", "id", ")", "->", "get", "(", ")", ";", "foreach", "(", "$", "users...
not activate group action @param $class @return boolean
[ "not", "activate", "group", "action" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Controllers/BaseUserController.php#L138-L146
199,781
wb-crowdfusion/crowdfusion
system/context/ClassLoader.php
ClassLoader.addDirectory
public static function addDirectory($directory, $extensionToFind = '.php', $bypassDirectories = '') { self::register(); $dir = new SplFileInfo($directory); if (!$dir->isDir()) { throw new ApplicationContextException('Cannot add directory to ClassLoader, directory does not exist: ' . $directory); ...
php
public static function addDirectory($directory, $extensionToFind = '.php', $bypassDirectories = '') { self::register(); $dir = new SplFileInfo($directory); if (!$dir->isDir()) { throw new ApplicationContextException('Cannot add directory to ClassLoader, directory does not exist: ' . $directory); ...
[ "public", "static", "function", "addDirectory", "(", "$", "directory", ",", "$", "extensionToFind", "=", "'.php'", ",", "$", "bypassDirectories", "=", "''", ")", "{", "self", "::", "register", "(", ")", ";", "$", "dir", "=", "new", "SplFileInfo", "(", "$...
Scans a directory recursively for all files with a particular extension and will add any classes it finds with the full path. @param string $directory @param string $extensionToFind @param string $bypassDirectories @throws ApplicationContextException @return void
[ "Scans", "a", "directory", "recursively", "for", "all", "files", "with", "a", "particular", "extension", "and", "will", "add", "any", "classes", "it", "finds", "with", "the", "full", "path", "." ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/context/ClassLoader.php#L29-L65
199,782
wb-crowdfusion/crowdfusion
system/context/ClassLoader.php
ClassLoader.addFile
public static function addFile($filePath, $extensionToFind = '.php') { if (!$filePath instanceof SplFileInfo) { $filePath = new SplFileInfo($filePath); } $firstChar = substr($filePath->getBasename(), 0, 1); $extension = substr($filePath->getFilename(), strlen($extensionToFind)*-1); $className = ...
php
public static function addFile($filePath, $extensionToFind = '.php') { if (!$filePath instanceof SplFileInfo) { $filePath = new SplFileInfo($filePath); } $firstChar = substr($filePath->getBasename(), 0, 1); $extension = substr($filePath->getFilename(), strlen($extensionToFind)*-1); $className = ...
[ "public", "static", "function", "addFile", "(", "$", "filePath", ",", "$", "extensionToFind", "=", "'.php'", ")", "{", "if", "(", "!", "$", "filePath", "instanceof", "SplFileInfo", ")", "{", "$", "filePath", "=", "new", "SplFileInfo", "(", "$", "filePath",...
Evaluates a file and if it looks like a php class it will add it. This prevents odd php files that aren't classes from being auto loaded like "bootstrap.php" or "autoload.php", etc. @param string $filePath @param string $extensionToFind @return void
[ "Evaluates", "a", "file", "and", "if", "it", "looks", "like", "a", "php", "class", "it", "will", "add", "it", ".", "This", "prevents", "odd", "php", "files", "that", "aren", "t", "classes", "from", "being", "auto", "loaded", "like", "bootstrap", ".", "...
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/context/ClassLoader.php#L123-L135
199,783
wb-crowdfusion/crowdfusion
system/context/ClassLoader.php
ClassLoader.addClass
public static function addClass($className, $filePath) { if (self::classExists($className)) { throw new ApplicationContextException('Cannot add class file [' . $filePath . '], class with same name already defined by [' . self::$classNames[$className] . ']'); } self::$classNames[$className] ...
php
public static function addClass($className, $filePath) { if (self::classExists($className)) { throw new ApplicationContextException('Cannot add class file [' . $filePath . '], class with same name already defined by [' . self::$classNames[$className] . ']'); } self::$classNames[$className] ...
[ "public", "static", "function", "addClass", "(", "$", "className", ",", "$", "filePath", ")", "{", "if", "(", "self", "::", "classExists", "(", "$", "className", ")", ")", "{", "throw", "new", "ApplicationContextException", "(", "'Cannot add class file ['", "....
Adds a class name and file path. @param string $className @param string $filePath @throws ApplicationContextException @return void
[ "Adds", "a", "class", "name", "and", "file", "path", "." ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/context/ClassLoader.php#L148-L155
199,784
wb-crowdfusion/crowdfusion
system/context/ClassLoader.php
ClassLoader.isVcsFile
public static function isVcsFile($fileName) { foreach (self::$vcsPatterns as $pattern) { if (strpos($fileName, $pattern) !== false) { return true; } } return false; }
php
public static function isVcsFile($fileName) { foreach (self::$vcsPatterns as $pattern) { if (strpos($fileName, $pattern) !== false) { return true; } } return false; }
[ "public", "static", "function", "isVcsFile", "(", "$", "fileName", ")", "{", "foreach", "(", "self", "::", "$", "vcsPatterns", "as", "$", "pattern", ")", "{", "if", "(", "strpos", "(", "$", "fileName", ",", "$", "pattern", ")", "!==", "false", ")", "...
Returns true if file path contains a vcs name. @param string $fileName @return bool
[ "Returns", "true", "if", "file", "path", "contains", "a", "vcs", "name", "." ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/context/ClassLoader.php#L270-L278
199,785
apioo/psx-validate
src/Filter/Html.php
Html.apply
public function apply($value) { return htmlspecialchars((string) $value, $this->quoteStyle, $this->charset, $this->doubleEncode); }
php
public function apply($value) { return htmlspecialchars((string) $value, $this->quoteStyle, $this->charset, $this->doubleEncode); }
[ "public", "function", "apply", "(", "$", "value", ")", "{", "return", "htmlspecialchars", "(", "(", "string", ")", "$", "value", ",", "$", "this", "->", "quoteStyle", ",", "$", "this", "->", "charset", ",", "$", "this", "->", "doubleEncode", ")", ";", ...
Converts special characters to HTML entities @param mixed $value @return boolean
[ "Converts", "special", "characters", "to", "HTML", "entities" ]
4860c6a2c7f7ca52d3bd6d7e6ec7d6a7ddcfd83d
https://github.com/apioo/psx-validate/blob/4860c6a2c7f7ca52d3bd6d7e6ec7d6a7ddcfd83d/src/Filter/Html.php#L51-L54
199,786
jabernardo/lollipop-php
Library/SQL/Connection/MySQL.php
MySQL.__connect
private function __connect() { if (!is_null($db)) return true; $config = Config::get('db'); if (is_null($config)) { throw new \Lollipop\Exception\Configuration('Lollipop is initialized with wrong database configuration'); } $host = isset($config->host) ? $config->...
php
private function __connect() { if (!is_null($db)) return true; $config = Config::get('db'); if (is_null($config)) { throw new \Lollipop\Exception\Configuration('Lollipop is initialized with wrong database configuration'); } $host = isset($config->host) ? $config->...
[ "private", "function", "__connect", "(", ")", "{", "if", "(", "!", "is_null", "(", "$", "db", ")", ")", "return", "true", ";", "$", "config", "=", "Config", "::", "get", "(", "'db'", ")", ";", "if", "(", "is_null", "(", "$", "config", ")", ")", ...
Connect to MySQL server @throws \Lollipop\Exception\Configuration @throws \Lollipop\Exception\Connection @return boolean
[ "Connect", "to", "MySQL", "server" ]
004d80b21f7246bb3e08c7b9f74a165b0d3ca0f5
https://github.com/jabernardo/lollipop-php/blob/004d80b21f7246bb3e08c7b9f74a165b0d3ca0f5/Library/SQL/Connection/MySQL.php#L37-L59
199,787
phpffcms/ffcms-core
src/Traits/ModelValidator.php
ModelValidator.initialize
public function initialize($csrf = false) { $this->_tokenRequired = $csrf; if ($csrf) { // get current token value from session $currentToken = App::$Session->get('_csrf_token', false); // set new token value to session $newToken = Crypt::randomString(...
php
public function initialize($csrf = false) { $this->_tokenRequired = $csrf; if ($csrf) { // get current token value from session $currentToken = App::$Session->get('_csrf_token', false); // set new token value to session $newToken = Crypt::randomString(...
[ "public", "function", "initialize", "(", "$", "csrf", "=", "false", ")", "{", "$", "this", "->", "_tokenRequired", "=", "$", "csrf", ";", "if", "(", "$", "csrf", ")", "{", "// get current token value from session", "$", "currentToken", "=", "App", "::", "$...
Initialize validator. Set csrf protection token from request data if available. @param bool $csrf
[ "Initialize", "validator", ".", "Set", "csrf", "protection", "token", "from", "request", "data", "if", "available", "." ]
44a309553ef9f115ccfcfd71f2ac6e381c612082
https://github.com/phpffcms/ffcms-core/blob/44a309553ef9f115ccfcfd71f2ac6e381c612082/src/Traits/ModelValidator.php#L32-L51
199,788
phpffcms/ffcms-core
src/Traits/ModelValidator.php
ModelValidator.send
final public function send() { if (!Str::equalIgnoreCase($this->_sendMethod, App::$Request->getMethod())) { return false; } return $this->getRequest('submit', $this->_sendMethod) !== null; }
php
final public function send() { if (!Str::equalIgnoreCase($this->_sendMethod, App::$Request->getMethod())) { return false; } return $this->getRequest('submit', $this->_sendMethod) !== null; }
[ "final", "public", "function", "send", "(", ")", "{", "if", "(", "!", "Str", "::", "equalIgnoreCase", "(", "$", "this", "->", "_sendMethod", ",", "App", "::", "$", "Request", "->", "getMethod", "(", ")", ")", ")", "{", "return", "false", ";", "}", ...
Check if model get POST-based request as submit of SEND data @return bool @throws \InvalidArgumentException
[ "Check", "if", "model", "get", "POST", "-", "based", "request", "as", "submit", "of", "SEND", "data" ]
44a309553ef9f115ccfcfd71f2ac6e381c612082
https://github.com/phpffcms/ffcms-core/blob/44a309553ef9f115ccfcfd71f2ac6e381c612082/src/Traits/ModelValidator.php#L270-L277
199,789
phpffcms/ffcms-core
src/Traits/ModelValidator.php
ModelValidator.getRequest
public function getRequest($param, $method = null) { if ($method === null) { $method = $this->_sendMethod; } $method = Str::lowerCase($method); // get root request as array or string switch ($method) { case 'get': $request = App::$Requ...
php
public function getRequest($param, $method = null) { if ($method === null) { $method = $this->_sendMethod; } $method = Str::lowerCase($method); // get root request as array or string switch ($method) { case 'get': $request = App::$Requ...
[ "public", "function", "getRequest", "(", "$", "param", ",", "$", "method", "=", "null", ")", "{", "if", "(", "$", "method", "===", "null", ")", "{", "$", "method", "=", "$", "this", "->", "_sendMethod", ";", "}", "$", "method", "=", "Str", "::", ...
Get input value based on param path and request method @param string $param @param string|null $method @return mixed
[ "Get", "input", "value", "based", "on", "param", "path", "and", "request", "method" ]
44a309553ef9f115ccfcfd71f2ac6e381c612082
https://github.com/phpffcms/ffcms-core/blob/44a309553ef9f115ccfcfd71f2ac6e381c612082/src/Traits/ModelValidator.php#L307-L346
199,790
brightnucleus/options-store
src/Exception/InvalidOptionRepository.php
InvalidOptionRepository.fromRepository
public static function fromRepository($repository) { $message = sprintf( 'Could not add invalid OptionRepository of type "%1$s" to AggregateOptionRepository.', is_object($repository) ? get_class($repository) : gettype($repository) ); r...
php
public static function fromRepository($repository) { $message = sprintf( 'Could not add invalid OptionRepository of type "%1$s" to AggregateOptionRepository.', is_object($repository) ? get_class($repository) : gettype($repository) ); r...
[ "public", "static", "function", "fromRepository", "(", "$", "repository", ")", "{", "$", "message", "=", "sprintf", "(", "'Could not add invalid OptionRepository of type \"%1$s\" to AggregateOptionRepository.'", ",", "is_object", "(", "$", "repository", ")", "?", "get_cla...
Get a new exception based on the type of an invalid repository. @since 0.1.0 @param mixed $repository Repository that was tried to be added. @return static
[ "Get", "a", "new", "exception", "based", "on", "the", "type", "of", "an", "invalid", "repository", "." ]
9a9ef2a160bbacd69fe3e9db0be8ed89e6905ef1
https://github.com/brightnucleus/options-store/blob/9a9ef2a160bbacd69fe3e9db0be8ed89e6905ef1/src/Exception/InvalidOptionRepository.php#L42-L52
199,791
brightnucleus/options-store
src/Exception/InvalidOptionRepository.php
InvalidOptionRepository.fromInstantiationException
public static function fromInstantiationException($class, Exception $exception) { $message = sprintf( 'Could not instantiate OptionRepository of type "%1$s". Reason: %2$s', is_object($class) ? get_class($class) : gettype($class), $exception...
php
public static function fromInstantiationException($class, Exception $exception) { $message = sprintf( 'Could not instantiate OptionRepository of type "%1$s". Reason: %2$s', is_object($class) ? get_class($class) : gettype($class), $exception...
[ "public", "static", "function", "fromInstantiationException", "(", "$", "class", ",", "Exception", "$", "exception", ")", "{", "$", "message", "=", "sprintf", "(", "'Could not instantiate OptionRepository of type \"%1$s\". Reason: %2$s'", ",", "is_object", "(", "$", "cl...
Get a new exception based on an exception that was thrown during instantiation of a class. @since 0.1.4 @param mixed $class Class that was tried to be instantiated. @param Exception $exception Exception that was thrown during instantiation. @return static
[ "Get", "a", "new", "exception", "based", "on", "an", "exception", "that", "was", "thrown", "during", "instantiation", "of", "a", "class", "." ]
9a9ef2a160bbacd69fe3e9db0be8ed89e6905ef1
https://github.com/brightnucleus/options-store/blob/9a9ef2a160bbacd69fe3e9db0be8ed89e6905ef1/src/Exception/InvalidOptionRepository.php#L64-L75
199,792
brightnucleus/options-store
src/Exception/InvalidOptionRepository.php
InvalidOptionRepository.fromConfig
public static function fromConfig(Config $config) { $message = sprintf( 'Could not instantiate OptionRepository from Config with starting key "%1$s".', empty($config->getKeys()) ? '<none>' : $config->getKeys()[0] ); return new static($...
php
public static function fromConfig(Config $config) { $message = sprintf( 'Could not instantiate OptionRepository from Config with starting key "%1$s".', empty($config->getKeys()) ? '<none>' : $config->getKeys()[0] ); return new static($...
[ "public", "static", "function", "fromConfig", "(", "Config", "$", "config", ")", "{", "$", "message", "=", "sprintf", "(", "'Could not instantiate OptionRepository from Config with starting key \"%1$s\".'", ",", "empty", "(", "$", "config", "->", "getKeys", "(", ")", ...
Get a new exception based on a Config that did not produce a valid repository. @since 0.1.0 @param Config $config Config instance that was used. @return static
[ "Get", "a", "new", "exception", "based", "on", "a", "Config", "that", "did", "not", "produce", "a", "valid", "repository", "." ]
9a9ef2a160bbacd69fe3e9db0be8ed89e6905ef1
https://github.com/brightnucleus/options-store/blob/9a9ef2a160bbacd69fe3e9db0be8ed89e6905ef1/src/Exception/InvalidOptionRepository.php#L86-L96
199,793
dkd/enumeration
src/Enumeration.php
Enumeration.setValue
protected function setValue($value) { $enumKey = array_search((string) $value, static::$enumConstants[get_class($this)]); if ($enumKey === false) { throw new Exception\InvalidEnumerationValueException( sprintf('Invalid value %s for %s', $value, __CLASS__), ...
php
protected function setValue($value) { $enumKey = array_search((string) $value, static::$enumConstants[get_class($this)]); if ($enumKey === false) { throw new Exception\InvalidEnumerationValueException( sprintf('Invalid value %s for %s', $value, __CLASS__), ...
[ "protected", "function", "setValue", "(", "$", "value", ")", "{", "$", "enumKey", "=", "array_search", "(", "(", "string", ")", "$", "value", ",", "static", "::", "$", "enumConstants", "[", "get_class", "(", "$", "this", ")", "]", ")", ";", "if", "("...
Set the Enumeration value to the associated enumeration value by a loose comparison. The value, that is used as the enumeration value, will be of the same type like defined in the enumeration @param mixed $value @throws Exception\InvalidEnumerationValueException
[ "Set", "the", "Enumeration", "value", "to", "the", "associated", "enumeration", "value", "by", "a", "loose", "comparison", ".", "The", "value", "that", "is", "used", "as", "the", "enumeration", "value", "will", "be", "of", "the", "same", "type", "like", "d...
7e6d05ac383da5f7e968c7e011d602c5a4d7a1de
https://github.com/dkd/enumeration/blob/7e6d05ac383da5f7e968c7e011d602c5a4d7a1de/src/Enumeration.php#L127-L137
199,794
dkd/enumeration
src/Enumeration.php
Enumeration.isValid
protected function isValid($value) { $value = (string) $value; foreach (static::$enumConstants[get_class($this)] as $constantValue) { if ($value === (string) $constantValue) { return true; } } return false; }
php
protected function isValid($value) { $value = (string) $value; foreach (static::$enumConstants[get_class($this)] as $constantValue) { if ($value === (string) $constantValue) { return true; } } return false; }
[ "protected", "function", "isValid", "(", "$", "value", ")", "{", "$", "value", "=", "(", "string", ")", "$", "value", ";", "foreach", "(", "static", "::", "$", "enumConstants", "[", "get_class", "(", "$", "this", ")", "]", "as", "$", "constantValue", ...
Check if the value on this enum is a valid value for the enum @param mixed $value @return boolean
[ "Check", "if", "the", "value", "on", "this", "enum", "is", "a", "valid", "value", "for", "the", "enum" ]
7e6d05ac383da5f7e968c7e011d602c5a4d7a1de
https://github.com/dkd/enumeration/blob/7e6d05ac383da5f7e968c7e011d602c5a4d7a1de/src/Enumeration.php#L145-L154
199,795
dkd/enumeration
src/Enumeration.php
Enumeration.getConstants
public static function getConstants($include_default = false) { static::loadValues(); $enumConstants = static::$enumConstants[get_called_class()]; if (!$include_default) { unset($enumConstants['__DEFAULT']); } return $enumConstants; }
php
public static function getConstants($include_default = false) { static::loadValues(); $enumConstants = static::$enumConstants[get_called_class()]; if (!$include_default) { unset($enumConstants['__DEFAULT']); } return $enumConstants; }
[ "public", "static", "function", "getConstants", "(", "$", "include_default", "=", "false", ")", "{", "static", "::", "loadValues", "(", ")", ";", "$", "enumConstants", "=", "static", "::", "$", "enumConstants", "[", "get_called_class", "(", ")", "]", ";", ...
Get the valid values for this enum Defaults to constants you define in your subclass override to provide custom functionality @param boolean $include_default @return array
[ "Get", "the", "valid", "values", "for", "this", "enum", "Defaults", "to", "constants", "you", "define", "in", "your", "subclass", "override", "to", "provide", "custom", "functionality" ]
7e6d05ac383da5f7e968c7e011d602c5a4d7a1de
https://github.com/dkd/enumeration/blob/7e6d05ac383da5f7e968c7e011d602c5a4d7a1de/src/Enumeration.php#L164-L172
199,796
dkd/enumeration
src/Enumeration.php
Enumeration.cast
public static function cast($value) { $currentClass = get_called_class(); if (!is_object($value) || get_class($value) !== $currentClass) { $value = new $currentClass($value); } return $value; }
php
public static function cast($value) { $currentClass = get_called_class(); if (!is_object($value) || get_class($value) !== $currentClass) { $value = new $currentClass($value); } return $value; }
[ "public", "static", "function", "cast", "(", "$", "value", ")", "{", "$", "currentClass", "=", "get_called_class", "(", ")", ";", "if", "(", "!", "is_object", "(", "$", "value", ")", "||", "get_class", "(", "$", "value", ")", "!==", "$", "currentClass"...
Cast value to enumeration type @param mixed $value Value that has to be casted @return static
[ "Cast", "value", "to", "enumeration", "type" ]
7e6d05ac383da5f7e968c7e011d602c5a4d7a1de
https://github.com/dkd/enumeration/blob/7e6d05ac383da5f7e968c7e011d602c5a4d7a1de/src/Enumeration.php#L180-L187
199,797
urmaul/rss-pipes
src/Controller.php
Controller.readConfig
public function readConfig($pipe) { $filename = $this->pipesDir . '/' . $pipe; if (file_exists($filename . '.yml')) { return Yaml::parse(file_get_contents($filename . '.yml')); } elseif ($this->allowPhp && file_exists($filename . '.php')) { return include...
php
public function readConfig($pipe) { $filename = $this->pipesDir . '/' . $pipe; if (file_exists($filename . '.yml')) { return Yaml::parse(file_get_contents($filename . '.yml')); } elseif ($this->allowPhp && file_exists($filename . '.php')) { return include...
[ "public", "function", "readConfig", "(", "$", "pipe", ")", "{", "$", "filename", "=", "$", "this", "->", "pipesDir", ".", "'/'", ".", "$", "pipe", ";", "if", "(", "file_exists", "(", "$", "filename", ".", "'.yml'", ")", ")", "{", "return", "Yaml", ...
Reads pipe config from file. @param string $pipe pipe name @return array @throws Exception
[ "Reads", "pipe", "config", "from", "file", "." ]
9e11e9a5315e8d11764c2784c02ffa02dee5639f
https://github.com/urmaul/rss-pipes/blob/9e11e9a5315e8d11764c2784c02ffa02dee5639f/src/Controller.php#L41-L53
199,798
FusePump/cli.php
lib/FusePump/Cli/Utils.php
Utils.pregMatchArray
public static function pregMatchArray($patterns, $subject) { if (!is_array($patterns)) { throw new \Exception('$patterns is not an array'); } if (!is_string($subject)) { throw new \Exception('$subject is not a string'); } foreach ($patterns as $patte...
php
public static function pregMatchArray($patterns, $subject) { if (!is_array($patterns)) { throw new \Exception('$patterns is not an array'); } if (!is_string($subject)) { throw new \Exception('$subject is not a string'); } foreach ($patterns as $patte...
[ "public", "static", "function", "pregMatchArray", "(", "$", "patterns", ",", "$", "subject", ")", "{", "if", "(", "!", "is_array", "(", "$", "patterns", ")", ")", "{", "throw", "new", "\\", "Exception", "(", "'$patterns is not an array'", ")", ";", "}", ...
Preg match array Match subject to an array of regex patterns @param array $patterns - array of regex patterns @param string $subject - string to test patterns on @static @return bool - true if found, false otherwise @throws \Exception - if pattern is not an array or subject not a string
[ "Preg", "match", "array" ]
2cc92f09ce7b2f73d5cbc09f5ae4f31f3f9ae3b4
https://github.com/FusePump/cli.php/blob/2cc92f09ce7b2f73d5cbc09f5ae4f31f3f9ae3b4/lib/FusePump/Cli/Utils.php#L133-L150
199,799
shgysk8zer0/core_api
traits/auth/basic.php
Basic.requireBasicLogin
final public function requireBasicLogin($realm = 'Restricted') { if (! ( array_key_exists('PHP_AUTH_USER', $_SERVER) and array_key_exists('PHP_AUTH_PW', $_SERVER) )) { $this->_basicAuthFailed($realm); } else { $this->loginWith([ 'user' => $_SERVER['PHP_AUTH_USER'], 'password' => $_SERVER['PHP...
php
final public function requireBasicLogin($realm = 'Restricted') { if (! ( array_key_exists('PHP_AUTH_USER', $_SERVER) and array_key_exists('PHP_AUTH_PW', $_SERVER) )) { $this->_basicAuthFailed($realm); } else { $this->loginWith([ 'user' => $_SERVER['PHP_AUTH_USER'], 'password' => $_SERVER['PHP...
[ "final", "public", "function", "requireBasicLogin", "(", "$", "realm", "=", "'Restricted'", ")", "{", "if", "(", "!", "(", "array_key_exists", "(", "'PHP_AUTH_USER'", ",", "$", "_SERVER", ")", "and", "array_key_exists", "(", "'PHP_AUTH_PW'", ",", "$", "_SERVER...
Check for Basic Auth credentials and attempt to login if present @param string $realm The "realm" to pass along if asking for credentials @return void
[ "Check", "for", "Basic", "Auth", "credentials", "and", "attempt", "to", "login", "if", "present" ]
9e9b8baf761af874b95256ad2462e55fbb2b2e58
https://github.com/shgysk8zer0/core_api/blob/9e9b8baf761af874b95256ad2462e55fbb2b2e58/traits/auth/basic.php#L36-L53