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
18,100
ClanCats/Core
src/classes/CCEvent.php
CCEvent.fire
public static function fire( $event, $params = array() ) { if ( !array_key_exists( $event, static::$events ) ) { return; } $event = static::$events[$event]; $return = array(); if ( array_key_exists( 'before', $event ) ) { $return['before'] = static::call( $event['before'], $params ); } i...
php
public static function fire( $event, $params = array() ) { if ( !array_key_exists( $event, static::$events ) ) { return; } $event = static::$events[$event]; $return = array(); if ( array_key_exists( 'before', $event ) ) { $return['before'] = static::call( $event['before'], $params ); } i...
[ "public", "static", "function", "fire", "(", "$", "event", ",", "$", "params", "=", "array", "(", ")", ")", "{", "if", "(", "!", "array_key_exists", "(", "$", "event", ",", "static", "::", "$", "events", ")", ")", "{", "return", ";", "}", "$", "e...
fire an event @param string $event @param array $params @return array
[ "fire", "an", "event" ]
9f6ec72c1a439de4b253d0223f1029f7f85b6ef8
https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/classes/CCEvent.php#L95-L117
18,101
ClanCats/Core
src/classes/CCEvent.php
CCEvent.pass
public static function pass( $event, $param = null ) { if ( !array_key_exists( $event, static::$events ) ) { return $param; } $event = static::$events[$event]; if ( array_key_exists( 'before', $event ) ) { $param = static::call( $event['before'], $param, true ); } if ( array_key_exists( 'c...
php
public static function pass( $event, $param = null ) { if ( !array_key_exists( $event, static::$events ) ) { return $param; } $event = static::$events[$event]; if ( array_key_exists( 'before', $event ) ) { $param = static::call( $event['before'], $param, true ); } if ( array_key_exists( 'c...
[ "public", "static", "function", "pass", "(", "$", "event", ",", "$", "param", "=", "null", ")", "{", "if", "(", "!", "array_key_exists", "(", "$", "event", ",", "static", "::", "$", "events", ")", ")", "{", "return", "$", "param", ";", "}", "$", ...
pass an var to an event the diffrence to fire is that the param gets modified by each event @param string $event @param mixed $param @return mixed
[ "pass", "an", "var", "to", "an", "event", "the", "diffrence", "to", "fire", "is", "that", "the", "param", "gets", "modified", "by", "each", "event" ]
9f6ec72c1a439de4b253d0223f1029f7f85b6ef8
https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/classes/CCEvent.php#L127-L148
18,102
ClanCats/Core
src/classes/CCEvent.php
CCEvent.call
protected static function call( $callbacks, $params, $pass = false ) { $response = array(); if ( $pass ) { $response = $params; } foreach ( $callbacks as $callback ) { if ( $pass ) { $response = call_user_func_array( $callback, array( $response ) ); } else { $response[] = call_user_...
php
protected static function call( $callbacks, $params, $pass = false ) { $response = array(); if ( $pass ) { $response = $params; } foreach ( $callbacks as $callback ) { if ( $pass ) { $response = call_user_func_array( $callback, array( $response ) ); } else { $response[] = call_user_...
[ "protected", "static", "function", "call", "(", "$", "callbacks", ",", "$", "params", ",", "$", "pass", "=", "false", ")", "{", "$", "response", "=", "array", "(", ")", ";", "if", "(", "$", "pass", ")", "{", "$", "response", "=", "$", "params", "...
call an callback array @param array $callbacks @param array $params @param bool $pass @retrun array
[ "call", "an", "callback", "array" ]
9f6ec72c1a439de4b253d0223f1029f7f85b6ef8
https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/classes/CCEvent.php#L158-L176
18,103
ClanCats/Core
src/classes/CCEvent.php
CCEvent.pack
protected static function pack( $responses ) { return array_merge( CCArr::get( 'before', $responses, array() ), CCArr::get( 'main', $responses, array() ), CCArr::get( 'after', $responses, array() ) ); }
php
protected static function pack( $responses ) { return array_merge( CCArr::get( 'before', $responses, array() ), CCArr::get( 'main', $responses, array() ), CCArr::get( 'after', $responses, array() ) ); }
[ "protected", "static", "function", "pack", "(", "$", "responses", ")", "{", "return", "array_merge", "(", "CCArr", "::", "get", "(", "'before'", ",", "$", "responses", ",", "array", "(", ")", ")", ",", "CCArr", "::", "get", "(", "'main'", ",", "$", "...
packs all responses into one array @param array $responses @return array
[ "packs", "all", "responses", "into", "one", "array" ]
9f6ec72c1a439de4b253d0223f1029f7f85b6ef8
https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/classes/CCEvent.php#L184-L186
18,104
titon/db
src/Titon/Db/Behavior/TimestampBehavior.php
TimestampBehavior.preSave
public function preSave(Event $event, Query $query, $id, array &$data) { $data[$this->getConfig($query->getType() === Query::UPDATE ? 'updateField' : 'createField')] = time(); return true; }
php
public function preSave(Event $event, Query $query, $id, array &$data) { $data[$this->getConfig($query->getType() === Query::UPDATE ? 'updateField' : 'createField')] = time(); return true; }
[ "public", "function", "preSave", "(", "Event", "$", "event", ",", "Query", "$", "query", ",", "$", "id", ",", "array", "&", "$", "data", ")", "{", "$", "data", "[", "$", "this", "->", "getConfig", "(", "$", "query", "->", "getType", "(", ")", "==...
Append the current timestamp to the data. @param \Titon\Event\Event $event @param \Titon\Db\Query $query @param int|int[] $id @param array $data @return bool
[ "Append", "the", "current", "timestamp", "to", "the", "data", "." ]
fbc5159d1ce9d2139759c9367565986981485604
https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Behavior/TimestampBehavior.php#L42-L46
18,105
andrelohmann/silverstripe-geolocation
code/models/fieldtypes/Location.php
Location.getSQLFilter
public function getSQLFilter($radius, $scale = 'km'){ // set Latitude and Longditude Columnnames GeoFunctions::$Latitude = $this->name.'Latitude'; GeoFunctions::$Longditude = $this->name.'Longditude'; return GeoFunctions::getSQLSquare($this->getLatitude(), $this->getLongditude(), $radius, $scale); }
php
public function getSQLFilter($radius, $scale = 'km'){ // set Latitude and Longditude Columnnames GeoFunctions::$Latitude = $this->name.'Latitude'; GeoFunctions::$Longditude = $this->name.'Longditude'; return GeoFunctions::getSQLSquare($this->getLatitude(), $this->getLongditude(), $radius, $scale); }
[ "public", "function", "getSQLFilter", "(", "$", "radius", ",", "$", "scale", "=", "'km'", ")", "{", "// set Latitude and Longditude Columnnames", "GeoFunctions", "::", "$", "Latitude", "=", "$", "this", "->", "name", ".", "'Latitude'", ";", "GeoFunctions", "::",...
return a SQL Bounce for WHERE Clause
[ "return", "a", "SQL", "Bounce", "for", "WHERE", "Clause" ]
124062008d8fa25b631bf5bb69b2ca79b53ef81b
https://github.com/andrelohmann/silverstripe-geolocation/blob/124062008d8fa25b631bf5bb69b2ca79b53ef81b/code/models/fieldtypes/Location.php#L194-L200
18,106
andrelohmann/silverstripe-geolocation
code/models/fieldtypes/Location.php
Location.getDistanceFromLocation
public function getDistanceFromLocation(Location $location, $scale = 'km'){ return GeoFunctions::getDistance($this->getLatitude(), $this->getLongditude(), $location->getLatitude(), $location->getLongditude(), $scale); }
php
public function getDistanceFromLocation(Location $location, $scale = 'km'){ return GeoFunctions::getDistance($this->getLatitude(), $this->getLongditude(), $location->getLatitude(), $location->getLongditude(), $scale); }
[ "public", "function", "getDistanceFromLocation", "(", "Location", "$", "location", ",", "$", "scale", "=", "'km'", ")", "{", "return", "GeoFunctions", "::", "getDistance", "(", "$", "this", "->", "getLatitude", "(", ")", ",", "$", "this", "->", "getLongditud...
return the Distance to the given location
[ "return", "the", "Distance", "to", "the", "given", "location" ]
124062008d8fa25b631bf5bb69b2ca79b53ef81b
https://github.com/andrelohmann/silverstripe-geolocation/blob/124062008d8fa25b631bf5bb69b2ca79b53ef81b/code/models/fieldtypes/Location.php#L220-L222
18,107
ClanCats/Core
src/classes/CCContainer.php
CCContainer.is_callable
public static function is_callable( $key ) { if ( is_callable( $key ) ) { return true; } if ( array_key_exists( $key, static::$_container ) ) { return true; } return false; }
php
public static function is_callable( $key ) { if ( is_callable( $key ) ) { return true; } if ( array_key_exists( $key, static::$_container ) ) { return true; } return false; }
[ "public", "static", "function", "is_callable", "(", "$", "key", ")", "{", "if", "(", "is_callable", "(", "$", "key", ")", ")", "{", "return", "true", ";", "}", "if", "(", "array_key_exists", "(", "$", "key", ",", "static", "::", "$", "_container", ")...
Is this callable @param string $key @return bool
[ "Is", "this", "callable" ]
9f6ec72c1a439de4b253d0223f1029f7f85b6ef8
https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/classes/CCContainer.php#L49-L62
18,108
ClanCats/Core
src/classes/CCContainer.php
CCContainer.call
public static function call() { $arguments = func_get_args(); // get the key $key = array_shift( $arguments ); // container call if ( is_string( $key ) && array_key_exists( $key, static::$_container ) && is_callable( static::$_container[$key] ) ) { return call_user_func_array( static::$_container[$key...
php
public static function call() { $arguments = func_get_args(); // get the key $key = array_shift( $arguments ); // container call if ( is_string( $key ) && array_key_exists( $key, static::$_container ) && is_callable( static::$_container[$key] ) ) { return call_user_func_array( static::$_container[$key...
[ "public", "static", "function", "call", "(", ")", "{", "$", "arguments", "=", "func_get_args", "(", ")", ";", "// get the key", "$", "key", "=", "array_shift", "(", "$", "arguments", ")", ";", "// container call", "if", "(", "is_string", "(", "$", "key", ...
call a container @param string $key @param mixed $callback @return void
[ "call", "a", "container" ]
9f6ec72c1a439de4b253d0223f1029f7f85b6ef8
https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/classes/CCContainer.php#L71-L91
18,109
maniaplanet/matchmaking-lobby
MatchMakingLobby/Lobby/MatchMakers/AbstractDistance.php
AbstractDistance.buildGraph
protected function buildGraph(&$graph, $distanceComputeCallback, array $objects) { $graph = new Helpers\Graph(); while($object = array_shift($objects)) { $graph->addNode( $object, $this->computeDistances($object, $objects, $distanceComputeCallback) ); } }
php
protected function buildGraph(&$graph, $distanceComputeCallback, array $objects) { $graph = new Helpers\Graph(); while($object = array_shift($objects)) { $graph->addNode( $object, $this->computeDistances($object, $objects, $distanceComputeCallback) ); } }
[ "protected", "function", "buildGraph", "(", "&", "$", "graph", ",", "$", "distanceComputeCallback", ",", "array", "$", "objects", ")", "{", "$", "graph", "=", "new", "Helpers", "\\", "Graph", "(", ")", ";", "while", "(", "$", "object", "=", "array_shift"...
Create a graph where each ready player is a node @param DistanciableObject[] $bannedPlayers @return type
[ "Create", "a", "graph", "where", "each", "ready", "player", "is", "a", "node" ]
384f22cdd2cfb0204a071810549eaf1eb01d8b7f
https://github.com/maniaplanet/matchmaking-lobby/blob/384f22cdd2cfb0204a071810549eaf1eb01d8b7f/MatchMakingLobby/Lobby/MatchMakers/AbstractDistance.php#L188-L199
18,110
maniaplanet/matchmaking-lobby
MatchMakingLobby/Lobby/MatchMakers/AbstractDistance.php
AbstractDistance.computeDistances
private function computeDistances($object, $followers, $distanceComputeCallback) { $distances = array(); foreach($followers as $follower) { if($follower == $object) continue; $distances[$follower->id] = call_user_func($distanceComputeCallback, $object->data, $follower->data); } return $dis...
php
private function computeDistances($object, $followers, $distanceComputeCallback) { $distances = array(); foreach($followers as $follower) { if($follower == $object) continue; $distances[$follower->id] = call_user_func($distanceComputeCallback, $object->data, $follower->data); } return $dis...
[ "private", "function", "computeDistances", "(", "$", "object", ",", "$", "followers", ",", "$", "distanceComputeCallback", ")", "{", "$", "distances", "=", "array", "(", ")", ";", "foreach", "(", "$", "followers", "as", "$", "follower", ")", "{", "if", "...
Compute distance for a player with all his followers @param string $player @param string[] $followers @return float[string]
[ "Compute", "distance", "for", "a", "player", "with", "all", "his", "followers" ]
384f22cdd2cfb0204a071810549eaf1eb01d8b7f
https://github.com/maniaplanet/matchmaking-lobby/blob/384f22cdd2cfb0204a071810549eaf1eb01d8b7f/MatchMakingLobby/Lobby/MatchMakers/AbstractDistance.php#L207-L217
18,111
ppetermann/king23
src/Http/Middleware/BasePathStripper.php
BasePathStripper.process
public function process(ServerRequestInterface $request, RequestHandlerInterface $next) : ResponseInterface { $path = $request->getUri()->getPath(); if (!empty($this->basePath) && 0 === strpos($path, $this->basePath)) { $cleanPath = substr($path, strlen($this->basePath)); if...
php
public function process(ServerRequestInterface $request, RequestHandlerInterface $next) : ResponseInterface { $path = $request->getUri()->getPath(); if (!empty($this->basePath) && 0 === strpos($path, $this->basePath)) { $cleanPath = substr($path, strlen($this->basePath)); if...
[ "public", "function", "process", "(", "ServerRequestInterface", "$", "request", ",", "RequestHandlerInterface", "$", "next", ")", ":", "ResponseInterface", "{", "$", "path", "=", "$", "request", "->", "getUri", "(", ")", "->", "getPath", "(", ")", ";", "if",...
strip away the basePath @param ServerRequestInterface $request @param RequestHandlerInterface $next @return ResponseInterface
[ "strip", "away", "the", "basePath" ]
603896083ec89f5ac4d744abd3b1b4db3e914c95
https://github.com/ppetermann/king23/blob/603896083ec89f5ac4d744abd3b1b4db3e914c95/src/Http/Middleware/BasePathStripper.php#L67-L80
18,112
Double-Opt-in/php-client-api
src/Guzzle/Plugin/OAuth2Plugin.php
OAuth2Plugin.setCache
public function setCache($file) { if ( ! empty($file)) { $this->cache = new AccessTokenCache($file); $this->setAccessToken($this->cache->get()); } }
php
public function setCache($file) { if ( ! empty($file)) { $this->cache = new AccessTokenCache($file); $this->setAccessToken($this->cache->get()); } }
[ "public", "function", "setCache", "(", "$", "file", ")", "{", "if", "(", "!", "empty", "(", "$", "file", ")", ")", "{", "$", "this", "->", "cache", "=", "new", "AccessTokenCache", "(", "$", "file", ")", ";", "$", "this", "->", "setAccessToken", "("...
sets the cache file when possible @param string $file
[ "sets", "the", "cache", "file", "when", "possible" ]
2f17da58ec20a408bbd55b2cdd053bc689f995f4
https://github.com/Double-Opt-in/php-client-api/blob/2f17da58ec20a408bbd55b2cdd053bc689f995f4/src/Guzzle/Plugin/OAuth2Plugin.php#L24-L31
18,113
gries/rcon
src/Messenger.php
Messenger.send
public function send($messageText, callable $callable = null) { $message = new Message($messageText); $response = $this->connection ->sendMessage($message) ->getBody() ; if ($callable) { $response = call_user_func($callable, $response); }...
php
public function send($messageText, callable $callable = null) { $message = new Message($messageText); $response = $this->connection ->sendMessage($message) ->getBody() ; if ($callable) { $response = call_user_func($callable, $response); }...
[ "public", "function", "send", "(", "$", "messageText", ",", "callable", "$", "callable", "=", "null", ")", "{", "$", "message", "=", "new", "Message", "(", "$", "messageText", ")", ";", "$", "response", "=", "$", "this", "->", "connection", "->", "send...
Send text to the server. @param $messageText @param callable $callable @return string
[ "Send", "text", "to", "the", "server", "." ]
7fada05b329d89542692af00ab80db02ad59d45d
https://github.com/gries/rcon/blob/7fada05b329d89542692af00ab80db02ad59d45d/src/Messenger.php#L29-L43
18,114
iocaste/microservice-foundation
src/Feature/Client/HttpClient.php
HttpClient.send
public function send(Request $request, $async = false): \Psr\Http\Message\StreamInterface { $this->currentUri = $request->fullUrl(); $options = []; if ($request->method() === 'POST' || $request->method() === 'PUT') { $options['json'] = $request->request->all(); } ...
php
public function send(Request $request, $async = false): \Psr\Http\Message\StreamInterface { $this->currentUri = $request->fullUrl(); $options = []; if ($request->method() === 'POST' || $request->method() === 'PUT') { $options['json'] = $request->request->all(); } ...
[ "public", "function", "send", "(", "Request", "$", "request", ",", "$", "async", "=", "false", ")", ":", "\\", "Psr", "\\", "Http", "\\", "Message", "\\", "StreamInterface", "{", "$", "this", "->", "currentUri", "=", "$", "request", "->", "fullUrl", "(...
Send the given request through the application. This method allows you to fully customize the entire Request object. @param Request $request @param bool $async @return \Psr\Http\Message\StreamInterface
[ "Send", "the", "given", "request", "through", "the", "application", ".", "This", "method", "allows", "you", "to", "fully", "customize", "the", "entire", "Request", "object", "." ]
274a154de4299e8a57314bab972e09f6d8cdae9e
https://github.com/iocaste/microservice-foundation/blob/274a154de4299e8a57314bab972e09f6d8cdae9e/src/Feature/Client/HttpClient.php#L177-L192
18,115
adammbalogh/key-value-store-memory
src/Adapter/MemoryAdapter/KeyTrait.php
KeyTrait.delete
public function delete($key) { try { $this->get($key); } catch (KeyNotFoundException $e) { return false; } unset($this->store[$key]); return true; }
php
public function delete($key) { try { $this->get($key); } catch (KeyNotFoundException $e) { return false; } unset($this->store[$key]); return true; }
[ "public", "function", "delete", "(", "$", "key", ")", "{", "try", "{", "$", "this", "->", "get", "(", "$", "key", ")", ";", "}", "catch", "(", "KeyNotFoundException", "$", "e", ")", "{", "return", "false", ";", "}", "unset", "(", "$", "this", "->...
Removes a key. @param string $key @return bool True if the deletion was successful, false if the deletion was unsuccessful.
[ "Removes", "a", "key", "." ]
6bafb9037d61911f76343a7aa7270866b1a11995
https://github.com/adammbalogh/key-value-store-memory/blob/6bafb9037d61911f76343a7aa7270866b1a11995/src/Adapter/MemoryAdapter/KeyTrait.php#L18-L29
18,116
Nozemi/SlickBoard-Library
lib/SBLib/Users/User.php
User.setPassword
public function setPassword($p1, $p2 = null, $login = false) { $this->password = $this->integration->setPassword($p1, $p2, $login, $this); return $this; }
php
public function setPassword($p1, $p2 = null, $login = false) { $this->password = $this->integration->setPassword($p1, $p2, $login, $this); return $this; }
[ "public", "function", "setPassword", "(", "$", "p1", ",", "$", "p2", "=", "null", ",", "$", "login", "=", "false", ")", "{", "$", "this", "->", "password", "=", "$", "this", "->", "integration", "->", "setPassword", "(", "$", "p1", ",", "$", "p2", ...
Set the password if the passwords match.
[ "Set", "the", "password", "if", "the", "passwords", "match", "." ]
c9f0a26a30f8127c997f75d7232eac170972418d
https://github.com/Nozemi/SlickBoard-Library/blob/c9f0a26a30f8127c997f75d7232eac170972418d/lib/SBLib/Users/User.php#L110-L113
18,117
comodojo/cookies
src/Comodojo/Cookies/CookieTools.php
CookieTools.checkDomain
public static function checkDomain($domain_name) { if ( $domain_name[0] == '.' ) $domain_name = substr($domain_name, 1); return (preg_match("/^([a-z\d](-*[a-z\d])*)(\.([a-z\d](-*[a-z\d])*))*$/i", $domain_name) //valid chars check && preg_match("/^.{1,253}$/", $domain_name) //overa...
php
public static function checkDomain($domain_name) { if ( $domain_name[0] == '.' ) $domain_name = substr($domain_name, 1); return (preg_match("/^([a-z\d](-*[a-z\d])*)(\.([a-z\d](-*[a-z\d])*))*$/i", $domain_name) //valid chars check && preg_match("/^.{1,253}$/", $domain_name) //overa...
[ "public", "static", "function", "checkDomain", "(", "$", "domain_name", ")", "{", "if", "(", "$", "domain_name", "[", "0", "]", "==", "'.'", ")", "$", "domain_name", "=", "substr", "(", "$", "domain_name", ",", "1", ")", ";", "return", "(", "preg_match...
Check if domain is valid Main code from: http://stackoverflow.com/questions/1755144/how-to-validate-domain-name-in-php @param string $domain_name The domain name to check @return bool
[ "Check", "if", "domain", "is", "valid" ]
a81c7dff37d52c1a75462c0ad30db75d0c3b0081
https://github.com/comodojo/cookies/blob/a81c7dff37d52c1a75462c0ad30db75d0c3b0081/src/Comodojo/Cookies/CookieTools.php#L112-L120
18,118
geekwright/Po
src/PoHeader.php
PoHeader.buildStructuredHeaders
protected function buildStructuredHeaders(): void { $this->structuredHeaders = array(); $headers = $this->entry[PoTokens::TRANSLATED]; $headers = ($headers === null) ? array() : $headers; $full = implode('', $headers); $headers = explode("\n", $full); // split on ':' ...
php
protected function buildStructuredHeaders(): void { $this->structuredHeaders = array(); $headers = $this->entry[PoTokens::TRANSLATED]; $headers = ($headers === null) ? array() : $headers; $full = implode('', $headers); $headers = explode("\n", $full); // split on ':' ...
[ "protected", "function", "buildStructuredHeaders", "(", ")", ":", "void", "{", "$", "this", "->", "structuredHeaders", "=", "array", "(", ")", ";", "$", "headers", "=", "$", "this", "->", "entry", "[", "PoTokens", "::", "TRANSLATED", "]", ";", "$", "head...
Populate the internal structuredHeaders property with contents of this entry's "msgstr" value. @return void
[ "Populate", "the", "internal", "structuredHeaders", "property", "with", "contents", "of", "this", "entry", "s", "msgstr", "value", "." ]
9474d059a83b64e6242cc41e5c5b7a08bc57e4e2
https://github.com/geekwright/Po/blob/9474d059a83b64e6242cc41e5c5b7a08bc57e4e2/src/PoHeader.php#L38-L55
18,119
geekwright/Po
src/PoHeader.php
PoHeader.storeStructuredHeader
protected function storeStructuredHeader(): bool { if (is_null($this->structuredHeaders)) { return false; } $headers = array(""); foreach ($this->structuredHeaders as $h) { $headers[] = $h['key'] . ': ' . $h['value'] . "\n"; } $this->entry[PoT...
php
protected function storeStructuredHeader(): bool { if (is_null($this->structuredHeaders)) { return false; } $headers = array(""); foreach ($this->structuredHeaders as $h) { $headers[] = $h['key'] . ': ' . $h['value'] . "\n"; } $this->entry[PoT...
[ "protected", "function", "storeStructuredHeader", "(", ")", ":", "bool", "{", "if", "(", "is_null", "(", "$", "this", "->", "structuredHeaders", ")", ")", "{", "return", "false", ";", "}", "$", "headers", "=", "array", "(", "\"\"", ")", ";", "foreach", ...
Rebuild the this entry's "msgstr" value using contents of the internal structuredHeaders property. @return boolean true if rebuilt, false if not
[ "Rebuild", "the", "this", "entry", "s", "msgstr", "value", "using", "contents", "of", "the", "internal", "structuredHeaders", "property", "." ]
9474d059a83b64e6242cc41e5c5b7a08bc57e4e2
https://github.com/geekwright/Po/blob/9474d059a83b64e6242cc41e5c5b7a08bc57e4e2/src/PoHeader.php#L63-L75
18,120
geekwright/Po
src/PoHeader.php
PoHeader.getHeader
public function getHeader(string $key): ?string { $this->buildStructuredHeaders(); $lkey = strtolower($key); $header = null; if (isset($this->structuredHeaders[$lkey]['value'])) { $header = $this->structuredHeaders[$lkey]['value']; } return $header; }
php
public function getHeader(string $key): ?string { $this->buildStructuredHeaders(); $lkey = strtolower($key); $header = null; if (isset($this->structuredHeaders[$lkey]['value'])) { $header = $this->structuredHeaders[$lkey]['value']; } return $header; }
[ "public", "function", "getHeader", "(", "string", "$", "key", ")", ":", "?", "string", "{", "$", "this", "->", "buildStructuredHeaders", "(", ")", ";", "$", "lkey", "=", "strtolower", "(", "$", "key", ")", ";", "$", "header", "=", "null", ";", "if", ...
Get a header value string by key @param string $key case insensitive name of header to return @return string|null header string for key or false if not set
[ "Get", "a", "header", "value", "string", "by", "key" ]
9474d059a83b64e6242cc41e5c5b7a08bc57e4e2
https://github.com/geekwright/Po/blob/9474d059a83b64e6242cc41e5c5b7a08bc57e4e2/src/PoHeader.php#L84-L93
18,121
geekwright/Po
src/PoHeader.php
PoHeader.setHeader
public function setHeader(string $key, string $value): void { $this->buildStructuredHeaders(); $lkey = strtolower($key); if (isset($this->structuredHeaders[$lkey])) { $this->structuredHeaders[$lkey]['value'] = $value; } else { $newHeader = array('key' => $key,...
php
public function setHeader(string $key, string $value): void { $this->buildStructuredHeaders(); $lkey = strtolower($key); if (isset($this->structuredHeaders[$lkey])) { $this->structuredHeaders[$lkey]['value'] = $value; } else { $newHeader = array('key' => $key,...
[ "public", "function", "setHeader", "(", "string", "$", "key", ",", "string", "$", "value", ")", ":", "void", "{", "$", "this", "->", "buildStructuredHeaders", "(", ")", ";", "$", "lkey", "=", "strtolower", "(", "$", "key", ")", ";", "if", "(", "isset...
Set the value of a header string for a key. @param string $key name of header to set. If the header exists, the name is case insensitive. If it is new the given case will be used @param string $value value to set @return void
[ "Set", "the", "value", "of", "a", "header", "string", "for", "a", "key", "." ]
9474d059a83b64e6242cc41e5c5b7a08bc57e4e2
https://github.com/geekwright/Po/blob/9474d059a83b64e6242cc41e5c5b7a08bc57e4e2/src/PoHeader.php#L104-L115
18,122
geekwright/Po
src/PoHeader.php
PoHeader.setCreateDate
public function setCreateDate(?int $time = null): void { $this->setHeader('POT-Creation-Date', $this->formatTimestamp($time)); }
php
public function setCreateDate(?int $time = null): void { $this->setHeader('POT-Creation-Date', $this->formatTimestamp($time)); }
[ "public", "function", "setCreateDate", "(", "?", "int", "$", "time", "=", "null", ")", ":", "void", "{", "$", "this", "->", "setHeader", "(", "'POT-Creation-Date'", ",", "$", "this", "->", "formatTimestamp", "(", "$", "time", ")", ")", ";", "}" ]
Set the POT-Creation-Date header @param integer|null $time unix timestamp, null to use current @return void
[ "Set", "the", "POT", "-", "Creation", "-", "Date", "header" ]
9474d059a83b64e6242cc41e5c5b7a08bc57e4e2
https://github.com/geekwright/Po/blob/9474d059a83b64e6242cc41e5c5b7a08bc57e4e2/src/PoHeader.php#L124-L127
18,123
geekwright/Po
src/PoHeader.php
PoHeader.setRevisionDate
public function setRevisionDate(?int $time = null): void { $this->setHeader('PO-Revision-Date', $this->formatTimestamp($time)); }
php
public function setRevisionDate(?int $time = null): void { $this->setHeader('PO-Revision-Date', $this->formatTimestamp($time)); }
[ "public", "function", "setRevisionDate", "(", "?", "int", "$", "time", "=", "null", ")", ":", "void", "{", "$", "this", "->", "setHeader", "(", "'PO-Revision-Date'", ",", "$", "this", "->", "formatTimestamp", "(", "$", "time", ")", ")", ";", "}" ]
Set the PO-Revision-Date header @param integer|null $time unix timestamp, null to use current @return void
[ "Set", "the", "PO", "-", "Revision", "-", "Date", "header" ]
9474d059a83b64e6242cc41e5c5b7a08bc57e4e2
https://github.com/geekwright/Po/blob/9474d059a83b64e6242cc41e5c5b7a08bc57e4e2/src/PoHeader.php#L136-L139
18,124
geekwright/Po
src/PoHeader.php
PoHeader.formatTimestamp
protected function formatTimestamp(?int $time = null): string { if (empty($time)) { $time = time(); } return gmdate('Y-m-d H:iO', $time); }
php
protected function formatTimestamp(?int $time = null): string { if (empty($time)) { $time = time(); } return gmdate('Y-m-d H:iO', $time); }
[ "protected", "function", "formatTimestamp", "(", "?", "int", "$", "time", "=", "null", ")", ":", "string", "{", "if", "(", "empty", "(", "$", "time", ")", ")", "{", "$", "time", "=", "time", "(", ")", ";", "}", "return", "gmdate", "(", "'Y-m-d H:iO...
Format a timestamp following PO file conventions @param integer|null $time unix timestamp, null to use current @return string formatted timestamp
[ "Format", "a", "timestamp", "following", "PO", "file", "conventions" ]
9474d059a83b64e6242cc41e5c5b7a08bc57e4e2
https://github.com/geekwright/Po/blob/9474d059a83b64e6242cc41e5c5b7a08bc57e4e2/src/PoHeader.php#L148-L154
18,125
geekwright/Po
src/PoHeader.php
PoHeader.buildDefaultHeader
public function buildDefaultHeader(): void { $this->set(PoTokens::MESSAGE, ""); $this->set(PoTokens::TRANSLATOR_COMMENTS, 'SOME DESCRIPTIVE TITLE'); $this->add(PoTokens::TRANSLATOR_COMMENTS, 'Copyright (C) YEAR HOLDER'); $this->add(PoTokens::TRANSLATOR_COMMENTS, 'LICENSE'); $...
php
public function buildDefaultHeader(): void { $this->set(PoTokens::MESSAGE, ""); $this->set(PoTokens::TRANSLATOR_COMMENTS, 'SOME DESCRIPTIVE TITLE'); $this->add(PoTokens::TRANSLATOR_COMMENTS, 'Copyright (C) YEAR HOLDER'); $this->add(PoTokens::TRANSLATOR_COMMENTS, 'LICENSE'); $...
[ "public", "function", "buildDefaultHeader", "(", ")", ":", "void", "{", "$", "this", "->", "set", "(", "PoTokens", "::", "MESSAGE", ",", "\"\"", ")", ";", "$", "this", "->", "set", "(", "PoTokens", "::", "TRANSLATOR_COMMENTS", ",", "'SOME DESCRIPTIVE TITLE'"...
Create a default header entry @return void
[ "Create", "a", "default", "header", "entry" ]
9474d059a83b64e6242cc41e5c5b7a08bc57e4e2
https://github.com/geekwright/Po/blob/9474d059a83b64e6242cc41e5c5b7a08bc57e4e2/src/PoHeader.php#L161-L181
18,126
webforge-labs/psc-cms
lib/Psc/Object.php
Object.callObjectMethod
public static function callObjectMethod($object, $name, Array $args = NULL) { $args = (array) $args; /* funky switch da wir performance wollen */ switch (count($args)) { case 0: return $object->$name(); case 1: return $object->$name($args[0]); case 2: ret...
php
public static function callObjectMethod($object, $name, Array $args = NULL) { $args = (array) $args; /* funky switch da wir performance wollen */ switch (count($args)) { case 0: return $object->$name(); case 1: return $object->$name($args[0]); case 2: ret...
[ "public", "static", "function", "callObjectMethod", "(", "$", "object", ",", "$", "name", ",", "Array", "$", "args", "=", "NULL", ")", "{", "$", "args", "=", "(", "array", ")", "$", "args", ";", "/* funky switch da wir performance wollen */", "switch", "(", ...
Ruft eine Methode auf einem Objekt auf @param object $object @param string $name der Name der Methode die aufgerufen werden soll @param array $arg @return Object
[ "Ruft", "eine", "Methode", "auf", "einem", "Objekt", "auf" ]
467bfa2547e6b4fa487d2d7f35fa6cc618dbc763
https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/Object.php#L138-L174
18,127
yuncms/framework
src/user/models/LoginForm.php
LoginForm.confirmationValidate
public function confirmationValidate($attribute) { if (!$this->hasErrors()) { if ($this->user !== null) { $confirmationRequired = Yii::$app->settings->get('enableConfirmation', 'user') && !Yii::$app->settings->get('enableUnconfirmedLogin', 'user'); if ($confirmati...
php
public function confirmationValidate($attribute) { if (!$this->hasErrors()) { if ($this->user !== null) { $confirmationRequired = Yii::$app->settings->get('enableConfirmation', 'user') && !Yii::$app->settings->get('enableUnconfirmedLogin', 'user'); if ($confirmati...
[ "public", "function", "confirmationValidate", "(", "$", "attribute", ")", "{", "if", "(", "!", "$", "this", "->", "hasErrors", "(", ")", ")", "{", "if", "(", "$", "this", "->", "user", "!==", "null", ")", "{", "$", "confirmationRequired", "=", "Yii", ...
Validates the confirmation. This method serves as the inline validation for password. @param string $attribute the attribute currently being validated
[ "Validates", "the", "confirmation", ".", "This", "method", "serves", "as", "the", "inline", "validation", "for", "password", "." ]
af42e28ea4ae15ab8eead3f6d119f93863b94154
https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/user/models/LoginForm.php#L102-L115
18,128
lode/fem
src/exception.php
exception.setUserAction
public function setUserAction($link, $label=null) { if ($label) { $this->userAction = [ 'link' => $link, 'label' => $label, ]; } else { $this->userAction = $link; } }
php
public function setUserAction($link, $label=null) { if ($label) { $this->userAction = [ 'link' => $link, 'label' => $label, ]; } else { $this->userAction = $link; } }
[ "public", "function", "setUserAction", "(", "$", "link", ",", "$", "label", "=", "null", ")", "{", "if", "(", "$", "label", ")", "{", "$", "this", "->", "userAction", "=", "[", "'link'", "=>", "$", "link", ",", "'label'", "=>", "$", "label", ",", ...
set a user facing link as continue action @param string $link @param string $label optional
[ "set", "a", "user", "facing", "link", "as", "continue", "action" ]
c1c466c1a904d99452b341c5ae7cbc3e22b106e1
https://github.com/lode/fem/blob/c1c466c1a904d99452b341c5ae7cbc3e22b106e1/src/exception.php#L69-L79
18,129
lode/fem
src/exception.php
exception.clean_paths
public static function clean_paths($string) { $string = str_replace(ROOT_DIR, '', $string); $string = str_replace('.php', '', $string); return $string; }
php
public static function clean_paths($string) { $string = str_replace(ROOT_DIR, '', $string); $string = str_replace('.php', '', $string); return $string; }
[ "public", "static", "function", "clean_paths", "(", "$", "string", ")", "{", "$", "string", "=", "str_replace", "(", "ROOT_DIR", ",", "''", ",", "$", "string", ")", ";", "$", "string", "=", "str_replace", "(", "'.php'", ",", "''", ",", "$", "string", ...
cleans file paths from redundant information i.e. ROOT_DIR and '.php' is removed @param string $string @return string
[ "cleans", "file", "paths", "from", "redundant", "information", "i", ".", "e", ".", "ROOT_DIR", "and", ".", "php", "is", "removed" ]
c1c466c1a904d99452b341c5ae7cbc3e22b106e1
https://github.com/lode/fem/blob/c1c466c1a904d99452b341c5ae7cbc3e22b106e1/src/exception.php#L101-L106
18,130
simple-php-mvc/simple-php-mvc
src/MVC/Server/Router.php
Router._compile_regex
protected function _compile_regex($route) { $pattern = '`(/|\.|)\[([^:\]]*+)(?::([^:\]]*+))?\](\?|)`'; if ( preg_match_all($pattern, $route, $matches, PREG_SET_ORDER) ) { $match_types = array( 'i' => '[0-9]++', 'a' => '[0-9A-Za-z]++', 'h...
php
protected function _compile_regex($route) { $pattern = '`(/|\.|)\[([^:\]]*+)(?::([^:\]]*+))?\](\?|)`'; if ( preg_match_all($pattern, $route, $matches, PREG_SET_ORDER) ) { $match_types = array( 'i' => '[0-9]++', 'a' => '[0-9A-Za-z]++', 'h...
[ "protected", "function", "_compile_regex", "(", "$", "route", ")", "{", "$", "pattern", "=", "'`(/|\\.|)\\[([^:\\]]*+)(?::([^:\\]]*+))?\\](\\?|)`'", ";", "if", "(", "preg_match_all", "(", "$", "pattern", ",", "$", "route", ",", "$", "matches", ",", "PREG_SET_ORDER...
Compiles the regex necessary to capture all match types within a route. @access protected @param string $route The route. @return string
[ "Compiles", "the", "regex", "necessary", "to", "capture", "all", "match", "types", "within", "a", "route", "." ]
e319eb09d29afad6993acb4a7e35f32a87dd0841
https://github.com/simple-php-mvc/simple-php-mvc/blob/e319eb09d29afad6993acb4a7e35f32a87dd0841/src/MVC/Server/Router.php#L20-L53
18,131
mongrate/mongrate
src/Mongrate/Model/Name.php
Name.validate
private function validate($name) { if (!is_string($name)) { throw new InvalidNameException('Migration name must be a string, got ' . gettype($name)); } if (strlen($name) === 0) { throw new InvalidNameException('Migration name must not be empty'); } $...
php
private function validate($name) { if (!is_string($name)) { throw new InvalidNameException('Migration name must be a string, got ' . gettype($name)); } if (strlen($name) === 0) { throw new InvalidNameException('Migration name must not be empty'); } $...
[ "private", "function", "validate", "(", "$", "name", ")", "{", "if", "(", "!", "is_string", "(", "$", "name", ")", ")", "{", "throw", "new", "InvalidNameException", "(", "'Migration name must be a string, got '", ".", "gettype", "(", "$", "name", ")", ")", ...
Ensure the migration name is acceptable. @throws InvalidNameException if the name given is invalid.
[ "Ensure", "the", "migration", "name", "is", "acceptable", "." ]
d76455a58a4ee5e6f8198e033c07bce40e2f7c7b
https://github.com/mongrate/mongrate/blob/d76455a58a4ee5e6f8198e033c07bce40e2f7c7b/src/Mongrate/Model/Name.php#L47-L71
18,132
fyuze/framework
src/Fyuze/Kernel/Fyuze.php
Fyuze.setupContainer
protected function setupContainer() { $container = Registry::init(); $container->add('app', $this); $container->add('registry', $container); $container->add('config', function () { return new Config($this->getConfigPath(), 'prod'); }); $this->config = $c...
php
protected function setupContainer() { $container = Registry::init(); $container->add('app', $this); $container->add('registry', $container); $container->add('config', function () { return new Config($this->getConfigPath(), 'prod'); }); $this->config = $c...
[ "protected", "function", "setupContainer", "(", ")", "{", "$", "container", "=", "Registry", "::", "init", "(", ")", ";", "$", "container", "->", "add", "(", "'app'", ",", "$", "this", ")", ";", "$", "container", "->", "add", "(", "'registry'", ",", ...
Registers container and some classes @return void
[ "Registers", "container", "and", "some", "classes" ]
89b3984f7225e24bfcdafb090ee197275b3222c9
https://github.com/fyuze/framework/blob/89b3984f7225e24bfcdafb090ee197275b3222c9/src/Fyuze/Kernel/Fyuze.php#L127-L144
18,133
fyuze/framework
src/Fyuze/Kernel/Fyuze.php
Fyuze.configure
protected function configure() { $config = $this->config->get('app'); $this->charset = $config['charset']; mb_internal_encoding($this->charset); date_default_timezone_set($config['timezone']); }
php
protected function configure() { $config = $this->config->get('app'); $this->charset = $config['charset']; mb_internal_encoding($this->charset); date_default_timezone_set($config['timezone']); }
[ "protected", "function", "configure", "(", ")", "{", "$", "config", "=", "$", "this", "->", "config", "->", "get", "(", "'app'", ")", ";", "$", "this", "->", "charset", "=", "$", "config", "[", "'charset'", "]", ";", "mb_internal_encoding", "(", "$", ...
Sets up basic application configurations @return void
[ "Sets", "up", "basic", "application", "configurations" ]
89b3984f7225e24bfcdafb090ee197275b3222c9
https://github.com/fyuze/framework/blob/89b3984f7225e24bfcdafb090ee197275b3222c9/src/Fyuze/Kernel/Fyuze.php#L151-L159
18,134
fyuze/framework
src/Fyuze/Kernel/Fyuze.php
Fyuze.registerServices
protected function registerServices() { $services = array_filter($this->config->get('app.services'), function ($service) { return class_exists($service); }); foreach ($services as $service) { /** @var \Fyuze\Kernel\Service $obj */ $obj = new $service($thi...
php
protected function registerServices() { $services = array_filter($this->config->get('app.services'), function ($service) { return class_exists($service); }); foreach ($services as $service) { /** @var \Fyuze\Kernel\Service $obj */ $obj = new $service($thi...
[ "protected", "function", "registerServices", "(", ")", "{", "$", "services", "=", "array_filter", "(", "$", "this", "->", "config", "->", "get", "(", "'app.services'", ")", ",", "function", "(", "$", "service", ")", "{", "return", "class_exists", "(", "$",...
Registers all defined services @return void
[ "Registers", "all", "defined", "services" ]
89b3984f7225e24bfcdafb090ee197275b3222c9
https://github.com/fyuze/framework/blob/89b3984f7225e24bfcdafb090ee197275b3222c9/src/Fyuze/Kernel/Fyuze.php#L166-L179
18,135
miisieq/InfaktClient
src/Infakt/Repository/AbstractObjectRepository.php
AbstractObjectRepository.get
public function get(int $entityId) { $response = $this->infakt->get($this->getServiceName().'/'.$entityId.'.json'); if (2 != substr((string) $response->getStatusCode(), 0, 1)) { return null; } return $this->getMapper()->map(\GuzzleHttp\json_decode($response->getBody()->...
php
public function get(int $entityId) { $response = $this->infakt->get($this->getServiceName().'/'.$entityId.'.json'); if (2 != substr((string) $response->getStatusCode(), 0, 1)) { return null; } return $this->getMapper()->map(\GuzzleHttp\json_decode($response->getBody()->...
[ "public", "function", "get", "(", "int", "$", "entityId", ")", "{", "$", "response", "=", "$", "this", "->", "infakt", "->", "get", "(", "$", "this", "->", "getServiceName", "(", ")", ".", "'/'", ".", "$", "entityId", ".", "'.json'", ")", ";", "if"...
Get entity by ID. @param $entityId @return null|EntityInterface
[ "Get", "entity", "by", "ID", "." ]
5f0ae58c7be32580f3c92c2a7e7a7808d83d4e81
https://github.com/miisieq/InfaktClient/blob/5f0ae58c7be32580f3c92c2a7e7a7808d83d4e81/src/Infakt/Repository/AbstractObjectRepository.php#L56-L65
18,136
miisieq/InfaktClient
src/Infakt/Repository/AbstractObjectRepository.php
AbstractObjectRepository.getModelClass
protected function getModelClass(): string { $class = substr(get_class($this), strrpos(get_class($this), '\\') + 1); $class = substr($class, 0, strlen($class) - strlen('Repository')); return 'Infakt\\Model\\'.$class; }
php
protected function getModelClass(): string { $class = substr(get_class($this), strrpos(get_class($this), '\\') + 1); $class = substr($class, 0, strlen($class) - strlen('Repository')); return 'Infakt\\Model\\'.$class; }
[ "protected", "function", "getModelClass", "(", ")", ":", "string", "{", "$", "class", "=", "substr", "(", "get_class", "(", "$", "this", ")", ",", "strrpos", "(", "get_class", "(", "$", "this", ")", ",", "'\\\\'", ")", "+", "1", ")", ";", "$", "cla...
Get fully-qualified class name of a model. @return string
[ "Get", "fully", "-", "qualified", "class", "name", "of", "a", "model", "." ]
5f0ae58c7be32580f3c92c2a7e7a7808d83d4e81
https://github.com/miisieq/InfaktClient/blob/5f0ae58c7be32580f3c92c2a7e7a7808d83d4e81/src/Infakt/Repository/AbstractObjectRepository.php#L207-L213
18,137
miisieq/InfaktClient
src/Infakt/Repository/AbstractObjectRepository.php
AbstractObjectRepository.getMapperClass
protected function getMapperClass(): string { $class = substr(get_class($this), strrpos(get_class($this), '\\') + 1); $class = substr($class, 0, strlen($class) - strlen('Repository')); return 'Infakt\\Mapper\\'.$class.'Mapper'; }
php
protected function getMapperClass(): string { $class = substr(get_class($this), strrpos(get_class($this), '\\') + 1); $class = substr($class, 0, strlen($class) - strlen('Repository')); return 'Infakt\\Mapper\\'.$class.'Mapper'; }
[ "protected", "function", "getMapperClass", "(", ")", ":", "string", "{", "$", "class", "=", "substr", "(", "get_class", "(", "$", "this", ")", ",", "strrpos", "(", "get_class", "(", "$", "this", ")", ",", "'\\\\'", ")", "+", "1", ")", ";", "$", "cl...
Get fully-qualified class name of a mapper. @return string
[ "Get", "fully", "-", "qualified", "class", "name", "of", "a", "mapper", "." ]
5f0ae58c7be32580f3c92c2a7e7a7808d83d4e81
https://github.com/miisieq/InfaktClient/blob/5f0ae58c7be32580f3c92c2a7e7a7808d83d4e81/src/Infakt/Repository/AbstractObjectRepository.php#L220-L226
18,138
shiftio/safestream-php-sdk
src/Video/Video.php
Video.withExistingProxy
public function withExistingProxy(HlsProxy $hlsProxy) { if(is_null($this->proxies)) { $this->proxies = []; } array_push($this->proxies, $hlsProxy); return $this; }
php
public function withExistingProxy(HlsProxy $hlsProxy) { if(is_null($this->proxies)) { $this->proxies = []; } array_push($this->proxies, $hlsProxy); return $this; }
[ "public", "function", "withExistingProxy", "(", "HlsProxy", "$", "hlsProxy", ")", "{", "if", "(", "is_null", "(", "$", "this", "->", "proxies", ")", ")", "{", "$", "this", "->", "proxies", "=", "[", "]", ";", "}", "array_push", "(", "$", "this", "->"...
Fluent setter for the property proxies @param HlsProxy $hlsProxy @return $this
[ "Fluent", "setter", "for", "the", "property", "proxies" ]
1957cd5574725b24da1bbff9059aa30a9ca123c2
https://github.com/shiftio/safestream-php-sdk/blob/1957cd5574725b24da1bbff9059aa30a9ca123c2/src/Video/Video.php#L216-L224
18,139
FuriosoJack/LaraException
src/Exceptions/ExceptionProyect.php
ExceptionProyect.toArray
public function toArray() { return [ 'message' => $this->getMessageException(), 'errors' => $this->getErrors(), 'debugCode' => $this->getDebugCode(), 'details' => $this->getDetails(), 'routeBack' => redirect()->back()->getTargetUrl() ]; ...
php
public function toArray() { return [ 'message' => $this->getMessageException(), 'errors' => $this->getErrors(), 'debugCode' => $this->getDebugCode(), 'details' => $this->getDetails(), 'routeBack' => redirect()->back()->getTargetUrl() ]; ...
[ "public", "function", "toArray", "(", ")", "{", "return", "[", "'message'", "=>", "$", "this", "->", "getMessageException", "(", ")", ",", "'errors'", "=>", "$", "this", "->", "getErrors", "(", ")", ",", "'debugCode'", "=>", "$", "this", "->", "getDebugC...
convierte el Objeto en un array @return array
[ "convierte", "el", "Objeto", "en", "un", "array" ]
b30ec2ed3331d99fca4d0ae47c8710a522bd0c19
https://github.com/FuriosoJack/LaraException/blob/b30ec2ed3331d99fca4d0ae47c8710a522bd0c19/src/Exceptions/ExceptionProyect.php#L101-L110
18,140
spiral-modules/auth
source/Auth/TokenManager.php
TokenManager.fetchToken
public function fetchToken(Request $request) { foreach ($this->config->getOperators() as $name) { $operator = $this->getOperator($name); if ($operator->hasToken($request)) { return $operator->fetchToken($request); } } return null; }
php
public function fetchToken(Request $request) { foreach ($this->config->getOperators() as $name) { $operator = $this->getOperator($name); if ($operator->hasToken($request)) { return $operator->fetchToken($request); } } return null; }
[ "public", "function", "fetchToken", "(", "Request", "$", "request", ")", "{", "foreach", "(", "$", "this", "->", "config", "->", "getOperators", "(", ")", "as", "$", "name", ")", "{", "$", "operator", "=", "$", "this", "->", "getOperator", "(", "$", ...
Fetch authorization token from request if any. @param Request $request @return TokenInterface|null
[ "Fetch", "authorization", "token", "from", "request", "if", "any", "." ]
24e2070028f7257e8192914556963a4794428a99
https://github.com/spiral-modules/auth/blob/24e2070028f7257e8192914556963a4794428a99/source/Auth/TokenManager.php#L65-L76
18,141
mongrate/mongrate
src/Mongrate/Service/MigrationService.php
MigrationService.isMigrationApplied
public function isMigrationApplied(Name $name) { $this->ensureMigrationExists($name); $collection = $this->getAppliedCollection(); $criteria = ['className' => (string) $name]; $record = $collection->find($criteria)->getSingleResult(); if ($record === null) { ret...
php
public function isMigrationApplied(Name $name) { $this->ensureMigrationExists($name); $collection = $this->getAppliedCollection(); $criteria = ['className' => (string) $name]; $record = $collection->find($criteria)->getSingleResult(); if ($record === null) { ret...
[ "public", "function", "isMigrationApplied", "(", "Name", "$", "name", ")", "{", "$", "this", "->", "ensureMigrationExists", "(", "$", "name", ")", ";", "$", "collection", "=", "$", "this", "->", "getAppliedCollection", "(", ")", ";", "$", "criteria", "=", ...
Check if a migration has been applied. @param Name $name name of the migration. @return bool
[ "Check", "if", "a", "migration", "has", "been", "applied", "." ]
d76455a58a4ee5e6f8198e033c07bce40e2f7c7b
https://github.com/mongrate/mongrate/blob/d76455a58a4ee5e6f8198e033c07bce40e2f7c7b/src/Mongrate/Service/MigrationService.php#L151-L164
18,142
mongrate/mongrate
src/Mongrate/Service/MigrationService.php
MigrationService.migrate
public function migrate(Name $name, Direction $direction, OutputInterface $output) { $migration = $this->createMigrationInstance($name, $output); $output->writeln('<info>Migrating ' . $direction . '...</info> <comment>' . $name . '</comment>'); if ($direction->isUp()) { $migrat...
php
public function migrate(Name $name, Direction $direction, OutputInterface $output) { $migration = $this->createMigrationInstance($name, $output); $output->writeln('<info>Migrating ' . $direction . '...</info> <comment>' . $name . '</comment>'); if ($direction->isUp()) { $migrat...
[ "public", "function", "migrate", "(", "Name", "$", "name", ",", "Direction", "$", "direction", ",", "OutputInterface", "$", "output", ")", "{", "$", "migration", "=", "$", "this", "->", "createMigrationInstance", "(", "$", "name", ",", "$", "output", ")", ...
Migrate up or down. @param Direction $direction
[ "Migrate", "up", "or", "down", "." ]
d76455a58a4ee5e6f8198e033c07bce40e2f7c7b
https://github.com/mongrate/mongrate/blob/d76455a58a4ee5e6f8198e033c07bce40e2f7c7b/src/Mongrate/Service/MigrationService.php#L186-L201
18,143
mongrate/mongrate
src/Mongrate/Service/MigrationService.php
MigrationService.getAllMigrations
public function getAllMigrations() { $iterator = new \DirectoryIterator($this->configuration->getMigrationsDirectory()); $migrations = []; foreach ($iterator as $file) { $fileName = (string) $file; if ($fileName === '.'|| $fileName === '..') { contin...
php
public function getAllMigrations() { $iterator = new \DirectoryIterator($this->configuration->getMigrationsDirectory()); $migrations = []; foreach ($iterator as $file) { $fileName = (string) $file; if ($fileName === '.'|| $fileName === '..') { contin...
[ "public", "function", "getAllMigrations", "(", ")", "{", "$", "iterator", "=", "new", "\\", "DirectoryIterator", "(", "$", "this", "->", "configuration", "->", "getMigrationsDirectory", "(", ")", ")", ";", "$", "migrations", "=", "[", "]", ";", "foreach", ...
Get a list of all migrations, sorted alphabetically. @return Migration[]
[ "Get", "a", "list", "of", "all", "migrations", "sorted", "alphabetically", "." ]
d76455a58a4ee5e6f8198e033c07bce40e2f7c7b
https://github.com/mongrate/mongrate/blob/d76455a58a4ee5e6f8198e033c07bce40e2f7c7b/src/Mongrate/Service/MigrationService.php#L208-L237
18,144
mongrate/mongrate
src/Mongrate/Service/MigrationService.php
MigrationService.getMigrationsNotApplied
public function getMigrationsNotApplied() { $migrationsNotApplied = []; $migrations = $this->getAllMigrations(); foreach ($migrations as $migration) { if (!$migration->isApplied()) { $migrationsNotApplied[] = $migration; } } return $m...
php
public function getMigrationsNotApplied() { $migrationsNotApplied = []; $migrations = $this->getAllMigrations(); foreach ($migrations as $migration) { if (!$migration->isApplied()) { $migrationsNotApplied[] = $migration; } } return $m...
[ "public", "function", "getMigrationsNotApplied", "(", ")", "{", "$", "migrationsNotApplied", "=", "[", "]", ";", "$", "migrations", "=", "$", "this", "->", "getAllMigrations", "(", ")", ";", "foreach", "(", "$", "migrations", "as", "$", "migration", ")", "...
Return array with all migrations that were note applied. @return Migration[]
[ "Return", "array", "with", "all", "migrations", "that", "were", "note", "applied", "." ]
d76455a58a4ee5e6f8198e033c07bce40e2f7c7b
https://github.com/mongrate/mongrate/blob/d76455a58a4ee5e6f8198e033c07bce40e2f7c7b/src/Mongrate/Service/MigrationService.php#L244-L256
18,145
mongrate/mongrate
src/Mongrate/Service/MigrationService.php
MigrationService.setMigrationApplied
private function setMigrationApplied(Name $name, $isApplied) { $collection = $this->getAppliedCollection(); $criteria = ['className' => (string) $name]; $newObj = ['$set' => ['className' => (string) $name, 'isApplied' => $isApplied]]; $collection->upsert($criteria, $newObj); }
php
private function setMigrationApplied(Name $name, $isApplied) { $collection = $this->getAppliedCollection(); $criteria = ['className' => (string) $name]; $newObj = ['$set' => ['className' => (string) $name, 'isApplied' => $isApplied]]; $collection->upsert($criteria, $newObj); }
[ "private", "function", "setMigrationApplied", "(", "Name", "$", "name", ",", "$", "isApplied", ")", "{", "$", "collection", "=", "$", "this", "->", "getAppliedCollection", "(", ")", ";", "$", "criteria", "=", "[", "'className'", "=>", "(", "string", ")", ...
Update the database to record whether or not the migration has been applied. @param boolean $isApplied
[ "Update", "the", "database", "to", "record", "whether", "or", "not", "the", "migration", "has", "been", "applied", "." ]
d76455a58a4ee5e6f8198e033c07bce40e2f7c7b
https://github.com/mongrate/mongrate/blob/d76455a58a4ee5e6f8198e033c07bce40e2f7c7b/src/Mongrate/Service/MigrationService.php#L298-L304
18,146
aedart/laravel-helpers
src/Traits/Broadcasting/BroadcastFactoryTrait.php
BroadcastFactoryTrait.getBroadcastFactory
public function getBroadcastFactory(): ?Factory { if (!$this->hasBroadcastFactory()) { $this->setBroadcastFactory($this->getDefaultBroadcastFactory()); } return $this->broadcastFactory; }
php
public function getBroadcastFactory(): ?Factory { if (!$this->hasBroadcastFactory()) { $this->setBroadcastFactory($this->getDefaultBroadcastFactory()); } return $this->broadcastFactory; }
[ "public", "function", "getBroadcastFactory", "(", ")", ":", "?", "Factory", "{", "if", "(", "!", "$", "this", "->", "hasBroadcastFactory", "(", ")", ")", "{", "$", "this", "->", "setBroadcastFactory", "(", "$", "this", "->", "getDefaultBroadcastFactory", "("...
Get broadcast factory If no broadcast factory has been set, this method will set and return a default broadcast factory, if any such value is available @see getDefaultBroadcastFactory() @return Factory|null broadcast factory or null if none broadcast factory has been set
[ "Get", "broadcast", "factory" ]
8b81a2d6658f3f8cb62b6be2c34773aaa2df219a
https://github.com/aedart/laravel-helpers/blob/8b81a2d6658f3f8cb62b6be2c34773aaa2df219a/src/Traits/Broadcasting/BroadcastFactoryTrait.php#L54-L60
18,147
steeffeen/FancyManiaLinks
FML/Script/Features/MenuElement.php
MenuElement.setItem
public function setItem(Control $item) { $item->checkId(); if ($item instanceof Scriptable) { $item->setScriptEvents(true); } $this->item = $item; return $this; }
php
public function setItem(Control $item) { $item->checkId(); if ($item instanceof Scriptable) { $item->setScriptEvents(true); } $this->item = $item; return $this; }
[ "public", "function", "setItem", "(", "Control", "$", "item", ")", "{", "$", "item", "->", "checkId", "(", ")", ";", "if", "(", "$", "item", "instanceof", "Scriptable", ")", "{", "$", "item", "->", "setScriptEvents", "(", "true", ")", ";", "}", "$", ...
Set the Item Control @api @param Control $item Item Control @return static
[ "Set", "the", "Item", "Control" ]
227b0759306f0a3c75873ba50276e4163a93bfa6
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Script/Features/MenuElement.php#L63-L71
18,148
dunkelfrosch/phpcoverfish
src/PHPCoverFish/Validator/Base/BaseCoverFishValidator.php
BaseCoverFishValidator.validateMapping
public function validateMapping(CoverFishMapping $coverMapping) { /** @var CoverFishResult $coverFishResult */ $coverFishResult = new CoverFishResult(); // prepare base results, clear all validation errors and warnings $coverFishResult = $this->prepareCoverFishResult($coverFishResult...
php
public function validateMapping(CoverFishMapping $coverMapping) { /** @var CoverFishResult $coverFishResult */ $coverFishResult = new CoverFishResult(); // prepare base results, clear all validation errors and warnings $coverFishResult = $this->prepareCoverFishResult($coverFishResult...
[ "public", "function", "validateMapping", "(", "CoverFishMapping", "$", "coverMapping", ")", "{", "/** @var CoverFishResult $coverFishResult */", "$", "coverFishResult", "=", "new", "CoverFishResult", "(", ")", ";", "// prepare base results, clear all validation errors and warning...
main validator mapping "engine", if any of our cover validator checks will fail, return corresponding result immediately ... @param CoverFishMapping $coverMapping @return CoverFishResult
[ "main", "validator", "mapping", "engine", "if", "any", "of", "our", "cover", "validator", "checks", "will", "fail", "return", "corresponding", "result", "immediately", "..." ]
779bd399ec8f4cadb3b7854200695c5eb3f5a8ad
https://github.com/dunkelfrosch/phpcoverfish/blob/779bd399ec8f4cadb3b7854200695c5eb3f5a8ad/src/PHPCoverFish/Validator/Base/BaseCoverFishValidator.php#L223-L239
18,149
maniaplanet/matchmaking-lobby
MatchMakingLobby/GUI/AbstractGUI.php
AbstractGUI.createLabel
final function createLabel($message, $login = null, $countdown = null, $isAnimated = false, $hideOnF6 = true, $showBackgroud = false) { $this->removeLabel($login); $ui = Windows\Label::Create($login); $ui->setPosition(0, 40); $ui->setMessage($message, $countdown); $ui->animated = $isAnimated; $ui->h...
php
final function createLabel($message, $login = null, $countdown = null, $isAnimated = false, $hideOnF6 = true, $showBackgroud = false) { $this->removeLabel($login); $ui = Windows\Label::Create($login); $ui->setPosition(0, 40); $ui->setMessage($message, $countdown); $ui->animated = $isAnimated; $ui->h...
[ "final", "function", "createLabel", "(", "$", "message", ",", "$", "login", "=", "null", ",", "$", "countdown", "=", "null", ",", "$", "isAnimated", "=", "false", ",", "$", "hideOnF6", "=", "true", ",", "$", "showBackgroud", "=", "false", ")", "{", "...
Display a text message in the center of the player's screen If countdown is set, the message will be refresh every second the end of the countdown @param string $login @param string $message @param int $countdown @param bool $isAnimated If true the text will be animated
[ "Display", "a", "text", "message", "in", "the", "center", "of", "the", "player", "s", "screen", "If", "countdown", "is", "set", "the", "message", "will", "be", "refresh", "every", "second", "the", "end", "of", "the", "countdown" ]
384f22cdd2cfb0204a071810549eaf1eb01d8b7f
https://github.com/maniaplanet/matchmaking-lobby/blob/384f22cdd2cfb0204a071810549eaf1eb01d8b7f/MatchMakingLobby/GUI/AbstractGUI.php#L190-L200
18,150
maniaplanet/matchmaking-lobby
MatchMakingLobby/GUI/AbstractGUI.php
AbstractGUI.updateLobbyWindow
final function updateLobbyWindow($serverName, $playersCount, $playingPlayersCount, $averageTime) { $lobbyWindow = Windows\LobbyWindow::Create(); Windows\LobbyWindow::setServerName($serverName); Windows\LobbyWindow::setAverageWaitingTime($averageTime == -1 ? -1 : ceil($averageTime/60)); Windows\LobbyWindo...
php
final function updateLobbyWindow($serverName, $playersCount, $playingPlayersCount, $averageTime) { $lobbyWindow = Windows\LobbyWindow::Create(); Windows\LobbyWindow::setServerName($serverName); Windows\LobbyWindow::setAverageWaitingTime($averageTime == -1 ? -1 : ceil($averageTime/60)); Windows\LobbyWindo...
[ "final", "function", "updateLobbyWindow", "(", "$", "serverName", ",", "$", "playersCount", ",", "$", "playingPlayersCount", ",", "$", "averageTime", ")", "{", "$", "lobbyWindow", "=", "Windows", "\\", "LobbyWindow", "::", "Create", "(", ")", ";", "Windows", ...
Display the lobby Window on the right of the screen @param string $serverName @param int $playersCount Number of players ready on the lobby @param int $totalPlayerCount Total number of player on the matchmaking system @param int $playingPlayersCount Number of player in match
[ "Display", "the", "lobby", "Window", "on", "the", "right", "of", "the", "screen" ]
384f22cdd2cfb0204a071810549eaf1eb01d8b7f
https://github.com/maniaplanet/matchmaking-lobby/blob/384f22cdd2cfb0204a071810549eaf1eb01d8b7f/MatchMakingLobby/GUI/AbstractGUI.php#L269-L277
18,151
maniaplanet/matchmaking-lobby
MatchMakingLobby/GUI/AbstractGUI.php
AbstractGUI.removePlayerFromPlayerList
final function removePlayerFromPlayerList($login) { Windows\PlayerList::Erase($login); $playerLists = Windows\PlayerList::GetAll(); foreach($playerLists as $playerList) { $playerList->removePlayer($login); } Windows\PlayerList::RedrawAll(); }
php
final function removePlayerFromPlayerList($login) { Windows\PlayerList::Erase($login); $playerLists = Windows\PlayerList::GetAll(); foreach($playerLists as $playerList) { $playerList->removePlayer($login); } Windows\PlayerList::RedrawAll(); }
[ "final", "function", "removePlayerFromPlayerList", "(", "$", "login", ")", "{", "Windows", "\\", "PlayerList", "::", "Erase", "(", "$", "login", ")", ";", "$", "playerLists", "=", "Windows", "\\", "PlayerList", "::", "GetAll", "(", ")", ";", "foreach", "("...
Remove a player from the playerlist and destroy his list @param string $login
[ "Remove", "a", "player", "from", "the", "playerlist", "and", "destroy", "his", "list" ]
384f22cdd2cfb0204a071810549eaf1eb01d8b7f
https://github.com/maniaplanet/matchmaking-lobby/blob/384f22cdd2cfb0204a071810549eaf1eb01d8b7f/MatchMakingLobby/GUI/AbstractGUI.php#L460-L469
18,152
qcubed/orm
src/Database/DatabaseBase.php
DatabaseBase.transactionCommit
public final function transactionCommit() { if (1 == $this->intTransactionDepth) { $this->executeTransactionCommit(); } if ($this->intTransactionDepth <= 0) { throw new Caller("The transaction commit call is called before the transaction begin was called."); }...
php
public final function transactionCommit() { if (1 == $this->intTransactionDepth) { $this->executeTransactionCommit(); } if ($this->intTransactionDepth <= 0) { throw new Caller("The transaction commit call is called before the transaction begin was called."); }...
[ "public", "final", "function", "transactionCommit", "(", ")", "{", "if", "(", "1", "==", "$", "this", "->", "intTransactionDepth", ")", "{", "$", "this", "->", "executeTransactionCommit", "(", ")", ";", "}", "if", "(", "$", "this", "->", "intTransactionDep...
This function commits the database transaction. @throws Caller @return void Nothing
[ "This", "function", "commits", "the", "database", "transaction", "." ]
f320eba671f20874b1f3809c5293f8c02d5b1204
https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Database/DatabaseBase.php#L217-L226
18,153
qcubed/orm
src/Database/DatabaseBase.php
DatabaseBase.escapeIdentifiers
public function escapeIdentifiers($mixIdentifiers) { if (is_array($mixIdentifiers)) { return array_map(array($this, 'EscapeIdentifier'), $mixIdentifiers); } else { return $this->escapeIdentifier($mixIdentifiers); } }
php
public function escapeIdentifiers($mixIdentifiers) { if (is_array($mixIdentifiers)) { return array_map(array($this, 'EscapeIdentifier'), $mixIdentifiers); } else { return $this->escapeIdentifier($mixIdentifiers); } }
[ "public", "function", "escapeIdentifiers", "(", "$", "mixIdentifiers", ")", "{", "if", "(", "is_array", "(", "$", "mixIdentifiers", ")", ")", "{", "return", "array_map", "(", "array", "(", "$", "this", ",", "'EscapeIdentifier'", ")", ",", "$", "mixIdentifier...
Given an array of identifiers, this method returns array of escaped identifiers For corner case handling, if a single identifier is supplied, a single escaped identifier is returned @param array|string $mixIdentifiers Array of escaped identifiers (array) or one unescaped identifier (string) @return array|string Array...
[ "Given", "an", "array", "of", "identifiers", "this", "method", "returns", "array", "of", "escaped", "identifiers", "For", "corner", "case", "handling", "if", "a", "single", "identifier", "is", "supplied", "a", "single", "escaped", "identifier", "is", "returned" ...
f320eba671f20874b1f3809c5293f8c02d5b1204
https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Database/DatabaseBase.php#L272-L279
18,154
qcubed/orm
src/Database/DatabaseBase.php
DatabaseBase.escapeIdentifiersAndValues
public function escapeIdentifiersAndValues($mixColumnsAndValuesArray) { $result = array(); foreach ($mixColumnsAndValuesArray as $strColumn => $mixValue) { $result[$this->escapeIdentifier($strColumn)] = $this->sqlVariable($mixValue); } return $result; }
php
public function escapeIdentifiersAndValues($mixColumnsAndValuesArray) { $result = array(); foreach ($mixColumnsAndValuesArray as $strColumn => $mixValue) { $result[$this->escapeIdentifier($strColumn)] = $this->sqlVariable($mixValue); } return $result; }
[ "public", "function", "escapeIdentifiersAndValues", "(", "$", "mixColumnsAndValuesArray", ")", "{", "$", "result", "=", "array", "(", ")", ";", "foreach", "(", "$", "mixColumnsAndValuesArray", "as", "$", "strColumn", "=>", "$", "mixValue", ")", "{", "$", "resu...
Escapes both column and values when supplied as an array @param array $mixColumnsAndValuesArray Array with column=>value format with both (column and value) sides unescaped @return array Array with column=>value format data with both column and value escaped
[ "Escapes", "both", "column", "and", "values", "when", "supplied", "as", "an", "array" ]
f320eba671f20874b1f3809c5293f8c02d5b1204
https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Database/DatabaseBase.php#L304-L311
18,155
qcubed/orm
src/Database/DatabaseBase.php
DatabaseBase.insertOrUpdate
public function insertOrUpdate($strTable, $mixColumnsAndValuesArray, $strPKNames = null) { $strEscapedArray = $this->escapeIdentifiersAndValues($mixColumnsAndValuesArray); $strColumns = array_keys($strEscapedArray); $strUpdateStatement = ''; foreach ($strEscapedArray as $strColumn =>...
php
public function insertOrUpdate($strTable, $mixColumnsAndValuesArray, $strPKNames = null) { $strEscapedArray = $this->escapeIdentifiersAndValues($mixColumnsAndValuesArray); $strColumns = array_keys($strEscapedArray); $strUpdateStatement = ''; foreach ($strEscapedArray as $strColumn =>...
[ "public", "function", "insertOrUpdate", "(", "$", "strTable", ",", "$", "mixColumnsAndValuesArray", ",", "$", "strPKNames", "=", "null", ")", "{", "$", "strEscapedArray", "=", "$", "this", "->", "escapeIdentifiersAndValues", "(", "$", "mixColumnsAndValuesArray", "...
INSERTs or UPDATEs a table @param string $strTable Table name @param array $mixColumnsAndValuesArray column=>value array (they are given to 'EscapeIdentifiersAndValues' method) @param null|string|array $strPKNames Name(s) of primary key column(s) (expressed as string or array)
[ "INSERTs", "or", "UPDATEs", "a", "table" ]
f320eba671f20874b1f3809c5293f8c02d5b1204
https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Database/DatabaseBase.php#L321-L355
18,156
qcubed/orm
src/Database/DatabaseBase.php
DatabaseBase.query
public final function query($strQuery) { $timerName = null; if (!$this->blnConnectedFlag) { $this->connect(); } if ($this->blnEnableProfiling) { $timerName = 'queryExec' . mt_rand(); Timer::start($timerName); } $result = $this->e...
php
public final function query($strQuery) { $timerName = null; if (!$this->blnConnectedFlag) { $this->connect(); } if ($this->blnEnableProfiling) { $timerName = 'queryExec' . mt_rand(); Timer::start($timerName); } $result = $this->e...
[ "public", "final", "function", "query", "(", "$", "strQuery", ")", "{", "$", "timerName", "=", "null", ";", "if", "(", "!", "$", "this", "->", "blnConnectedFlag", ")", "{", "$", "this", "->", "connect", "(", ")", ";", "}", "if", "(", "$", "this", ...
Sends the 'SELECT' query to the database and returns the result @param string $strQuery query string @return ResultBase
[ "Sends", "the", "SELECT", "query", "to", "the", "database", "and", "returns", "the", "result" ]
f320eba671f20874b1f3809c5293f8c02d5b1204
https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Database/DatabaseBase.php#L364-L388
18,157
qcubed/orm
src/Database/DatabaseBase.php
DatabaseBase.logQuery
private function logQuery($strQuery, $dblQueryTime) { if ($this->blnEnableProfiling) { // Dereference-ize Backtrace Information $objDebugBacktrace = debug_backtrace(); // get rid of unnecessary backtrace info in case of: // query if ((count($objDe...
php
private function logQuery($strQuery, $dblQueryTime) { if ($this->blnEnableProfiling) { // Dereference-ize Backtrace Information $objDebugBacktrace = debug_backtrace(); // get rid of unnecessary backtrace info in case of: // query if ((count($objDe...
[ "private", "function", "logQuery", "(", "$", "strQuery", ",", "$", "dblQueryTime", ")", "{", "if", "(", "$", "this", "->", "blnEnableProfiling", ")", "{", "// Dereference-ize Backtrace Information", "$", "objDebugBacktrace", "=", "debug_backtrace", "(", ")", ";", ...
If EnableProfiling is on, then log the query to the profile array @param string $strQuery @param double $dblQueryTime query execution time in milliseconds @return void
[ "If", "EnableProfiling", "is", "on", "then", "log", "the", "query", "to", "the", "profile", "array" ]
f320eba671f20874b1f3809c5293f8c02d5b1204
https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Database/DatabaseBase.php#L545-L609
18,158
qcubed/orm
src/Database/DatabaseBase.php
DatabaseBase.outputProfiling
public function outputProfiling($blnPrintOutput = true) { $strPath = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['PHP_SELF']; $strOut = '<div class="qDbProfile">'; if ($this->blnEnableProfiling) { $strOut .= sprintf('<form method="...
php
public function outputProfiling($blnPrintOutput = true) { $strPath = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['PHP_SELF']; $strOut = '<div class="qDbProfile">'; if ($this->blnEnableProfiling) { $strOut .= sprintf('<form method="...
[ "public", "function", "outputProfiling", "(", "$", "blnPrintOutput", "=", "true", ")", "{", "$", "strPath", "=", "isset", "(", "$", "_SERVER", "[", "'REQUEST_URI'", "]", ")", "?", "$", "_SERVER", "[", "'REQUEST_URI'", "]", ":", "$", "_SERVER", "[", "'PHP...
Displays the OutputProfiling results, plus a link which will popup the details of the profiling. @param bool $blnPrintOutput @return null|string
[ "Displays", "the", "OutputProfiling", "results", "plus", "a", "link", "which", "will", "popup", "the", "details", "of", "the", "profiling", "." ]
f320eba671f20874b1f3809c5293f8c02d5b1204
https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Database/DatabaseBase.php#L754-L796
18,159
qcubed/orm
src/Database/DatabaseBase.php
DatabaseBase.extractCommentOptions
public static function extractCommentOptions($strComment) { $ret[0] = null; // comment string without options $ret[1] = null; // the options array if (($strComment) && ($pos1 = strpos($strComment, '{')) !== false && ($pos2 = strrpos($strComment, '}', $pos1)) )...
php
public static function extractCommentOptions($strComment) { $ret[0] = null; // comment string without options $ret[1] = null; // the options array if (($strComment) && ($pos1 = strpos($strComment, '{')) !== false && ($pos2 = strrpos($strComment, '}', $pos1)) )...
[ "public", "static", "function", "extractCommentOptions", "(", "$", "strComment", ")", "{", "$", "ret", "[", "0", "]", "=", "null", ";", "// comment string without options", "$", "ret", "[", "1", "]", "=", "null", ";", "// the options array", "if", "(", "(", ...
Utility function to extract the json embedded options structure from the comments. Usage: <code> list($strComment, $options) = Base::extractCommentOptions($strComment); </code> @param string $strComment The comment to analyze @return array A two item array, with first item the comment with the options removed, and 2n...
[ "Utility", "function", "to", "extract", "the", "json", "embedded", "options", "structure", "from", "the", "comments", "." ]
f320eba671f20874b1f3809c5293f8c02d5b1204
https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Database/DatabaseBase.php#L824-L846
18,160
lode/fem
example-project/application/routing.php
routing.get_custom_routes
protected function get_custom_routes() { $routes = []; // map to a file $routes['GET']['foo'] = 'bar'; // map to a method $accept = fem\request::get_primary_accept(); // html, json, etc. $routes['GET']['foo'] = 'bar->'.$accept; $routes['GET']['foo'] = 'bar::'.$accept; // map to an inline function $routes...
php
protected function get_custom_routes() { $routes = []; // map to a file $routes['GET']['foo'] = 'bar'; // map to a method $accept = fem\request::get_primary_accept(); // html, json, etc. $routes['GET']['foo'] = 'bar->'.$accept; $routes['GET']['foo'] = 'bar::'.$accept; // map to an inline function $routes...
[ "protected", "function", "get_custom_routes", "(", ")", "{", "$", "routes", "=", "[", "]", ";", "// map to a file", "$", "routes", "[", "'GET'", "]", "[", "'foo'", "]", "=", "'bar'", ";", "// map to a method", "$", "accept", "=", "fem", "\\", "request", ...
user defined mapping url to handler @return array with keys for each supported http method .. .. and inside, key-value pairs of url-regex => handler for example `$routes['GET']['foo'] = 'bar';` .. .. maps the GET url 'foo' to the file 'bar' the url-regex doesn't need regex boundaries like '/foo/' @see \alsvanzelf\fe...
[ "user", "defined", "mapping", "url", "to", "handler" ]
c1c466c1a904d99452b341c5ae7cbc3e22b106e1
https://github.com/lode/fem/blob/c1c466c1a904d99452b341c5ae7cbc3e22b106e1/example-project/application/routing.php#L23-L39
18,161
nooku/nooku-installer
src/Nooku/Composer/Installer.php
Installer.getDelegate
public function getDelegate($packageType) { if (!isset($this->_instances[$packageType])) { if (isset($this->_delegates[$packageType])) { $classname = $this->_delegates[$packageType]; $instance = new $classname($this->io, $this->composer, 'nook...
php
public function getDelegate($packageType) { if (!isset($this->_instances[$packageType])) { if (isset($this->_delegates[$packageType])) { $classname = $this->_delegates[$packageType]; $instance = new $classname($this->io, $this->composer, 'nook...
[ "public", "function", "getDelegate", "(", "$", "packageType", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "_instances", "[", "$", "packageType", "]", ")", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "_delegates", "[", "$", ...
Returns a specialized LibraryInstaller subclass to deal with the given package type. @return Composer\Installer\LibraryInstaller @throws \InvalidArgumentException
[ "Returns", "a", "specialized", "LibraryInstaller", "subclass", "to", "deal", "with", "the", "given", "package", "type", "." ]
2aa82ed08983bccd51905426cfff4980ba960d89
https://github.com/nooku/nooku-installer/blob/2aa82ed08983bccd51905426cfff4980ba960d89/src/Nooku/Composer/Installer.php#L50-L65
18,162
gajus/brick
src/System.php
System.setDirectory
public function setDirectory ($directory) { if (strpos($directory, '/') !== 0) { throw new Exception\InvalidArgumentException('Directory name must be an absolute path.'); } if (!is_dir($directory)) { throw new Exception\LogicException('Template directory does not exist.'...
php
public function setDirectory ($directory) { if (strpos($directory, '/') !== 0) { throw new Exception\InvalidArgumentException('Directory name must be an absolute path.'); } if (!is_dir($directory)) { throw new Exception\LogicException('Template directory does not exist.'...
[ "public", "function", "setDirectory", "(", "$", "directory", ")", "{", "if", "(", "strpos", "(", "$", "directory", ",", "'/'", ")", "!==", "0", ")", "{", "throw", "new", "Exception", "\\", "InvalidArgumentException", "(", "'Directory name must be an absolute pat...
Template resolution is restricted to the paths under the template directory. @param string $directory Absolute path to the template directory.
[ "Template", "resolution", "is", "restricted", "to", "the", "paths", "under", "the", "template", "directory", "." ]
8e1890b2993fb1e2049a3fd73ec048c95fb0a7df
https://github.com/gajus/brick/blob/8e1890b2993fb1e2049a3fd73ec048c95fb0a7df/src/System.php#L39-L49
18,163
yuncms/framework
src/helpers/RBACHelper.php
RBACHelper.getDefaultRoutes
protected static function getDefaultRoutes() { if (self::$_defaultRoutes === null) { $manager = self::getAuthManager(); $roles = $manager->defaultRoles; if ($manager->cache && ($routes = $manager->cache->get($roles)) !== false) { self::$_defaultRoutes = $r...
php
protected static function getDefaultRoutes() { if (self::$_defaultRoutes === null) { $manager = self::getAuthManager(); $roles = $manager->defaultRoles; if ($manager->cache && ($routes = $manager->cache->get($roles)) !== false) { self::$_defaultRoutes = $r...
[ "protected", "static", "function", "getDefaultRoutes", "(", ")", "{", "if", "(", "self", "::", "$", "_defaultRoutes", "===", "null", ")", "{", "$", "manager", "=", "self", "::", "getAuthManager", "(", ")", ";", "$", "roles", "=", "$", "manager", "->", ...
Get assigned routes by default roles @return array
[ "Get", "assigned", "routes", "by", "default", "roles" ]
af42e28ea4ae15ab8eead3f6d119f93863b94154
https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/helpers/RBACHelper.php#L51-L76
18,164
yuncms/framework
src/helpers/RBACHelper.php
RBACHelper.getRoutesByUser
public static function getRoutesByUser($userId) { if (!isset(self::$_userRoutes[$userId])) { $manager = self::getAuthManager(); if ($manager->cache && ($routes = $manager->cache->get([__METHOD__, $userId])) !== false) { self::$_userRoutes[$userId] = $routes; ...
php
public static function getRoutesByUser($userId) { if (!isset(self::$_userRoutes[$userId])) { $manager = self::getAuthManager(); if ($manager->cache && ($routes = $manager->cache->get([__METHOD__, $userId])) !== false) { self::$_userRoutes[$userId] = $routes; ...
[ "public", "static", "function", "getRoutesByUser", "(", "$", "userId", ")", "{", "if", "(", "!", "isset", "(", "self", "::", "$", "_userRoutes", "[", "$", "userId", "]", ")", ")", "{", "$", "manager", "=", "self", "::", "getAuthManager", "(", ")", ";...
Get assigned routes of user. @param integer $userId @return array
[ "Get", "assigned", "routes", "of", "user", "." ]
af42e28ea4ae15ab8eead3f6d119f93863b94154
https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/helpers/RBACHelper.php#L83-L105
18,165
parsnick/steak
src/Console/Command.php
Command.setIo
protected function setIo(InputInterface $input, OutputInterface $output) { $this->input = $input; $this->output = $output; return $this; }
php
protected function setIo(InputInterface $input, OutputInterface $output) { $this->input = $input; $this->output = $output; return $this; }
[ "protected", "function", "setIo", "(", "InputInterface", "$", "input", ",", "OutputInterface", "$", "output", ")", "{", "$", "this", "->", "input", "=", "$", "input", ";", "$", "this", "->", "output", "=", "$", "output", ";", "return", "$", "this", ";"...
Attach IO to command for easier access between methods. @param InputInterface $input @param OutputInterface $output @return $this
[ "Attach", "IO", "to", "command", "for", "easier", "access", "between", "methods", "." ]
461869189a640938438187330f6c50aca97c5ccc
https://github.com/parsnick/steak/blob/461869189a640938438187330f6c50aca97c5ccc/src/Console/Command.php#L55-L61
18,166
parsnick/steak
src/Console/Command.php
Command.createGulpProcess
protected function createGulpProcess($task, array $options = []) { $config = $this->container['config']; return ProcessBuilder::create(array_flatten([ $config['gulp.bin'], $task, $options, '--source', $config['source.directory'], '--dest',...
php
protected function createGulpProcess($task, array $options = []) { $config = $this->container['config']; return ProcessBuilder::create(array_flatten([ $config['gulp.bin'], $task, $options, '--source', $config['source.directory'], '--dest',...
[ "protected", "function", "createGulpProcess", "(", "$", "task", ",", "array", "$", "options", "=", "[", "]", ")", "{", "$", "config", "=", "$", "this", "->", "container", "[", "'config'", "]", ";", "return", "ProcessBuilder", "::", "create", "(", "array_...
Create a process builder for the given gulp task. @param string $task @param array $options @return Process
[ "Create", "a", "process", "builder", "for", "the", "given", "gulp", "task", "." ]
461869189a640938438187330f6c50aca97c5ccc
https://github.com/parsnick/steak/blob/461869189a640938438187330f6c50aca97c5ccc/src/Console/Command.php#L70-L85
18,167
steeffeen/FancyManiaLinks
FML/Script/Features/ScriptFeature.php
ScriptFeature.collect
public static function collect() { $params = func_get_args(); $scriptFeatures = array(); foreach ($params as $object) { if ($object instanceof ScriptFeature) { $scriptFeatures = static::addScriptFeature($scriptFeatures, $object); } else if ($ob...
php
public static function collect() { $params = func_get_args(); $scriptFeatures = array(); foreach ($params as $object) { if ($object instanceof ScriptFeature) { $scriptFeatures = static::addScriptFeature($scriptFeatures, $object); } else if ($ob...
[ "public", "static", "function", "collect", "(", ")", "{", "$", "params", "=", "func_get_args", "(", ")", ";", "$", "scriptFeatures", "=", "array", "(", ")", ";", "foreach", "(", "$", "params", "as", "$", "object", ")", "{", "if", "(", "$", "object", ...
Collect the Script Features of the given objects @return ScriptFeature[]
[ "Collect", "the", "Script", "Features", "of", "the", "given", "objects" ]
227b0759306f0a3c75873ba50276e4163a93bfa6
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Script/Features/ScriptFeature.php#L23-L39
18,168
steeffeen/FancyManiaLinks
FML/Script/Features/ScriptFeature.php
ScriptFeature.addScriptFeature
public static function addScriptFeature(array $scriptFeatures, $newScriptFeatures) { if (!$newScriptFeatures) { return $scriptFeatures; } if ($newScriptFeatures instanceof ScriptFeature) { if (!in_array($newScriptFeatures, $scriptFeatures, true)) { arr...
php
public static function addScriptFeature(array $scriptFeatures, $newScriptFeatures) { if (!$newScriptFeatures) { return $scriptFeatures; } if ($newScriptFeatures instanceof ScriptFeature) { if (!in_array($newScriptFeatures, $scriptFeatures, true)) { arr...
[ "public", "static", "function", "addScriptFeature", "(", "array", "$", "scriptFeatures", ",", "$", "newScriptFeatures", ")", "{", "if", "(", "!", "$", "newScriptFeatures", ")", "{", "return", "$", "scriptFeatures", ";", "}", "if", "(", "$", "newScriptFeatures"...
Add one or more Script Features to an Array of Features if they are not already contained @param array $scriptFeatures @param ScriptFeature||ScriptFeature[] $newScriptFeatures @return array
[ "Add", "one", "or", "more", "Script", "Features", "to", "an", "Array", "of", "Features", "if", "they", "are", "not", "already", "contained" ]
227b0759306f0a3c75873ba50276e4163a93bfa6
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Script/Features/ScriptFeature.php#L48-L63
18,169
phossa2/config
src/Config/Config.php
Config.loadGlobal
protected function loadGlobal(/*# string */ $group) { if (!isset($GLOBALS[$group])) { $this->throwError( Message::get(Message::CONFIG_GLOBAL_UNKNOWN, $group), Message::CONFIG_GLOBAL_UNKNOWN ); } // load super global $this->conf...
php
protected function loadGlobal(/*# string */ $group) { if (!isset($GLOBALS[$group])) { $this->throwError( Message::get(Message::CONFIG_GLOBAL_UNKNOWN, $group), Message::CONFIG_GLOBAL_UNKNOWN ); } // load super global $this->conf...
[ "protected", "function", "loadGlobal", "(", "/*# string */", "$", "group", ")", "{", "if", "(", "!", "isset", "(", "$", "GLOBALS", "[", "$", "group", "]", ")", ")", "{", "$", "this", "->", "throwError", "(", "Message", "::", "get", "(", "Message", ":...
Load super globals @param string $group @return $this @throws LogicException if super global unknown @access protected
[ "Load", "super", "globals" ]
7c046fd2c97633b69545b4745d8bffe28e19b1df
https://github.com/phossa2/config/blob/7c046fd2c97633b69545b4745d8bffe28e19b1df/src/Config/Config.php#L261-L274
18,170
phossa2/config
src/Config/Config.php
Config.getGroupName
protected function getGroupName(/*# string */ $id)/*# : string */ { return explode( $this->config->getDelimiter(), ltrim($id, $this->config->getDelimiter()) )[0]; }
php
protected function getGroupName(/*# string */ $id)/*# : string */ { return explode( $this->config->getDelimiter(), ltrim($id, $this->config->getDelimiter()) )[0]; }
[ "protected", "function", "getGroupName", "(", "/*# string */", "$", "id", ")", "/*# : string */", "{", "return", "explode", "(", "$", "this", "->", "config", "->", "getDelimiter", "(", ")", ",", "ltrim", "(", "$", "id", ",", "$", "this", "->", "config", ...
Get group name - returns 'system' from $id 'system.dir.tmp' - '.system.tmpdir' is invalid @param string $id @return string @access protected
[ "Get", "group", "name" ]
7c046fd2c97633b69545b4745d8bffe28e19b1df
https://github.com/phossa2/config/blob/7c046fd2c97633b69545b4745d8bffe28e19b1df/src/Config/Config.php#L286-L292
18,171
ARCANEDEV/Sanitizer
src/Factory.php
Factory.isFilterable
private function isFilterable($filter) { if (is_string($filter) && ! class_exists($filter)) { throw new Exceptions\InvalidFilterException( "The [$filter] class does not exits." ); } if ( ! in_array(Filterable::class, class_implements($filter))) { ...
php
private function isFilterable($filter) { if (is_string($filter) && ! class_exists($filter)) { throw new Exceptions\InvalidFilterException( "The [$filter] class does not exits." ); } if ( ! in_array(Filterable::class, class_implements($filter))) { ...
[ "private", "function", "isFilterable", "(", "$", "filter", ")", "{", "if", "(", "is_string", "(", "$", "filter", ")", "&&", "!", "class_exists", "(", "$", "filter", ")", ")", "{", "throw", "new", "Exceptions", "\\", "InvalidFilterException", "(", "\"The [$...
Check if filter is filterable. @param mixed $filter @throws \Arcanedev\Sanitizer\Exceptions\InvalidFilterException
[ "Check", "if", "filter", "is", "filterable", "." ]
e21990ce6d881366d52a7f4e5040b07cc3ecca96
https://github.com/ARCANEDEV/Sanitizer/blob/e21990ce6d881366d52a7f4e5040b07cc3ecca96/src/Factory.php#L102-L115
18,172
fubhy/graphql-php
src/Language/Parser.php
Parser.advance
protected function advance() { $this->cursor = $this->token->getEnd(); return $this->token = $this->lexer->readToken($this->cursor); }
php
protected function advance() { $this->cursor = $this->token->getEnd(); return $this->token = $this->lexer->readToken($this->cursor); }
[ "protected", "function", "advance", "(", ")", "{", "$", "this", "->", "cursor", "=", "$", "this", "->", "token", "->", "getEnd", "(", ")", ";", "return", "$", "this", "->", "token", "=", "$", "this", "->", "lexer", "->", "readToken", "(", "$", "thi...
Moves the internal parser object to the next lexed token.
[ "Moves", "the", "internal", "parser", "object", "to", "the", "next", "lexed", "token", "." ]
c1de2233c731ca29e5c5db4c43f3b9db36478c83
https://github.com/fubhy/graphql-php/blob/c1de2233c731ca29e5c5db4c43f3b9db36478c83/src/Language/Parser.php#L109-L113
18,173
fubhy/graphql-php
src/Language/Parser.php
Parser.skip
protected function skip($type) { if ($match = ($this->token->getType() === $type)) { $this->advance(); } return $match; }
php
protected function skip($type) { if ($match = ($this->token->getType() === $type)) { $this->advance(); } return $match; }
[ "protected", "function", "skip", "(", "$", "type", ")", "{", "if", "(", "$", "match", "=", "(", "$", "this", "->", "token", "->", "getType", "(", ")", "===", "$", "type", ")", ")", "{", "$", "this", "->", "advance", "(", ")", ";", "}", "return"...
If the next token is of the given kind, return true after advancing the parser. Otherwise, do not change the parser state and return false. @param int $type @return bool
[ "If", "the", "next", "token", "is", "of", "the", "given", "kind", "return", "true", "after", "advancing", "the", "parser", ".", "Otherwise", "do", "not", "change", "the", "parser", "state", "and", "return", "false", "." ]
c1de2233c731ca29e5c5db4c43f3b9db36478c83
https://github.com/fubhy/graphql-php/blob/c1de2233c731ca29e5c5db4c43f3b9db36478c83/src/Language/Parser.php#L135-L142
18,174
fubhy/graphql-php
src/Language/Parser.php
Parser.expect
protected function expect($type) { if ($this->token->getType() !== $type) { throw new \Exception(sprintf('Expected %s, found %s', Token::typeToString($type), (string) $this->token)); } $token = $this->token; $this->advance(); return $token; }
php
protected function expect($type) { if ($this->token->getType() !== $type) { throw new \Exception(sprintf('Expected %s, found %s', Token::typeToString($type), (string) $this->token)); } $token = $this->token; $this->advance(); return $token; }
[ "protected", "function", "expect", "(", "$", "type", ")", "{", "if", "(", "$", "this", "->", "token", "->", "getType", "(", ")", "!==", "$", "type", ")", "{", "throw", "new", "\\", "Exception", "(", "sprintf", "(", "'Expected %s, found %s'", ",", "Toke...
If the next token is of the given kind, return that token after advancing the parser. Otherwise, do not change the parser state and return false. @param int $type @return \Fubhy\GraphQL\Language\Token @throws \Exception
[ "If", "the", "next", "token", "is", "of", "the", "given", "kind", "return", "that", "token", "after", "advancing", "the", "parser", ".", "Otherwise", "do", "not", "change", "the", "parser", "state", "and", "return", "false", "." ]
c1de2233c731ca29e5c5db4c43f3b9db36478c83
https://github.com/fubhy/graphql-php/blob/c1de2233c731ca29e5c5db4c43f3b9db36478c83/src/Language/Parser.php#L154-L163
18,175
fubhy/graphql-php
src/Language/Parser.php
Parser.expectKeyword
protected function expectKeyword($value) { if ($this->token->getType() !== Token::NAME_TYPE || $this->token->getValue() !== $value) { throw new \Exception(sprintf('Expected %s, found %s', $value, $this->token->getDescription())); } return $this->advance(); }
php
protected function expectKeyword($value) { if ($this->token->getType() !== Token::NAME_TYPE || $this->token->getValue() !== $value) { throw new \Exception(sprintf('Expected %s, found %s', $value, $this->token->getDescription())); } return $this->advance(); }
[ "protected", "function", "expectKeyword", "(", "$", "value", ")", "{", "if", "(", "$", "this", "->", "token", "->", "getType", "(", ")", "!==", "Token", "::", "NAME_TYPE", "||", "$", "this", "->", "token", "->", "getValue", "(", ")", "!==", "$", "val...
If the next token is a keyword with the given value, return that token after advancing the parser. Otherwise, do not change the parser state and return false. @param string $value @return \Fubhy\GraphQL\Language\Token @throws \Exception
[ "If", "the", "next", "token", "is", "a", "keyword", "with", "the", "given", "value", "return", "that", "token", "after", "advancing", "the", "parser", ".", "Otherwise", "do", "not", "change", "the", "parser", "state", "and", "return", "false", "." ]
c1de2233c731ca29e5c5db4c43f3b9db36478c83
https://github.com/fubhy/graphql-php/blob/c1de2233c731ca29e5c5db4c43f3b9db36478c83/src/Language/Parser.php#L176-L183
18,176
fubhy/graphql-php
src/Language/Parser.php
Parser.unexpected
protected function unexpected(Token $atToken = NULL) { $token = $atToken ?: $this->token; return new \Exception(sprintf('Unexpected %s', $token->getDescription())); }
php
protected function unexpected(Token $atToken = NULL) { $token = $atToken ?: $this->token; return new \Exception(sprintf('Unexpected %s', $token->getDescription())); }
[ "protected", "function", "unexpected", "(", "Token", "$", "atToken", "=", "NULL", ")", "{", "$", "token", "=", "$", "atToken", "?", ":", "$", "this", "->", "token", ";", "return", "new", "\\", "Exception", "(", "sprintf", "(", "'Unexpected %s'", ",", "...
Helper protected function for creating an error when an unexpected lexed token is encountered. @param \Fubhy\GraphQL\Language\Token|null $atToken @return \Exception
[ "Helper", "protected", "function", "for", "creating", "an", "error", "when", "an", "unexpected", "lexed", "token", "is", "encountered", "." ]
c1de2233c731ca29e5c5db4c43f3b9db36478c83
https://github.com/fubhy/graphql-php/blob/c1de2233c731ca29e5c5db4c43f3b9db36478c83/src/Language/Parser.php#L193-L198
18,177
fubhy/graphql-php
src/Language/Parser.php
Parser.many
protected function many($openKind, $parseFn, $closeKind) { $this->expect($openKind); $nodes = [$parseFn($this)]; while (!$this->skip($closeKind)) { array_push($nodes, $parseFn($this)); } return $nodes; }
php
protected function many($openKind, $parseFn, $closeKind) { $this->expect($openKind); $nodes = [$parseFn($this)]; while (!$this->skip($closeKind)) { array_push($nodes, $parseFn($this)); } return $nodes; }
[ "protected", "function", "many", "(", "$", "openKind", ",", "$", "parseFn", ",", "$", "closeKind", ")", "{", "$", "this", "->", "expect", "(", "$", "openKind", ")", ";", "$", "nodes", "=", "[", "$", "parseFn", "(", "$", "this", ")", "]", ";", "wh...
Returns a non-empty list of parse nodes, determined by the parseFn. This list begins with a lex token of openKind and ends with a lex token of closeKind. Advances the parser to the next lex token after the closing token. @param int $openKind @param callable $parseFn @param int $closeKind @return array
[ "Returns", "a", "non", "-", "empty", "list", "of", "parse", "nodes", "determined", "by", "the", "parseFn", "." ]
c1de2233c731ca29e5c5db4c43f3b9db36478c83
https://github.com/fubhy/graphql-php/blob/c1de2233c731ca29e5c5db4c43f3b9db36478c83/src/Language/Parser.php#L238-L248
18,178
ARCANEDEV/Sanitizer
src/Sanitizer.php
Sanitizer.setFilters
public function setFilters(array $filters) { if (empty($this->filters)) { $this->filters = $this->getDefaultFilters(); } $this->filters = array_merge( $this->filters, $filters ); return $this; }
php
public function setFilters(array $filters) { if (empty($this->filters)) { $this->filters = $this->getDefaultFilters(); } $this->filters = array_merge( $this->filters, $filters ); return $this; }
[ "public", "function", "setFilters", "(", "array", "$", "filters", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "filters", ")", ")", "{", "$", "this", "->", "filters", "=", "$", "this", "->", "getDefaultFilters", "(", ")", ";", "}", "$", "t...
Set filters. @param array $filters @return self
[ "Set", "filters", "." ]
e21990ce6d881366d52a7f4e5040b07cc3ecca96
https://github.com/ARCANEDEV/Sanitizer/blob/e21990ce6d881366d52a7f4e5040b07cc3ecca96/src/Sanitizer.php#L59-L70
18,179
ARCANEDEV/Sanitizer
src/Sanitizer.php
Sanitizer.sanitize
public function sanitize(array $data, array $rules = [], array $filters = []) { $this->setRules($rules); $this->setFilters($filters); foreach ($data as $name => $value) { $data[$name] = $this->sanitizeAttribute($name, $value); } return $data; }
php
public function sanitize(array $data, array $rules = [], array $filters = []) { $this->setRules($rules); $this->setFilters($filters); foreach ($data as $name => $value) { $data[$name] = $this->sanitizeAttribute($name, $value); } return $data; }
[ "public", "function", "sanitize", "(", "array", "$", "data", ",", "array", "$", "rules", "=", "[", "]", ",", "array", "$", "filters", "=", "[", "]", ")", "{", "$", "this", "->", "setRules", "(", "$", "rules", ")", ";", "$", "this", "->", "setFilt...
Sanitize the given data. @param array $data @param array $rules @param array $filters @return array
[ "Sanitize", "the", "given", "data", "." ]
e21990ce6d881366d52a7f4e5040b07cc3ecca96
https://github.com/ARCANEDEV/Sanitizer/blob/e21990ce6d881366d52a7f4e5040b07cc3ecca96/src/Sanitizer.php#L99-L109
18,180
ARCANEDEV/Sanitizer
src/Sanitizer.php
Sanitizer.sanitizeAttribute
protected function sanitizeAttribute($attribute, $value) { foreach ($this->rules->get($attribute) as $rule) { $value = $this->applyFilter($rule['name'], $value, $rule['options']); } return $value; }
php
protected function sanitizeAttribute($attribute, $value) { foreach ($this->rules->get($attribute) as $rule) { $value = $this->applyFilter($rule['name'], $value, $rule['options']); } return $value; }
[ "protected", "function", "sanitizeAttribute", "(", "$", "attribute", ",", "$", "value", ")", "{", "foreach", "(", "$", "this", "->", "rules", "->", "get", "(", "$", "attribute", ")", "as", "$", "rule", ")", "{", "$", "value", "=", "$", "this", "->", ...
Sanitize the given attribute @param string $attribute @param mixed $value @return mixed
[ "Sanitize", "the", "given", "attribute" ]
e21990ce6d881366d52a7f4e5040b07cc3ecca96
https://github.com/ARCANEDEV/Sanitizer/blob/e21990ce6d881366d52a7f4e5040b07cc3ecca96/src/Sanitizer.php#L119-L126
18,181
ARCANEDEV/Sanitizer
src/Sanitizer.php
Sanitizer.applyFilter
protected function applyFilter($name, $value, $options = []) { $this->hasFilter($name); if (empty($value)) return $value; $filter = $this->filters[$name]; if ($filter instanceof Closure) { return call_user_func_array($filter, compact('value', 'options')); } ...
php
protected function applyFilter($name, $value, $options = []) { $this->hasFilter($name); if (empty($value)) return $value; $filter = $this->filters[$name]; if ($filter instanceof Closure) { return call_user_func_array($filter, compact('value', 'options')); } ...
[ "protected", "function", "applyFilter", "(", "$", "name", ",", "$", "value", ",", "$", "options", "=", "[", "]", ")", "{", "$", "this", "->", "hasFilter", "(", "$", "name", ")", ";", "if", "(", "empty", "(", "$", "value", ")", ")", "return", "$",...
Apply the given filter by its name. @param string $name @param mixed $value @param array $options @return mixed
[ "Apply", "the", "given", "filter", "by", "its", "name", "." ]
e21990ce6d881366d52a7f4e5040b07cc3ecca96
https://github.com/ARCANEDEV/Sanitizer/blob/e21990ce6d881366d52a7f4e5040b07cc3ecca96/src/Sanitizer.php#L137-L153
18,182
ARCANEDEV/Sanitizer
src/Sanitizer.php
Sanitizer.getDefaultFilters
private function getDefaultFilters() { return [ 'capitalize' => Filters\CapitalizeFilter::class, 'email' => Filters\EmailFilter::class, 'escape' => Filters\EscapeFilter::class, 'format_date' => Filters\FormatDateFilter::class, 'lowercas...
php
private function getDefaultFilters() { return [ 'capitalize' => Filters\CapitalizeFilter::class, 'email' => Filters\EmailFilter::class, 'escape' => Filters\EscapeFilter::class, 'format_date' => Filters\FormatDateFilter::class, 'lowercas...
[ "private", "function", "getDefaultFilters", "(", ")", "{", "return", "[", "'capitalize'", "=>", "Filters", "\\", "CapitalizeFilter", "::", "class", ",", "'email'", "=>", "Filters", "\\", "EmailFilter", "::", "class", ",", "'escape'", "=>", "Filters", "\\", "Es...
Get default filters. @return array
[ "Get", "default", "filters", "." ]
e21990ce6d881366d52a7f4e5040b07cc3ecca96
https://github.com/ARCANEDEV/Sanitizer/blob/e21990ce6d881366d52a7f4e5040b07cc3ecca96/src/Sanitizer.php#L184-L197
18,183
webforge-labs/psc-cms
lib/Psc/URL/Helper.php
Helper.getURL
public static function getURL($section, $flags = 0x000000, Array $queryVars = array()) { /* Query Vars Handling */ if ($section === NULL) { $url = $_SERVER['PHP_SELF']; // da bin ich mir hier noch nicht ganz sicher if (!isset($_SERVER['PHP_SELF'])) { throw new \Psc\Exception('SERVE...
php
public static function getURL($section, $flags = 0x000000, Array $queryVars = array()) { /* Query Vars Handling */ if ($section === NULL) { $url = $_SERVER['PHP_SELF']; // da bin ich mir hier noch nicht ganz sicher if (!isset($_SERVER['PHP_SELF'])) { throw new \Psc\Exception('SERVE...
[ "public", "static", "function", "getURL", "(", "$", "section", ",", "$", "flags", "=", "0x000000", ",", "Array", "$", "queryVars", "=", "array", "(", ")", ")", "{", "/*\n Query Vars Handling\n */", "if", "(", "$", "section", "===", "NULL", ")", "{"...
Konstruiert eine URL @param string|NULL|\Psc\URL\Routable $section wenn $section NULL ist, wird der Teil dynamisch bestimmt (aktuelle Seite)
[ "Konstruiert", "eine", "URL" ]
467bfa2547e6b4fa487d2d7f35fa6cc618dbc763
https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/URL/Helper.php#L54-L91
18,184
infinity-next/braintree
src/BraintreeGateway.php
BraintreeGateway.create
public function create($token, array $properties = array(), $customer = null) { $parameters = array_merge([ 'paymentMethodNonce' => $token, ], $properties); $response = BraintreeCustomer::create($parameters); return $response; }
php
public function create($token, array $properties = array(), $customer = null) { $parameters = array_merge([ 'paymentMethodNonce' => $token, ], $properties); $response = BraintreeCustomer::create($parameters); return $response; }
[ "public", "function", "create", "(", "$", "token", ",", "array", "$", "properties", "=", "array", "(", ")", ",", "$", "customer", "=", "null", ")", "{", "$", "parameters", "=", "array_merge", "(", "[", "'paymentMethodNonce'", "=>", "$", "token", ",", "...
Subscribe to the plan for the first time. @param string $token @param array $properties @param object|null $customer @return void
[ "Subscribe", "to", "the", "plan", "for", "the", "first", "time", "." ]
4bf6f49d4d8a05734a295003137f360e331cc10f
https://github.com/infinity-next/braintree/blob/4bf6f49d4d8a05734a295003137f360e331cc10f/src/BraintreeGateway.php#L124-L134
18,185
steeffeen/FancyManiaLinks
FML/Script/Features/RadioButtonGroupFeature.php
RadioButtonGroupFeature.addRadioButton
public function addRadioButton(CheckBox $radioButton) { if (!in_array($radioButton, $this->radioButtons, true)) { array_push($this->radioButtons, $radioButton); } return $this; }
php
public function addRadioButton(CheckBox $radioButton) { if (!in_array($radioButton, $this->radioButtons, true)) { array_push($this->radioButtons, $radioButton); } return $this; }
[ "public", "function", "addRadioButton", "(", "CheckBox", "$", "radioButton", ")", "{", "if", "(", "!", "in_array", "(", "$", "radioButton", ",", "$", "this", "->", "radioButtons", ",", "true", ")", ")", "{", "array_push", "(", "$", "this", "->", "radioBu...
Add a new RadioButton @api @param CheckBox $radioButton RadioButton @return static
[ "Add", "a", "new", "RadioButton" ]
227b0759306f0a3c75873ba50276e4163a93bfa6
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Script/Features/RadioButtonGroupFeature.php#L106-L112
18,186
steeffeen/FancyManiaLinks
FML/Script/Features/RadioButtonGroupFeature.php
RadioButtonGroupFeature.prepareRadioButtonIdsConstant
protected function prepareRadioButtonIdsConstant(Script $script) { $radioButtonIds = array(); foreach ($this->radioButtons as $radioButton) { $radioButtonIds[$radioButton->getName()] = Builder::getId($radioButton->getQuad()); } $script->addScriptConstant($this->getRadioBu...
php
protected function prepareRadioButtonIdsConstant(Script $script) { $radioButtonIds = array(); foreach ($this->radioButtons as $radioButton) { $radioButtonIds[$radioButton->getName()] = Builder::getId($radioButton->getQuad()); } $script->addScriptConstant($this->getRadioBu...
[ "protected", "function", "prepareRadioButtonIdsConstant", "(", "Script", "$", "script", ")", "{", "$", "radioButtonIds", "=", "array", "(", ")", ";", "foreach", "(", "$", "this", "->", "radioButtons", "as", "$", "radioButton", ")", "{", "$", "radioButtonIds", ...
Prepare the Constant containing the RadioButton Ids @param Script $script Script @return static
[ "Prepare", "the", "Constant", "containing", "the", "RadioButton", "Ids" ]
227b0759306f0a3c75873ba50276e4163a93bfa6
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Script/Features/RadioButtonGroupFeature.php#L171-L179
18,187
steeffeen/FancyManiaLinks
FML/Script/Features/RadioButtonGroupFeature.php
RadioButtonGroupFeature.prepareOnRadioButtonClickFunction
protected function prepareOnRadioButtonClickFunction(Script $script) { $script->addScriptFunction(self::FUNCTION_ON_RADIO_BUTTON_CLICK, " Void " . self::FUNCTION_ON_RADIO_BUTTON_CLICK . "(CMlQuad _RadioButtonQuad, CMlEntry _RadioButtonGroupEntry, Text[Text] _RadioButtonIds) { // update group entry with ...
php
protected function prepareOnRadioButtonClickFunction(Script $script) { $script->addScriptFunction(self::FUNCTION_ON_RADIO_BUTTON_CLICK, " Void " . self::FUNCTION_ON_RADIO_BUTTON_CLICK . "(CMlQuad _RadioButtonQuad, CMlEntry _RadioButtonGroupEntry, Text[Text] _RadioButtonIds) { // update group entry with ...
[ "protected", "function", "prepareOnRadioButtonClickFunction", "(", "Script", "$", "script", ")", "{", "$", "script", "->", "addScriptFunction", "(", "self", "::", "FUNCTION_ON_RADIO_BUTTON_CLICK", ",", "\"\nVoid \"", ".", "self", "::", "FUNCTION_ON_RADIO_BUTTON_CLICK", ...
Build the RadioButton click handler function @param Script $script Script @return static
[ "Build", "the", "RadioButton", "click", "handler", "function" ]
227b0759306f0a3c75873ba50276e4163a93bfa6
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Script/Features/RadioButtonGroupFeature.php#L187-L214
18,188
steeffeen/FancyManiaLinks
FML/Script/Features/RadioButtonGroupFeature.php
RadioButtonGroupFeature.prepareRadioButtonClickScript
protected function prepareRadioButtonClickScript(Script $script) { $script->appendGenericScriptLabel(ScriptLabel::MOUSECLICK2, " if (" . $this->getRadioButtonIdsConstantName() . ".exists(Event.ControlId)) { declare RadioButtonQuad <=> (Event.Control as CMlQuad); declare RadioButtonGroupEntry <=> (Page.Get...
php
protected function prepareRadioButtonClickScript(Script $script) { $script->appendGenericScriptLabel(ScriptLabel::MOUSECLICK2, " if (" . $this->getRadioButtonIdsConstantName() . ".exists(Event.ControlId)) { declare RadioButtonQuad <=> (Event.Control as CMlQuad); declare RadioButtonGroupEntry <=> (Page.Get...
[ "protected", "function", "prepareRadioButtonClickScript", "(", "Script", "$", "script", ")", "{", "$", "script", "->", "appendGenericScriptLabel", "(", "ScriptLabel", "::", "MOUSECLICK2", ",", "\"\nif (\"", ".", "$", "this", "->", "getRadioButtonIdsConstantName", "(",...
Prepare the script for RadioButton clicks @param Script $script Script @return static
[ "Prepare", "the", "script", "for", "RadioButton", "clicks" ]
227b0759306f0a3c75873ba50276e4163a93bfa6
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Script/Features/RadioButtonGroupFeature.php#L222-L231
18,189
parsnick/steak
src/Application.php
Application.configureOutput
protected function configureOutput() { $this->output = new ConsoleOutput(); $this->output->getFormatter()->setStyle('path', new OutputFormatterStyle('green', null, ['bold'])); $this->output->getFormatter()->setStyle('time', new OutputFormatterStyle('cyan', null, ['bold'])); $this->o...
php
protected function configureOutput() { $this->output = new ConsoleOutput(); $this->output->getFormatter()->setStyle('path', new OutputFormatterStyle('green', null, ['bold'])); $this->output->getFormatter()->setStyle('time', new OutputFormatterStyle('cyan', null, ['bold'])); $this->o...
[ "protected", "function", "configureOutput", "(", ")", "{", "$", "this", "->", "output", "=", "new", "ConsoleOutput", "(", ")", ";", "$", "this", "->", "output", "->", "getFormatter", "(", ")", "->", "setStyle", "(", "'path'", ",", "new", "OutputFormatterSt...
Configure the console output with custom styles.
[ "Configure", "the", "console", "output", "with", "custom", "styles", "." ]
461869189a640938438187330f6c50aca97c5ccc
https://github.com/parsnick/steak/blob/461869189a640938438187330f6c50aca97c5ccc/src/Application.php#L67-L74
18,190
parsnick/steak
src/Application.php
Application.loadExternalConfig
protected function loadExternalConfig() { $config = new Repository(static::getDefaultConfig()); $filesystem = new Filesystem(); foreach ($this->getConfigFiles($filesystem) as $filename) { $this->output->writeln("<info>Reading config from <path>{$filename}</path></info>"); ...
php
protected function loadExternalConfig() { $config = new Repository(static::getDefaultConfig()); $filesystem = new Filesystem(); foreach ($this->getConfigFiles($filesystem) as $filename) { $this->output->writeln("<info>Reading config from <path>{$filename}</path></info>"); ...
[ "protected", "function", "loadExternalConfig", "(", ")", "{", "$", "config", "=", "new", "Repository", "(", "static", "::", "getDefaultConfig", "(", ")", ")", ";", "$", "filesystem", "=", "new", "Filesystem", "(", ")", ";", "foreach", "(", "$", "this", "...
Load the external config files specified by the command line option.
[ "Load", "the", "external", "config", "files", "specified", "by", "the", "command", "line", "option", "." ]
461869189a640938438187330f6c50aca97c5ccc
https://github.com/parsnick/steak/blob/461869189a640938438187330f6c50aca97c5ccc/src/Application.php#L80-L99
18,191
parsnick/steak
src/Application.php
Application.getConfigFiles
protected function getConfigFiles($files, array $defaults = ['steak.yml', 'steak.php']) { $option = (new ArgvInput())->getParameterOption(['--config', '-c']); if ( ! $option) { foreach ($defaults as $default) { if ($files->exists($default)) { $option ...
php
protected function getConfigFiles($files, array $defaults = ['steak.yml', 'steak.php']) { $option = (new ArgvInput())->getParameterOption(['--config', '-c']); if ( ! $option) { foreach ($defaults as $default) { if ($files->exists($default)) { $option ...
[ "protected", "function", "getConfigFiles", "(", "$", "files", ",", "array", "$", "defaults", "=", "[", "'steak.yml'", ",", "'steak.php'", "]", ")", "{", "$", "option", "=", "(", "new", "ArgvInput", "(", ")", ")", "->", "getParameterOption", "(", "[", "'-...
Parse the command line option for config file to use. Multiple files can be given as a comma-separated list. If no option is given, defaults as used. @param Filesystem $files @param array $defaults @return array
[ "Parse", "the", "command", "line", "option", "for", "config", "file", "to", "use", "." ]
461869189a640938438187330f6c50aca97c5ccc
https://github.com/parsnick/steak/blob/461869189a640938438187330f6c50aca97c5ccc/src/Application.php#L111-L124
18,192
parsnick/steak
src/Application.php
Application.registerCommand
public function registerCommand($commandClass) { $command = $this->container->make($commandClass); $command->setContainer($this->container); return $this->symfony->add($command); }
php
public function registerCommand($commandClass) { $command = $this->container->make($commandClass); $command->setContainer($this->container); return $this->symfony->add($command); }
[ "public", "function", "registerCommand", "(", "$", "commandClass", ")", "{", "$", "command", "=", "$", "this", "->", "container", "->", "make", "(", "$", "commandClass", ")", ";", "$", "command", "->", "setContainer", "(", "$", "this", "->", "container", ...
Register a single command. @param string $commandClass @return \Symfony\Component\Console\Command\Command
[ "Register", "a", "single", "command", "." ]
461869189a640938438187330f6c50aca97c5ccc
https://github.com/parsnick/steak/blob/461869189a640938438187330f6c50aca97c5ccc/src/Application.php#L159-L166
18,193
steeffeen/FancyManiaLinks
FML/Script/Script.php
Script.setScriptInclude
public function setScriptInclude($file, $namespace = null) { if ($file instanceof ScriptInclude) { $scriptInclude = $file; } else { $scriptInclude = new ScriptInclude($file, $namespace); } $this->includes[$scriptInclude->getNamespace()] = $scriptInclude; ...
php
public function setScriptInclude($file, $namespace = null) { if ($file instanceof ScriptInclude) { $scriptInclude = $file; } else { $scriptInclude = new ScriptInclude($file, $namespace); } $this->includes[$scriptInclude->getNamespace()] = $scriptInclude; ...
[ "public", "function", "setScriptInclude", "(", "$", "file", ",", "$", "namespace", "=", "null", ")", "{", "if", "(", "$", "file", "instanceof", "ScriptInclude", ")", "{", "$", "scriptInclude", "=", "$", "file", ";", "}", "else", "{", "$", "scriptInclude"...
Set a Script Include @api @param string|ScriptInclude $file Include file or ScriptInclude @param string $namespace Include namespace @return static
[ "Set", "a", "Script", "Include" ]
227b0759306f0a3c75873ba50276e4163a93bfa6
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Script/Script.php#L75-L84
18,194
steeffeen/FancyManiaLinks
FML/Script/Script.php
Script.addScriptConstant
public function addScriptConstant($name, $value = null) { if ($name instanceof ScriptConstant) { $scriptConstant = $name; } else { $scriptConstant = new ScriptConstant($name, $value); } if (!in_array($scriptConstant, $this->constants)) { array_push...
php
public function addScriptConstant($name, $value = null) { if ($name instanceof ScriptConstant) { $scriptConstant = $name; } else { $scriptConstant = new ScriptConstant($name, $value); } if (!in_array($scriptConstant, $this->constants)) { array_push...
[ "public", "function", "addScriptConstant", "(", "$", "name", ",", "$", "value", "=", "null", ")", "{", "if", "(", "$", "name", "instanceof", "ScriptConstant", ")", "{", "$", "scriptConstant", "=", "$", "name", ";", "}", "else", "{", "$", "scriptConstant"...
Add a Script Constant @api @param string|ScriptConstant $name Constant name or ScriptConstant @param string $value Constant value @return static
[ "Add", "a", "Script", "Constant" ]
227b0759306f0a3c75873ba50276e4163a93bfa6
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Script/Script.php#L104-L115
18,195
steeffeen/FancyManiaLinks
FML/Script/Script.php
Script.addScriptFunction
public function addScriptFunction($name, $text = null) { if ($name instanceof ScriptFunction) { $scriptFunction = $name; } else { $scriptFunction = new ScriptFunction($name, $text); } if (!in_array($scriptFunction, $this->functions)) { array_push($...
php
public function addScriptFunction($name, $text = null) { if ($name instanceof ScriptFunction) { $scriptFunction = $name; } else { $scriptFunction = new ScriptFunction($name, $text); } if (!in_array($scriptFunction, $this->functions)) { array_push($...
[ "public", "function", "addScriptFunction", "(", "$", "name", ",", "$", "text", "=", "null", ")", "{", "if", "(", "$", "name", "instanceof", "ScriptFunction", ")", "{", "$", "scriptFunction", "=", "$", "name", ";", "}", "else", "{", "$", "scriptFunction",...
Add a Script Function @api @param string|ScriptFunction $name Function name or ScriptFunction @param string $text Function text @return static
[ "Add", "a", "Script", "Function" ]
227b0759306f0a3c75873ba50276e4163a93bfa6
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Script/Script.php#L135-L146
18,196
steeffeen/FancyManiaLinks
FML/Script/Script.php
Script.addCustomScriptLabel
public function addCustomScriptLabel($name, $text = null) { if ($name instanceof ScriptLabel) { $scriptLabel = $name; } else { $scriptLabel = new ScriptLabel($name, $text); } if (!in_array($scriptLabel, $this->customLabels)) { array_push($this->cus...
php
public function addCustomScriptLabel($name, $text = null) { if ($name instanceof ScriptLabel) { $scriptLabel = $name; } else { $scriptLabel = new ScriptLabel($name, $text); } if (!in_array($scriptLabel, $this->customLabels)) { array_push($this->cus...
[ "public", "function", "addCustomScriptLabel", "(", "$", "name", ",", "$", "text", "=", "null", ")", "{", "if", "(", "$", "name", "instanceof", "ScriptLabel", ")", "{", "$", "scriptLabel", "=", "$", "name", ";", "}", "else", "{", "$", "scriptLabel", "="...
Add a custom Script text @api @param string|ScriptLabel $name Label name or ScriptLabel @param string $text Script text @return static
[ "Add", "a", "custom", "Script", "text" ]
227b0759306f0a3c75873ba50276e4163a93bfa6
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Script/Script.php#L156-L167
18,197
steeffeen/FancyManiaLinks
FML/Script/Script.php
Script.appendGenericScriptLabel
public function appendGenericScriptLabel($name, $text = null, $isolated = false) { if ($name instanceof ScriptLabel) { $scriptLabel = $name; } else { $scriptLabel = new ScriptLabel($name, $text, $isolated); } if (!in_array($scriptLabel, $this->genericLabels)) ...
php
public function appendGenericScriptLabel($name, $text = null, $isolated = false) { if ($name instanceof ScriptLabel) { $scriptLabel = $name; } else { $scriptLabel = new ScriptLabel($name, $text, $isolated); } if (!in_array($scriptLabel, $this->genericLabels)) ...
[ "public", "function", "appendGenericScriptLabel", "(", "$", "name", ",", "$", "text", "=", "null", ",", "$", "isolated", "=", "false", ")", "{", "if", "(", "$", "name", "instanceof", "ScriptLabel", ")", "{", "$", "scriptLabel", "=", "$", "name", ";", "...
Append a generic Script text for the next rendering @TODO: get rid of generic script labels approach @param string|ScriptLabel $name Label name or ScriptLabel @param string $text Script text @param bool $isolated (optional) Whether to isolate the Label Script @return static
[ "Append", "a", "generic", "Script", "text", "for", "the", "next", "rendering" ]
227b0759306f0a3c75873ba50276e4163a93bfa6
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Script/Script.php#L188-L199
18,198
steeffeen/FancyManiaLinks
FML/Script/Script.php
Script.addFeature
public function addFeature(ScriptFeature $feature) { if (!in_array($feature, $this->features, true)) { array_push($this->features, $feature); } return $this; }
php
public function addFeature(ScriptFeature $feature) { if (!in_array($feature, $this->features, true)) { array_push($this->features, $feature); } return $this; }
[ "public", "function", "addFeature", "(", "ScriptFeature", "$", "feature", ")", "{", "if", "(", "!", "in_array", "(", "$", "feature", ",", "$", "this", "->", "features", ",", "true", ")", ")", "{", "array_push", "(", "$", "this", "->", "features", ",", ...
Add a Script Feature @api @param ScriptFeature $feature Script Feature @return static
[ "Add", "a", "Script", "Feature" ]
227b0759306f0a3c75873ba50276e4163a93bfa6
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Script/Script.php#L220-L226
18,199
steeffeen/FancyManiaLinks
FML/Script/Script.php
Script.buildScriptText
public function buildScriptText() { $scriptText = PHP_EOL; $scriptText .= $this->getHeaderComment(); $scriptText .= $this->getIncludes(); $scriptText .= $this->getConstants(); $scriptText .= $this->getFunctions(); $scriptText .= $this->getLabels(); $scriptText...
php
public function buildScriptText() { $scriptText = PHP_EOL; $scriptText .= $this->getHeaderComment(); $scriptText .= $this->getIncludes(); $scriptText .= $this->getConstants(); $scriptText .= $this->getFunctions(); $scriptText .= $this->getLabels(); $scriptText...
[ "public", "function", "buildScriptText", "(", ")", "{", "$", "scriptText", "=", "PHP_EOL", ";", "$", "scriptText", ".=", "$", "this", "->", "getHeaderComment", "(", ")", ";", "$", "scriptText", ".=", "$", "this", "->", "getIncludes", "(", ")", ";", "$", ...
Build the complete Script text @return string
[ "Build", "the", "complete", "Script", "text" ]
227b0759306f0a3c75873ba50276e4163a93bfa6
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Script/Script.php#L272-L282