id
int32
0
241k
repo
stringlengths
6
63
path
stringlengths
5
140
func_name
stringlengths
3
151
original_string
stringlengths
84
13k
language
stringclasses
1 value
code
stringlengths
84
13k
code_tokens
list
docstring
stringlengths
3
47.2k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
91
247
195,900
faustbrian/HTTP
src/HttpResponse.php
HttpResponse.xml
public function xml(): ?SimpleXMLElement { return simplexml_load_string( utf8_encode($this->response->getBody()->getContents()), 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NOBLANKS ); }
php
public function xml(): ?SimpleXMLElement { return simplexml_load_string( utf8_encode($this->response->getBody()->getContents()), 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NOBLANKS ); }
[ "public", "function", "xml", "(", ")", ":", "?", "SimpleXMLElement", "{", "return", "simplexml_load_string", "(", "utf8_encode", "(", "$", "this", "->", "response", "->", "getBody", "(", ")", "->", "getContents", "(", ")", ")", ",", "'SimpleXMLElement'", ","...
Gets the body of the message as XML. @return \SimpleXMLElement
[ "Gets", "the", "body", "of", "the", "message", "as", "XML", "." ]
ab24b37ea211eb106237a813ec8d47ec1d4fe199
https://github.com/faustbrian/HTTP/blob/ab24b37ea211eb106237a813ec8d47ec1d4fe199/src/HttpResponse.php#L85-L92
195,901
faustbrian/HTTP
src/HttpResponse.php
HttpResponse.headers
public function headers(): array { return collect($this->response->getHeaders())->mapWithKeys(function ($v, $k) { return [$k => $v[0]]; })->all(); }
php
public function headers(): array { return collect($this->response->getHeaders())->mapWithKeys(function ($v, $k) { return [$k => $v[0]]; })->all(); }
[ "public", "function", "headers", "(", ")", ":", "array", "{", "return", "collect", "(", "$", "this", "->", "response", "->", "getHeaders", "(", ")", ")", "->", "mapWithKeys", "(", "function", "(", "$", "v", ",", "$", "k", ")", "{", "return", "[", "...
Retrieves all header values. @param string $header @return array
[ "Retrieves", "all", "header", "values", "." ]
ab24b37ea211eb106237a813ec8d47ec1d4fe199
https://github.com/faustbrian/HTTP/blob/ab24b37ea211eb106237a813ec8d47ec1d4fe199/src/HttpResponse.php#L113-L118
195,902
ComPHPPuebla/restful-extensions
src/ComPHPPuebla/Slim/Middleware/ContentNegotiationMiddleware.php
ContentNegotiationMiddleware.call
public function call() { if (!$this->responseShouldHaveBody()) { $this->next->call(); return; } $negotiator = new Negotiator(); $format = $negotiator->getBest($this->app->request()->headers('Accept')); if ($format && in_array(($type = $format->getV...
php
public function call() { if (!$this->responseShouldHaveBody()) { $this->next->call(); return; } $negotiator = new Negotiator(); $format = $negotiator->getBest($this->app->request()->headers('Accept')); if ($format && in_array(($type = $format->getV...
[ "public", "function", "call", "(", ")", "{", "if", "(", "!", "$", "this", "->", "responseShouldHaveBody", "(", ")", ")", "{", "$", "this", "->", "next", "->", "call", "(", ")", ";", "return", ";", "}", "$", "negotiator", "=", "new", "Negotiator", "...
Ensure the provided content type is valid and set the proper response content type @see \Slim\Middleware::call()
[ "Ensure", "the", "provided", "content", "type", "is", "valid", "and", "set", "the", "proper", "response", "content", "type" ]
3dc5e554d7ebe1305eed4cd4ec71a6944316199c
https://github.com/ComPHPPuebla/restful-extensions/blob/3dc5e554d7ebe1305eed4cd4ec71a6944316199c/src/ComPHPPuebla/Slim/Middleware/ContentNegotiationMiddleware.php#L27-L48
195,903
mcaskill/tokenlist
src/TokenList/StringTokenList.php
StringTokenList.contains
public function contains( $token ) { $token = (string) $token; $this->__validate( $token ); return $this->__contains( $token ); }
php
public function contains( $token ) { $token = (string) $token; $this->__validate( $token ); return $this->__contains( $token ); }
[ "public", "function", "contains", "(", "$", "token", ")", "{", "$", "token", "=", "(", "string", ")", "$", "token", ";", "$", "this", "->", "__validate", "(", "$", "token", ")", ";", "return", "$", "this", "->", "__contains", "(", "$", "token", ")"...
Checks if a the list of tokens contains the provided token. @param string A case-sensitive string representing the token. @return bool Returns TRUE if the token exists otherwise FALSE.
[ "Checks", "if", "a", "the", "list", "of", "tokens", "contains", "the", "provided", "token", "." ]
5266dc37157179c86f475a7a9301887d470b3664
https://github.com/mcaskill/tokenlist/blob/5266dc37157179c86f475a7a9301887d470b3664/src/TokenList/StringTokenList.php#L260-L266
195,904
mcaskill/tokenlist
src/TokenList/StringTokenList.php
StringTokenList.replace
public function replace( $old_token, $new_token ) { $updated = false; $old_token = (string) $old_token; $new_token = (string) $new_token; $this->__validate( $old_token ); $this->__validate( $new_token ); if ( $index = array_search( $old_token, $this->tokens, true ) ) { $this->tokens[ $index ] = $new_...
php
public function replace( $old_token, $new_token ) { $updated = false; $old_token = (string) $old_token; $new_token = (string) $new_token; $this->__validate( $old_token ); $this->__validate( $new_token ); if ( $index = array_search( $old_token, $this->tokens, true ) ) { $this->tokens[ $index ] = $new_...
[ "public", "function", "replace", "(", "$", "old_token", ",", "$", "new_token", ")", "{", "$", "updated", "=", "false", ";", "$", "old_token", "=", "(", "string", ")", "$", "old_token", ";", "$", "new_token", "=", "(", "string", ")", "$", "new_token", ...
Replace an existing token for a new one. If the $old_token does not exist, the new one will not be added. This method is a shortcut for StringTokenList::remove( $old_token ) followed by StringTokenList::add( $new_token ). @param string $old_token A case-sensitive string representing an existing token to remove. @par...
[ "Replace", "an", "existing", "token", "for", "a", "new", "one", "." ]
5266dc37157179c86f475a7a9301887d470b3664
https://github.com/mcaskill/tokenlist/blob/5266dc37157179c86f475a7a9301887d470b3664/src/TokenList/StringTokenList.php#L281-L301
195,905
mcaskill/tokenlist
src/TokenList/StringTokenList.php
StringTokenList.toggle
public function toggle( $token, $force = null ) { $output = null; $contains = $this->contains( $token ); if ( $contains ) { if ( ! $force ) { $this->__remove( [ $token ] ); $change = false; } else { $change = true; } } else { if ( false === $force ) { $change = false; } ...
php
public function toggle( $token, $force = null ) { $output = null; $contains = $this->contains( $token ); if ( $contains ) { if ( ! $force ) { $this->__remove( [ $token ] ); $change = false; } else { $change = true; } } else { if ( false === $force ) { $change = false; } ...
[ "public", "function", "toggle", "(", "$", "token", ",", "$", "force", "=", "null", ")", "{", "$", "output", "=", "null", ";", "$", "contains", "=", "$", "this", "->", "contains", "(", "$", "token", ")", ";", "if", "(", "$", "contains", ")", "{", ...
If the name exists within the token list, it will be removed. If name does not exist, it will be added. Errors are not thrown If the token does not exist. @param string $tokens A case-sensitive string representing a token. @param bool|null $force When TRUE, adds the token (via self::add()). When FALSE, the token ...
[ "If", "the", "name", "exists", "within", "the", "token", "list", "it", "will", "be", "removed", ".", "If", "name", "does", "not", "exist", "it", "will", "be", "added", "." ]
5266dc37157179c86f475a7a9301887d470b3664
https://github.com/mcaskill/tokenlist/blob/5266dc37157179c86f475a7a9301887d470b3664/src/TokenList/StringTokenList.php#L318-L343
195,906
mcaskill/tokenlist
src/TokenList/StringTokenList.php
StringTokenList.__modify
protected function __modify( $action, $arguments ) { $tokens = $arguments; $method = "__{$action}"; if ( 1 === count( $arguments ) ) { $tokens = reset( $tokens ); if ( is_string( $tokens ) ) { $tokens = explode( ' ', $tokens ); } } if ( is_array( $tokens ) ) { $tokens = array_map( 'strval'...
php
protected function __modify( $action, $arguments ) { $tokens = $arguments; $method = "__{$action}"; if ( 1 === count( $arguments ) ) { $tokens = reset( $tokens ); if ( is_string( $tokens ) ) { $tokens = explode( ' ', $tokens ); } } if ( is_array( $tokens ) ) { $tokens = array_map( 'strval'...
[ "protected", "function", "__modify", "(", "$", "action", ",", "$", "arguments", ")", "{", "$", "tokens", "=", "$", "arguments", ";", "$", "method", "=", "\"__{$action}\"", ";", "if", "(", "1", "===", "count", "(", "$", "arguments", ")", ")", "{", "$"...
Alters the list of tokens. When adding, if token(s) already exists in the list of tokens, it will not add the token again. When removing, errors are not thrown If the token does not exist. @param string|string[] $tokens One or more case-sensitive tokens. @return $this
[ "Alters", "the", "list", "of", "tokens", "." ]
5266dc37157179c86f475a7a9301887d470b3664
https://github.com/mcaskill/tokenlist/blob/5266dc37157179c86f475a7a9301887d470b3664/src/TokenList/StringTokenList.php#L458-L483
195,907
mcaskill/tokenlist
src/TokenList/StringTokenList.php
StringTokenList.offsetSet
public function offsetSet( $offset, $value ) { $is_offset_string = is_string( $offset ); $is_value_string = is_string( $value ); /** e.g., `$obj[] = 'foo';` */ if ( null === $offset && $is_value_string ) { $this->add( $value ); } elseif ( is_bool( $value ) && $is_offset_string ) { /** e.g., `$obj['...
php
public function offsetSet( $offset, $value ) { $is_offset_string = is_string( $offset ); $is_value_string = is_string( $value ); /** e.g., `$obj[] = 'foo';` */ if ( null === $offset && $is_value_string ) { $this->add( $value ); } elseif ( is_bool( $value ) && $is_offset_string ) { /** e.g., `$obj['...
[ "public", "function", "offsetSet", "(", "$", "offset", ",", "$", "value", ")", "{", "$", "is_offset_string", "=", "is_string", "(", "$", "offset", ")", ";", "$", "is_value_string", "=", "is_string", "(", "$", "value", ")", ";", "/** e.g., `$obj[] = 'foo';` *...
Append a token to the list and optionally remove an existing token. @link http://php.net/manual/en/arrayaccess.offsetset.php @param int|null $offset The index is ignored. @param int|string|null $value The value to set.
[ "Append", "a", "token", "to", "the", "list", "and", "optionally", "remove", "an", "existing", "token", "." ]
5266dc37157179c86f475a7a9301887d470b3664
https://github.com/mcaskill/tokenlist/blob/5266dc37157179c86f475a7a9301887d470b3664/src/TokenList/StringTokenList.php#L617-L640
195,908
mcaskill/tokenlist
src/TokenList/StringTokenList.php
StringTokenList.offsetUnset
public function offsetUnset( $offset ) { if ( is_int( $offset ) ) { unset( $this->tokens[ $offset ] ); } else { $this->remove( $offset ); } }
php
public function offsetUnset( $offset ) { if ( is_int( $offset ) ) { unset( $this->tokens[ $offset ] ); } else { $this->remove( $offset ); } }
[ "public", "function", "offsetUnset", "(", "$", "offset", ")", "{", "if", "(", "is_int", "(", "$", "offset", ")", ")", "{", "unset", "(", "$", "this", "->", "tokens", "[", "$", "offset", "]", ")", ";", "}", "else", "{", "$", "this", "->", "remove"...
Remove a token. @link http://php.net/manual/en/arrayaccess.offsetunset.php @param int|string $offset The token to unset.
[ "Remove", "a", "token", "." ]
5266dc37157179c86f475a7a9301887d470b3664
https://github.com/mcaskill/tokenlist/blob/5266dc37157179c86f475a7a9301887d470b3664/src/TokenList/StringTokenList.php#L649-L657
195,909
prolic/HumusMvc
src/HumusMvc/Application.php
Application.init
public static function init($configuration = array()) { $smConfig = isset($configuration['service_manager']) ? $configuration['service_manager'] : array(); $serviceManager = new ServiceManager(new ServiceManagerConfig($smConfig)); $serviceManager->setService('ApplicationConfig', $configurati...
php
public static function init($configuration = array()) { $smConfig = isset($configuration['service_manager']) ? $configuration['service_manager'] : array(); $serviceManager = new ServiceManager(new ServiceManagerConfig($smConfig)); $serviceManager->setService('ApplicationConfig', $configurati...
[ "public", "static", "function", "init", "(", "$", "configuration", "=", "array", "(", ")", ")", "{", "$", "smConfig", "=", "isset", "(", "$", "configuration", "[", "'service_manager'", "]", ")", "?", "$", "configuration", "[", "'service_manager'", "]", ":"...
Static method for quick and easy initialization of the Application. If you use this init() method, you cannot specify a service with the name of 'ApplicationConfig' in your service manager config. This name is reserved to hold the array from application.config.php. The following services can only be overridden from a...
[ "Static", "method", "for", "quick", "and", "easy", "initialization", "of", "the", "Application", "." ]
09e8c6422d84b57745cc643047e10761be2a21a7
https://github.com/prolic/HumusMvc/blob/09e8c6422d84b57745cc643047e10761be2a21a7/src/HumusMvc/Application.php#L235-L242
195,910
bkstg/schedule-bundle
Controller/ScheduleController.php
ScheduleController.createAction
public function createAction( string $production_slug, AuthorizationCheckerInterface $auth, TokenStorageInterface $token, Request $request ): Response { // Lookup the production by production_slug. $production_repo = $this->em->getRepository(Production::class); ...
php
public function createAction( string $production_slug, AuthorizationCheckerInterface $auth, TokenStorageInterface $token, Request $request ): Response { // Lookup the production by production_slug. $production_repo = $this->em->getRepository(Production::class); ...
[ "public", "function", "createAction", "(", "string", "$", "production_slug", ",", "AuthorizationCheckerInterface", "$", "auth", ",", "TokenStorageInterface", "$", "token", ",", "Request", "$", "request", ")", ":", "Response", "{", "// Lookup the production by production...
Create a new schedule, which is a collection of events. @param string $production_slug The slug for the production. @param AuthorizationCheckerInterface $auth The authorization checker service. @param TokenStorageInterface $token The user token service. @param Reques...
[ "Create", "a", "new", "schedule", "which", "is", "a", "collection", "of", "events", "." ]
e64ac897aa7b28bc48319470d65de13cd4788afe
https://github.com/bkstg/schedule-bundle/blob/e64ac897aa7b28bc48319470d65de13cd4788afe/Controller/ScheduleController.php#L44-L112
195,911
bkstg/schedule-bundle
Controller/ScheduleController.php
ScheduleController.readAction
public function readAction( int $id, string $production_slug, AuthorizationCheckerInterface $auth, PaginatorInterface $paginator, Request $request ): Response { // Get the schedule and production for this action. list($schedule, $production) = $this->lookupEnt...
php
public function readAction( int $id, string $production_slug, AuthorizationCheckerInterface $auth, PaginatorInterface $paginator, Request $request ): Response { // Get the schedule and production for this action. list($schedule, $production) = $this->lookupEnt...
[ "public", "function", "readAction", "(", "int", "$", "id", ",", "string", "$", "production_slug", ",", "AuthorizationCheckerInterface", "$", "auth", ",", "PaginatorInterface", "$", "paginator", ",", "Request", "$", "request", ")", ":", "Response", "{", "// Get t...
Show a single schedule. @param int $id The schedule id. @param string $production_slug The production slug. @param AuthorizationCheckerInterface $auth The authorization checker service. @param PaginatorInterface $paginator The pa...
[ "Show", "a", "single", "schedule", "." ]
e64ac897aa7b28bc48319470d65de13cd4788afe
https://github.com/bkstg/schedule-bundle/blob/e64ac897aa7b28bc48319470d65de13cd4788afe/Controller/ScheduleController.php#L127-L154
195,912
bkstg/schedule-bundle
Controller/ScheduleController.php
ScheduleController.deleteAction
public function deleteAction( string $production_slug, int $id, AuthorizationCheckerInterface $auth, Request $request ): Response { // Get the schedule and production for this action. list($schedule, $production) = $this->lookupEntity(Schedule::class, $id, $production...
php
public function deleteAction( string $production_slug, int $id, AuthorizationCheckerInterface $auth, Request $request ): Response { // Get the schedule and production for this action. list($schedule, $production) = $this->lookupEntity(Schedule::class, $id, $production...
[ "public", "function", "deleteAction", "(", "string", "$", "production_slug", ",", "int", "$", "id", ",", "AuthorizationCheckerInterface", "$", "auth", ",", "Request", "$", "request", ")", ":", "Response", "{", "// Get the schedule and production for this action.", "li...
Delete a single schedule. @param string $production_slug The production slug. @param int $id The schedule id. @param AuthorizationCheckerInterface $auth The authorization checker service. @param Request $request The ...
[ "Delete", "a", "single", "schedule", "." ]
e64ac897aa7b28bc48319470d65de13cd4788afe
https://github.com/bkstg/schedule-bundle/blob/e64ac897aa7b28bc48319470d65de13cd4788afe/Controller/ScheduleController.php#L264-L309
195,913
bkstg/schedule-bundle
Controller/ScheduleController.php
ScheduleController.archiveAction
public function archiveAction( string $production_slug, PaginatorInterface $paginator, AuthorizationCheckerInterface $auth, Request $request ): Response { // Lookup the production by production_slug. $production_repo = $this->em->getRepository(Production::class); ...
php
public function archiveAction( string $production_slug, PaginatorInterface $paginator, AuthorizationCheckerInterface $auth, Request $request ): Response { // Lookup the production by production_slug. $production_repo = $this->em->getRepository(Production::class); ...
[ "public", "function", "archiveAction", "(", "string", "$", "production_slug", ",", "PaginatorInterface", "$", "paginator", ",", "AuthorizationCheckerInterface", "$", "auth", ",", "Request", "$", "request", ")", ":", "Response", "{", "// Lookup the production by producti...
Show a list of archived schedules. @param string $production_slug The production to look in. @param PaginatorInterface $paginator The paginator service. @param AuthorizationCheckerInterface $auth The authorization checker service. @param Request ...
[ "Show", "a", "list", "of", "archived", "schedules", "." ]
e64ac897aa7b28bc48319470d65de13cd4788afe
https://github.com/bkstg/schedule-bundle/blob/e64ac897aa7b28bc48319470d65de13cd4788afe/Controller/ScheduleController.php#L324-L352
195,914
artscorestudio/user-bundle
Controller/AjaxRequestController.php
AjaxRequestController.byUsernameAction
public function byUsernameAction(Request $request) { $term = $request->get('username'); $users = $this->get('asf_user.user.manager')->getRepository()->findByUsernameContains($term); $search = array(); foreach($users as $user) { $search[] = array( 'id' =>...
php
public function byUsernameAction(Request $request) { $term = $request->get('username'); $users = $this->get('asf_user.user.manager')->getRepository()->findByUsernameContains($term); $search = array(); foreach($users as $user) { $search[] = array( 'id' =>...
[ "public", "function", "byUsernameAction", "(", "Request", "$", "request", ")", "{", "$", "term", "=", "$", "request", "->", "get", "(", "'username'", ")", ";", "$", "users", "=", "$", "this", "->", "get", "(", "'asf_user.user.manager'", ")", "->", "getRe...
Return list of users according to the search by username @param Request $request @return \Symfony\Component\HttpFoundation\Response
[ "Return", "list", "of", "users", "according", "to", "the", "search", "by", "username" ]
83e660d1073e1cbfde6eed0b528b8c99e78a2e53
https://github.com/artscorestudio/user-bundle/blob/83e660d1073e1cbfde6eed0b528b8c99e78a2e53/Controller/AjaxRequestController.php#L30-L51
195,915
spoom-php/core
src/extension/Helper/Text.php
Text.apply
public static function apply( string $text, $context, string $skip = '', ?callable $callback = null ): string { // $context = Storage::instance( $context ); $output = ''; $delimiter = null; for( $i = 0, $length = strlen( $text ); $i < $length; ++$i ) { // detect skipped blocks (start and...
php
public static function apply( string $text, $context, string $skip = '', ?callable $callback = null ): string { // $context = Storage::instance( $context ); $output = ''; $delimiter = null; for( $i = 0, $length = strlen( $text ); $i < $length; ++$i ) { // detect skipped blocks (start and...
[ "public", "static", "function", "apply", "(", "string", "$", "text", ",", "$", "context", ",", "string", "$", "skip", "=", "''", ",", "?", "callable", "$", "callback", "=", "null", ")", ":", "string", "{", "//", "$", "context", "=", "Storage", "::", ...
Insert variables to the input from insertion array used the regexp constant of class TODO implement condition and loop support @param string $text Input string to insert @param array|object|StorageInterface $context The insertion variables @param string $skip Ope...
[ "Insert", "variables", "to", "the", "input", "from", "insertion", "array", "used", "the", "regexp", "constant", "of", "class" ]
ea7184213352fa2fad7636927a019e5798734e04
https://github.com/spoom-php/core/blob/ea7184213352fa2fad7636927a019e5798734e04/src/extension/Helper/Text.php#L131-L161
195,916
spoom-php/core
src/extension/Helper/Text.php
Text.reduce
public static function reduce( string $text, string $chars = ' ' ): string { $text = preg_replace( '/[' . $chars . ']{2,}/', ' ', $text ); return $text; }
php
public static function reduce( string $text, string $chars = ' ' ): string { $text = preg_replace( '/[' . $chars . ']{2,}/', ' ', $text ); return $text; }
[ "public", "static", "function", "reduce", "(", "string", "$", "text", ",", "string", "$", "chars", "=", "' '", ")", ":", "string", "{", "$", "text", "=", "preg_replace", "(", "'/['", ".", "$", "chars", ".", "']{2,}/'", ",", "' '", ",", "$", "text", ...
Clear multiply occurance of chars from text and leave only one @param string $text @param string $chars @return string
[ "Clear", "multiply", "occurance", "of", "chars", "from", "text", "and", "leave", "only", "one" ]
ea7184213352fa2fad7636927a019e5798734e04
https://github.com/spoom-php/core/blob/ea7184213352fa2fad7636927a019e5798734e04/src/extension/Helper/Text.php#L170-L173
195,917
CrunchPHP/fastcgi
src/Protocol/Header.php
Header.encode
public function encode() { return \pack('CCnnCx', 1, $this->getType()->value(), $this->getRequestId(), $this->getLength(), $this->getPaddingLength()); }
php
public function encode() { return \pack('CCnnCx', 1, $this->getType()->value(), $this->getRequestId(), $this->getLength(), $this->getPaddingLength()); }
[ "public", "function", "encode", "(", ")", "{", "return", "\\", "pack", "(", "'CCnnCx'", ",", "1", ",", "$", "this", "->", "getType", "(", ")", "->", "value", "(", ")", ",", "$", "this", "->", "getRequestId", "(", ")", ",", "$", "this", "->", "get...
Returns the encoded header as a string. @return string
[ "Returns", "the", "encoded", "header", "as", "a", "string", "." ]
102437193e67e5a841ec5a897549ec345788d1bd
https://github.com/CrunchPHP/fastcgi/blob/102437193e67e5a841ec5a897549ec345788d1bd/src/Protocol/Header.php#L161-L164
195,918
wb-crowdfusion/crowdfusion
system/core/classes/libraries/nonces/Nonces.php
Nonces.verify
public function verify($nonce, $action) { $value = $this->Encryption->decryptSecureCookie($nonce); if(!$value) return false; if(strcmp($value, $action) === 0) return true; return false; }
php
public function verify($nonce, $action) { $value = $this->Encryption->decryptSecureCookie($nonce); if(!$value) return false; if(strcmp($value, $action) === 0) return true; return false; }
[ "public", "function", "verify", "(", "$", "nonce", ",", "$", "action", ")", "{", "$", "value", "=", "$", "this", "->", "Encryption", "->", "decryptSecureCookie", "(", "$", "nonce", ")", ";", "if", "(", "!", "$", "value", ")", "return", "false", ";", ...
Verifies the validity of a nonce against the supplied action. $nonceAcceptableTimePeriods nonce checks are performed, one for the current $nonceTimePeriod period and one for each previous $nonceTimePeriod period. If any time period nonce matches, then the nonce is valid. @param string $nonce Full nonce string suppli...
[ "Verifies", "the", "validity", "of", "a", "nonce", "against", "the", "supplied", "action", "." ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/libraries/nonces/Nonces.php#L72-L83
195,919
wb-crowdfusion/crowdfusion
system/core/classes/libraries/nonces/Nonces.php
Nonces.create
public function create($action) { $expire = time() + $this->timePeriod; // 24 hour expiration $user_id = $this->RequestContext->getUserRef(); if(is_null($user_id)) $user_id = $this->Session->getID(); return $this->Encryption->encryptSecureCookie(strtolower($action), $ex...
php
public function create($action) { $expire = time() + $this->timePeriod; // 24 hour expiration $user_id = $this->RequestContext->getUserRef(); if(is_null($user_id)) $user_id = $this->Session->getID(); return $this->Encryption->encryptSecureCookie(strtolower($action), $ex...
[ "public", "function", "create", "(", "$", "action", ")", "{", "$", "expire", "=", "time", "(", ")", "+", "$", "this", "->", "timePeriod", ";", "// 24 hour expiration", "$", "user_id", "=", "$", "this", "->", "RequestContext", "->", "getUserRef", "(", ")"...
Creates a new nonce string for the given action, typically derived from the user, a salt, and valid only for a given amount of time @param string $action Arbitrary string action to create nonce for @return string Nonce
[ "Creates", "a", "new", "nonce", "string", "for", "the", "given", "action", "typically", "derived", "from", "the", "user", "a", "salt", "and", "valid", "only", "for", "a", "given", "amount", "of", "time" ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/libraries/nonces/Nonces.php#L93-L102
195,920
abtincbrians/HierarchicalConfig
src/config/FileConfig.php
FileConfig.reload
public function reload() { // Rebuild the configuration data // Re-init $this->init( array( self::CONFIG_KEY_FILE_PATH => $this->getConfigFilePath(), ConfigInterface::KEY_CONTEXT => $this->getContext(), ) ); }
php
public function reload() { // Rebuild the configuration data // Re-init $this->init( array( self::CONFIG_KEY_FILE_PATH => $this->getConfigFilePath(), ConfigInterface::KEY_CONTEXT => $this->getContext(), ) ); }
[ "public", "function", "reload", "(", ")", "{", "// Rebuild the configuration data", "// Re-init", "$", "this", "->", "init", "(", "array", "(", "self", "::", "CONFIG_KEY_FILE_PATH", "=>", "$", "this", "->", "getConfigFilePath", "(", ")", ",", "ConfigInterface", ...
Reload the configuration from file. Apply this after changing context or the file path.
[ "Reload", "the", "configuration", "from", "file", "." ]
62ef0f6455fad1399ed1438b1eb544aa01a2af38
https://github.com/abtincbrians/HierarchicalConfig/blob/62ef0f6455fad1399ed1438b1eb544aa01a2af38/src/config/FileConfig.php#L46-L56
195,921
abtincbrians/HierarchicalConfig
src/config/FileConfig.php
FileConfig.doSetup
protected function doSetup($config = array()) { // Catch the configuration file path if (isset($config[self::CONFIG_KEY_FILE_PATH])) { $this->configFilePath = $config[self::CONFIG_KEY_FILE_PATH]; } else { // Also consider throwing an exception here instead ...
php
protected function doSetup($config = array()) { // Catch the configuration file path if (isset($config[self::CONFIG_KEY_FILE_PATH])) { $this->configFilePath = $config[self::CONFIG_KEY_FILE_PATH]; } else { // Also consider throwing an exception here instead ...
[ "protected", "function", "doSetup", "(", "$", "config", "=", "array", "(", ")", ")", "{", "// Catch the configuration file path", "if", "(", "isset", "(", "$", "config", "[", "self", "::", "CONFIG_KEY_FILE_PATH", "]", ")", ")", "{", "$", "this", "->", "con...
Override in child if you need to override core config setup. @param array $config @return array
[ "Override", "in", "child", "if", "you", "need", "to", "override", "core", "config", "setup", "." ]
62ef0f6455fad1399ed1438b1eb544aa01a2af38
https://github.com/abtincbrians/HierarchicalConfig/blob/62ef0f6455fad1399ed1438b1eb544aa01a2af38/src/config/FileConfig.php#L123-L140
195,922
froq/froq-encoding
src/Encoder.php
Encoder.jsonEncode
public static final function jsonEncode($data, array $options = null): array { $encoder = new JsonEncoder($options); return [$encoder->encode($data), $encoder->hasError() ? new EncoderException('JSON Error: '. $encoder->getError()) : null]; }
php
public static final function jsonEncode($data, array $options = null): array { $encoder = new JsonEncoder($options); return [$encoder->encode($data), $encoder->hasError() ? new EncoderException('JSON Error: '. $encoder->getError()) : null]; }
[ "public", "static", "final", "function", "jsonEncode", "(", "$", "data", ",", "array", "$", "options", "=", "null", ")", ":", "array", "{", "$", "encoder", "=", "new", "JsonEncoder", "(", "$", "options", ")", ";", "return", "[", "$", "encoder", "->", ...
Json encode. @param any $data @param array|null $options @return array
[ "Json", "encode", "." ]
95a6b707ba6cae5f18bb6767b1df88f2fea0f9b4
https://github.com/froq/froq-encoding/blob/95a6b707ba6cae5f18bb6767b1df88f2fea0f9b4/src/Encoder.php#L126-L132
195,923
froq/froq-encoding
src/Encoder.php
Encoder.jsonDecode
public static final function jsonDecode($data, array $options = null): array { $encoder = new JsonEncoder($options); return [$encoder->decode($data), $encoder->hasError() ? new EncoderException('JSON Error: '. $encoder->getError()) : null]; }
php
public static final function jsonDecode($data, array $options = null): array { $encoder = new JsonEncoder($options); return [$encoder->decode($data), $encoder->hasError() ? new EncoderException('JSON Error: '. $encoder->getError()) : null]; }
[ "public", "static", "final", "function", "jsonDecode", "(", "$", "data", ",", "array", "$", "options", "=", "null", ")", ":", "array", "{", "$", "encoder", "=", "new", "JsonEncoder", "(", "$", "options", ")", ";", "return", "[", "$", "encoder", "->", ...
Json decode. @param any $data @param array|null $options @return array
[ "Json", "decode", "." ]
95a6b707ba6cae5f18bb6767b1df88f2fea0f9b4
https://github.com/froq/froq-encoding/blob/95a6b707ba6cae5f18bb6767b1df88f2fea0f9b4/src/Encoder.php#L140-L146
195,924
froq/froq-encoding
src/Encoder.php
Encoder.gzipEncode
public static final function gzipEncode($data, array $options = null): array { $encoder = new GzipEncoder($options); return [$encoder->encode($data), $encoder->hasError() ? new EncoderException('GZip Error: '. $encoder->getError()) : null]; }
php
public static final function gzipEncode($data, array $options = null): array { $encoder = new GzipEncoder($options); return [$encoder->encode($data), $encoder->hasError() ? new EncoderException('GZip Error: '. $encoder->getError()) : null]; }
[ "public", "static", "final", "function", "gzipEncode", "(", "$", "data", ",", "array", "$", "options", "=", "null", ")", ":", "array", "{", "$", "encoder", "=", "new", "GzipEncoder", "(", "$", "options", ")", ";", "return", "[", "$", "encoder", "->", ...
Gzip encode. @param ?string $data @param array|null $options @return ?string
[ "Gzip", "encode", "." ]
95a6b707ba6cae5f18bb6767b1df88f2fea0f9b4
https://github.com/froq/froq-encoding/blob/95a6b707ba6cae5f18bb6767b1df88f2fea0f9b4/src/Encoder.php#L154-L160
195,925
froq/froq-encoding
src/Encoder.php
Encoder.gzipDecode
public static final function gzipDecode($data, array $options = null): array { $encoder = new GzipEncoder($options); return [$encoder->decode($data), $encoder->hasError() ? new EncoderException('GZip Error: '. $encoder->getError()) : null]; }
php
public static final function gzipDecode($data, array $options = null): array { $encoder = new GzipEncoder($options); return [$encoder->decode($data), $encoder->hasError() ? new EncoderException('GZip Error: '. $encoder->getError()) : null]; }
[ "public", "static", "final", "function", "gzipDecode", "(", "$", "data", ",", "array", "$", "options", "=", "null", ")", ":", "array", "{", "$", "encoder", "=", "new", "GzipEncoder", "(", "$", "options", ")", ";", "return", "[", "$", "encoder", "->", ...
Gzip decode. @param ?string $data @param array|null $options @return ?string
[ "Gzip", "decode", "." ]
95a6b707ba6cae5f18bb6767b1df88f2fea0f9b4
https://github.com/froq/froq-encoding/blob/95a6b707ba6cae5f18bb6767b1df88f2fea0f9b4/src/Encoder.php#L168-L174
195,926
anime-db/ani-db-filler-bundle
src/Command/UpdateTitlesCommand.php
UpdateTitlesCommand.getOriginDb
protected function getOriginDb(OutputInterface $output, $now) { $url = $this->getContainer()->getParameter('anime_db.ani_db.import_titles'); if (($path = parse_url($url, PHP_URL_PATH)) === false) { throw new \InvalidArgumentException('Failed parse URL: '.$url); } /* @va...
php
protected function getOriginDb(OutputInterface $output, $now) { $url = $this->getContainer()->getParameter('anime_db.ani_db.import_titles'); if (($path = parse_url($url, PHP_URL_PATH)) === false) { throw new \InvalidArgumentException('Failed parse URL: '.$url); } /* @va...
[ "protected", "function", "getOriginDb", "(", "OutputInterface", "$", "output", ",", "$", "now", ")", "{", "$", "url", "=", "$", "this", "->", "getContainer", "(", ")", "->", "getParameter", "(", "'anime_db.ani_db.import_titles'", ")", ";", "if", "(", "(", ...
Get original db file. Download the original db if need and cache it in a system temp dir @throws \InvalidArgumentException @throws \RuntimeException @param OutputInterface $output @param int $now @return string
[ "Get", "original", "db", "file", "." ]
7581beda0cd46b11867a703ca429147f0c5b5b46
https://github.com/anime-db/ani-db-filler-bundle/blob/7581beda0cd46b11867a703ca429147f0c5b5b46/src/Command/UpdateTitlesCommand.php#L98-L123
195,927
naucon/Utility
src/ListAbstract.php
ListAbstract.addWithIndex
public function addWithIndex($index, $element) { if (!is_null($index) && is_scalar($index) ) { if (!$this->hasIndex($index)) { $this->set($index, $element); } else { // index already exist throw new ListException('El...
php
public function addWithIndex($index, $element) { if (!is_null($index) && is_scalar($index) ) { if (!$this->hasIndex($index)) { $this->set($index, $element); } else { // index already exist throw new ListException('El...
[ "public", "function", "addWithIndex", "(", "$", "index", ",", "$", "element", ")", "{", "if", "(", "!", "is_null", "(", "$", "index", ")", "&&", "is_scalar", "(", "$", "index", ")", ")", "{", "if", "(", "!", "$", "this", "->", "hasIndex", "(", "$...
add a element to a specified position of the list @param int $index element index @param mixed $element element @return void @throws ListException
[ "add", "a", "element", "to", "a", "specified", "position", "of", "the", "list" ]
d225bb5d09d82400917f710c9d502949a66442c4
https://github.com/naucon/Utility/blob/d225bb5d09d82400917f710c9d502949a66442c4/src/ListAbstract.php#L44-L59
195,928
naucon/Utility
src/ListAbstract.php
ListAbstract.removeIndex
public function removeIndex($index) { if ($this->hasIndex($index)) { unset($this->_items[$index]); $this->_iterator = null; return true; } return false; }
php
public function removeIndex($index) { if ($this->hasIndex($index)) { unset($this->_items[$index]); $this->_iterator = null; return true; } return false; }
[ "public", "function", "removeIndex", "(", "$", "index", ")", "{", "if", "(", "$", "this", "->", "hasIndex", "(", "$", "index", ")", ")", "{", "unset", "(", "$", "this", "->", "_items", "[", "$", "index", "]", ")", ";", "$", "this", "->", "_iterat...
remove element with specified position from list @param int $index element index @return bool
[ "remove", "element", "with", "specified", "position", "from", "list" ]
d225bb5d09d82400917f710c9d502949a66442c4
https://github.com/naucon/Utility/blob/d225bb5d09d82400917f710c9d502949a66442c4/src/ListAbstract.php#L95-L103
195,929
naucon/Utility
src/ListAbstract.php
ListAbstract.set
public function set($index, $element) { if (!is_null($index) && is_scalar($index) ) { $this->_iterator = null; return $this->_items[$index] = $element; } else { // given index name is not valid throw new ListException('Element could...
php
public function set($index, $element) { if (!is_null($index) && is_scalar($index) ) { $this->_iterator = null; return $this->_items[$index] = $element; } else { // given index name is not valid throw new ListException('Element could...
[ "public", "function", "set", "(", "$", "index", ",", "$", "element", ")", "{", "if", "(", "!", "is_null", "(", "$", "index", ")", "&&", "is_scalar", "(", "$", "index", ")", ")", "{", "$", "this", "->", "_iterator", "=", "null", ";", "return", "$"...
add or replace a element to a specified position of the list @param int $index element index @param mixed $element element @return mixed element @throws ListException
[ "add", "or", "replace", "a", "element", "to", "a", "specified", "position", "of", "the", "list" ]
d225bb5d09d82400917f710c9d502949a66442c4
https://github.com/naucon/Utility/blob/d225bb5d09d82400917f710c9d502949a66442c4/src/ListAbstract.php#L113-L124
195,930
dmt-software/command-bus-validator
src/Validator/ValidationMiddleware.php
ValidationMiddleware.getDefaultValidator
protected function getDefaultValidator(): ValidatorInterface { $loaders = [new StaticMethodLoader()]; if (class_exists(AnnotationReader::class) && class_exists(ArrayCache::class)) { AnnotationRegistry::registerUniqueLoader('class_exists'); $loaders[] = new AnnotationLoader(n...
php
protected function getDefaultValidator(): ValidatorInterface { $loaders = [new StaticMethodLoader()]; if (class_exists(AnnotationReader::class) && class_exists(ArrayCache::class)) { AnnotationRegistry::registerUniqueLoader('class_exists'); $loaders[] = new AnnotationLoader(n...
[ "protected", "function", "getDefaultValidator", "(", ")", ":", "ValidatorInterface", "{", "$", "loaders", "=", "[", "new", "StaticMethodLoader", "(", ")", "]", ";", "if", "(", "class_exists", "(", "AnnotationReader", "::", "class", ")", "&&", "class_exists", "...
Get a default validator. By default the usage of annotations to validate object is off. To enable annotation configuration install `doctrine/annotations` and `doctrine/cache`. @return RecursiveValidator|ValidatorInterface @throws AnnotationException
[ "Get", "a", "default", "validator", "." ]
a16f32e37754cccd3210c4aa17badd86edb8990a
https://github.com/dmt-software/command-bus-validator/blob/a16f32e37754cccd3210c4aa17badd86edb8990a/src/Validator/ValidationMiddleware.php#L73-L89
195,931
zodream/database
src/Model/Concerns/HasRelation.php
HasRelation.getRelationWhere
protected function getRelationWhere($links, $key = null) { if (is_null($key) && !is_array($links)) { $key = in_array('id', $this->primaryKey) ? 'id' : reset($this->primaryKey); } if (!is_array($links)) { $links = [$links => $key]; } foreach ($links as &$it...
php
protected function getRelationWhere($links, $key = null) { if (is_null($key) && !is_array($links)) { $key = in_array('id', $this->primaryKey) ? 'id' : reset($this->primaryKey); } if (!is_array($links)) { $links = [$links => $key]; } foreach ($links as &$it...
[ "protected", "function", "getRelationWhere", "(", "$", "links", ",", "$", "key", "=", "null", ")", "{", "if", "(", "is_null", "(", "$", "key", ")", "&&", "!", "is_array", "(", "$", "links", ")", ")", "{", "$", "key", "=", "in_array", "(", "'id'", ...
GET RELATION WHERE SQL @param string|array $links @param string $key @return array
[ "GET", "RELATION", "WHERE", "SQL" ]
03712219c057799d07350a3a2650c55bcc92c28e
https://github.com/zodream/database/blob/03712219c057799d07350a3a2650c55bcc92c28e/src/Model/Concerns/HasRelation.php#L43-L54
195,932
Vibius/Facade
src/ManifestResolver.php
ManifestResolver.findManifests
public function findManifests(){ foreach ($this->src as $component => $source) { $src = $source[0]."/../manifest.php"; if( file_exists($src) && is_readable($src) ){ $this->manifests[$component] = $src; } } }
php
public function findManifests(){ foreach ($this->src as $component => $source) { $src = $source[0]."/../manifest.php"; if( file_exists($src) && is_readable($src) ){ $this->manifests[$component] = $src; } } }
[ "public", "function", "findManifests", "(", ")", "{", "foreach", "(", "$", "this", "->", "src", "as", "$", "component", "=>", "$", "source", ")", "{", "$", "src", "=", "$", "source", "[", "0", "]", ".", "\"/../manifest.php\"", ";", "if", "(", "file_e...
Function is used to find manifests in psr4 loaded packages
[ "Function", "is", "used", "to", "find", "manifests", "in", "psr4", "loaded", "packages" ]
2dac08bae098c436031b70f5a09abc365740aee0
https://github.com/Vibius/Facade/blob/2dac08bae098c436031b70f5a09abc365740aee0/src/ManifestResolver.php#L20-L27
195,933
theopera/framework
src/Component/WebApplication/Controller.php
Controller.addGlobal
protected function addGlobal(string $key, $value) { $template = $this->getContext()->getTemplateEngine(); $template->addGlobal($key, $value); }
php
protected function addGlobal(string $key, $value) { $template = $this->getContext()->getTemplateEngine(); $template->addGlobal($key, $value); }
[ "protected", "function", "addGlobal", "(", "string", "$", "key", ",", "$", "value", ")", "{", "$", "template", "=", "$", "this", "->", "getContext", "(", ")", "->", "getTemplateEngine", "(", ")", ";", "$", "template", "->", "addGlobal", "(", "$", "key"...
Add a variable that will be globally accessible in the template @param string $key @param $value
[ "Add", "a", "variable", "that", "will", "be", "globally", "accessible", "in", "the", "template" ]
fa6165d3891a310faa580c81dee49a63c150c711
https://github.com/theopera/framework/blob/fa6165d3891a310faa580c81dee49a63c150c711/src/Component/WebApplication/Controller.php#L76-L80
195,934
theopera/framework
src/Component/WebApplication/Controller.php
Controller.getTemplateFile
protected function getTemplateFile(string $action = null) : string { $path = '/controller/' . lcfirst($this->getControllerName()) . '/'; return $path . ($action ? $action : $this->getActionName()); }
php
protected function getTemplateFile(string $action = null) : string { $path = '/controller/' . lcfirst($this->getControllerName()) . '/'; return $path . ($action ? $action : $this->getActionName()); }
[ "protected", "function", "getTemplateFile", "(", "string", "$", "action", "=", "null", ")", ":", "string", "{", "$", "path", "=", "'/controller/'", ".", "lcfirst", "(", "$", "this", "->", "getControllerName", "(", ")", ")", ".", "'/'", ";", "return", "$"...
Returns the default template file @param string $action The action name, leave null for current action name @return string
[ "Returns", "the", "default", "template", "file" ]
fa6165d3891a310faa580c81dee49a63c150c711
https://github.com/theopera/framework/blob/fa6165d3891a310faa580c81dee49a63c150c711/src/Component/WebApplication/Controller.php#L121-L126
195,935
theopera/framework
src/Component/WebApplication/Controller.php
Controller.isAjax
protected function isAjax() : bool { $header = $this->request->getHeaders()->get('X-Requested-With'); if ($header === null) { return false; } return $header->getValue() === 'XMLHttpRequest'; }
php
protected function isAjax() : bool { $header = $this->request->getHeaders()->get('X-Requested-With'); if ($header === null) { return false; } return $header->getValue() === 'XMLHttpRequest'; }
[ "protected", "function", "isAjax", "(", ")", ":", "bool", "{", "$", "header", "=", "$", "this", "->", "request", "->", "getHeaders", "(", ")", "->", "get", "(", "'X-Requested-With'", ")", ";", "if", "(", "$", "header", "===", "null", ")", "{", "retur...
Is the current request done with ajax? @return bool
[ "Is", "the", "current", "request", "done", "with", "ajax?" ]
fa6165d3891a310faa580c81dee49a63c150c711
https://github.com/theopera/framework/blob/fa6165d3891a310faa580c81dee49a63c150c711/src/Component/WebApplication/Controller.php#L216-L225
195,936
theopera/framework
src/Component/WebApplication/Controller.php
Controller.redirect
protected function redirect($controller = null, $action = 'index', array $parameters = []) : Response { $host = 'http://'. $_SERVER['HTTP_HOST']; if ($controller === null) { // Apparently we want to redirect to homepage, so the host will be sufficient if ($action === 'index...
php
protected function redirect($controller = null, $action = 'index', array $parameters = []) : Response { $host = 'http://'. $_SERVER['HTTP_HOST']; if ($controller === null) { // Apparently we want to redirect to homepage, so the host will be sufficient if ($action === 'index...
[ "protected", "function", "redirect", "(", "$", "controller", "=", "null", ",", "$", "action", "=", "'index'", ",", "array", "$", "parameters", "=", "[", "]", ")", ":", "Response", "{", "$", "host", "=", "'http://'", ".", "$", "_SERVER", "[", "'HTTP_HOS...
Redirect to a controller @param string $controller @param string $action @param string[] $parameters @return Response
[ "Redirect", "to", "a", "controller" ]
fa6165d3891a310faa580c81dee49a63c150c711
https://github.com/theopera/framework/blob/fa6165d3891a310faa580c81dee49a63c150c711/src/Component/WebApplication/Controller.php#L236-L257
195,937
theopera/framework
src/Component/WebApplication/Controller.php
Controller.hasPermission
protected function hasPermission(string $permission, bool $return = false) { $auth = $this->getContext()->getAuthentication(); $user = $auth->getUser(); $acl = $this->getContext()->getAccessControlList(); if (!$acl->hasAccess($user, $permission)) { if ($return) { ...
php
protected function hasPermission(string $permission, bool $return = false) { $auth = $this->getContext()->getAuthentication(); $user = $auth->getUser(); $acl = $this->getContext()->getAccessControlList(); if (!$acl->hasAccess($user, $permission)) { if ($return) { ...
[ "protected", "function", "hasPermission", "(", "string", "$", "permission", ",", "bool", "$", "return", "=", "false", ")", "{", "$", "auth", "=", "$", "this", "->", "getContext", "(", ")", "->", "getAuthentication", "(", ")", ";", "$", "user", "=", "$"...
Has the current user permission for the given action @param string $permission @param bool $return Return a boolean instead of throwing a forbidden exception
[ "Has", "the", "current", "user", "permission", "for", "the", "given", "action" ]
fa6165d3891a310faa580c81dee49a63c150c711
https://github.com/theopera/framework/blob/fa6165d3891a310faa580c81dee49a63c150c711/src/Component/WebApplication/Controller.php#L298-L314
195,938
Nekland/BaseApi
lib/Nekland/BaseApi/Http/HttpClientFactory.php
HttpClientFactory.createHttpClient
public function createHttpClient($name = '', $client = null) { if (empty($name)) { return $this->createBestClient(); } if (!isset($this->classes[$name])) { throw new \InvalidArgumentException(sprintf('The client "%s" is not registered.', $name)); } $...
php
public function createHttpClient($name = '', $client = null) { if (empty($name)) { return $this->createBestClient(); } if (!isset($this->classes[$name])) { throw new \InvalidArgumentException(sprintf('The client "%s" is not registered.', $name)); } $...
[ "public", "function", "createHttpClient", "(", "$", "name", "=", "''", ",", "$", "client", "=", "null", ")", "{", "if", "(", "empty", "(", "$", "name", ")", ")", "{", "return", "$", "this", "->", "createBestClient", "(", ")", ";", "}", "if", "(", ...
Generate the best http client according to the detected configuration @param string $name @param null $client @return GuzzleAdapter|AbstractHttpClient @throws \InvalidArgumentException
[ "Generate", "the", "best", "http", "client", "according", "to", "the", "detected", "configuration" ]
c96051b36d6982abf2a8b1f1ec16351bcae2455e
https://github.com/Nekland/BaseApi/blob/c96051b36d6982abf2a8b1f1ec16351bcae2455e/lib/Nekland/BaseApi/Http/HttpClientFactory.php#L55-L73
195,939
Nekland/BaseApi
lib/Nekland/BaseApi/Http/HttpClientFactory.php
HttpClientFactory.register
public function register($name, $class, $requirement = '', $priority = false) { if (!class_exists($class)) { throw new \InvalidArgumentException(sprintf('%s is not a valid class name.', $class)); } $definition = [ 'class' => $class, 'requirement' =>...
php
public function register($name, $class, $requirement = '', $priority = false) { if (!class_exists($class)) { throw new \InvalidArgumentException(sprintf('%s is not a valid class name.', $class)); } $definition = [ 'class' => $class, 'requirement' =>...
[ "public", "function", "register", "(", "$", "name", ",", "$", "class", ",", "$", "requirement", "=", "''", ",", "$", "priority", "=", "false", ")", "{", "if", "(", "!", "class_exists", "(", "$", "class", ")", ")", "{", "throw", "new", "\\", "Invali...
Register a new client that will be able to be use by the ApiFactory @param string $name @param string $class @param string|callable $requirement @param bool $priority @throws \InvalidArgumentException
[ "Register", "a", "new", "client", "that", "will", "be", "able", "to", "be", "use", "by", "the", "ApiFactory" ]
c96051b36d6982abf2a8b1f1ec16351bcae2455e
https://github.com/Nekland/BaseApi/blob/c96051b36d6982abf2a8b1f1ec16351bcae2455e/lib/Nekland/BaseApi/Http/HttpClientFactory.php#L110-L126
195,940
theopera/framework
src/Component/Database/Connection.php
Connection.connect
private function connect(Credentials $credentials) : PDO { if ($this->pdo === null) { $this->pdo = new PDO($credentials->getDSN(), $credentials->getUsername(), $credentials->getPassword()); } return $this->pdo; }
php
private function connect(Credentials $credentials) : PDO { if ($this->pdo === null) { $this->pdo = new PDO($credentials->getDSN(), $credentials->getUsername(), $credentials->getPassword()); } return $this->pdo; }
[ "private", "function", "connect", "(", "Credentials", "$", "credentials", ")", ":", "PDO", "{", "if", "(", "$", "this", "->", "pdo", "===", "null", ")", "{", "$", "this", "->", "pdo", "=", "new", "PDO", "(", "$", "credentials", "->", "getDSN", "(", ...
Makes the actual connection to the database @param Credentials $credentials @return PDO
[ "Makes", "the", "actual", "connection", "to", "the", "database" ]
fa6165d3891a310faa580c81dee49a63c150c711
https://github.com/theopera/framework/blob/fa6165d3891a310faa580c81dee49a63c150c711/src/Component/Database/Connection.php#L59-L66
195,941
aztech-digital/phinject
src/Config/TemplatedConfigProcessor.php
TemplatedConfigProcessor.process
public static function process(ArrayResolver $config) { $copy = $config->extract(); $instances = $config->resolveArray('apply-templates', []); foreach ($instances as $name => $instance) { self::processTemplate($config, $copy, $name, $instance); } return new Arra...
php
public static function process(ArrayResolver $config) { $copy = $config->extract(); $instances = $config->resolveArray('apply-templates', []); foreach ($instances as $name => $instance) { self::processTemplate($config, $copy, $name, $instance); } return new Arra...
[ "public", "static", "function", "process", "(", "ArrayResolver", "$", "config", ")", "{", "$", "copy", "=", "$", "config", "->", "extract", "(", ")", ";", "$", "instances", "=", "$", "config", "->", "resolveArray", "(", "'apply-templates'", ",", "[", "]"...
Processes a configuration node to expand the templates it contains. @param ArrayResolver $config The node containing the configuration templates and templated instances. @return ArrayResolver An array resolver containing the expanded templates.
[ "Processes", "a", "configuration", "node", "to", "expand", "the", "templates", "it", "contains", "." ]
1bb2fb3b5ef44e62f168af71134c613c48b58d95
https://github.com/aztech-digital/phinject/blob/1bb2fb3b5ef44e62f168af71134c613c48b58d95/src/Config/TemplatedConfigProcessor.php#L16-L26
195,942
t-kanstantsin/fileupload
src/formatter/icon/IconGenerator.php
IconGenerator.getIcon
public function getIcon(?string $extension): ?string { $iconClass = $this->iconSet[$this->getIconType($extension)] ?? null; return $iconClass !== null ? $this->iconPrefix . ' ' . $iconClass : null; }
php
public function getIcon(?string $extension): ?string { $iconClass = $this->iconSet[$this->getIconType($extension)] ?? null; return $iconClass !== null ? $this->iconPrefix . ' ' . $iconClass : null; }
[ "public", "function", "getIcon", "(", "?", "string", "$", "extension", ")", ":", "?", "string", "{", "$", "iconClass", "=", "$", "this", "->", "iconSet", "[", "$", "this", "->", "getIconType", "(", "$", "extension", ")", "]", "??", "null", ";", "retu...
Returns suitable css class for icon by extension. @param null|string $extension @return string returns default icon if nothing found
[ "Returns", "suitable", "css", "class", "for", "icon", "by", "extension", "." ]
d6317a9b9b36d992f09affe3900ef7d7ddfd855f
https://github.com/t-kanstantsin/fileupload/blob/d6317a9b9b36d992f09affe3900ef7d7ddfd855f/src/formatter/icon/IconGenerator.php#L90-L97
195,943
t-kanstantsin/fileupload
src/formatter/icon/IconGenerator.php
IconGenerator.getIconType
public function getIconType(?string $extension): string { if ($extension !== null && $extension !== '') { foreach (self::TYPE_TO_REGEX as $type => $regex) { if ($regex === null) { continue; } if (($regex === $extension && preg_m...
php
public function getIconType(?string $extension): string { if ($extension !== null && $extension !== '') { foreach (self::TYPE_TO_REGEX as $type => $regex) { if ($regex === null) { continue; } if (($regex === $extension && preg_m...
[ "public", "function", "getIconType", "(", "?", "string", "$", "extension", ")", ":", "string", "{", "if", "(", "$", "extension", "!==", "null", "&&", "$", "extension", "!==", "''", ")", "{", "foreach", "(", "self", "::", "TYPE_TO_REGEX", "as", "$", "ty...
Searches icon type by it's extension @param null|string $extension @return string
[ "Searches", "icon", "type", "by", "it", "s", "extension" ]
d6317a9b9b36d992f09affe3900ef7d7ddfd855f
https://github.com/t-kanstantsin/fileupload/blob/d6317a9b9b36d992f09affe3900ef7d7ddfd855f/src/formatter/icon/IconGenerator.php#L104-L120
195,944
jenskooij/cloudcontrol
src/storage/factories/RedirectsFactory.php
RedirectsFactory.createRedirectFromPostValues
public static function createRedirectFromPostValues($postValues) { if (isset($postValues['title'], $postValues['fromUrl'], $postValues['toUrl'])) { $redirectObject = new \stdClass(); $redirectObject->title = $postValues['title']; $redirectObject->slug = StringUtil::slugif...
php
public static function createRedirectFromPostValues($postValues) { if (isset($postValues['title'], $postValues['fromUrl'], $postValues['toUrl'])) { $redirectObject = new \stdClass(); $redirectObject->title = $postValues['title']; $redirectObject->slug = StringUtil::slugif...
[ "public", "static", "function", "createRedirectFromPostValues", "(", "$", "postValues", ")", "{", "if", "(", "isset", "(", "$", "postValues", "[", "'title'", "]", ",", "$", "postValues", "[", "'fromUrl'", "]", ",", "$", "postValues", "[", "'toUrl'", "]", "...
Create a new redirect object from postvalues @param $postValues @return \stdClass @throws \Exception
[ "Create", "a", "new", "redirect", "object", "from", "postvalues" ]
76e5d9ac8f9c50d06d39a995d13cc03742536548
https://github.com/jenskooij/cloudcontrol/blob/76e5d9ac8f9c50d06d39a995d13cc03742536548/src/storage/factories/RedirectsFactory.php#L20-L34
195,945
realboard/DBInstance
src/Realboard/Component/Database/DBInstance/DBInstance.php
DBInstance.clear
public function clear() { $lastQuery = $this->query; $this->query = new Query($this->error, $lastQuery->getInitializer()); $this->query->forceLimit($lastQuery->getLimit()); $this->query->forceOffset($lastQuery->getOffset()); if (!is_array($lastQuery->getResultDataType())) { ...
php
public function clear() { $lastQuery = $this->query; $this->query = new Query($this->error, $lastQuery->getInitializer()); $this->query->forceLimit($lastQuery->getLimit()); $this->query->forceOffset($lastQuery->getOffset()); if (!is_array($lastQuery->getResultDataType())) { ...
[ "public", "function", "clear", "(", ")", "{", "$", "lastQuery", "=", "$", "this", "->", "query", ";", "$", "this", "->", "query", "=", "new", "Query", "(", "$", "this", "->", "error", ",", "$", "lastQuery", "->", "getInitializer", "(", ")", ")", ";...
Clear and reset persistence query. @return self
[ "Clear", "and", "reset", "persistence", "query", "." ]
f2cde7fdf480d5eb5a491a5cf81ff7f4b3be0a35
https://github.com/realboard/DBInstance/blob/f2cde7fdf480d5eb5a491a5cf81ff7f4b3be0a35/src/Realboard/Component/Database/DBInstance/DBInstance.php#L135-L147
195,946
realboard/DBInstance
src/Realboard/Component/Database/DBInstance/DBInstance.php
DBInstance.setSingleQuery
public function setSingleQuery($query) { if ($this->executed) { $this->clear(); } $this->query->single()->setQuery($query); return $this; }
php
public function setSingleQuery($query) { if ($this->executed) { $this->clear(); } $this->query->single()->setQuery($query); return $this; }
[ "public", "function", "setSingleQuery", "(", "$", "query", ")", "{", "if", "(", "$", "this", "->", "executed", ")", "{", "$", "this", "->", "clear", "(", ")", ";", "}", "$", "this", "->", "query", "->", "single", "(", ")", "->", "setQuery", "(", ...
Set Query to single statement executable. @param string $query
[ "Set", "Query", "to", "single", "statement", "executable", "." ]
f2cde7fdf480d5eb5a491a5cf81ff7f4b3be0a35
https://github.com/realboard/DBInstance/blob/f2cde7fdf480d5eb5a491a5cf81ff7f4b3be0a35/src/Realboard/Component/Database/DBInstance/DBInstance.php#L154-L162
195,947
realboard/DBInstance
src/Realboard/Component/Database/DBInstance/DBInstance.php
DBInstance.setQuery
public function setQuery($queries) { if ($this->executed) { $this->clear(); } $this->query->multiple()->setQuery($queries); return $this; }
php
public function setQuery($queries) { if ($this->executed) { $this->clear(); } $this->query->multiple()->setQuery($queries); return $this; }
[ "public", "function", "setQuery", "(", "$", "queries", ")", "{", "if", "(", "$", "this", "->", "executed", ")", "{", "$", "this", "->", "clear", "(", ")", ";", "}", "$", "this", "->", "query", "->", "multiple", "(", ")", "->", "setQuery", "(", "$...
Set Query to multiple statement on next call this method will attach or append new query. @param string $queries
[ "Set", "Query", "to", "multiple", "statement", "on", "next", "call", "this", "method", "will", "attach", "or", "append", "new", "query", "." ]
f2cde7fdf480d5eb5a491a5cf81ff7f4b3be0a35
https://github.com/realboard/DBInstance/blob/f2cde7fdf480d5eb5a491a5cf81ff7f4b3be0a35/src/Realboard/Component/Database/DBInstance/DBInstance.php#L170-L178
195,948
realboard/DBInstance
src/Realboard/Component/Database/DBInstance/DBInstance.php
DBInstance.getAvailableDrivers
public function getAvailableDrivers() { $config = $this->client ? $this->client : $this->config; return $config->getAvailableDrivers(); }
php
public function getAvailableDrivers() { $config = $this->client ? $this->client : $this->config; return $config->getAvailableDrivers(); }
[ "public", "function", "getAvailableDrivers", "(", ")", "{", "$", "config", "=", "$", "this", "->", "client", "?", "$", "this", "->", "client", ":", "$", "this", "->", "config", ";", "return", "$", "config", "->", "getAvailableDrivers", "(", ")", ";", "...
Get list of available drivers. @return array
[ "Get", "list", "of", "available", "drivers", "." ]
f2cde7fdf480d5eb5a491a5cf81ff7f4b3be0a35
https://github.com/realboard/DBInstance/blob/f2cde7fdf480d5eb5a491a5cf81ff7f4b3be0a35/src/Realboard/Component/Database/DBInstance/DBInstance.php#L218-L223
195,949
realboard/DBInstance
src/Realboard/Component/Database/DBInstance/DBInstance.php
DBInstance.getServerVersion
public function getServerVersion() { if ($this->client) { return $this->client->getServerVersion(); } $connection = new Connection($this->config); return $connection->getAttribute(\PDO::ATTR_SERVER_VERSION); }
php
public function getServerVersion() { if ($this->client) { return $this->client->getServerVersion(); } $connection = new Connection($this->config); return $connection->getAttribute(\PDO::ATTR_SERVER_VERSION); }
[ "public", "function", "getServerVersion", "(", ")", "{", "if", "(", "$", "this", "->", "client", ")", "{", "return", "$", "this", "->", "client", "->", "getServerVersion", "(", ")", ";", "}", "$", "connection", "=", "new", "Connection", "(", "$", "this...
Get current version of database platform. @return string|int|null
[ "Get", "current", "version", "of", "database", "platform", "." ]
f2cde7fdf480d5eb5a491a5cf81ff7f4b3be0a35
https://github.com/realboard/DBInstance/blob/f2cde7fdf480d5eb5a491a5cf81ff7f4b3be0a35/src/Realboard/Component/Database/DBInstance/DBInstance.php#L230-L239
195,950
realboard/DBInstance
src/Realboard/Component/Database/DBInstance/DBInstance.php
DBInstance.run
public function run() { $this->executed = true; if ($this->client instanceof ClientInterface) { $this->client->sendRequest(); } else { $connection = new Connection($this->config); $executor = new Executor($connection); $executor->execQuery($th...
php
public function run() { $this->executed = true; if ($this->client instanceof ClientInterface) { $this->client->sendRequest(); } else { $connection = new Connection($this->config); $executor = new Executor($connection); $executor->execQuery($th...
[ "public", "function", "run", "(", ")", "{", "$", "this", "->", "executed", "=", "true", ";", "if", "(", "$", "this", "->", "client", "instanceof", "ClientInterface", ")", "{", "$", "this", "->", "client", "->", "sendRequest", "(", ")", ";", "}", "els...
Run and execute prepared sql queries. @return bool Error status
[ "Run", "and", "execute", "prepared", "sql", "queries", "." ]
f2cde7fdf480d5eb5a491a5cf81ff7f4b3be0a35
https://github.com/realboard/DBInstance/blob/f2cde7fdf480d5eb5a491a5cf81ff7f4b3be0a35/src/Realboard/Component/Database/DBInstance/DBInstance.php#L256-L269
195,951
realboard/DBInstance
src/Realboard/Component/Database/DBInstance/DBInstance.php
DBInstance.getResult
public function getResult($resultMode = 0) { switch ($resultMode) { case self::FETCH_ARRAY: return $this->query->toArray(); break; case self::FETCH_JSON: $result = json_encode($this->query->toArray()); return $result; ...
php
public function getResult($resultMode = 0) { switch ($resultMode) { case self::FETCH_ARRAY: return $this->query->toArray(); break; case self::FETCH_JSON: $result = json_encode($this->query->toArray()); return $result; ...
[ "public", "function", "getResult", "(", "$", "resultMode", "=", "0", ")", "{", "switch", "(", "$", "resultMode", ")", "{", "case", "self", "::", "FETCH_ARRAY", ":", "return", "$", "this", "->", "query", "->", "toArray", "(", ")", ";", "break", ";", "...
Get Result. @param int $resultMode Result Mode DBInstance::FETCH_* @return mixed
[ "Get", "Result", "." ]
f2cde7fdf480d5eb5a491a5cf81ff7f4b3be0a35
https://github.com/realboard/DBInstance/blob/f2cde7fdf480d5eb5a491a5cf81ff7f4b3be0a35/src/Realboard/Component/Database/DBInstance/DBInstance.php#L288-L313
195,952
realboard/DBInstance
src/Realboard/Component/Database/DBInstance/DBInstance.php
DBInstance.createService
public static function createService($serviceName) { switch ($serviceName) { case self::SERVICE_REST: return new RestService(); break; case self::SERVICE_SOAP: return new SoapService(); break; case self::SERVICE_XMLR...
php
public static function createService($serviceName) { switch ($serviceName) { case self::SERVICE_REST: return new RestService(); break; case self::SERVICE_SOAP: return new SoapService(); break; case self::SERVICE_XMLR...
[ "public", "static", "function", "createService", "(", "$", "serviceName", ")", "{", "switch", "(", "$", "serviceName", ")", "{", "case", "self", "::", "SERVICE_REST", ":", "return", "new", "RestService", "(", ")", ";", "break", ";", "case", "self", "::", ...
Create Service. @param int $serviceName Service Type DBInstance::SERVICE_* @return \Realboard\Component\Database\DBInstance\DBInterface\ServiceInterface
[ "Create", "Service", "." ]
f2cde7fdf480d5eb5a491a5cf81ff7f4b3be0a35
https://github.com/realboard/DBInstance/blob/f2cde7fdf480d5eb5a491a5cf81ff7f4b3be0a35/src/Realboard/Component/Database/DBInstance/DBInstance.php#L322-L337
195,953
juliangut/mapping
src/Driver/AbstractAnnotationDriver.php
AbstractAnnotationDriver.getMappingClasses
protected function getMappingClasses(): array { AnnotationRegistry::registerLoader('class_exists'); $mappingClasses = []; foreach ($this->locator->getMappingFiles() as $annotationFile) { $mappingClasses[] = $this->loadClassFromFile($annotationFile); } return \a...
php
protected function getMappingClasses(): array { AnnotationRegistry::registerLoader('class_exists'); $mappingClasses = []; foreach ($this->locator->getMappingFiles() as $annotationFile) { $mappingClasses[] = $this->loadClassFromFile($annotationFile); } return \a...
[ "protected", "function", "getMappingClasses", "(", ")", ":", "array", "{", "AnnotationRegistry", "::", "registerLoader", "(", "'class_exists'", ")", ";", "$", "mappingClasses", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "locator", "->", "getMapping...
Get mapping classes. @throws \Jgut\Mapping\Exception\DriverException @return \ReflectionClass[]
[ "Get", "mapping", "classes", "." ]
1830ff84c054d8e3759df170a5664a97f7070be9
https://github.com/juliangut/mapping/blob/1830ff84c054d8e3759df170a5664a97f7070be9/src/Driver/AbstractAnnotationDriver.php#L59-L75
195,954
juliangut/mapping
src/Driver/AbstractAnnotationDriver.php
AbstractAnnotationDriver.loadClassFromFile
protected function loadClassFromFile(string $annotationFile): string { $tokens = \token_get_all(\file_get_contents($annotationFile)); $hasClass = false; $class = null; $hasNamespace = false; $namespace = ''; for ($i = 0, $length = \count($tokens); $i < $length; $i++)...
php
protected function loadClassFromFile(string $annotationFile): string { $tokens = \token_get_all(\file_get_contents($annotationFile)); $hasClass = false; $class = null; $hasNamespace = false; $namespace = ''; for ($i = 0, $length = \count($tokens); $i < $length; $i++)...
[ "protected", "function", "loadClassFromFile", "(", "string", "$", "annotationFile", ")", ":", "string", "{", "$", "tokens", "=", "\\", "token_get_all", "(", "\\", "file_get_contents", "(", "$", "annotationFile", ")", ")", ";", "$", "hasClass", "=", "false", ...
Load fully qualified class name from file. @param string $annotationFile @return string @SuppressWarnings(PMD.CyclomaticComplexity) @SuppressWarnings(PMD.NPathComplexity)
[ "Load", "fully", "qualified", "class", "name", "from", "file", "." ]
1830ff84c054d8e3759df170a5664a97f7070be9
https://github.com/juliangut/mapping/blob/1830ff84c054d8e3759df170a5664a97f7070be9/src/Driver/AbstractAnnotationDriver.php#L87-L129
195,955
CHGLongStone/just-core-audit-entity
SERVICES/AUDIT.entity.php
AUDIT_ENTITY.logChange
public function logChange($args){ #echo __METHOD__.__LINE__.'$this->AUDIT_CODE['.$this->AUDIT_CODE.'] args<pre>['.var_export($args, true).']</pre>'.'<br>'.PHP_EOL; if(!isset($args["code"]) || !is_numeric($args["code"])){ if(isset($this->AUDIT_CODE)){ $args["code"] = $this->AUDIT_CODE; }else{ return f...
php
public function logChange($args){ #echo __METHOD__.__LINE__.'$this->AUDIT_CODE['.$this->AUDIT_CODE.'] args<pre>['.var_export($args, true).']</pre>'.'<br>'.PHP_EOL; if(!isset($args["code"]) || !is_numeric($args["code"])){ if(isset($this->AUDIT_CODE)){ $args["code"] = $this->AUDIT_CODE; }else{ return f...
[ "public", "function", "logChange", "(", "$", "args", ")", "{", "#echo __METHOD__.__LINE__.'$this->AUDIT_CODE['.$this->AUDIT_CODE.'] args<pre>['.var_export($args, true).']</pre>'.'<br>'.PHP_EOL; ", "if", "(", "!", "isset", "(", "$", "args", "[", "\"code\"", "]", ")", "||", "...
Log an entity change @param array args @return bool
[ "Log", "an", "entity", "change" ]
5b5aff35dffd06adf900bbca1ad7537b1f00a72e
https://github.com/CHGLongStone/just-core-audit-entity/blob/5b5aff35dffd06adf900bbca1ad7537b1f00a72e/SERVICES/AUDIT.entity.php#L92-L131
195,956
covex-nn/JooS_Stream
src/JooS/Stream/Files.php
Files.tempnam
public function tempnam() { $sysTempDir = $this->_sysGetTempDir(); do { $this->_tempnamCounter++; $name = $sysTempDir . "/" . $this->_tempnamCounter; } while (file_exists($name)); return $name; }
php
public function tempnam() { $sysTempDir = $this->_sysGetTempDir(); do { $this->_tempnamCounter++; $name = $sysTempDir . "/" . $this->_tempnamCounter; } while (file_exists($name)); return $name; }
[ "public", "function", "tempnam", "(", ")", "{", "$", "sysTempDir", "=", "$", "this", "->", "_sysGetTempDir", "(", ")", ";", "do", "{", "$", "this", "->", "_tempnamCounter", "++", ";", "$", "name", "=", "$", "sysTempDir", ".", "\"/\"", ".", "$", "this...
Return unique filename @return string
[ "Return", "unique", "filename" ]
e9841b804190a9f624b9e44caa0af7a18f3816d1
https://github.com/covex-nn/JooS_Stream/blob/e9841b804190a9f624b9e44caa0af7a18f3816d1/src/JooS/Stream/Files.php#L61-L70
195,957
covex-nn/JooS_Stream
src/JooS/Stream/Files.php
Files._sysGetTempDir
private function _sysGetTempDir($create = true) { if (is_null($this->_systemTempDirectory) && $create) { $sysTmpDir = rtrim(sys_get_temp_dir(), "\\/"); do { $name = $sysTmpDir . "/" . uniqid("fs", true); } while (file_exists($name)); mkdir($name, 0777); $this->_systemTempDi...
php
private function _sysGetTempDir($create = true) { if (is_null($this->_systemTempDirectory) && $create) { $sysTmpDir = rtrim(sys_get_temp_dir(), "\\/"); do { $name = $sysTmpDir . "/" . uniqid("fs", true); } while (file_exists($name)); mkdir($name, 0777); $this->_systemTempDi...
[ "private", "function", "_sysGetTempDir", "(", "$", "create", "=", "true", ")", "{", "if", "(", "is_null", "(", "$", "this", "->", "_systemTempDirectory", ")", "&&", "$", "create", ")", "{", "$", "sysTmpDir", "=", "rtrim", "(", "sys_get_temp_dir", "(", ")...
Return path to own temp directory @param boolean $create Create new folder ? @return string
[ "Return", "path", "to", "own", "temp", "directory" ]
e9841b804190a9f624b9e44caa0af7a18f3816d1
https://github.com/covex-nn/JooS_Stream/blob/e9841b804190a9f624b9e44caa0af7a18f3816d1/src/JooS/Stream/Files.php#L145-L158
195,958
hschletz/NADA
src/Column/AbstractColumn.php
AbstractColumn.constructFromTable
public function constructFromTable($table, $data) { $this->_database = $table->getDatabase(); $this->_table = $table; $this->_parseName($data); $this->_parseDatatype($data); $this->_parseNotnull($data); $this->_parseDefault($data); $this->_parseAutoIncrement($...
php
public function constructFromTable($table, $data) { $this->_database = $table->getDatabase(); $this->_table = $table; $this->_parseName($data); $this->_parseDatatype($data); $this->_parseNotnull($data); $this->_parseDefault($data); $this->_parseAutoIncrement($...
[ "public", "function", "constructFromTable", "(", "$", "table", ",", "$", "data", ")", "{", "$", "this", "->", "_database", "=", "$", "table", "->", "getDatabase", "(", ")", ";", "$", "this", "->", "_table", "=", "$", "table", ";", "$", "this", "->", ...
Internal method to set up the object from within a \Nada\Table\AbstractTable object The column data can be of any type and is passed to the _parse*() methods. @param \Nada\Table\AbstractTable $table Table that this column belongs to @param mixed $data Column data @internal
[ "Internal", "method", "to", "set", "up", "the", "object", "from", "within", "a", "\\", "Nada", "\\", "Table", "\\", "AbstractTable", "object" ]
4ead798354089fd360f917ce64dd1432d5650df0
https://github.com/hschletz/NADA/blob/4ead798354089fd360f917ce64dd1432d5650df0/src/Column/AbstractColumn.php#L159-L169
195,959
hschletz/NADA
src/Column/AbstractColumn.php
AbstractColumn.toArray
public function toArray() { return array( 'name' => $this->_name, 'type' => $this->_datatype, 'length' => $this->_length, 'notnull' => $this->_notnull, 'default' => $this->_default, 'autoincrement' => $this->_autoIncrement, ...
php
public function toArray() { return array( 'name' => $this->_name, 'type' => $this->_datatype, 'length' => $this->_length, 'notnull' => $this->_notnull, 'default' => $this->_default, 'autoincrement' => $this->_autoIncrement, ...
[ "public", "function", "toArray", "(", ")", "{", "return", "array", "(", "'name'", "=>", "$", "this", "->", "_name", ",", "'type'", "=>", "$", "this", "->", "_datatype", ",", "'length'", "=>", "$", "this", "->", "_length", ",", "'notnull'", "=>", "$", ...
Export column data to an associative array @return array Column data: name, type, length, notnull, default, autoincrement, comment
[ "Export", "column", "data", "to", "an", "associative", "array" ]
4ead798354089fd360f917ce64dd1432d5650df0
https://github.com/hschletz/NADA/blob/4ead798354089fd360f917ce64dd1432d5650df0/src/Column/AbstractColumn.php#L212-L223
195,960
hschletz/NADA
src/Column/AbstractColumn.php
AbstractColumn._parseNotnull
protected function _parseNotnull($data) { switch ($data['is_nullable']) { case 'YES': $this->_notnull = false; break; case 'NO': $this->_notnull = true; break; default: throw new \UnexpectedVa...
php
protected function _parseNotnull($data) { switch ($data['is_nullable']) { case 'YES': $this->_notnull = false; break; case 'NO': $this->_notnull = true; break; default: throw new \UnexpectedVa...
[ "protected", "function", "_parseNotnull", "(", "$", "data", ")", "{", "switch", "(", "$", "data", "[", "'is_nullable'", "]", ")", "{", "case", "'YES'", ":", "$", "this", "->", "_notnull", "=", "false", ";", "break", ";", "case", "'NO'", ":", "$", "th...
Extract NOT NULL constraint from column data The default implementation expects an array with information_schema compatible keys. @param mixed $data Column data
[ "Extract", "NOT", "NULL", "constraint", "from", "column", "data" ]
4ead798354089fd360f917ce64dd1432d5650df0
https://github.com/hschletz/NADA/blob/4ead798354089fd360f917ce64dd1432d5650df0/src/Column/AbstractColumn.php#L256-L268
195,961
hschletz/NADA
src/Column/AbstractColumn.php
AbstractColumn.setName
public function setName($name) { if (strlen($name) == 0) { throw new \InvalidArgumentException('Column name must not be empty'); } if ($this->_table) { // Call the table method before the property gets updated because the // old name is retrieved from $thi...
php
public function setName($name) { if (strlen($name) == 0) { throw new \InvalidArgumentException('Column name must not be empty'); } if ($this->_table) { // Call the table method before the property gets updated because the // old name is retrieved from $thi...
[ "public", "function", "setName", "(", "$", "name", ")", "{", "if", "(", "strlen", "(", "$", "name", ")", "==", "0", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'Column name must not be empty'", ")", ";", "}", "if", "(", "$", "this",...
Change the column's name If this instance is linked to a table, i.e. not created via \Nada\Database\AbstractDatabase::createColumn(), the operation will be performed on the database. @param string $name New name @throws \InvalidArgumentException if name is empty
[ "Change", "the", "column", "s", "name" ]
4ead798354089fd360f917ce64dd1432d5650df0
https://github.com/hschletz/NADA/blob/4ead798354089fd360f917ce64dd1432d5650df0/src/Column/AbstractColumn.php#L400-L411
195,962
hschletz/NADA
src/Column/AbstractColumn.php
AbstractColumn._setDefault
protected function _setDefault() { if ($this->_default === null) { $this->_table->alter( sprintf('ALTER COLUMN %s DROP DEFAULT', $this->_database->prepareIdentifier($this->_name)) ); } else { $this->_table->alter( sprintf( ...
php
protected function _setDefault() { if ($this->_default === null) { $this->_table->alter( sprintf('ALTER COLUMN %s DROP DEFAULT', $this->_database->prepareIdentifier($this->_name)) ); } else { $this->_table->alter( sprintf( ...
[ "protected", "function", "_setDefault", "(", ")", "{", "if", "(", "$", "this", "->", "_default", "===", "null", ")", "{", "$", "this", "->", "_table", "->", "alter", "(", "sprintf", "(", "'ALTER COLUMN %s DROP DEFAULT'", ",", "$", "this", "->", "_database"...
DBMS-specific implementation for setting a column's default value
[ "DBMS", "-", "specific", "implementation", "for", "setting", "a", "column", "s", "default", "value" ]
4ead798354089fd360f917ce64dd1432d5650df0
https://github.com/hschletz/NADA/blob/4ead798354089fd360f917ce64dd1432d5650df0/src/Column/AbstractColumn.php#L493-L508
195,963
hschletz/NADA
src/Column/AbstractColumn.php
AbstractColumn.setComment
public function setComment($comment) { if ($this->_comment != $comment) { $this->_comment = $comment; if ($this->_table) { $this->_setComment($comment); } } }
php
public function setComment($comment) { if ($this->_comment != $comment) { $this->_comment = $comment; if ($this->_table) { $this->_setComment($comment); } } }
[ "public", "function", "setComment", "(", "$", "comment", ")", "{", "if", "(", "$", "this", "->", "_comment", "!=", "$", "comment", ")", "{", "$", "this", "->", "_comment", "=", "$", "comment", ";", "if", "(", "$", "this", "->", "_table", ")", "{", ...
Set Column comment If this instance is linked to a table, i.e. not created via \Nada\Database\AbstractDatabase::createColumn(), the operation will be performed on the database. @param string $comment Comment (use NULL to remove comment)
[ "Set", "Column", "comment" ]
4ead798354089fd360f917ce64dd1432d5650df0
https://github.com/hschletz/NADA/blob/4ead798354089fd360f917ce64dd1432d5650df0/src/Column/AbstractColumn.php#L519-L527
195,964
hschletz/NADA
src/Column/AbstractColumn.php
AbstractColumn.isDifferent
public function isDifferent(array $newSpec, array $keys = null) { $oldSpec = $this->toArray(); if ($keys) { $keys = array_flip($keys); $oldSpec = array_intersect_key($oldSpec, $keys); $newSpec = array_intersect_key($newSpec, $keys); } return $this-...
php
public function isDifferent(array $newSpec, array $keys = null) { $oldSpec = $this->toArray(); if ($keys) { $keys = array_flip($keys); $oldSpec = array_intersect_key($oldSpec, $keys); $newSpec = array_intersect_key($newSpec, $keys); } return $this-...
[ "public", "function", "isDifferent", "(", "array", "$", "newSpec", ",", "array", "$", "keys", "=", "null", ")", "{", "$", "oldSpec", "=", "$", "this", "->", "toArray", "(", ")", ";", "if", "(", "$", "keys", ")", "{", "$", "keys", "=", "array_flip",...
Compare with given specification @param mixed[] $newSpec Specification to compare with. Same keys as toArray() output. @param string[] $keys Compare only given attributes (default: compare all) @return bool
[ "Compare", "with", "given", "specification" ]
4ead798354089fd360f917ce64dd1432d5650df0
https://github.com/hschletz/NADA/blob/4ead798354089fd360f917ce64dd1432d5650df0/src/Column/AbstractColumn.php#L541-L550
195,965
phossa/phossa-di
src/Phossa/Di/Delegator.php
Delegator.get
public function get($id) { /* @var $container InteropContainerInterface */ foreach ($this->getContainers() as $container) { if ($container->has($id)) { return $container->get($id); } } // not found throw new NotFoundException( ...
php
public function get($id) { /* @var $container InteropContainerInterface */ foreach ($this->getContainers() as $container) { if ($container->has($id)) { return $container->get($id); } } // not found throw new NotFoundException( ...
[ "public", "function", "get", "(", "$", "id", ")", "{", "/* @var $container InteropContainerInterface */", "foreach", "(", "$", "this", "->", "getContainers", "(", ")", "as", "$", "container", ")", "{", "if", "(", "$", "container", "->", "has", "(", "$", "i...
Get from the delegator {@inheritDoc}
[ "Get", "from", "the", "delegator" ]
bbe1e95b081068e2bc49c6cd465f38aab0374be5
https://github.com/phossa/phossa-di/blob/bbe1e95b081068e2bc49c6cd465f38aab0374be5/src/Phossa/Di/Delegator.php#L80-L94
195,966
zapheus/zapheus
src/Http/Message/ResponseFactory.php
ResponseFactory.make
public function make() { return new Response($this->code, $this->headers, $this->stream, $this->version); }
php
public function make() { return new Response($this->code, $this->headers, $this->stream, $this->version); }
[ "public", "function", "make", "(", ")", "{", "return", "new", "Response", "(", "$", "this", "->", "code", ",", "$", "this", "->", "headers", ",", "$", "this", "->", "stream", ",", "$", "this", "->", "version", ")", ";", "}" ]
Creates the response instance. @return \Zapheus\Http\Message\ResponseInterface
[ "Creates", "the", "response", "instance", "." ]
96618b5cee7d20b6700d0475e4334ae4b5163a6b
https://github.com/zapheus/zapheus/blob/96618b5cee7d20b6700d0475e4334ae4b5163a6b/src/Http/Message/ResponseFactory.php#L53-L56
195,967
phpffcms/ffcms-core
src/Exception/NativeException.php
NativeException.display
public function display($message = null) { // if passed message is null get exception msg if (!$message) { $message = $this->message; } // hide root path from exception $message = Str::replace(root, '$DOCUMENT_ROOT', $message); $message = strip_ta...
php
public function display($message = null) { // if passed message is null get exception msg if (!$message) { $message = $this->message; } // hide root path from exception $message = Str::replace(root, '$DOCUMENT_ROOT', $message); $message = strip_ta...
[ "public", "function", "display", "(", "$", "message", "=", "null", ")", "{", "// if passed message is null get exception msg", "if", "(", "!", "$", "message", ")", "{", "$", "message", "=", "$", "this", "->", "message", ";", "}", "// hide root path from exceptio...
Display native exception @param string $message @return string|null
[ "Display", "native", "exception" ]
44a309553ef9f115ccfcfd71f2ac6e381c612082
https://github.com/phpffcms/ffcms-core/blob/44a309553ef9f115ccfcfd71f2ac6e381c612082/src/Exception/NativeException.php#L31-L51
195,968
agentmedia/phine-core
src/Core/Modules/Backend/SettingsForm.php
SettingsForm.AddLogLifetimeField
private function AddLogLifetimeField() { $name = 'LogLifetime'; $field = Input::Text($name, $this->settings->GetLogLifetime()); $this->AddField($field); $this->AddValidator($name, new Integer(0, 730)); $this->SetRequired($name); }
php
private function AddLogLifetimeField() { $name = 'LogLifetime'; $field = Input::Text($name, $this->settings->GetLogLifetime()); $this->AddField($field); $this->AddValidator($name, new Integer(0, 730)); $this->SetRequired($name); }
[ "private", "function", "AddLogLifetimeField", "(", ")", "{", "$", "name", "=", "'LogLifetime'", ";", "$", "field", "=", "Input", "::", "Text", "(", "$", "name", ",", "$", "this", "->", "settings", "->", "GetLogLifetime", "(", ")", ")", ";", "$", "this"...
Adds the log lifetime field
[ "Adds", "the", "log", "lifetime", "field" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Modules/Backend/SettingsForm.php#L44-L51
195,969
agentmedia/phine-core
src/Core/Modules/Backend/SettingsForm.php
SettingsForm.AddChangeRequestLifetimeField
private function AddChangeRequestLifetimeField() { $name = 'ChangeRequestLifetime'; $field = Input::Text($name, $this->settings->GetChangeRequestLifetime()); $this->AddField($field); $this->AddValidator($name, new Integer(1, 360)); $this->SetRequired($name); }
php
private function AddChangeRequestLifetimeField() { $name = 'ChangeRequestLifetime'; $field = Input::Text($name, $this->settings->GetChangeRequestLifetime()); $this->AddField($field); $this->AddValidator($name, new Integer(1, 360)); $this->SetRequired($name); }
[ "private", "function", "AddChangeRequestLifetimeField", "(", ")", "{", "$", "name", "=", "'ChangeRequestLifetime'", ";", "$", "field", "=", "Input", "::", "Text", "(", "$", "name", ",", "$", "this", "->", "settings", "->", "GetChangeRequestLifetime", "(", ")",...
Adds the change request lifetime field
[ "Adds", "the", "change", "request", "lifetime", "field" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Modules/Backend/SettingsForm.php#L56-L63
195,970
agentmedia/phine-core
src/Core/Modules/Backend/SettingsForm.php
SettingsForm.AddMailFromEMailField
private function AddMailFromEMailField() { $name = 'MailFromEMail'; $field = Input::Text($name, $this->settings->GetMailFromEMail()); $this->AddField($field); $this->AddValidator($name, PhpFilter::EMail()); }
php
private function AddMailFromEMailField() { $name = 'MailFromEMail'; $field = Input::Text($name, $this->settings->GetMailFromEMail()); $this->AddField($field); $this->AddValidator($name, PhpFilter::EMail()); }
[ "private", "function", "AddMailFromEMailField", "(", ")", "{", "$", "name", "=", "'MailFromEMail'", ";", "$", "field", "=", "Input", "::", "Text", "(", "$", "name", ",", "$", "this", "->", "settings", "->", "GetMailFromEMail", "(", ")", ")", ";", "$", ...
Adds the smtp mail from e-mail field
[ "Adds", "the", "smtp", "mail", "from", "e", "-", "mail", "field" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Modules/Backend/SettingsForm.php#L68-L74
195,971
agentmedia/phine-core
src/Core/Modules/Backend/SettingsForm.php
SettingsForm.AddMailFromNameField
private function AddMailFromNameField() { $name = 'MailFromName'; $field = Input::Text($name, $this->settings->GetMailFromName()); $this->AddField($field); }
php
private function AddMailFromNameField() { $name = 'MailFromName'; $field = Input::Text($name, $this->settings->GetMailFromName()); $this->AddField($field); }
[ "private", "function", "AddMailFromNameField", "(", ")", "{", "$", "name", "=", "'MailFromName'", ";", "$", "field", "=", "Input", "::", "Text", "(", "$", "name", ",", "$", "this", "->", "settings", "->", "GetMailFromName", "(", ")", ")", ";", "$", "th...
Adds the mail from name field
[ "Adds", "the", "mail", "from", "name", "field" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Modules/Backend/SettingsForm.php#L79-L84
195,972
agentmedia/phine-core
src/Core/Modules/Backend/SettingsForm.php
SettingsForm.AddSmtpHostField
private function AddSmtpHostField() { $name = 'SmtpHost'; $field = Input::Text($name, $this->settings->GetSmtpHost()); $this->AddField($field); }
php
private function AddSmtpHostField() { $name = 'SmtpHost'; $field = Input::Text($name, $this->settings->GetSmtpHost()); $this->AddField($field); }
[ "private", "function", "AddSmtpHostField", "(", ")", "{", "$", "name", "=", "'SmtpHost'", ";", "$", "field", "=", "Input", "::", "Text", "(", "$", "name", ",", "$", "this", "->", "settings", "->", "GetSmtpHost", "(", ")", ")", ";", "$", "this", "->",...
Adds the smtp host field
[ "Adds", "the", "smtp", "host", "field" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Modules/Backend/SettingsForm.php#L89-L94
195,973
agentmedia/phine-core
src/Core/Modules/Backend/SettingsForm.php
SettingsForm.AddSmtpPortField
private function AddSmtpPortField() { $name = 'SmtpPort'; $field = Input::Text($name, $this->settings->GetSmtpPort()); $this->AddField($field); $this->AddValidator($name, new Integer(1, 65535)); }
php
private function AddSmtpPortField() { $name = 'SmtpPort'; $field = Input::Text($name, $this->settings->GetSmtpPort()); $this->AddField($field); $this->AddValidator($name, new Integer(1, 65535)); }
[ "private", "function", "AddSmtpPortField", "(", ")", "{", "$", "name", "=", "'SmtpPort'", ";", "$", "field", "=", "Input", "::", "Text", "(", "$", "name", ",", "$", "this", "->", "settings", "->", "GetSmtpPort", "(", ")", ")", ";", "$", "this", "->",...
Adds the smtp port field
[ "Adds", "the", "smtp", "port", "field" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Modules/Backend/SettingsForm.php#L99-L105
195,974
agentmedia/phine-core
src/Core/Modules/Backend/SettingsForm.php
SettingsForm.AddSmtpUserField
private function AddSmtpUserField() { $name = 'SmtpUser'; $field = Input::Text($name, $this->settings->GetSmtpUser()); $this->AddField($field); }
php
private function AddSmtpUserField() { $name = 'SmtpUser'; $field = Input::Text($name, $this->settings->GetSmtpUser()); $this->AddField($field); }
[ "private", "function", "AddSmtpUserField", "(", ")", "{", "$", "name", "=", "'SmtpUser'", ";", "$", "field", "=", "Input", "::", "Text", "(", "$", "name", ",", "$", "this", "->", "settings", "->", "GetSmtpUser", "(", ")", ")", ";", "$", "this", "->",...
Adds the smtp user field
[ "Adds", "the", "smtp", "user", "field" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Modules/Backend/SettingsForm.php#L109-L114
195,975
agentmedia/phine-core
src/Core/Modules/Backend/SettingsForm.php
SettingsForm.AddSmtpPasswordField
private function AddSmtpPasswordField() { $name = 'SmtpPassword'; $field = Input::Text($name, $this->settings->GetSmtpPassword()); $this->AddField($field); }
php
private function AddSmtpPasswordField() { $name = 'SmtpPassword'; $field = Input::Text($name, $this->settings->GetSmtpPassword()); $this->AddField($field); }
[ "private", "function", "AddSmtpPasswordField", "(", ")", "{", "$", "name", "=", "'SmtpPassword'", ";", "$", "field", "=", "Input", "::", "Text", "(", "$", "name", ",", "$", "this", "->", "settings", "->", "GetSmtpPassword", "(", ")", ")", ";", "$", "th...
Adds the smtp password field
[ "Adds", "the", "smtp", "password", "field" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Modules/Backend/SettingsForm.php#L119-L124
195,976
agentmedia/phine-core
src/Core/Modules/Backend/SettingsForm.php
SettingsForm.AddSmtpSecurityField
private function AddSmtpSecurityField() { $name = 'SmtpSecurity'; $field = new Select($name, $this->settings->GetSmtpSecurity()); $values = SmtpSecurity::AllowedValues(); foreach ($values as $value) { $field->AddOption($value, Trans("Core.SettingsForm.SmtpSecurity...
php
private function AddSmtpSecurityField() { $name = 'SmtpSecurity'; $field = new Select($name, $this->settings->GetSmtpSecurity()); $values = SmtpSecurity::AllowedValues(); foreach ($values as $value) { $field->AddOption($value, Trans("Core.SettingsForm.SmtpSecurity...
[ "private", "function", "AddSmtpSecurityField", "(", ")", "{", "$", "name", "=", "'SmtpSecurity'", ";", "$", "field", "=", "new", "Select", "(", "$", "name", ",", "$", "this", "->", "settings", "->", "GetSmtpSecurity", "(", ")", ")", ";", "$", "values", ...
Adds the smtp security field
[ "Adds", "the", "smtp", "security", "field" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Modules/Backend/SettingsForm.php#L129-L139
195,977
agentmedia/phine-core
src/Core/Modules/Backend/SettingsForm.php
SettingsForm.OnSuccess
protected function OnSuccess() { $this->settings->SetLogLifetime((int)$this->Value('LogLifetime')); $this->settings->SetChangeRequestLifetime($this->Value('ChangeRequestLifetime')); $this->settings->SetMailFromEMail($this->Value('MailFromEMail')); $this->settings->SetMailFromName($th...
php
protected function OnSuccess() { $this->settings->SetLogLifetime((int)$this->Value('LogLifetime')); $this->settings->SetChangeRequestLifetime($this->Value('ChangeRequestLifetime')); $this->settings->SetMailFromEMail($this->Value('MailFromEMail')); $this->settings->SetMailFromName($th...
[ "protected", "function", "OnSuccess", "(", ")", "{", "$", "this", "->", "settings", "->", "SetLogLifetime", "(", "(", "int", ")", "$", "this", "->", "Value", "(", "'LogLifetime'", ")", ")", ";", "$", "this", "->", "settings", "->", "SetChangeRequestLifetim...
Saves the settings
[ "Saves", "the", "settings" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Modules/Backend/SettingsForm.php#L145-L158
195,978
guni12/comment
src/Comments/ShowAllService.php
ShowAllService.getAll
public function getAll() { $comm = new Comm(); $comm->setDb($this->di->get("db")); return $comm->findAll(); }
php
public function getAll() { $comm = new Comm(); $comm->setDb($this->di->get("db")); return $comm->findAll(); }
[ "public", "function", "getAll", "(", ")", "{", "$", "comm", "=", "new", "Comm", "(", ")", ";", "$", "comm", "->", "setDb", "(", "$", "this", "->", "di", "->", "get", "(", "\"db\"", ")", ")", ";", "return", "$", "comm", "->", "findAll", "(", ")"...
Get details on all comments. @return Comm
[ "Get", "details", "on", "all", "comments", "." ]
f9c2f3e2093fea414867f548c5f5e07f96c55bfd
https://github.com/guni12/comment/blob/f9c2f3e2093fea414867f548c5f5e07f96c55bfd/src/Comments/ShowAllService.php#L44-L49
195,979
sndsgd/sndsgd-field
src/field/Rule.php
Rule.setField
public function setField(Field $field, $index = 0) { $this->field = $field; $this->valueIndex = $index; }
php
public function setField(Field $field, $index = 0) { $this->field = $field; $this->valueIndex = $index; }
[ "public", "function", "setField", "(", "Field", "$", "field", ",", "$", "index", "=", "0", ")", "{", "$", "this", "->", "field", "=", "$", "field", ";", "$", "this", "->", "valueIndex", "=", "$", "index", ";", "}" ]
Set the value's parent field for use in validation @param sndsgd\Field $field @param integer $index The index of the value in the field
[ "Set", "the", "value", "s", "parent", "field", "for", "use", "in", "validation" ]
34ac3aabfe031bd9b259b3b93e84964b04031334
https://github.com/sndsgd/sndsgd-field/blob/34ac3aabfe031bd9b259b3b93e84964b04031334/src/field/Rule.php#L145-L149
195,980
sndsgd/sndsgd-field
src/field/Rule.php
Rule.getError
public function getError() { $error = new Error($this->getMessage()); $error->setValue($this->value); if ($this->field !== null) { $error->setName($this->field->getName()); } if ($this->valueIndex !== null) { $error->setIndex($this->valueIndex); ...
php
public function getError() { $error = new Error($this->getMessage()); $error->setValue($this->value); if ($this->field !== null) { $error->setName($this->field->getName()); } if ($this->valueIndex !== null) { $error->setIndex($this->valueIndex); ...
[ "public", "function", "getError", "(", ")", "{", "$", "error", "=", "new", "Error", "(", "$", "this", "->", "getMessage", "(", ")", ")", ";", "$", "error", "->", "setValue", "(", "$", "this", "->", "value", ")", ";", "if", "(", "$", "this", "->",...
Get an error instance @return sndsgd\field\Error
[ "Get", "an", "error", "instance" ]
34ac3aabfe031bd9b259b3b93e84964b04031334
https://github.com/sndsgd/sndsgd-field/blob/34ac3aabfe031bd9b259b3b93e84964b04031334/src/field/Rule.php#L166-L177
195,981
vpg/titon.utility
src/Titon/Utility/Inflector.php
Inflector.camelCase
public static function camelCase($string) { return static::cache(array(__METHOD__, $string), function() use ($string) { return str_replace(' ', '', mb_convert_case(str_replace(array('_', '-'), ' ', preg_replace('/[^-_a-z0-9\s]+/i', '', $string)), MB_CASE_TITLE)); }); }
php
public static function camelCase($string) { return static::cache(array(__METHOD__, $string), function() use ($string) { return str_replace(' ', '', mb_convert_case(str_replace(array('_', '-'), ' ', preg_replace('/[^-_a-z0-9\s]+/i', '', $string)), MB_CASE_TITLE)); }); }
[ "public", "static", "function", "camelCase", "(", "$", "string", ")", "{", "return", "static", "::", "cache", "(", "array", "(", "__METHOD__", ",", "$", "string", ")", ",", "function", "(", ")", "use", "(", "$", "string", ")", "{", "return", "str_repla...
Inflect a word to a camel case form with the first letter being capitalized. @param string $string @return string
[ "Inflect", "a", "word", "to", "a", "camel", "case", "form", "with", "the", "first", "letter", "being", "capitalized", "." ]
8a77eb9e7b8baacf41cc25487289779d8319cd3a
https://github.com/vpg/titon.utility/blob/8a77eb9e7b8baacf41cc25487289779d8319cd3a/src/Titon/Utility/Inflector.php#L23-L27
195,982
vpg/titon.utility
src/Titon/Utility/Inflector.php
Inflector.className
public static function className($string) { return static::cache(array(__METHOD__, $string), function() use ($string) { return Inflector::camelCase(Inflector::singularize($string)); }); }
php
public static function className($string) { return static::cache(array(__METHOD__, $string), function() use ($string) { return Inflector::camelCase(Inflector::singularize($string)); }); }
[ "public", "static", "function", "className", "(", "$", "string", ")", "{", "return", "static", "::", "cache", "(", "array", "(", "__METHOD__", ",", "$", "string", ")", ",", "function", "(", ")", "use", "(", "$", "string", ")", "{", "return", "Inflector...
Inflect a word to a class name. Singular camel cased form. @param string $string @return string
[ "Inflect", "a", "word", "to", "a", "class", "name", ".", "Singular", "camel", "cased", "form", "." ]
8a77eb9e7b8baacf41cc25487289779d8319cd3a
https://github.com/vpg/titon.utility/blob/8a77eb9e7b8baacf41cc25487289779d8319cd3a/src/Titon/Utility/Inflector.php#L35-L39
195,983
vpg/titon.utility
src/Titon/Utility/Inflector.php
Inflector.fileName
public static function fileName($string, $ext = 'php', $capitalize = true) { if (mb_strpos($string, '.') !== false) { $string = mb_substr($string, 0, mb_strrpos($string, '.')); } $path = static::camelCase($string); if (!$capitalize) { $path = lcfirst($path); ...
php
public static function fileName($string, $ext = 'php', $capitalize = true) { if (mb_strpos($string, '.') !== false) { $string = mb_substr($string, 0, mb_strrpos($string, '.')); } $path = static::camelCase($string); if (!$capitalize) { $path = lcfirst($path); ...
[ "public", "static", "function", "fileName", "(", "$", "string", ",", "$", "ext", "=", "'php'", ",", "$", "capitalize", "=", "true", ")", "{", "if", "(", "mb_strpos", "(", "$", "string", ",", "'.'", ")", "!==", "false", ")", "{", "$", "string", "=",...
Inflect a word for a filename. Studly cased and capitalized. @param string $string @param string $ext @param bool $capitalize @return string
[ "Inflect", "a", "word", "for", "a", "filename", ".", "Studly", "cased", "and", "capitalized", "." ]
8a77eb9e7b8baacf41cc25487289779d8319cd3a
https://github.com/vpg/titon.utility/blob/8a77eb9e7b8baacf41cc25487289779d8319cd3a/src/Titon/Utility/Inflector.php#L49-L65
195,984
vpg/titon.utility
src/Titon/Utility/Inflector.php
Inflector.normalCase
public static function normalCase($string) { return static::cache(array(__METHOD__, $string), function() use ($string) { return ucfirst(mb_strtolower(str_replace('_', ' ', $string))); }); }
php
public static function normalCase($string) { return static::cache(array(__METHOD__, $string), function() use ($string) { return ucfirst(mb_strtolower(str_replace('_', ' ', $string))); }); }
[ "public", "static", "function", "normalCase", "(", "$", "string", ")", "{", "return", "static", "::", "cache", "(", "array", "(", "__METHOD__", ",", "$", "string", ")", ",", "function", "(", ")", "use", "(", "$", "string", ")", "{", "return", "ucfirst"...
Inflect a word to a human readable string with only the first word capitalized and the rest lowercased. @param string $string @return string
[ "Inflect", "a", "word", "to", "a", "human", "readable", "string", "with", "only", "the", "first", "word", "capitalized", "and", "the", "rest", "lowercased", "." ]
8a77eb9e7b8baacf41cc25487289779d8319cd3a
https://github.com/vpg/titon.utility/blob/8a77eb9e7b8baacf41cc25487289779d8319cd3a/src/Titon/Utility/Inflector.php#L85-L89
195,985
vpg/titon.utility
src/Titon/Utility/Inflector.php
Inflector.route
public static function route($string) { return static::cache(array(__METHOD__, $string), function() use ($string) { return mb_strtolower(Inflector::hyphenate(str_replace('_', '-', preg_replace('/[^-_a-z0-9\s\.]+/i', '', $string)))); }); }
php
public static function route($string) { return static::cache(array(__METHOD__, $string), function() use ($string) { return mb_strtolower(Inflector::hyphenate(str_replace('_', '-', preg_replace('/[^-_a-z0-9\s\.]+/i', '', $string)))); }); }
[ "public", "static", "function", "route", "(", "$", "string", ")", "{", "return", "static", "::", "cache", "(", "array", "(", "__METHOD__", ",", "$", "string", ")", ",", "function", "(", ")", "use", "(", "$", "string", ")", "{", "return", "mb_strtolower...
Inflect a word to a routeable format. All non-alphanumeric characters will be removed, and any spaces or underscores will be changed to dashes. @param string $string @return string
[ "Inflect", "a", "word", "to", "a", "routeable", "format", ".", "All", "non", "-", "alphanumeric", "characters", "will", "be", "removed", "and", "any", "spaces", "or", "underscores", "will", "be", "changed", "to", "dashes", "." ]
8a77eb9e7b8baacf41cc25487289779d8319cd3a
https://github.com/vpg/titon.utility/blob/8a77eb9e7b8baacf41cc25487289779d8319cd3a/src/Titon/Utility/Inflector.php#L117-L121
195,986
vpg/titon.utility
src/Titon/Utility/Inflector.php
Inflector.tableName
public static function tableName($string) { return static::cache(array(__METHOD__, $string), function() use ($string) { return lcfirst(Inflector::camelCase(Inflector::pluralize($string))); }); }
php
public static function tableName($string) { return static::cache(array(__METHOD__, $string), function() use ($string) { return lcfirst(Inflector::camelCase(Inflector::pluralize($string))); }); }
[ "public", "static", "function", "tableName", "(", "$", "string", ")", "{", "return", "static", "::", "cache", "(", "array", "(", "__METHOD__", ",", "$", "string", ")", ",", "function", "(", ")", "use", "(", "$", "string", ")", "{", "return", "lcfirst",...
Inflect a word for a database table name. Formatted as plural and camel case with the first letter lowercase. @param string $string @return string
[ "Inflect", "a", "word", "for", "a", "database", "table", "name", ".", "Formatted", "as", "plural", "and", "camel", "case", "with", "the", "first", "letter", "lowercase", "." ]
8a77eb9e7b8baacf41cc25487289779d8319cd3a
https://github.com/vpg/titon.utility/blob/8a77eb9e7b8baacf41cc25487289779d8319cd3a/src/Titon/Utility/Inflector.php#L170-L174
195,987
vpg/titon.utility
src/Titon/Utility/Inflector.php
Inflector.titleCase
public static function titleCase($string) { return static::cache(array(__METHOD__, $string), function() use ($string) { return mb_convert_case(str_replace('_', ' ', $string), MB_CASE_TITLE); }); }
php
public static function titleCase($string) { return static::cache(array(__METHOD__, $string), function() use ($string) { return mb_convert_case(str_replace('_', ' ', $string), MB_CASE_TITLE); }); }
[ "public", "static", "function", "titleCase", "(", "$", "string", ")", "{", "return", "static", "::", "cache", "(", "array", "(", "__METHOD__", ",", "$", "string", ")", ",", "function", "(", ")", "use", "(", "$", "string", ")", "{", "return", "mb_conver...
Inflect a word to a human readable string with all words capitalized. @param string $string @return string
[ "Inflect", "a", "word", "to", "a", "human", "readable", "string", "with", "all", "words", "capitalized", "." ]
8a77eb9e7b8baacf41cc25487289779d8319cd3a
https://github.com/vpg/titon.utility/blob/8a77eb9e7b8baacf41cc25487289779d8319cd3a/src/Titon/Utility/Inflector.php#L182-L186
195,988
vpg/titon.utility
src/Titon/Utility/Inflector.php
Inflector.underscore
public static function underscore($string) { return static::cache(array(__METHOD__, $string), function() use ($string) { return trim(mb_strtolower(str_replace('__', '_', preg_replace('/([A-Z]{1})/', '_$1', preg_replace('/[^_a-z0-9]+/i', '', preg_replace('/[\s]+/', '_', $string))))), '_'); })...
php
public static function underscore($string) { return static::cache(array(__METHOD__, $string), function() use ($string) { return trim(mb_strtolower(str_replace('__', '_', preg_replace('/([A-Z]{1})/', '_$1', preg_replace('/[^_a-z0-9]+/i', '', preg_replace('/[\s]+/', '_', $string))))), '_'); })...
[ "public", "static", "function", "underscore", "(", "$", "string", ")", "{", "return", "static", "::", "cache", "(", "array", "(", "__METHOD__", ",", "$", "string", ")", ",", "function", "(", ")", "use", "(", "$", "string", ")", "{", "return", "trim", ...
Inflect a word to an underscore form that strips all punctuation and special characters and converts spaces to underscores. @param string $string @return string
[ "Inflect", "a", "word", "to", "an", "underscore", "form", "that", "strips", "all", "punctuation", "and", "special", "characters", "and", "converts", "spaces", "to", "underscores", "." ]
8a77eb9e7b8baacf41cc25487289779d8319cd3a
https://github.com/vpg/titon.utility/blob/8a77eb9e7b8baacf41cc25487289779d8319cd3a/src/Titon/Utility/Inflector.php#L204-L208
195,989
vpg/titon.utility
src/Titon/Utility/Inflector.php
Inflector.variable
public static function variable($string) { $string = preg_replace('/[^_a-z0-9]+/i', '', $string); if (is_numeric(mb_substr($string, 0, 1))) { $string = '_' . $string; } return $string; }
php
public static function variable($string) { $string = preg_replace('/[^_a-z0-9]+/i', '', $string); if (is_numeric(mb_substr($string, 0, 1))) { $string = '_' . $string; } return $string; }
[ "public", "static", "function", "variable", "(", "$", "string", ")", "{", "$", "string", "=", "preg_replace", "(", "'/[^_a-z0-9]+/i'", ",", "''", ",", "$", "string", ")", ";", "if", "(", "is_numeric", "(", "mb_substr", "(", "$", "string", ",", "0", ","...
Inflect a word to be used as a PHP variable. Strip all but letters, numbers and underscores. Add an underscore if the first letter is numeric. @param string $string @return string
[ "Inflect", "a", "word", "to", "be", "used", "as", "a", "PHP", "variable", ".", "Strip", "all", "but", "letters", "numbers", "and", "underscores", ".", "Add", "an", "underscore", "if", "the", "first", "letter", "is", "numeric", "." ]
8a77eb9e7b8baacf41cc25487289779d8319cd3a
https://github.com/vpg/titon.utility/blob/8a77eb9e7b8baacf41cc25487289779d8319cd3a/src/Titon/Utility/Inflector.php#L216-L224
195,990
native5/native5-sdk-client-php
src/Native5/Route/DeviceDetection/UA.php
UA.parse
public static function parse($ua = NULL) { self::$ua = $ua ? $ua : strip_tags($_SERVER["HTTP_USER_AGENT"]); self::$accept = empty($_SERVER["HTTP_ACCEPT"]) ? '' : strip_tags($_SERVER["HTTP_ACCEPT"]); if (empty(self::$regexes)) { if (file_exists(__DIR__."/resources/regexes.yaml"...
php
public static function parse($ua = NULL) { self::$ua = $ua ? $ua : strip_tags($_SERVER["HTTP_USER_AGENT"]); self::$accept = empty($_SERVER["HTTP_ACCEPT"]) ? '' : strip_tags($_SERVER["HTTP_ACCEPT"]); if (empty(self::$regexes)) { if (file_exists(__DIR__."/resources/regexes.yaml"...
[ "public", "static", "function", "parse", "(", "$", "ua", "=", "NULL", ")", "{", "self", "::", "$", "ua", "=", "$", "ua", "?", "$", "ua", ":", "strip_tags", "(", "$", "_SERVER", "[", "\"HTTP_USER_AGENT\"", "]", ")", ";", "self", "::", "$", "accept",...
Sets up some standard variables as well as starts the user agent parsing process @return {Object} the result of the user agent parsing
[ "Sets", "up", "some", "standard", "variables", "as", "well", "as", "starts", "the", "user", "agent", "parsing", "process" ]
e1f598cf27654d81bb5facace1990b737242a2f9
https://github.com/native5/native5-sdk-client-php/blob/e1f598cf27654d81bb5facace1990b737242a2f9/src/Native5/Route/DeviceDetection/UA.php#L52-L120
195,991
native5/native5-sdk-client-php
src/Native5/Route/DeviceDetection/UA.php
UA.log
private static function log($data) { if (!$data) { $data = new \stdClass(); $data->ua = self::$ua; } $jsonData = json_encode($data); echo $jsonData."\r\n"; //$fp = fopen(__DIR__."/log/user_agents.log", "a"); //fwrite($fp, $jsonData."\r\n"); ...
php
private static function log($data) { if (!$data) { $data = new \stdClass(); $data->ua = self::$ua; } $jsonData = json_encode($data); echo $jsonData."\r\n"; //$fp = fopen(__DIR__."/log/user_agents.log", "a"); //fwrite($fp, $jsonData."\r\n"); ...
[ "private", "static", "function", "log", "(", "$", "data", ")", "{", "if", "(", "!", "$", "data", ")", "{", "$", "data", "=", "new", "\\", "stdClass", "(", ")", ";", "$", "data", "->", "ua", "=", "self", "::", "$", "ua", ";", "}", "$", "jsonDa...
Logs the user agent info
[ "Logs", "the", "user", "agent", "info" ]
e1f598cf27654d81bb5facace1990b737242a2f9
https://github.com/native5/native5-sdk-client-php/blob/e1f598cf27654d81bb5facace1990b737242a2f9/src/Native5/Route/DeviceDetection/UA.php#L365-L375
195,992
native5/native5-sdk-client-php
src/Native5/Route/DeviceDetection/UA.php
UA.get
public static function get() { if ($data = @file_get_contents("https://raw.github.com/tobie/ua-parser/master/regexes.yaml")) { if (file_exists(__DIR__."/resources/regexes.yaml")) { if (!self::$nobackup) { if (!self::$silent) { print("backing up old YAML file...\n...
php
public static function get() { if ($data = @file_get_contents("https://raw.github.com/tobie/ua-parser/master/regexes.yaml")) { if (file_exists(__DIR__."/resources/regexes.yaml")) { if (!self::$nobackup) { if (!self::$silent) { print("backing up old YAML file...\n...
[ "public", "static", "function", "get", "(", ")", "{", "if", "(", "$", "data", "=", "@", "file_get_contents", "(", "\"https://raw.github.com/tobie/ua-parser/master/regexes.yaml\"", ")", ")", "{", "if", "(", "file_exists", "(", "__DIR__", ".", "\"/resources/regexes.ya...
Gets the latest user agent. Back-ups the old version first. it will fail silently if something is wrong...
[ "Gets", "the", "latest", "user", "agent", ".", "Back", "-", "ups", "the", "old", "version", "first", ".", "it", "will", "fail", "silently", "if", "something", "is", "wrong", "..." ]
e1f598cf27654d81bb5facace1990b737242a2f9
https://github.com/native5/native5-sdk-client-php/blob/e1f598cf27654d81bb5facace1990b737242a2f9/src/Native5/Route/DeviceDetection/UA.php#L380-L398
195,993
Wedeto/DB
src/Query/SQLFunction.php
SQLFunction.toSQL
public function toSQL(Parameters $params, bool $inner_clause) { $func = $this->getFunction(); $arguments = $this->getArguments(); $args = array(); foreach ($arguments as $arg) $args[] = $params->getDriver()->toSQL($params, $arg, false); return $func . '(...
php
public function toSQL(Parameters $params, bool $inner_clause) { $func = $this->getFunction(); $arguments = $this->getArguments(); $args = array(); foreach ($arguments as $arg) $args[] = $params->getDriver()->toSQL($params, $arg, false); return $func . '(...
[ "public", "function", "toSQL", "(", "Parameters", "$", "params", ",", "bool", "$", "inner_clause", ")", "{", "$", "func", "=", "$", "this", "->", "getFunction", "(", ")", ";", "$", "arguments", "=", "$", "this", "->", "getArguments", "(", ")", ";", "...
Write a function as SQL query syntax @param Parameters $params The query parameters: tables and placeholder values @param SQLFunction $expression The function to write @return string The generated SQL
[ "Write", "a", "function", "as", "SQL", "query", "syntax" ]
715f8f2e3ae6b53c511c40b620921cb9c87e6f62
https://github.com/Wedeto/DB/blob/715f8f2e3ae6b53c511c40b620921cb9c87e6f62/src/Query/SQLFunction.php#L65-L75
195,994
Kris-Kuiper/sFire-Framework
src/DB/ResultSet.php
ResultSet.current
public function current() { $current = parent :: current(); if(null !== $current) { if(false === is_string($current) && false === is_numeric($current) && true === $this -> is_multidimensional($current)) { if($this -> convert !== self :: TYPE_ARRAY) { return trigger_error(sprintf('Multidimen...
php
public function current() { $current = parent :: current(); if(null !== $current) { if(false === is_string($current) && false === is_numeric($current) && true === $this -> is_multidimensional($current)) { if($this -> convert !== self :: TYPE_ARRAY) { return trigger_error(sprintf('Multidimen...
[ "public", "function", "current", "(", ")", "{", "$", "current", "=", "parent", "::", "current", "(", ")", ";", "if", "(", "null", "!==", "$", "current", ")", "{", "if", "(", "false", "===", "is_string", "(", "$", "current", ")", "&&", "false", "===...
Converts current array element to entity when requested @return mixed
[ "Converts", "current", "array", "element", "to", "entity", "when", "requested" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/DB/ResultSet.php#L85-L125
195,995
Kris-Kuiper/sFire-Framework
src/DB/ResultSet.php
ResultSet.pluck
public function pluck($column) { $plucked = []; while(parent :: valid()) { $current = parent :: current(); if(true === is_array($column)) { $tmp = $current; $insert = true; foreach($column as $index) { if(...
php
public function pluck($column) { $plucked = []; while(parent :: valid()) { $current = parent :: current(); if(true === is_array($column)) { $tmp = $current; $insert = true; foreach($column as $index) { if(...
[ "public", "function", "pluck", "(", "$", "column", ")", "{", "$", "plucked", "=", "[", "]", ";", "while", "(", "parent", "::", "valid", "(", ")", ")", "{", "$", "current", "=", "parent", "::", "current", "(", ")", ";", "if", "(", "true", "===", ...
Plucks a column from a resultset @param string|integer $column @return new sFire\DB\Resultset
[ "Plucks", "a", "column", "from", "a", "resultset" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/DB/ResultSet.php#L133-L175
195,996
Kris-Kuiper/sFire-Framework
src/DB/ResultSet.php
ResultSet.is_multidimensional
private function is_multidimensional($array) { if(false === is_array($array)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type Array, "%s" given', __METHOD__, gettype($array)), E_USER_ERROR); } return (count(array_filter($array, 'is_array')) > 0); }
php
private function is_multidimensional($array) { if(false === is_array($array)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type Array, "%s" given', __METHOD__, gettype($array)), E_USER_ERROR); } return (count(array_filter($array, 'is_array')) > 0); }
[ "private", "function", "is_multidimensional", "(", "$", "array", ")", "{", "if", "(", "false", "===", "is_array", "(", "$", "array", ")", ")", "{", "return", "trigger_error", "(", "sprintf", "(", "'Argument 1 passed to %s() must be of the type Array, \"%s\" given'", ...
Returns if an Array is multidimensional @param Array $array @return boolean
[ "Returns", "if", "an", "Array", "is", "multidimensional" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/DB/ResultSet.php#L183-L190
195,997
SlaxWeb/Config
src/Factory.php
Factory.init
public static function init(string $handlerType, array $resLocations): Container { switch (strtolower($handlerType)) { case Config::PHP_CONFIG_HANDLER: $handler = new PhpHandler($resLocations); break; case Config::XML_CONFIG_HANDLER: $x...
php
public static function init(string $handlerType, array $resLocations): Container { switch (strtolower($handlerType)) { case Config::PHP_CONFIG_HANDLER: $handler = new PhpHandler($resLocations); break; case Config::XML_CONFIG_HANDLER: $x...
[ "public", "static", "function", "init", "(", "string", "$", "handlerType", ",", "array", "$", "resLocations", ")", ":", "Container", "{", "switch", "(", "strtolower", "(", "$", "handlerType", ")", ")", "{", "case", "Config", "::", "PHP_CONFIG_HANDLER", ":", ...
Instantiate Config class Instantiate the configuration handler, pass it to the Config class when instantiating it, and return its object. @param string $handlerType Type of handler to use @param array $resLocations Locations of configuration resource @return \SlaxWeb\Config\Container
[ "Instantiate", "Config", "class" ]
92e75c3538d3903e00f5c52507bc0a322c4d1f11
https://github.com/SlaxWeb/Config/blob/92e75c3538d3903e00f5c52507bc0a322c4d1f11/src/Factory.php#L28-L48
195,998
native5/native5-sdk-client-php
src/Native5/Route/DeviceDetection/DeviceManager.php
DeviceManager.determineCategory
public function determineCategory($userAgent = null, $defaultGrade = Grades::UNSUPPORTED) { $logger = $GLOBALS['logger']; $app = $GLOBALS['app']; $parsedUA = UA::parse($userAgent); if (!empty($app) && !$app->getConfiguration()->isLocal()) { try { $logger->info...
php
public function determineCategory($userAgent = null, $defaultGrade = Grades::UNSUPPORTED) { $logger = $GLOBALS['logger']; $app = $GLOBALS['app']; $parsedUA = UA::parse($userAgent); if (!empty($app) && !$app->getConfiguration()->isLocal()) { try { $logger->info...
[ "public", "function", "determineCategory", "(", "$", "userAgent", "=", "null", ",", "$", "defaultGrade", "=", "Grades", "::", "UNSUPPORTED", ")", "{", "$", "logger", "=", "$", "GLOBALS", "[", "'logger'", "]", ";", "$", "app", "=", "$", "GLOBALS", "[", ...
Categorize Incoming Request @access public @return category of request, typically of the order M00X.
[ "Categorize", "Incoming", "Request" ]
e1f598cf27654d81bb5facace1990b737242a2f9
https://github.com/native5/native5-sdk-client-php/blob/e1f598cf27654d81bb5facace1990b737242a2f9/src/Native5/Route/DeviceDetection/DeviceManager.php#L53-L72
195,999
native5/native5-sdk-client-php
src/Native5/Route/DeviceDetection/DeviceManager.php
DeviceManager._lookupLocal
private function _lookupLocal($ua, $defaultGrade) { $logger = $GLOBALS['logger']; $browser = new Browser(); $gradePrefix = 'X'; $gradeSuffix = Grades::UNSUPPORTED; if (($ua->isMobile || $ua->isMobileDevice) && $ua->isTablet) { $gradePrefix = DeviceTypes::TABLET; ...
php
private function _lookupLocal($ua, $defaultGrade) { $logger = $GLOBALS['logger']; $browser = new Browser(); $gradePrefix = 'X'; $gradeSuffix = Grades::UNSUPPORTED; if (($ua->isMobile || $ua->isMobileDevice) && $ua->isTablet) { $gradePrefix = DeviceTypes::TABLET; ...
[ "private", "function", "_lookupLocal", "(", "$", "ua", ",", "$", "defaultGrade", ")", "{", "$", "logger", "=", "$", "GLOBALS", "[", "'logger'", "]", ";", "$", "browser", "=", "new", "Browser", "(", ")", ";", "$", "gradePrefix", "=", "'X'", ";", "$", ...
Lookup Device Detection based on File. @param mixed $ua The user agent. @access private @return void
[ "Lookup", "Device", "Detection", "based", "on", "File", "." ]
e1f598cf27654d81bb5facace1990b737242a2f9
https://github.com/native5/native5-sdk-client-php/blob/e1f598cf27654d81bb5facace1990b737242a2f9/src/Native5/Route/DeviceDetection/DeviceManager.php#L83-L128