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
203,700
infusephp/auth
src/Jobs/GarbageCollection.php
GarbageCollection.gcUserLinks
private function gcUserLinks() { return (bool) $this->app['database']->getDefault() ->delete('UserLinks') ->where('type', UserLink::FORGOT_PASSWORD) ->where('created_at', U::unixToDb(time() - UserLink::$forgotLinkTimeframe), '<') ->execute(); }
php
private function gcUserLinks() { return (bool) $this->app['database']->getDefault() ->delete('UserLinks') ->where('type', UserLink::FORGOT_PASSWORD) ->where('created_at', U::unixToDb(time() - UserLink::$forgotLinkTimeframe), '<') ->execute(); }
[ "private", "function", "gcUserLinks", "(", ")", "{", "return", "(", "bool", ")", "$", "this", "->", "app", "[", "'database'", "]", "->", "getDefault", "(", ")", "->", "delete", "(", "'UserLinks'", ")", "->", "where", "(", "'type'", ",", "UserLink", "::...
Clears out expired user links. @return bool
[ "Clears", "out", "expired", "user", "links", "." ]
720280b4b2635572f331afe8d082e3e88cf54eb7
https://github.com/infusephp/auth/blob/720280b4b2635572f331afe8d082e3e88cf54eb7/src/Jobs/GarbageCollection.php#L73-L80
203,701
andyburton/Sonic-Framework
src/Resource/Session.php
Session.singleton
public static function singleton ($sessionID = FALSE) { // If no instance is set if (self::$_instance === FALSE) { // Create an instance self::$_instance = new static ($sessionID); } // Return instance return self::$_instance; }
php
public static function singleton ($sessionID = FALSE) { // If no instance is set if (self::$_instance === FALSE) { // Create an instance self::$_instance = new static ($sessionID); } // Return instance return self::$_instance; }
[ "public", "static", "function", "singleton", "(", "$", "sessionID", "=", "FALSE", ")", "{", "// If no instance is set", "if", "(", "self", "::", "$", "_instance", "===", "FALSE", ")", "{", "// Create an instance", "self", "::", "$", "_instance", "=", "new", ...
Return a single object instance @param string $sessionID Session ID @return \Sonic\Resource\Session
[ "Return", "a", "single", "object", "instance" ]
a5999448a0abab4d542413002a780ede391e7374
https://github.com/andyburton/Sonic-Framework/blob/a5999448a0abab4d542413002a780ede391e7374/src/Resource/Session.php#L78-L96
203,702
x2ts/x2ts
src/db/SQLite.php
SQLite.query
public function query(string $sql, array $params = []) { X::logger()->trace("$sql with params " . $this->serializeArray($params)); try { $st = $this->pdo->prepare($sql); if ($st === false) { $e = $this->pdo->errorInfo(); throw new DataBaseException...
php
public function query(string $sql, array $params = []) { X::logger()->trace("$sql with params " . $this->serializeArray($params)); try { $st = $this->pdo->prepare($sql); if ($st === false) { $e = $this->pdo->errorInfo(); throw new DataBaseException...
[ "public", "function", "query", "(", "string", "$", "sql", ",", "array", "$", "params", "=", "[", "]", ")", "{", "X", "::", "logger", "(", ")", "->", "trace", "(", "\"$sql with params \"", ".", "$", "this", "->", "serializeArray", "(", "$", "params", ...
run sql and return the result @param string $sql @param array $params @throws DataBaseException @return array
[ "run", "sql", "and", "return", "the", "result" ]
65e43952ab940ab05696a34d31a1c3ab91545090
https://github.com/x2ts/x2ts/blob/65e43952ab940ab05696a34d31a1c3ab91545090/src/db/SQLite.php#L62-L82
203,703
3ev/wordpress-core
src/Tev/Author/Model/Author.php
Author.getAvatarTag
public function getAvatarTag($size = 96, $alt = null) { return get_avatar($this->getId(), $size, null, $alt ?: $this->getDisplayName()); }
php
public function getAvatarTag($size = 96, $alt = null) { return get_avatar($this->getId(), $size, null, $alt ?: $this->getDisplayName()); }
[ "public", "function", "getAvatarTag", "(", "$", "size", "=", "96", ",", "$", "alt", "=", "null", ")", "{", "return", "get_avatar", "(", "$", "this", "->", "getId", "(", ")", ",", "$", "size", ",", "null", ",", "$", "alt", "?", ":", "$", "this", ...
Get an image tag for this author's avatar. @param int $size Avatar size. Max 512, default 96 @param string $alt Alt text. Defaults to display name @return string
[ "Get", "an", "image", "tag", "for", "this", "author", "s", "avatar", "." ]
da674fbec5bf3d5bd2a2141680a4c141113eb6b0
https://github.com/3ev/wordpress-core/blob/da674fbec5bf3d5bd2a2141680a4c141113eb6b0/src/Tev/Author/Model/Author.php#L142-L145
203,704
tarsana/syntax
src/ArraySyntax.php
ArraySyntax.syntax
public function syntax(Syntax $value = null) : Syntax { if (null === $value) { return $this->syntax; } $this->syntax = $value; return $this; }
php
public function syntax(Syntax $value = null) : Syntax { if (null === $value) { return $this->syntax; } $this->syntax = $value; return $this; }
[ "public", "function", "syntax", "(", "Syntax", "$", "value", "=", "null", ")", ":", "Syntax", "{", "if", "(", "null", "===", "$", "value", ")", "{", "return", "$", "this", "->", "syntax", ";", "}", "$", "this", "->", "syntax", "=", "$", "value", ...
Item syntax getter and setter. @param Tarsana\Syntax\Syntax $value @return Tarsana\Syntax\Syntax
[ "Item", "syntax", "getter", "and", "setter", "." ]
fd3f8a25e3be0e391c8fd486ccfcffe913ade534
https://github.com/tarsana/syntax/blob/fd3f8a25e3be0e391c8fd486ccfcffe913ade534/src/ArraySyntax.php#L49-L56
203,705
tarsana/syntax
src/ArraySyntax.php
ArraySyntax.separator
public function separator(string $value = null) { if (null === $value) { return $this->separator; } $this->separator = $value; return $this; }
php
public function separator(string $value = null) { if (null === $value) { return $this->separator; } $this->separator = $value; return $this; }
[ "public", "function", "separator", "(", "string", "$", "value", "=", "null", ")", "{", "if", "(", "null", "===", "$", "value", ")", "{", "return", "$", "this", "->", "separator", ";", "}", "$", "this", "->", "separator", "=", "$", "value", ";", "re...
Separator getter and setter. @param string $value @return self|string
[ "Separator", "getter", "and", "setter", "." ]
fd3f8a25e3be0e391c8fd486ccfcffe913ade534
https://github.com/tarsana/syntax/blob/fd3f8a25e3be0e391c8fd486ccfcffe913ade534/src/ArraySyntax.php#L64-L71
203,706
tarsana/syntax
src/ArraySyntax.php
ArraySyntax.parse
public function parse(string $text) : array { $index = 0; $items = Text::split($text, $this->separator); $array = []; try { foreach ($items as $item) { $array[] = $this->syntax->parse($item); $index += strlen($item) + 1; } ...
php
public function parse(string $text) : array { $index = 0; $items = Text::split($text, $this->separator); $array = []; try { foreach ($items as $item) { $array[] = $this->syntax->parse($item); $index += strlen($item) + 1; } ...
[ "public", "function", "parse", "(", "string", "$", "text", ")", ":", "array", "{", "$", "index", "=", "0", ";", "$", "items", "=", "Text", "::", "split", "(", "$", "text", ",", "$", "this", "->", "separator", ")", ";", "$", "array", "=", "[", "...
Transforms a string to array based on the syntax or throws a ParseException. @param string $text the string to parse @return array @throws Tarsana\Syntax\Exceptions\ParseException
[ "Transforms", "a", "string", "to", "array", "based", "on", "the", "syntax", "or", "throws", "a", "ParseException", "." ]
fd3f8a25e3be0e391c8fd486ccfcffe913ade534
https://github.com/tarsana/syntax/blob/fd3f8a25e3be0e391c8fd486ccfcffe913ade534/src/ArraySyntax.php#L92-L114
203,707
tarsana/syntax
src/ArraySyntax.php
ArraySyntax.dump
public function dump($values) : string { if (! is_array($values)) throw new DumpException($this, $values, self::ERROR); $items = []; $index = 0; try { foreach ($values as $key => $value) { $index = $key; $items[] = $this->syntax...
php
public function dump($values) : string { if (! is_array($values)) throw new DumpException($this, $values, self::ERROR); $items = []; $index = 0; try { foreach ($values as $key => $value) { $index = $key; $items[] = $this->syntax...
[ "public", "function", "dump", "(", "$", "values", ")", ":", "string", "{", "if", "(", "!", "is_array", "(", "$", "values", ")", ")", "throw", "new", "DumpException", "(", "$", "this", ",", "$", "values", ",", "self", "::", "ERROR", ")", ";", "$", ...
Converts the given array to a string based on the syntax or throws a DumpException. @param array $values the data to encode @return string @throws Tarsana\Syntax\Exceptions\DumpException
[ "Converts", "the", "given", "array", "to", "a", "string", "based", "on", "the", "syntax", "or", "throws", "a", "DumpException", "." ]
fd3f8a25e3be0e391c8fd486ccfcffe913ade534
https://github.com/tarsana/syntax/blob/fd3f8a25e3be0e391c8fd486ccfcffe913ade534/src/ArraySyntax.php#L125-L141
203,708
payapi/payapi-sdk-php
src/payapi/core/core.controller.php
controller.settings
protected function settings($key = false) { if ($this->settings == false) { return false; } if ($key == false) { return $this->settings; } if (isset($this->settings[$key])) { return $this->settings[$key]; } return false; ...
php
protected function settings($key = false) { if ($this->settings == false) { return false; } if ($key == false) { return $this->settings; } if (isset($this->settings[$key])) { return $this->settings[$key]; } return false; ...
[ "protected", "function", "settings", "(", "$", "key", "=", "false", ")", "{", "if", "(", "$", "this", "->", "settings", "==", "false", ")", "{", "return", "false", ";", "}", "if", "(", "$", "key", "==", "false", ")", "{", "return", "$", "this", "...
-> merchantSettings
[ "-", ">", "merchantSettings" ]
6a675749c88742b261178d7977f2436d540132b4
https://github.com/payapi/payapi-sdk-php/blob/6a675749c88742b261178d7977f2436d540132b4/src/payapi/core/core.controller.php#L231-L243
203,709
as3io/modlr
src/Rest/RestKernel.php
RestKernel.handle
public function handle(Request $request) { try { $restRequest = new RestRequest($this->config, $request->getMethod(), $request->getUri(), $request->getContent()); $restResponse = $this->adapter->processRequest($restRequest); } catch (\Exception $e) { if (true === ...
php
public function handle(Request $request) { try { $restRequest = new RestRequest($this->config, $request->getMethod(), $request->getUri(), $request->getContent()); $restResponse = $this->adapter->processRequest($restRequest); } catch (\Exception $e) { if (true === ...
[ "public", "function", "handle", "(", "Request", "$", "request", ")", "{", "try", "{", "$", "restRequest", "=", "new", "RestRequest", "(", "$", "this", "->", "config", ",", "$", "request", "->", "getMethod", "(", ")", ",", "$", "request", "->", "getUri"...
Processes an incoming Request object, routes it to the adapter, and returns a response. @param Request $request @return Response $response
[ "Processes", "an", "incoming", "Request", "object", "routes", "it", "to", "the", "adapter", "and", "returns", "a", "response", "." ]
7e684b88bb22a2e18397df9402075c6533084b16
https://github.com/as3io/modlr/blob/7e684b88bb22a2e18397df9402075c6533084b16/src/Rest/RestKernel.php#L62-L74
203,710
weavephp/container-league
src/League.php
League.loadContainer
protected function loadContainer(array $config = [], $environment = null) { $this->container = new Container; $this->configureContainerInternal(); $this->configureContainer($this->container, $config, $environment); return $this->container->get('instantiator'); }
php
protected function loadContainer(array $config = [], $environment = null) { $this->container = new Container; $this->configureContainerInternal(); $this->configureContainer($this->container, $config, $environment); return $this->container->get('instantiator'); }
[ "protected", "function", "loadContainer", "(", "array", "$", "config", "=", "[", "]", ",", "$", "environment", "=", "null", ")", "{", "$", "this", "->", "container", "=", "new", "Container", ";", "$", "this", "->", "configureContainerInternal", "(", ")", ...
Setup the Dependency Injection Container @param array $config Optional config array as provided from loadConfig(). @param string $environment Optional indication of the runtime environment. @return callable A callable that can instantiate instances of classes from the DIC.
[ "Setup", "the", "Dependency", "Injection", "Container" ]
14227536569eccd8376b38429e7762a4caebe282
https://github.com/weavephp/container-league/blob/14227536569eccd8376b38429e7762a4caebe282/src/League.php#L31-L37
203,711
weavephp/container-league
src/League.php
League.configureContainerInternal
protected function configureContainerInternal() { $this->container->add( 'instantiator', function () { return function ($name) { return $this->container->get($name); }; } ); $this->container->add(\Weave\Middleware\Middleware::class) ->withArgument(\Weave\Middleware\MiddlewareAdaptorInter...
php
protected function configureContainerInternal() { $this->container->add( 'instantiator', function () { return function ($name) { return $this->container->get($name); }; } ); $this->container->add(\Weave\Middleware\Middleware::class) ->withArgument(\Weave\Middleware\MiddlewareAdaptorInter...
[ "protected", "function", "configureContainerInternal", "(", ")", "{", "$", "this", "->", "container", "->", "add", "(", "'instantiator'", ",", "function", "(", ")", "{", "return", "function", "(", "$", "name", ")", "{", "return", "$", "this", "->", "contai...
Configure's the internal Weave requirements. @return null
[ "Configure", "s", "the", "internal", "Weave", "requirements", "." ]
14227536569eccd8376b38429e7762a4caebe282
https://github.com/weavephp/container-league/blob/14227536569eccd8376b38429e7762a4caebe282/src/League.php#L55-L103
203,712
wandersonwhcr/illuminate-romans
src/Providers/RomansProvider.php
RomansProvider.register
public function register() { $this->app->singleton(Grammar::class); $this->app->singleton(Lexer::class); $this->app->singleton(Parser::class); $this->app->singleton(IntToRomanFilter::class); $this->app->singleton(RomanToIntFilter::class); $this->app->resolving(Rom...
php
public function register() { $this->app->singleton(Grammar::class); $this->app->singleton(Lexer::class); $this->app->singleton(Parser::class); $this->app->singleton(IntToRomanFilter::class); $this->app->singleton(RomanToIntFilter::class); $this->app->resolving(Rom...
[ "public", "function", "register", "(", ")", "{", "$", "this", "->", "app", "->", "singleton", "(", "Grammar", "::", "class", ")", ";", "$", "this", "->", "app", "->", "singleton", "(", "Lexer", "::", "class", ")", ";", "$", "this", "->", "app", "->...
Register Romans Services @return void
[ "Register", "Romans", "Services" ]
7025e39c633cb30a10eff27c7cfa756ce91026a6
https://github.com/wandersonwhcr/illuminate-romans/blob/7025e39c633cb30a10eff27c7cfa756ce91026a6/src/Providers/RomansProvider.php#L41-L60
203,713
mover-io/belt
lib/Text.php
Text.shellColor
static public function shellColor($color, $string, $conditional=true) { if(!$conditional) { return $string; } $color = self::shellColorCode($color); return $color.$string.self::shellColorCode('plain'); }
php
static public function shellColor($color, $string, $conditional=true) { if(!$conditional) { return $string; } $color = self::shellColorCode($color); return $color.$string.self::shellColorCode('plain'); }
[ "static", "public", "function", "shellColor", "(", "$", "color", ",", "$", "string", ",", "$", "conditional", "=", "true", ")", "{", "if", "(", "!", "$", "conditional", ")", "{", "return", "$", "string", ";", "}", "$", "color", "=", "self", "::", "...
Wraps string in bash shell color escape sequences for the provided color. @param $color string|integer If a string is provided, we lookup the colors using the $colors table in the function body below. For precise control, an integer will yield a precise color code. @param $string string The string to colorize. @param ...
[ "Wraps", "string", "in", "bash", "shell", "color", "escape", "sequences", "for", "the", "provided", "color", "." ]
c966a70aa0f4eb51be55bbb86c89b1e85b773d68
https://github.com/mover-io/belt/blob/c966a70aa0f4eb51be55bbb86c89b1e85b773d68/lib/Text.php#L136-L142
203,714
mover-io/belt
lib/Text.php
Text.fromCamel
static public function fromCamel($str) { $str[0] = strtolower($str[0]); return preg_replace_callback('/([A-Z])/', function($char) {return "_" . strtolower($char[1]);}, $str); }
php
static public function fromCamel($str) { $str[0] = strtolower($str[0]); return preg_replace_callback('/([A-Z])/', function($char) {return "_" . strtolower($char[1]);}, $str); }
[ "static", "public", "function", "fromCamel", "(", "$", "str", ")", "{", "$", "str", "[", "0", "]", "=", "strtolower", "(", "$", "str", "[", "0", "]", ")", ";", "return", "preg_replace_callback", "(", "'/([A-Z])/'", ",", "function", "(", "$", "char", ...
Converts camel-case to corresponding underscores. @param $str @example helloWorld -> hello_world @return string
[ "Converts", "camel", "-", "case", "to", "corresponding", "underscores", "." ]
c966a70aa0f4eb51be55bbb86c89b1e85b773d68
https://github.com/mover-io/belt/blob/c966a70aa0f4eb51be55bbb86c89b1e85b773d68/lib/Text.php#L213-L216
203,715
mover-io/belt
lib/Text.php
Text.toCamel
static public function toCamel($str, $capitalise_first_char = false) { if($capitalise_first_char) { $str[0] = strtoupper($str[0]); } return preg_replace_callback('/_([a-z])/',function($char) {return strtoupper($char[1]);}, $str); }
php
static public function toCamel($str, $capitalise_first_char = false) { if($capitalise_first_char) { $str[0] = strtoupper($str[0]); } return preg_replace_callback('/_([a-z])/',function($char) {return strtoupper($char[1]);}, $str); }
[ "static", "public", "function", "toCamel", "(", "$", "str", ",", "$", "capitalise_first_char", "=", "false", ")", "{", "if", "(", "$", "capitalise_first_char", ")", "{", "$", "str", "[", "0", "]", "=", "strtoupper", "(", "$", "str", "[", "0", "]", ")...
Converts underscores to a corresponding camel-case string. @param $str @param $capitalise_first_char @example this_is_a_test -> thisIsATest @return string
[ "Converts", "underscores", "to", "a", "corresponding", "camel", "-", "case", "string", "." ]
c966a70aa0f4eb51be55bbb86c89b1e85b773d68
https://github.com/mover-io/belt/blob/c966a70aa0f4eb51be55bbb86c89b1e85b773d68/lib/Text.php#L227-L232
203,716
feelinc/laravel-api
src/Sule/Api/OAuth2/Repositories/FluentSession.php
FluentSession.deleteSession
public function deleteSession($clientId, $ownerType, $ownerId) { DB::table('oauth_sessions') ->where('client_id', $clientId) ->where('owner_type', $ownerType) ->where('owner_id', $ownerId) ->delete(); }
php
public function deleteSession($clientId, $ownerType, $ownerId) { DB::table('oauth_sessions') ->where('client_id', $clientId) ->where('owner_type', $ownerType) ->where('owner_id', $ownerId) ->delete(); }
[ "public", "function", "deleteSession", "(", "$", "clientId", ",", "$", "ownerType", ",", "$", "ownerId", ")", "{", "DB", "::", "table", "(", "'oauth_sessions'", ")", "->", "where", "(", "'client_id'", ",", "$", "clientId", ")", "->", "where", "(", "'owne...
Delete a session Example SQL query: <code> DELETE FROM oauth_sessions WHERE client_id = :clientId AND owner_type = :type AND owner_id = :typeId </code> @param string $clientId The client ID @param string $ownerType The type of the session owner (e.g. "user") @param string $ownerId The ID of the session owner (...
[ "Delete", "a", "session" ]
8b4abc4f1be255b441e09f5014e863a130c666d8
https://github.com/feelinc/laravel-api/blob/8b4abc4f1be255b441e09f5014e863a130c666d8/src/Sule/Api/OAuth2/Repositories/FluentSession.php#L60-L67
203,717
feelinc/laravel-api
src/Sule/Api/OAuth2/Repositories/FluentSession.php
FluentSession.associateRedirectUri
public function associateRedirectUri($sessionId, $redirectUri) { DB::table('oauth_session_redirects')->insert(array( 'session_id' => $sessionId, 'redirect_uri' => $redirectUri, 'created_at' => Carbon::now(), 'updated_at' => Carbon::now() )); }
php
public function associateRedirectUri($sessionId, $redirectUri) { DB::table('oauth_session_redirects')->insert(array( 'session_id' => $sessionId, 'redirect_uri' => $redirectUri, 'created_at' => Carbon::now(), 'updated_at' => Carbon::now() )); }
[ "public", "function", "associateRedirectUri", "(", "$", "sessionId", ",", "$", "redirectUri", ")", "{", "DB", "::", "table", "(", "'oauth_session_redirects'", ")", "->", "insert", "(", "array", "(", "'session_id'", "=>", "$", "sessionId", ",", "'redirect_uri'", ...
Associate a redirect URI with a session Example SQL query: <code> INSERT INTO oauth_session_redirects (session_id, redirect_uri) VALUE (:sessionId, :redirectUri) </code> @param int $sessionId The session ID @param string $redirectUri The redirect URI @return void
[ "Associate", "a", "redirect", "URI", "with", "a", "session" ]
8b4abc4f1be255b441e09f5014e863a130c666d8
https://github.com/feelinc/laravel-api/blob/8b4abc4f1be255b441e09f5014e863a130c666d8/src/Sule/Api/OAuth2/Repositories/FluentSession.php#L82-L90
203,718
feelinc/laravel-api
src/Sule/Api/OAuth2/Repositories/FluentSession.php
FluentSession.associateAccessToken
public function associateAccessToken($sessionId, $accessToken, $expireTime) { return DB::table('oauth_session_access_tokens')->insertGetId(array( 'session_id' => $sessionId, 'access_token' => $accessToken, 'access_token_expires' => $expireTime, ...
php
public function associateAccessToken($sessionId, $accessToken, $expireTime) { return DB::table('oauth_session_access_tokens')->insertGetId(array( 'session_id' => $sessionId, 'access_token' => $accessToken, 'access_token_expires' => $expireTime, ...
[ "public", "function", "associateAccessToken", "(", "$", "sessionId", ",", "$", "accessToken", ",", "$", "expireTime", ")", "{", "return", "DB", "::", "table", "(", "'oauth_session_access_tokens'", ")", "->", "insertGetId", "(", "array", "(", "'session_id'", "=>"...
Associate an access token with a session Example SQL query: <code> INSERT INTO oauth_session_access_tokens (session_id, access_token, access_token_expires) VALUE (:sessionId, :accessToken, :accessTokenExpire) </code> @param int $sessionId The session ID @param string $accessToken The access token @param int ...
[ "Associate", "an", "access", "token", "with", "a", "session" ]
8b4abc4f1be255b441e09f5014e863a130c666d8
https://github.com/feelinc/laravel-api/blob/8b4abc4f1be255b441e09f5014e863a130c666d8/src/Sule/Api/OAuth2/Repositories/FluentSession.php#L107-L116
203,719
feelinc/laravel-api
src/Sule/Api/OAuth2/Repositories/FluentSession.php
FluentSession.associateRefreshToken
public function associateRefreshToken($accessTokenId, $refreshToken, $expireTime, $clientId) { DB::table('oauth_session_refresh_tokens')->insert(array( 'session_access_token_id' => $accessTokenId, 'refresh_token' => $refreshToken, 'refresh_token_expires' => $e...
php
public function associateRefreshToken($accessTokenId, $refreshToken, $expireTime, $clientId) { DB::table('oauth_session_refresh_tokens')->insert(array( 'session_access_token_id' => $accessTokenId, 'refresh_token' => $refreshToken, 'refresh_token_expires' => $e...
[ "public", "function", "associateRefreshToken", "(", "$", "accessTokenId", ",", "$", "refreshToken", ",", "$", "expireTime", ",", "$", "clientId", ")", "{", "DB", "::", "table", "(", "'oauth_session_refresh_tokens'", ")", "->", "insert", "(", "array", "(", "'se...
Associate a refresh token with a session Example SQL query: <code> INSERT INTO oauth_session_refresh_tokens (session_access_token_id, refresh_token, refresh_token_expires, client_id) VALUE (:accessTokenId, :refreshToken, :expireTime, :clientId) </code> @param int $accessTokenId The access token ID @param string...
[ "Associate", "a", "refresh", "token", "with", "a", "session" ]
8b4abc4f1be255b441e09f5014e863a130c666d8
https://github.com/feelinc/laravel-api/blob/8b4abc4f1be255b441e09f5014e863a130c666d8/src/Sule/Api/OAuth2/Repositories/FluentSession.php#L134-L144
203,720
feelinc/laravel-api
src/Sule/Api/OAuth2/Repositories/FluentSession.php
FluentSession.associateAuthCode
public function associateAuthCode($sessionId, $authCode, $expireTime) { $id = DB::table('oauth_session_authcodes')->insertGetId(array( 'session_id' => $sessionId, 'auth_code' => $authCode, 'auth_code_expires' => $expireTime, 'created_at' => Carb...
php
public function associateAuthCode($sessionId, $authCode, $expireTime) { $id = DB::table('oauth_session_authcodes')->insertGetId(array( 'session_id' => $sessionId, 'auth_code' => $authCode, 'auth_code_expires' => $expireTime, 'created_at' => Carb...
[ "public", "function", "associateAuthCode", "(", "$", "sessionId", ",", "$", "authCode", ",", "$", "expireTime", ")", "{", "$", "id", "=", "DB", "::", "table", "(", "'oauth_session_authcodes'", ")", "->", "insertGetId", "(", "array", "(", "'session_id'", "=>"...
Assocate an authorization code with a session Example SQL query: <code> INSERT INTO oauth_session_authcodes (session_id, auth_code, auth_code_expires) VALUE (:sessionId, :authCode, :authCodeExpires) </code> @param int $sessionId The session ID @param string $authCode The authorization code @param int $ex...
[ "Assocate", "an", "authorization", "code", "with", "a", "session" ]
8b4abc4f1be255b441e09f5014e863a130c666d8
https://github.com/feelinc/laravel-api/blob/8b4abc4f1be255b441e09f5014e863a130c666d8/src/Sule/Api/OAuth2/Repositories/FluentSession.php#L161-L172
203,721
feelinc/laravel-api
src/Sule/Api/OAuth2/Repositories/FluentSession.php
FluentSession.validateAuthCode
public function validateAuthCode($clientId, $redirectUri, $authCode) { $result = DB::table('oauth_sessions') ->select('oauth_sessions.id as session_id', 'oauth_session_authcodes.id as authcode_id') ->join('oauth_session_authcodes', 'oauth_sessions.id', '=', 'oauth_ses...
php
public function validateAuthCode($clientId, $redirectUri, $authCode) { $result = DB::table('oauth_sessions') ->select('oauth_sessions.id as session_id', 'oauth_session_authcodes.id as authcode_id') ->join('oauth_session_authcodes', 'oauth_sessions.id', '=', 'oauth_ses...
[ "public", "function", "validateAuthCode", "(", "$", "clientId", ",", "$", "redirectUri", ",", "$", "authCode", ")", "{", "$", "result", "=", "DB", "::", "table", "(", "'oauth_sessions'", ")", "->", "select", "(", "'oauth_sessions.id as session_id'", ",", "'oau...
Validate an authorization code Example SQL query: <code> SELECT oauth_sessions.id AS session_id, oauth_session_authcodes.id AS authcode_id FROM oauth_sessions JOIN oauth_session_authcodes ON oauth_session_authcodes.`session_id` = oauth_sessions.id JOIN oauth_session_redirects ON oauth_session_redirects.`session_id` =...
[ "Validate", "an", "authorization", "code" ]
8b4abc4f1be255b441e09f5014e863a130c666d8
https://github.com/feelinc/laravel-api/blob/8b4abc4f1be255b441e09f5014e863a130c666d8/src/Sule/Api/OAuth2/Repositories/FluentSession.php#L221-L234
203,722
feelinc/laravel-api
src/Sule/Api/OAuth2/Repositories/FluentSession.php
FluentSession.validateAccessToken
public function validateAccessToken($accessToken) { $result = DB::table('oauth_session_access_tokens') ->select('oauth_session_access_tokens.session_id as session_id', 'oauth_sessions.client_id as client_id', 'oauth_clients.secret a...
php
public function validateAccessToken($accessToken) { $result = DB::table('oauth_session_access_tokens') ->select('oauth_session_access_tokens.session_id as session_id', 'oauth_sessions.client_id as client_id', 'oauth_clients.secret a...
[ "public", "function", "validateAccessToken", "(", "$", "accessToken", ")", "{", "$", "result", "=", "DB", "::", "table", "(", "'oauth_session_access_tokens'", ")", "->", "select", "(", "'oauth_session_access_tokens.session_id as session_id'", ",", "'oauth_sessions.client_...
Validate an access token Example SQL query: <code> SELECT session_id, oauth_sessions.`client_id`, oauth_sessions.`owner_id`, oauth_sessions.`owner_type` FROM `oauth_session_access_tokens` JOIN oauth_sessions ON oauth_sessions.`id` = session_id WHERE access_token = :accessToken AND access_token_expires >= UNIX_TIMESTA...
[ "Validate", "an", "access", "token" ]
8b4abc4f1be255b441e09f5014e863a130c666d8
https://github.com/feelinc/laravel-api/blob/8b4abc4f1be255b441e09f5014e863a130c666d8/src/Sule/Api/OAuth2/Repositories/FluentSession.php#L261-L276
203,723
feelinc/laravel-api
src/Sule/Api/OAuth2/Repositories/FluentSession.php
FluentSession.validateRefreshToken
public function validateRefreshToken($refreshToken, $clientId) { $result = DB::table('oauth_session_refresh_tokens') ->where('refresh_token', $refreshToken) ->where('client_id', $clientId) ->where('refresh_token_expires', '>=', time()) ...
php
public function validateRefreshToken($refreshToken, $clientId) { $result = DB::table('oauth_session_refresh_tokens') ->where('refresh_token', $refreshToken) ->where('client_id', $clientId) ->where('refresh_token_expires', '>=', time()) ...
[ "public", "function", "validateRefreshToken", "(", "$", "refreshToken", ",", "$", "clientId", ")", "{", "$", "result", "=", "DB", "::", "table", "(", "'oauth_session_refresh_tokens'", ")", "->", "where", "(", "'refresh_token'", ",", "$", "refreshToken", ")", "...
Validate a refresh token Example SQL query: <code> SELECT session_access_token_id FROM `oauth_session_refresh_tokens` WHERE refresh_token = :refreshToken AND refresh_token_expires >= UNIX_TIMESTAMP(NOW()) AND client_id = :clientId </code> @param string $refreshToken The access token @param string $clientId ...
[ "Validate", "a", "refresh", "token" ]
8b4abc4f1be255b441e09f5014e863a130c666d8
https://github.com/feelinc/laravel-api/blob/8b4abc4f1be255b441e09f5014e863a130c666d8/src/Sule/Api/OAuth2/Repositories/FluentSession.php#L292-L301
203,724
feelinc/laravel-api
src/Sule/Api/OAuth2/Repositories/FluentSession.php
FluentSession.getAccessToken
public function getAccessToken($accessTokenId) { $result = DB::table('oauth_session_access_tokens') ->where('id', $accessTokenId) ->first(); return (is_null($result)) ? false : (array) $result; }
php
public function getAccessToken($accessTokenId) { $result = DB::table('oauth_session_access_tokens') ->where('id', $accessTokenId) ->first(); return (is_null($result)) ? false : (array) $result; }
[ "public", "function", "getAccessToken", "(", "$", "accessTokenId", ")", "{", "$", "result", "=", "DB", "::", "table", "(", "'oauth_session_access_tokens'", ")", "->", "where", "(", "'id'", ",", "$", "accessTokenId", ")", "->", "first", "(", ")", ";", "retu...
Get an access token by ID Example SQL query: <code> SELECT * FROM `oauth_session_access_tokens` WHERE `id` = :accessTokenId </code> Expected response: <code> array( 'id' => (int), 'session_id' => (int), 'access_token' => (string), 'access_token_expires' => (int) ) </code> @param int $accessTokenId The ...
[ "Get", "an", "access", "token", "by", "ID" ]
8b4abc4f1be255b441e09f5014e863a130c666d8
https://github.com/feelinc/laravel-api/blob/8b4abc4f1be255b441e09f5014e863a130c666d8/src/Sule/Api/OAuth2/Repositories/FluentSession.php#L326-L333
203,725
feelinc/laravel-api
src/Sule/Api/OAuth2/Repositories/FluentSession.php
FluentSession.associateScope
public function associateScope($accessTokenId, $scopeId) { DB::table('oauth_session_token_scopes')->insert(array( 'session_access_token_id' => $accessTokenId, 'scope_id' => $scopeId, 'created_at' => Carbon::now(), 'updated_at' => Carbon::now() ...
php
public function associateScope($accessTokenId, $scopeId) { DB::table('oauth_session_token_scopes')->insert(array( 'session_access_token_id' => $accessTokenId, 'scope_id' => $scopeId, 'created_at' => Carbon::now(), 'updated_at' => Carbon::now() ...
[ "public", "function", "associateScope", "(", "$", "accessTokenId", ",", "$", "scopeId", ")", "{", "DB", "::", "table", "(", "'oauth_session_token_scopes'", ")", "->", "insert", "(", "array", "(", "'session_access_token_id'", "=>", "$", "accessTokenId", ",", "'sc...
Associate a scope with an access token Example SQL query: <code> INSERT INTO `oauth_session_token_scopes` (`session_access_token_id`, `scope_id`) VALUE (:accessTokenId, :scopeId) </code> @param int $accessTokenId The ID of the access token @param int $scopeId The ID of the scope @return void
[ "Associate", "a", "scope", "with", "an", "access", "token" ]
8b4abc4f1be255b441e09f5014e863a130c666d8
https://github.com/feelinc/laravel-api/blob/8b4abc4f1be255b441e09f5014e863a130c666d8/src/Sule/Api/OAuth2/Repositories/FluentSession.php#L348-L356
203,726
feelinc/laravel-api
src/Sule/Api/OAuth2/Repositories/FluentSession.php
FluentSession.getScopes
public function getScopes($accessToken) { $scopeResults = DB::table('oauth_session_token_scopes') ->select('oauth_scopes.*') ->join('oauth_session_access_tokens', 'oauth_session_token_scopes.session_access_token_id', '=', 'oauth_session_access_tokens.id') ->join('oauth_scopes',...
php
public function getScopes($accessToken) { $scopeResults = DB::table('oauth_session_token_scopes') ->select('oauth_scopes.*') ->join('oauth_session_access_tokens', 'oauth_session_token_scopes.session_access_token_id', '=', 'oauth_session_access_tokens.id') ->join('oauth_scopes',...
[ "public", "function", "getScopes", "(", "$", "accessToken", ")", "{", "$", "scopeResults", "=", "DB", "::", "table", "(", "'oauth_session_token_scopes'", ")", "->", "select", "(", "'oauth_scopes.*'", ")", "->", "join", "(", "'oauth_session_access_tokens'", ",", ...
Get all associated access tokens for an access token Example SQL query: <code> SELECT oauth_scopes.* FROM oauth_session_token_scopes JOIN oauth_session_access_tokens ON oauth_session_access_tokens.`id` = `oauth_session_token_scopes`.`session_access_token_id` JOIN oauth_scopes ON oauth_scopes.id = `oauth_session_token...
[ "Get", "all", "associated", "access", "tokens", "for", "an", "access", "token" ]
8b4abc4f1be255b441e09f5014e863a130c666d8
https://github.com/feelinc/laravel-api/blob/8b4abc4f1be255b441e09f5014e863a130c666d8/src/Sule/Api/OAuth2/Repositories/FluentSession.php#L387-L405
203,727
feelinc/laravel-api
src/Sule/Api/OAuth2/Repositories/FluentSession.php
FluentSession.getAuthCodeScopes
public function getAuthCodeScopes($oauthSessionAuthCodeId) { $scopesResults = DB::table('oauth_session_authcode_scopes') ->where('oauth_session_authcode_id', '=', $oauthSessionAuthCodeId) ->get(); $scopes = array(); foreach($scopesResults as $key=>$scope) ...
php
public function getAuthCodeScopes($oauthSessionAuthCodeId) { $scopesResults = DB::table('oauth_session_authcode_scopes') ->where('oauth_session_authcode_id', '=', $oauthSessionAuthCodeId) ->get(); $scopes = array(); foreach($scopesResults as $key=>$scope) ...
[ "public", "function", "getAuthCodeScopes", "(", "$", "oauthSessionAuthCodeId", ")", "{", "$", "scopesResults", "=", "DB", "::", "table", "(", "'oauth_session_authcode_scopes'", ")", "->", "where", "(", "'oauth_session_authcode_id'", ",", "'='", ",", "$", "oauthSessi...
Get the scopes associated with an auth code Example SQL query: <code> SELECT scope_id FROM `oauth_session_authcode_scopes` WHERE oauth_session_authcode_id = :authCodeId </code> Expected response: <code> array( array( 'scope_id' => (int) ), array( 'scope_id' => (int) ), ... ) </code> @param int $oauthSessionAuth...
[ "Get", "the", "scopes", "associated", "with", "an", "auth", "code" ]
8b4abc4f1be255b441e09f5014e863a130c666d8
https://github.com/feelinc/laravel-api/blob/8b4abc4f1be255b441e09f5014e863a130c666d8/src/Sule/Api/OAuth2/Repositories/FluentSession.php#L457-L473
203,728
chilimatic/chilimatic-framework
lib/file/File.php
File.append
public function append($content, $create = false) { if ($this->writeable !== true || empty($content)) return false; if (strpos($this->_option, 'a') === false) { // close open filepoint if (!empty($this->fp)) fclose($this->fp); // opens fp for writing with file l...
php
public function append($content, $create = false) { if ($this->writeable !== true || empty($content)) return false; if (strpos($this->_option, 'a') === false) { // close open filepoint if (!empty($this->fp)) fclose($this->fp); // opens fp for writing with file l...
[ "public", "function", "append", "(", "$", "content", ",", "$", "create", "=", "false", ")", "{", "if", "(", "$", "this", "->", "writeable", "!==", "true", "||", "empty", "(", "$", "content", ")", ")", "return", "false", ";", "if", "(", "strpos", "(...
appends to a file based + create if wanted @param $content string @param $create bool @return bool
[ "appends", "to", "a", "file", "based", "+", "create", "if", "wanted" ]
8df7f12e75d75d3fd2197a58c80d39cbb4b9ff12
https://github.com/chilimatic/chilimatic-framework/blob/8df7f12e75d75d3fd2197a58c80d39cbb4b9ff12/lib/file/File.php#L220-L240
203,729
chilimatic/chilimatic-framework
lib/file/File.php
File.change_owner
public function change_owner($owner) { if (empty($owner) || !is_int($owner) || $this->owner != getmyuid()) return false; if (!empty($this->fp)) fclose($this->fp); if (chown($this->path . $this->filename, $owner)) { return $this->open($this->path . $this->filename); } ...
php
public function change_owner($owner) { if (empty($owner) || !is_int($owner) || $this->owner != getmyuid()) return false; if (!empty($this->fp)) fclose($this->fp); if (chown($this->path . $this->filename, $owner)) { return $this->open($this->path . $this->filename); } ...
[ "public", "function", "change_owner", "(", "$", "owner", ")", "{", "if", "(", "empty", "(", "$", "owner", ")", "||", "!", "is_int", "(", "$", "owner", ")", "||", "$", "this", "->", "owner", "!=", "getmyuid", "(", ")", ")", "return", "false", ";", ...
changes file owner @param $owner int @return bool
[ "changes", "file", "owner" ]
8df7f12e75d75d3fd2197a58c80d39cbb4b9ff12
https://github.com/chilimatic/chilimatic-framework/blob/8df7f12e75d75d3fd2197a58c80d39cbb4b9ff12/lib/file/File.php#L283-L295
203,730
chilimatic/chilimatic-framework
lib/file/File.php
File.change_group
public function change_group($group) { if (empty($group) || !is_int($group)) return false; if (chgrp($this->path . $this->filename, $group)) { return $this->open($this->path . $this->filename); } return false; }
php
public function change_group($group) { if (empty($group) || !is_int($group)) return false; if (chgrp($this->path . $this->filename, $group)) { return $this->open($this->path . $this->filename); } return false; }
[ "public", "function", "change_group", "(", "$", "group", ")", "{", "if", "(", "empty", "(", "$", "group", ")", "||", "!", "is_int", "(", "$", "group", ")", ")", "return", "false", ";", "if", "(", "chgrp", "(", "$", "this", "->", "path", ".", "$",...
changes the group @param $group int @return bool
[ "changes", "the", "group" ]
8df7f12e75d75d3fd2197a58c80d39cbb4b9ff12
https://github.com/chilimatic/chilimatic-framework/blob/8df7f12e75d75d3fd2197a58c80d39cbb4b9ff12/lib/file/File.php#L325-L335
203,731
chilimatic/chilimatic-framework
lib/file/File.php
File._extract_file_extension
private function _extract_file_extension() { if (empty($this->filename)) return false; if (!empty($this->mime_type)) { $array = explode('/', $this->mime_type); $this->file_extension = array_pop($array); } else { if (strpos($this->filename,...
php
private function _extract_file_extension() { if (empty($this->filename)) return false; if (!empty($this->mime_type)) { $array = explode('/', $this->mime_type); $this->file_extension = array_pop($array); } else { if (strpos($this->filename,...
[ "private", "function", "_extract_file_extension", "(", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "filename", ")", ")", "return", "false", ";", "if", "(", "!", "empty", "(", "$", "this", "->", "mime_type", ")", ")", "{", "$", "array", "=",...
extracts the extension of the current file
[ "extracts", "the", "extension", "of", "the", "current", "file" ]
8df7f12e75d75d3fd2197a58c80d39cbb4b9ff12
https://github.com/chilimatic/chilimatic-framework/blob/8df7f12e75d75d3fd2197a58c80d39cbb4b9ff12/lib/file/File.php#L357-L375
203,732
chilimatic/chilimatic-framework
lib/file/File.php
File._extract_filename
private function _extract_filename() { if (empty($this->file)) return false; $tmp_array = explode('/', $this->file); $count = (int)count($tmp_array); for ($i = 0; $i < $count; $i++) { if ($i + 1 == $count) { $this->filename = (string)$tmp_array[0]; ...
php
private function _extract_filename() { if (empty($this->file)) return false; $tmp_array = explode('/', $this->file); $count = (int)count($tmp_array); for ($i = 0; $i < $count; $i++) { if ($i + 1 == $count) { $this->filename = (string)$tmp_array[0]; ...
[ "private", "function", "_extract_filename", "(", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "file", ")", ")", "return", "false", ";", "$", "tmp_array", "=", "explode", "(", "'/'", ",", "$", "this", "->", "file", ")", ";", "$", "count", "...
gets the filename of the file
[ "gets", "the", "filename", "of", "the", "file" ]
8df7f12e75d75d3fd2197a58c80d39cbb4b9ff12
https://github.com/chilimatic/chilimatic-framework/blob/8df7f12e75d75d3fd2197a58c80d39cbb4b9ff12/lib/file/File.php#L381-L397
203,733
chilimatic/chilimatic-framework
lib/file/File.php
File._get_path
private function _get_path() { if (empty($this->file) && is_string($this->file)) return false; if (strpos($this->file, '/') !== false) { $path = explode('/', $this->file); array_pop($path); $this->path = (string)implode('/', $path) . '/'; } elseif (strpo...
php
private function _get_path() { if (empty($this->file) && is_string($this->file)) return false; if (strpos($this->file, '/') !== false) { $path = explode('/', $this->file); array_pop($path); $this->path = (string)implode('/', $path) . '/'; } elseif (strpo...
[ "private", "function", "_get_path", "(", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "file", ")", "&&", "is_string", "(", "$", "this", "->", "file", ")", ")", "return", "false", ";", "if", "(", "strpos", "(", "$", "this", "->", "file", ...
gets the filename out of the entered path @return bool
[ "gets", "the", "filename", "out", "of", "the", "entered", "path" ]
8df7f12e75d75d3fd2197a58c80d39cbb4b9ff12
https://github.com/chilimatic/chilimatic-framework/blob/8df7f12e75d75d3fd2197a58c80d39cbb4b9ff12/lib/file/File.php#L405-L423
203,734
chilimatic/chilimatic-framework
lib/file/File.php
File.open
public function open($filename) { if (!is_file($filename)) return false; $this->file = @(string)$filename; $this->group = @(int)filegroup($filename); $this->owner = @(int)fileowner($filename); $this->size = @(int)filesize($filename); $this->typ...
php
public function open($filename) { if (!is_file($filename)) return false; $this->file = @(string)$filename; $this->group = @(int)filegroup($filename); $this->owner = @(int)fileowner($filename); $this->size = @(int)filesize($filename); $this->typ...
[ "public", "function", "open", "(", "$", "filename", ")", "{", "if", "(", "!", "is_file", "(", "$", "filename", ")", ")", "return", "false", ";", "$", "this", "->", "file", "=", "@", "(", "string", ")", "$", "filename", ";", "$", "this", "->", "gr...
gets all the information about the file @param $filename string @return bool
[ "gets", "all", "the", "information", "about", "the", "file" ]
8df7f12e75d75d3fd2197a58c80d39cbb4b9ff12
https://github.com/chilimatic/chilimatic-framework/blob/8df7f12e75d75d3fd2197a58c80d39cbb4b9ff12/lib/file/File.php#L433-L456
203,735
chilimatic/chilimatic-framework
lib/file/File.php
File.open_fp
function open_fp($option = 'r') { if (empty($option) || !is_string($option)) return false; switch (true) { case (strpos($option, 'r') !== false) : $mode = LOCK_SH; break; case (strpos($option, 'a') !== false || strpos($option, 'w') !== false)...
php
function open_fp($option = 'r') { if (empty($option) || !is_string($option)) return false; switch (true) { case (strpos($option, 'r') !== false) : $mode = LOCK_SH; break; case (strpos($option, 'a') !== false || strpos($option, 'w') !== false)...
[ "function", "open_fp", "(", "$", "option", "=", "'r'", ")", "{", "if", "(", "empty", "(", "$", "option", ")", "||", "!", "is_string", "(", "$", "option", ")", ")", "return", "false", ";", "switch", "(", "true", ")", "{", "case", "(", "strpos", "(...
opens a filepointer @param $option string @return bool
[ "opens", "a", "filepointer" ]
8df7f12e75d75d3fd2197a58c80d39cbb4b9ff12
https://github.com/chilimatic/chilimatic-framework/blob/8df7f12e75d75d3fd2197a58c80d39cbb4b9ff12/lib/file/File.php#L466-L494
203,736
chilimatic/chilimatic-framework
lib/file/File.php
File.read
public function read() { // if file is readable if ($this->readable !== true) return false; if (!empty($this->fp) && is_resource($this->fp)) fclose($this->fp); $this->open_fp('r'); if (filesize($this->file) == 0) return false; $this->lock(LOCK_SH); $conte...
php
public function read() { // if file is readable if ($this->readable !== true) return false; if (!empty($this->fp) && is_resource($this->fp)) fclose($this->fp); $this->open_fp('r'); if (filesize($this->file) == 0) return false; $this->lock(LOCK_SH); $conte...
[ "public", "function", "read", "(", ")", "{", "// if file is readable", "if", "(", "$", "this", "->", "readable", "!==", "true", ")", "return", "false", ";", "if", "(", "!", "empty", "(", "$", "this", "->", "fp", ")", "&&", "is_resource", "(", "$", "t...
read the current content of the file @return string
[ "read", "the", "current", "content", "of", "the", "file" ]
8df7f12e75d75d3fd2197a58c80d39cbb4b9ff12
https://github.com/chilimatic/chilimatic-framework/blob/8df7f12e75d75d3fd2197a58c80d39cbb4b9ff12/lib/file/File.php#L502-L520
203,737
phramework/testphase
src/Binary.php
Binary.getArgumentSpecifications
public static function getArgumentSpecifications() { $specs = new OptionCollection; $specs->add('d|dir:', 'Tests directory path') ->isa('String'); $specs->add('s|subdir+', 'Optional, subdirectory pattern, can be used multiple times as OR expression') ->isa('String') ...
php
public static function getArgumentSpecifications() { $specs = new OptionCollection; $specs->add('d|dir:', 'Tests directory path') ->isa('String'); $specs->add('s|subdir+', 'Optional, subdirectory pattern, can be used multiple times as OR expression') ->isa('String') ...
[ "public", "static", "function", "getArgumentSpecifications", "(", ")", "{", "$", "specs", "=", "new", "OptionCollection", ";", "$", "specs", "->", "add", "(", "'d|dir:'", ",", "'Tests directory path'", ")", "->", "isa", "(", "'String'", ")", ";", "$", "specs...
Get argument specifications @return OptionCollection
[ "Get", "argument", "specifications" ]
b00107b7a37cf1a1b9b8860b3eb031aacfa2634c
https://github.com/phramework/testphase/blob/b00107b7a37cf1a1b9b8860b3eb031aacfa2634c/src/Binary.php#L52-L79
203,738
phramework/testphase
src/Binary.php
Binary.colored
public function colored($text, $color) { $colors = [ 'black' => '0;30', 'red' => '0;31', 'green' => '0;32', 'blue' => '1;34', 'yellow' => '1;33' ]; $c = ( array_key_exists($color, $colors) ? $colors[$...
php
public function colored($text, $color) { $colors = [ 'black' => '0;30', 'red' => '0;31', 'green' => '0;32', 'blue' => '1;34', 'yellow' => '1;33' ]; $c = ( array_key_exists($color, $colors) ? $colors[$...
[ "public", "function", "colored", "(", "$", "text", ",", "$", "color", ")", "{", "$", "colors", "=", "[", "'black'", "=>", "'0;30'", ",", "'red'", "=>", "'0;31'", ",", "'green'", "=>", "'0;32'", ",", "'blue'", "=>", "'1;34'", ",", "'yellow'", "=>", "'...
Returned colored text @param string $text @param string $color @return string
[ "Returned", "colored", "text" ]
b00107b7a37cf1a1b9b8860b3eb031aacfa2634c
https://github.com/phramework/testphase/blob/b00107b7a37cf1a1b9b8860b3eb031aacfa2634c/src/Binary.php#L504-L525
203,739
newup/core
src/Foundation/Composer/AutoLoaderManager.php
AutoLoaderManager.mergePackageLoader
public function mergePackageLoader($directory) { if ($vendor = $this->findVendor($directory)) { $this->mergeComposerNamespaces($vendor); $this->mergeComposerPsr4($vendor); $this->mergeComposerClassMap($vendor); } }
php
public function mergePackageLoader($directory) { if ($vendor = $this->findVendor($directory)) { $this->mergeComposerNamespaces($vendor); $this->mergeComposerPsr4($vendor); $this->mergeComposerClassMap($vendor); } }
[ "public", "function", "mergePackageLoader", "(", "$", "directory", ")", "{", "if", "(", "$", "vendor", "=", "$", "this", "->", "findVendor", "(", "$", "directory", ")", ")", "{", "$", "this", "->", "mergeComposerNamespaces", "(", "$", "vendor", ")", ";",...
Autoloads a packages dependencies by merging them with the current auto-loader. @param $directory
[ "Autoloads", "a", "packages", "dependencies", "by", "merging", "them", "with", "the", "current", "auto", "-", "loader", "." ]
54128903e7775e67d63284d958b46862c8df71f9
https://github.com/newup/core/blob/54128903e7775e67d63284d958b46862c8df71f9/src/Foundation/Composer/AutoLoaderManager.php#L48-L55
203,740
newup/core
src/Foundation/Composer/AutoLoaderManager.php
AutoLoaderManager.mergeComposerNamespaces
private function mergeComposerNamespaces($vendor) { if ($namespaceFile = $this->findComposerDirectory($vendor, 'autoload_namespaces.php')) { $this->log->debug('Located autoload_namespaces.php file', ['path' => $namespaceFile]); $map = require $namespaceFile; foreach ($map...
php
private function mergeComposerNamespaces($vendor) { if ($namespaceFile = $this->findComposerDirectory($vendor, 'autoload_namespaces.php')) { $this->log->debug('Located autoload_namespaces.php file', ['path' => $namespaceFile]); $map = require $namespaceFile; foreach ($map...
[ "private", "function", "mergeComposerNamespaces", "(", "$", "vendor", ")", "{", "if", "(", "$", "namespaceFile", "=", "$", "this", "->", "findComposerDirectory", "(", "$", "vendor", ",", "'autoload_namespaces.php'", ")", ")", "{", "$", "this", "->", "log", "...
Merges the dependencies namespaces. @param $vendor
[ "Merges", "the", "dependencies", "namespaces", "." ]
54128903e7775e67d63284d958b46862c8df71f9
https://github.com/newup/core/blob/54128903e7775e67d63284d958b46862c8df71f9/src/Foundation/Composer/AutoLoaderManager.php#L62-L72
203,741
newup/core
src/Foundation/Composer/AutoLoaderManager.php
AutoLoaderManager.mergeComposerPsr4
private function mergeComposerPsr4($vendor) { if ($psr4Autoload = $this->findComposerDirectory($vendor, 'autoload_psr4.php')) { $this->log->debug('Located autoload_psr4.php file', ['path' => $psr4Autoload]); $map = require $psr4Autoload; foreach ($map as $namespace => $pa...
php
private function mergeComposerPsr4($vendor) { if ($psr4Autoload = $this->findComposerDirectory($vendor, 'autoload_psr4.php')) { $this->log->debug('Located autoload_psr4.php file', ['path' => $psr4Autoload]); $map = require $psr4Autoload; foreach ($map as $namespace => $pa...
[ "private", "function", "mergeComposerPsr4", "(", "$", "vendor", ")", "{", "if", "(", "$", "psr4Autoload", "=", "$", "this", "->", "findComposerDirectory", "(", "$", "vendor", ",", "'autoload_psr4.php'", ")", ")", "{", "$", "this", "->", "log", "->", "debug...
Merges the dependencies PSR-4 namespaces. @param $vendor
[ "Merges", "the", "dependencies", "PSR", "-", "4", "namespaces", "." ]
54128903e7775e67d63284d958b46862c8df71f9
https://github.com/newup/core/blob/54128903e7775e67d63284d958b46862c8df71f9/src/Foundation/Composer/AutoLoaderManager.php#L79-L89
203,742
newup/core
src/Foundation/Composer/AutoLoaderManager.php
AutoLoaderManager.mergeComposerClassMap
private function mergeComposerClassMap($vendor) { if ($composerClassMap = $this->findComposerDirectory($vendor, 'autoload_classmap.php')) { $this->log->debug('Located autoload_classmap.php file', ['path' => $composerClassMap]); $classMap = require $composerClassMap; if ($...
php
private function mergeComposerClassMap($vendor) { if ($composerClassMap = $this->findComposerDirectory($vendor, 'autoload_classmap.php')) { $this->log->debug('Located autoload_classmap.php file', ['path' => $composerClassMap]); $classMap = require $composerClassMap; if ($...
[ "private", "function", "mergeComposerClassMap", "(", "$", "vendor", ")", "{", "if", "(", "$", "composerClassMap", "=", "$", "this", "->", "findComposerDirectory", "(", "$", "vendor", ",", "'autoload_classmap.php'", ")", ")", "{", "$", "this", "->", "log", "-...
Merges the dependencies class maps. @param $vendor
[ "Merges", "the", "dependencies", "class", "maps", "." ]
54128903e7775e67d63284d958b46862c8df71f9
https://github.com/newup/core/blob/54128903e7775e67d63284d958b46862c8df71f9/src/Foundation/Composer/AutoLoaderManager.php#L96-L105
203,743
newup/core
src/Foundation/Composer/AutoLoaderManager.php
AutoLoaderManager.findComposerDirectory
private function findComposerDirectory($vendor, $file = '') { $composerDirectory = $this->normalizePath($vendor . '/composer/' . $file); if ($this->files->exists($composerDirectory)) { return $composerDirectory; } return false; }
php
private function findComposerDirectory($vendor, $file = '') { $composerDirectory = $this->normalizePath($vendor . '/composer/' . $file); if ($this->files->exists($composerDirectory)) { return $composerDirectory; } return false; }
[ "private", "function", "findComposerDirectory", "(", "$", "vendor", ",", "$", "file", "=", "''", ")", "{", "$", "composerDirectory", "=", "$", "this", "->", "normalizePath", "(", "$", "vendor", ".", "'/composer/'", ".", "$", "file", ")", ";", "if", "(", ...
Finds the composer directory. Returns false if the directory does not exist. @param $vendor The vendor directory. @param string $file An optional file to look for. @return bool|string
[ "Finds", "the", "composer", "directory", "." ]
54128903e7775e67d63284d958b46862c8df71f9
https://github.com/newup/core/blob/54128903e7775e67d63284d958b46862c8df71f9/src/Foundation/Composer/AutoLoaderManager.php#L116-L125
203,744
newup/core
src/Foundation/Composer/AutoLoaderManager.php
AutoLoaderManager.findVendor
private function findVendor($directory) { $vendorDirectory = $this->normalizePath($directory . '/_newup_vendor'); if ($this->files->exists($vendorDirectory) && $this->files->isDirectory($vendorDirectory)) { return $vendorDirectory; } return false; }
php
private function findVendor($directory) { $vendorDirectory = $this->normalizePath($directory . '/_newup_vendor'); if ($this->files->exists($vendorDirectory) && $this->files->isDirectory($vendorDirectory)) { return $vendorDirectory; } return false; }
[ "private", "function", "findVendor", "(", "$", "directory", ")", "{", "$", "vendorDirectory", "=", "$", "this", "->", "normalizePath", "(", "$", "directory", ".", "'/_newup_vendor'", ")", ";", "if", "(", "$", "this", "->", "files", "->", "exists", "(", "...
Gets the vendor directory location if it exists. Returns false if the vendor directory does not exist. @param $directory @return bool|string
[ "Gets", "the", "vendor", "directory", "location", "if", "it", "exists", "." ]
54128903e7775e67d63284d958b46862c8df71f9
https://github.com/newup/core/blob/54128903e7775e67d63284d958b46862c8df71f9/src/Foundation/Composer/AutoLoaderManager.php#L135-L144
203,745
kiler129/TinyWs
src/WebSocketClient.php
WebSocketClient.disconnect
public function disconnect($drop = false) { $this->handler->onClose($this); parent::disconnect($drop); }
php
public function disconnect($drop = false) { $this->handler->onClose($this); parent::disconnect($drop); }
[ "public", "function", "disconnect", "(", "$", "drop", "=", "false", ")", "{", "$", "this", "->", "handler", "->", "onClose", "(", "$", "this", ")", ";", "parent", "::", "disconnect", "(", "$", "drop", ")", ";", "}" ]
Disconnects client from server. It also notifies clients handler about that fact. @param bool $drop By default client is disconnected after delivering output buffer contents. Set to true to drop it immediately. @return void
[ "Disconnects", "client", "from", "server", ".", "It", "also", "notifies", "clients", "handler", "about", "that", "fact", "." ]
85f0335b87b3ec73ab47f5a5631eb86ba70b64a1
https://github.com/kiler129/TinyWs/blob/85f0335b87b3ec73ab47f5a5631eb86ba70b64a1/src/WebSocketClient.php#L52-L56
203,746
kiler129/TinyWs
src/WebSocketClient.php
WebSocketClient.ping
public function ping($payload = null) { if ($payload === null) { $payload = microtime(true); } elseif (isset($payload[125])) { //Much faster than strlen($payload) > 125 throw new LengthException("Ping payload cannot be larger than 125 bytes"); } $this->curre...
php
public function ping($payload = null) { if ($payload === null) { $payload = microtime(true); } elseif (isset($payload[125])) { //Much faster than strlen($payload) > 125 throw new LengthException("Ping payload cannot be larger than 125 bytes"); } $this->curre...
[ "public", "function", "ping", "(", "$", "payload", "=", "null", ")", "{", "if", "(", "$", "payload", "===", "null", ")", "{", "$", "payload", "=", "microtime", "(", "true", ")", ";", "}", "elseif", "(", "isset", "(", "$", "payload", "[", "125", "...
Sends "PING" frame to connected client. @param mixed|null $payload Maximum of 125 bytes. If set to null current time will be used. It's possible to use empty string. @return string Used payload value @throws LengthException In case of payload exceed 125 bytes.
[ "Sends", "PING", "frame", "to", "connected", "client", "." ]
85f0335b87b3ec73ab47f5a5631eb86ba70b64a1
https://github.com/kiler129/TinyWs/blob/85f0335b87b3ec73ab47f5a5631eb86ba70b64a1/src/WebSocketClient.php#L81-L96
203,747
cityware/city-format
src/Stringy.php
Stringy.isJson
public function isJson() { if (!$this->endsWith('}') && !$this->endsWith(']')) { return false; } return !is_null(json_decode($this->str)); }
php
public function isJson() { if (!$this->endsWith('}') && !$this->endsWith(']')) { return false; } return !is_null(json_decode($this->str)); }
[ "public", "function", "isJson", "(", ")", "{", "if", "(", "!", "$", "this", "->", "endsWith", "(", "'}'", ")", "&&", "!", "$", "this", "->", "endsWith", "(", "']'", ")", ")", "{", "return", "false", ";", "}", "return", "!", "is_null", "(", "json_...
Returns true if the string is JSON, false otherwise. @return bool Whether or not $str is JSON
[ "Returns", "true", "if", "the", "string", "is", "JSON", "false", "otherwise", "." ]
1e292670639a950ecf561b545462427512950c74
https://github.com/cityware/city-format/blob/1e292670639a950ecf561b545462427512950c74/src/Stringy.php#L1052-L1058
203,748
dankempster/axstrad-filesystem
Scanner/BaseIteratorScanner.php
BaseIteratorScanner.setFileClassname
public function setFileClassname($classname = null) { if ($classname === null) { $this->fileClass = null; } elseif ( ! class_exists($classname)) { throw ClassDoesNotExistException::create($classname); } else { $this->fileClass = (string) $c...
php
public function setFileClassname($classname = null) { if ($classname === null) { $this->fileClass = null; } elseif ( ! class_exists($classname)) { throw ClassDoesNotExistException::create($classname); } else { $this->fileClass = (string) $c...
[ "public", "function", "setFileClassname", "(", "$", "classname", "=", "null", ")", "{", "if", "(", "$", "classname", "===", "null", ")", "{", "$", "this", "->", "fileClass", "=", "null", ";", "}", "elseif", "(", "!", "class_exists", "(", "$", "classnam...
Set file classname If set, an instance of the class will be created for each file during iteration. It is that object that will be added to the FileBag. @param null|string $classname The classname of the File objects to create @return self @see getFileClassname @throws ClassDoesNotExistException If $classname does no...
[ "Set", "file", "classname" ]
f47e52fcf093dc64cf54bc5702100ea881d0b010
https://github.com/dankempster/axstrad-filesystem/blob/f47e52fcf093dc64cf54bc5702100ea881d0b010/Scanner/BaseIteratorScanner.php#L65-L77
203,749
phpalchemy/phpalchemy
Alchemy/Kernel/Event/ControllerEvent.php
ControllerEvent.setController
public function setController($controller) { // controller must be a callable if (!is_callable($controller)) { throw new \LogicException(sprintf( 'The controller must be a callable (%s given).', gettype($controller) )); } $this...
php
public function setController($controller) { // controller must be a callable if (!is_callable($controller)) { throw new \LogicException(sprintf( 'The controller must be a callable (%s given).', gettype($controller) )); } $this...
[ "public", "function", "setController", "(", "$", "controller", ")", "{", "// controller must be a callable", "if", "(", "!", "is_callable", "(", "$", "controller", ")", ")", "{", "throw", "new", "\\", "LogicException", "(", "sprintf", "(", "'The controller must be...
Sets a controller @param callable $controller
[ "Sets", "a", "controller" ]
5b7e9b13acfda38c61b2da2639e8a56f298dc32e
https://github.com/phpalchemy/phpalchemy/blob/5b7e9b13acfda38c61b2da2639e8a56f298dc32e/Alchemy/Kernel/Event/ControllerEvent.php#L38-L49
203,750
gluephp/glue
src/Http/Request.php
Request.headers
public function headers($key = null, $fallback = null) { return $key ? $this->request->headers->get($key, $fallback) : $this->request->headers; }
php
public function headers($key = null, $fallback = null) { return $key ? $this->request->headers->get($key, $fallback) : $this->request->headers; }
[ "public", "function", "headers", "(", "$", "key", "=", "null", ",", "$", "fallback", "=", "null", ")", "{", "return", "$", "key", "?", "$", "this", "->", "request", "->", "headers", "->", "get", "(", "$", "key", ",", "$", "fallback", ")", ":", "$...
Get a request header value @param string $key @param mixed $fallback @return mixed
[ "Get", "a", "request", "header", "value" ]
d54e0905dfe74d1c114c04f33fa89a60e2651562
https://github.com/gluephp/glue/blob/d54e0905dfe74d1c114c04f33fa89a60e2651562/src/Http/Request.php#L104-L109
203,751
selikhovleonid/nadir
src/core/CtrlWrapper.php
CtrlWrapper.callActon
private function callActon($sName, array $aArgs) { if (empty($aArgs)) { $this->ctrl->{$sName}(); } else { $oMethod = new \ReflectionMethod($this->ctrl, $sName); $oMethod->invokeArgs($this->ctrl, $aArgs); } }
php
private function callActon($sName, array $aArgs) { if (empty($aArgs)) { $this->ctrl->{$sName}(); } else { $oMethod = new \ReflectionMethod($this->ctrl, $sName); $oMethod->invokeArgs($this->ctrl, $aArgs); } }
[ "private", "function", "callActon", "(", "$", "sName", ",", "array", "$", "aArgs", ")", "{", "if", "(", "empty", "(", "$", "aArgs", ")", ")", "{", "$", "this", "->", "ctrl", "->", "{", "$", "sName", "}", "(", ")", ";", "}", "else", "{", "$", ...
It calls the controller action with passage the parameters if necessary. @param string $sName The action name of target controller. @param array $aArgs The action parameters.
[ "It", "calls", "the", "controller", "action", "with", "passage", "the", "parameters", "if", "necessary", "." ]
47545fccd8516c8f0a20c02ba62f68269c7199da
https://github.com/selikhovleonid/nadir/blob/47545fccd8516c8f0a20c02ba62f68269c7199da/src/core/CtrlWrapper.php#L30-L38
203,752
selikhovleonid/nadir
src/core/CtrlWrapper.php
CtrlWrapper.processAuth
protected function processAuth($sName, array $aArgs) { if (class_exists('\extensions\core\Auth')) { $oAuth = new \extensions\core\Auth($this->ctrl->getRequest()); $oAuth->run(); if ($oAuth->isValid()) { $this->callActon($sName, $aArgs); } else ...
php
protected function processAuth($sName, array $aArgs) { if (class_exists('\extensions\core\Auth')) { $oAuth = new \extensions\core\Auth($this->ctrl->getRequest()); $oAuth->run(); if ($oAuth->isValid()) { $this->callActon($sName, $aArgs); } else ...
[ "protected", "function", "processAuth", "(", "$", "sName", ",", "array", "$", "aArgs", ")", "{", "if", "(", "class_exists", "(", "'\\extensions\\core\\Auth'", ")", ")", "{", "$", "oAuth", "=", "new", "\\", "extensions", "\\", "core", "\\", "Auth", "(", "...
The method calls user's auth checking, on successful complition of which it invokes the target controller and the onFail method of Auth class in other case. @param string $sName The action name. @param mixed[] $aArgs The action parameters.
[ "The", "method", "calls", "user", "s", "auth", "checking", "on", "successful", "complition", "of", "which", "it", "invokes", "the", "target", "controller", "and", "the", "onFail", "method", "of", "Auth", "class", "in", "other", "case", "." ]
47545fccd8516c8f0a20c02ba62f68269c7199da
https://github.com/selikhovleonid/nadir/blob/47545fccd8516c8f0a20c02ba62f68269c7199da/src/core/CtrlWrapper.php#L47-L60
203,753
deweller/php-cliopts
src/CLIOpts/Values/ArgumentValues.php
ArgumentValues.getValidator
public function getValidator() { if (!isset($this->validator)) { $this->validator = new ArgsValidator($this->arguments_spec, $this->parsed_args); } return $this->validator; }
php
public function getValidator() { if (!isset($this->validator)) { $this->validator = new ArgsValidator($this->arguments_spec, $this->parsed_args); } return $this->validator; }
[ "public", "function", "getValidator", "(", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "validator", ")", ")", "{", "$", "this", "->", "validator", "=", "new", "ArgsValidator", "(", "$", "this", "->", "arguments_spec", ",", "$", "this", ...
get the validator for these values @return ArgsValidator the validator
[ "get", "the", "validator", "for", "these", "values" ]
1923f3a7ad24062c6279c725579ff3af15141dec
https://github.com/deweller/php-cliopts/blob/1923f3a7ad24062c6279c725579ff3af15141dec/src/CLIOpts/Values/ArgumentValues.php#L80-L85
203,754
deweller/php-cliopts
src/CLIOpts/Values/ArgumentValues.php
ArgumentValues.offsetGet
public function offsetGet($key) { $resolved_key = $this->arguments_spec->normalizeOptionName($key); if ($resolved_key === null) { if (isset($this->merged_arg_values[$key])) { return parent::offsetGet($key); } } if (isset($this->merged_arg_values[$resolved_key])) { return pare...
php
public function offsetGet($key) { $resolved_key = $this->arguments_spec->normalizeOptionName($key); if ($resolved_key === null) { if (isset($this->merged_arg_values[$key])) { return parent::offsetGet($key); } } if (isset($this->merged_arg_values[$resolved_key])) { return pare...
[ "public", "function", "offsetGet", "(", "$", "key", ")", "{", "$", "resolved_key", "=", "$", "this", "->", "arguments_spec", "->", "normalizeOptionName", "(", "$", "key", ")", ";", "if", "(", "$", "resolved_key", "===", "null", ")", "{", "if", "(", "is...
returns the argument or option value @param string $key argument name or long option name @return string argument or option value
[ "returns", "the", "argument", "or", "option", "value" ]
1923f3a7ad24062c6279c725579ff3af15141dec
https://github.com/deweller/php-cliopts/blob/1923f3a7ad24062c6279c725579ff3af15141dec/src/CLIOpts/Values/ArgumentValues.php#L96-L110
203,755
deweller/php-cliopts
src/CLIOpts/Values/ArgumentValues.php
ArgumentValues.offsetExists
public function offsetExists($key) { $resolved_key = $this->arguments_spec->normalizeOptionName($key); if ($resolved_key === null) { return isset($this->merged_arg_values[$key]); } return isset($this->merged_arg_values[$resolved_key]); }
php
public function offsetExists($key) { $resolved_key = $this->arguments_spec->normalizeOptionName($key); if ($resolved_key === null) { return isset($this->merged_arg_values[$key]); } return isset($this->merged_arg_values[$resolved_key]); }
[ "public", "function", "offsetExists", "(", "$", "key", ")", "{", "$", "resolved_key", "=", "$", "this", "->", "arguments_spec", "->", "normalizeOptionName", "(", "$", "key", ")", ";", "if", "(", "$", "resolved_key", "===", "null", ")", "{", "return", "is...
returns true if the argument or option value exists @param string $key argument name or long option name @return bool true if the argument or option value exists
[ "returns", "true", "if", "the", "argument", "or", "option", "value", "exists" ]
1923f3a7ad24062c6279c725579ff3af15141dec
https://github.com/deweller/php-cliopts/blob/1923f3a7ad24062c6279c725579ff3af15141dec/src/CLIOpts/Values/ArgumentValues.php#L120-L127
203,756
deweller/php-cliopts
src/CLIOpts/Values/ArgumentValues.php
ArgumentValues.extractAllLongOpts
protected function extractAllLongOpts(ArgumentsSpec $arguments_spec, $parsed_args) { $long_opts = array(); foreach ($parsed_args['options'] as $option_name => $value) { if ($long_option_name = $arguments_spec->normalizeOptionName($option_name)) { $long_opts[$long_option_name] = $value; } ...
php
protected function extractAllLongOpts(ArgumentsSpec $arguments_spec, $parsed_args) { $long_opts = array(); foreach ($parsed_args['options'] as $option_name => $value) { if ($long_option_name = $arguments_spec->normalizeOptionName($option_name)) { $long_opts[$long_option_name] = $value; } ...
[ "protected", "function", "extractAllLongOpts", "(", "ArgumentsSpec", "$", "arguments_spec", ",", "$", "parsed_args", ")", "{", "$", "long_opts", "=", "array", "(", ")", ";", "foreach", "(", "$", "parsed_args", "[", "'options'", "]", "as", "$", "option_name", ...
builds argument values by long option name @param ArgumentsSpec $arguments_spec The arguments specification @param array $parsed_args data parsed by the ArgumentsParser @return array argument values by long option name
[ "builds", "argument", "values", "by", "long", "option", "name" ]
1923f3a7ad24062c6279c725579ff3af15141dec
https://github.com/deweller/php-cliopts/blob/1923f3a7ad24062c6279c725579ff3af15141dec/src/CLIOpts/Values/ArgumentValues.php#L152-L162
203,757
RadialCorp/magento-core
src/app/code/community/Radial/Core/Model/Config/Registry.php
Radial_Core_Model_Config_Registry._getStoreConfigValue
protected function _getStoreConfigValue($configKey, $store, $asFlag) { foreach ($this->_configModels as $configModel) { if ($configModel->hasKey($configKey)) { $configMethod = $asFlag ? 'getStoreConfigFlag' : 'getStoreConfig'; return Mage::$configMethod($configMod...
php
protected function _getStoreConfigValue($configKey, $store, $asFlag) { foreach ($this->_configModels as $configModel) { if ($configModel->hasKey($configKey)) { $configMethod = $asFlag ? 'getStoreConfigFlag' : 'getStoreConfig'; return Mage::$configMethod($configMod...
[ "protected", "function", "_getStoreConfigValue", "(", "$", "configKey", ",", "$", "store", ",", "$", "asFlag", ")", "{", "foreach", "(", "$", "this", "->", "_configModels", "as", "$", "configModel", ")", "{", "if", "(", "$", "configModel", "->", "hasKey", ...
Search through registered config models for one that knows about the key and get the actual config path from it for the lookup. @param string $configKey @param null|string|bool|int|Mage_Core_Model_Store $store @param bool $asFlag @throws Mage_Core_Exception if the config path is not found. @return string|bool
[ "Search", "through", "registered", "config", "models", "for", "one", "that", "knows", "about", "the", "key", "and", "get", "the", "actual", "config", "path", "from", "it", "for", "the", "lookup", "." ]
9bb5f218d9caf79eab8598f4f8447037a0cc6355
https://github.com/RadialCorp/magento-core/blob/9bb5f218d9caf79eab8598f4f8447037a0cc6355/src/app/code/community/Radial/Core/Model/Config/Registry.php#L77-L86
203,758
RadialCorp/magento-core
src/app/code/community/Radial/Core/Model/Config/Registry.php
Radial_Core_Model_Config_Registry.getConfigFlag
public function getConfigFlag($configKey, $store = null) { // if a value is given store, use it, even if it is null/false/empty string/whatever $store = count(func_get_args()) > 1 ? $store : $this->getStore(); return $this->_getStoreConfigValue($configKey, $store, true); }
php
public function getConfigFlag($configKey, $store = null) { // if a value is given store, use it, even if it is null/false/empty string/whatever $store = count(func_get_args()) > 1 ? $store : $this->getStore(); return $this->_getStoreConfigValue($configKey, $store, true); }
[ "public", "function", "getConfigFlag", "(", "$", "configKey", ",", "$", "store", "=", "null", ")", "{", "// if a value is given store, use it, even if it is null/false/empty string/whatever", "$", "store", "=", "count", "(", "func_get_args", "(", ")", ")", ">", "1", ...
Get the configuration value represented by the given configKey @param string $configKey @param null|string|bool|int|Mage_Core_Model_Store $store @return string
[ "Get", "the", "configuration", "value", "represented", "by", "the", "given", "configKey" ]
9bb5f218d9caf79eab8598f4f8447037a0cc6355
https://github.com/RadialCorp/magento-core/blob/9bb5f218d9caf79eab8598f4f8447037a0cc6355/src/app/code/community/Radial/Core/Model/Config/Registry.php#L94-L99
203,759
RadialCorp/magento-core
src/app/code/community/Radial/Core/Model/Config/Registry.php
Radial_Core_Model_Config_Registry.getConfig
public function getConfig($configKey, $store = null) { // if a value is given store, use it, even if it is null/false/empty string/whatever $store = count(func_get_args()) > 1 ? $store : $this->getStore(); return $this->_getStoreConfigValue($configKey, $store, false); }
php
public function getConfig($configKey, $store = null) { // if a value is given store, use it, even if it is null/false/empty string/whatever $store = count(func_get_args()) > 1 ? $store : $this->getStore(); return $this->_getStoreConfigValue($configKey, $store, false); }
[ "public", "function", "getConfig", "(", "$", "configKey", ",", "$", "store", "=", "null", ")", "{", "// if a value is given store, use it, even if it is null/false/empty string/whatever", "$", "store", "=", "count", "(", "func_get_args", "(", ")", ")", ">", "1", "?"...
Get the configuration flag value represented by the given configKey @param string $configKey @param null|string|bool|int|Mage_Core_Model_Store $store @return bool
[ "Get", "the", "configuration", "flag", "value", "represented", "by", "the", "given", "configKey" ]
9bb5f218d9caf79eab8598f4f8447037a0cc6355
https://github.com/RadialCorp/magento-core/blob/9bb5f218d9caf79eab8598f4f8447037a0cc6355/src/app/code/community/Radial/Core/Model/Config/Registry.php#L107-L112
203,760
Phpillip/phpillip
src/Console/Command/BuildCommand.php
BuildCommand.dump
protected function dump(Route $route, $name) { if (!$route->isVisible()) { return; } if (!in_array('GET', $route->getMethods())) { throw new Exception(sprintf('Only GET mehtod supported, "%s" given.', $name)); } if ($route->hasContent()) { ...
php
protected function dump(Route $route, $name) { if (!$route->isVisible()) { return; } if (!in_array('GET', $route->getMethods())) { throw new Exception(sprintf('Only GET mehtod supported, "%s" given.', $name)); } if ($route->hasContent()) { ...
[ "protected", "function", "dump", "(", "Route", "$", "route", ",", "$", "name", ")", "{", "if", "(", "!", "$", "route", "->", "isVisible", "(", ")", ")", "{", "return", ";", "}", "if", "(", "!", "in_array", "(", "'GET'", ",", "$", "route", "->", ...
Dump route content to destination file @param Route $route @param string $name
[ "Dump", "route", "content", "to", "destination", "file" ]
c37afaafb536361e7e0b564659f1cd5b80b98be9
https://github.com/Phpillip/phpillip/blob/c37afaafb536361e7e0b564659f1cd5b80b98be9/src/Console/Command/BuildCommand.php#L142-L166
203,761
Phpillip/phpillip
src/Console/Command/BuildCommand.php
BuildCommand.buildPaginatedRoute
protected function buildPaginatedRoute(Route $route, $name) { $contentType = $route->getContent(); $contents = $this->app['content_repository']->listContents($contentType); $paginator = new Paginator($contents, $route->getPerPage()); $this->logger->log(sprintf( 'Bui...
php
protected function buildPaginatedRoute(Route $route, $name) { $contentType = $route->getContent(); $contents = $this->app['content_repository']->listContents($contentType); $paginator = new Paginator($contents, $route->getPerPage()); $this->logger->log(sprintf( 'Bui...
[ "protected", "function", "buildPaginatedRoute", "(", "Route", "$", "route", ",", "$", "name", ")", "{", "$", "contentType", "=", "$", "route", "->", "getContent", "(", ")", ";", "$", "contents", "=", "$", "this", "->", "app", "[", "'content_repository'", ...
Build paginated route @param Route $route @param string $name
[ "Build", "paginated", "route" ]
c37afaafb536361e7e0b564659f1cd5b80b98be9
https://github.com/Phpillip/phpillip/blob/c37afaafb536361e7e0b564659f1cd5b80b98be9/src/Console/Command/BuildCommand.php#L174-L194
203,762
Phpillip/phpillip
src/Console/Command/BuildCommand.php
BuildCommand.buildListRoute
protected function buildListRoute(Route $route, $name) { $contentType = $route->getContent(); $contents = $this->app['content_repository']->listContents($contentType); $this->logger->log(sprintf( 'Building route <comment>%s</comment> with <info>%s</info> <comment>%s(s)</comme...
php
protected function buildListRoute(Route $route, $name) { $contentType = $route->getContent(); $contents = $this->app['content_repository']->listContents($contentType); $this->logger->log(sprintf( 'Building route <comment>%s</comment> with <info>%s</info> <comment>%s(s)</comme...
[ "protected", "function", "buildListRoute", "(", "Route", "$", "route", ",", "$", "name", ")", "{", "$", "contentType", "=", "$", "route", "->", "getContent", "(", ")", ";", "$", "contents", "=", "$", "this", "->", "app", "[", "'content_repository'", "]",...
Build list route @param Route $route @param string $name
[ "Build", "list", "route" ]
c37afaafb536361e7e0b564659f1cd5b80b98be9
https://github.com/Phpillip/phpillip/blob/c37afaafb536361e7e0b564659f1cd5b80b98be9/src/Console/Command/BuildCommand.php#L202-L214
203,763
Phpillip/phpillip
src/Console/Command/BuildCommand.php
BuildCommand.buildContentRoute
protected function buildContentRoute(Route $route, $name) { $contentType = $route->getContent(); $contents = $this->app['content_repository']->listContents($contentType); $this->logger->log(sprintf( 'Building route <comment>%s</comment> for <info>%s</info> <comment>%s(s)</com...
php
protected function buildContentRoute(Route $route, $name) { $contentType = $route->getContent(); $contents = $this->app['content_repository']->listContents($contentType); $this->logger->log(sprintf( 'Building route <comment>%s</comment> for <info>%s</info> <comment>%s(s)</com...
[ "protected", "function", "buildContentRoute", "(", "Route", "$", "route", ",", "$", "name", ")", "{", "$", "contentType", "=", "$", "route", "->", "getContent", "(", ")", ";", "$", "contents", "=", "$", "this", "->", "app", "[", "'content_repository'", "...
Build content route @param Route $route @param string $name
[ "Build", "content", "route" ]
c37afaafb536361e7e0b564659f1cd5b80b98be9
https://github.com/Phpillip/phpillip/blob/c37afaafb536361e7e0b564659f1cd5b80b98be9/src/Console/Command/BuildCommand.php#L222-L242
203,764
Phpillip/phpillip
src/Console/Command/BuildCommand.php
BuildCommand.buildSitemap
protected function buildSitemap(Sitemap $sitemap) { $content = $this->app['twig']->render('@phpillip/sitemap.xml.twig', ['sitemap' => $sitemap]); $this->builder->write('/', $content, 'xml', 'sitemap'); }
php
protected function buildSitemap(Sitemap $sitemap) { $content = $this->app['twig']->render('@phpillip/sitemap.xml.twig', ['sitemap' => $sitemap]); $this->builder->write('/', $content, 'xml', 'sitemap'); }
[ "protected", "function", "buildSitemap", "(", "Sitemap", "$", "sitemap", ")", "{", "$", "content", "=", "$", "this", "->", "app", "[", "'twig'", "]", "->", "render", "(", "'@phpillip/sitemap.xml.twig'", ",", "[", "'sitemap'", "=>", "$", "sitemap", "]", ")"...
Build sitemap xml file from Sitemap @param Sitemap $sitemap
[ "Build", "sitemap", "xml", "file", "from", "Sitemap" ]
c37afaafb536361e7e0b564659f1cd5b80b98be9
https://github.com/Phpillip/phpillip/blob/c37afaafb536361e7e0b564659f1cd5b80b98be9/src/Console/Command/BuildCommand.php#L249-L253
203,765
keeko/framework
src/security/AuthManager.php
AuthManager.authCookie
private function authCookie(Request $request) { if ($request->cookies->has(self::COOKIE_TOKEN_NAME)) { $token = $request->cookies->get(self::COOKIE_TOKEN_NAME); return $this->authToken($token); } return null; }
php
private function authCookie(Request $request) { if ($request->cookies->has(self::COOKIE_TOKEN_NAME)) { $token = $request->cookies->get(self::COOKIE_TOKEN_NAME); return $this->authToken($token); } return null; }
[ "private", "function", "authCookie", "(", "Request", "$", "request", ")", "{", "if", "(", "$", "request", "->", "cookies", "->", "has", "(", "self", "::", "COOKIE_TOKEN_NAME", ")", ")", "{", "$", "token", "=", "$", "request", "->", "cookies", "->", "ge...
Authenticates a user by a token in a cookie @param Request $request @return Session|null
[ "Authenticates", "a", "user", "by", "a", "token", "in", "a", "cookie" ]
a2c5d76a4ab7bd658e81d88fb3c98eee115c06ac
https://github.com/keeko/framework/blob/a2c5d76a4ab7bd658e81d88fb3c98eee115c06ac/src/security/AuthManager.php#L71-L77
203,766
keeko/framework
src/security/AuthManager.php
AuthManager.authHeader
private function authHeader(Request $request) { if ($request->headers->has('authorization')) { $auth = $request->headers->get('authorization'); if (!empty($auth)) { list(, $token) = explode(' ', $auth); if (empty($token)) { return null; } return $this->authToken($token); } } return n...
php
private function authHeader(Request $request) { if ($request->headers->has('authorization')) { $auth = $request->headers->get('authorization'); if (!empty($auth)) { list(, $token) = explode(' ', $auth); if (empty($token)) { return null; } return $this->authToken($token); } } return n...
[ "private", "function", "authHeader", "(", "Request", "$", "request", ")", "{", "if", "(", "$", "request", "->", "headers", "->", "has", "(", "'authorization'", ")", ")", "{", "$", "auth", "=", "$", "request", "->", "headers", "->", "get", "(", "'author...
Authenticates a user by an authorization header @param Request $request @return Session|null
[ "Authenticates", "a", "user", "by", "an", "authorization", "header" ]
a2c5d76a4ab7bd658e81d88fb3c98eee115c06ac
https://github.com/keeko/framework/blob/a2c5d76a4ab7bd658e81d88fb3c98eee115c06ac/src/security/AuthManager.php#L85-L97
203,767
keeko/framework
src/security/AuthManager.php
AuthManager.authBasic
private function authBasic(Request $request) { $user = $this->findUser($request->getUser()); if ($user !== null && $this->verifyUser($user, $request->getPassword())) { $session = $this->findSession($user); if ($session === null) { $session = $this->createSession($user); } $this->authenticated = true...
php
private function authBasic(Request $request) { $user = $this->findUser($request->getUser()); if ($user !== null && $this->verifyUser($user, $request->getPassword())) { $session = $this->findSession($user); if ($session === null) { $session = $this->createSession($user); } $this->authenticated = true...
[ "private", "function", "authBasic", "(", "Request", "$", "request", ")", "{", "$", "user", "=", "$", "this", "->", "findUser", "(", "$", "request", "->", "getUser", "(", ")", ")", ";", "if", "(", "$", "user", "!==", "null", "&&", "$", "this", "->",...
Authenticates a user by basic authentication @param Request $request @return Session|null
[ "Authenticates", "a", "user", "by", "basic", "authentication" ]
a2c5d76a4ab7bd658e81d88fb3c98eee115c06ac
https://github.com/keeko/framework/blob/a2c5d76a4ab7bd658e81d88fb3c98eee115c06ac/src/security/AuthManager.php#L115-L127
203,768
valu-digital/valuso
src/ValuSo/Queue/Job/ServiceJob.php
ServiceJob.resolveIdentity
protected function resolveIdentity($username, $accountId) { $identitySeed = $this->getServiceBroker() ->service('User') ->resolveIdentity($username); $accountIds = isset($identitySeed['accountIds']) ? $identitySeed['accountIds'] : []; if (in_array($accou...
php
protected function resolveIdentity($username, $accountId) { $identitySeed = $this->getServiceBroker() ->service('User') ->resolveIdentity($username); $accountIds = isset($identitySeed['accountIds']) ? $identitySeed['accountIds'] : []; if (in_array($accou...
[ "protected", "function", "resolveIdentity", "(", "$", "username", ",", "$", "accountId", ")", "{", "$", "identitySeed", "=", "$", "this", "->", "getServiceBroker", "(", ")", "->", "service", "(", "'User'", ")", "->", "resolveIdentity", "(", "$", "username", ...
Resolve identity based on username @param string $username @param string $accountId @return boolean
[ "Resolve", "identity", "based", "on", "username" ]
c96bed0f6bd21551822334fe6cfe913a7436dd17
https://github.com/valu-digital/valuso/blob/c96bed0f6bd21551822334fe6cfe913a7436dd17/src/ValuSo/Queue/Job/ServiceJob.php#L154-L172
203,769
valu-digital/valuso
src/ValuSo/Queue/Job/ServiceJob.php
ServiceJob.prepareIdentity
protected function prepareIdentity($identitySeed) { $this->getServiceBroker() ->service('Identity') ->setIdentity($identitySeed); $identity = $this->getServiceBroker() ->service('Identity') ->getIdentity(); $this->getServiceBr...
php
protected function prepareIdentity($identitySeed) { $this->getServiceBroker() ->service('Identity') ->setIdentity($identitySeed); $identity = $this->getServiceBroker() ->service('Identity') ->getIdentity(); $this->getServiceBr...
[ "protected", "function", "prepareIdentity", "(", "$", "identitySeed", ")", "{", "$", "this", "->", "getServiceBroker", "(", ")", "->", "service", "(", "'Identity'", ")", "->", "setIdentity", "(", "$", "identitySeed", ")", ";", "$", "identity", "=", "$", "t...
Build new identity from identity seed @param array $identitySeed
[ "Build", "new", "identity", "from", "identity", "seed" ]
c96bed0f6bd21551822334fe6cfe913a7436dd17
https://github.com/valu-digital/valuso/blob/c96bed0f6bd21551822334fe6cfe913a7436dd17/src/ValuSo/Queue/Job/ServiceJob.php#L179-L193
203,770
zbox/UnifiedPush
src/Zbox/UnifiedPush/NotificationService/NotificationServices.php
NotificationServices.validateServiceName
public static function validateServiceName($serviceName) { if (!in_array($serviceName, self::getAvailableServices())) { throw new DomainException(sprintf("Notification service '%s' is not supported.", $serviceName)); } return $serviceName; }
php
public static function validateServiceName($serviceName) { if (!in_array($serviceName, self::getAvailableServices())) { throw new DomainException(sprintf("Notification service '%s' is not supported.", $serviceName)); } return $serviceName; }
[ "public", "static", "function", "validateServiceName", "(", "$", "serviceName", ")", "{", "if", "(", "!", "in_array", "(", "$", "serviceName", ",", "self", "::", "getAvailableServices", "(", ")", ")", ")", "{", "throw", "new", "DomainException", "(", "sprint...
Checks if notification service is supported @param string $serviceName @return string @throws DomainException
[ "Checks", "if", "notification", "service", "is", "supported" ]
47da2d0577b18ac709cd947c68541014001e1866
https://github.com/zbox/UnifiedPush/blob/47da2d0577b18ac709cd947c68541014001e1866/src/Zbox/UnifiedPush/NotificationService/NotificationServices.php#L50-L56
203,771
denkfabrik-neueMedien/silverstripe-siteinfo
src/extension/SiteInfo.php
SiteInfo._typesNice
protected function _typesNice() { $enumValues = singleton("SilverStripe\SiteConfig\SiteConfig")->dbObject("Type")->enumValues(); $values = array(); foreach($enumValues as $enumValue) { $values[$enumValue] = _t("SiteInfo.TYPE" . strtoupper($enumValue), $enumValue); } ...
php
protected function _typesNice() { $enumValues = singleton("SilverStripe\SiteConfig\SiteConfig")->dbObject("Type")->enumValues(); $values = array(); foreach($enumValues as $enumValue) { $values[$enumValue] = _t("SiteInfo.TYPE" . strtoupper($enumValue), $enumValue); } ...
[ "protected", "function", "_typesNice", "(", ")", "{", "$", "enumValues", "=", "singleton", "(", "\"SilverStripe\\SiteConfig\\SiteConfig\"", ")", "->", "dbObject", "(", "\"Type\"", ")", "->", "enumValues", "(", ")", ";", "$", "values", "=", "array", "(", ")", ...
Add translated labels for the dropdown field @return array
[ "Add", "translated", "labels", "for", "the", "dropdown", "field" ]
cd59ea0cf5c13678ff8efd93028d35c726670c25
https://github.com/denkfabrik-neueMedien/silverstripe-siteinfo/blob/cd59ea0cf5c13678ff8efd93028d35c726670c25/src/extension/SiteInfo.php#L214-L224
203,772
luoxiaojun1992/lb_framework
components/db/mysql/ActiveRecord.php
ActiveRecord.incrementByPk
public function incrementByPk($primary_key, $keys, $step = 1) { if ($this->is_single) { return $this->incrementOrDecrementByPk($primary_key, $keys, $step); } return false; }
php
public function incrementByPk($primary_key, $keys, $step = 1) { if ($this->is_single) { return $this->incrementOrDecrementByPk($primary_key, $keys, $step); } return false; }
[ "public", "function", "incrementByPk", "(", "$", "primary_key", ",", "$", "keys", ",", "$", "step", "=", "1", ")", "{", "if", "(", "$", "this", "->", "is_single", ")", "{", "return", "$", "this", "->", "incrementOrDecrementByPk", "(", "$", "primary_key",...
Increase key or keys by primary key @param $primary_key @param $keys @param int $step @return bool
[ "Increase", "key", "or", "keys", "by", "primary", "key" ]
12a865729e7738d7d1e07371ad7203243c4571fa
https://github.com/luoxiaojun1992/lb_framework/blob/12a865729e7738d7d1e07371ad7203243c4571fa/components/db/mysql/ActiveRecord.php#L501-L507
203,773
luoxiaojun1992/lb_framework
components/db/mysql/ActiveRecord.php
ActiveRecord.decrementByPk
public function decrementByPk($primary_key, $keys, $step = 1) { if ($this->is_single) { return $this->incrementOrDecrementByPk($primary_key, $keys, $step, self::MINUS_NOTIFICATION); } return false; }
php
public function decrementByPk($primary_key, $keys, $step = 1) { if ($this->is_single) { return $this->incrementOrDecrementByPk($primary_key, $keys, $step, self::MINUS_NOTIFICATION); } return false; }
[ "public", "function", "decrementByPk", "(", "$", "primary_key", ",", "$", "keys", ",", "$", "step", "=", "1", ")", "{", "if", "(", "$", "this", "->", "is_single", ")", "{", "return", "$", "this", "->", "incrementOrDecrementByPk", "(", "$", "primary_key",...
Decrease key or keys by primary key @param $primary_key @param $keys @param int $step @return bool
[ "Decrease", "key", "or", "keys", "by", "primary", "key" ]
12a865729e7738d7d1e07371ad7203243c4571fa
https://github.com/luoxiaojun1992/lb_framework/blob/12a865729e7738d7d1e07371ad7203243c4571fa/components/db/mysql/ActiveRecord.php#L517-L523
203,774
luoxiaojun1992/lb_framework
components/db/mysql/ActiveRecord.php
ActiveRecord.incrementOrDecrementByPk
public function incrementOrDecrementByPk($primary_key, $keys, $steps = 1, $op = self::PLUS_NOTIFICATION) { if ($this->is_single) { $values = []; if (is_array($keys)) { foreach ($keys as $k => $key) { if (is_array($steps) && isset($steps[$k])) { ...
php
public function incrementOrDecrementByPk($primary_key, $keys, $steps = 1, $op = self::PLUS_NOTIFICATION) { if ($this->is_single) { $values = []; if (is_array($keys)) { foreach ($keys as $k => $key) { if (is_array($steps) && isset($steps[$k])) { ...
[ "public", "function", "incrementOrDecrementByPk", "(", "$", "primary_key", ",", "$", "keys", ",", "$", "steps", "=", "1", ",", "$", "op", "=", "self", "::", "PLUS_NOTIFICATION", ")", "{", "if", "(", "$", "this", "->", "is_single", ")", "{", "$", "value...
Increase or decrease key or keys by primary key @param $primary_key @param $keys @param int $steps @param string $op @return bool
[ "Increase", "or", "decrease", "key", "or", "keys", "by", "primary", "key" ]
12a865729e7738d7d1e07371ad7203243c4571fa
https://github.com/luoxiaojun1992/lb_framework/blob/12a865729e7738d7d1e07371ad7203243c4571fa/components/db/mysql/ActiveRecord.php#L534-L559
203,775
nasumilu/geometry
src/Operation/AbstractLinearReferenceOpSubscriber.php
AbstractLinearReferenceOpSubscriber.locateAlong
public function locateAlong(LinearReferenceOpEvent $evt) { $geometry = $evt->getGeometry(); $this->validGeometry($geometry); $mValue = $evt['mValue']; $offset = $evt['offset']; try { $results = $this->getLocateAlong($geometry, $mValue, $offset); $evt->setR...
php
public function locateAlong(LinearReferenceOpEvent $evt) { $geometry = $evt->getGeometry(); $this->validGeometry($geometry); $mValue = $evt['mValue']; $offset = $evt['offset']; try { $results = $this->getLocateAlong($geometry, $mValue, $offset); $evt->setR...
[ "public", "function", "locateAlong", "(", "LinearReferenceOpEvent", "$", "evt", ")", "{", "$", "geometry", "=", "$", "evt", "->", "getGeometry", "(", ")", ";", "$", "this", "->", "validGeometry", "(", "$", "geometry", ")", ";", "$", "mValue", "=", "$", ...
Gets the derived geometry collection with elements that match the specified measure. @param LinearReferenceOpEvent
[ "Gets", "the", "derived", "geometry", "collection", "with", "elements", "that", "match", "the", "specified", "measure", "." ]
000fafe3e61f1d0682952ad236b7486dded65eae
https://github.com/nasumilu/geometry/blob/000fafe3e61f1d0682952ad236b7486dded65eae/src/Operation/AbstractLinearReferenceOpSubscriber.php#L86-L97
203,776
nasumilu/geometry
src/Operation/AbstractLinearReferenceOpSubscriber.php
AbstractLinearReferenceOpSubscriber.locateBetween
public function locateBetween(LinearReferenceOpEvent $evt) { $geometry = $evt->getGeometry(); $this->validGeometry($geometry); $mStart = $evt['mStart']; $mEnd = $evt['mEnd']; $offset = $evt['offset']; try { $results = $this->getLocateBetween($geometry, $mStart...
php
public function locateBetween(LinearReferenceOpEvent $evt) { $geometry = $evt->getGeometry(); $this->validGeometry($geometry); $mStart = $evt['mStart']; $mEnd = $evt['mEnd']; $offset = $evt['offset']; try { $results = $this->getLocateBetween($geometry, $mStart...
[ "public", "function", "locateBetween", "(", "LinearReferenceOpEvent", "$", "evt", ")", "{", "$", "geometry", "=", "$", "evt", "->", "getGeometry", "(", ")", ";", "$", "this", "->", "validGeometry", "(", "$", "geometry", ")", ";", "$", "mStart", "=", "$",...
Gets the derived geometry collection with elements that match the specified range of measured inclusively. @param LinearReferenceOpEvent
[ "Gets", "the", "derived", "geometry", "collection", "with", "elements", "that", "match", "the", "specified", "range", "of", "measured", "inclusively", "." ]
000fafe3e61f1d0682952ad236b7486dded65eae
https://github.com/nasumilu/geometry/blob/000fafe3e61f1d0682952ad236b7486dded65eae/src/Operation/AbstractLinearReferenceOpSubscriber.php#L105-L117
203,777
UnionOfRAD/li3_quality
qa/rules/syntax/WeakComparisonOperators.php
WeakComparisonOperators.apply
public function apply($testable, array $config = array()) { $tokens = $testable->tokens(); $message = 'Weak comparison operator {:key} used, try {:value} instead'; $filtered = $testable->findAll(array_keys($this->inspectableTokens)); foreach ($filtered as $id) { $token = $tokens[$id]; $this->addWarning(a...
php
public function apply($testable, array $config = array()) { $tokens = $testable->tokens(); $message = 'Weak comparison operator {:key} used, try {:value} instead'; $filtered = $testable->findAll(array_keys($this->inspectableTokens)); foreach ($filtered as $id) { $token = $tokens[$id]; $this->addWarning(a...
[ "public", "function", "apply", "(", "$", "testable", ",", "array", "$", "config", "=", "array", "(", ")", ")", "{", "$", "tokens", "=", "$", "testable", "->", "tokens", "(", ")", ";", "$", "message", "=", "'Weak comparison operator {:key} used, try {:value} ...
Will iterate over each line checking if any weak comparison operators are used within the code. @param Testable $testable The testable object @return void
[ "Will", "iterate", "over", "each", "line", "checking", "if", "any", "weak", "comparison", "operators", "are", "used", "within", "the", "code", "." ]
acb72a43ae835e6d200bc0eba1a61aee610e36bf
https://github.com/UnionOfRAD/li3_quality/blob/acb72a43ae835e6d200bc0eba1a61aee610e36bf/qa/rules/syntax/WeakComparisonOperators.php#L32-L47
203,778
apishka/easy-extend
source/Builder.php
Builder.addFindersByConfigs
protected function addFindersByConfigs(array $configs): self { foreach ($configs as $package => $path) { $data = @include $path; if ($data && isset($data['easy-extend'])) { $config = $data['easy-extend']; if ($config) ...
php
protected function addFindersByConfigs(array $configs): self { foreach ($configs as $package => $path) { $data = @include $path; if ($data && isset($data['easy-extend'])) { $config = $data['easy-extend']; if ($config) ...
[ "protected", "function", "addFindersByConfigs", "(", "array", "$", "configs", ")", ":", "self", "{", "foreach", "(", "$", "configs", "as", "$", "package", "=>", "$", "path", ")", "{", "$", "data", "=", "@", "include", "$", "path", ";", "if", "(", "$"...
Add finders by configs @param array $configs @return Builder this
[ "Add", "finders", "by", "configs" ]
5e5c63c2509377abc3db6956e353623683703e09
https://github.com/apishka/easy-extend/blob/5e5c63c2509377abc3db6956e353623683703e09/source/Builder.php#L90-L127
203,779
apishka/easy-extend
source/Builder.php
Builder.getConfigFilesByComposer
protected function getConfigFilesByComposer(): array { $this->getLogger()->write('<info>Searching for ".apishka" files</info>'); if ($this->getEvent() === null) throw new \LogicException('Event not exists'); $configs = array(); if ($this->isDependantPackage($this->getEv...
php
protected function getConfigFilesByComposer(): array { $this->getLogger()->write('<info>Searching for ".apishka" files</info>'); if ($this->getEvent() === null) throw new \LogicException('Event not exists'); $configs = array(); if ($this->isDependantPackage($this->getEv...
[ "protected", "function", "getConfigFilesByComposer", "(", ")", ":", "array", "{", "$", "this", "->", "getLogger", "(", ")", "->", "write", "(", "'<info>Searching for \".apishka\" files</info>'", ")", ";", "if", "(", "$", "this", "->", "getEvent", "(", ")", "==...
Get config files by composer @return array
[ "Get", "config", "files", "by", "composer" ]
5e5c63c2509377abc3db6956e353623683703e09
https://github.com/apishka/easy-extend/blob/5e5c63c2509377abc3db6956e353623683703e09/source/Builder.php#L184-L226
203,780
apishka/easy-extend
source/Builder.php
Builder.getConfigPackagePath
protected function getConfigPackagePath(string $dir, PackageInterface $package): ?string { $dir = preg_replace( '#^(' . preg_quote(getcwd() . DIRECTORY_SEPARATOR, '#') . ')#', '.' . DIRECTORY_SEPARATOR, $dir ); $path = $this->getConfigPath($dir); ...
php
protected function getConfigPackagePath(string $dir, PackageInterface $package): ?string { $dir = preg_replace( '#^(' . preg_quote(getcwd() . DIRECTORY_SEPARATOR, '#') . ')#', '.' . DIRECTORY_SEPARATOR, $dir ); $path = $this->getConfigPath($dir); ...
[ "protected", "function", "getConfigPackagePath", "(", "string", "$", "dir", ",", "PackageInterface", "$", "package", ")", ":", "?", "string", "{", "$", "dir", "=", "preg_replace", "(", "'#^('", ".", "preg_quote", "(", "getcwd", "(", ")", ".", "DIRECTORY_SEPA...
Get config package file path @param string $dir @param PackageInterface $package @return null|string
[ "Get", "config", "package", "file", "path" ]
5e5c63c2509377abc3db6956e353623683703e09
https://github.com/apishka/easy-extend/blob/5e5c63c2509377abc3db6956e353623683703e09/source/Builder.php#L236-L258
203,781
bitrank-verified/php-client
src/BitRank/Score.php
Score.boundsCheck
protected function boundsCheck() { $scores = $this->bitrank->getScores(); if ($this->score > $scores->max) { $this->score = $scores->max; } if ($this->score < $scores->min) { $this->score = $scores->min; } }
php
protected function boundsCheck() { $scores = $this->bitrank->getScores(); if ($this->score > $scores->max) { $this->score = $scores->max; } if ($this->score < $scores->min) { $this->score = $scores->min; } }
[ "protected", "function", "boundsCheck", "(", ")", "{", "$", "scores", "=", "$", "this", "->", "bitrank", "->", "getScores", "(", ")", ";", "if", "(", "$", "this", "->", "score", ">", "$", "scores", "->", "max", ")", "{", "$", "this", "->", "score",...
Ensure score is within bounds @return void
[ "Ensure", "score", "is", "within", "bounds" ]
8c1a2eb3b82e317852f70af9bb9ea75af34b715c
https://github.com/bitrank-verified/php-client/blob/8c1a2eb3b82e317852f70af9bb9ea75af34b715c/src/BitRank/Score.php#L111-L120
203,782
bitrank-verified/php-client
src/BitRank/Score.php
Score.getFlagsOfType
public function getFlagsOfType($type) { if ($this->flags === null) { return []; } $matches = []; foreach ($this->flags as $flag) { if ($flag->type == $type) { $matches []= $flag; } } return $matches; }
php
public function getFlagsOfType($type) { if ($this->flags === null) { return []; } $matches = []; foreach ($this->flags as $flag) { if ($flag->type == $type) { $matches []= $flag; } } return $matches; }
[ "public", "function", "getFlagsOfType", "(", "$", "type", ")", "{", "if", "(", "$", "this", "->", "flags", "===", "null", ")", "{", "return", "[", "]", ";", "}", "$", "matches", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "flags", "as"...
Returns flags of the specified type associated with this address, if any. @param $type The flag type you're looking for. Will be one of the Flag::TYPE_* constants. @return array of Flag, or an empty array if none found.
[ "Returns", "flags", "of", "the", "specified", "type", "associated", "with", "this", "address", "if", "any", "." ]
8c1a2eb3b82e317852f70af9bb9ea75af34b715c
https://github.com/bitrank-verified/php-client/blob/8c1a2eb3b82e317852f70af9bb9ea75af34b715c/src/BitRank/Score.php#L127-L142
203,783
bitrank-verified/php-client
src/BitRank/Score.php
Score.hasFlagsOfType
public function hasFlagsOfType($type) { if ($this->flags === null) { return false; } foreach ($this->flags as $flag) { if ($flag->type == $type) { return true; } } return false; }
php
public function hasFlagsOfType($type) { if ($this->flags === null) { return false; } foreach ($this->flags as $flag) { if ($flag->type == $type) { return true; } } return false; }
[ "public", "function", "hasFlagsOfType", "(", "$", "type", ")", "{", "if", "(", "$", "this", "->", "flags", "===", "null", ")", "{", "return", "false", ";", "}", "foreach", "(", "$", "this", "->", "flags", "as", "$", "flag", ")", "{", "if", "(", "...
Returns whether or not this address has any flags of type. @param string $type The flag type you're looking for. Will be one of the Flag::TYPE_* constants. @return boolean
[ "Returns", "whether", "or", "not", "this", "address", "has", "any", "flags", "of", "type", "." ]
8c1a2eb3b82e317852f70af9bb9ea75af34b715c
https://github.com/bitrank-verified/php-client/blob/8c1a2eb3b82e317852f70af9bb9ea75af34b715c/src/BitRank/Score.php#L149-L162
203,784
digipolisgent/robo-digipolis-deploy
src/Traits/SymlinkFolderFileContentsTrait.php
SymlinkFolderFileContentsTrait.taskSymlinkFolderFileContents
protected function taskSymlinkFolderFileContents($source, $destination, Finder $finder = null) { return $this->task(SymlinkFolderFileContents::class, $source, $destination, $finder); }
php
protected function taskSymlinkFolderFileContents($source, $destination, Finder $finder = null) { return $this->task(SymlinkFolderFileContents::class, $source, $destination, $finder); }
[ "protected", "function", "taskSymlinkFolderFileContents", "(", "$", "source", ",", "$", "destination", ",", "Finder", "$", "finder", "=", "null", ")", "{", "return", "$", "this", "->", "task", "(", "SymlinkFolderFileContents", "::", "class", ",", "$", "source"...
Creates a SymlinkFolderFileContents task. @param string $source The directory containing the files to symlink. @param string $destination The directory where the symlinks should be placed. @param null|\Symfony\Component\Finder\Finder $finder The finder used to get the files from the source folder. @return \DigipolisG...
[ "Creates", "a", "SymlinkFolderFileContents", "task", "." ]
fafa8967d98ed4d3f2265b17f4b1abe53bf0b5ab
https://github.com/digipolisgent/robo-digipolis-deploy/blob/fafa8967d98ed4d3f2265b17f4b1abe53bf0b5ab/src/Traits/SymlinkFolderFileContentsTrait.php#L24-L27
203,785
ghousseyn/phiber
library/oosql/oosql.php
oosql.reset
public function reset() { $this->oosql_limit = null; $this->oosql_order = null; $this->oosql_where = null; $this->oosql_join = null; $this->oosql_stmt = null; $this->oosql_conValues = array(); $this->oosql_numargs = null; $this->oosql_fromFlag ...
php
public function reset() { $this->oosql_limit = null; $this->oosql_order = null; $this->oosql_where = null; $this->oosql_join = null; $this->oosql_stmt = null; $this->oosql_conValues = array(); $this->oosql_numargs = null; $this->oosql_fromFlag ...
[ "public", "function", "reset", "(", ")", "{", "$", "this", "->", "oosql_limit", "=", "null", ";", "$", "this", "->", "oosql_order", "=", "null", ";", "$", "this", "->", "oosql_where", "=", "null", ";", "$", "this", "->", "oosql_join", "=", "null", ";...
Resets the class vars to their initial values for a new query @return \Phiber\oosql\oosql Instance
[ "Resets", "the", "class", "vars", "to", "their", "initial", "values", "for", "a", "new", "query" ]
2574249d49b6930a0123a310a32073a105cdd486
https://github.com/ghousseyn/phiber/blob/2574249d49b6930a0123a310a32073a105cdd486/library/oosql/oosql.php#L250-L304
203,786
ghousseyn/phiber
library/oosql/oosql.php
oosql.sql
protected function sql($sql = null, $replace = false) { if (null !== $sql) { if (!isset($this->oosql_sql[$this->oosql_table]) || $replace) { $this->oosql_sql[$this->oosql_table] = $sql; } else { $this->oosql_sql[$this->oosql_table] .= $sql; ...
php
protected function sql($sql = null, $replace = false) { if (null !== $sql) { if (!isset($this->oosql_sql[$this->oosql_table]) || $replace) { $this->oosql_sql[$this->oosql_table] = $sql; } else { $this->oosql_sql[$this->oosql_table] .= $sql; ...
[ "protected", "function", "sql", "(", "$", "sql", "=", "null", ",", "$", "replace", "=", "false", ")", "{", "if", "(", "null", "!==", "$", "sql", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "oosql_sql", "[", "$", "this", "->", "oo...
Append to the query string or return the current one @param mixed $sql SQL @param boolean $replace Replace current query or not
[ "Append", "to", "the", "query", "string", "or", "return", "the", "current", "one" ]
2574249d49b6930a0123a310a32073a105cdd486
https://github.com/ghousseyn/phiber/blob/2574249d49b6930a0123a310a32073a105cdd486/library/oosql/oosql.php#L347-L359
203,787
ghousseyn/phiber
library/oosql/oosql.php
oosql.select
public function select() { self::$instance->reset(); $this->sql('SELECT '); if ($this->oosql_distinct) { $this->sql('DISTINCT '); } $numargs = func_num_args(); if ($numargs > 0) { $arg_list = func_get_args(); $this->oosql_fields ...
php
public function select() { self::$instance->reset(); $this->sql('SELECT '); if ($this->oosql_distinct) { $this->sql('DISTINCT '); } $numargs = func_num_args(); if ($numargs > 0) { $arg_list = func_get_args(); $this->oosql_fields ...
[ "public", "function", "select", "(", ")", "{", "self", "::", "$", "instance", "->", "reset", "(", ")", ";", "$", "this", "->", "sql", "(", "'SELECT '", ")", ";", "if", "(", "$", "this", "->", "oosql_distinct", ")", "{", "$", "this", "->", "sql", ...
Create a select statement @variadic @return \Phiber\oosql\oosql Instance
[ "Create", "a", "select", "statement" ]
2574249d49b6930a0123a310a32073a105cdd486
https://github.com/ghousseyn/phiber/blob/2574249d49b6930a0123a310a32073a105cdd486/library/oosql/oosql.php#L366-L397
203,788
ghousseyn/phiber
library/oosql/oosql.php
oosql.getFields
public function getFields($table = null) { if (null == $table) { $table = $this->oosql_table; } $newFields = array(); foreach ($this->oosql_fields as $field) { $newFields[] = $table . '.' . $field; } return $newFields; }
php
public function getFields($table = null) { if (null == $table) { $table = $this->oosql_table; } $newFields = array(); foreach ($this->oosql_fields as $field) { $newFields[] = $table . '.' . $field; } return $newFields; }
[ "public", "function", "getFields", "(", "$", "table", "=", "null", ")", "{", "if", "(", "null", "==", "$", "table", ")", "{", "$", "table", "=", "$", "this", "->", "oosql_table", ";", "}", "$", "newFields", "=", "array", "(", ")", ";", "foreach", ...
Get an array of fields of the current or given table @param mixed $table table name @return array Table fields
[ "Get", "an", "array", "of", "fields", "of", "the", "current", "or", "given", "table" ]
2574249d49b6930a0123a310a32073a105cdd486
https://github.com/ghousseyn/phiber/blob/2574249d49b6930a0123a310a32073a105cdd486/library/oosql/oosql.php#L404-L414
203,789
ghousseyn/phiber
library/oosql/oosql.php
oosql.insert
public function insert() { self::$instance->reset(); $this->sql('INSERT INTO ' . $this->oosql_table); $arg_list = func_get_args(); $numargs = func_num_args(); if ($numargs > 0) { $this->oosql_numargs = $numargs; $this->sql(' ('); $this->...
php
public function insert() { self::$instance->reset(); $this->sql('INSERT INTO ' . $this->oosql_table); $arg_list = func_get_args(); $numargs = func_num_args(); if ($numargs > 0) { $this->oosql_numargs = $numargs; $this->sql(' ('); $this->...
[ "public", "function", "insert", "(", ")", "{", "self", "::", "$", "instance", "->", "reset", "(", ")", ";", "$", "this", "->", "sql", "(", "'INSERT INTO '", ".", "$", "this", "->", "oosql_table", ")", ";", "$", "arg_list", "=", "func_get_args", "(", ...
Creates an INSERT query @return \Phiber\oosql\oosql Instance
[ "Creates", "an", "INSERT", "query" ]
2574249d49b6930a0123a310a32073a105cdd486
https://github.com/ghousseyn/phiber/blob/2574249d49b6930a0123a310a32073a105cdd486/library/oosql/oosql.php#L429-L447
203,790
ghousseyn/phiber
library/oosql/oosql.php
oosql.update
public function update() { self::$instance->reset(); $this->sql('UPDATE'); $numargs = func_num_args(); if ($numargs > 0) { $arg_list = func_get_args(); $this->oosql_multiFlag = true; $this->oosql_multi = $arg_list; for ($i = 0; $i ...
php
public function update() { self::$instance->reset(); $this->sql('UPDATE'); $numargs = func_num_args(); if ($numargs > 0) { $arg_list = func_get_args(); $this->oosql_multiFlag = true; $this->oosql_multi = $arg_list; for ($i = 0; $i ...
[ "public", "function", "update", "(", ")", "{", "self", "::", "$", "instance", "->", "reset", "(", ")", ";", "$", "this", "->", "sql", "(", "'UPDATE'", ")", ";", "$", "numargs", "=", "func_num_args", "(", ")", ";", "if", "(", "$", "numargs", ">", ...
Creates an UPDATE query @return \Phiber\oosql\oosql Instance
[ "Creates", "an", "UPDATE", "query" ]
2574249d49b6930a0123a310a32073a105cdd486
https://github.com/ghousseyn/phiber/blob/2574249d49b6930a0123a310a32073a105cdd486/library/oosql/oosql.php#L453-L480
203,791
ghousseyn/phiber
library/oosql/oosql.php
oosql.delete
public function delete() { self::$instance->reset(); $this->sql('DELETE'); $this->oosql_where = null; $numargs = func_num_args(); if ($numargs > 0) { if ($numargs > 1) { $this->oosql_del_multiFlag = true; $this->oosql_del_numargs =...
php
public function delete() { self::$instance->reset(); $this->sql('DELETE'); $this->oosql_where = null; $numargs = func_num_args(); if ($numargs > 0) { if ($numargs > 1) { $this->oosql_del_multiFlag = true; $this->oosql_del_numargs =...
[ "public", "function", "delete", "(", ")", "{", "self", "::", "$", "instance", "->", "reset", "(", ")", ";", "$", "this", "->", "sql", "(", "'DELETE'", ")", ";", "$", "this", "->", "oosql_where", "=", "null", ";", "$", "numargs", "=", "func_num_args",...
Creates a DELETE query @return \Phiber\oosql\oosql Instance
[ "Creates", "a", "DELETE", "query" ]
2574249d49b6930a0123a310a32073a105cdd486
https://github.com/ghousseyn/phiber/blob/2574249d49b6930a0123a310a32073a105cdd486/library/oosql/oosql.php#L486-L518
203,792
ghousseyn/phiber
library/oosql/oosql.php
oosql.deleteRecord
public function deleteRecord($oosql = null, array $criteria) { if (null == $oosql) { $oosql = $this; } $oosql->delete()->createWhere($criteria)->exe(); return $this; }
php
public function deleteRecord($oosql = null, array $criteria) { if (null == $oosql) { $oosql = $this; } $oosql->delete()->createWhere($criteria)->exe(); return $this; }
[ "public", "function", "deleteRecord", "(", "$", "oosql", "=", "null", ",", "array", "$", "criteria", ")", "{", "if", "(", "null", "==", "$", "oosql", ")", "{", "$", "oosql", "=", "$", "this", ";", "}", "$", "oosql", "->", "delete", "(", ")", "->"...
Delete a record or more from a table @param mixed $oosql Optional oosql\oosql instance to run query on @param array $criteria Criteria of current opperation @return \Phiber\oosql\oosql Instance
[ "Delete", "a", "record", "or", "more", "from", "a", "table" ]
2574249d49b6930a0123a310a32073a105cdd486
https://github.com/ghousseyn/phiber/blob/2574249d49b6930a0123a310a32073a105cdd486/library/oosql/oosql.php#L526-L533
203,793
ghousseyn/phiber
library/oosql/oosql.php
oosql.set
public function set(array $data) { $sql = ''; foreach ($data as $field => $value) { $sql .= $field . ' = ?,'; $this->oosql_conValues[] = $value; } $this->sql(rtrim($sql, ',')); return $this; }
php
public function set(array $data) { $sql = ''; foreach ($data as $field => $value) { $sql .= $field . ' = ?,'; $this->oosql_conValues[] = $value; } $this->sql(rtrim($sql, ',')); return $this; }
[ "public", "function", "set", "(", "array", "$", "data", ")", "{", "$", "sql", "=", "''", ";", "foreach", "(", "$", "data", "as", "$", "field", "=>", "$", "value", ")", "{", "$", "sql", ".=", "$", "field", ".", "' = ?,'", ";", "$", "this", "->",...
Sets the column, value pairs in update queries @param array $data An array of the fields with their corresponding values in a key => value format @return \Phiber\oosql\oosql Instance
[ "Sets", "the", "column", "value", "pairs", "in", "update", "queries" ]
2574249d49b6930a0123a310a32073a105cdd486
https://github.com/ghousseyn/phiber/blob/2574249d49b6930a0123a310a32073a105cdd486/library/oosql/oosql.php#L540-L552
203,794
ghousseyn/phiber
library/oosql/oosql.php
oosql.values
public function values() { $arg_list = func_get_args(); $numargs = func_num_args(); if (($this->oosql_numargs !== 0 && $numargs !== $this->oosql_numargs) || $numargs === 0) { $msg = 'Insert numargs: ' . $this->oosql_numargs . ' | values numargs = ' . $numargs . ', Columns and ...
php
public function values() { $arg_list = func_get_args(); $numargs = func_num_args(); if (($this->oosql_numargs !== 0 && $numargs !== $this->oosql_numargs) || $numargs === 0) { $msg = 'Insert numargs: ' . $this->oosql_numargs . ' | values numargs = ' . $numargs . ', Columns and ...
[ "public", "function", "values", "(", ")", "{", "$", "arg_list", "=", "func_get_args", "(", ")", ";", "$", "numargs", "=", "func_num_args", "(", ")", ";", "if", "(", "(", "$", "this", "->", "oosql_numargs", "!==", "0", "&&", "$", "numargs", "!==", "$"...
Assembles values part of an insert @throws \Exception @return \Phiber\oosql\oosql Instance
[ "Assembles", "values", "part", "of", "an", "insert" ]
2574249d49b6930a0123a310a32073a105cdd486
https://github.com/ghousseyn/phiber/blob/2574249d49b6930a0123a310a32073a105cdd486/library/oosql/oosql.php#L682-L715
203,795
ghousseyn/phiber
library/oosql/oosql.php
oosql.from
public function from() { $from = ''; $numargs = func_num_args(); if ($this->oosql_del_multiFlag) { if ($numargs < $this->oosql_del_numargs) { $msg = 'Columns and passed data do not match! ' . $this->sql(); throw new \Exception($msg, 9810, null)...
php
public function from() { $from = ''; $numargs = func_num_args(); if ($this->oosql_del_multiFlag) { if ($numargs < $this->oosql_del_numargs) { $msg = 'Columns and passed data do not match! ' . $this->sql(); throw new \Exception($msg, 9810, null)...
[ "public", "function", "from", "(", ")", "{", "$", "from", "=", "''", ";", "$", "numargs", "=", "func_num_args", "(", ")", ";", "if", "(", "$", "this", "->", "oosql_del_multiFlag", ")", "{", "if", "(", "$", "numargs", "<", "$", "this", "->", "oosql_...
Assembles the FROM part of the query @throws \Exception @return \Phiber\oosql\oosql Instance
[ "Assembles", "the", "FROM", "part", "of", "the", "query" ]
2574249d49b6930a0123a310a32073a105cdd486
https://github.com/ghousseyn/phiber/blob/2574249d49b6930a0123a310a32073a105cdd486/library/oosql/oosql.php#L722-L771
203,796
ghousseyn/phiber
library/oosql/oosql.php
oosql.where
public function where($condition, $value = null, $type = null) { switch ($type) { case null: $clause = 'WHERE'; break; case 'or': $clause = 'OR'; break; case 'and': $clause = 'AND'; ...
php
public function where($condition, $value = null, $type = null) { switch ($type) { case null: $clause = 'WHERE'; break; case 'or': $clause = 'OR'; break; case 'and': $clause = 'AND'; ...
[ "public", "function", "where", "(", "$", "condition", ",", "$", "value", "=", "null", ",", "$", "type", "=", "null", ")", "{", "switch", "(", "$", "type", ")", "{", "case", "null", ":", "$", "clause", "=", "'WHERE'", ";", "break", ";", "case", "'...
Assembles a WHERE clause @param string $condition @param string $value @param string $type @return \Phiber\oosql\oosql
[ "Assembles", "a", "WHERE", "clause" ]
2574249d49b6930a0123a310a32073a105cdd486
https://github.com/ghousseyn/phiber/blob/2574249d49b6930a0123a310a32073a105cdd486/library/oosql/oosql.php#L829-L857
203,797
ghousseyn/phiber
library/oosql/oosql.php
oosql.sub
public function sub() { $this->oosql_sub = true; $this->exe(); $this->sql('(' . $this->getSql() . ')', true); return $this; }
php
public function sub() { $this->oosql_sub = true; $this->exe(); $this->sql('(' . $this->getSql() . ')', true); return $this; }
[ "public", "function", "sub", "(", ")", "{", "$", "this", "->", "oosql_sub", "=", "true", ";", "$", "this", "->", "exe", "(", ")", ";", "$", "this", "->", "sql", "(", "'('", ".", "$", "this", "->", "getSql", "(", ")", ".", "')'", ",", "true", ...
Declares current query as a sub-query @return \Phiber\oosql\oosql
[ "Declares", "current", "query", "as", "a", "sub", "-", "query" ]
2574249d49b6930a0123a310a32073a105cdd486
https://github.com/ghousseyn/phiber/blob/2574249d49b6930a0123a310a32073a105cdd486/library/oosql/oosql.php#L863-L870
203,798
ghousseyn/phiber
library/oosql/oosql.php
oosql.prep
public function prep($values = null) { $hash = $this->queryHash(); $prepOnly = true; if (is_array($values)) { $prepOnly = false; } if ($this->oosql_prepParams) { $this->oosql_stmt = $this->prepare(trim($this->sql()), $this->oosql_prepParams); ...
php
public function prep($values = null) { $hash = $this->queryHash(); $prepOnly = true; if (is_array($values)) { $prepOnly = false; } if ($this->oosql_prepParams) { $this->oosql_stmt = $this->prepare(trim($this->sql()), $this->oosql_prepParams); ...
[ "public", "function", "prep", "(", "$", "values", "=", "null", ")", "{", "$", "hash", "=", "$", "this", "->", "queryHash", "(", ")", ";", "$", "prepOnly", "=", "true", ";", "if", "(", "is_array", "(", "$", "values", ")", ")", "{", "$", "prepOnly"...
Prepare a query statement @param array $values Bound values if any @return mixed A \PDOStatement object or the boolean return of PDOStatement::execute
[ "Prepare", "a", "query", "statement" ]
2574249d49b6930a0123a310a32073a105cdd486
https://github.com/ghousseyn/phiber/blob/2574249d49b6930a0123a310a32073a105cdd486/library/oosql/oosql.php#L901-L928
203,799
ghousseyn/phiber
library/oosql/oosql.php
oosql.execBound
public function execBound(\PDOStatement $stmt, array $values) { $ord = 1; foreach ($values as $val) { if (is_bool($val)) { $stmt->bindValue($ord, $val, \PDO::PARAM_BOOL); } elseif (is_resource($val)) { $stmt->bindValue($ord, $val, \PDO::PAR...
php
public function execBound(\PDOStatement $stmt, array $values) { $ord = 1; foreach ($values as $val) { if (is_bool($val)) { $stmt->bindValue($ord, $val, \PDO::PARAM_BOOL); } elseif (is_resource($val)) { $stmt->bindValue($ord, $val, \PDO::PAR...
[ "public", "function", "execBound", "(", "\\", "PDOStatement", "$", "stmt", ",", "array", "$", "values", ")", "{", "$", "ord", "=", "1", ";", "foreach", "(", "$", "values", "as", "$", "val", ")", "{", "if", "(", "is_bool", "(", "$", "val", ")", ")...
Executes a prepared statement with parameterized values @param \PDOStatement $stmt @param array $values @return boolean True on success
[ "Executes", "a", "prepared", "statement", "with", "parameterized", "values" ]
2574249d49b6930a0123a310a32073a105cdd486
https://github.com/ghousseyn/phiber/blob/2574249d49b6930a0123a310a32073a105cdd486/library/oosql/oosql.php#L936-L961