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
204,800
mimidotsuser/sqlQueryuilder
src/Builder.php
Builder.all
public function all() { $table = trim(self::$table); if (!empty($table)) { $query = /** @lang text */ "SELECT * FROM {$table}"; if(!empty($this->groupby)){ $query.=' GROUP BY '.$this->groupby; } if (!empty($this->orde...
php
public function all() { $table = trim(self::$table); if (!empty($table)) { $query = /** @lang text */ "SELECT * FROM {$table}"; if(!empty($this->groupby)){ $query.=' GROUP BY '.$this->groupby; } if (!empty($this->orde...
[ "public", "function", "all", "(", ")", "{", "$", "table", "=", "trim", "(", "self", "::", "$", "table", ")", ";", "if", "(", "!", "empty", "(", "$", "table", ")", ")", "{", "$", "query", "=", "/** @lang text */", "\"SELECT * FROM {$table}\"", ";", "i...
Fetch all data without limits or offset
[ "Fetch", "all", "data", "without", "limits", "or", "offset" ]
a9339b6dea5be52b79095b9c001684c162a09bf6
https://github.com/mimidotsuser/sqlQueryuilder/blob/a9339b6dea5be52b79095b9c001684c162a09bf6/src/Builder.php#L370-L397
204,801
mimidotsuser/sqlQueryuilder
src/Builder.php
Builder.insert
public function insert($values) { try { if (func_num_args() > 0 && !is_array($values)) { $this->values = array_merge($this->values, self::sanitizeAV(func_get_args())); } else if (is_array($values)) { $this->values = self::sanitize($values); ...
php
public function insert($values) { try { if (func_num_args() > 0 && !is_array($values)) { $this->values = array_merge($this->values, self::sanitizeAV(func_get_args())); } else if (is_array($values)) { $this->values = self::sanitize($values); ...
[ "public", "function", "insert", "(", "$", "values", ")", "{", "try", "{", "if", "(", "func_num_args", "(", ")", ">", "0", "&&", "!", "is_array", "(", "$", "values", ")", ")", "{", "$", "this", "->", "values", "=", "array_merge", "(", "$", "this", ...
Sets the values to be inserted @param $values @return $this|string
[ "Sets", "the", "values", "to", "be", "inserted" ]
a9339b6dea5be52b79095b9c001684c162a09bf6
https://github.com/mimidotsuser/sqlQueryuilder/blob/a9339b6dea5be52b79095b9c001684c162a09bf6/src/Builder.php#L413-L434
204,802
mimidotsuser/sqlQueryuilder
src/Builder.php
Builder.into
public function into($columns) { //if columns count does not match values count, throw an error. $valuesCount = count($this->values); $colStringCount = 0; if (is_string($columns)) { try { $colStringCount = count( explode(',', $columns)...
php
public function into($columns) { //if columns count does not match values count, throw an error. $valuesCount = count($this->values); $colStringCount = 0; if (is_string($columns)) { try { $colStringCount = count( explode(',', $columns)...
[ "public", "function", "into", "(", "$", "columns", ")", "{", "//if columns count does not match values count, throw an error.", "$", "valuesCount", "=", "count", "(", "$", "this", "->", "values", ")", ";", "$", "colStringCount", "=", "0", ";", "if", "(", "is_str...
Sets the column to which the values will be inserted @param $columns @return string
[ "Sets", "the", "column", "to", "which", "the", "values", "will", "be", "inserted" ]
a9339b6dea5be52b79095b9c001684c162a09bf6
https://github.com/mimidotsuser/sqlQueryuilder/blob/a9339b6dea5be52b79095b9c001684c162a09bf6/src/Builder.php#L441-L477
204,803
mimidotsuser/sqlQueryuilder
src/Builder.php
Builder.doInsert
protected function doInsert() { //check if there is an error from previous function execution if (static::$response["status"] == "error") { return static::terminate(static::$response); } //convert each columns to ? parameter $columnParam = array_map(function () { ...
php
protected function doInsert() { //check if there is an error from previous function execution if (static::$response["status"] == "error") { return static::terminate(static::$response); } //convert each columns to ? parameter $columnParam = array_map(function () { ...
[ "protected", "function", "doInsert", "(", ")", "{", "//check if there is an error from previous function execution", "if", "(", "static", "::", "$", "response", "[", "\"status\"", "]", "==", "\"error\"", ")", "{", "return", "static", "::", "terminate", "(", "static"...
Performs the actual database insert @return string
[ "Performs", "the", "actual", "database", "insert" ]
a9339b6dea5be52b79095b9c001684c162a09bf6
https://github.com/mimidotsuser/sqlQueryuilder/blob/a9339b6dea5be52b79095b9c001684c162a09bf6/src/Builder.php#L483-L530
204,804
mimidotsuser/sqlQueryuilder
src/Builder.php
Builder.isAssocStr
private function isAssocStr($array) { if(!is_array($array)){ return false; } for (reset($array); is_int(key($array)); next($array)) { if (is_null(key($array))) return false; } return true; }
php
private function isAssocStr($array) { if(!is_array($array)){ return false; } for (reset($array); is_int(key($array)); next($array)) { if (is_null(key($array))) return false; } return true; }
[ "private", "function", "isAssocStr", "(", "$", "array", ")", "{", "if", "(", "!", "is_array", "(", "$", "array", ")", ")", "{", "return", "false", ";", "}", "for", "(", "reset", "(", "$", "array", ")", ";", "is_int", "(", "key", "(", "$", "array"...
Function to check if an array is association or sequential @param $array @return bool
[ "Function", "to", "check", "if", "an", "array", "is", "association", "or", "sequential" ]
a9339b6dea5be52b79095b9c001684c162a09bf6
https://github.com/mimidotsuser/sqlQueryuilder/blob/a9339b6dea5be52b79095b9c001684c162a09bf6/src/Builder.php#L607-L618
204,805
mimidotsuser/sqlQueryuilder
src/Builder.php
Builder.exec
protected function exec($query) { try { Connect::getConn()->exec($query); } catch (Exception $e) { static::$response["status"] = "error"; static::$response["response"] = $e->getMessage(); static::$response["code"] = $e->getCode(); return s...
php
protected function exec($query) { try { Connect::getConn()->exec($query); } catch (Exception $e) { static::$response["status"] = "error"; static::$response["response"] = $e->getMessage(); static::$response["code"] = $e->getCode(); return s...
[ "protected", "function", "exec", "(", "$", "query", ")", "{", "try", "{", "Connect", "::", "getConn", "(", ")", "->", "exec", "(", "$", "query", ")", ";", "}", "catch", "(", "Exception", "$", "e", ")", "{", "static", "::", "$", "response", "[", "...
Executes a query that does not return any results @param $query @return null|string
[ "Executes", "a", "query", "that", "does", "not", "return", "any", "results" ]
a9339b6dea5be52b79095b9c001684c162a09bf6
https://github.com/mimidotsuser/sqlQueryuilder/blob/a9339b6dea5be52b79095b9c001684c162a09bf6/src/Builder.php#L657-L669
204,806
mimidotsuser/sqlQueryuilder
src/Builder.php
Builder.valTable
private static function valTable(){ if(static::$table==null || ! is_string(static::$table)){ static::$response["status"] = "error"; static::$response["response"] = "check the table name provided"; static::$response["code"]=5000; return self::terminate(static::$res...
php
private static function valTable(){ if(static::$table==null || ! is_string(static::$table)){ static::$response["status"] = "error"; static::$response["response"] = "check the table name provided"; static::$response["code"]=5000; return self::terminate(static::$res...
[ "private", "static", "function", "valTable", "(", ")", "{", "if", "(", "static", "::", "$", "table", "==", "null", "||", "!", "is_string", "(", "static", "::", "$", "table", ")", ")", "{", "static", "::", "$", "response", "[", "\"status\"", "]", "=",...
Validate that the table name has been provided and is a string
[ "Validate", "that", "the", "table", "name", "has", "been", "provided", "and", "is", "a", "string" ]
a9339b6dea5be52b79095b9c001684c162a09bf6
https://github.com/mimidotsuser/sqlQueryuilder/blob/a9339b6dea5be52b79095b9c001684c162a09bf6/src/Builder.php#L700-L711
204,807
mimidotsuser/sqlQueryuilder
src/Builder.php
Builder.drop
public function drop() { static::valTable(); $sql = /** @lang text */ "DROP TABLE " . self::$table; try { $this->exec($sql); static::$response["status"] = "success"; static::$response["response"] = "success"; return self::terminate...
php
public function drop() { static::valTable(); $sql = /** @lang text */ "DROP TABLE " . self::$table; try { $this->exec($sql); static::$response["status"] = "success"; static::$response["response"] = "success"; return self::terminate...
[ "public", "function", "drop", "(", ")", "{", "static", "::", "valTable", "(", ")", ";", "$", "sql", "=", "/** @lang text */", "\"DROP TABLE \"", ".", "self", "::", "$", "table", ";", "try", "{", "$", "this", "->", "exec", "(", "$", "sql", ")", ";", ...
Function to drop a table @return string
[ "Function", "to", "drop", "a", "table" ]
a9339b6dea5be52b79095b9c001684c162a09bf6
https://github.com/mimidotsuser/sqlQueryuilder/blob/a9339b6dea5be52b79095b9c001684c162a09bf6/src/Builder.php#L717-L736
204,808
Etenil/assegai
src/assegai/modules/Module.php
Module.setDependencies
function setDependencies(\assegai\Server $server, ModuleContainer $modules) { $this->server = $server; $this->modules = $modules; }
php
function setDependencies(\assegai\Server $server, ModuleContainer $modules) { $this->server = $server; $this->modules = $modules; }
[ "function", "setDependencies", "(", "\\", "assegai", "\\", "Server", "$", "server", ",", "ModuleContainer", "$", "modules", ")", "{", "$", "this", "->", "server", "=", "$", "server", ";", "$", "this", "->", "modules", "=", "$", "modules", ";", "}" ]
Default module constructor. Loads options into properties. @param array $options is an associative array whose keys will be mapped to properties for speed populating of the object.
[ "Default", "module", "constructor", ".", "Loads", "options", "into", "properties", "." ]
d43cce1a88f1c332f60dd0a4374b17764852af9e
https://github.com/Etenil/assegai/blob/d43cce1a88f1c332f60dd0a4374b17764852af9e/src/assegai/modules/Module.php#L41-L45
204,809
Etenil/assegai
src/assegai/modules/Module.php
Module.getOption
protected function getOption($option, $default = false) { return isset($this->options[$option])? $this->options[$option] : $default; }
php
protected function getOption($option, $default = false) { return isset($this->options[$option])? $this->options[$option] : $default; }
[ "protected", "function", "getOption", "(", "$", "option", ",", "$", "default", "=", "false", ")", "{", "return", "isset", "(", "$", "this", "->", "options", "[", "$", "option", "]", ")", "?", "$", "this", "->", "options", "[", "$", "option", "]", "...
Just a convenient wrapper to retrieve an option. @param string $option is the option's name to retrieve. @param mixed $default default value returned if option doesn't exist. Default is false. @return the value or default value.
[ "Just", "a", "convenient", "wrapper", "to", "retrieve", "an", "option", "." ]
d43cce1a88f1c332f60dd0a4374b17764852af9e
https://github.com/Etenil/assegai/blob/d43cce1a88f1c332f60dd0a4374b17764852af9e/src/assegai/modules/Module.php#L76-L79
204,810
3ev/wordpress-core
src/Tev/Field/Model/PostField.php
PostField.getValue
public function getValue() { $val = $this->base['value']; if (is_array($val)) { $posts = array(); foreach ($val as $p) { $posts[] = $this->postFactory->create($this->getPostObject($p)); } return $posts; } elseif (strlen($val)...
php
public function getValue() { $val = $this->base['value']; if (is_array($val)) { $posts = array(); foreach ($val as $p) { $posts[] = $this->postFactory->create($this->getPostObject($p)); } return $posts; } elseif (strlen($val)...
[ "public", "function", "getValue", "(", ")", "{", "$", "val", "=", "$", "this", "->", "base", "[", "'value'", "]", ";", "if", "(", "is_array", "(", "$", "val", ")", ")", "{", "$", "posts", "=", "array", "(", ")", ";", "foreach", "(", "$", "val",...
Get a single post object or array of post objects. If no posts are configured, returned will result will be an empty array if this is a mutli-select, or null if not. @return \Tev\Post\Model\Post|\Tev\Post\Model\Post[]|null
[ "Get", "a", "single", "post", "object", "or", "array", "of", "post", "objects", "." ]
da674fbec5bf3d5bd2a2141680a4c141113eb6b0
https://github.com/3ev/wordpress-core/blob/da674fbec5bf3d5bd2a2141680a4c141113eb6b0/src/Tev/Field/Model/PostField.php#L43-L64
204,811
armazon/armazon
src/Armazon/Servidor/Swoole.php
Swoole.detectarNucleosCPU
private function detectarNucleosCPU() { $cantidad_cpu = 1; if (is_file('/proc/cpuinfo')) { $cpu_info = file_get_contents('/proc/cpuinfo'); preg_match_all('/^processor/m', $cpu_info, $matches); $cantidad_cpu = count($matches[0]); } else if ('WIN' == strtoup...
php
private function detectarNucleosCPU() { $cantidad_cpu = 1; if (is_file('/proc/cpuinfo')) { $cpu_info = file_get_contents('/proc/cpuinfo'); preg_match_all('/^processor/m', $cpu_info, $matches); $cantidad_cpu = count($matches[0]); } else if ('WIN' == strtoup...
[ "private", "function", "detectarNucleosCPU", "(", ")", "{", "$", "cantidad_cpu", "=", "1", ";", "if", "(", "is_file", "(", "'/proc/cpuinfo'", ")", ")", "{", "$", "cpu_info", "=", "file_get_contents", "(", "'/proc/cpuinfo'", ")", ";", "preg_match_all", "(", "...
Devuelve la cantidad de nucleos del CPU @return int
[ "Devuelve", "la", "cantidad", "de", "nucleos", "del", "CPU" ]
ec76385ff80ce1659d81bc4050ef9483ab0ebe52
https://github.com/armazon/armazon/blob/ec76385ff80ce1659d81bc4050ef9483ab0ebe52/src/Armazon/Servidor/Swoole.php#L17-L44
204,812
akumar2-velsof/guzzlehttp
src/Utils.php
Utils.getPath
public static function getPath($data, $path) { $path = explode('/', $path); while (null !== ($part = array_shift($path))) { if (!is_array($data) || !isset($data[$part])) { return null; } $data = $data[$part]; } return $data; }
php
public static function getPath($data, $path) { $path = explode('/', $path); while (null !== ($part = array_shift($path))) { if (!is_array($data) || !isset($data[$part])) { return null; } $data = $data[$part]; } return $data; }
[ "public", "static", "function", "getPath", "(", "$", "data", ",", "$", "path", ")", "{", "$", "path", "=", "explode", "(", "'/'", ",", "$", "path", ")", ";", "while", "(", "null", "!==", "(", "$", "part", "=", "array_shift", "(", "$", "path", ")"...
Gets a value from an array using a path syntax to retrieve nested data. This method does not allow for keys that contain "/". You must traverse the array manually or using something more advanced like JMESPath to work with keys that contain "/". // Get the bar key of a set of nested arrays. // This is equivalent to $...
[ "Gets", "a", "value", "from", "an", "array", "using", "a", "path", "syntax", "to", "retrieve", "nested", "data", "." ]
9588a489c52b27e2d4047f146ddacffc3e111b7e
https://github.com/akumar2-velsof/guzzlehttp/blob/9588a489c52b27e2d4047f146ddacffc3e111b7e/src/Utils.php#L31-L43
204,813
akumar2-velsof/guzzlehttp
src/Utils.php
Utils.setPath
public static function setPath(&$data, $path, $value) { $queue = explode('/', $path); // Optimization for simple sets. if (count($queue) === 1) { $data[$path] = $value; return; } $current =& $data; while (null !== ($key = array_shift($queue)))...
php
public static function setPath(&$data, $path, $value) { $queue = explode('/', $path); // Optimization for simple sets. if (count($queue) === 1) { $data[$path] = $value; return; } $current =& $data; while (null !== ($key = array_shift($queue)))...
[ "public", "static", "function", "setPath", "(", "&", "$", "data", ",", "$", "path", ",", "$", "value", ")", "{", "$", "queue", "=", "explode", "(", "'/'", ",", "$", "path", ")", ";", "// Optimization for simple sets.", "if", "(", "count", "(", "$", "...
Set a value in a nested array key. Keys will be created as needed to set the value. This function does not support keys that contain "/" or "[]" characters because these are special tokens used when traversing the data structure. A value may be prepended to an existing array by using "[]" as the final key of a path. ...
[ "Set", "a", "value", "in", "a", "nested", "array", "key", ".", "Keys", "will", "be", "created", "as", "needed", "to", "set", "the", "value", "." ]
9588a489c52b27e2d4047f146ddacffc3e111b7e
https://github.com/akumar2-velsof/guzzlehttp/blob/9588a489c52b27e2d4047f146ddacffc3e111b7e/src/Utils.php#L67-L94
204,814
akumar2-velsof/guzzlehttp
src/Utils.php
Utils.uriTemplate
public static function uriTemplate($template, array $variables) { if (function_exists('\\uri_template')) { return \uri_template($template, $variables); } static $uriTemplate; if (!$uriTemplate) { $uriTemplate = new UriTemplate(); } return $ur...
php
public static function uriTemplate($template, array $variables) { if (function_exists('\\uri_template')) { return \uri_template($template, $variables); } static $uriTemplate; if (!$uriTemplate) { $uriTemplate = new UriTemplate(); } return $ur...
[ "public", "static", "function", "uriTemplate", "(", "$", "template", ",", "array", "$", "variables", ")", "{", "if", "(", "function_exists", "(", "'\\\\uri_template'", ")", ")", "{", "return", "\\", "uri_template", "(", "$", "template", ",", "$", "variables"...
Expands a URI template @param string $template URI template @param array $variables Template variables @return string
[ "Expands", "a", "URI", "template" ]
9588a489c52b27e2d4047f146ddacffc3e111b7e
https://github.com/akumar2-velsof/guzzlehttp/blob/9588a489c52b27e2d4047f146ddacffc3e111b7e/src/Utils.php#L104-L116
204,815
akumar2-velsof/guzzlehttp
src/Utils.php
Utils.jsonDecode
public static function jsonDecode($json, $assoc = false, $depth = 512, $options = 0) { if ($json === '' || $json === null) { return null; } static $jsonErrors = [ JSON_ERROR_DEPTH => 'JSON_ERROR_DEPTH - Maximum stack depth exceeded', JSON_ERROR_STATE_MISM...
php
public static function jsonDecode($json, $assoc = false, $depth = 512, $options = 0) { if ($json === '' || $json === null) { return null; } static $jsonErrors = [ JSON_ERROR_DEPTH => 'JSON_ERROR_DEPTH - Maximum stack depth exceeded', JSON_ERROR_STATE_MISM...
[ "public", "static", "function", "jsonDecode", "(", "$", "json", ",", "$", "assoc", "=", "false", ",", "$", "depth", "=", "512", ",", "$", "options", "=", "0", ")", "{", "if", "(", "$", "json", "===", "''", "||", "$", "json", "===", "null", ")", ...
Wrapper for JSON decode that implements error detection with helpful error messages. @param string $json JSON data to parse @param bool $assoc When true, returned objects will be converted into associative arrays. @param int $depth User specified recursion depth. @param int $options Bitmask of JSON deco...
[ "Wrapper", "for", "JSON", "decode", "that", "implements", "error", "detection", "with", "helpful", "error", "messages", "." ]
9588a489c52b27e2d4047f146ddacffc3e111b7e
https://github.com/akumar2-velsof/guzzlehttp/blob/9588a489c52b27e2d4047f146ddacffc3e111b7e/src/Utils.php#L132-L159
204,816
akumar2-velsof/guzzlehttp
src/Utils.php
Utils.getDefaultHandler
public static function getDefaultHandler() { $default = $future = null; if (extension_loaded('curl')) { $config = [ 'select_timeout' => getenv('GUZZLE_CURL_SELECT_TIMEOUT') ?: 1 ]; if ($maxHandles = getenv('GUZZLE_CURL_MAX_HANDLES')) { ...
php
public static function getDefaultHandler() { $default = $future = null; if (extension_loaded('curl')) { $config = [ 'select_timeout' => getenv('GUZZLE_CURL_SELECT_TIMEOUT') ?: 1 ]; if ($maxHandles = getenv('GUZZLE_CURL_MAX_HANDLES')) { ...
[ "public", "static", "function", "getDefaultHandler", "(", ")", "{", "$", "default", "=", "$", "future", "=", "null", ";", "if", "(", "extension_loaded", "(", "'curl'", ")", ")", "{", "$", "config", "=", "[", "'select_timeout'", "=>", "getenv", "(", "'GUZ...
Create a default handler to use based on the environment @throws \RuntimeException if no viable Handler is available.
[ "Create", "a", "default", "handler", "to", "use", "based", "on", "the", "environment" ]
9588a489c52b27e2d4047f146ddacffc3e111b7e
https://github.com/akumar2-velsof/guzzlehttp/blob/9588a489c52b27e2d4047f146ddacffc3e111b7e/src/Utils.php#L185-L214
204,817
mlocati/concrete5-translation-library
src/Parser.php
Parser.parseDirectory
final public function parseDirectory($rootDirectory, $relativePath, $translations = null, $subParsersFilter = false, $exclude3rdParty = true) { if (!is_object($translations)) { $translations = new \Gettext\Translations(); } $dir = (string) $rootDirectory; if ($dir !== '')...
php
final public function parseDirectory($rootDirectory, $relativePath, $translations = null, $subParsersFilter = false, $exclude3rdParty = true) { if (!is_object($translations)) { $translations = new \Gettext\Translations(); } $dir = (string) $rootDirectory; if ($dir !== '')...
[ "final", "public", "function", "parseDirectory", "(", "$", "rootDirectory", ",", "$", "relativePath", ",", "$", "translations", "=", "null", ",", "$", "subParsersFilter", "=", "false", ",", "$", "exclude3rdParty", "=", "true", ")", "{", "if", "(", "!", "is...
Extracts translations from a directory. @param string $rootDirectory The base directory where we start looking translations from @param string $relativePath The relative path (translations references will be prepended with this path) @param \Gettext\Translations...
[ "Extracts", "translations", "from", "a", "directory", "." ]
26f806c8c1ecb6ce63115a4058ab396303622e00
https://github.com/mlocati/concrete5-translation-library/blob/26f806c8c1ecb6ce63115a4058ab396303622e00/src/Parser.php#L74-L98
204,818
mlocati/concrete5-translation-library
src/Parser.php
Parser.parseRunningConcrete5
final public function parseRunningConcrete5($translations = null, $subParsersFilter = false) { if (!is_object($translations)) { $translations = new \Gettext\Translations(); } $runningVersion = ''; if (defined('\C5_EXECUTE') && defined('\APP_VERSION') && is_string(\APP_VER...
php
final public function parseRunningConcrete5($translations = null, $subParsersFilter = false) { if (!is_object($translations)) { $translations = new \Gettext\Translations(); } $runningVersion = ''; if (defined('\C5_EXECUTE') && defined('\APP_VERSION') && is_string(\APP_VER...
[ "final", "public", "function", "parseRunningConcrete5", "(", "$", "translations", "=", "null", ",", "$", "subParsersFilter", "=", "false", ")", "{", "if", "(", "!", "is_object", "(", "$", "translations", ")", ")", "{", "$", "translations", "=", "new", "\\"...
Extracts translations from a running concrete5 instance. @param \Gettext\Translations|null=null $translations The translations object where the translatable strings will be added (if null we'll create a new Translations instance) @param array|false $subParsersFilter A list of sub-parsers handle...
[ "Extracts", "translations", "from", "a", "running", "concrete5", "instance", "." ]
26f806c8c1ecb6ce63115a4058ab396303622e00
https://github.com/mlocati/concrete5-translation-library/blob/26f806c8c1ecb6ce63115a4058ab396303622e00/src/Parser.php#L134-L149
204,819
mlocati/concrete5-translation-library
src/Parser.php
Parser.getDirectoryStructure
final protected static function getDirectoryStructure($rootDirectory, $exclude3rdParty = true) { $rootDirectory = rtrim(str_replace(DIRECTORY_SEPARATOR, '/', $rootDirectory), '/'); if (!isset(self::$cache[__FUNCTION__])) { self::$cache[__FUNCTION__] = array(); } $cacheKey...
php
final protected static function getDirectoryStructure($rootDirectory, $exclude3rdParty = true) { $rootDirectory = rtrim(str_replace(DIRECTORY_SEPARATOR, '/', $rootDirectory), '/'); if (!isset(self::$cache[__FUNCTION__])) { self::$cache[__FUNCTION__] = array(); } $cacheKey...
[ "final", "protected", "static", "function", "getDirectoryStructure", "(", "$", "rootDirectory", ",", "$", "exclude3rdParty", "=", "true", ")", "{", "$", "rootDirectory", "=", "rtrim", "(", "str_replace", "(", "DIRECTORY_SEPARATOR", ",", "'/'", ",", "$", "rootDir...
Returns the directory structure underneath a given directory. @param string $rootDirectory The root directory @param bool $exclude3rdParty=true Exclude concrete5 3rd party directories (namely directories called 'vendor' and '3rdparty') @return array
[ "Returns", "the", "directory", "structure", "underneath", "a", "given", "directory", "." ]
26f806c8c1ecb6ce63115a4058ab396303622e00
https://github.com/mlocati/concrete5-translation-library/blob/26f806c8c1ecb6ce63115a4058ab396303622e00/src/Parser.php#L189-L201
204,820
mlocati/concrete5-translation-library
src/Parser.php
Parser.getAllParsers
final public static function getAllParsers() { $result = array(); $dir = __DIR__.'/Parser'; if (is_dir($dir) && is_readable($dir)) { $matches = null; foreach (scandir($dir) as $item) { if (($item[0] !== '.') && preg_match('/^(.+)\.php$/i', $item, $matc...
php
final public static function getAllParsers() { $result = array(); $dir = __DIR__.'/Parser'; if (is_dir($dir) && is_readable($dir)) { $matches = null; foreach (scandir($dir) as $item) { if (($item[0] !== '.') && preg_match('/^(.+)\.php$/i', $item, $matc...
[ "final", "public", "static", "function", "getAllParsers", "(", ")", "{", "$", "result", "=", "array", "(", ")", ";", "$", "dir", "=", "__DIR__", ".", "'/Parser'", ";", "if", "(", "is_dir", "(", "$", "dir", ")", "&&", "is_readable", "(", "$", "dir", ...
Retrieves all the available parsers. @return array[\C5TL\Parser]
[ "Retrieves", "all", "the", "available", "parsers", "." ]
26f806c8c1ecb6ce63115a4058ab396303622e00
https://github.com/mlocati/concrete5-translation-library/blob/26f806c8c1ecb6ce63115a4058ab396303622e00/src/Parser.php#L256-L271
204,821
CodeCollab/Http
src/Cookie/Cookie.php
Cookie.send
public function send() { setcookie( $this->name, $this->value, (int) $this->expire->format('U'), $this->path, $this->domain, $this->secure, $this->httpOnly ); }
php
public function send() { setcookie( $this->name, $this->value, (int) $this->expire->format('U'), $this->path, $this->domain, $this->secure, $this->httpOnly ); }
[ "public", "function", "send", "(", ")", "{", "setcookie", "(", "$", "this", "->", "name", ",", "$", "this", "->", "value", ",", "(", "int", ")", "$", "this", "->", "expire", "->", "format", "(", "'U'", ")", ",", "$", "this", "->", "path", ",", ...
Sends the cookie header
[ "Sends", "the", "cookie", "header" ]
b1f8306b20daebcf26ed4b13c032c5bc008a0861
https://github.com/CodeCollab/Http/blob/b1f8306b20daebcf26ed4b13c032c5bc008a0861/src/Cookie/Cookie.php#L85-L96
204,822
luoxiaojun1992/lb_framework
components/Route.php
Route.triggerAopEvent
protected static function triggerAopEvent( $controller_id, $action_name, $request = null, $response = null ) { $context = [ 'controller_id' => $controller_id, 'action_id' => $action_name, ]; if ($request) { $context['re...
php
protected static function triggerAopEvent( $controller_id, $action_name, $request = null, $response = null ) { $context = [ 'controller_id' => $controller_id, 'action_id' => $action_name, ]; if ($request) { $context['re...
[ "protected", "static", "function", "triggerAopEvent", "(", "$", "controller_id", ",", "$", "action_name", ",", "$", "request", "=", "null", ",", "$", "response", "=", "null", ")", "{", "$", "context", "=", "[", "'controller_id'", "=>", "$", "controller_id", ...
Trigger AOP Event @param $controller_id @param $action_name @param null $request @param null $response
[ "Trigger", "AOP", "Event" ]
12a865729e7738d7d1e07371ad7203243c4571fa
https://github.com/luoxiaojun1992/lb_framework/blob/12a865729e7738d7d1e07371ad7203243c4571fa/components/Route.php#L295-L320
204,823
vincenttouzet/BootstrapFormBundle
Form/DataTransformer/DateRangeToStringTransformer.php
DateRangeToStringTransformer.transform
public function transform($value) { if ( $value ) { $from = ''; if ( $value->getFrom() ) { $from = $value->getFrom()->format('Y-m-d'); } $to = ''; if ( $value->getTo() ) { $to = $value->getTo()->format('Y-m-d'); ...
php
public function transform($value) { if ( $value ) { $from = ''; if ( $value->getFrom() ) { $from = $value->getFrom()->format('Y-m-d'); } $to = ''; if ( $value->getTo() ) { $to = $value->getTo()->format('Y-m-d'); ...
[ "public", "function", "transform", "(", "$", "value", ")", "{", "if", "(", "$", "value", ")", "{", "$", "from", "=", "''", ";", "if", "(", "$", "value", "->", "getFrom", "(", ")", ")", "{", "$", "from", "=", "$", "value", "->", "getFrom", "(", ...
Transforms a DateRange into a string. @param DateRange $value DateRange value. @return string string value.
[ "Transforms", "a", "DateRange", "into", "a", "string", "." ]
d648c825ca9f7020336023e82a1059fc070727ac
https://github.com/vincenttouzet/BootstrapFormBundle/blob/d648c825ca9f7020336023e82a1059fc070727ac/Form/DataTransformer/DateRangeToStringTransformer.php#L48-L66
204,824
vincenttouzet/BootstrapFormBundle
Form/DataTransformer/DateRangeToStringTransformer.php
DateRangeToStringTransformer.reverseTransform
public function reverseTransform($value) { $parts = explode($this->dateSeparator, $value); $from = isset($parts[0]) ? $parts[0] : null; $to = isset($parts[1]) ? $parts[1] : null; return new DAteRange($from, $to); }
php
public function reverseTransform($value) { $parts = explode($this->dateSeparator, $value); $from = isset($parts[0]) ? $parts[0] : null; $to = isset($parts[1]) ? $parts[1] : null; return new DAteRange($from, $to); }
[ "public", "function", "reverseTransform", "(", "$", "value", ")", "{", "$", "parts", "=", "explode", "(", "$", "this", "->", "dateSeparator", ",", "$", "value", ")", ";", "$", "from", "=", "isset", "(", "$", "parts", "[", "0", "]", ")", "?", "$", ...
Transforms a string into a DateRange. @param string $value String value. @return DateRange DateRange value.
[ "Transforms", "a", "string", "into", "a", "DateRange", "." ]
d648c825ca9f7020336023e82a1059fc070727ac
https://github.com/vincenttouzet/BootstrapFormBundle/blob/d648c825ca9f7020336023e82a1059fc070727ac/Form/DataTransformer/DateRangeToStringTransformer.php#L75-L81
204,825
cyberspectrum/i18n-contao
src/Extractor/TableExtractor.php
TableExtractor.decode
private function decode(array $row): ?array { if (null === ($encoded = $row[$this->name()])) { return null; } if (false === ($decoded = unserialize($encoded, ['allowed_classes' => false]))) { return null; } if (!\is_array($decoded)) { ret...
php
private function decode(array $row): ?array { if (null === ($encoded = $row[$this->name()])) { return null; } if (false === ($decoded = unserialize($encoded, ['allowed_classes' => false]))) { return null; } if (!\is_array($decoded)) { ret...
[ "private", "function", "decode", "(", "array", "$", "row", ")", ":", "?", "array", "{", "if", "(", "null", "===", "(", "$", "encoded", "=", "$", "row", "[", "$", "this", "->", "name", "(", ")", "]", ")", ")", "{", "return", "null", ";", "}", ...
Decode the row value. @param array $row The row. @return array|null
[ "Decode", "the", "row", "value", "." ]
038cf6ea9c609a734d7476fba256bc4b0db236b7
https://github.com/cyberspectrum/i18n-contao/blob/038cf6ea9c609a734d7476fba256bc4b0db236b7/src/Extractor/TableExtractor.php#L144-L158
204,826
ARCANEDEV/Markup
src/Entities/Tag/ElementCollection.php
ElementCollection.render
public function render() { $output = $this->each(function($tag) { /** @var Tag $tag */ return $tag->render(); }); return implode('', $output->toArray()); }
php
public function render() { $output = $this->each(function($tag) { /** @var Tag $tag */ return $tag->render(); }); return implode('', $output->toArray()); }
[ "public", "function", "render", "(", ")", "{", "$", "output", "=", "$", "this", "->", "each", "(", "function", "(", "$", "tag", ")", "{", "/** @var Tag $tag */", "return", "$", "tag", "->", "render", "(", ")", ";", "}", ")", ";", "return", "implode",...
Render tag elements @return string
[ "Render", "tag", "elements" ]
881331df74b27614d025c365daacbae6aa865612
https://github.com/ARCANEDEV/Markup/blob/881331df74b27614d025c365daacbae6aa865612/src/Entities/Tag/ElementCollection.php#L56-L64
204,827
ARCANEDEV/Markup
src/Entities/Tag/ElementCollection.php
ElementCollection.getNextItem
private function getNextItem(Tag $item, $items) { $currentItem = $items[0]; while ($currentItem !== null and $currentItem !== $item) { $currentItem = next($items); } $next = next($items); return $next !== false ? $next : null; }
php
private function getNextItem(Tag $item, $items) { $currentItem = $items[0]; while ($currentItem !== null and $currentItem !== $item) { $currentItem = next($items); } $next = next($items); return $next !== false ? $next : null; }
[ "private", "function", "getNextItem", "(", "Tag", "$", "item", ",", "$", "items", ")", "{", "$", "currentItem", "=", "$", "items", "[", "0", "]", ";", "while", "(", "$", "currentItem", "!==", "null", "and", "$", "currentItem", "!==", "$", "item", ")"...
Get next item from items array @param Tag $item @param array $items @return Tag|null
[ "Get", "next", "item", "from", "items", "array" ]
881331df74b27614d025c365daacbae6aa865612
https://github.com/ARCANEDEV/Markup/blob/881331df74b27614d025c365daacbae6aa865612/src/Entities/Tag/ElementCollection.php#L78-L89
204,828
ARCANEDEV/Markup
src/Entities/Tag/ElementCollection.php
ElementCollection.remove
public function remove($tag) { if ($this->count() == 0) { return [$this, null]; } $deleted = null; foreach ($this->items as $key => $element) { if ($element === $tag) { $this->forget($key); $deleted = $tag; b...
php
public function remove($tag) { if ($this->count() == 0) { return [$this, null]; } $deleted = null; foreach ($this->items as $key => $element) { if ($element === $tag) { $this->forget($key); $deleted = $tag; b...
[ "public", "function", "remove", "(", "$", "tag", ")", "{", "if", "(", "$", "this", "->", "count", "(", ")", "==", "0", ")", "{", "return", "[", "$", "this", ",", "null", "]", ";", "}", "$", "deleted", "=", "null", ";", "foreach", "(", "$", "t...
Remove tag element from collection @param Tag $tag @return array
[ "Remove", "tag", "element", "from", "collection" ]
881331df74b27614d025c365daacbae6aa865612
https://github.com/ARCANEDEV/Markup/blob/881331df74b27614d025c365daacbae6aa865612/src/Entities/Tag/ElementCollection.php#L98-L117
204,829
sellerlabs/php-standard
src/SellerLabs/Standards/Chroma/Sniffs/Commenting/FunctionCommentSniff.php
Chroma_Sniffs_Commenting_FunctionCommentSniff.findUseStatements
protected function findUseStatements(File $file) { if (array_key_exists($file->getFilename(), static::$useCache)) { return static::$useCache[$file->getFilename()]; } $tokens = $file->getTokens(); $usePosition = $file->findNext(T_USE, 0); $useStatements = []; ...
php
protected function findUseStatements(File $file) { if (array_key_exists($file->getFilename(), static::$useCache)) { return static::$useCache[$file->getFilename()]; } $tokens = $file->getTokens(); $usePosition = $file->findNext(T_USE, 0); $useStatements = []; ...
[ "protected", "function", "findUseStatements", "(", "File", "$", "file", ")", "{", "if", "(", "array_key_exists", "(", "$", "file", "->", "getFilename", "(", ")", ",", "static", "::", "$", "useCache", ")", ")", "{", "return", "static", "::", "$", "useCach...
Find all use statements. @param PHP_CodeSniffer_File $file @return array
[ "Find", "all", "use", "statements", "." ]
cd5c919c5aad1aba6f2486a81867172d0eb167f7
https://github.com/sellerlabs/php-standard/blob/cd5c919c5aad1aba6f2486a81867172d0eb167f7/src/SellerLabs/Standards/Chroma/Sniffs/Commenting/FunctionCommentSniff.php#L323-L391
204,830
sellerlabs/php-standard
src/SellerLabs/Standards/Chroma/Sniffs/Commenting/FunctionCommentSniff.php
Chroma_Sniffs_Commenting_FunctionCommentSniff.shouldIgnoreUse
protected function shouldIgnoreUse(File $file, $stackPtr) { $tokens = $file->getTokens(); // Ignore USE keywords inside closures. $next = $file->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); if ($tokens[$next]['code'] === T_OPEN_PARENTHESIS) { return true; ...
php
protected function shouldIgnoreUse(File $file, $stackPtr) { $tokens = $file->getTokens(); // Ignore USE keywords inside closures. $next = $file->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); if ($tokens[$next]['code'] === T_OPEN_PARENTHESIS) { return true; ...
[ "protected", "function", "shouldIgnoreUse", "(", "File", "$", "file", ",", "$", "stackPtr", ")", "{", "$", "tokens", "=", "$", "file", "->", "getTokens", "(", ")", ";", "// Ignore USE keywords inside closures.", "$", "next", "=", "$", "file", "->", "findNext...
Check whether or not a USE statement should be ignored. @param PHP_CodeSniffer_File $file @param $stackPtr @return bool
[ "Check", "whether", "or", "not", "a", "USE", "statement", "should", "be", "ignored", "." ]
cd5c919c5aad1aba6f2486a81867172d0eb167f7
https://github.com/sellerlabs/php-standard/blob/cd5c919c5aad1aba6f2486a81867172d0eb167f7/src/SellerLabs/Standards/Chroma/Sniffs/Commenting/FunctionCommentSniff.php#L401-L417
204,831
sellerlabs/php-standard
src/SellerLabs/Standards/Chroma/Sniffs/Commenting/FunctionCommentSniff.php
Chroma_Sniffs_Commenting_FunctionCommentSniff.resolveArrayType
protected function resolveArrayType($type) { if (strrpos($type, '[]', -2) !== false) { return substr($type, 0, strlen($type) - 2); } return $type; }
php
protected function resolveArrayType($type) { if (strrpos($type, '[]', -2) !== false) { return substr($type, 0, strlen($type) - 2); } return $type; }
[ "protected", "function", "resolveArrayType", "(", "$", "type", ")", "{", "if", "(", "strrpos", "(", "$", "type", ",", "'[]'", ",", "-", "2", ")", "!==", "false", ")", "{", "return", "substr", "(", "$", "type", ",", "0", ",", "strlen", "(", "$", "...
Attempt to resolve the type of an array. @param $type @return string
[ "Attempt", "to", "resolve", "the", "type", "of", "an", "array", "." ]
cd5c919c5aad1aba6f2486a81867172d0eb167f7
https://github.com/sellerlabs/php-standard/blob/cd5c919c5aad1aba6f2486a81867172d0eb167f7/src/SellerLabs/Standards/Chroma/Sniffs/Commenting/FunctionCommentSniff.php#L468-L475
204,832
sellerlabs/php-standard
src/SellerLabs/Standards/Chroma/Sniffs/Commenting/FunctionCommentSniff.php
Chroma_Sniffs_Commenting_FunctionCommentSniff.extractNamespace
protected function extractNamespace( File $file ) { $namespace = ''; $tokens = $file->getTokens(); $prev = $file->findNext(T_NAMESPACE, 0); for ($i = $prev + 2; $i < count($tokens); $i++) { if (!in_array($tokens[$i]['code'], [T_STRING, T_NS_SEPARATOR])) { ...
php
protected function extractNamespace( File $file ) { $namespace = ''; $tokens = $file->getTokens(); $prev = $file->findNext(T_NAMESPACE, 0); for ($i = $prev + 2; $i < count($tokens); $i++) { if (!in_array($tokens[$i]['code'], [T_STRING, T_NS_SEPARATOR])) { ...
[ "protected", "function", "extractNamespace", "(", "File", "$", "file", ")", "{", "$", "namespace", "=", "''", ";", "$", "tokens", "=", "$", "file", "->", "getTokens", "(", ")", ";", "$", "prev", "=", "$", "file", "->", "findNext", "(", "T_NAMESPACE", ...
Extract the first namespace found in the file. @param PHP_CodeSniffer_File $file @return string
[ "Extract", "the", "first", "namespace", "found", "in", "the", "file", "." ]
cd5c919c5aad1aba6f2486a81867172d0eb167f7
https://github.com/sellerlabs/php-standard/blob/cd5c919c5aad1aba6f2486a81867172d0eb167f7/src/SellerLabs/Standards/Chroma/Sniffs/Commenting/FunctionCommentSniff.php#L561-L579
204,833
LapaLabs/YoutubeHelper
Resource/YoutubeResource.php
YoutubeResource.buildEmbedHtml
public function buildEmbedHtml(array $attributes = [], array $parameters = []) { // <iframe width="560" height="315" src="https://www.youtube.com/embed/5qanlirrRWs" frameborder="0" allowfullscreen></iframe> $attributes = array_merge($this->attributes, $attributes, [ 'src' => $this->build...
php
public function buildEmbedHtml(array $attributes = [], array $parameters = []) { // <iframe width="560" height="315" src="https://www.youtube.com/embed/5qanlirrRWs" frameborder="0" allowfullscreen></iframe> $attributes = array_merge($this->attributes, $attributes, [ 'src' => $this->build...
[ "public", "function", "buildEmbedHtml", "(", "array", "$", "attributes", "=", "[", "]", ",", "array", "$", "parameters", "=", "[", "]", ")", "{", "// <iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/5qanlirrRWs\" frameborder=\"0\" allowfullscreen></ifram...
Build the valid HTML code to embed this resource @param array $attributes @param array $parameters @return string
[ "Build", "the", "valid", "HTML", "code", "to", "embed", "this", "resource" ]
b94fd4700881494d24f14fb39ed8093215d0b25b
https://github.com/LapaLabs/YoutubeHelper/blob/b94fd4700881494d24f14fb39ed8093215d0b25b/Resource/YoutubeResource.php#L230-L247
204,834
cityware/city-format
src/Text.php
Text.slugify
public static function slugify($title, $length = 200) { $title = strip_tags($title); // Preserve escaped octets. $title = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '---$1---', $title); // Remove percent signs that are not part of an octet. $title = str_replace('%', '', $title);...
php
public static function slugify($title, $length = 200) { $title = strip_tags($title); // Preserve escaped octets. $title = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '---$1---', $title); // Remove percent signs that are not part of an octet. $title = str_replace('%', '', $title);...
[ "public", "static", "function", "slugify", "(", "$", "title", ",", "$", "length", "=", "200", ")", "{", "$", "title", "=", "strip_tags", "(", "$", "title", ")", ";", "// Preserve escaped octets.", "$", "title", "=", "preg_replace", "(", "'|%([a-fA-F0-9][a-fA...
Sanitizes title, replacing whitespace with dashes. Limits the output to alphanumeric characters, underscore (_) and dash (-). Whitespace becomes a dash. @param string $title The title to be sanitized. @return string The sanitized title.
[ "Sanitizes", "title", "replacing", "whitespace", "with", "dashes", "." ]
1e292670639a950ecf561b545462427512950c74
https://github.com/cityware/city-format/blob/1e292670639a950ecf561b545462427512950c74/src/Text.php#L234-L257
204,835
headzoo/web-tools
src/Headzoo/Web/Tools/WebServer.php
WebServer.sendResponseHeadersToClient
protected function sendResponseHeadersToClient(WebRequest $request, $code, $message) { $headers = [ "Date" => gmdate("D, d M Y H:i:s T"), "Connection" => "close" ]; $bytes = $this->sendToClient($request->getVersion() . " {$code} {$message}\r\n"); ...
php
protected function sendResponseHeadersToClient(WebRequest $request, $code, $message) { $headers = [ "Date" => gmdate("D, d M Y H:i:s T"), "Connection" => "close" ]; $bytes = $this->sendToClient($request->getVersion() . " {$code} {$message}\r\n"); ...
[ "protected", "function", "sendResponseHeadersToClient", "(", "WebRequest", "$", "request", ",", "$", "code", ",", "$", "message", ")", "{", "$", "headers", "=", "[", "\"Date\"", "=>", "gmdate", "(", "\"D, d M Y H:i:s T\"", ")", ",", "\"Connection\"", "=>", "\"...
Sends the response headers through the client socket Returns the number of bytes sent. @param WebRequest $request The http request @param int $code The http status code to sent @param string $message The http status message to send @return int
[ "Sends", "the", "response", "headers", "through", "the", "client", "socket" ]
305ce78029b86fa1fadaf8341d8fc737c84eab87
https://github.com/headzoo/web-tools/blob/305ce78029b86fa1fadaf8341d8fc737c84eab87/src/Headzoo/Web/Tools/WebServer.php#L231-L245
204,836
headzoo/web-tools
src/Headzoo/Web/Tools/WebServer.php
WebServer.sendToClient
protected function sendToClient($line) { $bytes = 0; $len = strlen($line); if ($len) { while(true) { $sent = socket_write($this->client, $line, $len); if (false === $sent) { throw new Exceptions\HttpStatusError( ...
php
protected function sendToClient($line) { $bytes = 0; $len = strlen($line); if ($len) { while(true) { $sent = socket_write($this->client, $line, $len); if (false === $sent) { throw new Exceptions\HttpStatusError( ...
[ "protected", "function", "sendToClient", "(", "$", "line", ")", "{", "$", "bytes", "=", "0", ";", "$", "len", "=", "strlen", "(", "$", "line", ")", ";", "if", "(", "$", "len", ")", "{", "while", "(", "true", ")", "{", "$", "sent", "=", "socket_...
Sends a string through the client socket Returns the number of bytes sent. @param string $line The string to send @return int @throws Exceptions\HttpStatusError
[ "Sends", "a", "string", "through", "the", "client", "socket" ]
305ce78029b86fa1fadaf8341d8fc737c84eab87
https://github.com/headzoo/web-tools/blob/305ce78029b86fa1fadaf8341d8fc737c84eab87/src/Headzoo/Web/Tools/WebServer.php#L256-L281
204,837
headzoo/web-tools
src/Headzoo/Web/Tools/WebServer.php
WebServer.getFile
protected function getFile(WebRequest $request) { $path = realpath($this->dirRoot . DIRECTORY_SEPARATOR . $request->getPath()); if (false === $path) { throw new Exceptions\HttpStatusError( "File not found.", 404 ); } if (is_dir(...
php
protected function getFile(WebRequest $request) { $path = realpath($this->dirRoot . DIRECTORY_SEPARATOR . $request->getPath()); if (false === $path) { throw new Exceptions\HttpStatusError( "File not found.", 404 ); } if (is_dir(...
[ "protected", "function", "getFile", "(", "WebRequest", "$", "request", ")", "{", "$", "path", "=", "realpath", "(", "$", "this", "->", "dirRoot", ".", "DIRECTORY_SEPARATOR", ".", "$", "request", "->", "getPath", "(", ")", ")", ";", "if", "(", "false", ...
Returns the data for the requested file @param WebRequest $request The http request @return string @throws Exceptions\HttpStatusError
[ "Returns", "the", "data", "for", "the", "requested", "file" ]
305ce78029b86fa1fadaf8341d8fc737c84eab87
https://github.com/headzoo/web-tools/blob/305ce78029b86fa1fadaf8341d8fc737c84eab87/src/Headzoo/Web/Tools/WebServer.php#L290-L316
204,838
timostamm/url-builder
src/UrlPath.php
UrlPath.parseComponent
public function parseComponent($str) { if (! is_string($str)) { throw new InvalidUrlException('Unexpected type.'); } if (strpos($str, ' ') !== false) { throw new InvalidUrlException('Path contains whitespace.'); } $p = explode('/', $str); foreach ($p as $i => $v) { $p[$i] = rawurldecode($v); } ...
php
public function parseComponent($str) { if (! is_string($str)) { throw new InvalidUrlException('Unexpected type.'); } if (strpos($str, ' ') !== false) { throw new InvalidUrlException('Path contains whitespace.'); } $p = explode('/', $str); foreach ($p as $i => $v) { $p[$i] = rawurldecode($v); } ...
[ "public", "function", "parseComponent", "(", "$", "str", ")", "{", "if", "(", "!", "is_string", "(", "$", "str", ")", ")", "{", "throw", "new", "InvalidUrlException", "(", "'Unexpected type.'", ")", ";", "}", "if", "(", "strpos", "(", "$", "str", ",", ...
Parses a path component as it appears in a URL. @param string $str @throws \InvalidArgumentException
[ "Parses", "a", "path", "component", "as", "it", "appears", "in", "a", "URL", "." ]
9dec80635017415d83b7e6ef155e9324f4b27a00
https://github.com/timostamm/url-builder/blob/9dec80635017415d83b7e6ef155e9324f4b27a00/src/UrlPath.php#L41-L55
204,839
timostamm/url-builder
src/UrlPath.php
UrlPath.get
public function get() { if (is_null($this->url)) { return $this->path->get(); } if (! $this->url->host->isEmpty()) { return Path::info('/')->resolve($this->path)->get(); } return $this->path->get(); }
php
public function get() { if (is_null($this->url)) { return $this->path->get(); } if (! $this->url->host->isEmpty()) { return Path::info('/')->resolve($this->path)->get(); } return $this->path->get(); }
[ "public", "function", "get", "(", ")", "{", "if", "(", "is_null", "(", "$", "this", "->", "url", ")", ")", "{", "return", "$", "this", "->", "path", "->", "get", "(", ")", ";", "}", "if", "(", "!", "$", "this", "->", "url", "->", "host", "->"...
Returns the decoded path. The path will start with a slash if the host is set, regardless whether the slash was present in the parsed URL and regardless whether you included the slash when setting the path via set(). Please not that __toString() does not prepend the slash. @return string
[ "Returns", "the", "decoded", "path", "." ]
9dec80635017415d83b7e6ef155e9324f4b27a00
https://github.com/timostamm/url-builder/blob/9dec80635017415d83b7e6ef155e9324f4b27a00/src/UrlPath.php#L68-L77
204,840
timostamm/url-builder
src/UrlPath.php
UrlPath.set
public function set($str) { if ($str instanceof Path) { $this->path->set($str->get()); } else if ($str instanceof UrlPath) { $this->path->set($str->get()); } else if (is_string($str)) { $this->path->set($str); } else { throw new \InvalidArgumentException('Unexpected type.'); } }
php
public function set($str) { if ($str instanceof Path) { $this->path->set($str->get()); } else if ($str instanceof UrlPath) { $this->path->set($str->get()); } else if (is_string($str)) { $this->path->set($str); } else { throw new \InvalidArgumentException('Unexpected type.'); } }
[ "public", "function", "set", "(", "$", "str", ")", "{", "if", "(", "$", "str", "instanceof", "Path", ")", "{", "$", "this", "->", "path", "->", "set", "(", "$", "str", "->", "get", "(", ")", ")", ";", "}", "else", "if", "(", "$", "str", "inst...
Sets the decoded path. @param string|UrlPath|Path $str @throws \InvalidArgumentException
[ "Sets", "the", "decoded", "path", "." ]
9dec80635017415d83b7e6ef155e9324f4b27a00
https://github.com/timostamm/url-builder/blob/9dec80635017415d83b7e6ef155e9324f4b27a00/src/UrlPath.php#L85-L96
204,841
timostamm/url-builder
src/UrlPath.php
UrlPath.isAbsolute
public function isAbsolute() { if (! is_null($this->url) && $this->path->isEmpty()) { return ! $this->url->host->isEmpty(); } return $this->path->isAbsolute(); }
php
public function isAbsolute() { if (! is_null($this->url) && $this->path->isEmpty()) { return ! $this->url->host->isEmpty(); } return $this->path->isAbsolute(); }
[ "public", "function", "isAbsolute", "(", ")", "{", "if", "(", "!", "is_null", "(", "$", "this", "->", "url", ")", "&&", "$", "this", "->", "path", "->", "isEmpty", "(", ")", ")", "{", "return", "!", "$", "this", "->", "url", "->", "host", "->", ...
URLs can be relative if scheme and host are omitted. Examples for relative URLs are: - ../foo.html - foo.html However, they can have an absolute path at the same time: - /index.html You can use this method to determine whether the path is absolute or not. @return boolean
[ "URLs", "can", "be", "relative", "if", "scheme", "and", "host", "are", "omitted", "." ]
9dec80635017415d83b7e6ef155e9324f4b27a00
https://github.com/timostamm/url-builder/blob/9dec80635017415d83b7e6ef155e9324f4b27a00/src/UrlPath.php#L135-L141
204,842
timostamm/url-builder
src/UrlPath.php
UrlPath.dirname
public function dirname() { if (! is_null($this->url) && $this->path->isEmpty() && ! $this->url->host->isEmpty()) { return '/'; } return $this->path->dirname(); }
php
public function dirname() { if (! is_null($this->url) && $this->path->isEmpty() && ! $this->url->host->isEmpty()) { return '/'; } return $this->path->dirname(); }
[ "public", "function", "dirname", "(", ")", "{", "if", "(", "!", "is_null", "(", "$", "this", "->", "url", ")", "&&", "$", "this", "->", "path", "->", "isEmpty", "(", ")", "&&", "!", "$", "this", "->", "url", "->", "host", "->", "isEmpty", "(", ...
Return the path excluding the filename. If the URL has a host but no path, we still return '/'. @return string
[ "Return", "the", "path", "excluding", "the", "filename", "." ]
9dec80635017415d83b7e6ef155e9324f4b27a00
https://github.com/timostamm/url-builder/blob/9dec80635017415d83b7e6ef155e9324f4b27a00/src/UrlPath.php#L160-L166
204,843
3ev/wordpress-core
src/Tev/Field/Model/ImageField.php
ImageField.sizeUrl
public function sizeUrl($size) { if (($this->base['return_format'] === 'array') && isset($this->base['value']['sizes'][$size])) { return $this->base['value']['sizes'][$size]; } elseif ($this->base['return_format'] === 'id') { if ($src = wp_get_attachment_image_src($this->id()...
php
public function sizeUrl($size) { if (($this->base['return_format'] === 'array') && isset($this->base['value']['sizes'][$size])) { return $this->base['value']['sizes'][$size]; } elseif ($this->base['return_format'] === 'id') { if ($src = wp_get_attachment_image_src($this->id()...
[ "public", "function", "sizeUrl", "(", "$", "size", ")", "{", "if", "(", "(", "$", "this", "->", "base", "[", "'return_format'", "]", "===", "'array'", ")", "&&", "isset", "(", "$", "this", "->", "base", "[", "'value'", "]", "[", "'sizes'", "]", "["...
Get an image URL of a specic size. @param string $size Image size (e.g thumbnail, large or custom size) @return string Image URL
[ "Get", "an", "image", "URL", "of", "a", "specic", "size", "." ]
da674fbec5bf3d5bd2a2141680a4c141113eb6b0
https://github.com/3ev/wordpress-core/blob/da674fbec5bf3d5bd2a2141680a4c141113eb6b0/src/Tev/Field/Model/ImageField.php#L86-L97
204,844
SpoonX/SxBootstrap
src/SxBootstrap/View/Helper/Bootstrap/Tooltip.php
Tooltip.setOption
public function setOption($key, $value) { if (!in_array($key, $this->availableOptions)) { throw new Exception\InvalidArgumentException('Invalid option for Tooltip'); } if (is_bool($value)) { $value = $value ? 'true' : 'false'; } if (!is_string($value...
php
public function setOption($key, $value) { if (!in_array($key, $this->availableOptions)) { throw new Exception\InvalidArgumentException('Invalid option for Tooltip'); } if (is_bool($value)) { $value = $value ? 'true' : 'false'; } if (!is_string($value...
[ "public", "function", "setOption", "(", "$", "key", ",", "$", "value", ")", "{", "if", "(", "!", "in_array", "(", "$", "key", ",", "$", "this", "->", "availableOptions", ")", ")", "{", "throw", "new", "Exception", "\\", "InvalidArgumentException", "(", ...
Set a single option to the Tooltip @param string $key @param string $value @return \SxBootstrap\View\Helper\Bootstrap\Label @throws Exception\InvalidArgumentException
[ "Set", "a", "single", "option", "to", "the", "Tooltip" ]
768b02e3b65f7dfe560e821cb0ff41ad3f86b3b6
https://github.com/SpoonX/SxBootstrap/blob/768b02e3b65f7dfe560e821cb0ff41ad3f86b3b6/src/SxBootstrap/View/Helper/Bootstrap/Tooltip.php#L145-L165
204,845
zara-4/php-sdk
Zara4/API/Communication/Util.php
Util.currentIpAddress
public static function currentIpAddress() { // // Just get the headers if we can or else use the SERVER global // if (function_exists('apache_request_headers')) { $headers = apache_request_headers(); } else { $headers = $_SERVER; } // // Get the forwarded IP if it exists ...
php
public static function currentIpAddress() { // // Just get the headers if we can or else use the SERVER global // if (function_exists('apache_request_headers')) { $headers = apache_request_headers(); } else { $headers = $_SERVER; } // // Get the forwarded IP if it exists ...
[ "public", "static", "function", "currentIpAddress", "(", ")", "{", "//", "// Just get the headers if we can or else use the SERVER global", "//", "if", "(", "function_exists", "(", "'apache_request_headers'", ")", ")", "{", "$", "headers", "=", "apache_request_headers", "...
Get the ip address from the current request. @return String
[ "Get", "the", "ip", "address", "from", "the", "current", "request", "." ]
33a1bc9676d9d870a0e274ca44068b207e5dae78
https://github.com/zara-4/php-sdk/blob/33a1bc9676d9d870a0e274ca44068b207e5dae78/Zara4/API/Communication/Util.php#L266-L299
204,846
schpill/thin
src/Navigation/Page.php
Page.setLabel
public function setLabel($label) { if (null !== $label && !is_string($label)) { throw new Exception( 'Invalid argument: $label must be a string or null'); } $this->_label = $label; return $this; }
php
public function setLabel($label) { if (null !== $label && !is_string($label)) { throw new Exception( 'Invalid argument: $label must be a string or null'); } $this->_label = $label; return $this; }
[ "public", "function", "setLabel", "(", "$", "label", ")", "{", "if", "(", "null", "!==", "$", "label", "&&", "!", "is_string", "(", "$", "label", ")", ")", "{", "throw", "new", "Exception", "(", "'Invalid argument: $label must be a string or null'", ")", ";"...
Sets page label @param string $label new page label @return Page fluent interface, returns self @throws Exception if empty/no string is given
[ "Sets", "page", "label" ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Navigation/Page.php#L262-L271
204,847
schpill/thin
src/Navigation/Page.php
Page.setFragment
public function setFragment($fragment) { if (null !== $fragment && !is_string($fragment)) { throw new Exception( 'Invalid argument: $fragment must be a string or null'); } $this->_fragment = $fragment; return $this; ...
php
public function setFragment($fragment) { if (null !== $fragment && !is_string($fragment)) { throw new Exception( 'Invalid argument: $fragment must be a string or null'); } $this->_fragment = $fragment; return $this; ...
[ "public", "function", "setFragment", "(", "$", "fragment", ")", "{", "if", "(", "null", "!==", "$", "fragment", "&&", "!", "is_string", "(", "$", "fragment", ")", ")", "{", "throw", "new", "Exception", "(", "'Invalid argument: $fragment must be a string or null'...
Sets a fragment identifier @param string $fragment new fragment identifier @return Page fluent interface, returns self @throws Exception if empty/no string is given
[ "Sets", "a", "fragment", "identifier" ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Navigation/Page.php#L290-L299
204,848
schpill/thin
src/Navigation/Page.php
Page.setId
public function setId($id = null) { if (null !== $id && !is_string($id) && !is_numeric($id)) { throw new Exception( 'Invalid argument: $id must be a string, number or null'); } $this->_id = null === $id ? $id : (string) $id; ...
php
public function setId($id = null) { if (null !== $id && !is_string($id) && !is_numeric($id)) { throw new Exception( 'Invalid argument: $id must be a string, number or null'); } $this->_id = null === $id ? $id : (string) $id; ...
[ "public", "function", "setId", "(", "$", "id", "=", "null", ")", "{", "if", "(", "null", "!==", "$", "id", "&&", "!", "is_string", "(", "$", "id", ")", "&&", "!", "is_numeric", "(", "$", "id", ")", ")", "{", "throw", "new", "Exception", "(", "'...
Sets page id @param string|null $id [optional] id to set. Default is null, which sets no id. @return Page fluent interface, returns self @throws Exception if not given string or null
[ "Sets", "page", "id" ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Navigation/Page.php#L319-L329
204,849
schpill/thin
src/Navigation/Page.php
Page.setTitle
public function setTitle($title = null) { if (null !== $title && !is_string($title)) { throw new Exception( 'Invalid argument: $title must be a non-empty string'); } $this->_title = $title; return $this; }
php
public function setTitle($title = null) { if (null !== $title && !is_string($title)) { throw new Exception( 'Invalid argument: $title must be a non-empty string'); } $this->_title = $title; return $this; }
[ "public", "function", "setTitle", "(", "$", "title", "=", "null", ")", "{", "if", "(", "null", "!==", "$", "title", "&&", "!", "is_string", "(", "$", "title", ")", ")", "{", "throw", "new", "Exception", "(", "'Invalid argument: $title must be a non-empty str...
Sets page title @param string $title [optional] page title. Default is null, which sets no title. @return Page fluent interface, returns self @throws Exception if not given string or null
[ "Sets", "page", "title" ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Navigation/Page.php#L379-L389
204,850
schpill/thin
src/Navigation/Page.php
Page.setTarget
public function setTarget($target = null) { if (null !== $target && !is_string($target)) { throw new Exception( 'Invalid argument: $target must be a string or null'); } $this->_target = $target; return $this; }
php
public function setTarget($target = null) { if (null !== $target && !is_string($target)) { throw new Exception( 'Invalid argument: $target must be a string or null'); } $this->_target = $target; return $this; }
[ "public", "function", "setTarget", "(", "$", "target", "=", "null", ")", "{", "if", "(", "null", "!==", "$", "target", "&&", "!", "is_string", "(", "$", "target", ")", ")", "{", "throw", "new", "Exception", "(", "'Invalid argument: $target must be a string o...
Sets page target @param string|null $target [optional] target to set. Default is null, which sets no target. @return Page fluent interface, returns self @throws Exception if target is not string or null
[ "Sets", "page", "target" ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Navigation/Page.php#L409-L419
204,851
schpill/thin
src/Navigation/Page.php
Page.setAccesskey
public function setAccesskey($character = null) { if (null !== $character && (!is_string($character) || 1 != strlen($character))) { throw new Exception( 'Invalid argument: $character must be a single character or null' )...
php
public function setAccesskey($character = null) { if (null !== $character && (!is_string($character) || 1 != strlen($character))) { throw new Exception( 'Invalid argument: $character must be a single character or null' )...
[ "public", "function", "setAccesskey", "(", "$", "character", "=", "null", ")", "{", "if", "(", "null", "!==", "$", "character", "&&", "(", "!", "is_string", "(", "$", "character", ")", "||", "1", "!=", "strlen", "(", "$", "character", ")", ")", ")", ...
Sets access key for this page @param string|null $character [optional] access key to set. Default is null, which sets no access key. @return Page fluent interface, returns self @throws Exception if access key is not string or null or if the string length not equal to one
[ "Sets", "access", "key", "for", "this", "page" ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Navigation/Page.php#L440-L453
204,852
schpill/thin
src/Navigation/Page.php
Page.setRel
public function setRel($relations = null) { $this->_rel = array(); if (null !== $relations) { if (!is_array($relations)) { throw new Exception( 'Invalid argument: $relations must be an array'); } ...
php
public function setRel($relations = null) { $this->_rel = array(); if (null !== $relations) { if (!is_array($relations)) { throw new Exception( 'Invalid argument: $relations must be an array'); } ...
[ "public", "function", "setRel", "(", "$", "relations", "=", "null", ")", "{", "$", "this", "->", "_rel", "=", "array", "(", ")", ";", "if", "(", "null", "!==", "$", "relations", ")", "{", "if", "(", "!", "is_array", "(", "$", "relations", ")", ")...
Sets the page's forward links to other pages This method expects an associative array of forward links to other pages, where each element's key is the name of the relation (e.g. alternate, prev, next, help, etc), and the value is a mixed value that could somehow be considered a page. @param array $relations [option...
[ "Sets", "the", "page", "s", "forward", "links", "to", "other", "pages" ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Navigation/Page.php#L477-L496
204,853
schpill/thin
src/Navigation/Page.php
Page.getRel
public function getRel($relation = null) { if (null !== $relation) { return isset($this->_rel[$relation]) ? $this->_rel[$relation] : null; } return $this->_rel; }
php
public function getRel($relation = null) { if (null !== $relation) { return isset($this->_rel[$relation]) ? $this->_rel[$relation] : null; } return $this->_rel; }
[ "public", "function", "getRel", "(", "$", "relation", "=", "null", ")", "{", "if", "(", "null", "!==", "$", "relation", ")", "{", "return", "isset", "(", "$", "this", "->", "_rel", "[", "$", "relation", "]", ")", "?", "$", "this", "->", "_rel", "...
Returns the page's forward links to other pages This method returns an associative array of forward links to other pages, where each element's key is the name of the relation (e.g. alternate, prev, next, help, etc), and the value is a mixed value that could somehow be considered a page. @param string $relation [opt...
[ "Returns", "the", "page", "s", "forward", "links", "to", "other", "pages" ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Navigation/Page.php#L512-L521
204,854
schpill/thin
src/Navigation/Page.php
Page.setRev
public function setRev($relations = null) { $this->_rev = array(); if (null !== $relations) { if (!is_array($relations)) { throw new Exception( 'Invalid argument: $relations must be an array'); } ...
php
public function setRev($relations = null) { $this->_rev = array(); if (null !== $relations) { if (!is_array($relations)) { throw new Exception( 'Invalid argument: $relations must be an array'); } ...
[ "public", "function", "setRev", "(", "$", "relations", "=", "null", ")", "{", "$", "this", "->", "_rev", "=", "array", "(", ")", ";", "if", "(", "null", "!==", "$", "relations", ")", "{", "if", "(", "!", "is_array", "(", "$", "relations", ")", ")...
Sets the page's reverse links to other pages This method expects an associative array of reverse links to other pages, where each element's key is the name of the relation (e.g. alternate, prev, next, help, etc), and the value is a mixed value that could somehow be considered a page. @param array $relations [option...
[ "Sets", "the", "page", "s", "reverse", "links", "to", "other", "pages" ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Navigation/Page.php#L535-L553
204,855
schpill/thin
src/Navigation/Page.php
Page.getRev
public function getRev($relation = null) { if (null !== $relation) { return isset($this->_rev[$relation]) ? $this->_rev[$relation] : null; } return $this->_rev; }
php
public function getRev($relation = null) { if (null !== $relation) { return isset($this->_rev[$relation]) ? $this->_rev[$relation] : null; } return $this->_rev; }
[ "public", "function", "getRev", "(", "$", "relation", "=", "null", ")", "{", "if", "(", "null", "!==", "$", "relation", ")", "{", "return", "isset", "(", "$", "this", "->", "_rev", "[", "$", "relation", "]", ")", "?", "$", "this", "->", "_rev", "...
Returns the page's reverse links to other pages This method returns an associative array of forward links to other pages, where each element's key is the name of the relation (e.g. alternate, prev, next, help, etc), and the value is a mixed value that could somehow be considered a page. @param string $relation [opt...
[ "Returns", "the", "page", "s", "reverse", "links", "to", "other", "pages" ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Navigation/Page.php#L569-L578
204,856
schpill/thin
src/Navigation/Page.php
Page.setCustomHtmlAttrib
public function setCustomHtmlAttrib($name, $value) { if (!is_string($name)) { throw new Exception( 'Invalid argument: $name must be a string' ); } if (null !== $value && !is_string($value)) { throw new Excep...
php
public function setCustomHtmlAttrib($name, $value) { if (!is_string($name)) { throw new Exception( 'Invalid argument: $name must be a string' ); } if (null !== $value && !is_string($value)) { throw new Excep...
[ "public", "function", "setCustomHtmlAttrib", "(", "$", "name", ",", "$", "value", ")", "{", "if", "(", "!", "is_string", "(", "$", "name", ")", ")", "{", "throw", "new", "Exception", "(", "'Invalid argument: $name must be a string'", ")", ";", "}", "if", "...
Sets a single custom HTML attribute @param string $name name of the HTML attribute @param string|null $value value for the HTML attribute @return Page fluent interface, returns self @throws Exception if name is not string or value is not null or a string
[ "Sets", "a", "single", "custom", "HTML", "attribute" ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Navigation/Page.php#L589-L610
204,857
schpill/thin
src/Navigation/Page.php
Page.getCustomHtmlAttrib
public function getCustomHtmlAttrib($name) { if (!is_string($name)) { throw new Exception( 'Invalid argument: $name must be a string' ); } if (isset($this->_customHtmlAttribs[$name])) { return $this->_custom...
php
public function getCustomHtmlAttrib($name) { if (!is_string($name)) { throw new Exception( 'Invalid argument: $name must be a string' ); } if (isset($this->_customHtmlAttribs[$name])) { return $this->_custom...
[ "public", "function", "getCustomHtmlAttrib", "(", "$", "name", ")", "{", "if", "(", "!", "is_string", "(", "$", "name", ")", ")", "{", "throw", "new", "Exception", "(", "'Invalid argument: $name must be a string'", ")", ";", "}", "if", "(", "isset", "(", "...
Returns a single custom HTML attributes by name @param string $name name of the HTML attribute @return string|null value for the HTML attribute or null @throws Exception if name is not string
[ "Returns", "a", "single", "custom", "HTML", "attributes", "by", "name" ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Navigation/Page.php#L619-L632
204,858
schpill/thin
src/Navigation/Page.php
Page.setCustomHtmlAttribs
public function setCustomHtmlAttribs(array $attribs) { foreach ($attribs as $key => $value) { $this->setCustomHtmlAttrib($key, $value); } return $this; }
php
public function setCustomHtmlAttribs(array $attribs) { foreach ($attribs as $key => $value) { $this->setCustomHtmlAttrib($key, $value); } return $this; }
[ "public", "function", "setCustomHtmlAttribs", "(", "array", "$", "attribs", ")", "{", "foreach", "(", "$", "attribs", "as", "$", "key", "=>", "$", "value", ")", "{", "$", "this", "->", "setCustomHtmlAttrib", "(", "$", "key", ",", "$", "value", ")", ";"...
Sets multiple custom HTML attributes at once @param array $attribs an associative array of html attributes @return Page fluent interface, returns self
[ "Sets", "multiple", "custom", "HTML", "attributes", "at", "once" ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Navigation/Page.php#L640-L646
204,859
schpill/thin
src/Navigation/Page.php
Page.removeCustomHtmlAttrib
public function removeCustomHtmlAttrib($name) { if (!is_string($name)) { throw new Exception( 'Invalid argument: $name must be a string' ); } if (isset($this->_customHtmlAttribs[$name])) { unset($this->_cust...
php
public function removeCustomHtmlAttrib($name) { if (!is_string($name)) { throw new Exception( 'Invalid argument: $name must be a string' ); } if (isset($this->_customHtmlAttribs[$name])) { unset($this->_cust...
[ "public", "function", "removeCustomHtmlAttrib", "(", "$", "name", ")", "{", "if", "(", "!", "is_string", "(", "$", "name", ")", ")", "{", "throw", "new", "Exception", "(", "'Invalid argument: $name must be a string'", ")", ";", "}", "if", "(", "isset", "(", ...
Removes a custom HTML attribute from the page @param string $name name of the custom HTML attribute @return Page fluent interface, returns self
[ "Removes", "a", "custom", "HTML", "attribute", "from", "the", "page" ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Navigation/Page.php#L664-L675
204,860
schpill/thin
src/Navigation/Page.php
Page.setOrder
public function setOrder($order = null) { if (is_string($order)) { $temp = (int) $order; if ($temp < 0 || $temp > 0 || $order == '0') { $order = $temp; } } if (null !== $order && !is_int($order)) { ...
php
public function setOrder($order = null) { if (is_string($order)) { $temp = (int) $order; if ($temp < 0 || $temp > 0 || $order == '0') { $order = $temp; } } if (null !== $order && !is_int($order)) { ...
[ "public", "function", "setOrder", "(", "$", "order", "=", "null", ")", "{", "if", "(", "is_string", "(", "$", "order", ")", ")", "{", "$", "temp", "=", "(", "int", ")", "$", "order", ";", "if", "(", "$", "temp", "<", "0", "||", "$", "temp", "...
Sets page order to use in parent container @param int $order [optional] page order in container. Default is null, which sets no specific order. @return Page fluent interface, returns self @throws Exception if order is not integer or null
[ "Sets", "page", "order", "to", "use", "in", "parent", "container" ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Navigation/Page.php#L698-L721
204,861
schpill/thin
src/Navigation/Page.php
Page.setResource
public function setResource($resource = null) { if (null === $resource || is_string($resource) || $resource instanceof Acl) { $this->_resource = $resource; } else { require_once 'Zend/Navigation/Exception.php'; throw new Exc...
php
public function setResource($resource = null) { if (null === $resource || is_string($resource) || $resource instanceof Acl) { $this->_resource = $resource; } else { require_once 'Zend/Navigation/Exception.php'; throw new Exc...
[ "public", "function", "setResource", "(", "$", "resource", "=", "null", ")", "{", "if", "(", "null", "===", "$", "resource", "||", "is_string", "(", "$", "resource", ")", "||", "$", "resource", "instanceof", "Acl", ")", "{", "$", "this", "->", "_resour...
Sets ACL resource assoicated with this page @param string|Acl $resource [optional] resource to associate with page. Default is null, which sets no resource. @throws Exception if $resource if invalid @return Page fluent interface, returns self
[ "Sets", "ACL", "resource", "assoicated", "with", "this", "page" ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Navigation/Page.php#L746-L759
204,862
schpill/thin
src/Navigation/Page.php
Page.setPrivilege
public function setPrivilege($privilege = null) { $this->_privilege = is_string($privilege) ? $privilege : null; return $this; }
php
public function setPrivilege($privilege = null) { $this->_privilege = is_string($privilege) ? $privilege : null; return $this; }
[ "public", "function", "setPrivilege", "(", "$", "privilege", "=", "null", ")", "{", "$", "this", "->", "_privilege", "=", "is_string", "(", "$", "privilege", ")", "?", "$", "privilege", ":", "null", ";", "return", "$", "this", ";", "}" ]
Sets ACL privilege associated with this page @param string|null $privilege [optional] ACL privilege to associate with this page. Default is null, which sets no privilege. @return Page fluent interface, returns self
[ "Sets", "ACL", "privilege", "associated", "with", "this", "page" ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Navigation/Page.php#L779-L783
204,863
schpill/thin
src/Navigation/Page.php
Page.setVisible
public function setVisible($visible = true) { if (is_string($visible) && 'false' == strtolower($visible)) { $visible = false; } $this->_visible = (bool) $visible; return $this; }
php
public function setVisible($visible = true) { if (is_string($visible) && 'false' == strtolower($visible)) { $visible = false; } $this->_visible = (bool) $visible; return $this; }
[ "public", "function", "setVisible", "(", "$", "visible", "=", "true", ")", "{", "if", "(", "is_string", "(", "$", "visible", ")", "&&", "'false'", "==", "strtolower", "(", "$", "visible", ")", ")", "{", "$", "visible", "=", "false", ";", "}", "$", ...
Sets whether the page should be visible or not @param bool $visible [optional] whether page should be considered visible or not. Default is true. @return Page fluent interface, returns self
[ "Sets", "whether", "the", "page", "should", "be", "visible", "or", "not" ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Navigation/Page.php#L851-L858
204,864
schpill/thin
src/Navigation/Page.php
Page.isVisible
public function isVisible($recursive = false) { if ($recursive && isset($this->_parent) && $this->_parent instanceof Page) { if (!$this->_parent->isVisible(true)) { return false; } } return $this->_visible; ...
php
public function isVisible($recursive = false) { if ($recursive && isset($this->_parent) && $this->_parent instanceof Page) { if (!$this->_parent->isVisible(true)) { return false; } } return $this->_visible; ...
[ "public", "function", "isVisible", "(", "$", "recursive", "=", "false", ")", "{", "if", "(", "$", "recursive", "&&", "isset", "(", "$", "this", "->", "_parent", ")", "&&", "$", "this", "->", "_parent", "instanceof", "Page", ")", "{", "if", "(", "!", ...
Returns a boolean value indicating whether the page is visible @param bool $recursive [optional] whether page should be considered invisible if parent is invisible. Default is false. @return bool whether page should be considered visible
[ "Returns", "a", "boolean", "value", "indicating", "whether", "the", "page", "is", "visible" ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Navigation/Page.php#L868-L878
204,865
schpill/thin
src/Navigation/Page.php
Page.setParent
public function setParent(Container $parent = null) { if ($parent === $this) { throw new Exception( 'A page cannot have itself as a parent'); } // return if the given parent already is parent if ($parent === $this->_parent) { ...
php
public function setParent(Container $parent = null) { if ($parent === $this) { throw new Exception( 'A page cannot have itself as a parent'); } // return if the given parent already is parent if ($parent === $this->_parent) { ...
[ "public", "function", "setParent", "(", "Container", "$", "parent", "=", "null", ")", "{", "if", "(", "$", "parent", "===", "$", "this", ")", "{", "throw", "new", "Exception", "(", "'A page cannot have itself as a parent'", ")", ";", "}", "// return if the giv...
Sets parent container @param Container $parent [optional] new parent to set. Default is null which will set no parent. @return Page fluent interface, returns self
[ "Sets", "parent", "container" ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Navigation/Page.php#L903-L929
204,866
schpill/thin
src/Navigation/Page.php
Page.set
public function set($property, $value) { if (!is_string($property) || empty($property)) { throw new Exception( 'Invalid argument: $property must be a non-empty string'); } $method = 'set' . self::_normalizePropertyName($property); ...
php
public function set($property, $value) { if (!is_string($property) || empty($property)) { throw new Exception( 'Invalid argument: $property must be a non-empty string'); } $method = 'set' . self::_normalizePropertyName($property); ...
[ "public", "function", "set", "(", "$", "property", ",", "$", "value", ")", "{", "if", "(", "!", "is_string", "(", "$", "property", ")", "||", "empty", "(", "$", "property", ")", ")", "{", "throw", "new", "Exception", "(", "'Invalid argument: $property mu...
Sets the given property If the given property is native (id, class, title, etc), the matching set method will be used. Otherwise, it will be set as a custom property. @param string $property property name @param mixed $value value to set @return Page fluent interface, returns self @thr...
[ "Sets", "the", "given", "property" ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Navigation/Page.php#L952-L969
204,867
schpill/thin
src/Navigation/Page.php
Page.get
public function get($property) { if (!is_string($property) || empty($property)) { throw new Exception( 'Invalid argument: $property must be a non-empty string'); } $method = 'get' . self::_normalizePropertyName($property); ...
php
public function get($property) { if (!is_string($property) || empty($property)) { throw new Exception( 'Invalid argument: $property must be a non-empty string'); } $method = 'get' . self::_normalizePropertyName($property); ...
[ "public", "function", "get", "(", "$", "property", ")", "{", "if", "(", "!", "is_string", "(", "$", "property", ")", "||", "empty", "(", "$", "property", ")", ")", "{", "throw", "new", "Exception", "(", "'Invalid argument: $property must be a non-empty string'...
Returns the value of the given property If the given property is native (id, class, title, etc), the matching get method will be used. Otherwise, it will return the matching custom property, or null if not found. @param string $property property name @return mixed the property's value ...
[ "Returns", "the", "value", "of", "the", "given", "property" ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Navigation/Page.php#L982-L998
204,868
schpill/thin
src/Navigation/Page.php
Page.__isset
public function __isset($name) { $method = 'get' . self::_normalizePropertyName($name); if (method_exists($this, $method)) { return true; } return isset($this->_properties[$name]); }
php
public function __isset($name) { $method = 'get' . self::_normalizePropertyName($name); if (method_exists($this, $method)) { return true; } return isset($this->_properties[$name]); }
[ "public", "function", "__isset", "(", "$", "name", ")", "{", "$", "method", "=", "'get'", ".", "self", "::", "_normalizePropertyName", "(", "$", "name", ")", ";", "if", "(", "method_exists", "(", "$", "this", ",", "$", "method", ")", ")", "{", "retur...
Checks if a property is set Magic overload for enabling <code>isset($page->propname)</code>. Returns true if the property is native (id, class, title, etc), and true or false if it's a custom property (depending on whether the property actually is set). @param string $name property name @return bool wheth...
[ "Checks", "if", "a", "property", "is", "set" ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Navigation/Page.php#L1043-L1051
204,869
schpill/thin
src/Navigation/Page.php
Page.addRel
public function addRel($relation, $value) { if (is_string($relation)) { $this->_rel[$relation] = $value; } return $this; }
php
public function addRel($relation, $value) { if (is_string($relation)) { $this->_rel[$relation] = $value; } return $this; }
[ "public", "function", "addRel", "(", "$", "relation", ",", "$", "value", ")", "{", "if", "(", "is_string", "(", "$", "relation", ")", ")", "{", "$", "this", "->", "_rel", "[", "$", "relation", "]", "=", "$", "value", ";", "}", "return", "$", "thi...
Adds a forward relation to the page @param string $relation relation name (e.g. alternate, glossary, canonical, etc) @param mixed $value value to set for relation @return Page fluent interface, returns self
[ "Adds", "a", "forward", "relation", "to", "the", "page" ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Navigation/Page.php#L1098-L1105
204,870
schpill/thin
src/Navigation/Page.php
Page.addRev
public function addRev($relation, $value) { if (is_string($relation)) { $this->_rev[$relation] = $value; } return $this; }
php
public function addRev($relation, $value) { if (is_string($relation)) { $this->_rev[$relation] = $value; } return $this; }
[ "public", "function", "addRev", "(", "$", "relation", ",", "$", "value", ")", "{", "if", "(", "is_string", "(", "$", "relation", ")", ")", "{", "$", "this", "->", "_rev", "[", "$", "relation", "]", "=", "$", "value", ";", "}", "return", "$", "thi...
Adds a reverse relation to the page @param string $relation relation name (e.g. alternate, glossary, canonical, etc) @param mixed $value value to set for relation @return Page fluent interface, returns self
[ "Adds", "a", "reverse", "relation", "to", "the", "page" ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Navigation/Page.php#L1115-L1122
204,871
schpill/thin
src/Navigation/Page.php
Page.removeRel
public function removeRel($relation) { if (isset($this->_rel[$relation])) { unset($this->_rel[$relation]); } return $this; }
php
public function removeRel($relation) { if (isset($this->_rel[$relation])) { unset($this->_rel[$relation]); } return $this; }
[ "public", "function", "removeRel", "(", "$", "relation", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "_rel", "[", "$", "relation", "]", ")", ")", "{", "unset", "(", "$", "this", "->", "_rel", "[", "$", "relation", "]", ")", ";", "}", ...
Removes a forward relation from the page @param string $relation name of relation to remove @return Page fluent interface, returns self
[ "Removes", "a", "forward", "relation", "from", "the", "page" ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Navigation/Page.php#L1130-L1137
204,872
schpill/thin
src/Navigation/Page.php
Page.removeRev
public function removeRev($relation) { if (isset($this->_rev[$relation])) { unset($this->_rev[$relation]); } return $this; }
php
public function removeRev($relation) { if (isset($this->_rev[$relation])) { unset($this->_rev[$relation]); } return $this; }
[ "public", "function", "removeRev", "(", "$", "relation", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "_rev", "[", "$", "relation", "]", ")", ")", "{", "unset", "(", "$", "this", "->", "_rev", "[", "$", "relation", "]", ")", ";", "}", ...
Removes a reverse relation from the page @param string $relation name of relation to remove @return Page fluent interface, returns self
[ "Removes", "a", "reverse", "relation", "from", "the", "page" ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Navigation/Page.php#L1145-L1152
204,873
SpoonX/SxBootstrap
src/SxBootstrap/View/Helper/Bootstrap/AbstractElementHelper.php
AbstractElementHelper.addAttribute
public function addAttribute($key, $value = null) { $this->element->addAttribute($key, $value); return $this; }
php
public function addAttribute($key, $value = null) { $this->element->addAttribute($key, $value); return $this; }
[ "public", "function", "addAttribute", "(", "$", "key", ",", "$", "value", "=", "null", ")", "{", "$", "this", "->", "element", "->", "addAttribute", "(", "$", "key", ",", "$", "value", ")", ";", "return", "$", "this", ";", "}" ]
Add attribute on element @param string $key @param string $value @return $this
[ "Add", "attribute", "on", "element" ]
768b02e3b65f7dfe560e821cb0ff41ad3f86b3b6
https://github.com/SpoonX/SxBootstrap/blob/768b02e3b65f7dfe560e821cb0ff41ad3f86b3b6/src/SxBootstrap/View/Helper/Bootstrap/AbstractElementHelper.php#L59-L64
204,874
inhere/php-library-plus
libs/Task/Worker/Manager.php
Manager.showHelp
protected function showHelp($msg = '', $code = 0) { $usage = Cli::color('USAGE:', 'brown'); $commands = Cli::color('COMMANDS:', 'brown'); $sOptions = Cli::color('SPECIAL OPTIONS:', 'brown'); $pOptions = Cli::color('PUBLIC OPTIONS:', 'brown'); $version = Cli::color(self::VERSI...
php
protected function showHelp($msg = '', $code = 0) { $usage = Cli::color('USAGE:', 'brown'); $commands = Cli::color('COMMANDS:', 'brown'); $sOptions = Cli::color('SPECIAL OPTIONS:', 'brown'); $pOptions = Cli::color('PUBLIC OPTIONS:', 'brown'); $version = Cli::color(self::VERSI...
[ "protected", "function", "showHelp", "(", "$", "msg", "=", "''", ",", "$", "code", "=", "0", ")", "{", "$", "usage", "=", "Cli", "::", "color", "(", "'USAGE:'", ",", "'brown'", ")", ";", "$", "commands", "=", "Cli", "::", "color", "(", "'COMMANDS:'...
Shows the scripts help info with optional error message @param string $msg @param int $code The exit code
[ "Shows", "the", "scripts", "help", "info", "with", "optional", "error", "message" ]
8604e037937d31fa2338d79aaf9d0910cb48f559
https://github.com/inhere/php-library-plus/blob/8604e037937d31fa2338d79aaf9d0910cb48f559/libs/Task/Worker/Manager.php#L249-L308
204,875
groundctrl/discourse-sso-php
src/QueryString.php
QueryString.isValid
public function isValid($key) { if (! isset ($this['sso'], $this['sig'])) { return false; } return $this['sig'] === Secret::create($key)->sign($this['sso']); }
php
public function isValid($key) { if (! isset ($this['sso'], $this['sig'])) { return false; } return $this['sig'] === Secret::create($key)->sign($this['sso']); }
[ "public", "function", "isValid", "(", "$", "key", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "[", "'sso'", "]", ",", "$", "this", "[", "'sig'", "]", ")", ")", "{", "return", "false", ";", "}", "return", "$", "this", "[", "'sig'", "]",...
Checks the validity of this QueryString's against a secret key. @param string|Secret $key @return bool
[ "Checks", "the", "validity", "of", "this", "QueryString", "s", "against", "a", "secret", "key", "." ]
8ef1d0ced2e0502b673b25c46aab09cce2efc765
https://github.com/groundctrl/discourse-sso-php/blob/8ef1d0ced2e0502b673b25c46aab09cce2efc765/src/QueryString.php#L11-L18
204,876
groundctrl/discourse-sso-php
src/QueryString.php
QueryString.fromString
public static function fromString($query, array $data = []) { $url = parse_url($query); $query = isset($url['query']) ? $url['query'] : $url['path']; parse_str($query, $data); return new QueryString($data); }
php
public static function fromString($query, array $data = []) { $url = parse_url($query); $query = isset($url['query']) ? $url['query'] : $url['path']; parse_str($query, $data); return new QueryString($data); }
[ "public", "static", "function", "fromString", "(", "$", "query", ",", "array", "$", "data", "=", "[", "]", ")", "{", "$", "url", "=", "parse_url", "(", "$", "query", ")", ";", "$", "query", "=", "isset", "(", "$", "url", "[", "'query'", "]", ")",...
Creates a QueryString from a string. @param string $query A url or query string part. @param array $data An optional data array. @return QueryString
[ "Creates", "a", "QueryString", "from", "a", "string", "." ]
8ef1d0ced2e0502b673b25c46aab09cce2efc765
https://github.com/groundctrl/discourse-sso-php/blob/8ef1d0ced2e0502b673b25c46aab09cce2efc765/src/QueryString.php#L38-L45
204,877
groundctrl/discourse-sso-php
src/QueryString.php
QueryString.normalize
static public function normalize(array $params) { $qs = http_build_query($params, null, '&'); if ('' == $qs) { return ''; } $parts = array(); $order = array(); foreach (explode('&', $qs) as $param) { if ('' === $param || '=' === $param[0]) {...
php
static public function normalize(array $params) { $qs = http_build_query($params, null, '&'); if ('' == $qs) { return ''; } $parts = array(); $order = array(); foreach (explode('&', $qs) as $param) { if ('' === $param || '=' === $param[0]) {...
[ "static", "public", "function", "normalize", "(", "array", "$", "params", ")", "{", "$", "qs", "=", "http_build_query", "(", "$", "params", ",", "null", ",", "'&'", ")", ";", "if", "(", "''", "==", "$", "qs", ")", "{", "return", "''", ";", "}", "...
Builds a normalized query string from the given parameters. This normalization logic comes direct from Symfony's HttpFoundation Component. Since this is the extent of the dependency, let's opt for a bit of code duplication instead. @param array $params @return string
[ "Builds", "a", "normalized", "query", "string", "from", "the", "given", "parameters", "." ]
8ef1d0ced2e0502b673b25c46aab09cce2efc765
https://github.com/groundctrl/discourse-sso-php/blob/8ef1d0ced2e0502b673b25c46aab09cce2efc765/src/QueryString.php#L56-L89
204,878
phOnion/framework
src/Dependency/CacheAwareContainer.php
CacheAwareContainer.resolveContainer
private function resolveContainer(): ContainerInterface { if ($this->container === null) { $container = $this->containerFactory->build($this); if (!$container instanceof ContainerInterface) { throw new \RuntimeException( "Invalid factory result, e...
php
private function resolveContainer(): ContainerInterface { if ($this->container === null) { $container = $this->containerFactory->build($this); if (!$container instanceof ContainerInterface) { throw new \RuntimeException( "Invalid factory result, e...
[ "private", "function", "resolveContainer", "(", ")", ":", "ContainerInterface", "{", "if", "(", "$", "this", "->", "container", "===", "null", ")", "{", "$", "container", "=", "$", "this", "->", "containerFactory", "->", "build", "(", "$", "this", ")", "...
Instantiate the container if not and return it @return ContainerInterface
[ "Instantiate", "the", "container", "if", "not", "and", "return", "it" ]
eb2d99cc65d3b39faecbfd49b602fb2c62349d05
https://github.com/phOnion/framework/blob/eb2d99cc65d3b39faecbfd49b602fb2c62349d05/src/Dependency/CacheAwareContainer.php#L76-L91
204,879
Synapse-Cmf/synapse-cmf
src/Synapse/Admin/Bundle/Controller/TemplateAdminController.php
TemplateAdminController.listAction
public function listAction(Request $request) { $theme = $request->attributes->get( 'synapse_theme', $this->container->get('synapse') ->enableDefaultTheme() ->getCurrentTheme() ); $templateCollection = $this->container->get('synapse.tem...
php
public function listAction(Request $request) { $theme = $request->attributes->get( 'synapse_theme', $this->container->get('synapse') ->enableDefaultTheme() ->getCurrentTheme() ); $templateCollection = $this->container->get('synapse.tem...
[ "public", "function", "listAction", "(", "Request", "$", "request", ")", "{", "$", "theme", "=", "$", "request", "->", "attributes", "->", "get", "(", "'synapse_theme'", ",", "$", "this", "->", "container", "->", "get", "(", "'synapse'", ")", "->", "enab...
Templates listing action. @param Request $request @return Response
[ "Templates", "listing", "action", "." ]
d8122a4150a83d5607289724425cf35c56a5e880
https://github.com/Synapse-Cmf/synapse-cmf/blob/d8122a4150a83d5607289724425cf35c56a5e880/src/Synapse/Admin/Bundle/Controller/TemplateAdminController.php#L25-L51
204,880
Synapse-Cmf/synapse-cmf
src/Synapse/Admin/Bundle/Controller/TemplateAdminController.php
TemplateAdminController.initAction
public function initAction(Request $request, $templateType, $contentType, $contentId = null) { $templateDomain = $this->container->get('synapse.template.domain'); $template = empty($contentId) ? $templateDomain->createGlobal( $contentType, $templateType ...
php
public function initAction(Request $request, $templateType, $contentType, $contentId = null) { $templateDomain = $this->container->get('synapse.template.domain'); $template = empty($contentId) ? $templateDomain->createGlobal( $contentType, $templateType ...
[ "public", "function", "initAction", "(", "Request", "$", "request", ",", "$", "templateType", ",", "$", "contentType", ",", "$", "contentId", "=", "null", ")", "{", "$", "templateDomain", "=", "$", "this", "->", "container", "->", "get", "(", "'synapse.tem...
Template init action. @param Request $request @param string $templateType @param string $contentType @param int $contentId @return Response
[ "Template", "init", "action", "." ]
d8122a4150a83d5607289724425cf35c56a5e880
https://github.com/Synapse-Cmf/synapse-cmf/blob/d8122a4150a83d5607289724425cf35c56a5e880/src/Synapse/Admin/Bundle/Controller/TemplateAdminController.php#L63-L84
204,881
Synapse-Cmf/synapse-cmf
src/Synapse/Admin/Bundle/Controller/TemplateAdminController.php
TemplateAdminController.editAction
public function editAction($id, Request $request) { $template = $this->container->get('synapse.template.orm_loader') ->retrieveOne(array( 'id' => $id, 'scope' => TemplateInterface::GLOBAL_SCOPE )) ; if (!$template) { throw n...
php
public function editAction($id, Request $request) { $template = $this->container->get('synapse.template.orm_loader') ->retrieveOne(array( 'id' => $id, 'scope' => TemplateInterface::GLOBAL_SCOPE )) ; if (!$template) { throw n...
[ "public", "function", "editAction", "(", "$", "id", ",", "Request", "$", "request", ")", "{", "$", "template", "=", "$", "this", "->", "container", "->", "get", "(", "'synapse.template.orm_loader'", ")", "->", "retrieveOne", "(", "array", "(", "'id'", "=>"...
Global template edition action. Requires an activated or activable theme. @param Request $request @return Response
[ "Global", "template", "edition", "action", ".", "Requires", "an", "activated", "or", "activable", "theme", "." ]
d8122a4150a83d5607289724425cf35c56a5e880
https://github.com/Synapse-Cmf/synapse-cmf/blob/d8122a4150a83d5607289724425cf35c56a5e880/src/Synapse/Admin/Bundle/Controller/TemplateAdminController.php#L94-L143
204,882
Synapse-Cmf/synapse-cmf
src/Synapse/Admin/Bundle/Controller/TemplateAdminController.php
TemplateAdminController.addComponentAction
public function addComponentAction($id, $zoneTypeId, $componentTypeId, Request $request) { if (!$template = $this->container->get('synapse.template.loader')->retrieve($id)) { throw new NotFoundHttpException(sprintf('No template found under id "%s"', $id)); } if (!$zoneType = $tem...
php
public function addComponentAction($id, $zoneTypeId, $componentTypeId, Request $request) { if (!$template = $this->container->get('synapse.template.loader')->retrieve($id)) { throw new NotFoundHttpException(sprintf('No template found under id "%s"', $id)); } if (!$zoneType = $tem...
[ "public", "function", "addComponentAction", "(", "$", "id", ",", "$", "zoneTypeId", ",", "$", "componentTypeId", ",", "Request", "$", "request", ")", "{", "if", "(", "!", "$", "template", "=", "$", "this", "->", "container", "->", "get", "(", "'synapse.t...
Adds a component of given type id into given template id and zone type id. @param int $id @param string $zoneTypeId @param string $componentTypeId @param Request $request @return Response
[ "Adds", "a", "component", "of", "given", "type", "id", "into", "given", "template", "id", "and", "zone", "type", "id", "." ]
d8122a4150a83d5607289724425cf35c56a5e880
https://github.com/Synapse-Cmf/synapse-cmf/blob/d8122a4150a83d5607289724425cf35c56a5e880/src/Synapse/Admin/Bundle/Controller/TemplateAdminController.php#L155-L186
204,883
hal-platform/hal-core
src/Repository/EnvironmentRepository.php
EnvironmentRepository.getBuildableEnvironmentsByApplication
public function getBuildableEnvironmentsByApplication(Application $application) { $region = sprintf(self::ENV_QUERY_REGION, $application->id()); $dql = sprintf(self::DQL_BY_APPLICATION, Target::class, Environment::class); $query = $this->getEntityManager() ->createQuery($dql) ...
php
public function getBuildableEnvironmentsByApplication(Application $application) { $region = sprintf(self::ENV_QUERY_REGION, $application->id()); $dql = sprintf(self::DQL_BY_APPLICATION, Target::class, Environment::class); $query = $this->getEntityManager() ->createQuery($dql) ...
[ "public", "function", "getBuildableEnvironmentsByApplication", "(", "Application", "$", "application", ")", "{", "$", "region", "=", "sprintf", "(", "self", "::", "ENV_QUERY_REGION", ",", "$", "application", "->", "id", "(", ")", ")", ";", "$", "dql", "=", "...
Get all buildable environments for an application. @param Application $application @return Environment[]
[ "Get", "all", "buildable", "environments", "for", "an", "application", "." ]
30d456f8392fc873301ad4217d2ae90436c67090
https://github.com/hal-platform/hal-core/blob/30d456f8392fc873301ad4217d2ae90436c67090/src/Repository/EnvironmentRepository.php#L38-L55
204,884
hal-platform/hal-core
src/Repository/EnvironmentRepository.php
EnvironmentRepository.clearBuildableEnvironmentsByApplication
public function clearBuildableEnvironmentsByApplication(Application $application) { $region = sprintf(self::ENV_QUERY_REGION, $application->id()); $cache = $this ->getEntityManager() ->getCache(); $cache ->getQueryCache($region) ->clear(); ...
php
public function clearBuildableEnvironmentsByApplication(Application $application) { $region = sprintf(self::ENV_QUERY_REGION, $application->id()); $cache = $this ->getEntityManager() ->getCache(); $cache ->getQueryCache($region) ->clear(); ...
[ "public", "function", "clearBuildableEnvironmentsByApplication", "(", "Application", "$", "application", ")", "{", "$", "region", "=", "sprintf", "(", "self", "::", "ENV_QUERY_REGION", ",", "$", "application", "->", "id", "(", ")", ")", ";", "$", "cache", "=",...
Clear cache for buildable environments for an application. @param Application $application @return void
[ "Clear", "cache", "for", "buildable", "environments", "for", "an", "application", "." ]
30d456f8392fc873301ad4217d2ae90436c67090
https://github.com/hal-platform/hal-core/blob/30d456f8392fc873301ad4217d2ae90436c67090/src/Repository/EnvironmentRepository.php#L64-L75
204,885
CodeCollab/Http
src/Response/Response.php
Response.addCookie
public function addCookie(string $key, $value, \DateTimeInterface $expire) { $this->cookies[$key] = $this->cookieFactory->build($key, $value, $expire); }
php
public function addCookie(string $key, $value, \DateTimeInterface $expire) { $this->cookies[$key] = $this->cookieFactory->build($key, $value, $expire); }
[ "public", "function", "addCookie", "(", "string", "$", "key", ",", "$", "value", ",", "\\", "DateTimeInterface", "$", "expire", ")", "{", "$", "this", "->", "cookies", "[", "$", "key", "]", "=", "$", "this", "->", "cookieFactory", "->", "build", "(", ...
Adds a cookie @param string $key The name of the cookie @param mixed $value The value pf the cookie @param \DateTimeInterface $expire The expiration date
[ "Adds", "a", "cookie" ]
b1f8306b20daebcf26ed4b13c032c5bc008a0861
https://github.com/CodeCollab/Http/blob/b1f8306b20daebcf26ed4b13c032c5bc008a0861/src/Response/Response.php#L127-L130
204,886
CodeCollab/Http
src/Response/Response.php
Response.send
public function send() { $this->sendCookies(); $this->sendHeaders(); if ($this->request->server('REQUEST_METHOD') === 'HEAD') { return ''; } echo $this->body; }
php
public function send() { $this->sendCookies(); $this->sendHeaders(); if ($this->request->server('REQUEST_METHOD') === 'HEAD') { return ''; } echo $this->body; }
[ "public", "function", "send", "(", ")", "{", "$", "this", "->", "sendCookies", "(", ")", ";", "$", "this", "->", "sendHeaders", "(", ")", ";", "if", "(", "$", "this", "->", "request", "->", "server", "(", "'REQUEST_METHOD'", ")", "===", "'HEAD'", ")"...
Sends the response to the client
[ "Sends", "the", "response", "to", "the", "client" ]
b1f8306b20daebcf26ed4b13c032c5bc008a0861
https://github.com/CodeCollab/Http/blob/b1f8306b20daebcf26ed4b13c032c5bc008a0861/src/Response/Response.php#L135-L146
204,887
CodeCollab/Http
src/Response/Response.php
Response.sendHeaders
private function sendHeaders() { if (!array_key_exists('Content-Type', $this->headers)) { $this->headers['Content-Type'] = 'text/html; charset=UTF-8'; } $this->headers['Content-Length'] = strlen($this->body); header( sprintf( 'HTTP/%s %s %s',...
php
private function sendHeaders() { if (!array_key_exists('Content-Type', $this->headers)) { $this->headers['Content-Type'] = 'text/html; charset=UTF-8'; } $this->headers['Content-Length'] = strlen($this->body); header( sprintf( 'HTTP/%s %s %s',...
[ "private", "function", "sendHeaders", "(", ")", "{", "if", "(", "!", "array_key_exists", "(", "'Content-Type'", ",", "$", "this", "->", "headers", ")", ")", "{", "$", "this", "->", "headers", "[", "'Content-Type'", "]", "=", "'text/html; charset=UTF-8'", ";"...
Sends the headers to the client
[ "Sends", "the", "headers", "to", "the", "client" ]
b1f8306b20daebcf26ed4b13c032c5bc008a0861
https://github.com/CodeCollab/Http/blob/b1f8306b20daebcf26ed4b13c032c5bc008a0861/src/Response/Response.php#L161-L183
204,888
3ev/wordpress-core
src/Tev/Post/Model/Attachment.php
Attachment.getImageUrl
public function getImageUrl($size = 'thumbnail') { $res = wp_get_attachment_image_src($this->getId(), $size); return $res && isset($res[0]) ? $res[0] : null; }
php
public function getImageUrl($size = 'thumbnail') { $res = wp_get_attachment_image_src($this->getId(), $size); return $res && isset($res[0]) ? $res[0] : null; }
[ "public", "function", "getImageUrl", "(", "$", "size", "=", "'thumbnail'", ")", "{", "$", "res", "=", "wp_get_attachment_image_src", "(", "$", "this", "->", "getId", "(", ")", ",", "$", "size", ")", ";", "return", "$", "res", "&&", "isset", "(", "$", ...
Get attachment image URL. @param mixed $size Arguments accepted by second param of wp_get_attachment_image_src() @return string|null Image URL or null if not found
[ "Get", "attachment", "image", "URL", "." ]
da674fbec5bf3d5bd2a2141680a4c141113eb6b0
https://github.com/3ev/wordpress-core/blob/da674fbec5bf3d5bd2a2141680a4c141113eb6b0/src/Tev/Post/Model/Attachment.php#L36-L40
204,889
chilimatic/chilimatic-framework
lib/handler/memory/shmop/Entry.php
Entry.save
public function save() { if ($this->id) { $this->id = shmop_open($this->key, $this->mode, $this->permission, $this->size); } @shmop_write($this->id, serialize($this->data), $this->offset); return true; }
php
public function save() { if ($this->id) { $this->id = shmop_open($this->key, $this->mode, $this->permission, $this->size); } @shmop_write($this->id, serialize($this->data), $this->offset); return true; }
[ "public", "function", "save", "(", ")", "{", "if", "(", "$", "this", "->", "id", ")", "{", "$", "this", "->", "id", "=", "shmop_open", "(", "$", "this", "->", "key", ",", "$", "this", "->", "mode", ",", "$", "this", "->", "permission", ",", "$"...
saves the data of an entry @return boolean
[ "saves", "the", "data", "of", "an", "entry" ]
8df7f12e75d75d3fd2197a58c80d39cbb4b9ff12
https://github.com/chilimatic/chilimatic-framework/blob/8df7f12e75d75d3fd2197a58c80d39cbb4b9ff12/lib/handler/memory/shmop/Entry.php#L160-L170
204,890
chilimatic/chilimatic-framework
lib/handler/memory/shmop/Entry.php
Entry.delete
public function delete() { if (empty($this->id)) { $this->id = shmop_open($this->key, $this->mode, $this->permission, $this->size); } @shmop_delete($this->id); @shmop_close($this->id); return true; }
php
public function delete() { if (empty($this->id)) { $this->id = shmop_open($this->key, $this->mode, $this->permission, $this->size); } @shmop_delete($this->id); @shmop_close($this->id); return true; }
[ "public", "function", "delete", "(", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "id", ")", ")", "{", "$", "this", "->", "id", "=", "shmop_open", "(", "$", "this", "->", "key", ",", "$", "this", "->", "mode", ",", "$", "this", "->", ...
deletes the entry @return boolean
[ "deletes", "the", "entry" ]
8df7f12e75d75d3fd2197a58c80d39cbb4b9ff12
https://github.com/chilimatic/chilimatic-framework/blob/8df7f12e75d75d3fd2197a58c80d39cbb4b9ff12/lib/handler/memory/shmop/Entry.php#L209-L219
204,891
awurth/SlimValidationREST
Validator.php
Validator.validate
public function validate(Request $request, array $rules, array $messages = []) { foreach ($rules as $param => $options) { $value = $request->getParam($param); $this->data[$param] = $value; $isRule = $options instanceof V; try { if ($isRule) { ...
php
public function validate(Request $request, array $rules, array $messages = []) { foreach ($rules as $param => $options) { $value = $request->getParam($param); $this->data[$param] = $value; $isRule = $options instanceof V; try { if ($isRule) { ...
[ "public", "function", "validate", "(", "Request", "$", "request", ",", "array", "$", "rules", ",", "array", "$", "messages", "=", "[", "]", ")", "{", "foreach", "(", "$", "rules", "as", "$", "param", "=>", "$", "options", ")", "{", "$", "value", "=...
Validate request params with the given rules @param Request $request @param array $rules @param array $messages @return $this
[ "Validate", "request", "params", "with", "the", "given", "rules" ]
e1e715b880acc43b963d2bad660a00f68499dfea
https://github.com/awurth/SlimValidationREST/blob/e1e715b880acc43b963d2bad660a00f68499dfea/Validator.php#L56-L112
204,892
awurth/SlimValidationREST
Validator.php
Validator.addErrors
public function addErrors($param, array $messages) { foreach ($messages as $message) { $this->errors[$param][] = $message; } return $this; }
php
public function addErrors($param, array $messages) { foreach ($messages as $message) { $this->errors[$param][] = $message; } return $this; }
[ "public", "function", "addErrors", "(", "$", "param", ",", "array", "$", "messages", ")", "{", "foreach", "(", "$", "messages", "as", "$", "message", ")", "{", "$", "this", "->", "errors", "[", "$", "param", "]", "[", "]", "=", "$", "message", ";",...
Add errors for param @param string $param @param array $messages @return $this
[ "Add", "errors", "for", "param" ]
e1e715b880acc43b963d2bad660a00f68499dfea
https://github.com/awurth/SlimValidationREST/blob/e1e715b880acc43b963d2bad660a00f68499dfea/Validator.php#L134-L141
204,893
alphacomm/alpharpc
src/AlphaRPC/Client/Client.php
Client.setDelay
public function setDelay($delay) { if (is_string($delay) && ctype_digit($delay)) { $delay = (int) $delay; } elseif (!is_int($delay)) { throw new \RuntimeException('Delay should be an integer in MS.'); } $this->delay = $delay; return $this; }
php
public function setDelay($delay) { if (is_string($delay) && ctype_digit($delay)) { $delay = (int) $delay; } elseif (!is_int($delay)) { throw new \RuntimeException('Delay should be an integer in MS.'); } $this->delay = $delay; return $this; }
[ "public", "function", "setDelay", "(", "$", "delay", ")", "{", "if", "(", "is_string", "(", "$", "delay", ")", "&&", "ctype_digit", "(", "$", "delay", ")", ")", "{", "$", "delay", "=", "(", "int", ")", "$", "delay", ";", "}", "elseif", "(", "!", ...
Defines how long the client should wait for the AlphaRPC instances to respond. If the time is reached the next AlphaRPC instance will be asked to execute the request. @param integer $delay @return Client @throws \RuntimeException
[ "Defines", "how", "long", "the", "client", "should", "wait", "for", "the", "AlphaRPC", "instances", "to", "respond", ".", "If", "the", "time", "is", "reached", "the", "next", "AlphaRPC", "instance", "will", "be", "asked", "to", "execute", "the", "request", ...
cf162854500554c4ba8d39f2675de35a49c30ed0
https://github.com/alphacomm/alpharpc/blob/cf162854500554c4ba8d39f2675de35a49c30ed0/src/AlphaRPC/Client/Client.php#L132-L143
204,894
alphacomm/alpharpc
src/AlphaRPC/Client/Client.php
Client.setTimeout
public function setTimeout($timeout) { if (is_string($timeout) && ctype_digit($timeout)) { $timeout = (int) $timeout; } elseif (!is_int($timeout)) { throw new \RuntimeException('Unable to set timeout.'); } $this->timeout = $timeout; return $this; ...
php
public function setTimeout($timeout) { if (is_string($timeout) && ctype_digit($timeout)) { $timeout = (int) $timeout; } elseif (!is_int($timeout)) { throw new \RuntimeException('Unable to set timeout.'); } $this->timeout = $timeout; return $this; ...
[ "public", "function", "setTimeout", "(", "$", "timeout", ")", "{", "if", "(", "is_string", "(", "$", "timeout", ")", "&&", "ctype_digit", "(", "$", "timeout", ")", ")", "{", "$", "timeout", "=", "(", "int", ")", "$", "timeout", ";", "}", "elseif", ...
Sets the timeout in MS. @param int $timeout @return Client @throws \RuntimeException
[ "Sets", "the", "timeout", "in", "MS", "." ]
cf162854500554c4ba8d39f2675de35a49c30ed0
https://github.com/alphacomm/alpharpc/blob/cf162854500554c4ba8d39f2675de35a49c30ed0/src/AlphaRPC/Client/Client.php#L197-L207
204,895
alphacomm/alpharpc
src/AlphaRPC/Client/Client.php
Client.addManager
public function addManager($manager) { if (is_array($manager)) { foreach ($manager as $item) { $this->managerList->add($item); } return $this; } $this->managerList->add($manager); return $this; }
php
public function addManager($manager) { if (is_array($manager)) { foreach ($manager as $item) { $this->managerList->add($item); } return $this; } $this->managerList->add($manager); return $this; }
[ "public", "function", "addManager", "(", "$", "manager", ")", "{", "if", "(", "is_array", "(", "$", "manager", ")", ")", "{", "foreach", "(", "$", "manager", "as", "$", "item", ")", "{", "$", "this", "->", "managerList", "->", "add", "(", "$", "ite...
Adds an address to a AlphaRPC daemon. @param string|array $manager @return Client @throws \InvalidArgumentException
[ "Adds", "an", "address", "to", "a", "AlphaRPC", "daemon", "." ]
cf162854500554c4ba8d39f2675de35a49c30ed0
https://github.com/alphacomm/alpharpc/blob/cf162854500554c4ba8d39f2675de35a49c30ed0/src/AlphaRPC/Client/Client.php#L217-L230
204,896
alphacomm/alpharpc
src/AlphaRPC/Client/Client.php
Client.startRequest
public function startRequest($function, array $params = array(), $cache = null) { if ($cache !== null && !is_string($cache)) { throw new \RuntimeException('$cache is an id for the request and should be a string or null.'); } $request = new Request($function, $params); $p...
php
public function startRequest($function, array $params = array(), $cache = null) { if ($cache !== null && !is_string($cache)) { throw new \RuntimeException('$cache is an id for the request and should be a string or null.'); } $request = new Request($function, $params); $p...
[ "public", "function", "startRequest", "(", "$", "function", ",", "array", "$", "params", "=", "array", "(", ")", ",", "$", "cache", "=", "null", ")", "{", "if", "(", "$", "cache", "!==", "null", "&&", "!", "is_string", "(", "$", "cache", ")", ")", ...
Starts a request. @param string $function @param array $params @param string $cache @return Request @throws \RuntimeException
[ "Starts", "a", "request", "." ]
cf162854500554c4ba8d39f2675de35a49c30ed0
https://github.com/alphacomm/alpharpc/blob/cf162854500554c4ba8d39f2675de35a49c30ed0/src/AlphaRPC/Client/Client.php#L242-L270
204,897
alphacomm/alpharpc
src/AlphaRPC/Client/Client.php
Client.request
public function request($function, array $params = array(), $cache = null) { $request = $this->startRequest($function, $params, $cache); return $this->fetchResponse($request); }
php
public function request($function, array $params = array(), $cache = null) { $request = $this->startRequest($function, $params, $cache); return $this->fetchResponse($request); }
[ "public", "function", "request", "(", "$", "function", ",", "array", "$", "params", "=", "array", "(", ")", ",", "$", "cache", "=", "null", ")", "{", "$", "request", "=", "$", "this", "->", "startRequest", "(", "$", "function", ",", "$", "params", ...
Does a full request and returns the result. @param string $function @param array $params @param string $cache @return mixed
[ "Does", "a", "full", "request", "and", "returns", "the", "result", "." ]
cf162854500554c4ba8d39f2675de35a49c30ed0
https://github.com/alphacomm/alpharpc/blob/cf162854500554c4ba8d39f2675de35a49c30ed0/src/AlphaRPC/Client/Client.php#L281-L286
204,898
alphacomm/alpharpc
src/AlphaRPC/Client/Client.php
Client.getSocket
protected function getSocket($server) { if (isset($this->socket[$server])) { return $this->socket[$server]; } $context = new ZMQContext(); $socket = Socket::create($context, ZMQ::SOCKET_REQ, $this->logger); $socket->connect($server); $this->socket[$serve...
php
protected function getSocket($server) { if (isset($this->socket[$server])) { return $this->socket[$server]; } $context = new ZMQContext(); $socket = Socket::create($context, ZMQ::SOCKET_REQ, $this->logger); $socket->connect($server); $this->socket[$serve...
[ "protected", "function", "getSocket", "(", "$", "server", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "socket", "[", "$", "server", "]", ")", ")", "{", "return", "$", "this", "->", "socket", "[", "$", "server", "]", ";", "}", "$", "cont...
Returns a socket for the given server. If the socket does not yet exist, it is created. @param string $server @return Socket
[ "Returns", "a", "socket", "for", "the", "given", "server", "." ]
cf162854500554c4ba8d39f2675de35a49c30ed0
https://github.com/alphacomm/alpharpc/blob/cf162854500554c4ba8d39f2675de35a49c30ed0/src/AlphaRPC/Client/Client.php#L297-L310
204,899
alphacomm/alpharpc
src/AlphaRPC/Client/Client.php
Client.serializeParams
protected function serializeParams(array $params) { $serialized = array(); foreach ($params as $param) { $serialized[] = $this->serializer->serialize($param); } return $serialized; }
php
protected function serializeParams(array $params) { $serialized = array(); foreach ($params as $param) { $serialized[] = $this->serializer->serialize($param); } return $serialized; }
[ "protected", "function", "serializeParams", "(", "array", "$", "params", ")", "{", "$", "serialized", "=", "array", "(", ")", ";", "foreach", "(", "$", "params", "as", "$", "param", ")", "{", "$", "serialized", "[", "]", "=", "$", "this", "->", "seri...
Serializes parameters. @param array $params @return array
[ "Serializes", "parameters", "." ]
cf162854500554c4ba8d39f2675de35a49c30ed0
https://github.com/alphacomm/alpharpc/blob/cf162854500554c4ba8d39f2675de35a49c30ed0/src/AlphaRPC/Client/Client.php#L333-L341