id
int32
0
241k
repo
stringlengths
6
63
path
stringlengths
5
140
func_name
stringlengths
3
151
original_string
stringlengths
84
13k
language
stringclasses
1 value
code
stringlengths
84
13k
code_tokens
list
docstring
stringlengths
3
47.2k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
91
247
199,600
MetaModels/phpunit-contao-database
src/Contao/Database/FakeQuery.php
FakeQuery.matches
public function matches($sqlQuery) { if (empty($this->compiledQuery)) { $this->compileQuery(); } return $sqlQuery === $this->compiledQuery; }
php
public function matches($sqlQuery) { if (empty($this->compiledQuery)) { $this->compileQuery(); } return $sqlQuery === $this->compiledQuery; }
[ "public", "function", "matches", "(", "$", "sqlQuery", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "compiledQuery", ")", ")", "{", "$", "this", "->", "compileQuery", "(", ")", ";", "}", "return", "$", "sqlQuery", "===", "$", "this", "->", ...
Check if the query matches against the query and parameters. @param string $sqlQuery The query to match against. @return bool
[ "Check", "if", "the", "query", "matches", "against", "the", "query", "and", "parameters", "." ]
aeb2ee10dac532fa73e2deb6457b6a167a1c01c7
https://github.com/MetaModels/phpunit-contao-database/blob/aeb2ee10dac532fa73e2deb6457b6a167a1c01c7/src/Contao/Database/FakeQuery.php#L241-L248
199,601
bfansports/CloudProcessingEngine-Client-SDK-PHP
src/SA/CpeClientSdk.php
CpeClientSdk.receive_message
public function receive_message($client, $timeout) { $decodedClient = is_object($client) ? $client : json_decode($client); $queue = $decodedClient->{'queues'}->{'output'}; if ($this->debug) $this->log_out( "DEBUG", "Polling from '$queue' ..." ...
php
public function receive_message($client, $timeout) { $decodedClient = is_object($client) ? $client : json_decode($client); $queue = $decodedClient->{'queues'}->{'output'}; if ($this->debug) $this->log_out( "DEBUG", "Polling from '$queue' ..." ...
[ "public", "function", "receive_message", "(", "$", "client", ",", "$", "timeout", ")", "{", "$", "decodedClient", "=", "is_object", "(", "$", "client", ")", "?", "$", "client", ":", "json_decode", "(", "$", "client", ")", ";", "$", "queue", "=", "$", ...
Poll for incoming SQS messages using this method. Call this method in a loop in your client application. If a new message is polled, it is returned to the caller. @param string|object $client JSON string or PHP Object created using json_decode. This contains your client SQS configuration which list your application `...
[ "Poll", "for", "incoming", "SQS", "messages", "using", "this", "method", "." ]
f6336a53da81d1a1b4b7079dd4280344db452e67
https://github.com/bfansports/CloudProcessingEngine-Client-SDK-PHP/blob/f6336a53da81d1a1b4b7079dd4280344db452e67/src/SA/CpeClientSdk.php#L118-L149
199,602
bfansports/CloudProcessingEngine-Client-SDK-PHP
src/SA/CpeClientSdk.php
CpeClientSdk.delete_message
public function delete_message($client, $msg) { $decodedClient = is_object($client) ? $client : json_decode($client); $this->sqs->deleteMessage(array( 'QueueUrl' => $decodedClient->{'queues'}->{'output'}, 'ReceiptHandle' => $msg['ReceiptHandle'])); ...
php
public function delete_message($client, $msg) { $decodedClient = is_object($client) ? $client : json_decode($client); $this->sqs->deleteMessage(array( 'QueueUrl' => $decodedClient->{'queues'}->{'output'}, 'ReceiptHandle' => $msg['ReceiptHandle'])); ...
[ "public", "function", "delete_message", "(", "$", "client", ",", "$", "msg", ")", "{", "$", "decodedClient", "=", "is_object", "(", "$", "client", ")", "?", "$", "client", ":", "json_decode", "(", "$", "client", ")", ";", "$", "this", "->", "sqs", "-...
Delete the provided message from the SQS queue Call this method from your client application after receiving a message You must clean the SQS yourself, or you will keep processing the same messages @param string|object $client JSON string or PHP Object created using json_decode. This contains your client SQS configur...
[ "Delete", "the", "provided", "message", "from", "the", "SQS", "queue" ]
f6336a53da81d1a1b4b7079dd4280344db452e67
https://github.com/bfansports/CloudProcessingEngine-Client-SDK-PHP/blob/f6336a53da81d1a1b4b7079dd4280344db452e67/src/SA/CpeClientSdk.php#L162-L170
199,603
bfansports/CloudProcessingEngine-Client-SDK-PHP
src/SA/CpeClientSdk.php
CpeClientSdk.start_job
public function start_job($client, $input, $jobId = null) { $decodedClient = is_object($client) ? $client : json_decode($client); $decodedInput = is_object($input) ? $input : json_decode($input); if (!$decodedClient) { throw new \InvalidArgumentException( "Invali...
php
public function start_job($client, $input, $jobId = null) { $decodedClient = is_object($client) ? $client : json_decode($client); $decodedInput = is_object($input) ? $input : json_decode($input); if (!$decodedClient) { throw new \InvalidArgumentException( "Invali...
[ "public", "function", "start_job", "(", "$", "client", ",", "$", "input", ",", "$", "jobId", "=", "null", ")", "{", "$", "decodedClient", "=", "is_object", "(", "$", "client", ")", "?", "$", "client", ":", "json_decode", "(", "$", "client", ")", ";",...
Send a `start_job` command to CPE Call this method from your client application to start a new job. You can pass an object or a JSON string as input payload. You can also specify your own jobId, or it will generate it for you. @param string|object $client JSON string or PHP Object created using json_decode. This cont...
[ "Send", "a", "start_job", "command", "to", "CPE" ]
f6336a53da81d1a1b4b7079dd4280344db452e67
https://github.com/bfansports/CloudProcessingEngine-Client-SDK-PHP/blob/f6336a53da81d1a1b4b7079dd4280344db452e67/src/SA/CpeClientSdk.php#L186-L216
199,604
bfansports/CloudProcessingEngine-Client-SDK-PHP
src/SA/CpeClientSdk.php
CpeClientSdk.craft_new_msg
private function craft_new_msg($type, $jobId, $client, $data) { // Add client info to data $data->{'client'} = $client; // Build msg to send out $msg = array( 'time' => microtime(true), 'type' => $type, 'jobId' => $jobId, 'data' ...
php
private function craft_new_msg($type, $jobId, $client, $data) { // Add client info to data $data->{'client'} = $client; // Build msg to send out $msg = array( 'time' => microtime(true), 'type' => $type, 'jobId' => $jobId, 'data' ...
[ "private", "function", "craft_new_msg", "(", "$", "type", ",", "$", "jobId", ",", "$", "client", ",", "$", "data", ")", "{", "// Add client info to data", "$", "data", "->", "{", "'client'", "}", "=", "$", "client", ";", "// Build msg to send out", "$", "m...
Craft the object to be sent out to SQS @param string $type Type of CPE command you send @param string $jobId Job ID for the command @param string $data Data payload to be sent out
[ "Craft", "the", "object", "to", "be", "sent", "out", "to", "SQS" ]
f6336a53da81d1a1b4b7079dd4280344db452e67
https://github.com/bfansports/CloudProcessingEngine-Client-SDK-PHP/blob/f6336a53da81d1a1b4b7079dd4280344db452e67/src/SA/CpeClientSdk.php#L244-L257
199,605
bfansports/CloudProcessingEngine-Client-SDK-PHP
src/SA/CpeClientSdk.php
CpeClientSdk.validate_client
private function validate_client($client) { if (!isset($client->{"name"})) throw new \Exception("'client' has no 'name'!"); if (!isset($client->{"queues"})) throw new \Exception("'client' has no 'queues'!"); if (!isset($client->{"queues"}->{'input'})) thro...
php
private function validate_client($client) { if (!isset($client->{"name"})) throw new \Exception("'client' has no 'name'!"); if (!isset($client->{"queues"})) throw new \Exception("'client' has no 'queues'!"); if (!isset($client->{"queues"}->{'input'})) thro...
[ "private", "function", "validate_client", "(", "$", "client", ")", "{", "if", "(", "!", "isset", "(", "$", "client", "->", "{", "\"name\"", "}", ")", ")", "throw", "new", "\\", "Exception", "(", "\"'client' has no 'name'!\"", ")", ";", "if", "(", "!", ...
Validate Client object structure @param string|object $client JSON string or PHP Object created using json_decode. This contains your client SQS configuration which list your application `input` and `output` queues.
[ "Validate", "Client", "object", "structure" ]
f6336a53da81d1a1b4b7079dd4280344db452e67
https://github.com/bfansports/CloudProcessingEngine-Client-SDK-PHP/blob/f6336a53da81d1a1b4b7079dd4280344db452e67/src/SA/CpeClientSdk.php#L264-L274
199,606
SagittariusX/Beluga.Drawing
src/Beluga/Drawing/ColorTool.php
ColorTool.Color2Rgb
public static function Color2Rgb( $colorDefinition ) { if ( \is_array( $colorDefinition ) ) { if ( \count( $colorDefinition ) > 2 && \count( $colorDefinition ) < 5 ) { return $colorDefinition; } throw new ArgumentError( 'colorDefinition', ...
php
public static function Color2Rgb( $colorDefinition ) { if ( \is_array( $colorDefinition ) ) { if ( \count( $colorDefinition ) > 2 && \count( $colorDefinition ) < 5 ) { return $colorDefinition; } throw new ArgumentError( 'colorDefinition', ...
[ "public", "static", "function", "Color2Rgb", "(", "$", "colorDefinition", ")", "{", "if", "(", "\\", "is_array", "(", "$", "colorDefinition", ")", ")", "{", "if", "(", "\\", "count", "(", "$", "colorDefinition", ")", ">", "2", "&&", "\\", "count", "(",...
Converts the defined color into a RGB color definition (a numeric indicated array 0=R 1=G 2=B @param string|array $colorDefinition Color name or hexadecimal color definition @return array Or boolean FALSE @throws \Beluga\ArgumentError
[ "Converts", "the", "defined", "color", "into", "a", "RGB", "color", "definition", "(", "a", "numeric", "indicated", "array", "0", "=", "R", "1", "=", "G", "2", "=", "B" ]
9c82874cf4ec68cb0af78757b65f19783540004a
https://github.com/SagittariusX/Beluga.Drawing/blob/9c82874cf4ec68cb0af78757b65f19783540004a/src/Beluga/Drawing/ColorTool.php#L198-L234
199,607
SagittariusX/Beluga.Drawing
src/Beluga/Drawing/ColorTool.php
ColorTool.Color2Hex
public static function Color2Hex( $colorDefinition ) { if ( \is_array( $colorDefinition ) ) { if ( \count( $colorDefinition ) != 3 ) { throw new ArgumentError( 'colorDefinition', $colorDefinition, 'Drawing', 'A rgb...
php
public static function Color2Hex( $colorDefinition ) { if ( \is_array( $colorDefinition ) ) { if ( \count( $colorDefinition ) != 3 ) { throw new ArgumentError( 'colorDefinition', $colorDefinition, 'Drawing', 'A rgb...
[ "public", "static", "function", "Color2Hex", "(", "$", "colorDefinition", ")", "{", "if", "(", "\\", "is_array", "(", "$", "colorDefinition", ")", ")", "{", "if", "(", "\\", "count", "(", "$", "colorDefinition", ")", "!=", "3", ")", "{", "throw", "new"...
Converts the defined Color definition into hexadecimal representation. @param string|array $colorDefinition Color name, RGB color array or Hex color definition @return string|FALSE @throws \Beluga\ArgumentError
[ "Converts", "the", "defined", "Color", "definition", "into", "hexadecimal", "representation", "." ]
9c82874cf4ec68cb0af78757b65f19783540004a
https://github.com/SagittariusX/Beluga.Drawing/blob/9c82874cf4ec68cb0af78757b65f19783540004a/src/Beluga/Drawing/ColorTool.php#L243-L279
199,608
SagittariusX/Beluga.Drawing
src/Beluga/Drawing/ColorTool.php
ColorTool.Hex2Rgb
public static function Hex2Rgb( string $color ) { if ( $color[ 0 ] == '#' ) { $color = \substr( $color, 1 ); } if ( \strlen( $color ) == 8 ) { $color = \substr( $color, 2 ); } if ( \strlen( $color ) == 6 ) { $r = $color[ 0 ] . $color[ 1 ];...
php
public static function Hex2Rgb( string $color ) { if ( $color[ 0 ] == '#' ) { $color = \substr( $color, 1 ); } if ( \strlen( $color ) == 8 ) { $color = \substr( $color, 2 ); } if ( \strlen( $color ) == 6 ) { $r = $color[ 0 ] . $color[ 1 ];...
[ "public", "static", "function", "Hex2Rgb", "(", "string", "$", "color", ")", "{", "if", "(", "$", "color", "[", "0", "]", "==", "'#'", ")", "{", "$", "color", "=", "\\", "substr", "(", "$", "color", ",", "1", ")", ";", "}", "if", "(", "\\", "...
Convert a color from hexadecimal notation to RGB array. @param string $color @return array|bool
[ "Convert", "a", "color", "from", "hexadecimal", "notation", "to", "RGB", "array", "." ]
9c82874cf4ec68cb0af78757b65f19783540004a
https://github.com/SagittariusX/Beluga.Drawing/blob/9c82874cf4ec68cb0af78757b65f19783540004a/src/Beluga/Drawing/ColorTool.php#L287-L325
199,609
SagittariusX/Beluga.Drawing
src/Beluga/Drawing/ColorTool.php
ColorTool.Rgb2Hex
public static function Rgb2Hex( $r, int $g = -1, int $b = -1 ) { if ( \is_array( $r ) ) { if ( \count( $r ) != 3 ) { return false; } \array_change_key_case( $r, \CASE_LOWER ); if ( isset( $r[ 'r' ] ) && isset( $r[ 'g' ] ) && isset( $r[ 'b' ] ) ...
php
public static function Rgb2Hex( $r, int $g = -1, int $b = -1 ) { if ( \is_array( $r ) ) { if ( \count( $r ) != 3 ) { return false; } \array_change_key_case( $r, \CASE_LOWER ); if ( isset( $r[ 'r' ] ) && isset( $r[ 'g' ] ) && isset( $r[ 'b' ] ) ...
[ "public", "static", "function", "Rgb2Hex", "(", "$", "r", ",", "int", "$", "g", "=", "-", "1", ",", "int", "$", "b", "=", "-", "1", ")", "{", "if", "(", "\\", "is_array", "(", "$", "r", ")", ")", "{", "if", "(", "\\", "count", "(", "$", "...
Converts a RGB array or the 3 r, g, b values into a hexadecimal color representation. @param array|integer $r RGB Array or the red bit value. @param int $g The green bit value. @param int $b The blue bit value @return string|FALSE
[ "Converts", "a", "RGB", "array", "or", "the", "3", "r", "g", "b", "values", "into", "a", "hexadecimal", "color", "representation", "." ]
9c82874cf4ec68cb0af78757b65f19783540004a
https://github.com/SagittariusX/Beluga.Drawing/blob/9c82874cf4ec68cb0af78757b65f19783540004a/src/Beluga/Drawing/ColorTool.php#L335-L392
199,610
WellCommerce/ThemeBundle
EventListener/ThemeSubscriber.php
ThemeSubscriber.onKernelController
public function onKernelController() { $themeContext = $this->container->get('theme.context.front'); $themeContext->setCurrentTheme($this->getShopStorage()->getCurrentShop()->getTheme()); }
php
public function onKernelController() { $themeContext = $this->container->get('theme.context.front'); $themeContext->setCurrentTheme($this->getShopStorage()->getCurrentShop()->getTheme()); }
[ "public", "function", "onKernelController", "(", ")", "{", "$", "themeContext", "=", "$", "this", "->", "container", "->", "get", "(", "'theme.context.front'", ")", ";", "$", "themeContext", "->", "setCurrentTheme", "(", "$", "this", "->", "getShopStorage", "(...
Sets shop context related session variables
[ "Sets", "shop", "context", "related", "session", "variables" ]
9130bb91b3b9bce7b0a941f0c7ef7c09c7d2fe4b
https://github.com/WellCommerce/ThemeBundle/blob/9130bb91b3b9bce7b0a941f0c7ef7c09c7d2fe4b/EventListener/ThemeSubscriber.php#L37-L41
199,611
praxigento/mobi_mod_downline
Repo/Dao/Snap.php
Snap.getStateOnDate
public function getStateOnDate($datestamp, $addCountryCode = false) { $result = []; $bind = []; $bind[QBldMax::BND_ON_DATE] = $datestamp; $query = $this->qbuildSnapOnDate->build(); if ($addCountryCode) { /* define tables aliases */ $as = self::AS_TBL_D...
php
public function getStateOnDate($datestamp, $addCountryCode = false) { $result = []; $bind = []; $bind[QBldMax::BND_ON_DATE] = $datestamp; $query = $this->qbuildSnapOnDate->build(); if ($addCountryCode) { /* define tables aliases */ $as = self::AS_TBL_D...
[ "public", "function", "getStateOnDate", "(", "$", "datestamp", ",", "$", "addCountryCode", "=", "false", ")", "{", "$", "result", "=", "[", "]", ";", "$", "bind", "=", "[", "]", ";", "$", "bind", "[", "QBldMax", "::", "BND_ON_DATE", "]", "=", "$", ...
Select downline tree state on the given datestamp. @param $datestamp string 'YYYYMMDD' @param $addCountryCode 'true' to add actual country code for customer's attributes @return array
[ "Select", "downline", "tree", "state", "on", "the", "given", "datestamp", "." ]
0f3c276dfff1aa029f9fd205ccfc56f207a2e75b
https://github.com/praxigento/mobi_mod_downline/blob/0f3c276dfff1aa029f9fd205ccfc56f207a2e75b/Repo/Dao/Snap.php#L92-L121
199,612
AdamB7586/menu-builder
src/Helpers/Sorting.php
Sorting.sortByOrder
protected static function sortByOrder($a, $b) { if(!isset($a['link_order']) && isset($b['link_order'])){$a['link_order'] = ($b['link_order'] + 1);} if(!isset($b['link_order']) && isset($a['link_order'])){$b['link_order'] = ($a['link_order'] + 1);} if(isset($a['link_order']) && isset($b['link_ord...
php
protected static function sortByOrder($a, $b) { if(!isset($a['link_order']) && isset($b['link_order'])){$a['link_order'] = ($b['link_order'] + 1);} if(!isset($b['link_order']) && isset($a['link_order'])){$b['link_order'] = ($a['link_order'] + 1);} if(isset($a['link_order']) && isset($b['link_ord...
[ "protected", "static", "function", "sortByOrder", "(", "$", "a", ",", "$", "b", ")", "{", "if", "(", "!", "isset", "(", "$", "a", "[", "'link_order'", "]", ")", "&&", "isset", "(", "$", "b", "[", "'link_order'", "]", ")", ")", "{", "$", "a", "[...
Comparison for the uasort method @param array $a This should be the information of the first link @param array $b This should be the information of the second link @return int
[ "Comparison", "for", "the", "uasort", "method" ]
dbc192bca7d59475068c19d1a07a039e5f997ee4
https://github.com/AdamB7586/menu-builder/blob/dbc192bca7d59475068c19d1a07a039e5f997ee4/src/Helpers/Sorting.php#L12-L19
199,613
AdamB7586/menu-builder
src/Helpers/Sorting.php
Sorting.sortChildElements
protected static function sortChildElements($array) { foreach($array as $i => $item){ if(isset($item['children']) && is_array($item['children'])){ uasort($array[$i]['children'], 'self::sortByOrder'); $array[$i]['children'] = array_values(self::sortChildElements($array...
php
protected static function sortChildElements($array) { foreach($array as $i => $item){ if(isset($item['children']) && is_array($item['children'])){ uasort($array[$i]['children'], 'self::sortByOrder'); $array[$i]['children'] = array_values(self::sortChildElements($array...
[ "protected", "static", "function", "sortChildElements", "(", "$", "array", ")", "{", "foreach", "(", "$", "array", "as", "$", "i", "=>", "$", "item", ")", "{", "if", "(", "isset", "(", "$", "item", "[", "'children'", "]", ")", "&&", "is_array", "(", ...
Sort child elements from the menu array @param array $array This should be a menu item array @return array
[ "Sort", "child", "elements", "from", "the", "menu", "array" ]
dbc192bca7d59475068c19d1a07a039e5f997ee4
https://github.com/AdamB7586/menu-builder/blob/dbc192bca7d59475068c19d1a07a039e5f997ee4/src/Helpers/Sorting.php#L26-L34
199,614
Kris-Kuiper/sFire-Framework
src/Template/Match/MatchUserDefined.php
MatchUserDefined.setAction
public function setAction($action) { if(false === is_string($action)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($action)), E_USER_ERROR); } $this -> action = $action; }
php
public function setAction($action) { if(false === is_string($action)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($action)), E_USER_ERROR); } $this -> action = $action; }
[ "public", "function", "setAction", "(", "$", "action", ")", "{", "if", "(", "false", "===", "is_string", "(", "$", "action", ")", ")", "{", "return", "trigger_error", "(", "sprintf", "(", "'Argument 1 passed to %s() must be of the type string, \"%s\" given'", ",", ...
Set the action @param string $action
[ "Set", "the", "action" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Template/Match/MatchUserDefined.php#L52-L59
199,615
alpixel/AlpixelUserBundle
DependencyInjection/AlpixelUserExtension.php
AlpixelUserExtension.bindParameters
public function bindParameters(ContainerBuilder $container, $name, $config) { $container->setParameter('alpixel_user.role_descriptions', $config['role_descriptions']); $container->setParameter('alpixel_user.firewall_templates', $config['firewall_templates']); $container->setParameter('alpixe...
php
public function bindParameters(ContainerBuilder $container, $name, $config) { $container->setParameter('alpixel_user.role_descriptions', $config['role_descriptions']); $container->setParameter('alpixel_user.firewall_templates', $config['firewall_templates']); $container->setParameter('alpixe...
[ "public", "function", "bindParameters", "(", "ContainerBuilder", "$", "container", ",", "$", "name", ",", "$", "config", ")", "{", "$", "container", "->", "setParameter", "(", "'alpixel_user.role_descriptions'", ",", "$", "config", "[", "'role_descriptions'", "]",...
Binds the params from config. @param ContainerBuilder $container Containerbuilder @param string $name Alias name @param array $config Configuration Array
[ "Binds", "the", "params", "from", "config", "." ]
92cbe3f8e5fd27370d311cb332d2c50d6f1fbd72
https://github.com/alpixel/AlpixelUserBundle/blob/92cbe3f8e5fd27370d311cb332d2c50d6f1fbd72/DependencyInjection/AlpixelUserExtension.php#L32-L38
199,616
mamasu/mama-parameter
src/parameter/AbstractConfig.php
AbstractConfig.addConfigVars
public function addConfigVars($path = 'config.ini') { if ($path === 'config.php') { $arrayIniParams = parse_ini_file(dirname(__FILE__).'/'.$path,true); } else { $arrayIniParams = parse_ini_file($path, true); } foreach ($arrayIniParams as $key => $iniParam) { ...
php
public function addConfigVars($path = 'config.ini') { if ($path === 'config.php') { $arrayIniParams = parse_ini_file(dirname(__FILE__).'/'.$path,true); } else { $arrayIniParams = parse_ini_file($path, true); } foreach ($arrayIniParams as $key => $iniParam) { ...
[ "public", "function", "addConfigVars", "(", "$", "path", "=", "'config.ini'", ")", "{", "if", "(", "$", "path", "===", "'config.php'", ")", "{", "$", "arrayIniParams", "=", "parse_ini_file", "(", "dirname", "(", "__FILE__", ")", ".", "'/'", ".", "$", "pa...
Add Config Vars from a new .ini file @param string $path
[ "Add", "Config", "Vars", "from", "a", "new", ".", "ini", "file" ]
d48529a75d471da2f9f80b9c2ea1fc3d57f0ba4d
https://github.com/mamasu/mama-parameter/blob/d48529a75d471da2f9f80b9c2ea1fc3d57f0ba4d/src/parameter/AbstractConfig.php#L37-L46
199,617
CascadeEnergy/php-symfony-event-dispatcher
src/EventDispatcherConsumerTrait.php
EventDispatcherConsumerTrait.dispatchEvent
public function dispatchEvent($eventName, Event $event = null) { if ($this->eventDispatcher instanceof EventDispatcherInterface) { $this->eventDispatcher->dispatch($eventName, $event); } }
php
public function dispatchEvent($eventName, Event $event = null) { if ($this->eventDispatcher instanceof EventDispatcherInterface) { $this->eventDispatcher->dispatch($eventName, $event); } }
[ "public", "function", "dispatchEvent", "(", "$", "eventName", ",", "Event", "$", "event", "=", "null", ")", "{", "if", "(", "$", "this", "->", "eventDispatcher", "instanceof", "EventDispatcherInterface", ")", "{", "$", "this", "->", "eventDispatcher", "->", ...
Dispatches an event to the event dispatcher, if one has been configured. @param string $eventName The name of the event to dispatch @param Event|null $event The (optional) event object
[ "Dispatches", "an", "event", "to", "the", "event", "dispatcher", "if", "one", "has", "been", "configured", "." ]
2bbaf6aeeefc74e84f8093116fc5a8ae967d6359
https://github.com/CascadeEnergy/php-symfony-event-dispatcher/blob/2bbaf6aeeefc74e84f8093116fc5a8ae967d6359/src/EventDispatcherConsumerTrait.php#L27-L32
199,618
Innmind/Math
src/Quantile/Quantile.php
Quantile.quartile
public function quartile(int $index): Quartile { switch ($index) { case 0: return $this->min; case 1: return $this->firstQuartile; case 2: return $this->median; case 3: return $this->thirdQuartile...
php
public function quartile(int $index): Quartile { switch ($index) { case 0: return $this->min; case 1: return $this->firstQuartile; case 2: return $this->median; case 3: return $this->thirdQuartile...
[ "public", "function", "quartile", "(", "int", "$", "index", ")", ":", "Quartile", "{", "switch", "(", "$", "index", ")", "{", "case", "0", ":", "return", "$", "this", "->", "min", ";", "case", "1", ":", "return", "$", "this", "->", "firstQuartile", ...
Return the quartile at the wished index @param int $index @return Quartile
[ "Return", "the", "quartile", "at", "the", "wished", "index" ]
ac9ad4dd1852c145e90f5edc0f38a873b125a50b
https://github.com/Innmind/Math/blob/ac9ad4dd1852c145e90f5edc0f38a873b125a50b/src/Quantile/Quantile.php#L92-L108
199,619
Innmind/Math
src/Quantile/Quantile.php
Quantile.buildMin
private function buildMin(Dataset $dataset): self { $this->min = new Quartile(min(...$dataset->ordinates())); return $this; }
php
private function buildMin(Dataset $dataset): self { $this->min = new Quartile(min(...$dataset->ordinates())); return $this; }
[ "private", "function", "buildMin", "(", "Dataset", "$", "dataset", ")", ":", "self", "{", "$", "this", "->", "min", "=", "new", "Quartile", "(", "min", "(", "...", "$", "dataset", "->", "ordinates", "(", ")", ")", ")", ";", "return", "$", "this", "...
Extract the minimum value from the dataset @param Dataset $dataset @return self
[ "Extract", "the", "minimum", "value", "from", "the", "dataset" ]
ac9ad4dd1852c145e90f5edc0f38a873b125a50b
https://github.com/Innmind/Math/blob/ac9ad4dd1852c145e90f5edc0f38a873b125a50b/src/Quantile/Quantile.php#L117-L122
199,620
Innmind/Math
src/Quantile/Quantile.php
Quantile.buildMax
private function buildMax(Dataset $dataset): self { $this->max = new Quartile(max(...$dataset->ordinates())); return $this; }
php
private function buildMax(Dataset $dataset): self { $this->max = new Quartile(max(...$dataset->ordinates())); return $this; }
[ "private", "function", "buildMax", "(", "Dataset", "$", "dataset", ")", ":", "self", "{", "$", "this", "->", "max", "=", "new", "Quartile", "(", "max", "(", "...", "$", "dataset", "->", "ordinates", "(", ")", ")", ")", ";", "return", "$", "this", "...
Extract the maximum value from the dataset @param Dataset $dataset @return self
[ "Extract", "the", "maximum", "value", "from", "the", "dataset" ]
ac9ad4dd1852c145e90f5edc0f38a873b125a50b
https://github.com/Innmind/Math/blob/ac9ad4dd1852c145e90f5edc0f38a873b125a50b/src/Quantile/Quantile.php#L131-L136
199,621
Innmind/Math
src/Quantile/Quantile.php
Quantile.buildMean
private function buildMean(Dataset $dataset): self { $this->mean = mean(...$dataset->ordinates()); return $this; }
php
private function buildMean(Dataset $dataset): self { $this->mean = mean(...$dataset->ordinates()); return $this; }
[ "private", "function", "buildMean", "(", "Dataset", "$", "dataset", ")", ":", "self", "{", "$", "this", "->", "mean", "=", "mean", "(", "...", "$", "dataset", "->", "ordinates", "(", ")", ")", ";", "return", "$", "this", ";", "}" ]
Build the mean value from the dataset @param Dataset $dataset @return self
[ "Build", "the", "mean", "value", "from", "the", "dataset" ]
ac9ad4dd1852c145e90f5edc0f38a873b125a50b
https://github.com/Innmind/Math/blob/ac9ad4dd1852c145e90f5edc0f38a873b125a50b/src/Quantile/Quantile.php#L145-L150
199,622
Innmind/Math
src/Quantile/Quantile.php
Quantile.buildMedian
private function buildMedian(Dataset $dataset): self { $this->median = new Quartile(median(...$dataset->ordinates())); return $this; }
php
private function buildMedian(Dataset $dataset): self { $this->median = new Quartile(median(...$dataset->ordinates())); return $this; }
[ "private", "function", "buildMedian", "(", "Dataset", "$", "dataset", ")", ":", "self", "{", "$", "this", "->", "median", "=", "new", "Quartile", "(", "median", "(", "...", "$", "dataset", "->", "ordinates", "(", ")", ")", ")", ";", "return", "$", "t...
Extract the median from the dataset @param Dataset $dataset @return self
[ "Extract", "the", "median", "from", "the", "dataset" ]
ac9ad4dd1852c145e90f5edc0f38a873b125a50b
https://github.com/Innmind/Math/blob/ac9ad4dd1852c145e90f5edc0f38a873b125a50b/src/Quantile/Quantile.php#L159-L164
199,623
Innmind/Math
src/Quantile/Quantile.php
Quantile.buildQuartile
private function buildQuartile( Number $percentage, ColumnVector $dataset ): Number { $dimension = $dataset->dimension(); if ($dimension->value() === 2) { return divide( add($dataset->get(0), $dataset->get(1)), 2 ); } e...
php
private function buildQuartile( Number $percentage, ColumnVector $dataset ): Number { $dimension = $dataset->dimension(); if ($dimension->value() === 2) { return divide( add($dataset->get(0), $dataset->get(1)), 2 ); } e...
[ "private", "function", "buildQuartile", "(", "Number", "$", "percentage", ",", "ColumnVector", "$", "dataset", ")", ":", "Number", "{", "$", "dimension", "=", "$", "dataset", "->", "dimension", "(", ")", ";", "if", "(", "$", "dimension", "->", "value", "...
Return the value describing the the quartile at the given percentage @param Number $percentage @param ColumnVector $dataset @return float
[ "Return", "the", "value", "describing", "the", "the", "quartile", "at", "the", "given", "percentage" ]
ac9ad4dd1852c145e90f5edc0f38a873b125a50b
https://github.com/Innmind/Math/blob/ac9ad4dd1852c145e90f5edc0f38a873b125a50b/src/Quantile/Quantile.php#L208-L232
199,624
ndavison/groundwork-framework
src/Groundwork/Classes/Request.php
Request.routeParams
public function routeParams($params = '') { if (!empty($params)) { // Set the property if (is_a($params, 'stdClass')) { $this->routeParams = $params; } else { return false; } } else { // Get the property ...
php
public function routeParams($params = '') { if (!empty($params)) { // Set the property if (is_a($params, 'stdClass')) { $this->routeParams = $params; } else { return false; } } else { // Get the property ...
[ "public", "function", "routeParams", "(", "$", "params", "=", "''", ")", "{", "if", "(", "!", "empty", "(", "$", "params", ")", ")", "{", "// Set the property", "if", "(", "is_a", "(", "$", "params", ",", "'stdClass'", ")", ")", "{", "$", "this", "...
Get or set the routeParams property. @param object $params @return void|object|boolean
[ "Get", "or", "set", "the", "routeParams", "property", "." ]
c3d22a1410c8d8a07b4ca1f99a35a1181516cd6c
https://github.com/ndavison/groundwork-framework/blob/c3d22a1410c8d8a07b4ca1f99a35a1181516cd6c/src/Groundwork/Classes/Request.php#L140-L153
199,625
libreworks/caridea-auth
src/Adapter/AbstractAdapter.php
AbstractAdapter.checkBlank
protected function checkBlank($object, string $fieldName) { if ($object === null || strlen(trim($object)) === 0) { throw new \InvalidArgumentException("The \"$fieldName\" argument is required; it cannot be null, empty, nor containing only whitespace"); } return $object; }
php
protected function checkBlank($object, string $fieldName) { if ($object === null || strlen(trim($object)) === 0) { throw new \InvalidArgumentException("The \"$fieldName\" argument is required; it cannot be null, empty, nor containing only whitespace"); } return $object; }
[ "protected", "function", "checkBlank", "(", "$", "object", ",", "string", "$", "fieldName", ")", "{", "if", "(", "$", "object", "===", "null", "||", "strlen", "(", "trim", "(", "$", "object", ")", ")", "===", "0", ")", "{", "throw", "new", "\\", "I...
Checks that a string argument isn't null, empty, or just whitespace. @param string $object The value to check for blankness @param string $fieldName The name of the parameter (for Exception message) @return mixed Returns `$object` @throws \InvalidArgumentException if the value is null, empty, or whitespace
[ "Checks", "that", "a", "string", "argument", "isn", "t", "null", "empty", "or", "just", "whitespace", "." ]
1bf965c57716942b18ca3204629f6bda99cf876a
https://github.com/libreworks/caridea-auth/blob/1bf965c57716942b18ca3204629f6bda99cf876a/src/Adapter/AbstractAdapter.php#L39-L45
199,626
libreworks/caridea-auth
src/Adapter/AbstractAdapter.php
AbstractAdapter.ensure
protected function ensure(array &$source, string $key) { if (!isset($source[$key]) || !$source[$key]) { throw new \Caridea\Auth\Exception\MissingCredentials(); } return $source[$key]; }
php
protected function ensure(array &$source, string $key) { if (!isset($source[$key]) || !$source[$key]) { throw new \Caridea\Auth\Exception\MissingCredentials(); } return $source[$key]; }
[ "protected", "function", "ensure", "(", "array", "&", "$", "source", ",", "string", "$", "key", ")", "{", "if", "(", "!", "isset", "(", "$", "source", "[", "$", "key", "]", ")", "||", "!", "$", "source", "[", "$", "key", "]", ")", "{", "throw",...
Throws a `MissingCredentials` if the value is empty. @param array $source The params array @param string $key The array offset @return mixed Returns the value of `$source[$key]` @throws \Caridea\Auth\Exception\MissingCredentials If `$source[$key]` is empty
[ "Throws", "a", "MissingCredentials", "if", "the", "value", "is", "empty", "." ]
1bf965c57716942b18ca3204629f6bda99cf876a
https://github.com/libreworks/caridea-auth/blob/1bf965c57716942b18ca3204629f6bda99cf876a/src/Adapter/AbstractAdapter.php#L55-L61
199,627
libreworks/caridea-auth
src/Adapter/AbstractAdapter.php
AbstractAdapter.verify
protected function verify(string $input, string $hash) { if (!password_verify($input, $hash)) { throw new \Caridea\Auth\Exception\InvalidPassword(); } }
php
protected function verify(string $input, string $hash) { if (!password_verify($input, $hash)) { throw new \Caridea\Auth\Exception\InvalidPassword(); } }
[ "protected", "function", "verify", "(", "string", "$", "input", ",", "string", "$", "hash", ")", "{", "if", "(", "!", "password_verify", "(", "$", "input", ",", "$", "hash", ")", ")", "{", "throw", "new", "\\", "Caridea", "\\", "Auth", "\\", "Excepti...
Verifies a user-provided password against a hash. @param string $input The user-provided password @param string $hash The stored password hash @throws \Caridea\Auth\Exception\MissingCredentials If the user-provided password is empty @throws \Caridea\Auth\Exception\InvalidPassword If the password fails to verify
[ "Verifies", "a", "user", "-", "provided", "password", "against", "a", "hash", "." ]
1bf965c57716942b18ca3204629f6bda99cf876a
https://github.com/libreworks/caridea-auth/blob/1bf965c57716942b18ca3204629f6bda99cf876a/src/Adapter/AbstractAdapter.php#L71-L76
199,628
ScaraMVC/Framework
src/Scara/Console/Console.php
Console.register
public function register($command) { $classexp = explode('/', $command); for ($i = 0; $i < count($classexp); $i++) { $classexp[$i] = ucwords($classexp[$i]); } $class = __NAMESPACE__.'\\'.implode('\\', $classexp); return new $class(); }
php
public function register($command) { $classexp = explode('/', $command); for ($i = 0; $i < count($classexp); $i++) { $classexp[$i] = ucwords($classexp[$i]); } $class = __NAMESPACE__.'\\'.implode('\\', $classexp); return new $class(); }
[ "public", "function", "register", "(", "$", "command", ")", "{", "$", "classexp", "=", "explode", "(", "'/'", ",", "$", "command", ")", ";", "for", "(", "$", "i", "=", "0", ";", "$", "i", "<", "count", "(", "$", "classexp", ")", ";", "$", "i", ...
Register console command class. @param string $command @return mixed
[ "Register", "console", "command", "class", "." ]
199b08b45fadf5dae14ac4732af03b36e15bbef2
https://github.com/ScaraMVC/Framework/blob/199b08b45fadf5dae14ac4732af03b36e15bbef2/src/Scara/Console/Console.php#L17-L27
199,629
bseddon/XPath20
XPath2NodeIterator/Enumerator.php
Enumerator.getCurrent
public function getCurrent() { if ( ! $this->iterationStarted || is_null( $this->current ) ) throw new InvalidOperationException(); return $this->current->Current; }
php
public function getCurrent() { if ( ! $this->iterationStarted || is_null( $this->current ) ) throw new InvalidOperationException(); return $this->current->Current; }
[ "public", "function", "getCurrent", "(", ")", "{", "if", "(", "!", "$", "this", "->", "iterationStarted", "||", "is_null", "(", "$", "this", "->", "current", ")", ")", "throw", "new", "InvalidOperationException", "(", ")", ";", "return", "$", "this", "->...
Get the current value of the iterator @return object
[ "Get", "the", "current", "value", "of", "the", "iterator" ]
69882b6efffaa5470a819d5fdd2f6473ddeb046d
https://github.com/bseddon/XPath20/blob/69882b6efffaa5470a819d5fdd2f6473ddeb046d/XPath2NodeIterator/Enumerator.php#L71-L76
199,630
kael-shipman/php-std-traits
src/AbstractConfig.php
AbstractConfig.getValidExecProfiles
protected function getValidExecProfiles(string $profileName = null) { $validProfs = [ 'production' => 'production', 'dev' => 'dev', 'staging' => 'staging', 'sandbox' => 'sandbox', 'demo' => 'demo', 'debug' => 'debug' ]; ...
php
protected function getValidExecProfiles(string $profileName = null) { $validProfs = [ 'production' => 'production', 'dev' => 'dev', 'staging' => 'staging', 'sandbox' => 'sandbox', 'demo' => 'demo', 'debug' => 'debug' ]; ...
[ "protected", "function", "getValidExecProfiles", "(", "string", "$", "profileName", "=", "null", ")", "{", "$", "validProfs", "=", "[", "'production'", "=>", "'production'", ",", "'dev'", "=>", "'dev'", ",", "'staging'", "=>", "'staging'", ",", "'sandbox'", "=...
Get this config's list of known profiles. The `getExecProfile` function should use this list to check the given profile against. This is a function that returns a simple array, such that derivative classes may easily add/change profiles by simply overriding the function and merging in new profile names or returning a ...
[ "Get", "this", "config", "s", "list", "of", "known", "profiles", "." ]
c21ddfc9dc682e6589e52f3717df81e0d2972c0e
https://github.com/kael-shipman/php-std-traits/blob/c21ddfc9dc682e6589e52f3717df81e0d2972c0e/src/AbstractConfig.php#L60-L80
199,631
kael-shipman/php-std-traits
src/AbstractConfig.php
AbstractConfig.get
protected function get(string $key) { if (!array_key_exists($key, $this->config)) throw new InvalidConfigException("Your configuration doesn't have a value for the key `$key`"); return $this->config[$key]; }
php
protected function get(string $key) { if (!array_key_exists($key, $this->config)) throw new InvalidConfigException("Your configuration doesn't have a value for the key `$key`"); return $this->config[$key]; }
[ "protected", "function", "get", "(", "string", "$", "key", ")", "{", "if", "(", "!", "array_key_exists", "(", "$", "key", ",", "$", "this", "->", "config", ")", ")", "throw", "new", "InvalidConfigException", "(", "\"Your configuration doesn't have a value for th...
An internal method that ensures an error is thrown if the given key is not found in the configuration. @param string $key The key of the configuration value to get @return mixed Returns the configuration value at `$key` @throws InvalidConfigException in the even that a given config key isn't loaded
[ "An", "internal", "method", "that", "ensures", "an", "error", "is", "thrown", "if", "the", "given", "key", "is", "not", "found", "in", "the", "configuration", "." ]
c21ddfc9dc682e6589e52f3717df81e0d2972c0e
https://github.com/kael-shipman/php-std-traits/blob/c21ddfc9dc682e6589e52f3717df81e0d2972c0e/src/AbstractConfig.php#L90-L94
199,632
linpax/microphp-framework
src/web/html/HeadTagTrait.php
HeadTagTrait.link
public static function link($name, $url, array $attributes = []) { return static::openTag('link', array_merge($attributes, ['href' => $url])). $name. static::closeTag('link'); }
php
public static function link($name, $url, array $attributes = []) { return static::openTag('link', array_merge($attributes, ['href' => $url])). $name. static::closeTag('link'); }
[ "public", "static", "function", "link", "(", "$", "name", ",", "$", "url", ",", "array", "$", "attributes", "=", "[", "]", ")", "{", "return", "static", "::", "openTag", "(", "'link'", ",", "array_merge", "(", "$", "attributes", ",", "[", "'href'", "...
Render link tag @access public @param string $name name of element @param string $url url path @param array $attributes attributes tag @return string @static
[ "Render", "link", "tag" ]
11f3370f3f64c516cce9b84ecd8276c6e9ae8df9
https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/web/html/HeadTagTrait.php#L70-L75
199,633
linpax/microphp-framework
src/web/html/HeadTagTrait.php
HeadTagTrait.script
public static function script($text, array $attributes = [], $type = 'text/javascript') { return static::openTag('script', array_merge($attributes, ['type' => $type])). ' /*<![CDATA[*/ '.$text.' /*]]>*/ '. static::closeTag('script'); }
php
public static function script($text, array $attributes = [], $type = 'text/javascript') { return static::openTag('script', array_merge($attributes, ['type' => $type])). ' /*<![CDATA[*/ '.$text.' /*]]>*/ '. static::closeTag('script'); }
[ "public", "static", "function", "script", "(", "$", "text", ",", "array", "$", "attributes", "=", "[", "]", ",", "$", "type", "=", "'text/javascript'", ")", "{", "return", "static", "::", "openTag", "(", "'script'", ",", "array_merge", "(", "$", "attribu...
Render script source @access public @param string $text script @param array $attributes attributes tag @param string $type type of script @return string @static
[ "Render", "script", "source" ]
11f3370f3f64c516cce9b84ecd8276c6e9ae8df9
https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/web/html/HeadTagTrait.php#L152-L158
199,634
hiqdev/minii-caching
src/TagDependency.php
TagDependency.generateDependencyData
protected function generateDependencyData($cache) { $timestamps = $this->getTimestamps($cache, (array) $this->tags); $newKeys = []; foreach ($timestamps as $key => $timestamp) { if ($timestamp === false) { $newKeys[] = $key; } } if (!e...
php
protected function generateDependencyData($cache) { $timestamps = $this->getTimestamps($cache, (array) $this->tags); $newKeys = []; foreach ($timestamps as $key => $timestamp) { if ($timestamp === false) { $newKeys[] = $key; } } if (!e...
[ "protected", "function", "generateDependencyData", "(", "$", "cache", ")", "{", "$", "timestamps", "=", "$", "this", "->", "getTimestamps", "(", "$", "cache", ",", "(", "array", ")", "$", "this", "->", "tags", ")", ";", "$", "newKeys", "=", "[", "]", ...
Generates the data needed to determine if dependency has been changed. This method does nothing in this class. @param Cache $cache the cache component that is currently evaluating this dependency @return mixed the data needed to determine if dependency has been changed.
[ "Generates", "the", "data", "needed", "to", "determine", "if", "dependency", "has", "been", "changed", ".", "This", "method", "does", "nothing", "in", "this", "class", "." ]
04c3f810a4af43b53855ee9c5e3ef6455080b538
https://github.com/hiqdev/minii-caching/blob/04c3f810a4af43b53855ee9c5e3ef6455080b538/src/TagDependency.php#L32-L47
199,635
hiqdev/minii-caching
src/TagDependency.php
TagDependency.getHasChanged
public function getHasChanged($cache) { $timestamps = $this->getTimestamps($cache, (array) $this->tags); return $timestamps !== $this->data; }
php
public function getHasChanged($cache) { $timestamps = $this->getTimestamps($cache, (array) $this->tags); return $timestamps !== $this->data; }
[ "public", "function", "getHasChanged", "(", "$", "cache", ")", "{", "$", "timestamps", "=", "$", "this", "->", "getTimestamps", "(", "$", "cache", ",", "(", "array", ")", "$", "this", "->", "tags", ")", ";", "return", "$", "timestamps", "!==", "$", "...
Performs the actual dependency checking. @param Cache $cache the cache component that is currently evaluating this dependency @return boolean whether the dependency is changed or not.
[ "Performs", "the", "actual", "dependency", "checking", "." ]
04c3f810a4af43b53855ee9c5e3ef6455080b538
https://github.com/hiqdev/minii-caching/blob/04c3f810a4af43b53855ee9c5e3ef6455080b538/src/TagDependency.php#L54-L58
199,636
agentmedia/phine-builtin
src/BuiltIn/Modules/Frontend/Navigation.php
Navigation.CreateSubLevel
protected function CreateSubLevel(NavigationItem $parent) { $navigation = new self(); $navigation->isSubLevel = true; $navigation->naviParent = $parent; $navigation->SetTreeItem($this->tree, $this->item); return $navigation; }
php
protected function CreateSubLevel(NavigationItem $parent) { $navigation = new self(); $navigation->isSubLevel = true; $navigation->naviParent = $parent; $navigation->SetTreeItem($this->tree, $this->item); return $navigation; }
[ "protected", "function", "CreateSubLevel", "(", "NavigationItem", "$", "parent", ")", "{", "$", "navigation", "=", "new", "self", "(", ")", ";", "$", "navigation", "->", "isSubLevel", "=", "true", ";", "$", "navigation", "->", "naviParent", "=", "$", "pare...
Creates a navigation renderer for a sub level @param NavigationItem $parent @return Navigation
[ "Creates", "a", "navigation", "renderer", "for", "a", "sub", "level" ]
4dd05bc406a71e997bd4eaa16b12e23dbe62a456
https://github.com/agentmedia/phine-builtin/blob/4dd05bc406a71e997bd4eaa16b12e23dbe62a456/src/BuiltIn/Modules/Frontend/Navigation.php#L97-L104
199,637
agentmedia/phine-builtin
src/BuiltIn/Modules/Frontend/Navigation.php
Navigation.IsActive
private function IsActive() { $pageItem = $this->naviItem->GetPageItem(); if (!$pageItem) { return false; } return $pageItem->GetPage()->Equals(PageRenderer::Page()); }
php
private function IsActive() { $pageItem = $this->naviItem->GetPageItem(); if (!$pageItem) { return false; } return $pageItem->GetPage()->Equals(PageRenderer::Page()); }
[ "private", "function", "IsActive", "(", ")", "{", "$", "pageItem", "=", "$", "this", "->", "naviItem", "->", "GetPageItem", "(", ")", ";", "if", "(", "!", "$", "pageItem", ")", "{", "return", "false", ";", "}", "return", "$", "pageItem", "->", "GetPa...
Returns true if the current item points to the current page @return boolean
[ "Returns", "true", "if", "the", "current", "item", "points", "to", "the", "current", "page" ]
4dd05bc406a71e997bd4eaa16b12e23dbe62a456
https://github.com/agentmedia/phine-builtin/blob/4dd05bc406a71e997bd4eaa16b12e23dbe62a456/src/BuiltIn/Modules/Frontend/Navigation.php#L149-L157
199,638
agentmedia/phine-builtin
src/BuiltIn/Modules/Frontend/Navigation.php
Navigation.IsTrail
private function IsTrail() { $pageItem = $this->naviItem->GetPageItem(); if (!$pageItem) { return false; } $parent = PageRenderer::Page()->GetParent(); $itemPage = $pageItem->GetPage(); while ($parent) { if ($itemPage->Equals($p...
php
private function IsTrail() { $pageItem = $this->naviItem->GetPageItem(); if (!$pageItem) { return false; } $parent = PageRenderer::Page()->GetParent(); $itemPage = $pageItem->GetPage(); while ($parent) { if ($itemPage->Equals($p...
[ "private", "function", "IsTrail", "(", ")", "{", "$", "pageItem", "=", "$", "this", "->", "naviItem", "->", "GetPageItem", "(", ")", ";", "if", "(", "!", "$", "pageItem", ")", "{", "return", "false", ";", "}", "$", "parent", "=", "PageRenderer", "::"...
Checks if the current navigation item points to a parent of the current page @return boolean Returns true if the current page is a child of the current item
[ "Checks", "if", "the", "current", "navigation", "item", "points", "to", "a", "parent", "of", "the", "current", "page" ]
4dd05bc406a71e997bd4eaa16b12e23dbe62a456
https://github.com/agentmedia/phine-builtin/blob/4dd05bc406a71e997bd4eaa16b12e23dbe62a456/src/BuiltIn/Modules/Frontend/Navigation.php#L163-L181
199,639
nirou8/php-multiple-saml
lib/Saml2/Response.php
OneLogin_Saml2_Response.validateTimestamps
public function validateTimestamps() { if ($this->encrypted) { $document = $this->decryptedDocument; } else { $document = $this->document; } $timestampNodes = $document->getElementsByTagName('Conditions'); for ($i = 0; $i < $timestampNodes->length; $i...
php
public function validateTimestamps() { if ($this->encrypted) { $document = $this->decryptedDocument; } else { $document = $this->document; } $timestampNodes = $document->getElementsByTagName('Conditions'); for ($i = 0; $i < $timestampNodes->length; $i...
[ "public", "function", "validateTimestamps", "(", ")", "{", "if", "(", "$", "this", "->", "encrypted", ")", "{", "$", "document", "=", "$", "this", "->", "decryptedDocument", ";", "}", "else", "{", "$", "document", "=", "$", "this", "->", "document", ";...
Verifies that the document is still valid according Conditions Element. @return bool
[ "Verifies", "that", "the", "document", "is", "still", "valid", "according", "Conditions", "Element", "." ]
7eb5786e678db7d45459ce3441fa187946ae9a3b
https://github.com/nirou8/php-multiple-saml/blob/7eb5786e678db7d45459ce3441fa187946ae9a3b/lib/Saml2/Response.php#L875-L901
199,640
rawphp/RawMigrator
lib/commands/MigrateCommand.php
MigrateCommand.execute
public function execute( ) { $this->doAction( self::ON_BEFORE_MIGRATE_CMD_EXECUTE_ACTION ); if ( NULL === $this->migrator ) { throw new MigrationException( 'You must set the migrator before executing this command.' ); } $verbose = self::getOpti...
php
public function execute( ) { $this->doAction( self::ON_BEFORE_MIGRATE_CMD_EXECUTE_ACTION ); if ( NULL === $this->migrator ) { throw new MigrationException( 'You must set the migrator before executing this command.' ); } $verbose = self::getOpti...
[ "public", "function", "execute", "(", ")", "{", "$", "this", "->", "doAction", "(", "self", "::", "ON_BEFORE_MIGRATE_CMD_EXECUTE_ACTION", ")", ";", "if", "(", "NULL", "===", "$", "this", "->", "migrator", ")", "{", "throw", "new", "MigrationException", "(", ...
Executes the command action. @action ON_BEFORE_MIGRATE_CMD_EXECUTE_ACTION @action ON_AFTER_MIGRATE_CMD_EXECUTE_ACTION @throws MigrationException if the migrator hasn't been set
[ "Executes", "the", "command", "action", "." ]
bbf5e354d7ff532552fd6865b38e4c1a3b6f3757
https://github.com/rawphp/RawMigrator/blob/bbf5e354d7ff532552fd6865b38e4c1a3b6f3757/lib/commands/MigrateCommand.php#L111-L143
199,641
Subscribo/klarna-invoice-sdk-wrapped
src/pclasses/storage.intf.php
PCStorage.addPClass
public function addPClass($pclass) { if (! $pclass instanceof KlarnaPClass) { throw new Klarna_InvalidTypeException('pclass', 'KlarnaPClass'); } if (!isset($this->pclasses) || !is_array($this->pclasses)) { $this->pclasses = array(); } if ($pclass->ge...
php
public function addPClass($pclass) { if (! $pclass instanceof KlarnaPClass) { throw new Klarna_InvalidTypeException('pclass', 'KlarnaPClass'); } if (!isset($this->pclasses) || !is_array($this->pclasses)) { $this->pclasses = array(); } if ($pclass->ge...
[ "public", "function", "addPClass", "(", "$", "pclass", ")", "{", "if", "(", "!", "$", "pclass", "instanceof", "KlarnaPClass", ")", "{", "throw", "new", "Klarna_InvalidTypeException", "(", "'pclass'", ",", "'KlarnaPClass'", ")", ";", "}", "if", "(", "!", "i...
Adds a PClass to the storage. @param KlarnaPClass $pclass PClass object. @throws KlarnaException @return void
[ "Adds", "a", "PClass", "to", "the", "storage", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/pclasses/storage.intf.php#L53-L72
199,642
Subscribo/klarna-invoice-sdk-wrapped
src/pclasses/storage.intf.php
PCStorage.getPClass
public function getPClass($id, $eid, $country) { if (!is_int($id)) { throw new InvalidArgumentException('Supplied ID is not an integer!'); } if (!is_array($this->pclasses)) { throw new Klarna_PClassException('No match for that eid!'); } if (!isset($t...
php
public function getPClass($id, $eid, $country) { if (!is_int($id)) { throw new InvalidArgumentException('Supplied ID is not an integer!'); } if (!is_array($this->pclasses)) { throw new Klarna_PClassException('No match for that eid!'); } if (!isset($t...
[ "public", "function", "getPClass", "(", "$", "id", ",", "$", "eid", ",", "$", "country", ")", "{", "if", "(", "!", "is_int", "(", "$", "id", ")", ")", "{", "throw", "new", "InvalidArgumentException", "(", "'Supplied ID is not an integer!'", ")", ";", "}"...
Gets the PClass by ID. @param int $id PClass ID. @param int $eid Merchant ID. @param int $country {@link KlarnaCountry Country} constant. @throws KlarnaException @return KlarnaPClass
[ "Gets", "the", "PClass", "by", "ID", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/pclasses/storage.intf.php#L84-L111
199,643
Subscribo/klarna-invoice-sdk-wrapped
src/pclasses/storage.intf.php
PCStorage.getPClasses
public function getPClasses($eid, $country, $type = null) { if (!is_int($country)) { throw new Klarna_ArgumentNotSetException('country'); } $tmp = false; if (!is_array($this->pclasses)) { return; } $tmp = array(); foreach ($this->pcla...
php
public function getPClasses($eid, $country, $type = null) { if (!is_int($country)) { throw new Klarna_ArgumentNotSetException('country'); } $tmp = false; if (!is_array($this->pclasses)) { return; } $tmp = array(); foreach ($this->pcla...
[ "public", "function", "getPClasses", "(", "$", "eid", ",", "$", "country", ",", "$", "type", "=", "null", ")", "{", "if", "(", "!", "is_int", "(", "$", "country", ")", ")", "{", "throw", "new", "Klarna_ArgumentNotSetException", "(", "'country'", ")", "...
Returns an array of KlarnaPClasses, keyed with pclass ID. If type is specified, only that type will be returned. <b>Types available</b>:<br> {@link KlarnaPClass::ACCOUNT}<br> {@link KlarnaPClass::CAMPAIGN}<br> {@link KlarnaPClass::SPECIAL}<br> {@link KlarnaPClass::DELAY}<br> {@link KlarnaPClass::MOBILE}<br> @param in...
[ "Returns", "an", "array", "of", "KlarnaPClasses", "keyed", "with", "pclass", "ID", ".", "If", "type", "is", "specified", "only", "that", "type", "will", "be", "returned", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/pclasses/storage.intf.php#L131-L160
199,644
Raphhh/puppy-application
src/Controller/AppController.php
AppController.render
public function render($templateFile, array $vars = []) { $this->getService('retriever')->setLocalVars($vars); return $this->getService('template')->render($templateFile, $vars); }
php
public function render($templateFile, array $vars = []) { $this->getService('retriever')->setLocalVars($vars); return $this->getService('template')->render($templateFile, $vars); }
[ "public", "function", "render", "(", "$", "templateFile", ",", "array", "$", "vars", "=", "[", "]", ")", "{", "$", "this", "->", "getService", "(", "'retriever'", ")", "->", "setLocalVars", "(", "$", "vars", ")", ";", "return", "$", "this", "->", "ge...
renders a template. uses template service. @param string $templateFile @param array $vars @return mixed
[ "renders", "a", "template", ".", "uses", "template", "service", "." ]
9291543cd28e19a2986abd7fb146898ca5f5f5da
https://github.com/Raphhh/puppy-application/blob/9291543cd28e19a2986abd7fb146898ca5f5f5da/src/Controller/AppController.php#L39-L43
199,645
Raphhh/puppy-application
src/Controller/AppController.php
AppController.retrieve
public function retrieve($key, $default = '') { $retriever = $this->getService('retriever'); if($retriever->has($key)){ return $retriever->get($key); } return $default; }
php
public function retrieve($key, $default = '') { $retriever = $this->getService('retriever'); if($retriever->has($key)){ return $retriever->get($key); } return $default; }
[ "public", "function", "retrieve", "(", "$", "key", ",", "$", "default", "=", "''", ")", "{", "$", "retriever", "=", "$", "this", "->", "getService", "(", "'retriever'", ")", ";", "if", "(", "$", "retriever", "->", "has", "(", "$", "key", ")", ")", ...
retrieves a param from - the matches of the uri - the request - the flash @param string $key @param string $default @return string
[ "retrieves", "a", "param", "from", "-", "the", "matches", "of", "the", "uri", "-", "the", "request", "-", "the", "flash" ]
9291543cd28e19a2986abd7fb146898ca5f5f5da
https://github.com/Raphhh/puppy-application/blob/9291543cd28e19a2986abd7fb146898ca5f5f5da/src/Controller/AppController.php#L132-L139
199,646
agentmedia/phine-core
src/Core/Logic/Util/ClassFinder.php
ClassFinder.ModuleClass
static function ModuleClass($type, ModuleLocation $location) { $parts = \explode(self::$bundleModuleSeparator, $type); if (count($parts) != 2) { throw new \InvalidArgumentException('Module type string must be in the format <bundle>-<module>'); } $bundle = $parts[0...
php
static function ModuleClass($type, ModuleLocation $location) { $parts = \explode(self::$bundleModuleSeparator, $type); if (count($parts) != 2) { throw new \InvalidArgumentException('Module type string must be in the format <bundle>-<module>'); } $bundle = $parts[0...
[ "static", "function", "ModuleClass", "(", "$", "type", ",", "ModuleLocation", "$", "location", ")", "{", "$", "parts", "=", "\\", "explode", "(", "self", "::", "$", "bundleModuleSeparator", ",", "$", "type", ")", ";", "if", "(", "count", "(", "$", "par...
Gets the class name by type string and module loation @param string $type The (simplified) type string @param ModuleLocation $location The location; either Backend or Frontend @return string Returns the class name associated with the type string @throws \InvalidArgumentException Raises exception if type has incorrect f...
[ "Gets", "the", "class", "name", "by", "type", "string", "and", "module", "loation" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Util/ClassFinder.php#L50-L61
199,647
agentmedia/phine-core
src/Core/Logic/Util/ClassFinder.php
ClassFinder.CreateModule
static function CreateModule($type, ModuleLocation $location) { $class = self::ModuleClass($type, $location); if (!class_exists($class)) { return null; } return new $class(); }
php
static function CreateModule($type, ModuleLocation $location) { $class = self::ModuleClass($type, $location); if (!class_exists($class)) { return null; } return new $class(); }
[ "static", "function", "CreateModule", "(", "$", "type", ",", "ModuleLocation", "$", "location", ")", "{", "$", "class", "=", "self", "::", "ModuleClass", "(", "$", "type", ",", "$", "location", ")", ";", "if", "(", "!", "class_exists", "(", "$", "class...
Finds the module associated with the given type and returns an instance @param string $type The module type @param ModuleLocation $location The location; either backend or frontend @return ModuleBase
[ "Finds", "the", "module", "associated", "with", "the", "given", "type", "and", "returns", "an", "instance" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Util/ClassFinder.php#L69-L77
199,648
agentmedia/phine-core
src/Core/Logic/Util/ClassFinder.php
ClassFinder.BackendNavModules
static function BackendNavModules() { $result = array(); $allBundles = PathUtil::Bundles(); //force Core to appear first $coreKey = array_search('Core', $allBundles); unset($allBundles[$coreKey]); array_unshift($allBundles, 'Core'); $bundles = array_values($al...
php
static function BackendNavModules() { $result = array(); $allBundles = PathUtil::Bundles(); //force Core to appear first $coreKey = array_search('Core', $allBundles); unset($allBundles[$coreKey]); array_unshift($allBundles, 'Core'); $bundles = array_values($al...
[ "static", "function", "BackendNavModules", "(", ")", "{", "$", "result", "=", "array", "(", ")", ";", "$", "allBundles", "=", "PathUtil", "::", "Bundles", "(", ")", ";", "//force Core to appear first", "$", "coreKey", "=", "array_search", "(", "'Core'", ",",...
The modules for the backend navigation @return Returns an array with bundle names as keys and backend modules as list
[ "The", "modules", "for", "the", "backend", "navigation" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Util/ClassFinder.php#L135-L167
199,649
agentmedia/phine-core
src/Core/Logic/Util/ClassFinder.php
ClassFinder.SortByNavIndex
private static function SortByNavIndex(array &$result) { $sorted = array(); foreach ($result as $bundle=>$modules) { ksort($modules); $sorted[$bundle] = $modules; } return $sorted; }
php
private static function SortByNavIndex(array &$result) { $sorted = array(); foreach ($result as $bundle=>$modules) { ksort($modules); $sorted[$bundle] = $modules; } return $sorted; }
[ "private", "static", "function", "SortByNavIndex", "(", "array", "&", "$", "result", ")", "{", "$", "sorted", "=", "array", "(", ")", ";", "foreach", "(", "$", "result", "as", "$", "bundle", "=>", "$", "modules", ")", "{", "ksort", "(", "$", "modules...
Sorts the the navigation items by index
[ "Sorts", "the", "the", "navigation", "items", "by", "index" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Util/ClassFinder.php#L172-L181
199,650
agentmedia/phine-core
src/Core/Logic/Util/ClassFinder.php
ClassFinder.AddBackendNavModule
private static function AddBackendNavModule(array &$result, BackendModule $module) { $bundle = $module->MyBundle(); if (!isset($result[$bundle])) { $result[$bundle] = array(); } $result[$bundle][$module->SideNavIndex()] = $module; }
php
private static function AddBackendNavModule(array &$result, BackendModule $module) { $bundle = $module->MyBundle(); if (!isset($result[$bundle])) { $result[$bundle] = array(); } $result[$bundle][$module->SideNavIndex()] = $module; }
[ "private", "static", "function", "AddBackendNavModule", "(", "array", "&", "$", "result", ",", "BackendModule", "$", "module", ")", "{", "$", "bundle", "=", "$", "module", "->", "MyBundle", "(", ")", ";", "if", "(", "!", "isset", "(", "$", "result", "[...
Adds the module to the side navigation @param array &$result The resulting array @param BackendModule $module The backend module
[ "Adds", "the", "module", "to", "the", "side", "navigation" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Util/ClassFinder.php#L188-L196
199,651
Kris-Kuiper/sFire-Framework
src/Schedule/Schedule.php
Schedule.run
public function run() { //Check if the function exec is enabled if(false === function_exists('exec')) { return trigger_error('Function "exec" is not enabled', E_USER_ERROR); } //Check if schedules folder is readable if(false === is_readable(Path :: get('schedule'))) { return trigger_erro...
php
public function run() { //Check if the function exec is enabled if(false === function_exists('exec')) { return trigger_error('Function "exec" is not enabled', E_USER_ERROR); } //Check if schedules folder is readable if(false === is_readable(Path :: get('schedule'))) { return trigger_erro...
[ "public", "function", "run", "(", ")", "{", "//Check if the function exec is enabled\r", "if", "(", "false", "===", "function_exists", "(", "'exec'", ")", ")", "{", "return", "trigger_error", "(", "'Function \"exec\" is not enabled'", ",", "E_USER_ERROR", ")", ";", ...
Iterate over all schedule files and execute tasks
[ "Iterate", "over", "all", "schedule", "files", "and", "execute", "tasks" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Schedule/Schedule.php#L53-L88
199,652
Kris-Kuiper/sFire-Framework
src/Schedule/Schedule.php
Schedule.task
public function task($script) { if(false === is_string($script)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($script)), E_USER_ERROR); } $script = sprintf('%s%s%s.php', Path :: get('schedule'), Application :: get(['prefix', 'sch...
php
public function task($script) { if(false === is_string($script)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($script)), E_USER_ERROR); } $script = sprintf('%s%s%s.php', Path :: get('schedule'), Application :: get(['prefix', 'sch...
[ "public", "function", "task", "(", "$", "script", ")", "{", "if", "(", "false", "===", "is_string", "(", "$", "script", ")", ")", "{", "return", "trigger_error", "(", "sprintf", "(", "'Argument 1 passed to %s() must be of the type string, \"%s\" given'", ",", "__M...
Execute individual task of schedule file @param @return
[ "Execute", "individual", "task", "of", "schedule", "file" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Schedule/Schedule.php#L96-L157
199,653
Kris-Kuiper/sFire-Framework
src/Schedule/Schedule.php
Schedule.exec
private function exec($command, $background = false) { exec(escapeshellcmd($command) . ($background === true ? ' > /dev/null &' : ''), $output); return $output; }
php
private function exec($command, $background = false) { exec(escapeshellcmd($command) . ($background === true ? ' > /dev/null &' : ''), $output); return $output; }
[ "private", "function", "exec", "(", "$", "command", ",", "$", "background", "=", "false", ")", "{", "exec", "(", "escapeshellcmd", "(", "$", "command", ")", ".", "(", "$", "background", "===", "true", "?", "' > /dev/null &'", ":", "''", ")", ",", "$", ...
Runs system command @param string $command @param boolean $background @return string
[ "Runs", "system", "command" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Schedule/Schedule.php#L166-L171
199,654
Kris-Kuiper/sFire-Framework
src/Schedule/Schedule.php
Schedule.checkRun
private function checkRun($crontab) { $time = explode(' ', date('i G j n w')); $crontab = explode(' ', $crontab); foreach($crontab as $k => &$v) { $time[$k] = preg_replace('/^0+(?=\d)/', '', $time[$k]); $v = explode(',', $v); foreach ($v as &$v1) { ...
php
private function checkRun($crontab) { $time = explode(' ', date('i G j n w')); $crontab = explode(' ', $crontab); foreach($crontab as $k => &$v) { $time[$k] = preg_replace('/^0+(?=\d)/', '', $time[$k]); $v = explode(',', $v); foreach ($v as &$v1) { ...
[ "private", "function", "checkRun", "(", "$", "crontab", ")", "{", "$", "time", "=", "explode", "(", "' '", ",", "date", "(", "'i G j n w'", ")", ")", ";", "$", "crontab", "=", "explode", "(", "' '", ",", "$", "crontab", ")", ";", "foreach", "(", "$...
Checks if script should run @param string $crontab @return boolean
[ "Checks", "if", "script", "should", "run" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Schedule/Schedule.php#L179-L200
199,655
Kris-Kuiper/sFire-Framework
src/Schedule/Schedule.php
Schedule.bootstrap
private function bootstrap() { include(dirname(dirname(dirname(dirname(dirname(dirname(__FILE__)))))) . DIRECTORY_SEPARATOR . 'bootstrap.php'); new \Bootstrap(false); }
php
private function bootstrap() { include(dirname(dirname(dirname(dirname(dirname(dirname(__FILE__)))))) . DIRECTORY_SEPARATOR . 'bootstrap.php'); new \Bootstrap(false); }
[ "private", "function", "bootstrap", "(", ")", "{", "include", "(", "dirname", "(", "dirname", "(", "dirname", "(", "dirname", "(", "dirname", "(", "dirname", "(", "__FILE__", ")", ")", ")", ")", ")", ")", ".", "DIRECTORY_SEPARATOR", ".", "'bootstrap.php'",...
Load the bootstrap
[ "Load", "the", "bootstrap" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Schedule/Schedule.php#L206-L210
199,656
shrink0r/php-schema
src/Schema.php
Schema.verifySchema
protected function verifySchema(array $schema) { $customTypes = isset($schema['customTypes']) ? $schema['customTypes'] : []; if (!is_array($customTypes)) { throw new Exception("Given value for key 'customTypes' is not an array."); } $properties = isset($schema['propertie...
php
protected function verifySchema(array $schema) { $customTypes = isset($schema['customTypes']) ? $schema['customTypes'] : []; if (!is_array($customTypes)) { throw new Exception("Given value for key 'customTypes' is not an array."); } $properties = isset($schema['propertie...
[ "protected", "function", "verifySchema", "(", "array", "$", "schema", ")", "{", "$", "customTypes", "=", "isset", "(", "$", "schema", "[", "'customTypes'", "]", ")", "?", "$", "schema", "[", "'customTypes'", "]", ":", "[", "]", ";", "if", "(", "!", "...
Ensures that the given schema has valid values. Will yield defaults where available. @param mixed[] $schema @return mixed[] Returns the given schema plus defaults where applicable.
[ "Ensures", "that", "the", "given", "schema", "has", "valid", "values", ".", "Will", "yield", "defaults", "where", "available", "." ]
94293fe897af376dd9d05962e2c516079409dd29
https://github.com/shrink0r/php-schema/blob/94293fe897af376dd9d05962e2c516079409dd29/src/Schema.php#L127-L140
199,657
shrink0r/php-schema
src/Schema.php
Schema.validateMappedValues
protected function validateMappedValues(array $data) { $errors = []; foreach (array_diff_key($this->properties, [ ':any_name:' => 1 ]) as $key => $property) { $result = $this->selectValue($property, $data); if ($result instanceof Ok) { $value = $result->unwra...
php
protected function validateMappedValues(array $data) { $errors = []; foreach (array_diff_key($this->properties, [ ':any_name:' => 1 ]) as $key => $property) { $result = $this->selectValue($property, $data); if ($result instanceof Ok) { $value = $result->unwra...
[ "protected", "function", "validateMappedValues", "(", "array", "$", "data", ")", "{", "$", "errors", "=", "[", "]", ";", "foreach", "(", "array_diff_key", "(", "$", "this", "->", "properties", ",", "[", "':any_name:'", "=>", "1", "]", ")", "as", "$", "...
Validates the values of all explicitly defined schema properties. @param array $data @return ResultInterface
[ "Validates", "the", "values", "of", "all", "explicitly", "defined", "schema", "properties", "." ]
94293fe897af376dd9d05962e2c516079409dd29
https://github.com/shrink0r/php-schema/blob/94293fe897af376dd9d05962e2c516079409dd29/src/Schema.php#L149-L168
199,658
shrink0r/php-schema
src/Schema.php
Schema.selectValue
protected function selectValue(PropertyInterface $property, array $data) { $errors = []; $key = $property->getName(); $value = array_key_exists($key, $data) ? $data[$key] : null; if ($value === null && $property->isRequired()) { if (!array_key_exists($key, $data)) { ...
php
protected function selectValue(PropertyInterface $property, array $data) { $errors = []; $key = $property->getName(); $value = array_key_exists($key, $data) ? $data[$key] : null; if ($value === null && $property->isRequired()) { if (!array_key_exists($key, $data)) { ...
[ "protected", "function", "selectValue", "(", "PropertyInterface", "$", "property", ",", "array", "$", "data", ")", "{", "$", "errors", "=", "[", "]", ";", "$", "key", "=", "$", "property", "->", "getName", "(", ")", ";", "$", "value", "=", "array_key_e...
Returns the property's corresponding value from the given data array. @param PropertyInterface $property @param array $data @return ResultInterface If the value does not exist an error is returned; otherwise Ok is returned.
[ "Returns", "the", "property", "s", "corresponding", "value", "from", "the", "given", "data", "array", "." ]
94293fe897af376dd9d05962e2c516079409dd29
https://github.com/shrink0r/php-schema/blob/94293fe897af376dd9d05962e2c516079409dd29/src/Schema.php#L178-L192
199,659
Mandarin-Medien/MMCmfContentBundle
Twig/NodeTreeRenderExtension.php
NodeTreeRenderExtension.renderNodeTreeFunction
public function renderNodeTreeFunction(\Twig_Environment $twig, NodeInterface $node, array $options=array()) { return $twig->render('MMCmfContentBundle:Form/NodeTree:list.html.twig', array('node' => $node, 'icon' => $this->getIcon(get_class($node)), 'options' => $options)); }
php
public function renderNodeTreeFunction(\Twig_Environment $twig, NodeInterface $node, array $options=array()) { return $twig->render('MMCmfContentBundle:Form/NodeTree:list.html.twig', array('node' => $node, 'icon' => $this->getIcon(get_class($node)), 'options' => $options)); }
[ "public", "function", "renderNodeTreeFunction", "(", "\\", "Twig_Environment", "$", "twig", ",", "NodeInterface", "$", "node", ",", "array", "$", "options", "=", "array", "(", ")", ")", "{", "return", "$", "twig", "->", "render", "(", "'MMCmfContentBundle:Form...
renders the menu @param \Twig_Environment $twig @param NodeInterface $node @param array $options @return string
[ "renders", "the", "menu" ]
503ab31cef3ce068f767de5b72f833526355b726
https://github.com/Mandarin-Medien/MMCmfContentBundle/blob/503ab31cef3ce068f767de5b72f833526355b726/Twig/NodeTreeRenderExtension.php#L46-L49
199,660
wb-crowdfusion/crowdfusion
system/core/classes/mvc/filters/XmlFilterer.php
XmlFilterer.pretty
protected function pretty() { $xml = $this->getParameter('value'); $level = $this->getParameter('level') != null ? intval($this->getParameter('level')) : 6; // get an array containing each XML element $xml = explode("\n", preg_replace('/>\s*</', ">\n<", $xml)); // hold curr...
php
protected function pretty() { $xml = $this->getParameter('value'); $level = $this->getParameter('level') != null ? intval($this->getParameter('level')) : 6; // get an array containing each XML element $xml = explode("\n", preg_replace('/>\s*</', ">\n<", $xml)); // hold curr...
[ "protected", "function", "pretty", "(", ")", "{", "$", "xml", "=", "$", "this", "->", "getParameter", "(", "'value'", ")", ";", "$", "level", "=", "$", "this", "->", "getParameter", "(", "'level'", ")", "!=", "null", "?", "intval", "(", "$", "this", ...
Formats an XML string Expected Param: value string XML snippet @return string
[ "Formats", "an", "XML", "string" ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/mvc/filters/XmlFilterer.php#L43-L78
199,661
wb-crowdfusion/crowdfusion
system/core/classes/systemdb/plugins/PluginService.php
PluginService.getAllActive
public function getAllActive() { $dto = new DTO(); $dto->setParameter("Status", "enabled"); $dto->setParameter("Installed", "1"); $dto->setOrderBy("Priority"); $dto = $this->findAll($dto); return $dto->getResults(); }
php
public function getAllActive() { $dto = new DTO(); $dto->setParameter("Status", "enabled"); $dto->setParameter("Installed", "1"); $dto->setOrderBy("Priority"); $dto = $this->findAll($dto); return $dto->getResults(); }
[ "public", "function", "getAllActive", "(", ")", "{", "$", "dto", "=", "new", "DTO", "(", ")", ";", "$", "dto", "->", "setParameter", "(", "\"Status\"", ",", "\"enabled\"", ")", ";", "$", "dto", "->", "setParameter", "(", "\"Installed\"", ",", "\"1\"", ...
Returns an array of all active plugins @return array
[ "Returns", "an", "array", "of", "all", "active", "plugins" ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/systemdb/plugins/PluginService.php#L44-L55
199,662
SergioMadness/pwf-helpers
src/HttpHelper.php
HttpHelper.isAbsoluteUrl
public static function isAbsoluteUrl($_path) { $url = parse_url($_path); return $url !== false && isset($url['scheme']) && $url['scheme'] != ''; }
php
public static function isAbsoluteUrl($_path) { $url = parse_url($_path); return $url !== false && isset($url['scheme']) && $url['scheme'] != ''; }
[ "public", "static", "function", "isAbsoluteUrl", "(", "$", "_path", ")", "{", "$", "url", "=", "parse_url", "(", "$", "_path", ")", ";", "return", "$", "url", "!==", "false", "&&", "isset", "(", "$", "url", "[", "'scheme'", "]", ")", "&&", "$", "ur...
Check is url absolute @param string $_path @return bool
[ "Check", "is", "url", "absolute" ]
d6cd44807c120356d60618cb08f237841c35e293
https://github.com/SergioMadness/pwf-helpers/blob/d6cd44807c120356d60618cb08f237841c35e293/src/HttpHelper.php#L63-L68
199,663
SergioMadness/pwf-helpers
src/HttpHelper.php
HttpHelper.invokeSoap
public static function invokeSoap($wsdlURL, $method, array $params = array(), array $options = array()) { try { $soapClient = new \SoapClient($wsdlURL, $options); $result = $soapClient->$method($params); ...
php
public static function invokeSoap($wsdlURL, $method, array $params = array(), array $options = array()) { try { $soapClient = new \SoapClient($wsdlURL, $options); $result = $soapClient->$method($params); ...
[ "public", "static", "function", "invokeSoap", "(", "$", "wsdlURL", ",", "$", "method", ",", "array", "$", "params", "=", "array", "(", ")", ",", "array", "$", "options", "=", "array", "(", ")", ")", "{", "try", "{", "$", "soapClient", "=", "new", "...
Invoke SOAP method @param string $wsdlURL @param string $method @param array $params @param array $options @return mixed
[ "Invoke", "SOAP", "method" ]
d6cd44807c120356d60618cb08f237841c35e293
https://github.com/SergioMadness/pwf-helpers/blob/d6cd44807c120356d60618cb08f237841c35e293/src/HttpHelper.php#L79-L90
199,664
cultuurnet/udb3-udb2-bridge
src/Media/ImageCollectionFactory.php
ImageCollectionFactory.fromUdb2Item
public function fromUdb2Item(CultureFeed_Cdb_Item_Base $item) { $dutch = new Language('nl'); $dutchDetail = $item ->getDetails() ->getDetailByLanguage('nl'); $title = $dutchDetail->getTitle(); return $this->fromUdb2Media( $dutchDetail->getMedia(),...
php
public function fromUdb2Item(CultureFeed_Cdb_Item_Base $item) { $dutch = new Language('nl'); $dutchDetail = $item ->getDetails() ->getDetailByLanguage('nl'); $title = $dutchDetail->getTitle(); return $this->fromUdb2Media( $dutchDetail->getMedia(),...
[ "public", "function", "fromUdb2Item", "(", "CultureFeed_Cdb_Item_Base", "$", "item", ")", "{", "$", "dutch", "=", "new", "Language", "(", "'nl'", ")", ";", "$", "dutchDetail", "=", "$", "item", "->", "getDetails", "(", ")", "->", "getDetailByLanguage", "(", ...
Create an ImageCollection from the media in the Dutch details of on an UDB2 item. @param CultureFeed_Cdb_Item_Base $item @return ImageCollection
[ "Create", "an", "ImageCollection", "from", "the", "media", "in", "the", "Dutch", "details", "of", "on", "an", "UDB2", "item", "." ]
2d5922af555ddd4802bc1805a31900d86e038c6a
https://github.com/cultuurnet/udb3-udb2-bridge/blob/2d5922af555ddd4802bc1805a31900d86e038c6a/src/Media/ImageCollectionFactory.php#L58-L72
199,665
gplcart/cli
controllers/Command.php
Command.outputFormat
protected function outputFormat($data, $default = null) { switch ($this->getParam(array('f'), $default)) { case 'print-r': $this->line(print_r($data, true)); break; case 'var-export': $this->line(var_export($data, true)); ...
php
protected function outputFormat($data, $default = null) { switch ($this->getParam(array('f'), $default)) { case 'print-r': $this->line(print_r($data, true)); break; case 'var-export': $this->line(var_export($data, true)); ...
[ "protected", "function", "outputFormat", "(", "$", "data", ",", "$", "default", "=", "null", ")", "{", "switch", "(", "$", "this", "->", "getParam", "(", "array", "(", "'f'", ")", ",", "$", "default", ")", ")", "{", "case", "'print-r'", ":", "$", "...
Output formatted data @param mixed $data @param null|string $default @return null
[ "Output", "formatted", "data" ]
e57dba53e291a225b4bff0c0d9b23d685dd1c125
https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/Command.php#L30-L52
199,666
gplcart/cli
controllers/Command.php
Command.getLimit
protected function getLimit(array $default_limit = array()) { if (empty($default_limit)) { $default_limit = $this->config->get('module_cli_limit', array(0, 100)); } $limit = $this->getParam('l'); if (!isset($limit) || !is_numeric($limit)) { return $default_l...
php
protected function getLimit(array $default_limit = array()) { if (empty($default_limit)) { $default_limit = $this->config->get('module_cli_limit', array(0, 100)); } $limit = $this->getParam('l'); if (!isset($limit) || !is_numeric($limit)) { return $default_l...
[ "protected", "function", "getLimit", "(", "array", "$", "default_limit", "=", "array", "(", ")", ")", "{", "if", "(", "empty", "(", "$", "default_limit", ")", ")", "{", "$", "default_limit", "=", "$", "this", "->", "config", "->", "get", "(", "'module_...
Returns an array of limits form the limit option or a default value @param array $default_limit @return array
[ "Returns", "an", "array", "of", "limits", "form", "the", "limit", "option", "or", "a", "default", "value" ]
e57dba53e291a225b4bff0c0d9b23d685dd1c125
https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/Command.php#L96-L115
199,667
gplcart/cli
controllers/Command.php
Command.explodeList
protected function explodeList($value, $separator = null) { if (is_array($value)) { return $value; } if ($value === '' || !is_string($value)) { return array(); } if (!isset($separator)) { $separator = $this->config->get('module_cli_list_s...
php
protected function explodeList($value, $separator = null) { if (is_array($value)) { return $value; } if ($value === '' || !is_string($value)) { return array(); } if (!isset($separator)) { $separator = $this->config->get('module_cli_list_s...
[ "protected", "function", "explodeList", "(", "$", "value", ",", "$", "separator", "=", "null", ")", "{", "if", "(", "is_array", "(", "$", "value", ")", ")", "{", "return", "$", "value", ";", "}", "if", "(", "$", "value", "===", "''", "||", "!", "...
Explode a string using a separator character @param string $value @param string|null $separator @return array
[ "Explode", "a", "string", "using", "a", "separator", "character" ]
e57dba53e291a225b4bff0c0d9b23d685dd1c125
https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/Command.php#L135-L150
199,668
gplcart/cli
controllers/Command.php
Command.setSubmittedJson
protected function setSubmittedJson($field) { $json = $this->getSubmitted($field); if (isset($json)) { $decoded = json_decode($json, true); if (json_last_error() === JSON_ERROR_NONE) { $this->setSubmitted($field, $decoded); } else { ...
php
protected function setSubmittedJson($field) { $json = $this->getSubmitted($field); if (isset($json)) { $decoded = json_decode($json, true); if (json_last_error() === JSON_ERROR_NONE) { $this->setSubmitted($field, $decoded); } else { ...
[ "protected", "function", "setSubmittedJson", "(", "$", "field", ")", "{", "$", "json", "=", "$", "this", "->", "getSubmitted", "(", "$", "field", ")", ";", "if", "(", "isset", "(", "$", "json", ")", ")", "{", "$", "decoded", "=", "json_decode", "(", ...
Convert a submitted JSON string into an array or FALSE on error @param string $field
[ "Convert", "a", "submitted", "JSON", "string", "into", "an", "array", "or", "FALSE", "on", "error" ]
e57dba53e291a225b4bff0c0d9b23d685dd1c125
https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/Command.php#L156-L172
199,669
gplcart/cli
controllers/Command.php
Command.setSubmittedList
protected function setSubmittedList($field) { $value = $this->getSubmitted($field); if (isset($value)) { $this->setSubmitted($field, $this->explodeList($value)); } }
php
protected function setSubmittedList($field) { $value = $this->getSubmitted($field); if (isset($value)) { $this->setSubmitted($field, $this->explodeList($value)); } }
[ "protected", "function", "setSubmittedList", "(", "$", "field", ")", "{", "$", "value", "=", "$", "this", "->", "getSubmitted", "(", "$", "field", ")", ";", "if", "(", "isset", "(", "$", "value", ")", ")", "{", "$", "this", "->", "setSubmitted", "(",...
Converts a submitted string into an array using a character as an separator @param $field
[ "Converts", "a", "submitted", "string", "into", "an", "array", "using", "a", "character", "as", "an", "separator" ]
e57dba53e291a225b4bff0c0d9b23d685dd1c125
https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/Command.php#L178-L185
199,670
gplcart/cli
controllers/Command.php
Command.validatePromptList
protected function validatePromptList($field, $label, $validator, $default = null) { $input = $this->prompt($label, $default); if ($this->isValidInput($this->explodeList($input), $field, $validator)) { $this->setSubmitted($field, $input); } else { $this->errors(); ...
php
protected function validatePromptList($field, $label, $validator, $default = null) { $input = $this->prompt($label, $default); if ($this->isValidInput($this->explodeList($input), $field, $validator)) { $this->setSubmitted($field, $input); } else { $this->errors(); ...
[ "protected", "function", "validatePromptList", "(", "$", "field", ",", "$", "label", ",", "$", "validator", ",", "$", "default", "=", "null", ")", "{", "$", "input", "=", "$", "this", "->", "prompt", "(", "$", "label", ",", "$", "default", ")", ";", ...
Validate prompt input when dealing with multiple values separated by a list character @param string $field @param string $label @param string $validator @param null|string $default
[ "Validate", "prompt", "input", "when", "dealing", "with", "multiple", "values", "separated", "by", "a", "list", "character" ]
e57dba53e291a225b4bff0c0d9b23d685dd1c125
https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/Command.php#L194-L204
199,671
proem-components/service
Asset.php
Asset.fetch
public function fetch(array $params = [], AssetManagerInterface $assetManager = null) { $asset = $this->asset; $this->set($params); return $this->validate($asset($this, $assetManager)); }
php
public function fetch(array $params = [], AssetManagerInterface $assetManager = null) { $asset = $this->asset; $this->set($params); return $this->validate($asset($this, $assetManager)); }
[ "public", "function", "fetch", "(", "array", "$", "params", "=", "[", "]", ",", "AssetManagerInterface", "$", "assetManager", "=", "null", ")", "{", "$", "asset", "=", "$", "this", "->", "asset", ";", "$", "this", "->", "set", "(", "$", "params", ")"...
Validate and retrieve an instantiated asset. Here the closure is passed this asset container and optionally a Proem\Service\AssetManagerInterface implementation. This provides the closure with the ability to use any required parameters and also be able to call upon any other assets stored in the service manager. @pa...
[ "Validate", "and", "retrieve", "an", "instantiated", "asset", "." ]
8c8e9547f16ecaa2789482f34947618f96e453cc
https://github.com/proem-components/service/blob/8c8e9547f16ecaa2789482f34947618f96e453cc/Asset.php#L140-L147
199,672
sndsgd/form
src/Form.php
Form.merge
public function merge(\sndsgd\Form ...$forms): Form { foreach ($forms as $form) { $fields = array_values($form->getFields()); $this->addFields(...$fields); } return $this; }
php
public function merge(\sndsgd\Form ...$forms): Form { foreach ($forms as $form) { $fields = array_values($form->getFields()); $this->addFields(...$fields); } return $this; }
[ "public", "function", "merge", "(", "\\", "sndsgd", "\\", "Form", "...", "$", "forms", ")", ":", "Form", "{", "foreach", "(", "$", "forms", "as", "$", "form", ")", "{", "$", "fields", "=", "array_values", "(", "$", "form", "->", "getFields", "(", "...
Merge the fields of one or more forms into this one @param \sndsgd\Form $forms The forms to merge @return \sndsgd\Form
[ "Merge", "the", "fields", "of", "one", "or", "more", "forms", "into", "this", "one" ]
56b5b9572a8942aea34c97c7c838b871e198e34f
https://github.com/sndsgd/form/blob/56b5b9572a8942aea34c97c7c838b871e198e34f/src/Form.php#L29-L37
199,673
ekyna/Table
Util/Config.php
Config.isValidSelectionMode
static public function isValidSelectionMode($mode, $throw = false) { $valid = in_array($mode, [ static::SELECTION_SINGLE, static::SELECTION_MULTIPLE, ], true); if (!$valid && $throw) { throw new Exception\InvalidArgumentException("Invalid selection mode '...
php
static public function isValidSelectionMode($mode, $throw = false) { $valid = in_array($mode, [ static::SELECTION_SINGLE, static::SELECTION_MULTIPLE, ], true); if (!$valid && $throw) { throw new Exception\InvalidArgumentException("Invalid selection mode '...
[ "static", "public", "function", "isValidSelectionMode", "(", "$", "mode", ",", "$", "throw", "=", "false", ")", "{", "$", "valid", "=", "in_array", "(", "$", "mode", ",", "[", "static", "::", "SELECTION_SINGLE", ",", "static", "::", "SELECTION_MULTIPLE", "...
Returns whether the given selection mode is valid or not. @param string $mode The selection mode. @param bool $throw Whether to throw an exception if the given mode is not valid. @return bool
[ "Returns", "whether", "the", "given", "selection", "mode", "is", "valid", "or", "not", "." ]
6f06e8fd8a3248d52f3a91f10508471344db311a
https://github.com/ekyna/Table/blob/6f06e8fd8a3248d52f3a91f10508471344db311a/Util/Config.php#L26-L38
199,674
ekyna/Table
Util/Config.php
Config.validateName
static public function validateName($name) { if (null !== $name && !is_string($name)) { throw new Exception\UnexpectedTypeException($name, 'string, integer or null'); } if (!preg_match('/^[a-zA-Z0-9_]+$/', $name)) { throw new Exception\InvalidArgumentException(sprint...
php
static public function validateName($name) { if (null !== $name && !is_string($name)) { throw new Exception\UnexpectedTypeException($name, 'string, integer or null'); } if (!preg_match('/^[a-zA-Z0-9_]+$/', $name)) { throw new Exception\InvalidArgumentException(sprint...
[ "static", "public", "function", "validateName", "(", "$", "name", ")", "{", "if", "(", "null", "!==", "$", "name", "&&", "!", "is_string", "(", "$", "name", ")", ")", "{", "throw", "new", "Exception", "\\", "UnexpectedTypeException", "(", "$", "name", ...
Validates whether the given variable is a valid name. @param string $name The tested name @throws Exception\UnexpectedTypeException If the name is not a string. @throws Exception\InvalidArgumentException If the name contains invalid characters.
[ "Validates", "whether", "the", "given", "variable", "is", "a", "valid", "name", "." ]
6f06e8fd8a3248d52f3a91f10508471344db311a
https://github.com/ekyna/Table/blob/6f06e8fd8a3248d52f3a91f10508471344db311a/Util/Config.php#L48-L60
199,675
DreadLabs/VantomasWebsite
src/ThreatDefense/ReCaptcha.php
ReCaptcha.isThreat
public function isThreat(DataInterface $data) { $response = $this->client->post( self::API_ENDPOINT, [ 'secret' => $this->secret, 'response' => $data->getValue(), ] ); if (!$response->isSuccess()) { return true;...
php
public function isThreat(DataInterface $data) { $response = $this->client->post( self::API_ENDPOINT, [ 'secret' => $this->secret, 'response' => $data->getValue(), ] ); if (!$response->isSuccess()) { return true;...
[ "public", "function", "isThreat", "(", "DataInterface", "$", "data", ")", "{", "$", "response", "=", "$", "this", "->", "client", "->", "post", "(", "self", "::", "API_ENDPOINT", ",", "[", "'secret'", "=>", "$", "this", "->", "secret", ",", "'response'",...
Flags if the used Control impl detected a threat @param DataInterface $data The incoming data to investigate @return bool
[ "Flags", "if", "the", "used", "Control", "impl", "detected", "a", "threat" ]
7f85f2b45bdf5ed9fa9d320c805c416bf99cd668
https://github.com/DreadLabs/VantomasWebsite/blob/7f85f2b45bdf5ed9fa9d320c805c416bf99cd668/src/ThreatDefense/ReCaptcha.php#L64-L85
199,676
Linkvalue-Interne/MajoraFrameworkExtraBundle
src/Majora/Framework/Loader/LazyLoaderTrait.php
LazyLoaderTrait.loadDelegates
private function loadDelegates($entity) { if (!$this instanceof LazyLoaderInterface) { return $entity; } if (!$entity instanceof LazyPropertiesInterface) { throw new \InvalidArgumentException(sprintf('%s objects cannot be hydrated with properties loading delegates wit...
php
private function loadDelegates($entity) { if (!$this instanceof LazyLoaderInterface) { return $entity; } if (!$entity instanceof LazyPropertiesInterface) { throw new \InvalidArgumentException(sprintf('%s objects cannot be hydrated with properties loading delegates wit...
[ "private", "function", "loadDelegates", "(", "$", "entity", ")", "{", "if", "(", "!", "$", "this", "instanceof", "LazyLoaderInterface", ")", "{", "return", "$", "entity", ";", "}", "if", "(", "!", "$", "entity", "instanceof", "LazyPropertiesInterface", ")", ...
Hydrate lazy loads delegate into given Collectionnable, if enabled and if entity supports it. @param LazyPropertiesInterface $object (not hinted to help notation and custom exception) @return LazyPropertiesInterface
[ "Hydrate", "lazy", "loads", "delegate", "into", "given", "Collectionnable", "if", "enabled", "and", "if", "entity", "supports", "it", "." ]
6f368380cfc39d27fafb0844e9a53b4d86d7c034
https://github.com/Linkvalue-Interne/MajoraFrameworkExtraBundle/blob/6f368380cfc39d27fafb0844e9a53b4d86d7c034/src/Majora/Framework/Loader/LazyLoaderTrait.php#L20-L55
199,677
mundschenk-at/wp-data-storage
src/class-transients.php
Transients.get_large_object
public function get_large_object( $key ) { $encoded = $this->get( $key ); if ( false === $encoded ) { return false; } $uncompressed = @\gzdecode( \base64_decode( $encoded ) ); // @codingStandardsIgnoreLine if ( false === $uncompressed ) { return false; } return $this->maybe_fix_object( \unserializ...
php
public function get_large_object( $key ) { $encoded = $this->get( $key ); if ( false === $encoded ) { return false; } $uncompressed = @\gzdecode( \base64_decode( $encoded ) ); // @codingStandardsIgnoreLine if ( false === $uncompressed ) { return false; } return $this->maybe_fix_object( \unserializ...
[ "public", "function", "get_large_object", "(", "$", "key", ")", "{", "$", "encoded", "=", "$", "this", "->", "get", "(", "$", "key", ")", ";", "if", "(", "false", "===", "$", "encoded", ")", "{", "return", "false", ";", "}", "$", "uncompressed", "=...
Retrieves a cached large object. @param string $key The cache key. @return mixed
[ "Retrieves", "a", "cached", "large", "object", "." ]
f06bba365c4a5ebc57f841b17afc5d6b0e6b48d0
https://github.com/mundschenk-at/wp-data-storage/blob/f06bba365c4a5ebc57f841b17afc5d6b0e6b48d0/src/class-transients.php#L117-L129
199,678
mundschenk-at/wp-data-storage
src/class-transients.php
Transients.set_large_object
public function set_large_object( $key, $value, $duration = 0 ) { $compressed = \gzencode( \serialize( $value ) ); // @codingStandardsIgnoreLine if ( false === $compressed ) { return false; // @codeCoverageIgnore } // base64_encode() is used to safely store the gzipped serialized object // in the WordPre...
php
public function set_large_object( $key, $value, $duration = 0 ) { $compressed = \gzencode( \serialize( $value ) ); // @codingStandardsIgnoreLine if ( false === $compressed ) { return false; // @codeCoverageIgnore } // base64_encode() is used to safely store the gzipped serialized object // in the WordPre...
[ "public", "function", "set_large_object", "(", "$", "key", ",", "$", "value", ",", "$", "duration", "=", "0", ")", "{", "$", "compressed", "=", "\\", "gzencode", "(", "\\", "serialize", "(", "$", "value", ")", ")", ";", "// @codingStandardsIgnoreLine", "...
Sets a transient for a large PHP object. The object will be stored in serialized and gzip encoded form using Base64 encoding to ensure binary safety. @param string $key The cache key. @param mixed $value The value to store. @param int $duration Optional. The duration in seconds. Default 0 (no expiration...
[ "Sets", "a", "transient", "for", "a", "large", "PHP", "object", ".", "The", "object", "will", "be", "stored", "in", "serialized", "and", "gzip", "encoded", "form", "using", "Base64", "encoding", "to", "ensure", "binary", "safety", "." ]
f06bba365c4a5ebc57f841b17afc5d6b0e6b48d0
https://github.com/mundschenk-at/wp-data-storage/blob/f06bba365c4a5ebc57f841b17afc5d6b0e6b48d0/src/class-transients.php#L155-L165
199,679
mwyatt/core
src/Request.php
Request.setFiles
protected function setFiles(array $files) { foreach ($files as $associativeName => $details) { foreach ($details as $fileKey => $detail) { $this->files[$fileKey][$associativeName] = $detail; } } }
php
protected function setFiles(array $files) { foreach ($files as $associativeName => $details) { foreach ($details as $fileKey => $detail) { $this->files[$fileKey][$associativeName] = $detail; } } }
[ "protected", "function", "setFiles", "(", "array", "$", "files", ")", "{", "foreach", "(", "$", "files", "as", "$", "associativeName", "=>", "$", "details", ")", "{", "foreach", "(", "$", "details", "as", "$", "fileKey", "=>", "$", "detail", ")", "{", ...
store the request files in a nice way @param array $files
[ "store", "the", "request", "files", "in", "a", "nice", "way" ]
8ea9d67cc84fe6aff17a469c703d5492dbcd93ed
https://github.com/mwyatt/core/blob/8ea9d67cc84fe6aff17a469c703d5492dbcd93ed/src/Request.php#L35-L42
199,680
linpax/microphp-framework
src/mvc/controllers/Controller.php
Controller.getActionClassByName
public function getActionClassByName($name) { if (method_exists($this, 'actions')) { $actions = $this->actions(); if ( !empty($actions[$name]) && class_exists($actions[$name]) && is_subclass_of($actions[$name], '\Micro\Mvc\Action') ...
php
public function getActionClassByName($name) { if (method_exists($this, 'actions')) { $actions = $this->actions(); if ( !empty($actions[$name]) && class_exists($actions[$name]) && is_subclass_of($actions[$name], '\Micro\Mvc\Action') ...
[ "public", "function", "getActionClassByName", "(", "$", "name", ")", "{", "if", "(", "method_exists", "(", "$", "this", ",", "'actions'", ")", ")", "{", "$", "actions", "=", "$", "this", "->", "actions", "(", ")", ";", "if", "(", "!", "empty", "(", ...
Get action class by name @access public @param string $name action name @return bool
[ "Get", "action", "class", "by", "name" ]
11f3370f3f64c516cce9b84ecd8276c6e9ae8df9
https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/mvc/controllers/Controller.php#L114-L129
199,681
lasallecms/lasallecms-l5-formhandling-pkg
src/AdminFormHandling/AdminFormBaseController.php
AdminFormBaseController.confirmDeletionMultipleRows
public function confirmDeletionMultipleRows(Request $request) { $checkboxes = $request->input('checkbox'); if (!$checkboxes) { // flash message with redirect Session::flash('status_code', 400 ); $message = 'You have not selected any rows for deletion.'; ...
php
public function confirmDeletionMultipleRows(Request $request) { $checkboxes = $request->input('checkbox'); if (!$checkboxes) { // flash message with redirect Session::flash('status_code', 400 ); $message = 'You have not selected any rows for deletion.'; ...
[ "public", "function", "confirmDeletionMultipleRows", "(", "Request", "$", "request", ")", "{", "$", "checkboxes", "=", "$", "request", "->", "input", "(", "'checkbox'", ")", ";", "if", "(", "!", "$", "checkboxes", ")", "{", "// flash message with redirect", "S...
Confirm multiple row deletions @return Response
[ "Confirm", "multiple", "row", "deletions" ]
5f8c1e0515d24de097dc7d1e85a4bc5eebdd47c1
https://github.com/lasallecms/lasallecms-l5-formhandling-pkg/blob/5f8c1e0515d24de097dc7d1e85a4bc5eebdd47c1/src/AdminFormHandling/AdminFormBaseController.php#L562-L597
199,682
lasallecms/lasallecms-l5-formhandling-pkg
src/AdminFormHandling/AdminFormBaseController.php
AdminFormBaseController.getFieldLIst
public function getFieldLIst() { if (!isset($this->model->field_list)) { return $this->model->getFieldList(); } return $this->model->field_list; }
php
public function getFieldLIst() { if (!isset($this->model->field_list)) { return $this->model->getFieldList(); } return $this->model->field_list; }
[ "public", "function", "getFieldLIst", "(", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "model", "->", "field_list", ")", ")", "{", "return", "$", "this", "->", "model", "->", "getFieldList", "(", ")", ";", "}", "return", "$", "this", ...
get the Model's Field List @return array
[ "get", "the", "Model", "s", "Field", "List" ]
5f8c1e0515d24de097dc7d1e85a4bc5eebdd47c1
https://github.com/lasallecms/lasallecms-l5-formhandling-pkg/blob/5f8c1e0515d24de097dc7d1e85a4bc5eebdd47c1/src/AdminFormHandling/AdminFormBaseController.php#L811-L819
199,683
phossa/phossa-di
src/Phossa/Di/Definition/Loader/LoadableTrait.php
LoadableTrait.loadDefinitionFromFile
protected function loadDefinitionFromFile(/*# string */ $file)/*# : array */ { // check first $this->checkFileExistence($file); // get definition type and loader class base on suffix list($type, $class) = $this->getFileTypeClass($file); // load into an array $data =...
php
protected function loadDefinitionFromFile(/*# string */ $file)/*# : array */ { // check first $this->checkFileExistence($file); // get definition type and loader class base on suffix list($type, $class) = $this->getFileTypeClass($file); // load into an array $data =...
[ "protected", "function", "loadDefinitionFromFile", "(", "/*# string */", "$", "file", ")", "/*# : array */", "{", "// check first", "$", "this", "->", "checkFileExistence", "(", "$", "file", ")", ";", "// get definition type and loader class base on suffix", "list", "(", ...
Load definitions from a file @param string $file definition file name @return array @throws NotFoundException if file not found @throws LogicException if something goes wrong @access protected
[ "Load", "definitions", "from", "a", "file" ]
bbe1e95b081068e2bc49c6cd465f38aab0374be5
https://github.com/phossa/phossa-di/blob/bbe1e95b081068e2bc49c6cd465f38aab0374be5/src/Phossa/Di/Definition/Loader/LoadableTrait.php#L42-L55
199,684
phossa/phossa-di
src/Phossa/Di/Definition/Loader/LoadableTrait.php
LoadableTrait.getFileTypeClass
protected function getFileTypeClass(/*# string */ $filename) { $parts = explode('.', strtolower(basename($filename))); $count = count($parts); $suffix = $count > 1 ? $parts[$count - 1] : 'php'; $type = $count > 2 ? $parts[$count - 2][0] : '_'; // valid types $typ...
php
protected function getFileTypeClass(/*# string */ $filename) { $parts = explode('.', strtolower(basename($filename))); $count = count($parts); $suffix = $count > 1 ? $parts[$count - 1] : 'php'; $type = $count > 2 ? $parts[$count - 2][0] : '_'; // valid types $typ...
[ "protected", "function", "getFileTypeClass", "(", "/*# string */", "$", "filename", ")", "{", "$", "parts", "=", "explode", "(", "'.'", ",", "strtolower", "(", "basename", "(", "$", "filename", ")", ")", ")", ";", "$", "count", "=", "count", "(", "$", ...
Get definition type and loader class *.[php|json|xml] : all definitions *.s*.[php|json|xml] : service definitions *.p*.[php|json|xml] : parameter definitions *.m*.[php|json|xml] : mappings definitions @param string $filename definition file name @return string[] @throws LogicException if something goes wrong @acc...
[ "Get", "definition", "type", "and", "loader", "class" ]
bbe1e95b081068e2bc49c6cd465f38aab0374be5
https://github.com/phossa/phossa-di/blob/bbe1e95b081068e2bc49c6cd465f38aab0374be5/src/Phossa/Di/Definition/Loader/LoadableTrait.php#L70-L84
199,685
phossa/phossa-di
src/Phossa/Di/Definition/Loader/LoadableTrait.php
LoadableTrait.checkFileExistence
protected function checkFileExistence(/*# string */ $file) { if (!file_exists($file) || !is_readable($file)) { throw new NotFoundException( Message::get(Message::DEFINITION_NOT_FOUND, $file), Message::DEFINITION_NOT_FOUND ); } }
php
protected function checkFileExistence(/*# string */ $file) { if (!file_exists($file) || !is_readable($file)) { throw new NotFoundException( Message::get(Message::DEFINITION_NOT_FOUND, $file), Message::DEFINITION_NOT_FOUND ); } }
[ "protected", "function", "checkFileExistence", "(", "/*# string */", "$", "file", ")", "{", "if", "(", "!", "file_exists", "(", "$", "file", ")", "||", "!", "is_readable", "(", "$", "file", ")", ")", "{", "throw", "new", "NotFoundException", "(", "Message"...
Check file exists and readable @param string $file definition file name @return void @throws NotFoundException if not exist or readable @access protected
[ "Check", "file", "exists", "and", "readable" ]
bbe1e95b081068e2bc49c6cd465f38aab0374be5
https://github.com/phossa/phossa-di/blob/bbe1e95b081068e2bc49c6cd465f38aab0374be5/src/Phossa/Di/Definition/Loader/LoadableTrait.php#L94-L102
199,686
phossa/phossa-di
src/Phossa/Di/Definition/Loader/LoadableTrait.php
LoadableTrait.getLoaderClass
protected function getLoaderClass( /*# string */ $suffix, /*# string */ $filename ) { $class = __NAMESPACE__ . '\\Loader' . ucfirst($suffix); if (!class_exists($class)) { throw new LogicException( Message::get(Message::FILE_SUFFIX_UNKNOWN, $filename), ...
php
protected function getLoaderClass( /*# string */ $suffix, /*# string */ $filename ) { $class = __NAMESPACE__ . '\\Loader' . ucfirst($suffix); if (!class_exists($class)) { throw new LogicException( Message::get(Message::FILE_SUFFIX_UNKNOWN, $filename), ...
[ "protected", "function", "getLoaderClass", "(", "/*# string */", "$", "suffix", ",", "/*# string */", "$", "filename", ")", "{", "$", "class", "=", "__NAMESPACE__", ".", "'\\\\Loader'", ".", "ucfirst", "(", "$", "suffix", ")", ";", "if", "(", "!", "class_exi...
Get loader class name base on suffix @param string $suffix @param string $filename @return string classname @throws LogicException if not class not found @access protected
[ "Get", "loader", "class", "name", "base", "on", "suffix" ]
bbe1e95b081068e2bc49c6cd465f38aab0374be5
https://github.com/phossa/phossa-di/blob/bbe1e95b081068e2bc49c6cd465f38aab0374be5/src/Phossa/Di/Definition/Loader/LoadableTrait.php#L113-L125
199,687
azhai/code-refactor
src/CodeRefactor/Mixin/CodeMixin.php
CodeMixin.setName
public function setName($name) { $this->name = $name; if ($this->node) { $this->node->name = $name; } }
php
public function setName($name) { $this->name = $name; if ($this->node) { $this->node->name = $name; } }
[ "public", "function", "setName", "(", "$", "name", ")", "{", "$", "this", "->", "name", "=", "$", "name", ";", "if", "(", "$", "this", "->", "node", ")", "{", "$", "this", "->", "node", "->", "name", "=", "$", "name", ";", "}", "}" ]
Set the node name.
[ "Set", "the", "node", "name", "." ]
cddb437d72f8239957daeba8211dda5e9366d6ca
https://github.com/azhai/code-refactor/blob/cddb437d72f8239957daeba8211dda5e9366d6ca/src/CodeRefactor/Mixin/CodeMixin.php#L39-L45
199,688
wb-crowdfusion/crowdfusion
system/core/classes/libraries/svn/SubversionTools.php
SubversionTools.getInfo
public function getInfo($path = '.') { if(!$this->svnEnabled) return false; $user = escapeshellarg($this->svnUsername); $pw = escapeshellarg($this->svnPassword); $creds = !empty($this->svnUsername) && !empty($this->svnPassword) ? "--username {$user} --password {$pw}" : ...
php
public function getInfo($path = '.') { if(!$this->svnEnabled) return false; $user = escapeshellarg($this->svnUsername); $pw = escapeshellarg($this->svnPassword); $creds = !empty($this->svnUsername) && !empty($this->svnPassword) ? "--username {$user} --password {$pw}" : ...
[ "public", "function", "getInfo", "(", "$", "path", "=", "'.'", ")", "{", "if", "(", "!", "$", "this", "->", "svnEnabled", ")", "return", "false", ";", "$", "user", "=", "escapeshellarg", "(", "$", "this", "->", "svnUsername", ")", ";", "$", "pw", "...
Performs an svn info on the provided path. Returns an array of SVN commit data, or false on failure. @param string $path @return array|bool
[ "Performs", "an", "svn", "info", "on", "the", "provided", "path", ".", "Returns", "an", "array", "of", "SVN", "commit", "data", "or", "false", "on", "failure", "." ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/libraries/svn/SubversionTools.php#L77-L129
199,689
wb-crowdfusion/crowdfusion
system/core/classes/libraries/svn/SubversionTools.php
SubversionTools.update
public function update($path = '.') { if(!$this->svnEnabled) return false; $user = escapeshellarg($this->svnUsername); $pw = escapeshellarg($this->svnPassword); $creds = !empty($this->svnUsername) && !empty($this->svnPassword) ? "--username {$user} --password {$pw}" : ...
php
public function update($path = '.') { if(!$this->svnEnabled) return false; $user = escapeshellarg($this->svnUsername); $pw = escapeshellarg($this->svnPassword); $creds = !empty($this->svnUsername) && !empty($this->svnPassword) ? "--username {$user} --password {$pw}" : ...
[ "public", "function", "update", "(", "$", "path", "=", "'.'", ")", "{", "if", "(", "!", "$", "this", "->", "svnEnabled", ")", "return", "false", ";", "$", "user", "=", "escapeshellarg", "(", "$", "this", "->", "svnUsername", ")", ";", "$", "pw", "=...
performs an svn update of the path provided @param string $path @return bool status of update
[ "performs", "an", "svn", "update", "of", "the", "path", "provided" ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/libraries/svn/SubversionTools.php#L137-L159
199,690
wb-crowdfusion/crowdfusion
system/core/classes/libraries/svn/SubversionTools.php
SubversionTools.copyPath
public function copyPath($fromPath, $toPath, $commitMessage) { $this->_validateSvnConfig(); $user = escapeshellarg($this->svnUsername); $pw = escapeshellarg($this->svnPassword); $fromPath = trim($fromPath, '/'); $toPath = trim($toPath, '/'); $fromPath = "{$this->svn...
php
public function copyPath($fromPath, $toPath, $commitMessage) { $this->_validateSvnConfig(); $user = escapeshellarg($this->svnUsername); $pw = escapeshellarg($this->svnPassword); $fromPath = trim($fromPath, '/'); $toPath = trim($toPath, '/'); $fromPath = "{$this->svn...
[ "public", "function", "copyPath", "(", "$", "fromPath", ",", "$", "toPath", ",", "$", "commitMessage", ")", "{", "$", "this", "->", "_validateSvnConfig", "(", ")", ";", "$", "user", "=", "escapeshellarg", "(", "$", "this", "->", "svnUsername", ")", ";", ...
Performs an svn copy of a repository path to another svn path in the same repository fromPath and toPath should contain only the most specific portion of the SVN repository URL needed to make the copy. For example, a from path could be 'trunk' and to path 'tags'. Another example would be copying from trunk to a branc...
[ "Performs", "an", "svn", "copy", "of", "a", "repository", "path", "to", "another", "svn", "path", "in", "the", "same", "repository" ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/libraries/svn/SubversionTools.php#L179-L204
199,691
wb-crowdfusion/crowdfusion
system/core/classes/libraries/svn/SubversionTools.php
SubversionTools._validateSvnConfig
protected function _validateSvnConfig() { if(!$this->svnEnabled) throw new SubversionToolsException("Subversion support must be enabled for this action!"); if(empty($this->svnUsername)) throw new SubversionToolsException("Property svn.username is required"); if(empt...
php
protected function _validateSvnConfig() { if(!$this->svnEnabled) throw new SubversionToolsException("Subversion support must be enabled for this action!"); if(empty($this->svnUsername)) throw new SubversionToolsException("Property svn.username is required"); if(empt...
[ "protected", "function", "_validateSvnConfig", "(", ")", "{", "if", "(", "!", "$", "this", "->", "svnEnabled", ")", "throw", "new", "SubversionToolsException", "(", "\"Subversion support must be enabled for this action!\"", ")", ";", "if", "(", "empty", "(", "$", ...
validates that all properties needed to work with the svn repository are populated @throws SubversionToolsException @return bool
[ "validates", "that", "all", "properties", "needed", "to", "work", "with", "the", "svn", "repository", "are", "populated" ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/libraries/svn/SubversionTools.php#L348-L363
199,692
shgysk8zer0/core_api
traits/socket_client.php
Socket_Client.socketAccept
final public function socketAccept($socket = null) { if (is_resource($socket)) { $this->socket = socket_accept($socket); return $this->socket; } else { throw new InvalidArgumentException(__METHOD__ . ' expects $socket to be an instance of resource. ' . gettype($resource) . ' given instead'); } }
php
final public function socketAccept($socket = null) { if (is_resource($socket)) { $this->socket = socket_accept($socket); return $this->socket; } else { throw new InvalidArgumentException(__METHOD__ . ' expects $socket to be an instance of resource. ' . gettype($resource) . ' given instead'); } }
[ "final", "public", "function", "socketAccept", "(", "$", "socket", "=", "null", ")", "{", "if", "(", "is_resource", "(", "$", "socket", ")", ")", "{", "$", "this", "->", "socket", "=", "socket_accept", "(", "$", "socket", ")", ";", "return", "$", "th...
Creates a client side sockets from a server side one @param resource $socket Socket created through socket_create @return resource
[ "Creates", "a", "client", "side", "sockets", "from", "a", "server", "side", "one" ]
9e9b8baf761af874b95256ad2462e55fbb2b2e58
https://github.com/shgysk8zer0/core_api/blob/9e9b8baf761af874b95256ad2462e55fbb2b2e58/traits/socket_client.php#L42-L50
199,693
shgysk8zer0/core_api
traits/socket_client.php
Socket_Client.socketWrite
final public function socketWrite($message = '', $length = null) { return @socket_write( $this->socket, "{$message}", is_int($length) ? $length : strlen($message) ); }
php
final public function socketWrite($message = '', $length = null) { return @socket_write( $this->socket, "{$message}", is_int($length) ? $length : strlen($message) ); }
[ "final", "public", "function", "socketWrite", "(", "$", "message", "=", "''", ",", "$", "length", "=", "null", ")", "{", "return", "@", "socket_write", "(", "$", "this", "->", "socket", ",", "\"{$message}\"", ",", "is_int", "(", "$", "length", ")", "?"...
Write to client socket @param string $message The message to send @param int $length Optional lenght (defaults to length of $message) @return int The number of bytes successfully written to the socket or FALSE on failure
[ "Write", "to", "client", "socket" ]
9e9b8baf761af874b95256ad2462e55fbb2b2e58
https://github.com/shgysk8zer0/core_api/blob/9e9b8baf761af874b95256ad2462e55fbb2b2e58/traits/socket_client.php#L71-L78
199,694
Wedeto/DB
src/Query/SubQuery.php
SubQuery.toSQL
public function toSQL(Parameters $params, bool $inner_clause) { $scope = $params->getSubScope($this->scope_id); $this->scope_id = $scope->getScopeID(); $q = $this->getQuery(); return '(' . $params->getDriver()->toSQL($scope, $q, false) . ')'; }
php
public function toSQL(Parameters $params, bool $inner_clause) { $scope = $params->getSubScope($this->scope_id); $this->scope_id = $scope->getScopeID(); $q = $this->getQuery(); return '(' . $params->getDriver()->toSQL($scope, $q, false) . ')'; }
[ "public", "function", "toSQL", "(", "Parameters", "$", "params", ",", "bool", "$", "inner_clause", ")", "{", "$", "scope", "=", "$", "params", "->", "getSubScope", "(", "$", "this", "->", "scope_id", ")", ";", "$", "this", "->", "scope_id", "=", "$", ...
Write a sub query as SQL query syntax @param Parameters $params The query parameters: tables and placeholder values @param SubQuery $query The query to write @return string The generated SQL
[ "Write", "a", "sub", "query", "as", "SQL", "query", "syntax" ]
715f8f2e3ae6b53c511c40b620921cb9c87e6f62
https://github.com/Wedeto/DB/blob/715f8f2e3ae6b53c511c40b620921cb9c87e6f62/src/Query/SubQuery.php#L59-L66
199,695
TuumPHP/Web
src/View/ViewProviders.php
ViewProviders.getViewEngine
public function getViewEngine() { if($this->app->exists(ViewEngineInterface::class)) { return $this->app->get(ViewEngineInterface::class); } $view = View::forge($this->web->view_dir); $this->app->set(ViewEngineInterface::class, $view, true); return $view; }
php
public function getViewEngine() { if($this->app->exists(ViewEngineInterface::class)) { return $this->app->get(ViewEngineInterface::class); } $view = View::forge($this->web->view_dir); $this->app->set(ViewEngineInterface::class, $view, true); return $view; }
[ "public", "function", "getViewEngine", "(", ")", "{", "if", "(", "$", "this", "->", "app", "->", "exists", "(", "ViewEngineInterface", "::", "class", ")", ")", "{", "return", "$", "this", "->", "app", "->", "get", "(", "ViewEngineInterface", "::", "class...
get shared view engine, Renderer as default. @return ViewEngineInterface|View
[ "get", "shared", "view", "engine", "Renderer", "as", "default", "." ]
8f296b6358aa93226ce08d6cc54a309f5b0a9820
https://github.com/TuumPHP/Web/blob/8f296b6358aa93226ce08d6cc54a309f5b0a9820/src/View/ViewProviders.php#L43-L51
199,696
TuumPHP/Web
src/View/ViewProviders.php
ViewProviders.getErrorView
public function getErrorView() { if($this->app->exists(ErrorView::class)) { return $this->app->get(ErrorView::class); } $error_files = (array)$this->app->get(Web::ERROR_VIEWS); if (empty($error_files)) { $this->app->set(ErrorView::class, null, true); ...
php
public function getErrorView() { if($this->app->exists(ErrorView::class)) { return $this->app->get(ErrorView::class); } $error_files = (array)$this->app->get(Web::ERROR_VIEWS); if (empty($error_files)) { $this->app->set(ErrorView::class, null, true); ...
[ "public", "function", "getErrorView", "(", ")", "{", "if", "(", "$", "this", "->", "app", "->", "exists", "(", "ErrorView", "::", "class", ")", ")", "{", "return", "$", "this", "->", "app", "->", "get", "(", "ErrorView", "::", "class", ")", ";", "}...
get error view render, ErrorView, @return ErrorView|null
[ "get", "error", "view", "render", "ErrorView" ]
8f296b6358aa93226ce08d6cc54a309f5b0a9820
https://github.com/TuumPHP/Web/blob/8f296b6358aa93226ce08d6cc54a309f5b0a9820/src/View/ViewProviders.php#L58-L78
199,697
afroware/jwtauth
src/Providers/AbstractServiceProvider.php
AbstractServiceProvider.registerManager
protected function registerManager() { $this->app->singleton('afroware.jwT.manager', function ($app) { $instance = new Manager( $app['afroware.jwT.provider.jwT'], $app['afroware.jwT.blacklist'], $app['afroware.jwT.payload.factory'] ); ...
php
protected function registerManager() { $this->app->singleton('afroware.jwT.manager', function ($app) { $instance = new Manager( $app['afroware.jwT.provider.jwT'], $app['afroware.jwT.blacklist'], $app['afroware.jwT.payload.factory'] ); ...
[ "protected", "function", "registerManager", "(", ")", "{", "$", "this", "->", "app", "->", "singleton", "(", "'afroware.jwT.manager'", ",", "function", "(", "$", "app", ")", "{", "$", "instance", "=", "new", "Manager", "(", "$", "app", "[", "'afroware.jwT....
Register the bindings for the JwT Manager. @return void
[ "Register", "the", "bindings", "for", "the", "JwT", "Manager", "." ]
54a0aebd811d87bfdd2b3668696fd53f50490cc1
https://github.com/afroware/jwtauth/blob/54a0aebd811d87bfdd2b3668696fd53f50490cc1/src/Providers/AbstractServiceProvider.php#L171-L183
199,698
afroware/jwtauth
src/Providers/AbstractServiceProvider.php
AbstractServiceProvider.registerClaimFactory
protected function registerClaimFactory() { $this->app->singleton('afroware.jwT.claim.factory', function ($app) { $factory = new ClaimFactory($app['request']); $app->refresh('request', $factory, 'setRequest'); return $factory->setTTL($this->config('ttl')); }); ...
php
protected function registerClaimFactory() { $this->app->singleton('afroware.jwT.claim.factory', function ($app) { $factory = new ClaimFactory($app['request']); $app->refresh('request', $factory, 'setRequest'); return $factory->setTTL($this->config('ttl')); }); ...
[ "protected", "function", "registerClaimFactory", "(", ")", "{", "$", "this", "->", "app", "->", "singleton", "(", "'afroware.jwT.claim.factory'", ",", "function", "(", "$", "app", ")", "{", "$", "factory", "=", "new", "ClaimFactory", "(", "$", "app", "[", ...
Register the bindings for the Claim Factory. @return void
[ "Register", "the", "bindings", "for", "the", "Claim", "Factory", "." ]
54a0aebd811d87bfdd2b3668696fd53f50490cc1
https://github.com/afroware/jwtauth/blob/54a0aebd811d87bfdd2b3668696fd53f50490cc1/src/Providers/AbstractServiceProvider.php#L275-L283
199,699
Vectrex/vxPHP
src/Webpage/MenuEntry/MenuEntry.php
MenuEntry.isAuthenticatedByRole
public function isAuthenticatedByRole(Role $role) { return !isset($this->auth) || $this->auth === $role->getRoleName(); }
php
public function isAuthenticatedByRole(Role $role) { return !isset($this->auth) || $this->auth === $role->getRoleName(); }
[ "public", "function", "isAuthenticatedByRole", "(", "Role", "$", "role", ")", "{", "return", "!", "isset", "(", "$", "this", "->", "auth", ")", "||", "$", "this", "->", "auth", "===", "$", "role", "->", "getRoleName", "(", ")", ";", "}" ]
check whether a role matches the auth attribute of the menu entry @param Role $role @return boolean
[ "check", "whether", "a", "role", "matches", "the", "auth", "attribute", "of", "the", "menu", "entry" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Webpage/MenuEntry/MenuEntry.php#L147-L151