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
195,200
dittertp/Puzzle
src/Puzzle/Client.php
Client.enableSSL
public function enableSSL($strict = false) { $this->setScheme(self::SCHEME_SSL); if ($strict === false) { $this->setOption(CURLOPT_SSL_VERIFYPEER, 0); $this->setOption(CURLOPT_SSL_VERIFYHOST, 0); } else { $this->setOption(CURLOPT_SSL_VERIFYPEER, 0); ...
php
public function enableSSL($strict = false) { $this->setScheme(self::SCHEME_SSL); if ($strict === false) { $this->setOption(CURLOPT_SSL_VERIFYPEER, 0); $this->setOption(CURLOPT_SSL_VERIFYHOST, 0); } else { $this->setOption(CURLOPT_SSL_VERIFYPEER, 0); ...
[ "public", "function", "enableSSL", "(", "$", "strict", "=", "false", ")", "{", "$", "this", "->", "setScheme", "(", "self", "::", "SCHEME_SSL", ")", ";", "if", "(", "$", "strict", "===", "false", ")", "{", "$", "this", "->", "setOption", "(", "CURLOP...
Enables ssl for the connection @param bool $strict optional value if ssl should be strict (check server certificate) @return void
[ "Enables", "ssl", "for", "the", "connection" ]
cb3dfd64b0df8610c054dbb43b242fbf2cf668a0
https://github.com/dittertp/Puzzle/blob/cb3dfd64b0df8610c054dbb43b242fbf2cf668a0/src/Puzzle/Client.php#L605-L615
195,201
dittertp/Puzzle
src/Puzzle/Client.php
Client.buildUrl
protected function buildUrl($uri, $params) { $host = $this->buildHostString(); if (strpos($uri, "/") !== 0) { $uri = "/" . $uri; } $url = $host . $uri; if ($params === null) { $params = array(); } $url .= $this->buildQueryString($p...
php
protected function buildUrl($uri, $params) { $host = $this->buildHostString(); if (strpos($uri, "/") !== 0) { $uri = "/" . $uri; } $url = $host . $uri; if ($params === null) { $params = array(); } $url .= $this->buildQueryString($p...
[ "protected", "function", "buildUrl", "(", "$", "uri", ",", "$", "params", ")", "{", "$", "host", "=", "$", "this", "->", "buildHostString", "(", ")", ";", "if", "(", "strpos", "(", "$", "uri", ",", "\"/\"", ")", "!==", "0", ")", "{", "$", "uri", ...
build complete url @param string $uri uri string @param mixed $params query string parameters @return string
[ "build", "complete", "url" ]
cb3dfd64b0df8610c054dbb43b242fbf2cf668a0
https://github.com/dittertp/Puzzle/blob/cb3dfd64b0df8610c054dbb43b242fbf2cf668a0/src/Puzzle/Client.php#L670-L688
195,202
dittertp/Puzzle
src/Puzzle/Client.php
Client.buildQueryString
protected function buildQueryString(array $params) { $qs = ""; foreach ($params as $key => $value) { if ($qs === "") { $qs = "?"; } else { $qs .= "&&"; } $qs .= $key . "=" . $value; } return $qs; }
php
protected function buildQueryString(array $params) { $qs = ""; foreach ($params as $key => $value) { if ($qs === "") { $qs = "?"; } else { $qs .= "&&"; } $qs .= $key . "=" . $value; } return $qs; }
[ "protected", "function", "buildQueryString", "(", "array", "$", "params", ")", "{", "$", "qs", "=", "\"\"", ";", "foreach", "(", "$", "params", "as", "$", "key", "=>", "$", "value", ")", "{", "if", "(", "$", "qs", "===", "\"\"", ")", "{", "$", "q...
build the query string @param array $params query string parameters @return string
[ "build", "the", "query", "string" ]
cb3dfd64b0df8610c054dbb43b242fbf2cf668a0
https://github.com/dittertp/Puzzle/blob/cb3dfd64b0df8610c054dbb43b242fbf2cf668a0/src/Puzzle/Client.php#L697-L709
195,203
dittertp/Puzzle
src/Puzzle/Client.php
Client.prepareHost
protected function prepareHost($scheme, $host) { $host = $this->stripScheme($host); if (substr($host, -1) === "/") { $host = substr($host, 0, -1); } return $scheme . $host; }
php
protected function prepareHost($scheme, $host) { $host = $this->stripScheme($host); if (substr($host, -1) === "/") { $host = substr($host, 0, -1); } return $scheme . $host; }
[ "protected", "function", "prepareHost", "(", "$", "scheme", ",", "$", "host", ")", "{", "$", "host", "=", "$", "this", "->", "stripScheme", "(", "$", "host", ")", ";", "if", "(", "substr", "(", "$", "host", ",", "-", "1", ")", "===", "\"/\"", ")"...
Adds given scheme to hostname @param string $scheme the http scheme @param string $host the hostname @return string @throws Exceptions\ConfigurationException
[ "Adds", "given", "scheme", "to", "hostname" ]
cb3dfd64b0df8610c054dbb43b242fbf2cf668a0
https://github.com/dittertp/Puzzle/blob/cb3dfd64b0df8610c054dbb43b242fbf2cf668a0/src/Puzzle/Client.php#L742-L751
195,204
dittertp/Puzzle
src/Puzzle/Client.php
Client.setHttpHeader
public function setHttpHeader($header) { $headers = $this->getHttpHeaders(); $headers[] = $header; $this->setHttpHeaders($headers); }
php
public function setHttpHeader($header) { $headers = $this->getHttpHeaders(); $headers[] = $header; $this->setHttpHeaders($headers); }
[ "public", "function", "setHttpHeader", "(", "$", "header", ")", "{", "$", "headers", "=", "$", "this", "->", "getHttpHeaders", "(", ")", ";", "$", "headers", "[", "]", "=", "$", "header", ";", "$", "this", "->", "setHttpHeaders", "(", "$", "headers", ...
Adds a new http header to header list @param string $header http header to set @return void
[ "Adds", "a", "new", "http", "header", "to", "header", "list" ]
cb3dfd64b0df8610c054dbb43b242fbf2cf668a0
https://github.com/dittertp/Puzzle/blob/cb3dfd64b0df8610c054dbb43b242fbf2cf668a0/src/Puzzle/Client.php#L838-L844
195,205
agentmedia/phine-builtin
src/BuiltIn/Modules/Frontend/HtmlWrap.php
HtmlWrap.Html
function Html() { $text = $this->html; $pos = strpos($text, self::$placeholder); $phLength = strlen(self::$placeholder); while ($pos !== false && $this->currentChild) { $replacement = $this->RenderCurrentChild(); $text = substr($text, 0, $pos)...
php
function Html() { $text = $this->html; $pos = strpos($text, self::$placeholder); $phLength = strlen(self::$placeholder); while ($pos !== false && $this->currentChild) { $replacement = $this->RenderCurrentChild(); $text = substr($text, 0, $pos)...
[ "function", "Html", "(", ")", "{", "$", "text", "=", "$", "this", "->", "html", ";", "$", "pos", "=", "strpos", "(", "$", "text", ",", "self", "::", "$", "placeholder", ")", ";", "$", "phLength", "=", "strlen", "(", "self", "::", "$", "placeholde...
Gathers the html
[ "Gathers", "the", "html" ]
4dd05bc406a71e997bd4eaa16b12e23dbe62a456
https://github.com/agentmedia/phine-builtin/blob/4dd05bc406a71e997bd4eaa16b12e23dbe62a456/src/BuiltIn/Modules/Frontend/HtmlWrap.php#L93-L108
195,206
PhoxPHP/Console
src/Command/Uses/RunnableBuilder.php
RunnableBuilder.buildRunnable
protected function buildRunnable(StdClass $runnable) { $template = __DIR__ . '/template' . '/RunnableTemplate.phx'; if (!file_exists($template)) { $this->cmd->error(sprinf('Template file [%s] does not exist', $template), 'red'); exit; } $content = file_get_contents($template); $hasLang = $this->hasLan...
php
protected function buildRunnable(StdClass $runnable) { $template = __DIR__ . '/template' . '/RunnableTemplate.phx'; if (!file_exists($template)) { $this->cmd->error(sprinf('Template file [%s] does not exist', $template), 'red'); exit; } $content = file_get_contents($template); $hasLang = $this->hasLan...
[ "protected", "function", "buildRunnable", "(", "StdClass", "$", "runnable", ")", "{", "$", "template", "=", "__DIR__", ".", "'/template'", ".", "'/RunnableTemplate.phx'", ";", "if", "(", "!", "file_exists", "(", "$", "template", ")", ")", "{", "$", "this", ...
Creates a new runnable object. @param $runnable <StdClass> @access protected @return <void>
[ "Creates", "a", "new", "runnable", "object", "." ]
fee1238cfdb3592964bb5d5a2336e70b8ffd20e9
https://github.com/PhoxPHP/Console/blob/fee1238cfdb3592964bb5d5a2336e70b8ffd20e9/src/Command/Uses/RunnableBuilder.php#L38-L100
195,207
PhoxPHP/Console
src/Command/Uses/RunnableBuilder.php
RunnableBuilder.validateArgumentLengthType
protected function validateArgumentLengthType(String $argument) { if (!is_numeric($argument) && !in_array($argument, ['none', 'i'])) { $this->cmd->error(sprintf('Failed to create runnable. [%s] is not a valid argument length type.', $argument)); } if (in_array($argument, ['none', 'i'])) { return "\":" . ...
php
protected function validateArgumentLengthType(String $argument) { if (!is_numeric($argument) && !in_array($argument, ['none', 'i'])) { $this->cmd->error(sprintf('Failed to create runnable. [%s] is not a valid argument length type.', $argument)); } if (in_array($argument, ['none', 'i'])) { return "\":" . ...
[ "protected", "function", "validateArgumentLengthType", "(", "String", "$", "argument", ")", "{", "if", "(", "!", "is_numeric", "(", "$", "argument", ")", "&&", "!", "in_array", "(", "$", "argument", ",", "[", "'none'", ",", "'i'", "]", ")", ")", "{", "...
Checks and validates the argument type returned. @param $argument <String> @access protected @return <String>
[ "Checks", "and", "validates", "the", "argument", "type", "returned", "." ]
fee1238cfdb3592964bb5d5a2336e70b8ffd20e9
https://github.com/PhoxPHP/Console/blob/fee1238cfdb3592964bb5d5a2336e70b8ffd20e9/src/Command/Uses/RunnableBuilder.php#L189-L200
195,208
Raphhh/puppy-application
src/Route/Router.php
Router.find
public function find(Request $request) { $route = $this->getRouteFinder()->find($request, $this->getRoutes()); $this->setCurrentRoute($route); return $route; }
php
public function find(Request $request) { $route = $this->getRouteFinder()->find($request, $this->getRoutes()); $this->setCurrentRoute($route); return $route; }
[ "public", "function", "find", "(", "Request", "$", "request", ")", "{", "$", "route", "=", "$", "this", "->", "getRouteFinder", "(", ")", "->", "find", "(", "$", "request", ",", "$", "this", "->", "getRoutes", "(", ")", ")", ";", "$", "this", "->",...
Finds a route from a uri. @param Request $request @return Route
[ "Finds", "a", "route", "from", "a", "uri", "." ]
9291543cd28e19a2986abd7fb146898ca5f5f5da
https://github.com/Raphhh/puppy-application/blob/9291543cd28e19a2986abd7fb146898ca5f5f5da/src/Route/Router.php#L59-L64
195,209
OpenConext-Attic/OpenConext-engineblock-metadata
src/JanusRestV1/CacheProxyClient.php
CacheProxyClient.getAllowedIdps
public function getAllowedIdps($spEntityId) { if (isset($this->allowedIdpsPerSp[$spEntityId])) { return $this->allowedIdpsPerSp[$spEntityId]; } $this->allowedIdpsPerSp[$spEntityId] = $this->client->getAllowedIdps($spEntityId); return $this->allowedIdpsPerSp[$spEntityId]...
php
public function getAllowedIdps($spEntityId) { if (isset($this->allowedIdpsPerSp[$spEntityId])) { return $this->allowedIdpsPerSp[$spEntityId]; } $this->allowedIdpsPerSp[$spEntityId] = $this->client->getAllowedIdps($spEntityId); return $this->allowedIdpsPerSp[$spEntityId]...
[ "public", "function", "getAllowedIdps", "(", "$", "spEntityId", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "allowedIdpsPerSp", "[", "$", "spEntityId", "]", ")", ")", "{", "return", "$", "this", "->", "allowedIdpsPerSp", "[", "$", "spEntityId", ...
Retrieve the allowed IDPs for an SP. The SP is only allowed to make connections to the retrieved IDP's. @param string $spEntityId the URN of the SP entity. @return array containing the URN's of the IDP's that this SP is allowed to make a connection to.
[ "Retrieve", "the", "allowed", "IDPs", "for", "an", "SP", ".", "The", "SP", "is", "only", "allowed", "to", "make", "connections", "to", "the", "retrieved", "IDP", "s", "." ]
236e2f52ef9cf28e71404544a1c4388f63ee535d
https://github.com/OpenConext-Attic/OpenConext-engineblock-metadata/blob/236e2f52ef9cf28e71404544a1c4388f63ee535d/src/JanusRestV1/CacheProxyClient.php#L51-L60
195,210
OpenConext-Attic/OpenConext-engineblock-metadata
src/JanusRestV1/CacheProxyClient.php
CacheProxyClient.getEntity
public function getEntity($entityId) { if (isset($this->entities[$entityId])) { return $this->entities[$entityId]; } $this->entities[$entityId] = $this->client->getEntity($entityId); return $this->entities[$entityId]; }
php
public function getEntity($entityId) { if (isset($this->entities[$entityId])) { return $this->entities[$entityId]; } $this->entities[$entityId] = $this->client->getEntity($entityId); return $this->entities[$entityId]; }
[ "public", "function", "getEntity", "(", "$", "entityId", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "entities", "[", "$", "entityId", "]", ")", ")", "{", "return", "$", "this", "->", "entities", "[", "$", "entityId", "]", ";", "}", "$", ...
Get full information for a given entity. @param $entityId @return array
[ "Get", "full", "information", "for", "a", "given", "entity", "." ]
236e2f52ef9cf28e71404544a1c4388f63ee535d
https://github.com/OpenConext-Attic/OpenConext-engineblock-metadata/blob/236e2f52ef9cf28e71404544a1c4388f63ee535d/src/JanusRestV1/CacheProxyClient.php#L68-L77
195,211
OpenConext-Attic/OpenConext-engineblock-metadata
src/JanusRestV1/CacheProxyClient.php
CacheProxyClient.getIdpList
public function getIdpList($keys = array(), $forSpEntityId = null) { sort($keys); $keysString = implode(',', $keys); if (isset($this->identityProvidersMetadata[$keysString][$forSpEntityId])) { return $this->identityProvidersMetadata[$keysString][$forSpEntityId]; } ...
php
public function getIdpList($keys = array(), $forSpEntityId = null) { sort($keys); $keysString = implode(',', $keys); if (isset($this->identityProvidersMetadata[$keysString][$forSpEntityId])) { return $this->identityProvidersMetadata[$keysString][$forSpEntityId]; } ...
[ "public", "function", "getIdpList", "(", "$", "keys", "=", "array", "(", ")", ",", "$", "forSpEntityId", "=", "null", ")", "{", "sort", "(", "$", "keys", ")", ";", "$", "keysString", "=", "implode", "(", "','", ",", "$", "keys", ")", ";", "if", "...
Retrieve a list of metadata values of all available IDP entities. @param array $keys An array of keys to retrieve. Retrieves all available keys if omited or empty @param String $forSpEntityId An optional identifier of an SP If present, idplist will return a list of only the idps that this sp is allowed to authenticate ...
[ "Retrieve", "a", "list", "of", "metadata", "values", "of", "all", "available", "IDP", "entities", "." ]
236e2f52ef9cf28e71404544a1c4388f63ee535d
https://github.com/OpenConext-Attic/OpenConext-engineblock-metadata/blob/236e2f52ef9cf28e71404544a1c4388f63ee535d/src/JanusRestV1/CacheProxyClient.php#L91-L106
195,212
OpenConext-Attic/OpenConext-engineblock-metadata
src/JanusRestV1/CacheProxyClient.php
CacheProxyClient.getSpList
public function getSpList($keys = array()) { sort($keys); $keysString = implode(',', $keys); if (isset($this->serviceProvidersMetadata[$keysString])) { return $this->serviceProvidersMetadata[$keysString]; } $this->serviceProvidersMetadata[$keysString] = $this->cl...
php
public function getSpList($keys = array()) { sort($keys); $keysString = implode(',', $keys); if (isset($this->serviceProvidersMetadata[$keysString])) { return $this->serviceProvidersMetadata[$keysString]; } $this->serviceProvidersMetadata[$keysString] = $this->cl...
[ "public", "function", "getSpList", "(", "$", "keys", "=", "array", "(", ")", ")", "{", "sort", "(", "$", "keys", ")", ";", "$", "keysString", "=", "implode", "(", "','", ",", "$", "keys", ")", ";", "if", "(", "isset", "(", "$", "this", "->", "s...
Retrieve a list of metadata values of all available SP entities. @param array $keys An array of keys to retrieve. Retrieves all available keys if omited or empty @return array An associative array of values, indexed by SP identifier. Each value is another associative array with key/value pairs containing the metadata.
[ "Retrieve", "a", "list", "of", "metadata", "values", "of", "all", "available", "SP", "entities", "." ]
236e2f52ef9cf28e71404544a1c4388f63ee535d
https://github.com/OpenConext-Attic/OpenConext-engineblock-metadata/blob/236e2f52ef9cf28e71404544a1c4388f63ee535d/src/JanusRestV1/CacheProxyClient.php#L135-L146
195,213
jabernardo/lollipop-php
Library/Benchmark.php
Benchmark.elapsed
static public function elapsed($start, $end) { return [ 'time_elapsed' => self::elapsedTime($start, $end), 'memory_usage_gap' => self::elapsedMemory($start, $end), 'real_memory_usage' => self::elapsedMemory($start, $end, true) ]; }
php
static public function elapsed($start, $end) { return [ 'time_elapsed' => self::elapsedTime($start, $end), 'memory_usage_gap' => self::elapsedMemory($start, $end), 'real_memory_usage' => self::elapsedMemory($start, $end, true) ]; }
[ "static", "public", "function", "elapsed", "(", "$", "start", ",", "$", "end", ")", "{", "return", "[", "'time_elapsed'", "=>", "self", "::", "elapsedTime", "(", "$", "start", ",", "$", "end", ")", ",", "'memory_usage_gap'", "=>", "self", "::", "elapsedM...
Get detailed benchmark @access public @param string $start Start mark @param string $end End mark @return array
[ "Get", "detailed", "benchmark" ]
004d80b21f7246bb3e08c7b9f74a165b0d3ca0f5
https://github.com/jabernardo/lollipop-php/blob/004d80b21f7246bb3e08c7b9f74a165b0d3ca0f5/Library/Benchmark.php#L45-L51
195,214
jabernardo/lollipop-php
Library/Benchmark.php
Benchmark.elapsedMemory
static public function elapsedMemory($start, $end, $real_usage = false, $inMB = true) { $start = isset(self::$_marks[$start]) ? self::$_marks[$start]['memory_usage'] : 0; $end = isset(self::$_marks[$end]) ? self::$_marks[$end]['memory_usage'] : 0; $elapsed = !$real_usage ? ($end - $...
php
static public function elapsedMemory($start, $end, $real_usage = false, $inMB = true) { $start = isset(self::$_marks[$start]) ? self::$_marks[$start]['memory_usage'] : 0; $end = isset(self::$_marks[$end]) ? self::$_marks[$end]['memory_usage'] : 0; $elapsed = !$real_usage ? ($end - $...
[ "static", "public", "function", "elapsedMemory", "(", "$", "start", ",", "$", "end", ",", "$", "real_usage", "=", "false", ",", "$", "inMB", "=", "true", ")", "{", "$", "start", "=", "isset", "(", "self", "::", "$", "_marks", "[", "$", "start", "]"...
Get elapsed memory between two marks @access public @param string $start Start mark @param string $end End mark @param bool $real_usage Get real memory usage @param bool $inMB Show output in MB instead of Bytes @return mixed <string> if $inMB is <true>, <longint> if on <false>
[ "Get", "elapsed", "memory", "between", "two", "marks" ]
004d80b21f7246bb3e08c7b9f74a165b0d3ca0f5
https://github.com/jabernardo/lollipop-php/blob/004d80b21f7246bb3e08c7b9f74a165b0d3ca0f5/Library/Benchmark.php#L64-L71
195,215
jabernardo/lollipop-php
Library/Benchmark.php
Benchmark.elapsedTime
static public function elapsedTime($start, $end) { $start = isset(self::$_marks[$start]) ? self::$_marks[$start]['time'] : 0; $end = isset(self::$_marks[$end]) ? self::$_marks[$end]['time'] : 0; return $start ? round($end - $start, 10) : null; }
php
static public function elapsedTime($start, $end) { $start = isset(self::$_marks[$start]) ? self::$_marks[$start]['time'] : 0; $end = isset(self::$_marks[$end]) ? self::$_marks[$end]['time'] : 0; return $start ? round($end - $start, 10) : null; }
[ "static", "public", "function", "elapsedTime", "(", "$", "start", ",", "$", "end", ")", "{", "$", "start", "=", "isset", "(", "self", "::", "$", "_marks", "[", "$", "start", "]", ")", "?", "self", "::", "$", "_marks", "[", "$", "start", "]", "[",...
Compute the elapsed time of two marks @param string $start Keyname 1 @param string $end Keyname 2 @return mixed
[ "Compute", "the", "elapsed", "time", "of", "two", "marks" ]
004d80b21f7246bb3e08c7b9f74a165b0d3ca0f5
https://github.com/jabernardo/lollipop-php/blob/004d80b21f7246bb3e08c7b9f74a165b0d3ca0f5/Library/Benchmark.php#L82-L87
195,216
Kris-Kuiper/sFire-Framework
src/Validator/Validator.php
Validator.field
public function field($fieldnames) { $fieldnames = func_get_args(); foreach($fieldnames as $fieldname) { if(false === is_string($fieldname)) { return trigger_error(sprintf('All fieldnames used in "%s"() must be of the type string, "%s" given', __METHOD__, gettype($fieldname)), E_USER_ERROR); } ...
php
public function field($fieldnames) { $fieldnames = func_get_args(); foreach($fieldnames as $fieldname) { if(false === is_string($fieldname)) { return trigger_error(sprintf('All fieldnames used in "%s"() must be of the type string, "%s" given', __METHOD__, gettype($fieldname)), E_USER_ERROR); } ...
[ "public", "function", "field", "(", "$", "fieldnames", ")", "{", "$", "fieldnames", "=", "func_get_args", "(", ")", ";", "foreach", "(", "$", "fieldnames", "as", "$", "fieldname", ")", "{", "if", "(", "false", "===", "is_string", "(", "$", "fieldname", ...
Add one or multiple validation rules to one or multiple fields @param string|array $fieldnames @return sFire\Validator\Validator
[ "Add", "one", "or", "multiple", "validation", "rules", "to", "one", "or", "multiple", "fields" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Validator/Validator.php#L113-L127
195,217
Kris-Kuiper/sFire-Framework
src/Validator/Validator.php
Validator.required
public function required($required = null) { if(false === is_bool($required) && null !== $required) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type boolean, "%s" given', __METHOD__, gettype($required)), E_USER_ERROR); } if(null === $required) { $required = true; } ...
php
public function required($required = null) { if(false === is_bool($required) && null !== $required) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type boolean, "%s" given', __METHOD__, gettype($required)), E_USER_ERROR); } if(null === $required) { $required = true; } ...
[ "public", "function", "required", "(", "$", "required", "=", "null", ")", "{", "if", "(", "false", "===", "is_bool", "(", "$", "required", ")", "&&", "null", "!==", "$", "required", ")", "{", "return", "trigger_error", "(", "sprintf", "(", "'Argument 1 p...
Set a rule that a field value can be empty or not @param boolean|null $required @return sFire\Validator
[ "Set", "a", "rule", "that", "a", "field", "value", "can", "be", "empty", "or", "not" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Validator/Validator.php#L159-L174
195,218
Kris-Kuiper/sFire-Framework
src/Validator/Validator.php
Validator.load
public function load($classname, $name = null) { if(false === is_string($classname)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($classname)), E_USER_ERROR); } if(null !== $name && false === is_string($name)) { return trigge...
php
public function load($classname, $name = null) { if(false === is_string($classname)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($classname)), E_USER_ERROR); } if(null !== $name && false === is_string($name)) { return trigge...
[ "public", "function", "load", "(", "$", "classname", ",", "$", "name", "=", "null", ")", "{", "if", "(", "false", "===", "is_string", "(", "$", "classname", ")", ")", "{", "return", "trigger_error", "(", "sprintf", "(", "'Argument 1 passed to %s() must be of...
Loads a custom validator rule with optional validator name @param string $classname @param string $name @return sFire\Validator
[ "Loads", "a", "custom", "validator", "rule", "with", "optional", "validator", "name" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Validator/Validator.php#L183-L219
195,219
Kris-Kuiper/sFire-Framework
src/Validator/Validator.php
Validator.extend
public function extend($fields, $closure, $message) { if(false === is_array($fields)) { $fields = [(string) $fields]; } if(false === (gettype($closure) === 'object')) { return trigger_error(sprintf('Argument 2 passed to %s() must be a valid callback function, "%s" given', __METHOD__, gettype($closu...
php
public function extend($fields, $closure, $message) { if(false === is_array($fields)) { $fields = [(string) $fields]; } if(false === (gettype($closure) === 'object')) { return trigger_error(sprintf('Argument 2 passed to %s() must be a valid callback function, "%s" given', __METHOD__, gettype($closu...
[ "public", "function", "extend", "(", "$", "fields", ",", "$", "closure", ",", "$", "message", ")", "{", "if", "(", "false", "===", "is_array", "(", "$", "fields", ")", ")", "{", "$", "fields", "=", "[", "(", "string", ")", "$", "fields", "]", ";"...
Add custom validation rule to one or multiple fields @param string|array $field @param function $closure @param string $message
[ "Add", "custom", "validation", "rule", "to", "one", "or", "multiple", "fields" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Validator/Validator.php#L228-L245
195,220
Kris-Kuiper/sFire-Framework
src/Validator/Validator.php
Validator.getMessages
public function getMessages($fullnames = false) { if(false === is_bool($fullnames)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type boolean, "%s" given', __METHOD__, gettype($fullnames)), E_USER_ERROR); } $instance = $this -> getMessageInstance(); return $instance :: ge...
php
public function getMessages($fullnames = false) { if(false === is_bool($fullnames)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type boolean, "%s" given', __METHOD__, gettype($fullnames)), E_USER_ERROR); } $instance = $this -> getMessageInstance(); return $instance :: ge...
[ "public", "function", "getMessages", "(", "$", "fullnames", "=", "false", ")", "{", "if", "(", "false", "===", "is_bool", "(", "$", "fullnames", ")", ")", "{", "return", "trigger_error", "(", "sprintf", "(", "'Argument 1 passed to %s() must be of the type boolean,...
Returns all the messages @param boolean $fullname @return array
[ "Returns", "all", "the", "messages" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Validator/Validator.php#L253-L261
195,221
Kris-Kuiper/sFire-Framework
src/Validator/Validator.php
Validator.getMessage
public function getMessage($fieldname) { if(false === is_string($fieldname)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($fieldname)), E_USER_ERROR); } $instance = $this -> getMessageInstance(); $short = $instance :: getEr...
php
public function getMessage($fieldname) { if(false === is_string($fieldname)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($fieldname)), E_USER_ERROR); } $instance = $this -> getMessageInstance(); $short = $instance :: getEr...
[ "public", "function", "getMessage", "(", "$", "fieldname", ")", "{", "if", "(", "false", "===", "is_string", "(", "$", "fieldname", ")", ")", "{", "return", "trigger_error", "(", "sprintf", "(", "'Argument 1 passed to %s() must be of the type string, \"%s\" given'", ...
Returns messages by fieldname @param string $fiedlname @return string
[ "Returns", "messages", "by", "fieldname" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Validator/Validator.php#L269-L286
195,222
Kris-Kuiper/sFire-Framework
src/Validator/Validator.php
Validator.setPrefix
public function setPrefix($prefix = null) { if(null !== $prefix) { if(false === is_string($prefix)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($prefix)), E_USER_ERROR); } $this -> prefix = $prefix; } return $th...
php
public function setPrefix($prefix = null) { if(null !== $prefix) { if(false === is_string($prefix)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($prefix)), E_USER_ERROR); } $this -> prefix = $prefix; } return $th...
[ "public", "function", "setPrefix", "(", "$", "prefix", "=", "null", ")", "{", "if", "(", "null", "!==", "$", "prefix", ")", "{", "if", "(", "false", "===", "is_string", "(", "$", "prefix", ")", ")", "{", "return", "trigger_error", "(", "sprintf", "("...
Sets the prefix @param string $prefix @return sFire\Validator\Validator
[ "Sets", "the", "prefix" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Validator/Validator.php#L294-L306
195,223
Kris-Kuiper/sFire-Framework
src/Validator/Validator.php
Validator.addRule
private function addRule($rule, $field, $parameters, $closue = null, $message = null) { $this -> rules[] = (object) [ 'rule' => $rule, 'field' => $field, 'parameters' => $parameters, 'closure' => $closue, 'prefix' => $this -> getPrefix(), 'message' => $message, 'required' ...
php
private function addRule($rule, $field, $parameters, $closue = null, $message = null) { $this -> rules[] = (object) [ 'rule' => $rule, 'field' => $field, 'parameters' => $parameters, 'closure' => $closue, 'prefix' => $this -> getPrefix(), 'message' => $message, 'required' ...
[ "private", "function", "addRule", "(", "$", "rule", ",", "$", "field", ",", "$", "parameters", ",", "$", "closue", "=", "null", ",", "$", "message", "=", "null", ")", "{", "$", "this", "->", "rules", "[", "]", "=", "(", "object", ")", "[", "'rule...
Add rule to validation @param string $rule @param string $field @param array $parameters
[ "Add", "rule", "to", "validation" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Validator/Validator.php#L393-L405
195,224
codemojo-dr/startkit-php-sdk
src/CodeMojo/OAuth2/Client.php
Client.setAccessTokenType
public function setAccessTokenType($type, $secret = null, $algorithm = null) { $this->access_token_type = $type; $this->access_token_secret = $secret; $this->access_token_algorithm = $algorithm; }
php
public function setAccessTokenType($type, $secret = null, $algorithm = null) { $this->access_token_type = $type; $this->access_token_secret = $secret; $this->access_token_algorithm = $algorithm; }
[ "public", "function", "setAccessTokenType", "(", "$", "type", ",", "$", "secret", "=", "null", ",", "$", "algorithm", "=", "null", ")", "{", "$", "this", "->", "access_token_type", "=", "$", "type", ";", "$", "this", "->", "access_token_secret", "=", "$"...
Set the access token type @param int $type Access token type (ACCESS_TOKEN_BEARER, ACCESS_TOKEN_MAC, ACCESS_TOKEN_URI) @param string $secret The secret key used to encrypt the MAC header @param string $algorithm Algorithm used to encrypt the signature @return void
[ "Set", "the", "access", "token", "type" ]
cd2227e1a221be2cd75dc96d1c9e0acfda936fb3
https://github.com/codemojo-dr/startkit-php-sdk/blob/cd2227e1a221be2cd75dc96d1c9e0acfda936fb3/src/CodeMojo/OAuth2/Client.php#L309-L314
195,225
codemojo-dr/startkit-php-sdk
src/CodeMojo/OAuth2/Client.php
Client.generateMACSignature
private function generateMACSignature($url, $parameters, $http_method) { $timestamp = time(); $nonce = uniqid(); $parsed_url = parse_url($url); if (!isset($parsed_url['port'])) { $parsed_url['port'] = ($parsed_url['scheme'] == 'https') ? 443 : 80; } ...
php
private function generateMACSignature($url, $parameters, $http_method) { $timestamp = time(); $nonce = uniqid(); $parsed_url = parse_url($url); if (!isset($parsed_url['port'])) { $parsed_url['port'] = ($parsed_url['scheme'] == 'https') ? 443 : 80; } ...
[ "private", "function", "generateMACSignature", "(", "$", "url", ",", "$", "parameters", ",", "$", "http_method", ")", "{", "$", "timestamp", "=", "time", "(", ")", ";", "$", "nonce", "=", "uniqid", "(", ")", ";", "$", "parsed_url", "=", "parse_url", "(...
Generate the MAC signature @param string $url Called URL @param array $parameters Parameters @param string $http_method Http Method @return string
[ "Generate", "the", "MAC", "signature" ]
cd2227e1a221be2cd75dc96d1c9e0acfda936fb3
https://github.com/codemojo-dr/startkit-php-sdk/blob/cd2227e1a221be2cd75dc96d1c9e0acfda936fb3/src/CodeMojo/OAuth2/Client.php#L365-L392
195,226
codemojo-dr/startkit-php-sdk
src/CodeMojo/OAuth2/Client.php
Client.convertToCamelCase
private function convertToCamelCase($grant_type) { $parts = explode('_', $grant_type); array_walk($parts, function(&$item) { $item = ucfirst($item);}); return implode('', $parts); }
php
private function convertToCamelCase($grant_type) { $parts = explode('_', $grant_type); array_walk($parts, function(&$item) { $item = ucfirst($item);}); return implode('', $parts); }
[ "private", "function", "convertToCamelCase", "(", "$", "grant_type", ")", "{", "$", "parts", "=", "explode", "(", "'_'", ",", "$", "grant_type", ")", ";", "array_walk", "(", "$", "parts", ",", "function", "(", "&", "$", "item", ")", "{", "$", "item", ...
Converts the class name to camel case @param mixed $grant_type the grant type @return string
[ "Converts", "the", "class", "name", "to", "camel", "case" ]
cd2227e1a221be2cd75dc96d1c9e0acfda936fb3
https://github.com/codemojo-dr/startkit-php-sdk/blob/cd2227e1a221be2cd75dc96d1c9e0acfda936fb3/src/CodeMojo/OAuth2/Client.php#L503-L508
195,227
vanilla/garden-daemon
src/Lock.php
Lock.isLocked
public function isLocked($recover = true) { $myPid = getmypid(); if (!file_exists($this->pidFile)) { return false; } $lockPid = trim(file_get_contents($this->pidFile)); // This is my lockfile, nothing to do if ($myPid == $lockPid) { return false;...
php
public function isLocked($recover = true) { $myPid = getmypid(); if (!file_exists($this->pidFile)) { return false; } $lockPid = trim(file_get_contents($this->pidFile)); // This is my lockfile, nothing to do if ($myPid == $lockPid) { return false;...
[ "public", "function", "isLocked", "(", "$", "recover", "=", "true", ")", "{", "$", "myPid", "=", "getmypid", "(", ")", ";", "if", "(", "!", "file_exists", "(", "$", "this", "->", "pidFile", ")", ")", "{", "return", "false", ";", "}", "$", "lockPid"...
Check if this lockFile corresponds to a locked process @param boolean $recover @return boolean
[ "Check", "if", "this", "lockFile", "corresponds", "to", "a", "locked", "process" ]
13a5cbbac08ab6473e4b11bf00179fe1e26235a6
https://github.com/vanilla/garden-daemon/blob/13a5cbbac08ab6473e4b11bf00179fe1e26235a6/src/Lock.php#L60-L86
195,228
vanilla/garden-daemon
src/Lock.php
Lock.isProcessRunning
public function isProcessRunning($pid) { if (!$pid) { return false; } // Is the PID running? $running = posix_kill($pid, 0); if (!$running) { return false; } // Did we have trouble pinging that PID? $psExists = !(bool)posix_get_la...
php
public function isProcessRunning($pid) { if (!$pid) { return false; } // Is the PID running? $running = posix_kill($pid, 0); if (!$running) { return false; } // Did we have trouble pinging that PID? $psExists = !(bool)posix_get_la...
[ "public", "function", "isProcessRunning", "(", "$", "pid", ")", "{", "if", "(", "!", "$", "pid", ")", "{", "return", "false", ";", "}", "// Is the PID running?", "$", "running", "=", "posix_kill", "(", "$", "pid", ",", "0", ")", ";", "if", "(", "!", ...
Check if a pid is running @param string $pid @return boolean
[ "Check", "if", "a", "pid", "is", "running" ]
13a5cbbac08ab6473e4b11bf00179fe1e26235a6
https://github.com/vanilla/garden-daemon/blob/13a5cbbac08ab6473e4b11bf00179fe1e26235a6/src/Lock.php#L94-L109
195,229
vanilla/garden-daemon
src/Lock.php
Lock.getRunningPID
public function getRunningPID() { if (!file_exists($this->pidFile)) { return false; } $runPid = trim(file_get_contents($this->pidFile)); if (!$runPid) { return false; } return $runPid; }
php
public function getRunningPID() { if (!file_exists($this->pidFile)) { return false; } $runPid = trim(file_get_contents($this->pidFile)); if (!$runPid) { return false; } return $runPid; }
[ "public", "function", "getRunningPID", "(", ")", "{", "if", "(", "!", "file_exists", "(", "$", "this", "->", "pidFile", ")", ")", "{", "return", "false", ";", "}", "$", "runPid", "=", "trim", "(", "file_get_contents", "(", "$", "this", "->", "pidFile",...
Get agent pid @return integer|false
[ "Get", "agent", "pid" ]
13a5cbbac08ab6473e4b11bf00179fe1e26235a6
https://github.com/vanilla/garden-daemon/blob/13a5cbbac08ab6473e4b11bf00179fe1e26235a6/src/Lock.php#L116-L127
195,230
ekyna/MediaBundle
Model/MediaTypes.php
MediaTypes.guessByMimeType
static public function guessByMimeType($mimeType) { switch (substr($mimeType, 0, strpos($mimeType, '/'))) { case 'audio' : return self::AUDIO; break; case 'image' : return self::IMAGE; break; case 'video' : return self::VIDEO; break; } if (preg_match('~zi...
php
static public function guessByMimeType($mimeType) { switch (substr($mimeType, 0, strpos($mimeType, '/'))) { case 'audio' : return self::AUDIO; break; case 'image' : return self::IMAGE; break; case 'video' : return self::VIDEO; break; } if (preg_match('~zi...
[ "static", "public", "function", "guessByMimeType", "(", "$", "mimeType", ")", "{", "switch", "(", "substr", "(", "$", "mimeType", ",", "0", ",", "strpos", "(", "$", "mimeType", ",", "'/'", ")", ")", ")", "{", "case", "'audio'", ":", "return", "self", ...
Guess the type by mime type. @param $mimeType @return string
[ "Guess", "the", "type", "by", "mime", "type", "." ]
512cf86c801a130a9f17eba8b48d646d23acdbab
https://github.com/ekyna/MediaBundle/blob/512cf86c801a130a9f17eba8b48d646d23acdbab/Model/MediaTypes.php#L43-L60
195,231
linpax/microphp-framework
src/filter/CsrfFilter.php
CsrfFilter.insertProtect
public function insertProtect(array $matches = []) { $gen = md5(mt_rand()); /** @var ISession $s */ $s = (new SessionInjector)->build(); $s->csrf = array_merge(is_array($s->csrf) ? $s->csrf : [], [md5($gen)]); return $matches[1].'<input type="hidden" name="csrf" value="'.$g...
php
public function insertProtect(array $matches = []) { $gen = md5(mt_rand()); /** @var ISession $s */ $s = (new SessionInjector)->build(); $s->csrf = array_merge(is_array($s->csrf) ? $s->csrf : [], [md5($gen)]); return $matches[1].'<input type="hidden" name="csrf" value="'.$g...
[ "public", "function", "insertProtect", "(", "array", "$", "matches", "=", "[", "]", ")", "{", "$", "gen", "=", "md5", "(", "mt_rand", "(", ")", ")", ";", "/** @var ISession $s */", "$", "s", "=", "(", "new", "SessionInjector", ")", "->", "build", "(", ...
Insert CSRF protect into forms @access public @param array $matches Form @return string @throws Exception
[ "Insert", "CSRF", "protect", "into", "forms" ]
11f3370f3f64c516cce9b84ecd8276c6e9ae8df9
https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/filter/CsrfFilter.php#L94-L103
195,232
larapulse/support
src/Handlers/Str.php
Str.pop
public static function pop(string &$str, string $encoding = null) { $encoding = $encoding ?: mb_internal_encoding(); $last = mb_substr($str, -1, null, $encoding); $str = mb_substr($str, 0, -1, $encoding); return $last; }
php
public static function pop(string &$str, string $encoding = null) { $encoding = $encoding ?: mb_internal_encoding(); $last = mb_substr($str, -1, null, $encoding); $str = mb_substr($str, 0, -1, $encoding); return $last; }
[ "public", "static", "function", "pop", "(", "string", "&", "$", "str", ",", "string", "$", "encoding", "=", "null", ")", "{", "$", "encoding", "=", "$", "encoding", "?", ":", "mb_internal_encoding", "(", ")", ";", "$", "last", "=", "mb_substr", "(", ...
Pop the character off the end of string @param string $str @param string $encoding @return bool|string
[ "Pop", "the", "character", "off", "the", "end", "of", "string" ]
601ee3fd6967be669afe081322340c82c7edf32d
https://github.com/larapulse/support/blob/601ee3fd6967be669afe081322340c82c7edf32d/src/Handlers/Str.php#L17-L25
195,233
larapulse/support
src/Handlers/Str.php
Str.shift
public static function shift(string &$str, string $encoding = null) { $encoding = $encoding ?: mb_internal_encoding(); $first = mb_substr($str, 0, 1, $encoding); $str = mb_substr($str, 1, null, $encoding); return $first; }
php
public static function shift(string &$str, string $encoding = null) { $encoding = $encoding ?: mb_internal_encoding(); $first = mb_substr($str, 0, 1, $encoding); $str = mb_substr($str, 1, null, $encoding); return $first; }
[ "public", "static", "function", "shift", "(", "string", "&", "$", "str", ",", "string", "$", "encoding", "=", "null", ")", "{", "$", "encoding", "=", "$", "encoding", "?", ":", "mb_internal_encoding", "(", ")", ";", "$", "first", "=", "mb_substr", "(",...
Shift a character off the beginning of string @param string $str @param string $encoding @return bool|string
[ "Shift", "a", "character", "off", "the", "beginning", "of", "string" ]
601ee3fd6967be669afe081322340c82c7edf32d
https://github.com/larapulse/support/blob/601ee3fd6967be669afe081322340c82c7edf32d/src/Handlers/Str.php#L35-L43
195,234
larapulse/support
src/Handlers/Str.php
Str.cutStart
public static function cutStart( string $str, string $subString = ' ', bool $repeat = false, bool $caseSensitive = true ) : string { $prepared = RegEx::prepare($subString, '/'); $regex = sprintf( '/^%s/%s', ($subString ? ($repea...
php
public static function cutStart( string $str, string $subString = ' ', bool $repeat = false, bool $caseSensitive = true ) : string { $prepared = RegEx::prepare($subString, '/'); $regex = sprintf( '/^%s/%s', ($subString ? ($repea...
[ "public", "static", "function", "cutStart", "(", "string", "$", "str", ",", "string", "$", "subString", "=", "' '", ",", "bool", "$", "repeat", "=", "false", ",", "bool", "$", "caseSensitive", "=", "true", ")", ":", "string", "{", "$", "prepared", "=",...
Cut substring from the beginning of string @param string $str @param string $subString @param bool $repeat @param bool $caseSensitive Not working with multi-byte characters @return string
[ "Cut", "substring", "from", "the", "beginning", "of", "string" ]
601ee3fd6967be669afe081322340c82c7edf32d
https://github.com/larapulse/support/blob/601ee3fd6967be669afe081322340c82c7edf32d/src/Handlers/Str.php#L55-L72
195,235
Becklyn/Gluggi
src/Model/DownloadModel.php
DownloadModel.getAllDownloads
public function getAllDownloads () { try { $directoryIterator = new \DirectoryIterator($this->downloadDir); $downloads = []; foreach ($directoryIterator as $file) { if (!$file->isFile()) { co...
php
public function getAllDownloads () { try { $directoryIterator = new \DirectoryIterator($this->downloadDir); $downloads = []; foreach ($directoryIterator as $file) { if (!$file->isFile()) { co...
[ "public", "function", "getAllDownloads", "(", ")", "{", "try", "{", "$", "directoryIterator", "=", "new", "\\", "DirectoryIterator", "(", "$", "this", "->", "downloadDir", ")", ";", "$", "downloads", "=", "[", "]", ";", "foreach", "(", "$", "directoryItera...
Returns a list of all downloads @return Download[]
[ "Returns", "a", "list", "of", "all", "downloads" ]
837e7ee8d34f5b16a7f1ef53ca64b1ea8722b786
https://github.com/Becklyn/Gluggi/blob/837e7ee8d34f5b16a7f1ef53ca64b1ea8722b786/src/Model/DownloadModel.php#L41-L71
195,236
net-tools/core
src/Helpers/ImagingHelper.php
ImagingHelper.imageAdjustOrientation
static function imageAdjustOrientation($path) { // read image $image = new \imagick(); if ( !$image->readImage($path) ) return FALSE; // read exif orientation $orientation = $image->getImageOrientation(); $rotated = false; switch($orientation) { case \imagick::ORIENTATION_BOTTOMRIGHT: ...
php
static function imageAdjustOrientation($path) { // read image $image = new \imagick(); if ( !$image->readImage($path) ) return FALSE; // read exif orientation $orientation = $image->getImageOrientation(); $rotated = false; switch($orientation) { case \imagick::ORIENTATION_BOTTOMRIGHT: ...
[ "static", "function", "imageAdjustOrientation", "(", "$", "path", ")", "{", "// read image", "$", "image", "=", "new", "\\", "imagick", "(", ")", ";", "if", "(", "!", "$", "image", "->", "readImage", "(", "$", "path", ")", ")", "return", "FALSE", ";", ...
If exif data indicates a rotated image, we apply the transformation to the image and set back orientation to normal @param string $path Path to image @return bool
[ "If", "exif", "data", "indicates", "a", "rotated", "image", "we", "apply", "the", "transformation", "to", "the", "image", "and", "set", "back", "orientation", "to", "normal" ]
51446641cee22c0cf53d2b409c76cc8bd1a187e7
https://github.com/net-tools/core/blob/51446641cee22c0cf53d2b409c76cc8bd1a187e7/src/Helpers/ImagingHelper.php#L27-L69
195,237
bkstg/schedule-bundle
Controller/InvitationController.php
InvitationController.indexAction
public function indexAction( Request $request, PaginatorInterface $paginator, TokenStorageInterface $token_storage ): Response { // Get the invitations repo and a list of pending invites for this user. $repo = $this->em->getRepository(Invitation::class); $query = $rep...
php
public function indexAction( Request $request, PaginatorInterface $paginator, TokenStorageInterface $token_storage ): Response { // Get the invitations repo and a list of pending invites for this user. $repo = $this->em->getRepository(Invitation::class); $query = $rep...
[ "public", "function", "indexAction", "(", "Request", "$", "request", ",", "PaginatorInterface", "$", "paginator", ",", "TokenStorageInterface", "$", "token_storage", ")", ":", "Response", "{", "// Get the invitations repo and a list of pending invites for this user.", "$", ...
Show a list of pending invitations for the current user. @param Request $request The incoming request. @param PaginatorInterface $paginator The paginator service. @param TokenStorageInterface $token_storage The token storage service. @return Response
[ "Show", "a", "list", "of", "pending", "invitations", "for", "the", "current", "user", "." ]
e64ac897aa7b28bc48319470d65de13cd4788afe
https://github.com/bkstg/schedule-bundle/blob/e64ac897aa7b28bc48319470d65de13cd4788afe/Controller/InvitationController.php#L36-L52
195,238
bkstg/schedule-bundle
Controller/InvitationController.php
InvitationController.respondAction
public function respondAction( int $id, string $response, AuthorizationCheckerInterface $auth ): Response { // Get the repo and lookup the invitation. $repo = $this->em->getRepository(Invitation::class); if (null === $invitation = $repo->findOneBy(['id' => $id])) { ...
php
public function respondAction( int $id, string $response, AuthorizationCheckerInterface $auth ): Response { // Get the repo and lookup the invitation. $repo = $this->em->getRepository(Invitation::class); if (null === $invitation = $repo->findOneBy(['id' => $id])) { ...
[ "public", "function", "respondAction", "(", "int", "$", "id", ",", "string", "$", "response", ",", "AuthorizationCheckerInterface", "$", "auth", ")", ":", "Response", "{", "// Get the repo and lookup the invitation.", "$", "repo", "=", "$", "this", "->", "em", "...
Respond to an individual invitation. @param int $id The id of the invitation. @param string $response The response to the invitation. @param AuthorizationCheckerInterface $auth The authorization checker service. @throws NotFoundHttpException When the invitati...
[ "Respond", "to", "an", "individual", "invitation", "." ]
e64ac897aa7b28bc48319470d65de13cd4788afe
https://github.com/bkstg/schedule-bundle/blob/e64ac897aa7b28bc48319470d65de13cd4788afe/Controller/InvitationController.php#L93-L125
195,239
pluf/tenant
src/Tenant/Monitor.php
Tenant_Monitor.permission
public static function permission ($request = null, $match = null) { // Check user if (!$request->user || $request->user->isAnonymous()) { return false; } // Get permission $per = new User_Role(); $sql = new Pluf_SQL('code_name=%s', ...
php
public static function permission ($request = null, $match = null) { // Check user if (!$request->user || $request->user->isAnonymous()) { return false; } // Get permission $per = new User_Role(); $sql = new Pluf_SQL('code_name=%s', ...
[ "public", "static", "function", "permission", "(", "$", "request", "=", "null", ",", "$", "match", "=", "null", ")", "{", "// Check user", "if", "(", "!", "$", "request", "->", "user", "||", "$", "request", "->", "user", "->", "isAnonymous", "(", ")", ...
Retruns permision status @param Pluf_HTTP_Request $request @param array $match
[ "Retruns", "permision", "status" ]
a06359c52b9a257b5a0a186264e8770acfc54b73
https://github.com/pluf/tenant/blob/a06359c52b9a257b5a0a186264e8770acfc54b73/src/Tenant/Monitor.php#L39-L63
195,240
Waryway/PhpTraitsLibrary
src/Generator.php
Generator.fileLineGenerator
private function fileLineGenerator(string $fileName, callable $formatter = null) { $f = fopen($fileName, 'r'); try { while ($line = fgets($f)) { if(!is_null($formatter)){ yield call_user_func($formatter, $line); } ...
php
private function fileLineGenerator(string $fileName, callable $formatter = null) { $f = fopen($fileName, 'r'); try { while ($line = fgets($f)) { if(!is_null($formatter)){ yield call_user_func($formatter, $line); } ...
[ "private", "function", "fileLineGenerator", "(", "string", "$", "fileName", ",", "callable", "$", "formatter", "=", "null", ")", "{", "$", "f", "=", "fopen", "(", "$", "fileName", ",", "'r'", ")", ";", "try", "{", "while", "(", "$", "line", "=", "fge...
Read from a file one line at a time. @test @param $fileName @param callable|null $formatter - the default is a string. @return \Generator|string|object
[ "Read", "from", "a", "file", "one", "line", "at", "a", "time", "." ]
90c02e09b92e94664669b020b47a20a1590c4a4a
https://github.com/Waryway/PhpTraitsLibrary/blob/90c02e09b92e94664669b020b47a20a1590c4a4a/src/Generator.php#L14-L29
195,241
ezra-obiwale/dSCore
src/Stdlib/WordFigure.php
WordFigure.toWords
public function toWords($todo = null) { $this->toWords = true; if ($todo !== null) $this->todo = $todo; if ($this->todo !== null) return $this->doQuadrillion(); }
php
public function toWords($todo = null) { $this->toWords = true; if ($todo !== null) $this->todo = $todo; if ($this->todo !== null) return $this->doQuadrillion(); }
[ "public", "function", "toWords", "(", "$", "todo", "=", "null", ")", "{", "$", "this", "->", "toWords", "=", "true", ";", "if", "(", "$", "todo", "!==", "null", ")", "$", "this", "->", "todo", "=", "$", "todo", ";", "if", "(", "$", "this", "->"...
Converts the figure todo value to words @param string|int|float $todo The value to work on
[ "Converts", "the", "figure", "todo", "value", "to", "words" ]
dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d
https://github.com/ezra-obiwale/dSCore/blob/dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d/src/Stdlib/WordFigure.php#L36-L44
195,242
ezra-obiwale/dSCore
src/Stdlib/WordFigure.php
WordFigure.toFigure
public function toFigure($todo = null) { $this->toWords = false; if ($todo !== null) $this->todo = $todo; if ($this->todo !== null) return $this->doQuadrillion(); }
php
public function toFigure($todo = null) { $this->toWords = false; if ($todo !== null) $this->todo = $todo; if ($this->todo !== null) return $this->doQuadrillion(); }
[ "public", "function", "toFigure", "(", "$", "todo", "=", "null", ")", "{", "$", "this", "->", "toWords", "=", "false", ";", "if", "(", "$", "todo", "!==", "null", ")", "$", "this", "->", "todo", "=", "$", "todo", ";", "if", "(", "$", "this", "-...
Converts the word todo value to figure @param string|int|float $todo The value to work on
[ "Converts", "the", "word", "todo", "value", "to", "figure" ]
dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d
https://github.com/ezra-obiwale/dSCore/blob/dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d/src/Stdlib/WordFigure.php#L50-L58
195,243
PenoaksDev/Milky-Framework
src/Milky/Database/Query/Grammars/Grammar.php
Grammar.compileNestedJoinConstraint
protected function compileNestedJoinConstraint(array $clause) { $clauses = []; foreach ($clause['join']->clauses as $nestedClause) { $clauses[] = $this->compileJoinConstraint($nestedClause); } $clauses[0] = $this->removeLeadingBoolean($clauses[0]); $clauses = implode(' ', $clauses); return "{$clause...
php
protected function compileNestedJoinConstraint(array $clause) { $clauses = []; foreach ($clause['join']->clauses as $nestedClause) { $clauses[] = $this->compileJoinConstraint($nestedClause); } $clauses[0] = $this->removeLeadingBoolean($clauses[0]); $clauses = implode(' ', $clauses); return "{$clause...
[ "protected", "function", "compileNestedJoinConstraint", "(", "array", "$", "clause", ")", "{", "$", "clauses", "=", "[", "]", ";", "foreach", "(", "$", "clause", "[", "'join'", "]", "->", "clauses", "as", "$", "nestedClause", ")", "{", "$", "clauses", "[...
Create a nested join clause constraint segment. @param array $clause @return string
[ "Create", "a", "nested", "join", "clause", "constraint", "segment", "." ]
8afd7156610a70371aa5b1df50b8a212bf7b142c
https://github.com/PenoaksDev/Milky-Framework/blob/8afd7156610a70371aa5b1df50b8a212bf7b142c/src/Milky/Database/Query/Grammars/Grammar.php#L217-L230
195,244
OUTRAGElib/objectlist
lib/ObjectListRetrievalTrait.php
ObjectListRetrievalTrait.toArray
public function toArray() { $output = iterator_to_array($this); foreach($output as $index => $value) { # it's safe to presume this will be a thing if($value instanceof self) $output[$index] = $value->toArray(); } return $output; }
php
public function toArray() { $output = iterator_to_array($this); foreach($output as $index => $value) { # it's safe to presume this will be a thing if($value instanceof self) $output[$index] = $value->toArray(); } return $output; }
[ "public", "function", "toArray", "(", ")", "{", "$", "output", "=", "iterator_to_array", "(", "$", "this", ")", ";", "foreach", "(", "$", "output", "as", "$", "index", "=>", "$", "value", ")", "{", "# it's safe to presume this will be a thing", "if", "(", ...
toArray will return turn itself into arrays
[ "toArray", "will", "return", "turn", "itself", "into", "arrays" ]
8ac3f9fd99992c58a3f537325e02ba2337f9ee55
https://github.com/OUTRAGElib/objectlist/blob/8ac3f9fd99992c58a3f537325e02ba2337f9ee55/lib/ObjectListRetrievalTrait.php#L12-L24
195,245
ezra-obiwale/dSCore
src/Stdlib/Session.php
Session.getLifetime
public function getLifetime() { if (!self::$lifetime) { $sessionExpirationHours = engineGet('Config', 'sessionExpirationHours', false); if (!$sessionExpirationHours) $sessionExpirationHours = 2; self::$lifetime = 60 * 60 * $sessionExpirationHours; } ...
php
public function getLifetime() { if (!self::$lifetime) { $sessionExpirationHours = engineGet('Config', 'sessionExpirationHours', false); if (!$sessionExpirationHours) $sessionExpirationHours = 2; self::$lifetime = 60 * 60 * $sessionExpirationHours; } ...
[ "public", "function", "getLifetime", "(", ")", "{", "if", "(", "!", "self", "::", "$", "lifetime", ")", "{", "$", "sessionExpirationHours", "=", "engineGet", "(", "'Config'", ",", "'sessionExpirationHours'", ",", "false", ")", ";", "if", "(", "!", "$", "...
Fetch the life time for the session @return int
[ "Fetch", "the", "life", "time", "for", "the", "session" ]
dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d
https://github.com/ezra-obiwale/dSCore/blob/dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d/src/Stdlib/Session.php#L38-L47
195,246
ezra-obiwale/dSCore
src/Stdlib/Session.php
Session.save
public static function save($key, $value, $duration = null) { self::setLifetime($duration); static::init(); $_SESSION[self::$prepend . $key] = $value; }
php
public static function save($key, $value, $duration = null) { self::setLifetime($duration); static::init(); $_SESSION[self::$prepend . $key] = $value; }
[ "public", "static", "function", "save", "(", "$", "key", ",", "$", "value", ",", "$", "duration", "=", "null", ")", "{", "self", "::", "setLifetime", "(", "$", "duration", ")", ";", "static", "::", "init", "(", ")", ";", "$", "_SESSION", "[", "self...
Saves to session @param string $key @param mixed $value @param int $duration Duration for which the identity should be valid
[ "Saves", "to", "session" ]
dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d
https://github.com/ezra-obiwale/dSCore/blob/dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d/src/Stdlib/Session.php#L55-L59
195,247
ezra-obiwale/dSCore
src/Stdlib/Session.php
Session.fetch
public static function fetch($key) { static::init(); if (isset($_SESSION[self::$prepend . $key])) return $_SESSION[self::$prepend . $key]; }
php
public static function fetch($key) { static::init(); if (isset($_SESSION[self::$prepend . $key])) return $_SESSION[self::$prepend . $key]; }
[ "public", "static", "function", "fetch", "(", "$", "key", ")", "{", "static", "::", "init", "(", ")", ";", "if", "(", "isset", "(", "$", "_SESSION", "[", "self", "::", "$", "prepend", ".", "$", "key", "]", ")", ")", "return", "$", "_SESSION", "["...
Fetches from session @param string $key @return mixed
[ "Fetches", "from", "session" ]
dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d
https://github.com/ezra-obiwale/dSCore/blob/dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d/src/Stdlib/Session.php#L66-L70
195,248
ezra-obiwale/dSCore
src/Stdlib/Session.php
Session.remove
public static function remove($key) { static::init(); if (isset($_SESSION[self::$prepend . $key])) unset($_SESSION[self::$prepend . $key]); }
php
public static function remove($key) { static::init(); if (isset($_SESSION[self::$prepend . $key])) unset($_SESSION[self::$prepend . $key]); }
[ "public", "static", "function", "remove", "(", "$", "key", ")", "{", "static", "::", "init", "(", ")", ";", "if", "(", "isset", "(", "$", "_SESSION", "[", "self", "::", "$", "prepend", ".", "$", "key", "]", ")", ")", "unset", "(", "$", "_SESSION"...
Removes from session @param string $key
[ "Removes", "from", "session" ]
dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d
https://github.com/ezra-obiwale/dSCore/blob/dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d/src/Stdlib/Session.php#L76-L80
195,249
sndsgd/sndsgd-task
src/task/Runner.php
Runner.run
public function run($data) { $this->task->addValues($data); if ($this->task->validate() === true) { return $this->task->run(); } $errors = $this->task->getErrors(); Env::error($this->formatErrors($errors)); }
php
public function run($data) { $this->task->addValues($data); if ($this->task->validate() === true) { return $this->task->run(); } $errors = $this->task->getErrors(); Env::error($this->formatErrors($errors)); }
[ "public", "function", "run", "(", "$", "data", ")", "{", "$", "this", "->", "task", "->", "addValues", "(", "$", "data", ")", ";", "if", "(", "$", "this", "->", "task", "->", "validate", "(", ")", "===", "true", ")", "{", "return", "$", "this", ...
Run a task @param mixed $data
[ "Run", "a", "task" ]
53185a58fe739e5c4b9e0c96290adaca0cf015d5
https://github.com/sndsgd/sndsgd-task/blob/53185a58fe739e5c4b9e0c96290adaca0cf015d5/src/task/Runner.php#L67-L76
195,250
squareproton/Bond
src/Bond/Entity/Types/Json.php
Json.makeFromObject
public static function makeFromObject( $object ) { // inistante object without going via constructer to allow us to $refl = new \ReflectionClass( __CLASS__ ); $obj = $refl->newInstanceWithoutConstructor(); $obj->isValid = true; $obj->decoded = $object; return $obj; ...
php
public static function makeFromObject( $object ) { // inistante object without going via constructer to allow us to $refl = new \ReflectionClass( __CLASS__ ); $obj = $refl->newInstanceWithoutConstructor(); $obj->isValid = true; $obj->decoded = $object; return $obj; ...
[ "public", "static", "function", "makeFromObject", "(", "$", "object", ")", "{", "// inistante object without going via constructer to allow us to", "$", "refl", "=", "new", "\\", "ReflectionClass", "(", "__CLASS__", ")", ";", "$", "obj", "=", "$", "refl", "->", "n...
Static entry point to generate a json_object from something that can be json_serialized We don't need to validate or calc the json representation as this can be calculated lazily @return Bond\Entity\Type\Json
[ "Static", "entry", "point", "to", "generate", "a", "json_object", "from", "something", "that", "can", "be", "json_serialized", "We", "don", "t", "need", "to", "validate", "or", "calc", "the", "json", "representation", "as", "this", "can", "be", "calculated", ...
a04ad9dd1a35adeaec98237716c2a41ce02b4f1a
https://github.com/squareproton/Bond/blob/a04ad9dd1a35adeaec98237716c2a41ce02b4f1a/src/Bond/Entity/Types/Json.php#L94-L102
195,251
squareproton/Bond
src/Bond/Entity/Types/Json.php
Json.isValid
public function isValid( &$exception = null ) { $exception = null; // have we validated this before? if( $this->isValid === null ) { $this->decoded = @json_decode( $this->json, true ); // have error? if( null === $this->decoded and JSON_ERROR_NONE !== $las...
php
public function isValid( &$exception = null ) { $exception = null; // have we validated this before? if( $this->isValid === null ) { $this->decoded = @json_decode( $this->json, true ); // have error? if( null === $this->decoded and JSON_ERROR_NONE !== $las...
[ "public", "function", "isValid", "(", "&", "$", "exception", "=", "null", ")", "{", "$", "exception", "=", "null", ";", "// have we validated this before?", "if", "(", "$", "this", "->", "isValid", "===", "null", ")", "{", "$", "this", "->", "decoded", "...
Does or json object contain valid json @return bool
[ "Does", "or", "json", "object", "contain", "valid", "json" ]
a04ad9dd1a35adeaec98237716c2a41ce02b4f1a
https://github.com/squareproton/Bond/blob/a04ad9dd1a35adeaec98237716c2a41ce02b4f1a/src/Bond/Entity/Types/Json.php#L108-L129
195,252
WyriHaximus/TickingPromise
src/TickingFuturePromise.php
TickingFuturePromise.create
public static function create(LoopInterface $loop, callable $check, $value = null, $iterations = 1) { return (new self($loop, $check, $value, $iterations))->run(); }
php
public static function create(LoopInterface $loop, callable $check, $value = null, $iterations = 1) { return (new self($loop, $check, $value, $iterations))->run(); }
[ "public", "static", "function", "create", "(", "LoopInterface", "$", "loop", ",", "callable", "$", "check", ",", "$", "value", "=", "null", ",", "$", "iterations", "=", "1", ")", "{", "return", "(", "new", "self", "(", "$", "loop", ",", "$", "check",...
Factory used by tickingFuturePromise, see there for more details. @param LoopInterface $loop ReactPHP event loop. @param callable $check Callable to run at the future tick. @param mixed $value Value to pass into $check on tick. @param int $iterations Number of iterations to call ...
[ "Factory", "used", "by", "tickingFuturePromise", "see", "there", "for", "more", "details", "." ]
efdb162d596052455c9ba98aec42e08009c6629b
https://github.com/WyriHaximus/TickingPromise/blob/efdb162d596052455c9ba98aec42e08009c6629b/src/TickingFuturePromise.php#L78-L81
195,253
WyriHaximus/TickingPromise
src/TickingFuturePromise.php
TickingFuturePromise.run
protected function run() { futurePromise($this->loop)->then(function (): void { $this->check(); }); return $this->deferred->promise(); }
php
protected function run() { futurePromise($this->loop)->then(function (): void { $this->check(); }); return $this->deferred->promise(); }
[ "protected", "function", "run", "(", ")", "{", "futurePromise", "(", "$", "this", "->", "loop", ")", "->", "then", "(", "function", "(", ")", ":", "void", "{", "$", "this", "->", "check", "(", ")", ";", "}", ")", ";", "return", "$", "this", "->",...
Run the ticking future promise. @return \React\Promise\Promise
[ "Run", "the", "ticking", "future", "promise", "." ]
efdb162d596052455c9ba98aec42e08009c6629b
https://github.com/WyriHaximus/TickingPromise/blob/efdb162d596052455c9ba98aec42e08009c6629b/src/TickingFuturePromise.php#L88-L95
195,254
shrink0r/php-schema
src/Property/IntProperty.php
IntProperty.validate
public function validate($value) { return is_int($value) ? Ok::unit() : Error::unit([ Error::NON_INT ]); }
php
public function validate($value) { return is_int($value) ? Ok::unit() : Error::unit([ Error::NON_INT ]); }
[ "public", "function", "validate", "(", "$", "value", ")", "{", "return", "is_int", "(", "$", "value", ")", "?", "Ok", "::", "unit", "(", ")", ":", "Error", "::", "unit", "(", "[", "Error", "::", "NON_INT", "]", ")", ";", "}" ]
Tells if a given value is a valid int. @param mixed $value @return ResultInterface Returns Ok if the value is valid, otherwise an Error is returned.
[ "Tells", "if", "a", "given", "value", "is", "a", "valid", "int", "." ]
94293fe897af376dd9d05962e2c516079409dd29
https://github.com/shrink0r/php-schema/blob/94293fe897af376dd9d05962e2c516079409dd29/src/Property/IntProperty.php#L18-L21
195,255
net-tools/core
src/ExceptionHandlers/Formatters/Formatter.php
Formatter.format
public function format(\Throwable $e, $h1) { // get body content with stack trace content (stack formatted with strategy passed as constructor parameter) return $this->body($e, $h1, $this->_stackTraceFormatter->format(new StackTrace($e))); }
php
public function format(\Throwable $e, $h1) { // get body content with stack trace content (stack formatted with strategy passed as constructor parameter) return $this->body($e, $h1, $this->_stackTraceFormatter->format(new StackTrace($e))); }
[ "public", "function", "format", "(", "\\", "Throwable", "$", "e", ",", "$", "h1", ")", "{", "// get body content with stack trace content (stack formatted with strategy passed as constructor parameter)", "return", "$", "this", "->", "body", "(", "$", "e", ",", "$", "h...
Format an exception as a string with suitable format @param \Throwable $e Exception to format @param string $h1 Title of error page (such as "an error has occured") @return string
[ "Format", "an", "exception", "as", "a", "string", "with", "suitable", "format" ]
51446641cee22c0cf53d2b409c76cc8bd1a187e7
https://github.com/net-tools/core/blob/51446641cee22c0cf53d2b409c76cc8bd1a187e7/src/ExceptionHandlers/Formatters/Formatter.php#L53-L57
195,256
Kris-Kuiper/sFire-Framework
src/Utils/StringToArray.php
StringToArray.execute
public function execute($key = null, $default = null, $data = null) { //Matching type array if(is_array($key)) { foreach($key as $index) { if(!isset($data[$index])) { return $default; } $data = $data[$index]; } return $data; } //Matching type string if($key &&...
php
public function execute($key = null, $default = null, $data = null) { //Matching type array if(is_array($key)) { foreach($key as $index) { if(!isset($data[$index])) { return $default; } $data = $data[$index]; } return $data; } //Matching type string if($key &&...
[ "public", "function", "execute", "(", "$", "key", "=", "null", ",", "$", "default", "=", "null", ",", "$", "data", "=", "null", ")", "{", "//Matching type array\r", "if", "(", "is_array", "(", "$", "key", ")", ")", "{", "foreach", "(", "$", "key", ...
Get value from array string @param mixed $key @param mixed $default @param mixed $data @return mixed
[ "Get", "value", "from", "array", "string" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Utils/StringToArray.php#L21-L62
195,257
modulusphp/utility
Validate.php
Validate.make
public static function make(array $data, array $rules, $unknown = null, $custom = []) { $factory = new ValidatorFactory(); if (is_array($unknown) && count($unknown) > 0) { $custom = $unknown; } $response = $factory->make($data, $rules, $custom); if (isset($_SERVER['HTTP_X_REQUESTED_WITH']...
php
public static function make(array $data, array $rules, $unknown = null, $custom = []) { $factory = new ValidatorFactory(); if (is_array($unknown) && count($unknown) > 0) { $custom = $unknown; } $response = $factory->make($data, $rules, $custom); if (isset($_SERVER['HTTP_X_REQUESTED_WITH']...
[ "public", "static", "function", "make", "(", "array", "$", "data", ",", "array", "$", "rules", ",", "$", "unknown", "=", "null", ",", "$", "custom", "=", "[", "]", ")", "{", "$", "factory", "=", "new", "ValidatorFactory", "(", ")", ";", "if", "(", ...
Make a new validator @param array $data @param array $rules @param mixed $unknown @param mixed $custom @return mixed
[ "Make", "a", "new", "validator" ]
c1e127539b13d3ec8381e41c64b881e0701807f5
https://github.com/modulusphp/utility/blob/c1e127539b13d3ec8381e41c64b881e0701807f5/Validate.php#L19-L39
195,258
bseddon/XPath20
Iterator/NodeIterator.php
NodeIterator.NextItem
protected function NextItem() { if ( $this->used ) $this->iterator->next(); $this->used = true; return $this->iterator->current(); // getCurrent(); }
php
protected function NextItem() { if ( $this->used ) $this->iterator->next(); $this->used = true; return $this->iterator->current(); // getCurrent(); }
[ "protected", "function", "NextItem", "(", ")", "{", "if", "(", "$", "this", "->", "used", ")", "$", "this", "->", "iterator", "->", "next", "(", ")", ";", "$", "this", "->", "used", "=", "true", ";", "return", "$", "this", "->", "iterator", "->", ...
NextItem This function is used if the caller uses 'MoveNext' on the iterator @return XPathItem
[ "NextItem", "This", "function", "is", "used", "if", "the", "caller", "uses", "MoveNext", "on", "the", "iterator" ]
69882b6efffaa5470a819d5fdd2f6473ddeb046d
https://github.com/bseddon/XPath20/blob/69882b6efffaa5470a819d5fdd2f6473ddeb046d/Iterator/NodeIterator.php#L99-L104
195,259
MatiasNAmendola/slimpower-auth-core
src/Abstracts/TokenAuthMiddleware.php
TokenAuthMiddleware.fetchData
public function fetchData() { /* If using PHP in CGI mode and non standard environment */ if (isset($_SERVER[$this->options["environment"]])) { $message = "Using token from environent"; $header = $_SERVER[$this->options["environment"]]; } else { $message = "Us...
php
public function fetchData() { /* If using PHP in CGI mode and non standard environment */ if (isset($_SERVER[$this->options["environment"]])) { $message = "Using token from environent"; $header = $_SERVER[$this->options["environment"]]; } else { $message = "Us...
[ "public", "function", "fetchData", "(", ")", "{", "/* If using PHP in CGI mode and non standard environment */", "if", "(", "isset", "(", "$", "_SERVER", "[", "$", "this", "->", "options", "[", "\"environment\"", "]", "]", ")", ")", "{", "$", "message", "=", "...
Fetch the access token @return string|false Base64 encoded JSON Web Token or false if not found.
[ "Fetch", "the", "access", "token" ]
550ab85d871de8451cb242eaa17f4041ff320b7c
https://github.com/MatiasNAmendola/slimpower-auth-core/blob/550ab85d871de8451cb242eaa17f4041ff320b7c/src/Abstracts/TokenAuthMiddleware.php#L102-L134
195,260
danielgp/common-lib
source/DomPaginationByDanielGP.php
DomPaginationByDanielGP.setArrayToStringForUrl
protected function setArrayToStringForUrl($sSeparator, $aElements, $aExceptedElements = ['']) { $outArray = $this->normalizeArrayForUrl($aElements); if (count($outArray) < 1) { return ''; } $xptArray = $this->normalizeArrayForUrl($aExceptedElements); $finalArray...
php
protected function setArrayToStringForUrl($sSeparator, $aElements, $aExceptedElements = ['']) { $outArray = $this->normalizeArrayForUrl($aElements); if (count($outArray) < 1) { return ''; } $xptArray = $this->normalizeArrayForUrl($aExceptedElements); $finalArray...
[ "protected", "function", "setArrayToStringForUrl", "(", "$", "sSeparator", ",", "$", "aElements", ",", "$", "aExceptedElements", "=", "[", "''", "]", ")", "{", "$", "outArray", "=", "$", "this", "->", "normalizeArrayForUrl", "(", "$", "aElements", ")", ";", ...
Converts an array to string @param string $sSeparator @param array $aElements @return string
[ "Converts", "an", "array", "to", "string" ]
627b99b4408414c7cd21a6c8016f6468dc9216b2
https://github.com/danielgp/common-lib/blob/627b99b4408414c7cd21a6c8016f6468dc9216b2/source/DomPaginationByDanielGP.php#L100-L109
195,261
danielgp/common-lib
source/DomPaginationByDanielGP.php
DomPaginationByDanielGP.setStartingPageRecord
private function setStartingPageRecord($sDefaultPageNo, $iRecordsPerPage, $iAllRecords, $bKeepFullPage = true) { if (is_null($this->tCmnSuperGlobals->get('page'))) { switch ($sDefaultPageNo) { case 'last': $iStartingPageRecord = $iAllRecords - $iRecordsPerPage...
php
private function setStartingPageRecord($sDefaultPageNo, $iRecordsPerPage, $iAllRecords, $bKeepFullPage = true) { if (is_null($this->tCmnSuperGlobals->get('page'))) { switch ($sDefaultPageNo) { case 'last': $iStartingPageRecord = $iAllRecords - $iRecordsPerPage...
[ "private", "function", "setStartingPageRecord", "(", "$", "sDefaultPageNo", ",", "$", "iRecordsPerPage", ",", "$", "iAllRecords", ",", "$", "bKeepFullPage", "=", "true", ")", "{", "if", "(", "is_null", "(", "$", "this", "->", "tCmnSuperGlobals", "->", "get", ...
Returns starting records for LIMIT clause on SQL interrogation @version 20080521 @param string $sDefaultPageNo @param int $iRecordsPerPage @param int $iAllRecords @param boolean $bKeepFullPage @return int
[ "Returns", "starting", "records", "for", "LIMIT", "clause", "on", "SQL", "interrogation" ]
627b99b4408414c7cd21a6c8016f6468dc9216b2
https://github.com/danielgp/common-lib/blob/627b99b4408414c7cd21a6c8016f6468dc9216b2/source/DomPaginationByDanielGP.php#L218-L237
195,262
mrstroz/yii2-wavecms-page
models/Page.php
Page.validateUniqueLink
public function validateUniqueLink($attribute) { $params = Yii::$app->request->get(); $query = PageLang::find()->joinWith('page')->andWhere([PageLang::tableName() . '.language' => Yii::$app->wavecms->editedLanguage, PageLang::tableName() . '.link' => $this->link]); if (isset($params['id'])...
php
public function validateUniqueLink($attribute) { $params = Yii::$app->request->get(); $query = PageLang::find()->joinWith('page')->andWhere([PageLang::tableName() . '.language' => Yii::$app->wavecms->editedLanguage, PageLang::tableName() . '.link' => $this->link]); if (isset($params['id'])...
[ "public", "function", "validateUniqueLink", "(", "$", "attribute", ")", "{", "$", "params", "=", "Yii", "::", "$", "app", "->", "request", "->", "get", "(", ")", ";", "$", "query", "=", "PageLang", "::", "find", "(", ")", "->", "joinWith", "(", "'pag...
Validator for unique link per language @param $attribute @return void
[ "Validator", "for", "unique", "link", "per", "language" ]
c7f867ffc5abd86814230c360aec9b30b6d2e819
https://github.com/mrstroz/yii2-wavecms-page/blob/c7f867ffc5abd86814230c360aec9b30b6d2e819/models/Page.php#L237-L250
195,263
frodosghost/PublishBundle
EventListener/ObjectPersistSubscriber.php
ObjectPersistSubscriber.getSecurityToken
private function getSecurityToken() { if ($this->container->get('security.context')->getToken() instanceof TokenInterface) { return $this->container->get('security.context')->getToken(); } return null; }
php
private function getSecurityToken() { if ($this->container->get('security.context')->getToken() instanceof TokenInterface) { return $this->container->get('security.context')->getToken(); } return null; }
[ "private", "function", "getSecurityToken", "(", ")", "{", "if", "(", "$", "this", "->", "container", "->", "get", "(", "'security.context'", ")", "->", "getToken", "(", ")", "instanceof", "TokenInterface", ")", "{", "return", "$", "this", "->", "container", ...
Lazy Loading of security context. Returns TokenInterface @link(Circular Reference when injecting Security Context, http://stackoverflow.com/a/8713339/174148) @return TokenInterface
[ "Lazy", "Loading", "of", "security", "context", ".", "Returns", "TokenInterface" ]
7aaf7d7567a14e57e87b8d7474fbdd064f7b09bc
https://github.com/frodosghost/PublishBundle/blob/7aaf7d7567a14e57e87b8d7474fbdd064f7b09bc/EventListener/ObjectPersistSubscriber.php#L97-L104
195,264
phpgears/event
src/AbstractEvent.php
AbstractEvent.occurred
final protected static function occurred(array $payload, ?TimeProvider $timeProvider = null) { $timeProvider = $timeProvider ?? new SystemTimeProvider(); return new static($payload, $timeProvider->getCurrentTime()); }
php
final protected static function occurred(array $payload, ?TimeProvider $timeProvider = null) { $timeProvider = $timeProvider ?? new SystemTimeProvider(); return new static($payload, $timeProvider->getCurrentTime()); }
[ "final", "protected", "static", "function", "occurred", "(", "array", "$", "payload", ",", "?", "TimeProvider", "$", "timeProvider", "=", "null", ")", "{", "$", "timeProvider", "=", "$", "timeProvider", "??", "new", "SystemTimeProvider", "(", ")", ";", "retu...
Instantiate new event. @param array<string, mixed> $payload @param TimeProvider $timeProvider @return mixed|self
[ "Instantiate", "new", "event", "." ]
9b25301837748a67b3b48cc46ad837c859c4522d
https://github.com/phpgears/event/blob/9b25301837748a67b3b48cc46ad837c859c4522d/src/AbstractEvent.php#L58-L63
195,265
nails/module-blog
src/Model/Skin.php
Skin.init
public function init($iBlogId) { $this->iActiveBlogId = $iBlogId; $this->aAvailable[$iBlogId] = array(); $this->aEnabled[$iBlogId] = array(); // Get available skins $this->aAvailable[$iBlogId] = Components::skins('nails/module-blog'); if (empty($this->aAva...
php
public function init($iBlogId) { $this->iActiveBlogId = $iBlogId; $this->aAvailable[$iBlogId] = array(); $this->aEnabled[$iBlogId] = array(); // Get available skins $this->aAvailable[$iBlogId] = Components::skins('nails/module-blog'); if (empty($this->aAva...
[ "public", "function", "init", "(", "$", "iBlogId", ")", "{", "$", "this", "->", "iActiveBlogId", "=", "$", "iBlogId", ";", "$", "this", "->", "aAvailable", "[", "$", "iBlogId", "]", "=", "array", "(", ")", ";", "$", "this", "->", "aEnabled", "[", "...
Setup the model for use with a particular skin
[ "Setup", "the", "model", "for", "use", "with", "a", "particular", "skin" ]
7b369c5209f4343fff7c7e2a22c237d5a95c8c24
https://github.com/nails/module-blog/blob/7b369c5209f4343fff7c7e2a22c237d5a95c8c24/src/Model/Skin.php#L45-L68
195,266
nails/module-blog
src/Model/Skin.php
Skin.get
public function get($sSlug) { $aSkins = $this->getAll(); foreach ($aSkins as $oSkin) { if ($oSkin->slug == $sSlug) { return $oSkin; } } return false; }
php
public function get($sSlug) { $aSkins = $this->getAll(); foreach ($aSkins as $oSkin) { if ($oSkin->slug == $sSlug) { return $oSkin; } } return false; }
[ "public", "function", "get", "(", "$", "sSlug", ")", "{", "$", "aSkins", "=", "$", "this", "->", "getAll", "(", ")", ";", "foreach", "(", "$", "aSkins", "as", "$", "oSkin", ")", "{", "if", "(", "$", "oSkin", "->", "slug", "==", "$", "sSlug", ")...
Gets a single skin @param string $sSlug The skin's slug @return stdClass
[ "Gets", "a", "single", "skin" ]
7b369c5209f4343fff7c7e2a22c237d5a95c8c24
https://github.com/nails/module-blog/blob/7b369c5209f4343fff7c7e2a22c237d5a95c8c24/src/Model/Skin.php#L111-L122
195,267
zodream/helpers
src/Str.php
Str.multiExplode
public static function multiExplode(array $delimiters, $string) { $ready = str_replace($delimiters, $delimiters[0], $string); return explode($delimiters[0], $ready); }
php
public static function multiExplode(array $delimiters, $string) { $ready = str_replace($delimiters, $delimiters[0], $string); return explode($delimiters[0], $ready); }
[ "public", "static", "function", "multiExplode", "(", "array", "$", "delimiters", ",", "$", "string", ")", "{", "$", "ready", "=", "str_replace", "(", "$", "delimiters", ",", "$", "delimiters", "[", "0", "]", ",", "$", "string", ")", ";", "return", "exp...
EXPLODE STRING BY ARRAY @param array $delimiters @param $string @return array
[ "EXPLODE", "STRING", "BY", "ARRAY" ]
98c533a0a50547bd8e3c97ab750d2d15f8e58b49
https://github.com/zodream/helpers/blob/98c533a0a50547bd8e3c97ab750d2d15f8e58b49/src/Str.php#L281-L284
195,268
Retentio/Boomgo
src/Boomgo/Builder/Map.php
Map.addDefinition
public function addDefinition(Definition $definition) { $attribute = $definition->getAttribute(); $key = $definition->getKey(); $this->mongoIndex[$key] = $attribute; $this->definitions[$attribute] = $definition; }
php
public function addDefinition(Definition $definition) { $attribute = $definition->getAttribute(); $key = $definition->getKey(); $this->mongoIndex[$key] = $attribute; $this->definitions[$attribute] = $definition; }
[ "public", "function", "addDefinition", "(", "Definition", "$", "definition", ")", "{", "$", "attribute", "=", "$", "definition", "->", "getAttribute", "(", ")", ";", "$", "key", "=", "$", "definition", "->", "getKey", "(", ")", ";", "$", "this", "->", ...
Add a definition @param Definition $definition
[ "Add", "a", "definition" ]
95cc53777425dd76cd0034046fa4f9e72c04d73a
https://github.com/Retentio/Boomgo/blob/95cc53777425dd76cd0034046fa4f9e72c04d73a/src/Boomgo/Builder/Map.php#L116-L124
195,269
Retentio/Boomgo
src/Boomgo/Builder/Map.php
Map.hasDefinition
public function hasDefinition($identifier) { return isset($this->definitions[$identifier]) || isset($this->mongoIndex[$identifier]); }
php
public function hasDefinition($identifier) { return isset($this->definitions[$identifier]) || isset($this->mongoIndex[$identifier]); }
[ "public", "function", "hasDefinition", "(", "$", "identifier", ")", "{", "return", "isset", "(", "$", "this", "->", "definitions", "[", "$", "identifier", "]", ")", "||", "isset", "(", "$", "this", "->", "mongoIndex", "[", "$", "identifier", "]", ")", ...
Check whether a definition exists @param string $identifier Php attribute name or Document key name @return boolean
[ "Check", "whether", "a", "definition", "exists" ]
95cc53777425dd76cd0034046fa4f9e72c04d73a
https://github.com/Retentio/Boomgo/blob/95cc53777425dd76cd0034046fa4f9e72c04d73a/src/Boomgo/Builder/Map.php#L133-L136
195,270
Retentio/Boomgo
src/Boomgo/Builder/Map.php
Map.getDefinition
public function getDefinition($identifier) { // Identifier is a php attribute if (isset($this->definitions[$identifier])) { return $this->definitions[$identifier]; } // Identifier is a MongoDB Key if (isset($this->mongoIndex[$identifier])) { return $t...
php
public function getDefinition($identifier) { // Identifier is a php attribute if (isset($this->definitions[$identifier])) { return $this->definitions[$identifier]; } // Identifier is a MongoDB Key if (isset($this->mongoIndex[$identifier])) { return $t...
[ "public", "function", "getDefinition", "(", "$", "identifier", ")", "{", "// Identifier is a php attribute", "if", "(", "isset", "(", "$", "this", "->", "definitions", "[", "$", "identifier", "]", ")", ")", "{", "return", "$", "this", "->", "definitions", "[...
Return a definition @param string $identifier Php attribute name or Document key name @return mixed null|Definition
[ "Return", "a", "definition" ]
95cc53777425dd76cd0034046fa4f9e72c04d73a
https://github.com/Retentio/Boomgo/blob/95cc53777425dd76cd0034046fa4f9e72c04d73a/src/Boomgo/Builder/Map.php#L145-L158
195,271
wb-crowdfusion/crowdfusion
system/core/classes/systemdb/AbstractSystemXMLDAO.php
AbstractSystemXMLDAO.delete
public function delete($slug) { if(is_object($slug) && $slug instanceof ModelObject) $slug = $slug->Slug; $this->Events->trigger(get_class($this).'.delete.pre', $this, $slug); $this->Events->trigger('AbstractSystemXMLDAO.delete.pre', $this, $slug); $this->loadSource(); ...
php
public function delete($slug) { if(is_object($slug) && $slug instanceof ModelObject) $slug = $slug->Slug; $this->Events->trigger(get_class($this).'.delete.pre', $this, $slug); $this->Events->trigger('AbstractSystemXMLDAO.delete.pre', $this, $slug); $this->loadSource(); ...
[ "public", "function", "delete", "(", "$", "slug", ")", "{", "if", "(", "is_object", "(", "$", "slug", ")", "&&", "$", "slug", "instanceof", "ModelObject", ")", "$", "slug", "=", "$", "slug", "->", "Slug", ";", "$", "this", "->", "Events", "->", "tr...
Removes the aspect and all the aspect relations @param string $slug The slug of the aspect to remove @return void
[ "Removes", "the", "aspect", "and", "all", "the", "aspect", "relations" ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/systemdb/AbstractSystemXMLDAO.php#L231-L259
195,272
wb-crowdfusion/crowdfusion
system/core/classes/systemdb/AbstractSystemXMLDAO.php
AbstractSystemXMLDAO.getByID
public function getByID($id) { if(array_key_exists($id, $this->idToSlugCache)) $slug = $this->idToSlugCache[$id]; else $slug = $this->SystemCache->get($this->getModel()->getTableName().':id:'.$id); if (!empty($slug)) { return $this->getBySlug($slug); ...
php
public function getByID($id) { if(array_key_exists($id, $this->idToSlugCache)) $slug = $this->idToSlugCache[$id]; else $slug = $this->SystemCache->get($this->getModel()->getTableName().':id:'.$id); if (!empty($slug)) { return $this->getBySlug($slug); ...
[ "public", "function", "getByID", "(", "$", "id", ")", "{", "if", "(", "array_key_exists", "(", "$", "id", ",", "$", "this", "->", "idToSlugCache", ")", ")", "$", "slug", "=", "$", "this", "->", "idToSlugCache", "[", "$", "id", "]", ";", "else", "$"...
Returns the ModelObject containing the specified ID @param integer $id The ID of the ModelObject to locate @return ModelObject @throws Exception if the Object doesn't exist
[ "Returns", "the", "ModelObject", "containing", "the", "specified", "ID" ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/systemdb/AbstractSystemXMLDAO.php#L296-L315
195,273
wb-crowdfusion/crowdfusion
system/core/classes/systemdb/AbstractSystemXMLDAO.php
AbstractSystemXMLDAO.findAll
public function findAll(DTO $dto) { $sd = get_class($this).(string)serialize($dto); $slugs = $this->SystemCache->get($sd); if ($slugs === false) { $this->loadSource(); $slugs = array(); $sort_array = array(); $dir = 'ASC'; $ord...
php
public function findAll(DTO $dto) { $sd = get_class($this).(string)serialize($dto); $slugs = $this->SystemCache->get($sd); if ($slugs === false) { $this->loadSource(); $slugs = array(); $sort_array = array(); $dir = 'ASC'; $ord...
[ "public", "function", "findAll", "(", "DTO", "$", "dto", ")", "{", "$", "sd", "=", "get_class", "(", "$", "this", ")", ".", "(", "string", ")", "serialize", "(", "$", "dto", ")", ";", "$", "slugs", "=", "$", "this", "->", "SystemCache", "->", "ge...
Finds Aspects. @param DTO $dto DTO with supported parameters: <PrimaryKey> Slug PluginID StartDate string ModifiedDate is greater than this value EndDate string ModifiedDate is less than this value Search string Matches part of Name, Slug, or Description @return DTO A filled DTO
[ "Finds", "Aspects", "." ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/systemdb/AbstractSystemXMLDAO.php#L417-L472
195,274
rabbitcms/forms
src/Control.php
Control.make
public static function make($name, array $options = []): self { $class = new ReflectionClass($options['class'] ?? static::class); /* @var static $instance */ $instance = $class->newInstanceWithoutConstructor(); $instance->setName($name); $instance->setOptions($options); ...
php
public static function make($name, array $options = []): self { $class = new ReflectionClass($options['class'] ?? static::class); /* @var static $instance */ $instance = $class->newInstanceWithoutConstructor(); $instance->setName($name); $instance->setOptions($options); ...
[ "public", "static", "function", "make", "(", "$", "name", ",", "array", "$", "options", "=", "[", "]", ")", ":", "self", "{", "$", "class", "=", "new", "ReflectionClass", "(", "$", "options", "[", "'class'", "]", "??", "static", "::", "class", ")", ...
Make control. @param string $name @param array $options @return Control @throws \ReflectionException
[ "Make", "control", "." ]
4dd657d1c8caeb0b87f25239fabf5fa064db29cd
https://github.com/rabbitcms/forms/blob/4dd657d1c8caeb0b87f25239fabf5fa064db29cd/src/Control.php#L103-L113
195,275
flexibuild/component
ComponentTrait.php
ComponentTrait.getBehavior
public function getBehavior($name) { $this->ensureBehaviors(); return isset($this->__behaviors__[$name]) ? $this->__behaviors__[$name] : null; }
php
public function getBehavior($name) { $this->ensureBehaviors(); return isset($this->__behaviors__[$name]) ? $this->__behaviors__[$name] : null; }
[ "public", "function", "getBehavior", "(", "$", "name", ")", "{", "$", "this", "->", "ensureBehaviors", "(", ")", ";", "return", "isset", "(", "$", "this", "->", "__behaviors__", "[", "$", "name", "]", ")", "?", "$", "this", "->", "__behaviors__", "[", ...
Returns the named behavior object. @param string $name the behavior name @return Behavior the behavior object, or null if the behavior does not exist
[ "Returns", "the", "named", "behavior", "object", "." ]
1817af23e5a51564075785d5591421b86f275d71
https://github.com/flexibuild/component/blob/1817af23e5a51564075785d5591421b86f275d71/ComponentTrait.php#L457-L461
195,276
flexibuild/component
ComponentTrait.php
ComponentTrait.detachBehaviors
public function detachBehaviors() { $this->ensureBehaviors(); foreach ($this->__behaviors__ as $name => $behavior) { $this->detachBehavior($name); } }
php
public function detachBehaviors() { $this->ensureBehaviors(); foreach ($this->__behaviors__ as $name => $behavior) { $this->detachBehavior($name); } }
[ "public", "function", "detachBehaviors", "(", ")", "{", "$", "this", "->", "ensureBehaviors", "(", ")", ";", "foreach", "(", "$", "this", "->", "__behaviors__", "as", "$", "name", "=>", "$", "behavior", ")", "{", "$", "this", "->", "detachBehavior", "(",...
Detaches all behaviors from the component.
[ "Detaches", "all", "behaviors", "from", "the", "component", "." ]
1817af23e5a51564075785d5591421b86f275d71
https://github.com/flexibuild/component/blob/1817af23e5a51564075785d5591421b86f275d71/ComponentTrait.php#L531-L537
195,277
fridge-project/dbal
src/Fridge/DBAL/Schema/Comparator/SchemaComparator.php
SchemaComparator.compare
public function compare(Schema $oldSchema, Schema $newSchema) { $createdTables = $this->getCreatedTables($oldSchema, $newSchema); $alteredTables = $this->getAlteredTables($oldSchema, $newSchema); $droppedTables = $this->getDroppedTables($oldSchema, $newSchema); $this->detectRenamedT...
php
public function compare(Schema $oldSchema, Schema $newSchema) { $createdTables = $this->getCreatedTables($oldSchema, $newSchema); $alteredTables = $this->getAlteredTables($oldSchema, $newSchema); $droppedTables = $this->getDroppedTables($oldSchema, $newSchema); $this->detectRenamedT...
[ "public", "function", "compare", "(", "Schema", "$", "oldSchema", ",", "Schema", "$", "newSchema", ")", "{", "$", "createdTables", "=", "$", "this", "->", "getCreatedTables", "(", "$", "oldSchema", ",", "$", "newSchema", ")", ";", "$", "alteredTables", "="...
Compares two schemas. @param \Fridge\DBAL\Schema\Schema $oldSchema The old schema. @param \Fridge\DBAL\Schema\Schema $newSchema The new schema. @return \Fridge\DBAL\Schema\Diff\SchemaDiff The difference between the two schemas.
[ "Compares", "two", "schemas", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Schema/Comparator/SchemaComparator.php#L45-L64
195,278
fridge-project/dbal
src/Fridge/DBAL/Schema/Comparator/SchemaComparator.php
SchemaComparator.compareSequences
public function compareSequences(Sequence $oldSequence, Sequence $newSequence) { return ($oldSequence->getName() !== $newSequence->getName()) || ($oldSequence->getInitialValue() !== $newSequence->getInitialValue()) || ($oldSequence->getIncrementSize() !== $newSequence->getIncrementSi...
php
public function compareSequences(Sequence $oldSequence, Sequence $newSequence) { return ($oldSequence->getName() !== $newSequence->getName()) || ($oldSequence->getInitialValue() !== $newSequence->getInitialValue()) || ($oldSequence->getIncrementSize() !== $newSequence->getIncrementSi...
[ "public", "function", "compareSequences", "(", "Sequence", "$", "oldSequence", ",", "Sequence", "$", "newSequence", ")", "{", "return", "(", "$", "oldSequence", "->", "getName", "(", ")", "!==", "$", "newSequence", "->", "getName", "(", ")", ")", "||", "("...
Compares two sequences. @param \Fridge\DBAL\Schema\Sequence $oldSequence The old sequence. @param \Fridge\DBAL\Schema\Sequence $newSequence The new sequence. @return boolean TRUE if sequences are different else FALSE.
[ "Compares", "two", "sequences", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Schema/Comparator/SchemaComparator.php#L74-L79
195,279
fridge-project/dbal
src/Fridge/DBAL/Schema/Comparator/SchemaComparator.php
SchemaComparator.compareViews
public function compareViews(View $oldView, View $newView) { return ($oldView->getName() !== $newView->getName()) || ($oldView->getSQL() !== $newView->getSQL()); }
php
public function compareViews(View $oldView, View $newView) { return ($oldView->getName() !== $newView->getName()) || ($oldView->getSQL() !== $newView->getSQL()); }
[ "public", "function", "compareViews", "(", "View", "$", "oldView", ",", "View", "$", "newView", ")", "{", "return", "(", "$", "oldView", "->", "getName", "(", ")", "!==", "$", "newView", "->", "getName", "(", ")", ")", "||", "(", "$", "oldView", "->"...
Compares two views. @param \Fridge\DBAL\Schema\View $oldView The old view. @param \Fridge\DBAL\Schema\View $newView The new view. @return boolean TRUE if views are different else FALSE.
[ "Compares", "two", "views", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Schema/Comparator/SchemaComparator.php#L89-L92
195,280
fridge-project/dbal
src/Fridge/DBAL/Schema/Comparator/SchemaComparator.php
SchemaComparator.detectRenamedTables
private function detectRenamedTables(array &$createdTables, array &$droppedTables, array &$alteredTables) { foreach ($createdTables as $createdIndex => $createdTable) { foreach ($droppedTables as $droppedIndex => $droppedTable) { $tableDiff = $this->tableComparator->compare($drop...
php
private function detectRenamedTables(array &$createdTables, array &$droppedTables, array &$alteredTables) { foreach ($createdTables as $createdIndex => $createdTable) { foreach ($droppedTables as $droppedIndex => $droppedTable) { $tableDiff = $this->tableComparator->compare($drop...
[ "private", "function", "detectRenamedTables", "(", "array", "&", "$", "createdTables", ",", "array", "&", "$", "droppedTables", ",", "array", "&", "$", "alteredTables", ")", "{", "foreach", "(", "$", "createdTables", "as", "$", "createdIndex", "=>", "$", "cr...
Detects and rewrites renamed tables. @param array &$createdTables The create tables. @param array &$droppedTables The dropped tables. @param array &$alteredTables The altered tables.
[ "Detects", "and", "rewrites", "renamed", "tables", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Schema/Comparator/SchemaComparator.php#L168-L184
195,281
rutger-speksnijder/restphp
src/RestPHP/Response/Types/XML.php
XML.transformToXml
private function transformToXml($data = [], $hypertextRoutes = [], $depth = 0) { // Set the xml string $xml = ''; // Starting depth, so add the xml starting lines if ($depth === 0) { $xml = "<?xml version=\"1.0\"?>\n"; $xml .= "<response>\n"; } ...
php
private function transformToXml($data = [], $hypertextRoutes = [], $depth = 0) { // Set the xml string $xml = ''; // Starting depth, so add the xml starting lines if ($depth === 0) { $xml = "<?xml version=\"1.0\"?>\n"; $xml .= "<response>\n"; } ...
[ "private", "function", "transformToXml", "(", "$", "data", "=", "[", "]", ",", "$", "hypertextRoutes", "=", "[", "]", ",", "$", "depth", "=", "0", ")", "{", "// Set the xml string", "$", "xml", "=", "''", ";", "// Starting depth, so add the xml starting lines"...
Recursively converts the response into an xml string. @param mixed $data The data to transform. @param optional array $hypertextRoutes An array with hypertext routes. @return string The response as an xml string.
[ "Recursively", "converts", "the", "response", "into", "an", "xml", "string", "." ]
326a7c0d79b266bbdd8a27ff1c8021caf9d28a3d
https://github.com/rutger-speksnijder/restphp/blob/326a7c0d79b266bbdd8a27ff1c8021caf9d28a3d/src/RestPHP/Response/Types/XML.php#L48-L94
195,282
rutger-speksnijder/restphp
src/RestPHP/Response/Types/XML.php
XML.getHypertextXml
private function getHypertextXml($routes = []) { // Check if we have routes if (!$routes) { return ''; } // Loop through the routes and add them as links to the xml $xml = ''; foreach ($routes as $name => $route) { $xml .= "<link rel=\"{$name}...
php
private function getHypertextXml($routes = []) { // Check if we have routes if (!$routes) { return ''; } // Loop through the routes and add them as links to the xml $xml = ''; foreach ($routes as $name => $route) { $xml .= "<link rel=\"{$name}...
[ "private", "function", "getHypertextXml", "(", "$", "routes", "=", "[", "]", ")", "{", "// Check if we have routes", "if", "(", "!", "$", "routes", ")", "{", "return", "''", ";", "}", "// Loop through the routes and add them as links to the xml", "$", "xml", "=", ...
Generates the xml for the hypertext routes. @param optional array $routes The hypertext routes. @return string The hypertext routes xml string.
[ "Generates", "the", "xml", "for", "the", "hypertext", "routes", "." ]
326a7c0d79b266bbdd8a27ff1c8021caf9d28a3d
https://github.com/rutger-speksnijder/restphp/blob/326a7c0d79b266bbdd8a27ff1c8021caf9d28a3d/src/RestPHP/Response/Types/XML.php#L103-L116
195,283
modulusphp/http
Route.php
Route.url
public static function url(string $name, ?array $parameters = []) { $url = null; foreach (Swish::$routes as $route) { if ($route['name'] == $name) { $url = $route['pattern']; if ($route['required'] > 0 && ($route['required'] == count($parameters))) { foreach ($parameters as $...
php
public static function url(string $name, ?array $parameters = []) { $url = null; foreach (Swish::$routes as $route) { if ($route['name'] == $name) { $url = $route['pattern']; if ($route['required'] > 0 && ($route['required'] == count($parameters))) { foreach ($parameters as $...
[ "public", "static", "function", "url", "(", "string", "$", "name", ",", "?", "array", "$", "parameters", "=", "[", "]", ")", "{", "$", "url", "=", "null", ";", "foreach", "(", "Swish", "::", "$", "routes", "as", "$", "route", ")", "{", "if", "(",...
Generate url from route @param string $name @param null|array $parameters @return string $url
[ "Generate", "url", "from", "route" ]
fc5c0f2b582a04de1685578d3fb790686a0a240c
https://github.com/modulusphp/http/blob/fc5c0f2b582a04de1685578d3fb790686a0a240c/Route.php#L130-L149
195,284
OUTRAGElib/fs-temp
lib/TemporaryFilesystemStreamWrapper.php
TemporaryFilesystemStreamWrapper.stream_open
public function stream_open($path, $mode, $options, &$opened_path) { $this->path = $path; $this->resource = fopen($this->getLocalFilesystemPath($path), $mode); return is_resource($this->resource); }
php
public function stream_open($path, $mode, $options, &$opened_path) { $this->path = $path; $this->resource = fopen($this->getLocalFilesystemPath($path), $mode); return is_resource($this->resource); }
[ "public", "function", "stream_open", "(", "$", "path", ",", "$", "mode", ",", "$", "options", ",", "&", "$", "opened_path", ")", "{", "$", "this", "->", "path", "=", "$", "path", ";", "$", "this", "->", "resource", "=", "fopen", "(", "$", "this", ...
Let's create a stream. No file writing necessary here
[ "Let", "s", "create", "a", "stream", ".", "No", "file", "writing", "necessary", "here" ]
1eb71fd2cab4a379d055b07d868272ea02123dce
https://github.com/OUTRAGElib/fs-temp/blob/1eb71fd2cab4a379d055b07d868272ea02123dce/lib/TemporaryFilesystemStreamWrapper.php#L42-L48
195,285
OUTRAGElib/fs-temp
lib/TemporaryFilesystemStreamWrapper.php
TemporaryFilesystemStreamWrapper.unlink
public function unlink($path) { if(isset(static::$pointer_tree[$path_to])) { if(is_resource(static::$pointer_tree[$path_to])) fclose(static::$pointer_tree[$path_to]); unset(static::$pointer_tree[$path_to]); } return true; }
php
public function unlink($path) { if(isset(static::$pointer_tree[$path_to])) { if(is_resource(static::$pointer_tree[$path_to])) fclose(static::$pointer_tree[$path_to]); unset(static::$pointer_tree[$path_to]); } return true; }
[ "public", "function", "unlink", "(", "$", "path", ")", "{", "if", "(", "isset", "(", "static", "::", "$", "pointer_tree", "[", "$", "path_to", "]", ")", ")", "{", "if", "(", "is_resource", "(", "static", "::", "$", "pointer_tree", "[", "$", "path_to"...
Remove file from interface
[ "Remove", "file", "from", "interface" ]
1eb71fd2cab4a379d055b07d868272ea02123dce
https://github.com/OUTRAGElib/fs-temp/blob/1eb71fd2cab4a379d055b07d868272ea02123dce/lib/TemporaryFilesystemStreamWrapper.php#L159-L170
195,286
OUTRAGElib/fs-temp
lib/TemporaryFilesystemStreamWrapper.php
TemporaryFilesystemStreamWrapper.getLocalFilesystemPath
protected function getLocalFilesystemPath($path) { if(!isset(static::$pointer_tree[$path])) static::$pointer_tree[$path] = tmpfile(); if($metadata = stream_get_meta_data(static::$pointer_tree[$path])) return $metadata["uri"]; return null; }
php
protected function getLocalFilesystemPath($path) { if(!isset(static::$pointer_tree[$path])) static::$pointer_tree[$path] = tmpfile(); if($metadata = stream_get_meta_data(static::$pointer_tree[$path])) return $metadata["uri"]; return null; }
[ "protected", "function", "getLocalFilesystemPath", "(", "$", "path", ")", "{", "if", "(", "!", "isset", "(", "static", "::", "$", "pointer_tree", "[", "$", "path", "]", ")", ")", "static", "::", "$", "pointer_tree", "[", "$", "path", "]", "=", "tmpfile...
Returns an instance of a resource, based on something The educated folk will notice that this will end up leaving a pointer hanging - the intention is to never, ever use this pointer - but, keep it languishing in existance
[ "Returns", "an", "instance", "of", "a", "resource", "based", "on", "something" ]
1eb71fd2cab4a379d055b07d868272ea02123dce
https://github.com/OUTRAGElib/fs-temp/blob/1eb71fd2cab4a379d055b07d868272ea02123dce/lib/TemporaryFilesystemStreamWrapper.php#L191-L200
195,287
rodw1995/TemplateParser
src/TemplateParserHelper.php
TemplateParserHelper.loop
public static function loop(array $array, $string, $betweenStrings = PHP_EOL) { $output = []; foreach ($array as $key => $value) { // Flatten the array with dots and parse it $output[] = static::parseString($string, array_map('addslashes', static::array_dot($value))); ...
php
public static function loop(array $array, $string, $betweenStrings = PHP_EOL) { $output = []; foreach ($array as $key => $value) { // Flatten the array with dots and parse it $output[] = static::parseString($string, array_map('addslashes', static::array_dot($value))); ...
[ "public", "static", "function", "loop", "(", "array", "$", "array", ",", "$", "string", ",", "$", "betweenStrings", "=", "PHP_EOL", ")", "{", "$", "output", "=", "[", "]", ";", "foreach", "(", "$", "array", "as", "$", "key", "=>", "$", "value", ")"...
Loop through an array and prints for every element the string @param array $array @param $string @param string $betweenStrings @return string
[ "Loop", "through", "an", "array", "and", "prints", "for", "every", "element", "the", "string" ]
ddb53d10f4ab0808bd6a941c6770e9419c50f6e9
https://github.com/rodw1995/TemplateParser/blob/ddb53d10f4ab0808bd6a941c6770e9419c50f6e9/src/TemplateParserHelper.php#L73-L83
195,288
sil-project/VarietyBundle
src/Admin/VarietyAdmin.php
VarietyAdmin.configureShowFields
protected function configureShowFields(ShowMapper $mapper) { // call to aliased trait method $this->configShowHandlesRelations($mapper); $this->configureShowDescriptions($mapper); //Removal of Variety/Strain specific fields if ($this->getSubject()) { if ($this->g...
php
protected function configureShowFields(ShowMapper $mapper) { // call to aliased trait method $this->configShowHandlesRelations($mapper); $this->configureShowDescriptions($mapper); //Removal of Variety/Strain specific fields if ($this->getSubject()) { if ($this->g...
[ "protected", "function", "configureShowFields", "(", "ShowMapper", "$", "mapper", ")", "{", "// call to aliased trait method", "$", "this", "->", "configShowHandlesRelations", "(", "$", "mapper", ")", ";", "$", "this", "->", "configureShowDescriptions", "(", "$", "m...
Configure Show view fields. @param ShowMapper $mapper
[ "Configure", "Show", "view", "fields", "." ]
e9508ce13a4bb277d10bdcd925fdb84bc01f453f
https://github.com/sil-project/VarietyBundle/blob/e9508ce13a4bb277d10bdcd925fdb84bc01f453f/src/Admin/VarietyAdmin.php#L72-L90
195,289
sil-project/VarietyBundle
src/Admin/VarietyAdmin.php
VarietyAdmin.prePersist
public function prePersist($variety) { parent::prePersist($variety); if ($variety->getParent()) { if ($variety->getParent()->getId() == $variety->getId()) { $variety->setParent(null); } } // $config = $this->getConfigurationPool()->getContaine...
php
public function prePersist($variety) { parent::prePersist($variety); if ($variety->getParent()) { if ($variety->getParent()->getId() == $variety->getId()) { $variety->setParent(null); } } // $config = $this->getConfigurationPool()->getContaine...
[ "public", "function", "prePersist", "(", "$", "variety", ")", "{", "parent", "::", "prePersist", "(", "$", "variety", ")", ";", "if", "(", "$", "variety", "->", "getParent", "(", ")", ")", "{", "if", "(", "$", "variety", "->", "getParent", "(", ")", ...
prevent primary key loop
[ "prevent", "primary", "key", "loop" ]
e9508ce13a4bb277d10bdcd925fdb84bc01f453f
https://github.com/sil-project/VarietyBundle/blob/e9508ce13a4bb277d10bdcd925fdb84bc01f453f/src/Admin/VarietyAdmin.php#L93-L115
195,290
ronanchilvers/container
src/Container.php
Container.register
public function register(ServiceProviderInterface $provider, $settings = []) { $provider->register($this); foreach ($settings as $key => $value) { $this->set($key, $value); } return $this; }
php
public function register(ServiceProviderInterface $provider, $settings = []) { $provider->register($this); foreach ($settings as $key => $value) { $this->set($key, $value); } return $this; }
[ "public", "function", "register", "(", "ServiceProviderInterface", "$", "provider", ",", "$", "settings", "=", "[", "]", ")", "{", "$", "provider", "->", "register", "(", "$", "this", ")", ";", "foreach", "(", "$", "settings", "as", "$", "key", "=>", "...
Register a service provider, a la Pimple @param Ronanchilvers\Container\ServiceProviderInterface @return $this @author Ronan Chilvers <ronan@d3r.com>
[ "Register", "a", "service", "provider", "a", "la", "Pimple" ]
bada52cba4777738a7eba1e1d182dd385d4f2f97
https://github.com/ronanchilvers/container/blob/bada52cba4777738a7eba1e1d182dd385d4f2f97/src/Container.php#L73-L81
195,291
ronanchilvers/container
src/Container.php
Container.extend
public function extend($id, $definition) { if (!isset($this->extensions[$id])) { $this->extensions = []; } $this->extensions[$id][] = $definition; }
php
public function extend($id, $definition) { if (!isset($this->extensions[$id])) { $this->extensions = []; } $this->extensions[$id][] = $definition; }
[ "public", "function", "extend", "(", "$", "id", ",", "$", "definition", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "extensions", "[", "$", "id", "]", ")", ")", "{", "$", "this", "->", "extensions", "=", "[", "]", ";", "}", "$", ...
Extend a service @param string $id @param mixed $definition @author Ronan Chilvers <ronan@d3r.com>
[ "Extend", "a", "service" ]
bada52cba4777738a7eba1e1d182dd385d4f2f97
https://github.com/ronanchilvers/container/blob/bada52cba4777738a7eba1e1d182dd385d4f2f97/src/Container.php#L181-L187
195,292
ronanchilvers/container
src/Container.php
Container.setDefinition
protected function setDefinition($id, $definition, $shared = false) { $this->definitions[$id] = $definition; if (true === $shared) { $this->shared[$id] = $id; } }
php
protected function setDefinition($id, $definition, $shared = false) { $this->definitions[$id] = $definition; if (true === $shared) { $this->shared[$id] = $id; } }
[ "protected", "function", "setDefinition", "(", "$", "id", ",", "$", "definition", ",", "$", "shared", "=", "false", ")", "{", "$", "this", "->", "definitions", "[", "$", "id", "]", "=", "$", "definition", ";", "if", "(", "true", "===", "$", "shared",...
Set a definition in the container @param string $key @param mixed $definition @author Ronan Chilvers <ronan@d3r.com>
[ "Set", "a", "definition", "in", "the", "container" ]
bada52cba4777738a7eba1e1d182dd385d4f2f97
https://github.com/ronanchilvers/container/blob/bada52cba4777738a7eba1e1d182dd385d4f2f97/src/Container.php#L196-L202
195,293
alphalemon/BootstrapBundle
Core/Autoloader/BundlesAutoloader.php
BundlesAutoloader.orderBundles
protected function orderBundles() { // Gives a score to each bundle $order = array(); foreach ($this->overridedBundles as $overriderBundle => $overridedBundles) { // An overrider bundle enters in the compilation, but takes any point if (!array_key_exists($overriderBu...
php
protected function orderBundles() { // Gives a score to each bundle $order = array(); foreach ($this->overridedBundles as $overriderBundle => $overridedBundles) { // An overrider bundle enters in the compilation, but takes any point if (!array_key_exists($overriderBu...
[ "protected", "function", "orderBundles", "(", ")", "{", "// Gives a score to each bundle", "$", "order", "=", "array", "(", ")", ";", "foreach", "(", "$", "this", "->", "overridedBundles", "as", "$", "overriderBundle", "=>", "$", "overridedBundles", ")", "{", ...
Orders the bundles according to bundle's json param "overrided"
[ "Orders", "the", "bundles", "according", "to", "bundle", "s", "json", "param", "overrided" ]
27ff5cbc58d58149ec72a974f2a9d765a6fd37a6
https://github.com/alphalemon/BootstrapBundle/blob/27ff5cbc58d58149ec72a974f2a9d765a6fd37a6/Core/Autoloader/BundlesAutoloader.php#L129-L157
195,294
alphalemon/BootstrapBundle
Core/Autoloader/BundlesAutoloader.php
BundlesAutoloader.arrangeBundlesForEnvironment
protected function arrangeBundlesForEnvironment() { foreach ($this->autoloaderCollection as $autoloader) { $autoloaderBundles = $autoloader->getBundles(); foreach ($autoloaderBundles as $environment => $bundles) { foreach ($bundles as $bundle) { $t...
php
protected function arrangeBundlesForEnvironment() { foreach ($this->autoloaderCollection as $autoloader) { $autoloaderBundles = $autoloader->getBundles(); foreach ($autoloaderBundles as $environment => $bundles) { foreach ($bundles as $bundle) { $t...
[ "protected", "function", "arrangeBundlesForEnvironment", "(", ")", "{", "foreach", "(", "$", "this", "->", "autoloaderCollection", "as", "$", "autoloader", ")", "{", "$", "autoloaderBundles", "=", "$", "autoloader", "->", "getBundles", "(", ")", ";", "foreach", ...
Parsers the autoloaders and arranges the bundles for environment
[ "Parsers", "the", "autoloaders", "and", "arranges", "the", "bundles", "for", "environment" ]
27ff5cbc58d58149ec72a974f2a9d765a6fd37a6
https://github.com/alphalemon/BootstrapBundle/blob/27ff5cbc58d58149ec72a974f2a9d765a6fd37a6/Core/Autoloader/BundlesAutoloader.php#L162-L176
195,295
alphalemon/BootstrapBundle
Core/Autoloader/BundlesAutoloader.php
BundlesAutoloader.install
protected function install() { $installScripts = array(); foreach ($this->autoloaderCollection as $dir => $jsonAutoloader) { $bundleName = $jsonAutoloader->getBundleName(); $this->installPackage($dir, $jsonAutoloader); // Check if the bundle under exam has attach...
php
protected function install() { $installScripts = array(); foreach ($this->autoloaderCollection as $dir => $jsonAutoloader) { $bundleName = $jsonAutoloader->getBundleName(); $this->installPackage($dir, $jsonAutoloader); // Check if the bundle under exam has attach...
[ "protected", "function", "install", "(", ")", "{", "$", "installScripts", "=", "array", "(", ")", ";", "foreach", "(", "$", "this", "->", "autoloaderCollection", "as", "$", "dir", "=>", "$", "jsonAutoloader", ")", "{", "$", "bundleName", "=", "$", "jsonA...
Instantiates the bundles that must be autoconfigured, parsing the autoload_namespaces.php file generated by composer
[ "Instantiates", "the", "bundles", "that", "must", "be", "autoconfigured", "parsing", "the", "autoload_namespaces", ".", "php", "file", "generated", "by", "composer" ]
27ff5cbc58d58149ec72a974f2a9d765a6fd37a6
https://github.com/alphalemon/BootstrapBundle/blob/27ff5cbc58d58149ec72a974f2a9d765a6fd37a6/Core/Autoloader/BundlesAutoloader.php#L210-L237
195,296
alphalemon/BootstrapBundle
Core/Autoloader/BundlesAutoloader.php
BundlesAutoloader.installPackage
protected function installPackage($sourceFolder, JsonAutoloader $autoloader) { $bundleName = $autoloader->getBundleName(); if (array_key_exists('all', $autoloader->getBundles()) || array_key_exists($this->environment, $autoloader->getBundles())) { $target = $this->autoloadersPath . '/' ...
php
protected function installPackage($sourceFolder, JsonAutoloader $autoloader) { $bundleName = $autoloader->getBundleName(); if (array_key_exists('all', $autoloader->getBundles()) || array_key_exists($this->environment, $autoloader->getBundles())) { $target = $this->autoloadersPath . '/' ...
[ "protected", "function", "installPackage", "(", "$", "sourceFolder", ",", "JsonAutoloader", "$", "autoloader", ")", "{", "$", "bundleName", "=", "$", "autoloader", "->", "getBundleName", "(", ")", ";", "if", "(", "array_key_exists", "(", "'all'", ",", "$", "...
Installs the autoloader.json, the routing and config files @param string $sourceFolder The source folder where the autoloader is placed @param JsonAutoloader $autoloader The generated autoloader object
[ "Installs", "the", "autoloader", ".", "json", "the", "routing", "and", "config", "files" ]
27ff5cbc58d58149ec72a974f2a9d765a6fd37a6
https://github.com/alphalemon/BootstrapBundle/blob/27ff5cbc58d58149ec72a974f2a9d765a6fd37a6/Core/Autoloader/BundlesAutoloader.php#L245-L258
195,297
alphalemon/BootstrapBundle
Core/Autoloader/BundlesAutoloader.php
BundlesAutoloader.retrieveInstalledBundles
protected function retrieveInstalledBundles() { $finder = new Finder(); $autoloaders = $finder->files()->depth(0)->name('*.json')->in($this->autoloadersPath); foreach ($autoloaders as $autoloader) { $bundleName = strtolower(basename($autoloader->getFilename(), '.json')); ...
php
protected function retrieveInstalledBundles() { $finder = new Finder(); $autoloaders = $finder->files()->depth(0)->name('*.json')->in($this->autoloadersPath); foreach ($autoloaders as $autoloader) { $bundleName = strtolower(basename($autoloader->getFilename(), '.json')); ...
[ "protected", "function", "retrieveInstalledBundles", "(", ")", "{", "$", "finder", "=", "new", "Finder", "(", ")", ";", "$", "autoloaders", "=", "$", "finder", "->", "files", "(", ")", "->", "depth", "(", "0", ")", "->", "name", "(", "'*.json'", ")", ...
Retrieves the current installed bundles
[ "Retrieves", "the", "current", "installed", "bundles" ]
27ff5cbc58d58149ec72a974f2a9d765a6fd37a6
https://github.com/alphalemon/BootstrapBundle/blob/27ff5cbc58d58149ec72a974f2a9d765a6fd37a6/Core/Autoloader/BundlesAutoloader.php#L291-L300
195,298
alphalemon/BootstrapBundle
Core/Autoloader/BundlesAutoloader.php
BundlesAutoloader.getBundleName
protected function getBundleName($path) { if (is_dir($path)) { $finder = new Finder(); $bundles = $finder->files()->depth(0)->name('*Bundle.php')->in($path); foreach ($bundles as $bundle) { return basename($bundle->getFilename(), 'Bundle.php'); ...
php
protected function getBundleName($path) { if (is_dir($path)) { $finder = new Finder(); $bundles = $finder->files()->depth(0)->name('*Bundle.php')->in($path); foreach ($bundles as $bundle) { return basename($bundle->getFilename(), 'Bundle.php'); ...
[ "protected", "function", "getBundleName", "(", "$", "path", ")", "{", "if", "(", "is_dir", "(", "$", "path", ")", ")", "{", "$", "finder", "=", "new", "Finder", "(", ")", ";", "$", "bundles", "=", "$", "finder", "->", "files", "(", ")", "->", "de...
Retrieves the current bundle class @param string $path The bundle's path @return string
[ "Retrieves", "the", "current", "bundle", "class" ]
27ff5cbc58d58149ec72a974f2a9d765a6fd37a6
https://github.com/alphalemon/BootstrapBundle/blob/27ff5cbc58d58149ec72a974f2a9d765a6fd37a6/Core/Autoloader/BundlesAutoloader.php#L308-L319
195,299
alphalemon/BootstrapBundle
Core/Autoloader/BundlesAutoloader.php
BundlesAutoloader.copy
protected function copy($source, $target) { if (is_file($source)) { $exists = is_file($target) ? true :false; $this->filesystem->copy($source, $target); if (!$exists) { return true; } } return false; }
php
protected function copy($source, $target) { if (is_file($source)) { $exists = is_file($target) ? true :false; $this->filesystem->copy($source, $target); if (!$exists) { return true; } } return false; }
[ "protected", "function", "copy", "(", "$", "source", ",", "$", "target", ")", "{", "if", "(", "is_file", "(", "$", "source", ")", ")", "{", "$", "exists", "=", "is_file", "(", "$", "target", ")", "?", "true", ":", "false", ";", "$", "this", "->",...
Copies the source file @param string $source @param string $target @return boolean
[ "Copies", "the", "source", "file" ]
27ff5cbc58d58149ec72a974f2a9d765a6fd37a6
https://github.com/alphalemon/BootstrapBundle/blob/27ff5cbc58d58149ec72a974f2a9d765a6fd37a6/Core/Autoloader/BundlesAutoloader.php#L348-L360