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
202,900
CismonX/CaptchaQueue
src/Captcha.php
Captcha.disable
static function disable(string $name) { $pos = array_search($name, self::$_enableList); if ($pos === false) return; unset(self::$_enableList[$pos]); }
php
static function disable(string $name) { $pos = array_search($name, self::$_enableList); if ($pos === false) return; unset(self::$_enableList[$pos]); }
[ "static", "function", "disable", "(", "string", "$", "name", ")", "{", "$", "pos", "=", "array_search", "(", "$", "name", ",", "self", "::", "$", "_enableList", ")", ";", "if", "(", "$", "pos", "===", "false", ")", "return", ";", "unset", "(", "sel...
Mark a captcha generator as disabled. @param string $name
[ "Mark", "a", "captcha", "generator", "as", "disabled", "." ]
bcf0fbeb4d52de471a99e9f744c4ad7ca2e59975
https://github.com/CismonX/CaptchaQueue/blob/bcf0fbeb4d52de471a99e9f744c4ad7ca2e59975/src/Captcha.php#L62-L67
202,901
CismonX/CaptchaQueue
src/Captcha.php
Captcha.init
static function init() { mt_srand(); foreach (self::$_captchaList as $captcha) $captcha->init(); if (!is_resource(self::$_queue)) self::_initQueue(); self::$_timer_id = Timer::add(Config::get('CAPTCHA_TIMER_INTERVAL'), function () { $obj = self::_choos...
php
static function init() { mt_srand(); foreach (self::$_captchaList as $captcha) $captcha->init(); if (!is_resource(self::$_queue)) self::_initQueue(); self::$_timer_id = Timer::add(Config::get('CAPTCHA_TIMER_INTERVAL'), function () { $obj = self::_choos...
[ "static", "function", "init", "(", ")", "{", "mt_srand", "(", ")", ";", "foreach", "(", "self", "::", "$", "_captchaList", "as", "$", "captcha", ")", "$", "captcha", "->", "init", "(", ")", ";", "if", "(", "!", "is_resource", "(", "self", "::", "$"...
Initialize all registered captcha generators and start generating captcha.
[ "Initialize", "all", "registered", "captcha", "generators", "and", "start", "generating", "captcha", "." ]
bcf0fbeb4d52de471a99e9f744c4ad7ca2e59975
https://github.com/CismonX/CaptchaQueue/blob/bcf0fbeb4d52de471a99e9f744c4ad7ca2e59975/src/Captcha.php#L79-L92
202,902
CismonX/CaptchaQueue
src/Captcha.php
Captcha.destroy
static function destroy() { Timer::del(self::$_timer_id); foreach (self::$_captchaList as $captcha) $captcha->destroy(); self::$_captchaList = self::$_enableList = []; msg_remove_queue(self::$_queue); }
php
static function destroy() { Timer::del(self::$_timer_id); foreach (self::$_captchaList as $captcha) $captcha->destroy(); self::$_captchaList = self::$_enableList = []; msg_remove_queue(self::$_queue); }
[ "static", "function", "destroy", "(", ")", "{", "Timer", "::", "del", "(", "self", "::", "$", "_timer_id", ")", ";", "foreach", "(", "self", "::", "$", "_captchaList", "as", "$", "captcha", ")", "$", "captcha", "->", "destroy", "(", ")", ";", "self",...
Destroy captcha generators.
[ "Destroy", "captcha", "generators", "." ]
bcf0fbeb4d52de471a99e9f744c4ad7ca2e59975
https://github.com/CismonX/CaptchaQueue/blob/bcf0fbeb4d52de471a99e9f744c4ad7ca2e59975/src/Captcha.php#L103-L109
202,903
Shelob9/jp-tax-query
class-jp-tax-query.php
JP_API_Tax_Query.register_routes
public function register_routes( $routes ) { $route = JP_API_ROUTE; $routes[] = array( //endpoints "/{$route}/tax-query" => array( array( array( $this, 'tax_query' ), WP_JSON_Server::READABLE | WP_JSON_Server::ACCEPT_JSON ), ), ); return $routes; }
php
public function register_routes( $routes ) { $route = JP_API_ROUTE; $routes[] = array( //endpoints "/{$route}/tax-query" => array( array( array( $this, 'tax_query' ), WP_JSON_Server::READABLE | WP_JSON_Server::ACCEPT_JSON ), ), ); return $routes; }
[ "public", "function", "register_routes", "(", "$", "routes", ")", "{", "$", "route", "=", "JP_API_ROUTE", ";", "$", "routes", "[", "]", "=", "array", "(", "//endpoints", "\"/{$route}/tax-query\"", "=>", "array", "(", "array", "(", "array", "(", "$", "this"...
Register the post-related routes @param array $routes Existing routes @return array Modified routes
[ "Register", "the", "post", "-", "related", "routes" ]
0c0376018323aa46c95e01a3ce386b1de1640377
https://github.com/Shelob9/jp-tax-query/blob/0c0376018323aa46c95e01a3ce386b1de1640377/class-jp-tax-query.php#L28-L42
202,904
ekyna/PaymentBundle
Model/PaymentStates.php
PaymentStates.getNotifiableStates
static public function getNotifiableStates() { $states = []; foreach (static::getConfig() as $state => $config) { if ($config[2]) { $states[] = $state; } } return $states; }
php
static public function getNotifiableStates() { $states = []; foreach (static::getConfig() as $state => $config) { if ($config[2]) { $states[] = $state; } } return $states; }
[ "static", "public", "function", "getNotifiableStates", "(", ")", "{", "$", "states", "=", "[", "]", ";", "foreach", "(", "static", "::", "getConfig", "(", ")", "as", "$", "state", "=>", "$", "config", ")", "{", "if", "(", "$", "config", "[", "2", "...
Returns the notifiable states. @return array
[ "Returns", "the", "notifiable", "states", "." ]
1b4f4103b28e3a4f8dbfac2cbd872d728238f4d1
https://github.com/ekyna/PaymentBundle/blob/1b4f4103b28e3a4f8dbfac2cbd872d728238f4d1/Model/PaymentStates.php#L54-L63
202,905
spress/spress-installer
src/Installer/SpressInstaller.php
SpressInstaller.getSpressSiteDir
protected function getSpressSiteDir() { $rootPackage = $this->composer->getPackage(); $extras = $rootPackage->getExtra(); return isset($extras[self::EXTRA_SPRESS_SITE_DIR]) ? $extras[self::EXTRA_SPRESS_SITE_DIR].'/' : ''; }
php
protected function getSpressSiteDir() { $rootPackage = $this->composer->getPackage(); $extras = $rootPackage->getExtra(); return isset($extras[self::EXTRA_SPRESS_SITE_DIR]) ? $extras[self::EXTRA_SPRESS_SITE_DIR].'/' : ''; }
[ "protected", "function", "getSpressSiteDir", "(", ")", "{", "$", "rootPackage", "=", "$", "this", "->", "composer", "->", "getPackage", "(", ")", ";", "$", "extras", "=", "$", "rootPackage", "->", "getExtra", "(", ")", ";", "return", "isset", "(", "$", ...
Returns the Spress site directory. If the extra attributte "spress_site_dir" is not presents in the "extra" section of the root package,. @return string If the extra attributte "spress_site_dir" is not presents in the "extra" section of the root package, an empty string will be return
[ "Returns", "the", "Spress", "site", "directory", ".", "If", "the", "extra", "attributte", "spress_site_dir", "is", "not", "presents", "in", "the", "extra", "section", "of", "the", "root", "package", "." ]
ed31aa40817b133e4c19e5bf6224f343cf959275
https://github.com/spress/spress-installer/blob/ed31aa40817b133e4c19e5bf6224f343cf959275/src/Installer/SpressInstaller.php#L65-L71
202,906
jabernardo/lollipop-php
Library/Session/Cookie.php
Cookie.store
private function store($data) { $enc_data = Text::lock(json_encode($data)); HTTPCookie::set($this->name, $enc_data, 0, $this->path, $this->domain); }
php
private function store($data) { $enc_data = Text::lock(json_encode($data)); HTTPCookie::set($this->name, $enc_data, 0, $this->path, $this->domain); }
[ "private", "function", "store", "(", "$", "data", ")", "{", "$", "enc_data", "=", "Text", "::", "lock", "(", "json_encode", "(", "$", "data", ")", ")", ";", "HTTPCookie", "::", "set", "(", "$", "this", "->", "name", ",", "$", "enc_data", ",", "0", ...
Store session into cookie @access private @return void
[ "Store", "session", "into", "cookie" ]
004d80b21f7246bb3e08c7b9f74a165b0d3ca0f5
https://github.com/jabernardo/lollipop-php/blob/004d80b21f7246bb3e08c7b9f74a165b0d3ca0f5/Library/Session/Cookie.php#L85-L88
202,907
jabernardo/lollipop-php
Library/Session/Cookie.php
Cookie.restore
private function restore() { if (!HTTPCookie::exists($this->name)) return (object)[]; return json_decode(Text::unlock(HTTPCookie::get($this->name))); }
php
private function restore() { if (!HTTPCookie::exists($this->name)) return (object)[]; return json_decode(Text::unlock(HTTPCookie::get($this->name))); }
[ "private", "function", "restore", "(", ")", "{", "if", "(", "!", "HTTPCookie", "::", "exists", "(", "$", "this", "->", "name", ")", ")", "return", "(", "object", ")", "[", "]", ";", "return", "json_decode", "(", "Text", "::", "unlock", "(", "HTTPCook...
Restore session from cookie @access private @return object
[ "Restore", "session", "from", "cookie" ]
004d80b21f7246bb3e08c7b9f74a165b0d3ca0f5
https://github.com/jabernardo/lollipop-php/blob/004d80b21f7246bb3e08c7b9f74a165b0d3ca0f5/Library/Session/Cookie.php#L97-L101
202,908
native5/native5-sdk-client-php
src/Native5/Application.php
Application.route
public function route($request) { if (!self::$_cli) { $router = $this->get('routing'); $router->route($request); } }
php
public function route($request) { if (!self::$_cli) { $router = $this->get('routing'); $router->route($request); } }
[ "public", "function", "route", "(", "$", "request", ")", "{", "if", "(", "!", "self", "::", "$", "_cli", ")", "{", "$", "router", "=", "$", "this", "->", "get", "(", "'routing'", ")", ";", "$", "router", "->", "route", "(", "$", "request", ")", ...
Handles routing for all incoming requests. @param mixed $request Route the application based on incoming request. @access public @return void
[ "Handles", "routing", "for", "all", "incoming", "requests", "." ]
e1f598cf27654d81bb5facace1990b737242a2f9
https://github.com/native5/native5-sdk-client-php/blob/e1f598cf27654d81bb5facace1990b737242a2f9/src/Native5/Application.php#L240-L246
202,909
SlaxWeb/Bootstrap
src/Application.php
Application.setRequestProperties
protected function setRequestProperties(Request $request) { $this["basePath"] = $request->getBasePath(); $this["baseUrl"] = $request->getSchemeAndHttpHost() . $this["basePath"]; }
php
protected function setRequestProperties(Request $request) { $this["basePath"] = $request->getBasePath(); $this["baseUrl"] = $request->getSchemeAndHttpHost() . $this["basePath"]; }
[ "protected", "function", "setRequestProperties", "(", "Request", "$", "request", ")", "{", "$", "this", "[", "\"basePath\"", "]", "=", "$", "request", "->", "getBasePath", "(", ")", ";", "$", "this", "[", "\"baseUrl\"", "]", "=", "$", "request", "->", "g...
Set application properties Sets some basic request properties for the application. @param \SlaxWeb\Route\Request $request Received Request @return void
[ "Set", "application", "properties" ]
5ec8ef40f357f2c75afa0ad99090a9d2f7021557
https://github.com/SlaxWeb/Bootstrap/blob/5ec8ef40f357f2c75afa0ad99090a9d2f7021557/src/Application.php#L226-L230
202,910
hiqdev/minii-caching
src/MemCache.php
MemCache.addMemcacheServers
protected function addMemcacheServers($cache, $servers) { $class = new \ReflectionClass($cache); $paramCount = $class->getMethod('addServer')->getNumberOfParameters(); foreach ($servers as $server) { // $timeout is used for memcache versions that do not have $timeoutms parameter ...
php
protected function addMemcacheServers($cache, $servers) { $class = new \ReflectionClass($cache); $paramCount = $class->getMethod('addServer')->getNumberOfParameters(); foreach ($servers as $server) { // $timeout is used for memcache versions that do not have $timeoutms parameter ...
[ "protected", "function", "addMemcacheServers", "(", "$", "cache", ",", "$", "servers", ")", "{", "$", "class", "=", "new", "\\", "ReflectionClass", "(", "$", "cache", ")", ";", "$", "paramCount", "=", "$", "class", "->", "getMethod", "(", "'addServer'", ...
Add servers to the server pool of the cache specified Used for memcache PECL extension. @param \Memcache $cache @param MemCacheServer[] $servers
[ "Add", "servers", "to", "the", "server", "pool", "of", "the", "cache", "specified", "Used", "for", "memcache", "PECL", "extension", "." ]
04c3f810a4af43b53855ee9c5e3ef6455080b538
https://github.com/hiqdev/minii-caching/blob/04c3f810a4af43b53855ee9c5e3ef6455080b538/src/MemCache.php#L173-L205
202,911
Hnto/nuki
src/Skeletons/Providers/Repository.php
Repository.getProvider
public function getProvider($key) { if (!isset($this->providers[$key])) { return null; } return $this->providers[$key]; }
php
public function getProvider($key) { if (!isset($this->providers[$key])) { return null; } return $this->providers[$key]; }
[ "public", "function", "getProvider", "(", "$", "key", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "providers", "[", "$", "key", "]", ")", ")", "{", "return", "null", ";", "}", "return", "$", "this", "->", "providers", "[", "$", "ke...
Get provider by key @param string $key @return object
[ "Get", "provider", "by", "key" ]
c3fb16244e8d611c335a88e3b9c9ee7d81fafc0c
https://github.com/Hnto/nuki/blob/c3fb16244e8d611c335a88e3b9c9ee7d81fafc0c/src/Skeletons/Providers/Repository.php#L96-L102
202,912
frameworkwtf/auth
src/Auth.php
Auth.login
public function login(string $login, string $password) { $user = $this->auth_repository->login($login, $password); if (null === $user) { return null; } if ($this->container->has('user')) { unset($this->container['user']); } $this->container['...
php
public function login(string $login, string $password) { $user = $this->auth_repository->login($login, $password); if (null === $user) { return null; } if ($this->container->has('user')) { unset($this->container['user']); } $this->container['...
[ "public", "function", "login", "(", "string", "$", "login", ",", "string", "$", "password", ")", "{", "$", "user", "=", "$", "this", "->", "auth_repository", "->", "login", "(", "$", "login", ",", "$", "password", ")", ";", "if", "(", "null", "===", ...
Log in user. Return result, based by selected session storage @param string $login @param string $password @return mixed
[ "Log", "in", "user", "." ]
2535d19ee326d1b491e36a341fe06d00bcc0731e
https://github.com/frameworkwtf/auth/blob/2535d19ee326d1b491e36a341fe06d00bcc0731e/src/Auth.php#L19-L33
202,913
frameworkwtf/auth
src/Auth.php
Auth.reset
public function reset(string $code, string $new_password): bool { return $this->auth_repository->reset($code, $new_password); }
php
public function reset(string $code, string $new_password): bool { return $this->auth_repository->reset($code, $new_password); }
[ "public", "function", "reset", "(", "string", "$", "code", ",", "string", "$", "new_password", ")", ":", "bool", "{", "return", "$", "this", "->", "auth_repository", "->", "reset", "(", "$", "code", ",", "$", "new_password", ")", ";", "}" ]
Reset user password by code. @param string $code Return value of self::forgot() @param string $new_password New password for user @return bool
[ "Reset", "user", "password", "by", "code", "." ]
2535d19ee326d1b491e36a341fe06d00bcc0731e
https://github.com/frameworkwtf/auth/blob/2535d19ee326d1b491e36a341fe06d00bcc0731e/src/Auth.php#L53-L56
202,914
codeblanche/Depend
src/Depend/Manager.php
Manager.module
public function module($module) { if (is_object($module)) { if (!($module instanceof ModuleInterface)) { $moduleType = get_class($module); throw new InvalidArgumentException("Given module object '$moduleType' does not implement 'Depend\\Abstraction\\ModuleInterfa...
php
public function module($module) { if (is_object($module)) { if (!($module instanceof ModuleInterface)) { $moduleType = get_class($module); throw new InvalidArgumentException("Given module object '$moduleType' does not implement 'Depend\\Abstraction\\ModuleInterfa...
[ "public", "function", "module", "(", "$", "module", ")", "{", "if", "(", "is_object", "(", "$", "module", ")", ")", "{", "if", "(", "!", "(", "$", "module", "instanceof", "ModuleInterface", ")", ")", "{", "$", "moduleType", "=", "get_class", "(", "$"...
Register a module object or class to register it's own dependencies. @param ModuleInterface|string $module @return $this @throws Exception\InvalidArgumentException
[ "Register", "a", "module", "object", "or", "class", "to", "register", "it", "s", "own", "dependencies", "." ]
6520d010ec71f5b2ea0d622b8abae2e029ef7f16
https://github.com/codeblanche/Depend/blob/6520d010ec71f5b2ea0d622b8abae2e029ef7f16/src/Depend/Manager.php#L76-L95
202,915
codeblanche/Depend
src/Depend/Manager.php
Manager.add
public function add(DescriptorInterface $descriptor) { $key = $this->makeKey($descriptor->getName()); $descriptor->setManager($this); $this->descriptors[$key] = $descriptor; }
php
public function add(DescriptorInterface $descriptor) { $key = $this->makeKey($descriptor->getName()); $descriptor->setManager($this); $this->descriptors[$key] = $descriptor; }
[ "public", "function", "add", "(", "DescriptorInterface", "$", "descriptor", ")", "{", "$", "key", "=", "$", "this", "->", "makeKey", "(", "$", "descriptor", "->", "getName", "(", ")", ")", ";", "$", "descriptor", "->", "setManager", "(", "$", "this", "...
Add a class descriptor to the managers collection. @param Abstraction\DescriptorInterface $descriptor
[ "Add", "a", "class", "descriptor", "to", "the", "managers", "collection", "." ]
6520d010ec71f5b2ea0d622b8abae2e029ef7f16
https://github.com/codeblanche/Depend/blob/6520d010ec71f5b2ea0d622b8abae2e029ef7f16/src/Depend/Manager.php#L102-L109
202,916
codeblanche/Depend
src/Depend/Manager.php
Manager.resolveParams
public function resolveParams($params) { $resolved = array(); foreach ($params as $param) { if ($param instanceof DescriptorInterface) { $resolved[] = $this->get($param->getName()); continue; } $resolved[] = $param; } ...
php
public function resolveParams($params) { $resolved = array(); foreach ($params as $param) { if ($param instanceof DescriptorInterface) { $resolved[] = $this->get($param->getName()); continue; } $resolved[] = $param; } ...
[ "public", "function", "resolveParams", "(", "$", "params", ")", "{", "$", "resolved", "=", "array", "(", ")", ";", "foreach", "(", "$", "params", "as", "$", "param", ")", "{", "if", "(", "$", "param", "instanceof", "DescriptorInterface", ")", "{", "$",...
Resolve an array of mixed parameters and possible Descriptors. @param array $params @return array
[ "Resolve", "an", "array", "of", "mixed", "parameters", "and", "possible", "Descriptors", "." ]
6520d010ec71f5b2ea0d622b8abae2e029ef7f16
https://github.com/codeblanche/Depend/blob/6520d010ec71f5b2ea0d622b8abae2e029ef7f16/src/Depend/Manager.php#L271-L286
202,917
codeblanche/Depend
src/Depend/Manager.php
Manager.set
public function set($name, $instance) { $key = $this->makeKey($name); $this->alias($name, $this->describe(get_class($instance))); $this->instances[$key] = $instance; return $this; }
php
public function set($name, $instance) { $key = $this->makeKey($name); $this->alias($name, $this->describe(get_class($instance))); $this->instances[$key] = $instance; return $this; }
[ "public", "function", "set", "(", "$", "name", ",", "$", "instance", ")", "{", "$", "key", "=", "$", "this", "->", "makeKey", "(", "$", "name", ")", ";", "$", "this", "->", "alias", "(", "$", "name", ",", "$", "this", "->", "describe", "(", "ge...
Store an instance for injection by class name or alias. @param string $name Class name or alias @param object $instance @return Manager
[ "Store", "an", "instance", "for", "injection", "by", "class", "name", "or", "alias", "." ]
6520d010ec71f5b2ea0d622b8abae2e029ef7f16
https://github.com/codeblanche/Depend/blob/6520d010ec71f5b2ea0d622b8abae2e029ef7f16/src/Depend/Manager.php#L296-L305
202,918
RetItaliaSpA/AuthenticationBundle
Controller/GoogleController.php
GoogleController.connectAction
public function connectAction() { // will redirect to Facebook! $scope = $this->getParameter('scope_auth'); if(!isset($scope)){ $scope = []; } return $this->get('oauth2.registry') ->getClient('google_main') // key used in config.yml ->redi...
php
public function connectAction() { // will redirect to Facebook! $scope = $this->getParameter('scope_auth'); if(!isset($scope)){ $scope = []; } return $this->get('oauth2.registry') ->getClient('google_main') // key used in config.yml ->redi...
[ "public", "function", "connectAction", "(", ")", "{", "// will redirect to Facebook!", "$", "scope", "=", "$", "this", "->", "getParameter", "(", "'scope_auth'", ")", ";", "if", "(", "!", "isset", "(", "$", "scope", ")", ")", "{", "$", "scope", "=", "[",...
Link to this controller to start the "connect" process @Route("/login", name="login")
[ "Link", "to", "this", "controller", "to", "start", "the", "connect", "process" ]
4c2b28d0d290a68ade9215f872c417749deea2cd
https://github.com/RetItaliaSpA/AuthenticationBundle/blob/4c2b28d0d290a68ade9215f872c417749deea2cd/Controller/GoogleController.php#L23-L34
202,919
nguyenanhung/requests
src/SoapRequest.php
SoapRequest.setResponseIsJson
public function setResponseIsJson($responseIsJson = '') { $this->responseIsJson = $responseIsJson; $this->debug->info(__FUNCTION__, 'setResponseIsJson: ', $this->responseIsJson); return $this; }
php
public function setResponseIsJson($responseIsJson = '') { $this->responseIsJson = $responseIsJson; $this->debug->info(__FUNCTION__, 'setResponseIsJson: ', $this->responseIsJson); return $this; }
[ "public", "function", "setResponseIsJson", "(", "$", "responseIsJson", "=", "''", ")", "{", "$", "this", "->", "responseIsJson", "=", "$", "responseIsJson", ";", "$", "this", "->", "debug", "->", "info", "(", "__FUNCTION__", ",", "'setResponseIsJson: '", ",", ...
Function setResponseIsJson Return Response is Json if value = true @author: 713uk13m <dev@nguyenanhung.com> @time : 10/8/18 19:00 @param string $responseIsJson @return $this|mixed if set value = TRUE, response is Json string @see clientRequestWsdl() method
[ "Function", "setResponseIsJson", "Return", "Response", "is", "Json", "if", "value", "=", "true" ]
fae98614a256be6a3ff9bea34a273d182a3ae730
https://github.com/nguyenanhung/requests/blob/fae98614a256be6a3ff9bea34a273d182a3ae730/src/SoapRequest.php#L186-L192
202,920
MichaelJ2324/PHP-REST-Client
src/Endpoint/Abstracts/AbstractModelEndpoint.php
AbstractModelEndpoint.setCurrentAction
public function setCurrentAction($action,array $actionArgs = array()){ $action = (string) $action; if (array_key_exists($action,$this->actions)){ $this->action = $action; $this->configureAction($this->action,$actionArgs); } return $this; }
php
public function setCurrentAction($action,array $actionArgs = array()){ $action = (string) $action; if (array_key_exists($action,$this->actions)){ $this->action = $action; $this->configureAction($this->action,$actionArgs); } return $this; }
[ "public", "function", "setCurrentAction", "(", "$", "action", ",", "array", "$", "actionArgs", "=", "array", "(", ")", ")", "{", "$", "action", "=", "(", "string", ")", "$", "action", ";", "if", "(", "array_key_exists", "(", "$", "action", ",", "$", ...
Set the current action taking place on the Model @param string $action @param array $actionArgs @return $this
[ "Set", "the", "current", "action", "taking", "place", "on", "the", "Model" ]
b8a2caaf6456eccaa845ba5c5098608aa9645c92
https://github.com/MichaelJ2324/PHP-REST-Client/blob/b8a2caaf6456eccaa845ba5c5098608aa9645c92/src/Endpoint/Abstracts/AbstractModelEndpoint.php#L232-L239
202,921
MichaelJ2324/PHP-REST-Client
src/Endpoint/Abstracts/AbstractModelEndpoint.php
AbstractModelEndpoint.configureAction
protected function configureAction($action,array $arguments = array()){ $this->setProperty(self::PROPERTY_HTTP_METHOD,$this->actions[$action]); }
php
protected function configureAction($action,array $arguments = array()){ $this->setProperty(self::PROPERTY_HTTP_METHOD,$this->actions[$action]); }
[ "protected", "function", "configureAction", "(", "$", "action", ",", "array", "$", "arguments", "=", "array", "(", ")", ")", "{", "$", "this", "->", "setProperty", "(", "self", "::", "PROPERTY_HTTP_METHOD", ",", "$", "this", "->", "actions", "[", "$", "a...
Update any properties or data based on the current action - Called when setting the Current Action @param $action @param array $arguments
[ "Update", "any", "properties", "or", "data", "based", "on", "the", "current", "action", "-", "Called", "when", "setting", "the", "Current", "Action" ]
b8a2caaf6456eccaa845ba5c5098608aa9645c92
https://github.com/MichaelJ2324/PHP-REST-Client/blob/b8a2caaf6456eccaa845ba5c5098608aa9645c92/src/Endpoint/Abstracts/AbstractModelEndpoint.php#L254-L256
202,922
MichaelJ2324/PHP-REST-Client
src/Endpoint/Abstracts/AbstractModelEndpoint.php
AbstractModelEndpoint.updateModel
protected function updateModel(){ $body = $this->Response->getBody(); switch ($this->action){ case self::MODEL_ACTION_CREATE: case self::MODEL_ACTION_UPDATE: case self::MODEL_ACTION_RETRIEVE: if (is_array($body)){ $this->update($bod...
php
protected function updateModel(){ $body = $this->Response->getBody(); switch ($this->action){ case self::MODEL_ACTION_CREATE: case self::MODEL_ACTION_UPDATE: case self::MODEL_ACTION_RETRIEVE: if (is_array($body)){ $this->update($bod...
[ "protected", "function", "updateModel", "(", ")", "{", "$", "body", "=", "$", "this", "->", "Response", "->", "getBody", "(", ")", ";", "switch", "(", "$", "this", "->", "action", ")", "{", "case", "self", "::", "MODEL_ACTION_CREATE", ":", "case", "sel...
Called after Execute if a Request Object exists, and Request returned 200 response
[ "Called", "after", "Execute", "if", "a", "Request", "Object", "exists", "and", "Request", "returned", "200", "response" ]
b8a2caaf6456eccaa845ba5c5098608aa9645c92
https://github.com/MichaelJ2324/PHP-REST-Client/blob/b8a2caaf6456eccaa845ba5c5098608aa9645c92/src/Endpoint/Abstracts/AbstractModelEndpoint.php#L294-L307
202,923
Dhii/iterator-abstract
src/IteratorTrait.php
IteratorTrait._rewind
protected function _rewind() { try { $this->_setIteration($this->_reset()); } catch (RootException $exception) { $this->_throwIteratorException( $this->__('An error occurred while rewinding'), null, $exception ); ...
php
protected function _rewind() { try { $this->_setIteration($this->_reset()); } catch (RootException $exception) { $this->_throwIteratorException( $this->__('An error occurred while rewinding'), null, $exception ); ...
[ "protected", "function", "_rewind", "(", ")", "{", "try", "{", "$", "this", "->", "_setIteration", "(", "$", "this", "->", "_reset", "(", ")", ")", ";", "}", "catch", "(", "RootException", "$", "exception", ")", "{", "$", "this", "->", "_throwIteratorE...
Resets the iterator. @since [*next-version*] @see Iterator::rewind()
[ "Resets", "the", "iterator", "." ]
576484183865575ffc2a0d586132741329626fb8
https://github.com/Dhii/iterator-abstract/blob/576484183865575ffc2a0d586132741329626fb8/src/IteratorTrait.php#L22-L33
202,924
Dhii/iterator-abstract
src/IteratorTrait.php
IteratorTrait._next
protected function _next() { try { $this->_setIteration($this->_loop()); } catch (RootException $exception) { $this->_throwIteratorException( $this->__('An error occurred while iterating'), null, $exception ); ...
php
protected function _next() { try { $this->_setIteration($this->_loop()); } catch (RootException $exception) { $this->_throwIteratorException( $this->__('An error occurred while iterating'), null, $exception ); ...
[ "protected", "function", "_next", "(", ")", "{", "try", "{", "$", "this", "->", "_setIteration", "(", "$", "this", "->", "_loop", "(", ")", ")", ";", "}", "catch", "(", "RootException", "$", "exception", ")", "{", "$", "this", "->", "_throwIteratorExce...
Advances the iterator to the next element. @since [*next-version*] @see Iterator::next() @throws IteratorExceptionInterface If an error occurred during iteration.
[ "Advances", "the", "iterator", "to", "the", "next", "element", "." ]
576484183865575ffc2a0d586132741329626fb8
https://github.com/Dhii/iterator-abstract/blob/576484183865575ffc2a0d586132741329626fb8/src/IteratorTrait.php#L43-L54
202,925
nirou8/php-multiple-saml
lib/Saml2/Settings.php
OneLogin_Saml2_Settings.checkIdPSettings
public function checkIdPSettings($settings) { assert('is_array($settings)'); if (!is_array($settings) || empty($settings)) { return array('invalid_syntax'); } $errors = array(); if (!isset($settings['idp']) || empty($settings['idp'])) { $errors[] = ...
php
public function checkIdPSettings($settings) { assert('is_array($settings)'); if (!is_array($settings) || empty($settings)) { return array('invalid_syntax'); } $errors = array(); if (!isset($settings['idp']) || empty($settings['idp'])) { $errors[] = ...
[ "public", "function", "checkIdPSettings", "(", "$", "settings", ")", "{", "assert", "(", "'is_array($settings)'", ")", ";", "if", "(", "!", "is_array", "(", "$", "settings", ")", "||", "empty", "(", "$", "settings", ")", ")", "{", "return", "array", "(",...
Checks the IdP settings info. @param array $settings Array with settings data @return array $errors Errors found on the IdP settings data
[ "Checks", "the", "IdP", "settings", "info", "." ]
7eb5786e678db7d45459ce3441fa187946ae9a3b
https://github.com/nirou8/php-multiple-saml/blob/7eb5786e678db7d45459ce3441fa187946ae9a3b/lib/Saml2/Settings.php#L497-L553
202,926
nirou8/php-multiple-saml
lib/Saml2/Settings.php
OneLogin_Saml2_Settings.getSPMetadata
public function getSPMetadata() { $metadata = OneLogin_Saml2_Metadata::builder($this->_sp, $this->_security['authnRequestsSigned'], $this->_security['wantAssertionsSigned'], null, null, $this->getContacts(), $this->getOrganization()); $certNew = $this->getSPcertNew(); if (!empty($certNew)) ...
php
public function getSPMetadata() { $metadata = OneLogin_Saml2_Metadata::builder($this->_sp, $this->_security['authnRequestsSigned'], $this->_security['wantAssertionsSigned'], null, null, $this->getContacts(), $this->getOrganization()); $certNew = $this->getSPcertNew(); if (!empty($certNew)) ...
[ "public", "function", "getSPMetadata", "(", ")", "{", "$", "metadata", "=", "OneLogin_Saml2_Metadata", "::", "builder", "(", "$", "this", "->", "_sp", ",", "$", "this", "->", "_security", "[", "'authnRequestsSigned'", "]", ",", "$", "this", "->", "_security"...
Gets the SP metadata. The XML representation. @return string SP metadata (xml) @throws Exception @throws OneLogin_Saml2_Error
[ "Gets", "the", "SP", "metadata", ".", "The", "XML", "representation", "." ]
7eb5786e678db7d45459ce3441fa187946ae9a3b
https://github.com/nirou8/php-multiple-saml/blob/7eb5786e678db7d45459ce3441fa187946ae9a3b/lib/Saml2/Settings.php#L807-L888
202,927
marando/Units
src/Marando/Units/Time.php
Time.hms
public static function hms($h, $m = 0, $s = 0, $f = 0) { $sec = static::hmsf2sec($h, $m, $s, $f); return static::sec($sec); }
php
public static function hms($h, $m = 0, $s = 0, $f = 0) { $sec = static::hmsf2sec($h, $m, $s, $f); return static::sec($sec); }
[ "public", "static", "function", "hms", "(", "$", "h", ",", "$", "m", "=", "0", ",", "$", "s", "=", "0", ",", "$", "f", "=", "0", ")", "{", "$", "sec", "=", "static", "::", "hmsf2sec", "(", "$", "h", ",", "$", "m", ",", "$", "s", ",", "$...
Creates a new Time instance from hour, minute and second components. @param $h Hour component @param int $m Minute component @param int|double $s Second component @param int|double $f Fractional second component @return Time
[ "Creates", "a", "new", "Time", "instance", "from", "hour", "minute", "and", "second", "components", "." ]
1721f16a2fdbd3fd8acb9061d393ce9ef1ce6e70
https://github.com/marando/Units/blob/1721f16a2fdbd3fd8acb9061d393ce9ef1ce6e70/src/Marando/Units/Time.php#L195-L200
202,928
Wedeto/FileFormats
src/YAML/Reader.php
Reader.readFile
public function readFile(string $file_name) { // yaml_read_file does not support stream wrappers $file_handle = @fopen($file_name, "r"); if (!is_resource($file_handle)) throw new IOException("Failed to read file: " . $file_name); return $this->readFileHandle($file_handle)...
php
public function readFile(string $file_name) { // yaml_read_file does not support stream wrappers $file_handle = @fopen($file_name, "r"); if (!is_resource($file_handle)) throw new IOException("Failed to read file: " . $file_name); return $this->readFileHandle($file_handle)...
[ "public", "function", "readFile", "(", "string", "$", "file_name", ")", "{", "// yaml_read_file does not support stream wrappers", "$", "file_handle", "=", "@", "fopen", "(", "$", "file_name", ",", "\"r\"", ")", ";", "if", "(", "!", "is_resource", "(", "$", "f...
Read YAML from a file @param string filename The file to read from @return array The parsed data
[ "Read", "YAML", "from", "a", "file" ]
65b71fbd38a2ee6b504622aca4f4047ce9d31e9f
https://github.com/Wedeto/FileFormats/blob/65b71fbd38a2ee6b504622aca4f4047ce9d31e9f/src/YAML/Reader.php#L46-L53
202,929
Wedeto/FileFormats
src/YAML/Reader.php
Reader.readFileHandle
public function readFileHandle($file_handle) { if (!is_resource($file_handle)) throw new \InvalidArgumentException("No file handle was provided"); $contents = ""; while (!feof($file_handle)) $contents .= fread($file_handle, 8192); return $this->readString($c...
php
public function readFileHandle($file_handle) { if (!is_resource($file_handle)) throw new \InvalidArgumentException("No file handle was provided"); $contents = ""; while (!feof($file_handle)) $contents .= fread($file_handle, 8192); return $this->readString($c...
[ "public", "function", "readFileHandle", "(", "$", "file_handle", ")", "{", "if", "(", "!", "is_resource", "(", "$", "file_handle", ")", ")", "throw", "new", "\\", "InvalidArgumentException", "(", "\"No file handle was provided\"", ")", ";", "$", "contents", "=",...
Read YAML from an open resource @param resource $file_handle The resource to read from @return array The parsed data
[ "Read", "YAML", "from", "an", "open", "resource" ]
65b71fbd38a2ee6b504622aca4f4047ce9d31e9f
https://github.com/Wedeto/FileFormats/blob/65b71fbd38a2ee6b504622aca4f4047ce9d31e9f/src/YAML/Reader.php#L61-L71
202,930
Wedeto/FileFormats
src/YAML/Reader.php
Reader.readString
public function readString(string $data) { $interceptor = new ErrorInterceptor(function ($data) { return yaml_parse($data); }); $interceptor->registerError(E_WARNING, "yaml_parse"); $result = $interceptor->execute($data); foreach ($interceptor->getInter...
php
public function readString(string $data) { $interceptor = new ErrorInterceptor(function ($data) { return yaml_parse($data); }); $interceptor->registerError(E_WARNING, "yaml_parse"); $result = $interceptor->execute($data); foreach ($interceptor->getInter...
[ "public", "function", "readString", "(", "string", "$", "data", ")", "{", "$", "interceptor", "=", "new", "ErrorInterceptor", "(", "function", "(", "$", "data", ")", "{", "return", "yaml_parse", "(", "$", "data", ")", ";", "}", ")", ";", "$", "intercep...
Read YAML from a string @param string $data The YAML data @return array The parsed data
[ "Read", "YAML", "from", "a", "string" ]
65b71fbd38a2ee6b504622aca4f4047ce9d31e9f
https://github.com/Wedeto/FileFormats/blob/65b71fbd38a2ee6b504622aca4f4047ce9d31e9f/src/YAML/Reader.php#L79-L93
202,931
CalderaWP/caldera-interop
src/ComplexEntity.php
ComplexEntity.addAttribute
public function addAttribute(Attribute $attribute): ComplexEntity { $this->attributesCollection = $this->getAttributes()->addAttribute($attribute); return $this; }
php
public function addAttribute(Attribute $attribute): ComplexEntity { $this->attributesCollection = $this->getAttributes()->addAttribute($attribute); return $this; }
[ "public", "function", "addAttribute", "(", "Attribute", "$", "attribute", ")", ":", "ComplexEntity", "{", "$", "this", "->", "attributesCollection", "=", "$", "this", "->", "getAttributes", "(", ")", "->", "addAttribute", "(", "$", "attribute", ")", ";", "re...
Add attribute definition @param Attribute $attribute @return ComplexEntity
[ "Add", "attribute", "definition" ]
d25c4bc930200b314fbd42d084080b5d85261c94
https://github.com/CalderaWP/caldera-interop/blob/d25c4bc930200b314fbd42d084080b5d85261c94/src/ComplexEntity.php#L26-L30
202,932
CalderaWP/caldera-interop
src/ComplexEntity.php
ComplexEntity.toRestResponse
public function toRestResponse(int$status = 200, array $headers = []): RestResponseContract { return (new Response())->setData($this->toArray())->setStatus($status)->setHeaders($headers); }
php
public function toRestResponse(int$status = 200, array $headers = []): RestResponseContract { return (new Response())->setData($this->toArray())->setStatus($status)->setHeaders($headers); }
[ "public", "function", "toRestResponse", "(", "int", "$", "status", "=", "200", ",", "array", "$", "headers", "=", "[", "]", ")", ":", "RestResponseContract", "{", "return", "(", "new", "Response", "(", ")", ")", "->", "setData", "(", "$", "this", "->",...
Create REST response from entity @param int $status @param array $headers @return RestResponseContract
[ "Create", "REST", "response", "from", "entity" ]
d25c4bc930200b314fbd42d084080b5d85261c94
https://github.com/CalderaWP/caldera-interop/blob/d25c4bc930200b314fbd42d084080b5d85261c94/src/ComplexEntity.php#L53-L56
202,933
horntell/php-sdk
lib/guzzle/GuzzleHttp/QueryParser.php
QueryParser.parseInto
public function parseInto(Query $query, $str, $urlEncoding = true) { if ($str === '') { return; } $result = []; $this->duplicates = false; $this->numericIndices = true; $decoder = self::getDecoder($urlEncoding); foreach (explode('&', $str) as $kv...
php
public function parseInto(Query $query, $str, $urlEncoding = true) { if ($str === '') { return; } $result = []; $this->duplicates = false; $this->numericIndices = true; $decoder = self::getDecoder($urlEncoding); foreach (explode('&', $str) as $kv...
[ "public", "function", "parseInto", "(", "Query", "$", "query", ",", "$", "str", ",", "$", "urlEncoding", "=", "true", ")", "{", "if", "(", "$", "str", "===", "''", ")", "{", "return", ";", "}", "$", "result", "=", "[", "]", ";", "$", "this", "-...
Parse a query string into a Query object. @param Query $query Query object to populate @param string $str Query string to parse @param bool|string $urlEncoding How the query string is encoded
[ "Parse", "a", "query", "string", "into", "a", "Query", "object", "." ]
e5205e9396a21b754d5651a8aa5898da5922a1b7
https://github.com/horntell/php-sdk/blob/e5205e9396a21b754d5651a8aa5898da5922a1b7/lib/guzzle/GuzzleHttp/QueryParser.php#L26-L67
202,934
horntell/php-sdk
lib/guzzle/GuzzleHttp/QueryParser.php
QueryParser.getDecoder
private static function getDecoder($type) { if ($type === true) { return function ($value) { return rawurldecode(str_replace('+', ' ', $value)); }; } elseif ($type == Query::RFC3986) { return 'rawurldecode'; } elseif ($type == Query::RFC173...
php
private static function getDecoder($type) { if ($type === true) { return function ($value) { return rawurldecode(str_replace('+', ' ', $value)); }; } elseif ($type == Query::RFC3986) { return 'rawurldecode'; } elseif ($type == Query::RFC173...
[ "private", "static", "function", "getDecoder", "(", "$", "type", ")", "{", "if", "(", "$", "type", "===", "true", ")", "{", "return", "function", "(", "$", "value", ")", "{", "return", "rawurldecode", "(", "str_replace", "(", "'+'", ",", "' '", ",", ...
Returns a callable that is used to URL decode query keys and values. @param string|bool $type One of true, false, RFC3986, and RFC1738 @return callable|string
[ "Returns", "a", "callable", "that", "is", "used", "to", "URL", "decode", "query", "keys", "and", "values", "." ]
e5205e9396a21b754d5651a8aa5898da5922a1b7
https://github.com/horntell/php-sdk/blob/e5205e9396a21b754d5651a8aa5898da5922a1b7/lib/guzzle/GuzzleHttp/QueryParser.php#L76-L89
202,935
horntell/php-sdk
lib/guzzle/GuzzleHttp/QueryParser.php
QueryParser.parsePhpValue
private function parsePhpValue($key, $value, array &$result) { $node =& $result; $keyBuffer = ''; for ($i = 0, $t = strlen($key); $i < $t; $i++) { switch ($key[$i]) { case '[': if ($keyBuffer) { $this->prepareNode($node...
php
private function parsePhpValue($key, $value, array &$result) { $node =& $result; $keyBuffer = ''; for ($i = 0, $t = strlen($key); $i < $t; $i++) { switch ($key[$i]) { case '[': if ($keyBuffer) { $this->prepareNode($node...
[ "private", "function", "parsePhpValue", "(", "$", "key", ",", "$", "value", ",", "array", "&", "$", "result", ")", "{", "$", "node", "=", "&", "$", "result", ";", "$", "keyBuffer", "=", "''", ";", "for", "(", "$", "i", "=", "0", ",", "$", "t", ...
Parses a PHP style key value pair. @param string $key Key to parse (e.g., "foo[a][b]") @param string|null $value Value to set @param array $result Result to modify by reference
[ "Parses", "a", "PHP", "style", "key", "value", "pair", "." ]
e5205e9396a21b754d5651a8aa5898da5922a1b7
https://github.com/horntell/php-sdk/blob/e5205e9396a21b754d5651a8aa5898da5922a1b7/lib/guzzle/GuzzleHttp/QueryParser.php#L98-L130
202,936
horntell/php-sdk
lib/guzzle/GuzzleHttp/QueryParser.php
QueryParser.prepareNode
private function prepareNode(&$node, $key) { if (!isset($node[$key])) { $node[$key] = null; } elseif (!is_array($node[$key])) { $node[$key] = [$node[$key]]; } }
php
private function prepareNode(&$node, $key) { if (!isset($node[$key])) { $node[$key] = null; } elseif (!is_array($node[$key])) { $node[$key] = [$node[$key]]; } }
[ "private", "function", "prepareNode", "(", "&", "$", "node", ",", "$", "key", ")", "{", "if", "(", "!", "isset", "(", "$", "node", "[", "$", "key", "]", ")", ")", "{", "$", "node", "[", "$", "key", "]", "=", "null", ";", "}", "elseif", "(", ...
Prepares a value in the array at the given key. If the key already exists, the key value is converted into an array. @param array $node Result node to modify @param string $key Key to add or modify in the node
[ "Prepares", "a", "value", "in", "the", "array", "at", "the", "given", "key", "." ]
e5205e9396a21b754d5651a8aa5898da5922a1b7
https://github.com/horntell/php-sdk/blob/e5205e9396a21b754d5651a8aa5898da5922a1b7/lib/guzzle/GuzzleHttp/QueryParser.php#L140-L147
202,937
horntell/php-sdk
lib/guzzle/GuzzleHttp/QueryParser.php
QueryParser.cleanKey
private function cleanKey($node, $key) { if ($key === '') { $key = $node ? (string) count($node) : 0; // Found a [] key, so track this to ensure that we disable numeric // indexing of keys in the resolved query aggregator. $this->numericIndices = false; ...
php
private function cleanKey($node, $key) { if ($key === '') { $key = $node ? (string) count($node) : 0; // Found a [] key, so track this to ensure that we disable numeric // indexing of keys in the resolved query aggregator. $this->numericIndices = false; ...
[ "private", "function", "cleanKey", "(", "$", "node", ",", "$", "key", ")", "{", "if", "(", "$", "key", "===", "''", ")", "{", "$", "key", "=", "$", "node", "?", "(", "string", ")", "count", "(", "$", "node", ")", ":", "0", ";", "// Found a [] k...
Returns the appropriate key based on the node and key.
[ "Returns", "the", "appropriate", "key", "based", "on", "the", "node", "and", "key", "." ]
e5205e9396a21b754d5651a8aa5898da5922a1b7
https://github.com/horntell/php-sdk/blob/e5205e9396a21b754d5651a8aa5898da5922a1b7/lib/guzzle/GuzzleHttp/QueryParser.php#L152-L162
202,938
zhaoxianfang/tools
src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php
NodeBuilder.append
public function append(NodeDefinition $node) { if ($node instanceof ParentNodeDefinitionInterface) { $builder = clone $this; $builder->setParent(null); $node->setBuilder($builder); } if (null !== $this->parent) { $this->parent->append($node); ...
php
public function append(NodeDefinition $node) { if ($node instanceof ParentNodeDefinitionInterface) { $builder = clone $this; $builder->setParent(null); $node->setBuilder($builder); } if (null !== $this->parent) { $this->parent->append($node); ...
[ "public", "function", "append", "(", "NodeDefinition", "$", "node", ")", "{", "if", "(", "$", "node", "instanceof", "ParentNodeDefinitionInterface", ")", "{", "$", "builder", "=", "clone", "$", "this", ";", "$", "builder", "->", "setParent", "(", "null", "...
Appends a node definition. Usage: $node = new ArrayNodeDefinition('name') ->children() ->scalarNode('foo')->end() ->scalarNode('baz')->end() ->append($this->getBarNodeDefinition()) ->end() ; @return $this
[ "Appends", "a", "node", "definition", "." ]
d8fc8a9ecd75b5ce4236f0a2e9fdc055108573e7
https://github.com/zhaoxianfang/tools/blob/d8fc8a9ecd75b5ce4236f0a2e9fdc055108573e7/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php#L180-L195
202,939
anime-db/catalog-bundle
src/Form/Type/Entity/Item.php
Item.getRefillAttr
protected function getRefillAttr($field, ItemEntity $item = null) { // item exists and can be refilled if ($item instanceof ItemEntity && $item->getName() && ($plugins = $this->chain->getPluginsThatCanFillItem($item, $field)) ) { /* @var $plugin RefillerInterface */ ...
php
protected function getRefillAttr($field, ItemEntity $item = null) { // item exists and can be refilled if ($item instanceof ItemEntity && $item->getName() && ($plugins = $this->chain->getPluginsThatCanFillItem($item, $field)) ) { /* @var $plugin RefillerInterface */ ...
[ "protected", "function", "getRefillAttr", "(", "$", "field", ",", "ItemEntity", "$", "item", "=", "null", ")", "{", "// item exists and can be refilled", "if", "(", "$", "item", "instanceof", "ItemEntity", "&&", "$", "item", "->", "getName", "(", ")", "&&", ...
Get the field refill attributes. @param string $field @param ItemEntity|null $item @return array
[ "Get", "the", "field", "refill", "attributes", "." ]
631b6f92a654e91bee84f46218c52cf42bdb8606
https://github.com/anime-db/catalog-bundle/blob/631b6f92a654e91bee84f46218c52cf42bdb8606/src/Form/Type/Entity/Item.php#L259-L288
202,940
romm/configuration_object
Classes/Validation/Validator/IconExistsValidator.php
IconExistsValidator.isValid
public function isValid($value) { if (version_compare(VersionNumberUtility::getCurrentTypo3Version(), '7.6.0', '<')) { throw new UnsupportedVersionException( 'The validator "' . self::class . '" cannot be used in TYPO3 versions anterior to `7.6.0`.', 1506281412 ...
php
public function isValid($value) { if (version_compare(VersionNumberUtility::getCurrentTypo3Version(), '7.6.0', '<')) { throw new UnsupportedVersionException( 'The validator "' . self::class . '" cannot be used in TYPO3 versions anterior to `7.6.0`.', 1506281412 ...
[ "public", "function", "isValid", "(", "$", "value", ")", "{", "if", "(", "version_compare", "(", "VersionNumberUtility", "::", "getCurrentTypo3Version", "(", ")", ",", "'7.6.0'", ",", "'<'", ")", ")", "{", "throw", "new", "UnsupportedVersionException", "(", "'...
Checks that the given icon identifier exists in the TYPO3 icon registry. @param mixed $value @throws UnsupportedVersionException
[ "Checks", "that", "the", "given", "icon", "identifier", "exists", "in", "the", "TYPO3", "icon", "registry", "." ]
d3a40903386c2e0766bd8279337fe6da45cf5ce3
https://github.com/romm/configuration_object/blob/d3a40903386c2e0766bd8279337fe6da45cf5ce3/Classes/Validation/Validator/IconExistsValidator.php#L30-L45
202,941
ekyna/MediaBundle
Controller/MediaController.php
MediaController.findMedia
private function findMedia($path) { /** @var \Ekyna\Bundle\MediaBundle\Model\MediaInterface $media */ $media = $this ->get('ekyna_media.media.repository') ->findOneBy(['path' => $path]) ; if (null === $media) { throw new NotFoundHttpException('Medi...
php
private function findMedia($path) { /** @var \Ekyna\Bundle\MediaBundle\Model\MediaInterface $media */ $media = $this ->get('ekyna_media.media.repository') ->findOneBy(['path' => $path]) ; if (null === $media) { throw new NotFoundHttpException('Medi...
[ "private", "function", "findMedia", "(", "$", "path", ")", "{", "/** @var \\Ekyna\\Bundle\\MediaBundle\\Model\\MediaInterface $media */", "$", "media", "=", "$", "this", "->", "get", "(", "'ekyna_media.media.repository'", ")", "->", "findOneBy", "(", "[", "'path'", "=...
Finds the media by his path. @param string $path @return array @throws NotFoundHttpException
[ "Finds", "the", "media", "by", "his", "path", "." ]
512cf86c801a130a9f17eba8b48d646d23acdbab
https://github.com/ekyna/MediaBundle/blob/512cf86c801a130a9f17eba8b48d646d23acdbab/Controller/MediaController.php#L123-L141
202,942
lightwerk/SurfCaptain
Classes/Lightwerk/SurfCaptain/Package.php
Package.boot
public function boot(\TYPO3\Flow\Core\Bootstrap $bootstrap) { $dispatcher = $bootstrap->getSignalSlotDispatcher(); $dispatcher->connect( 'Lightwerk\SurfCaptain\GitApi\ApiRequest', 'apiCall', 'Lightwerk\SurfCaptain\GitApi\RequestListener', 'saveApiCall'...
php
public function boot(\TYPO3\Flow\Core\Bootstrap $bootstrap) { $dispatcher = $bootstrap->getSignalSlotDispatcher(); $dispatcher->connect( 'Lightwerk\SurfCaptain\GitApi\ApiRequest', 'apiCall', 'Lightwerk\SurfCaptain\GitApi\RequestListener', 'saveApiCall'...
[ "public", "function", "boot", "(", "\\", "TYPO3", "\\", "Flow", "\\", "Core", "\\", "Bootstrap", "$", "bootstrap", ")", "{", "$", "dispatcher", "=", "$", "bootstrap", "->", "getSignalSlotDispatcher", "(", ")", ";", "$", "dispatcher", "->", "connect", "(", ...
Boot the package. We wire some signals to slots here. @param \TYPO3\Flow\Core\Bootstrap $bootstrap The current bootstrap @return void
[ "Boot", "the", "package", ".", "We", "wire", "some", "signals", "to", "slots", "here", "." ]
2865e963fd634504d8923902cf422873749a0940
https://github.com/lightwerk/SurfCaptain/blob/2865e963fd634504d8923902cf422873749a0940/Classes/Lightwerk/SurfCaptain/Package.php#L24-L45
202,943
TeknooSoftware/east-foundation
src/symfony/Listener/KernelListener.php
KernelListener.getPsrRequest
private function getPsrRequest(Request $symfonyRequest): ServerRequestInterface { $psrRequest = $this->diactorosFactory->createRequest($symfonyRequest); $psrRequest = $psrRequest->withAttribute('request', $symfonyRequest); return $psrRequest; }
php
private function getPsrRequest(Request $symfonyRequest): ServerRequestInterface { $psrRequest = $this->diactorosFactory->createRequest($symfonyRequest); $psrRequest = $psrRequest->withAttribute('request', $symfonyRequest); return $psrRequest; }
[ "private", "function", "getPsrRequest", "(", "Request", "$", "symfonyRequest", ")", ":", "ServerRequestInterface", "{", "$", "psrRequest", "=", "$", "this", "->", "diactorosFactory", "->", "createRequest", "(", "$", "symfonyRequest", ")", ";", "$", "psrRequest", ...
To transform a symfony request as a psr request and inject the symfony request as attribute if the endpoint need the symfony request. @param Request $symfonyRequest @return ServerRequestInterface
[ "To", "transform", "a", "symfony", "request", "as", "a", "psr", "request", "and", "inject", "the", "symfony", "request", "as", "attribute", "if", "the", "endpoint", "need", "the", "symfony", "request", "." ]
45ca97c83ba08b973877a472c731f27ca1e82cdf
https://github.com/TeknooSoftware/east-foundation/blob/45ca97c83ba08b973877a472c731f27ca1e82cdf/src/symfony/Listener/KernelListener.php#L88-L94
202,944
wb-crowdfusion/crowdfusion
system/core/classes/mvc/deployment/AbstractFileDeploymentService.php
AbstractFileDeploymentService.deploy
public function deploy() { if (empty($this->context) || empty($this->siteDomain) || empty($this->deviceView) || empty($this->design)) return; $files = null; $md5 = null; $contents = null; $aggregatePath = $this->getAggregatePath(); $this->Logger->debug(...
php
public function deploy() { if (empty($this->context) || empty($this->siteDomain) || empty($this->deviceView) || empty($this->design)) return; $files = null; $md5 = null; $contents = null; $aggregatePath = $this->getAggregatePath(); $this->Logger->debug(...
[ "public", "function", "deploy", "(", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "context", ")", "||", "empty", "(", "$", "this", "->", "siteDomain", ")", "||", "empty", "(", "$", "this", "->", "deviceView", ")", "||", "empty", "(", "$", ...
Aggregates the files if necessary. @return void
[ "Aggregates", "the", "files", "if", "necessary", "." ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/mvc/deployment/AbstractFileDeploymentService.php#L47-L85
202,945
wb-crowdfusion/crowdfusion
system/core/classes/mvc/deployment/AbstractFileDeploymentService.php
AbstractFileDeploymentService.resolveFile
public function resolveFile($name) { $resolvedFilename = $this->getBaseDeployDirectory().$this->subject.'/'.ltrim($name, '/'); return new StorageFacilityFile('/'.ltrim($name, '/'), $resolvedFilename); }
php
public function resolveFile($name) { $resolvedFilename = $this->getBaseDeployDirectory().$this->subject.'/'.ltrim($name, '/'); return new StorageFacilityFile('/'.ltrim($name, '/'), $resolvedFilename); }
[ "public", "function", "resolveFile", "(", "$", "name", ")", "{", "$", "resolvedFilename", "=", "$", "this", "->", "getBaseDeployDirectory", "(", ")", ".", "$", "this", "->", "subject", ".", "'/'", ".", "ltrim", "(", "$", "name", ",", "'/'", ")", ";", ...
Returns the full filename of an existing deployed file with the name specified. If the file does not exist, it returns null. @param string $name The filename to expand (full path) @return StorageFacilityFile
[ "Returns", "the", "full", "filename", "of", "an", "existing", "deployed", "file", "with", "the", "name", "specified", "." ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/mvc/deployment/AbstractFileDeploymentService.php#L208-L212
202,946
wb-crowdfusion/crowdfusion
system/core/classes/mvc/deployment/AbstractFileDeploymentService.php
AbstractFileDeploymentService.getFiles
protected function getFiles() { if ($this->isSiteDeployment) { if ($this->deviceView != 'main' && !is_dir("{$this->viewDirectory}/{$this->context}/{$this->siteDomain}/{$this->deviceView}")) { $this->deviceView = 'main'; } if ($this->design != 'default' &&...
php
protected function getFiles() { if ($this->isSiteDeployment) { if ($this->deviceView != 'main' && !is_dir("{$this->viewDirectory}/{$this->context}/{$this->siteDomain}/{$this->deviceView}")) { $this->deviceView = 'main'; } if ($this->design != 'default' &&...
[ "protected", "function", "getFiles", "(", ")", "{", "if", "(", "$", "this", "->", "isSiteDeployment", ")", "{", "if", "(", "$", "this", "->", "deviceView", "!=", "'main'", "&&", "!", "is_dir", "(", "\"{$this->viewDirectory}/{$this->context}/{$this->siteDomain}/{$t...
Returns a list of all the files in the theme directory combined with all the asset files of all installed plugins @return array Contains 2 items, the first being an array of all the files, the second is a unique md5 identifier of the fileset
[ "Returns", "a", "list", "of", "all", "the", "files", "in", "the", "theme", "directory", "combined", "with", "all", "the", "asset", "files", "of", "all", "installed", "plugins" ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/mvc/deployment/AbstractFileDeploymentService.php#L257-L326
202,947
bseddon/XPath20
DOM/DOMSchemaAttribute.php
DOMSchemaAttribute.fromQName
public static function fromQName( $name ) { if ( $name instanceof QName ) { $name = "{$name->prefix}:{$name->localName}"; } if ( ! is_string( $name ) ) { throw new \InvalidArgumentException( "$name must be string or a QName instanxe" ); } $types = SchemaTypes::getInstance(); $attribu...
php
public static function fromQName( $name ) { if ( $name instanceof QName ) { $name = "{$name->prefix}:{$name->localName}"; } if ( ! is_string( $name ) ) { throw new \InvalidArgumentException( "$name must be string or a QName instanxe" ); } $types = SchemaTypes::getInstance(); $attribu...
[ "public", "static", "function", "fromQName", "(", "$", "name", ")", "{", "if", "(", "$", "name", "instanceof", "QName", ")", "{", "$", "name", "=", "\"{$name->prefix}:{$name->localName}\"", ";", "}", "if", "(", "!", "is_string", "(", "$", "name", ")", ")...
The qualified name of the attribute @param QName|string $name
[ "The", "qualified", "name", "of", "the", "attribute" ]
69882b6efffaa5470a819d5fdd2f6473ddeb046d
https://github.com/bseddon/XPath20/blob/69882b6efffaa5470a819d5fdd2f6473ddeb046d/DOM/DOMSchemaAttribute.php#L51-L73
202,948
AdamB7586/menu-builder
src/Helpers/URI.php
URI.setURI
protected static function setURI($uri){ if(!is_string($uri)){ throw new InvalidArgumentException( '$uri must be a string or null' ); } self::$uri = filter_var($uri, FILTER_SANITIZE_URL); }
php
protected static function setURI($uri){ if(!is_string($uri)){ throw new InvalidArgumentException( '$uri must be a string or null' ); } self::$uri = filter_var($uri, FILTER_SANITIZE_URL); }
[ "protected", "static", "function", "setURI", "(", "$", "uri", ")", "{", "if", "(", "!", "is_string", "(", "$", "uri", ")", ")", "{", "throw", "new", "InvalidArgumentException", "(", "'$uri must be a string or null'", ")", ";", "}", "self", "::", "$", "uri"...
Sets the link URI @param string $uri This should be the link string @throws InvalidArgumentException
[ "Sets", "the", "link", "URI" ]
dbc192bca7d59475068c19d1a07a039e5f997ee4
https://github.com/AdamB7586/menu-builder/blob/dbc192bca7d59475068c19d1a07a039e5f997ee4/src/Helpers/URI.php#L16-L23
202,949
AdamB7586/menu-builder
src/Helpers/URI.php
URI.setAnchorPoint
protected static function setAnchorPoint($anchor){ if(is_string($anchor) && !empty(trim($anchor))){ self::$anchor = '#'.trim($anchor, '#'); } else{ self::$anchor = false; } }
php
protected static function setAnchorPoint($anchor){ if(is_string($anchor) && !empty(trim($anchor))){ self::$anchor = '#'.trim($anchor, '#'); } else{ self::$anchor = false; } }
[ "protected", "static", "function", "setAnchorPoint", "(", "$", "anchor", ")", "{", "if", "(", "is_string", "(", "$", "anchor", ")", "&&", "!", "empty", "(", "trim", "(", "$", "anchor", ")", ")", ")", "{", "self", "::", "$", "anchor", "=", "'#'", "....
Sets the anchor point for the link @param mixed $anchor If the anchor point exists set to the string here
[ "Sets", "the", "anchor", "point", "for", "the", "link" ]
dbc192bca7d59475068c19d1a07a039e5f997ee4
https://github.com/AdamB7586/menu-builder/blob/dbc192bca7d59475068c19d1a07a039e5f997ee4/src/Helpers/URI.php#L37-L44
202,950
AdamB7586/menu-builder
src/Helpers/URI.php
URI.getHref
public static function getHref($link) { self::setURI($link['uri']); self::setAnchorPoint($link['fragment']); return self::getURI().self::getAnchorPoint(); }
php
public static function getHref($link) { self::setURI($link['uri']); self::setAnchorPoint($link['fragment']); return self::getURI().self::getAnchorPoint(); }
[ "public", "static", "function", "getHref", "(", "$", "link", ")", "{", "self", "::", "setURI", "(", "$", "link", "[", "'uri'", "]", ")", ";", "self", "::", "setAnchorPoint", "(", "$", "link", "[", "'fragment'", "]", ")", ";", "return", "self", "::", ...
Returns the correctly formatted link string @param array $link This should be the link information @return mixed Will return the link string if it exists else will return false
[ "Returns", "the", "correctly", "formatted", "link", "string" ]
dbc192bca7d59475068c19d1a07a039e5f997ee4
https://github.com/AdamB7586/menu-builder/blob/dbc192bca7d59475068c19d1a07a039e5f997ee4/src/Helpers/URI.php#L59-L63
202,951
codeblanche/Entity
src/Entity/Definition/PropertyDefinition.php
PropertyDefinition.extractGeneric
protected function extractGeneric($type) { if (empty($type)) { return null; } $generic = null; if (substr($type, -2) === '[]') { $generic = substr($type, 0, -2); } elseif (strtolower(substr($type, 0, 6)) === 'array<' && substr($type, -1) === ...
php
protected function extractGeneric($type) { if (empty($type)) { return null; } $generic = null; if (substr($type, -2) === '[]') { $generic = substr($type, 0, -2); } elseif (strtolower(substr($type, 0, 6)) === 'array<' && substr($type, -1) === ...
[ "protected", "function", "extractGeneric", "(", "$", "type", ")", "{", "if", "(", "empty", "(", "$", "type", ")", ")", "{", "return", "null", ";", "}", "$", "generic", "=", "null", ";", "if", "(", "substr", "(", "$", "type", ",", "-", "2", ")", ...
Extract the generic subtype from the specified type if there is one. @param string $type @return string|null
[ "Extract", "the", "generic", "subtype", "from", "the", "specified", "type", "if", "there", "is", "one", "." ]
1d3839c09d7639ae8bbfc9d2721223202f3a5cdd
https://github.com/codeblanche/Entity/blob/1d3839c09d7639ae8bbfc9d2721223202f3a5cdd/src/Entity/Definition/PropertyDefinition.php#L107-L123
202,952
devlabmtl/haven-core
Lib/NestedSet/Config.php
Config.setClass
public function setClass($clazz) { if($clazz instanceof ClassMetadata) { $classMetadata = $clazz; $classname = $clazz->getReflectionClass()->getName(); } else if (class_exists($clazz)) { $classname = $clazz; $classMetadata = $th...
php
public function setClass($clazz) { if($clazz instanceof ClassMetadata) { $classMetadata = $clazz; $classname = $clazz->getReflectionClass()->getName(); } else if (class_exists($clazz)) { $classname = $clazz; $classMetadata = $th...
[ "public", "function", "setClass", "(", "$", "clazz", ")", "{", "if", "(", "$", "clazz", "instanceof", "ClassMetadata", ")", "{", "$", "classMetadata", "=", "$", "clazz", ";", "$", "classname", "=", "$", "clazz", "->", "getReflectionClass", "(", ")", "->"...
Sets the class associated with this configuration @param mixed $clazz a class name or ClassMetadata object representing the entity class associated with this configuration @return Config $this for fluent API
[ "Sets", "the", "class", "associated", "with", "this", "configuration" ]
f13410f996fd4002efafe482b927adadb211dec8
https://github.com/devlabmtl/haven-core/blob/f13410f996fd4002efafe482b927adadb211dec8/Lib/NestedSet/Config.php#L81-L121
202,953
devlabmtl/haven-core
Lib/NestedSet/Config.php
Config.setBaseQueryBuilder
public function setBaseQueryBuilder(QueryBuilder $baseQueryBuilder=null) { if($baseQueryBuilder === null) { $this->baseQueryBuilder = $this->getDefaultQueryBuilder(); } else { $this->baseQueryBuilder = $baseQueryBuilder; } }
php
public function setBaseQueryBuilder(QueryBuilder $baseQueryBuilder=null) { if($baseQueryBuilder === null) { $this->baseQueryBuilder = $this->getDefaultQueryBuilder(); } else { $this->baseQueryBuilder = $baseQueryBuilder; } }
[ "public", "function", "setBaseQueryBuilder", "(", "QueryBuilder", "$", "baseQueryBuilder", "=", "null", ")", "{", "if", "(", "$", "baseQueryBuilder", "===", "null", ")", "{", "$", "this", "->", "baseQueryBuilder", "=", "$", "this", "->", "getDefaultQueryBuilder"...
sets the base query builder @param Query $baseQueryBuilder or null to reset the base query builder
[ "sets", "the", "base", "query", "builder" ]
f13410f996fd4002efafe482b927adadb211dec8
https://github.com/devlabmtl/haven-core/blob/f13410f996fd4002efafe482b927adadb211dec8/Lib/NestedSet/Config.php#L260-L270
202,954
devlabmtl/haven-core
Lib/NestedSet/Config.php
Config.getDefaultQueryBuilder
public function getDefaultQueryBuilder() { $em = $this->getEntityManager(); return $em->createQueryBuilder() ->select('n') ->from($this->getClassname(), 'n'); }
php
public function getDefaultQueryBuilder() { $em = $this->getEntityManager(); return $em->createQueryBuilder() ->select('n') ->from($this->getClassname(), 'n'); }
[ "public", "function", "getDefaultQueryBuilder", "(", ")", "{", "$", "em", "=", "$", "this", "->", "getEntityManager", "(", ")", ";", "return", "$", "em", "->", "createQueryBuilder", "(", ")", "->", "select", "(", "'n'", ")", "->", "from", "(", "$", "th...
gets the default query builder @return QueryBuilder
[ "gets", "the", "default", "query", "builder" ]
f13410f996fd4002efafe482b927adadb211dec8
https://github.com/devlabmtl/haven-core/blob/f13410f996fd4002efafe482b927adadb211dec8/Lib/NestedSet/Config.php#L287-L293
202,955
cloudtek/dynamodm
lib/Cloudtek/DynamoDM/Schema/Identifier/CompositeIdentifier.php
CompositeIdentifier.addToDocument
protected function addToDocument($document) { parent::addToDocument($document); $this->getRangeKey()->getPropertyMetadata()->setValue( $document, $this->getRangeValue() ); }
php
protected function addToDocument($document) { parent::addToDocument($document); $this->getRangeKey()->getPropertyMetadata()->setValue( $document, $this->getRangeValue() ); }
[ "protected", "function", "addToDocument", "(", "$", "document", ")", "{", "parent", "::", "addToDocument", "(", "$", "document", ")", ";", "$", "this", "->", "getRangeKey", "(", ")", "->", "getPropertyMetadata", "(", ")", "->", "setValue", "(", "$", "docum...
Set this identifier's values on the provided document instance. @param object $document @return void
[ "Set", "this", "identifier", "s", "values", "on", "the", "provided", "document", "instance", "." ]
119d355e2c5cbaef1f867970349b4432f5704fcd
https://github.com/cloudtek/dynamodm/blob/119d355e2c5cbaef1f867970349b4432f5704fcd/lib/Cloudtek/DynamoDM/Schema/Identifier/CompositeIdentifier.php#L62-L70
202,956
cloudtek/dynamodm
lib/Cloudtek/DynamoDM/Schema/Identifier/CompositeIdentifier.php
CompositeIdentifier.getArray
protected function getArray() { $key = $this->getRangeKey()->getPropertyMetadata()->name; $array = parent::getArray(); $array[$key] = $this->getRangeValue(); return $array; }
php
protected function getArray() { $key = $this->getRangeKey()->getPropertyMetadata()->name; $array = parent::getArray(); $array[$key] = $this->getRangeValue(); return $array; }
[ "protected", "function", "getArray", "(", ")", "{", "$", "key", "=", "$", "this", "->", "getRangeKey", "(", ")", "->", "getPropertyMetadata", "(", ")", "->", "name", ";", "$", "array", "=", "parent", "::", "getArray", "(", ")", ";", "$", "array", "["...
Return this identifier's key names and values. Useful for compatibility with Doctrine\Common interfaces. @return array
[ "Return", "this", "identifier", "s", "key", "names", "and", "values", "." ]
119d355e2c5cbaef1f867970349b4432f5704fcd
https://github.com/cloudtek/dynamodm/blob/119d355e2c5cbaef1f867970349b4432f5704fcd/lib/Cloudtek/DynamoDM/Schema/Identifier/CompositeIdentifier.php#L79-L86
202,957
ItalyStrap/config
src/Config/Config.php
Config.push
public function push( string $key, $value ) : self { $this->offsetSet( $key, $value ); return $this; }
php
public function push( string $key, $value ) : self { $this->offsetSet( $key, $value ); return $this; }
[ "public", "function", "push", "(", "string", "$", "key", ",", "$", "value", ")", ":", "self", "{", "$", "this", "->", "offsetSet", "(", "$", "key", ",", "$", "value", ")", ";", "return", "$", "this", ";", "}" ]
Push a configuration in via the key @since 1.0.0 @param string $key Key to be assigned, which also becomes the property @param mixed $value Value to be assigned to the parameter key @return self
[ "Push", "a", "configuration", "in", "via", "the", "key" ]
cb4c163e124a98e0b4af67b10bbbdae6469f7113
https://github.com/ItalyStrap/config/blob/cb4c163e124a98e0b4af67b10bbbdae6469f7113/src/Config/Config.php#L73-L76
202,958
ItalyStrap/config
src/Config/Config.php
Config.remove
public function remove( ...$with_keys ) : self { foreach ( $with_keys as $keys ) { foreach ( (array) $keys as $k ) { $this->offsetUnset( $k ); } } return $this; }
php
public function remove( ...$with_keys ) : self { foreach ( $with_keys as $keys ) { foreach ( (array) $keys as $k ) { $this->offsetUnset( $k ); } } return $this; }
[ "public", "function", "remove", "(", "...", "$", "with_keys", ")", ":", "self", "{", "foreach", "(", "$", "with_keys", "as", "$", "keys", ")", "{", "foreach", "(", "(", "array", ")", "$", "keys", "as", "$", "k", ")", "{", "$", "this", "->", "offs...
Removes an item or multiple items. @since 2.0.0 @param mixed ...$with_keys @return self
[ "Removes", "an", "item", "or", "multiple", "items", "." ]
cb4c163e124a98e0b4af67b10bbbdae6469f7113
https://github.com/ItalyStrap/config/blob/cb4c163e124a98e0b4af67b10bbbdae6469f7113/src/Config/Config.php#L86-L95
202,959
Stinger-Soft/TwigExtensions
src/StingerSoft/TwigExtensions/ArrayExtensions.php
ArrayExtensions.unsetFilter
public function unsetFilter($array, $keys) { if(is_array($array)) { if(!is_array($keys)) { $keys = array( $keys ); } foreach($keys as $key) { if(array_key_exists($key, $array)) { unset($array[$key]); } } } return $array; }
php
public function unsetFilter($array, $keys) { if(is_array($array)) { if(!is_array($keys)) { $keys = array( $keys ); } foreach($keys as $key) { if(array_key_exists($key, $array)) { unset($array[$key]); } } } return $array; }
[ "public", "function", "unsetFilter", "(", "$", "array", ",", "$", "keys", ")", "{", "if", "(", "is_array", "(", "$", "array", ")", ")", "{", "if", "(", "!", "is_array", "(", "$", "keys", ")", ")", "{", "$", "keys", "=", "array", "(", "$", "keys...
Removes an element from the given array @param array $array @param array|string $keys @return array
[ "Removes", "an", "element", "from", "the", "given", "array" ]
7bfce337b0dd33106e22f80b221338451a02d7c5
https://github.com/Stinger-Soft/TwigExtensions/blob/7bfce337b0dd33106e22f80b221338451a02d7c5/src/StingerSoft/TwigExtensions/ArrayExtensions.php#L41-L55
202,960
fridge-project/dbal
src/Fridge/DBAL/Driver/Statement/StatementRewriter.php
StatementRewriter.getRewritedParameters
public function getRewritedParameters($parameter) { if (is_int($parameter)) { return array($parameter); } if (!isset($this->parameters[$parameter])) { throw StatementRewriterException::parameterDoesNotExist($parameter); } return $this->parameters[$pa...
php
public function getRewritedParameters($parameter) { if (is_int($parameter)) { return array($parameter); } if (!isset($this->parameters[$parameter])) { throw StatementRewriterException::parameterDoesNotExist($parameter); } return $this->parameters[$pa...
[ "public", "function", "getRewritedParameters", "(", "$", "parameter", ")", "{", "if", "(", "is_int", "(", "$", "parameter", ")", ")", "{", "return", "array", "(", "$", "parameter", ")", ";", "}", "if", "(", "!", "isset", "(", "$", "this", "->", "para...
Gets the rewrited positional statement parameters according to the named parameter. The metod returns an array because a named parameter can be used multiple times in the statement. @param string $parameter The named parameter. @throws \Fridge\DBAL\Exception\StatementRewriterException If the parameter does not exist...
[ "Gets", "the", "rewrited", "positional", "statement", "parameters", "according", "to", "the", "named", "parameter", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Driver/Statement/StatementRewriter.php#L67-L78
202,961
fridge-project/dbal
src/Fridge/DBAL/Driver/Statement/StatementRewriter.php
StatementRewriter.rewrite
private function rewrite() { // Current positional parameter. $positionalParameter = 1; // TRUE if we are in a literal section else FALSE. $literal = false; // The statement length. $statementLength = strlen($this->statement); // Iterate each statement char...
php
private function rewrite() { // Current positional parameter. $positionalParameter = 1; // TRUE if we are in a literal section else FALSE. $literal = false; // The statement length. $statementLength = strlen($this->statement); // Iterate each statement char...
[ "private", "function", "rewrite", "(", ")", "{", "// Current positional parameter.", "$", "positionalParameter", "=", "1", ";", "// TRUE if we are in a literal section else FALSE.", "$", "literal", "=", "false", ";", "// The statement length.", "$", "statementLength", "=", ...
Rewrite the named statement and parameters to positional. Example: - before: - statement: SELECT * FROM foo WHERE bar = :bar - parameters: array() - after: - statement: SELECT * FROM foo WHERE bar = ? - parameters: array(':bar' => array(1))
[ "Rewrite", "the", "named", "statement", "and", "parameters", "to", "positional", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Driver/Statement/StatementRewriter.php#L91-L143
202,962
fridge-project/dbal
src/Fridge/DBAL/Driver/Statement/StatementRewriter.php
StatementRewriter.isValidPlaceholderCharacter
private function isValidPlaceholderCharacter($character) { $asciiCode = ord($character); return (($asciiCode >= 48) && ($asciiCode <= 57)) || (($asciiCode >= 65) && ($asciiCode <= 90)) || (($asciiCode >= 97) && ($asciiCode <= 122)); }
php
private function isValidPlaceholderCharacter($character) { $asciiCode = ord($character); return (($asciiCode >= 48) && ($asciiCode <= 57)) || (($asciiCode >= 65) && ($asciiCode <= 90)) || (($asciiCode >= 97) && ($asciiCode <= 122)); }
[ "private", "function", "isValidPlaceholderCharacter", "(", "$", "character", ")", "{", "$", "asciiCode", "=", "ord", "(", "$", "character", ")", ";", "return", "(", "(", "$", "asciiCode", ">=", "48", ")", "&&", "(", "$", "asciiCode", "<=", "57", ")", "...
Checks if the character is a valid placeholder character. @param string $character The character to check. @return boolean TRUE if the character is a valid placeholder character else FALSE.
[ "Checks", "if", "the", "character", "is", "a", "valid", "placeholder", "character", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Driver/Statement/StatementRewriter.php#L152-L159
202,963
porkchopsandwiches/silex-utilities
lib/src/PorkChopSandwiches/Silex/Utilities/Arrays.php
Arrays.deepMerge
public function deepMerge (array $mergee, array $merger) { $merged = $mergee; foreach ($merger as $key => &$value) { # If key exists an an array on both sides, deep merge if (array_key_exists($key, $merged) && is_array($value) && is_array($merged[$key])) { $merged[$key] = $this -> deepMerge($merged[$key...
php
public function deepMerge (array $mergee, array $merger) { $merged = $mergee; foreach ($merger as $key => &$value) { # If key exists an an array on both sides, deep merge if (array_key_exists($key, $merged) && is_array($value) && is_array($merged[$key])) { $merged[$key] = $this -> deepMerge($merged[$key...
[ "public", "function", "deepMerge", "(", "array", "$", "mergee", ",", "array", "$", "merger", ")", "{", "$", "merged", "=", "$", "mergee", ";", "foreach", "(", "$", "merger", "as", "$", "key", "=>", "&", "$", "value", ")", "{", "# If key exists an an ar...
Performs an array merge, but when both values for a key are arrays, a deep merge will occur, retaining the unique keys of both without changing the value types. @example $a = array(1 => 2, 3 => array(4 => 5, 6 => 7)); $b = array(3 => array(4 => "Four")); deepMerge($a, $b) == array(1 => 2, 3 => array(4 => "Four", 6 => ...
[ "Performs", "an", "array", "merge", "but", "when", "both", "values", "for", "a", "key", "are", "arrays", "a", "deep", "merge", "will", "occur", "retaining", "the", "unique", "keys", "of", "both", "without", "changing", "the", "value", "types", "." ]
756d041f40c7980b1763c08004f1f405bfc74af6
https://github.com/porkchopsandwiches/silex-utilities/blob/756d041f40c7980b1763c08004f1f405bfc74af6/lib/src/PorkChopSandwiches/Silex/Utilities/Arrays.php#L121-L137
202,964
erenmustafaozdal/laravel-modules-base
src/Controllers/BaseController.php
BaseController.changeOptions
protected function changeOptions($category) { $thumbnails = $category->ancestorsAndSelf()->with('thumbnails')->get()->map(function($item) { return $item->thumbnails->keyBy('slug')->map(function($item) { return [ 'width' => $item->photo_width, 'height' => $item...
php
protected function changeOptions($category) { $thumbnails = $category->ancestorsAndSelf()->with('thumbnails')->get()->map(function($item) { return $item->thumbnails->keyBy('slug')->map(function($item) { return [ 'width' => $item->photo_width, 'height' => $item...
[ "protected", "function", "changeOptions", "(", "$", "category", ")", "{", "$", "thumbnails", "=", "$", "category", "->", "ancestorsAndSelf", "(", ")", "->", "with", "(", "'thumbnails'", ")", "->", "get", "(", ")", "->", "map", "(", "function", "(", "$", ...
change options with model category @param $category @return void
[ "change", "options", "with", "model", "category" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Controllers/BaseController.php#L87-L101
202,965
t3v/t3v_core
Classes/Service/FileService.php
FileService.saveFile
public static function saveFile($file, string $uploadsFolderPath) { if (!empty($file) && is_array($file) && !empty($uploadsFolderPath)) { $fileName = $file['name']; $temporaryFileName = $file['tmp_name']; if (GeneralUtility::verifyFilenameAgainstDenyPattern($fileName)) { $uploads...
php
public static function saveFile($file, string $uploadsFolderPath) { if (!empty($file) && is_array($file) && !empty($uploadsFolderPath)) { $fileName = $file['name']; $temporaryFileName = $file['tmp_name']; if (GeneralUtility::verifyFilenameAgainstDenyPattern($fileName)) { $uploads...
[ "public", "static", "function", "saveFile", "(", "$", "file", ",", "string", "$", "uploadsFolderPath", ")", "{", "if", "(", "!", "empty", "(", "$", "file", ")", "&&", "is_array", "(", "$", "file", ")", "&&", "!", "empty", "(", "$", "uploadsFolderPath",...
Saves a file to an uploads folder. @param object $file The file object @param string $uploadsFolderPath The uploads folder path @return string|null The file name of the saved file or null if the file could not be saved @throws \TYPO3\CMS\Core\Resource\Exception\InvalidFileNameException
[ "Saves", "a", "file", "to", "an", "uploads", "folder", "." ]
8c04b7688cc2773f11fcc87fda3f7cd53d80a980
https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Service/FileService.php#L56-L76
202,966
t3v/t3v_core
Classes/Service/FileService.php
FileService.cleanFileName
public static function cleanFileName(string $fileName, array $rulesets = self::FILE_NAME_RULESETS, string $separator = '-'): string { $slugify = new Slugify(['rulesets' => $rulesets, 'separator' => $separator]); $name = $slugify->slugify(pathinfo($fileName, PATHINFO_FILENAME)); $extension = pathinfo(...
php
public static function cleanFileName(string $fileName, array $rulesets = self::FILE_NAME_RULESETS, string $separator = '-'): string { $slugify = new Slugify(['rulesets' => $rulesets, 'separator' => $separator]); $name = $slugify->slugify(pathinfo($fileName, PATHINFO_FILENAME)); $extension = pathinfo(...
[ "public", "static", "function", "cleanFileName", "(", "string", "$", "fileName", ",", "array", "$", "rulesets", "=", "self", "::", "FILE_NAME_RULESETS", ",", "string", "$", "separator", "=", "'-'", ")", ":", "string", "{", "$", "slugify", "=", "new", "Slug...
Cleans a file name. @param string $fileName The file name @param array $rulesets The optional rulesets, defaults to `FileService::FILE_NAME_RULESETS` @param string $separator The optional separator, defaults to `-` @return string The cleaned file name
[ "Cleans", "a", "file", "name", "." ]
8c04b7688cc2773f11fcc87fda3f7cd53d80a980
https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Service/FileService.php#L96-L106
202,967
t3v/t3v_core
Classes/Service/FileService.php
FileService.normalizeFileName
public static function normalizeFileName(string $fileName, array $rulesets = self::FILE_NAME_RULESETS, string $separator = '-'): string { return self::cleanFileName($fileName, $rulesets, $separator); }
php
public static function normalizeFileName(string $fileName, array $rulesets = self::FILE_NAME_RULESETS, string $separator = '-'): string { return self::cleanFileName($fileName, $rulesets, $separator); }
[ "public", "static", "function", "normalizeFileName", "(", "string", "$", "fileName", ",", "array", "$", "rulesets", "=", "self", "::", "FILE_NAME_RULESETS", ",", "string", "$", "separator", "=", "'-'", ")", ":", "string", "{", "return", "self", "::", "cleanF...
Normalizes a file name, alias for `cleanFileName`. @param string $fileName The file name @param array $rulesets The optional rulesets, defaults to `FileService::FILE_NAME_RULESETS` @param string $separator The optional separator, defaults to `-` @return string The normalized file name
[ "Normalizes", "a", "file", "name", "alias", "for", "cleanFileName", "." ]
8c04b7688cc2773f11fcc87fda3f7cd53d80a980
https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Service/FileService.php#L116-L118
202,968
t3v/t3v_core
Classes/Service/FileService.php
FileService.getUniqueFileName
public static function getUniqueFileName(string $fileName, string $directory): string { $basicFileUtility = GeneralUtility::makeInstance(BasicFileUtility::class); return $basicFileUtility->getUniqueName($fileName, $directory); }
php
public static function getUniqueFileName(string $fileName, string $directory): string { $basicFileUtility = GeneralUtility::makeInstance(BasicFileUtility::class); return $basicFileUtility->getUniqueName($fileName, $directory); }
[ "public", "static", "function", "getUniqueFileName", "(", "string", "$", "fileName", ",", "string", "$", "directory", ")", ":", "string", "{", "$", "basicFileUtility", "=", "GeneralUtility", "::", "makeInstance", "(", "BasicFileUtility", "::", "class", ")", ";",...
Gets an unique file name. @param string $fileName The file name @param string $directory The directory for which to return a unique file name for, MUST be a valid directory and should be absolute @return string The unique file name
[ "Gets", "an", "unique", "file", "name", "." ]
8c04b7688cc2773f11fcc87fda3f7cd53d80a980
https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Service/FileService.php#L127-L131
202,969
sil-project/VarietyBundle
src/Entity/Family.php
Family.addGenus
public function addGenus(\Librinfo\VarietiesBundle\Entity\Genus $genus) { $genus->setFamily($this); $this->genuses->add($genus); return $this; }
php
public function addGenus(\Librinfo\VarietiesBundle\Entity\Genus $genus) { $genus->setFamily($this); $this->genuses->add($genus); return $this; }
[ "public", "function", "addGenus", "(", "\\", "Librinfo", "\\", "VarietiesBundle", "\\", "Entity", "\\", "Genus", "$", "genus", ")", "{", "$", "genus", "->", "setFamily", "(", "$", "this", ")", ";", "$", "this", "->", "genuses", "->", "add", "(", "$", ...
Add genus. @param \Librinfo\VarietiesBundle\Entity\Genus $genus @return Family
[ "Add", "genus", "." ]
e9508ce13a4bb277d10bdcd925fdb84bc01f453f
https://github.com/sil-project/VarietyBundle/blob/e9508ce13a4bb277d10bdcd925fdb84bc01f453f/src/Entity/Family.php#L124-L130
202,970
sil-project/VarietyBundle
src/Entity/Family.php
Family.removeGenus
public function removeGenus(\Librinfo\VarietiesBundle\Entity\Genus $genus) { return $this->genuses->removeElement($genus); }
php
public function removeGenus(\Librinfo\VarietiesBundle\Entity\Genus $genus) { return $this->genuses->removeElement($genus); }
[ "public", "function", "removeGenus", "(", "\\", "Librinfo", "\\", "VarietiesBundle", "\\", "Entity", "\\", "Genus", "$", "genus", ")", "{", "return", "$", "this", "->", "genuses", "->", "removeElement", "(", "$", "genus", ")", ";", "}" ]
Remove genus. @param \Librinfo\VarietiesBundle\Entity\Genus $genus @return bool tRUE if this collection contained the specified element, FALSE otherwise
[ "Remove", "genus", "." ]
e9508ce13a4bb277d10bdcd925fdb84bc01f453f
https://github.com/sil-project/VarietyBundle/blob/e9508ce13a4bb277d10bdcd925fdb84bc01f453f/src/Entity/Family.php#L139-L142
202,971
ringoteam/RingoPhpRedmonBundle
Command/LoggerCommand.php
LoggerCommand.execute
protected function execute(InputInterface $input, OutputInterface $output) { $logger = $this->getContainer()->get('ringo_php_redmon.instance_logger'); $manager = $this->getContainer()->get('ringo_php_redmon.instance_manager'); $instances = $manager->findAll(); if(is_array($i...
php
protected function execute(InputInterface $input, OutputInterface $output) { $logger = $this->getContainer()->get('ringo_php_redmon.instance_logger'); $manager = $this->getContainer()->get('ringo_php_redmon.instance_manager'); $instances = $manager->findAll(); if(is_array($i...
[ "protected", "function", "execute", "(", "InputInterface", "$", "input", ",", "OutputInterface", "$", "output", ")", "{", "$", "logger", "=", "$", "this", "->", "getContainer", "(", ")", "->", "get", "(", "'ringo_php_redmon.instance_logger'", ")", ";", "$", ...
Execute task Get all redis instances and log some of infos @param \Symfony\Component\Console\Input\InputInterface $input @param \Symfony\Component\Console\Output\OutputInterface $output
[ "Execute", "task", "Get", "all", "redis", "instances", "and", "log", "some", "of", "infos" ]
9aab989a9bee9e6152ec19f8a30bc24f3bde6012
https://github.com/ringoteam/RingoPhpRedmonBundle/blob/9aab989a9bee9e6152ec19f8a30bc24f3bde6012/Command/LoggerCommand.php#L45-L58
202,972
wb-crowdfusion/crowdfusion
system/core/classes/libraries/utils/FileSystemUtils.php
FileSystemUtils.createWorkingDirectory
public static function createWorkingDirectory() { $workdir = sys_get_temp_dir() . '/tmp-' . session_id() . '/'; self::recursiveMkdir($workdir, 0777); //@chmod($workdir,0777); if (!is_dir($workdir)) { throw new Exception("cannot create directory: " . $workdir); }...
php
public static function createWorkingDirectory() { $workdir = sys_get_temp_dir() . '/tmp-' . session_id() . '/'; self::recursiveMkdir($workdir, 0777); //@chmod($workdir,0777); if (!is_dir($workdir)) { throw new Exception("cannot create directory: " . $workdir); }...
[ "public", "static", "function", "createWorkingDirectory", "(", ")", "{", "$", "workdir", "=", "sys_get_temp_dir", "(", ")", ".", "'/tmp-'", ".", "session_id", "(", ")", ".", "'/'", ";", "self", "::", "recursiveMkdir", "(", "$", "workdir", ",", "0777", ")",...
Creates a unique temporary directory and returns the absolute path @return string the absolute path to the temporary directory
[ "Creates", "a", "unique", "temporary", "directory", "and", "returns", "the", "absolute", "path" ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/libraries/utils/FileSystemUtils.php#L973-L985
202,973
wb-crowdfusion/crowdfusion
system/core/classes/libraries/utils/FileSystemUtils.php
FileSystemUtils.recursiveRmdir
public static function recursiveRmdir($path, $removeParent = true) { if (!file_exists($path)) return true; if (!is_dir($path)) return @unlink($path); $objects = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::CHILD_FIR...
php
public static function recursiveRmdir($path, $removeParent = true) { if (!file_exists($path)) return true; if (!is_dir($path)) return @unlink($path); $objects = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::CHILD_FIR...
[ "public", "static", "function", "recursiveRmdir", "(", "$", "path", ",", "$", "removeParent", "=", "true", ")", "{", "if", "(", "!", "file_exists", "(", "$", "path", ")", ")", "return", "true", ";", "if", "(", "!", "is_dir", "(", "$", "path", ")", ...
Recursively remove a directory and its contents. @param string $path The directory to remove @param boolean $removeParent If false, then remove only the contents of the directory at $path. Default: true @return boolean true on success
[ "Recursively", "remove", "a", "directory", "and", "its", "contents", "." ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/libraries/utils/FileSystemUtils.php#L1089-L1112
202,974
wb-crowdfusion/crowdfusion
system/core/classes/libraries/utils/FileSystemUtils.php
FileSystemUtils.secureTmpname
public static function secureTmpname($dir = null, $prefix = 'tmp', $postfix = '.tmp') { // validate arguments if (!(isset ($postfix) && is_string($postfix))) return false; if (!(isset ($prefix) && is_string($prefix))) return false; if (!isset ($dir)) ...
php
public static function secureTmpname($dir = null, $prefix = 'tmp', $postfix = '.tmp') { // validate arguments if (!(isset ($postfix) && is_string($postfix))) return false; if (!(isset ($prefix) && is_string($prefix))) return false; if (!isset ($dir)) ...
[ "public", "static", "function", "secureTmpname", "(", "$", "dir", "=", "null", ",", "$", "prefix", "=", "'tmp'", ",", "$", "postfix", "=", "'.tmp'", ")", "{", "// validate arguments", "if", "(", "!", "(", "isset", "(", "$", "postfix", ")", "&&", "is_st...
Creates a temp file with a specific extension. Creating a temporary file with a specific extension is a common requirement on dynamic websites. Largely this need arises from Microsoft browsers that identify a downloaded file's mimetype based on the file's extension. No single PHP function creates a temporary filename...
[ "Creates", "a", "temp", "file", "with", "a", "specific", "extension", "." ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/libraries/utils/FileSystemUtils.php#L1138-L1174
202,975
niels-nijens/protocol-stream
src/StreamManager.php
StreamManager.registerStream
public function registerStream(StreamInterface $stream, $replaceWrapper = false) { $protocol = $stream->getProtocol(); if ($replaceWrapper === true && in_array($protocol, stream_get_wrappers())) { stream_wrapper_unregister($protocol); } if (stream_wrapper_register($proto...
php
public function registerStream(StreamInterface $stream, $replaceWrapper = false) { $protocol = $stream->getProtocol(); if ($replaceWrapper === true && in_array($protocol, stream_get_wrappers())) { stream_wrapper_unregister($protocol); } if (stream_wrapper_register($proto...
[ "public", "function", "registerStream", "(", "StreamInterface", "$", "stream", ",", "$", "replaceWrapper", "=", "false", ")", "{", "$", "protocol", "=", "$", "stream", "->", "getProtocol", "(", ")", ";", "if", "(", "$", "replaceWrapper", "===", "true", "&&...
Registers stream instance for a protocol. @param StreamInterface $stream @param bool $replaceWrapper @return self
[ "Registers", "stream", "instance", "for", "a", "protocol", "." ]
c45b8d282bbb83f2a3d17adeb1d66500c14a868c
https://github.com/niels-nijens/protocol-stream/blob/c45b8d282bbb83f2a3d17adeb1d66500c14a868c/src/StreamManager.php#L39-L51
202,976
niels-nijens/protocol-stream
src/StreamManager.php
StreamManager.unregisterStream
public function unregisterStream($protocol) { if (isset(self::$streams[$protocol])) { $result = stream_wrapper_unregister($protocol); if ($result === true) { unset(self::$streams[$protocol]); } } return $this; }
php
public function unregisterStream($protocol) { if (isset(self::$streams[$protocol])) { $result = stream_wrapper_unregister($protocol); if ($result === true) { unset(self::$streams[$protocol]); } } return $this; }
[ "public", "function", "unregisterStream", "(", "$", "protocol", ")", "{", "if", "(", "isset", "(", "self", "::", "$", "streams", "[", "$", "protocol", "]", ")", ")", "{", "$", "result", "=", "stream_wrapper_unregister", "(", "$", "protocol", ")", ";", ...
Unregisters a stream instance by protocol. @param string $protocol @return self
[ "Unregisters", "a", "stream", "instance", "by", "protocol", "." ]
c45b8d282bbb83f2a3d17adeb1d66500c14a868c
https://github.com/niels-nijens/protocol-stream/blob/c45b8d282bbb83f2a3d17adeb1d66500c14a868c/src/StreamManager.php#L60-L70
202,977
kkthek/diqa-util
src/Util/FileLinkUtils.php
FileLinkUtils.ImageOverlayLinkBegin
public static function ImageOverlayLinkBegin($dummy, \Title $target, &$text, &$customAttribs, &$query, &$options, &$ret) { global $wgDIQAImageOverlayWhitelist; global $wgDIQADownloadWhitelist; if (!self::isImage($target->mNamespace)) { // don't rewrite links not pointing to images ...
php
public static function ImageOverlayLinkBegin($dummy, \Title $target, &$text, &$customAttribs, &$query, &$options, &$ret) { global $wgDIQAImageOverlayWhitelist; global $wgDIQADownloadWhitelist; if (!self::isImage($target->mNamespace)) { // don't rewrite links not pointing to images ...
[ "public", "static", "function", "ImageOverlayLinkBegin", "(", "$", "dummy", ",", "\\", "Title", "$", "target", ",", "&", "$", "text", ",", "&", "$", "customAttribs", ",", "&", "$", "query", ",", "&", "$", "options", ",", "&", "$", "ret", ")", "{", ...
Rewrites links to images in order to open them into a overlay @param unknown $dummy @param \Title $target @param unknown $text @param unknown $customAttribs @param unknown $query @param unknown $options @param unknown $ret @return boolean
[ "Rewrites", "links", "to", "images", "in", "order", "to", "open", "them", "into", "a", "overlay" ]
df35d16403b5dbf0f7570daded6cfa26814ae7e0
https://github.com/kkthek/diqa-util/blob/df35d16403b5dbf0f7570daded6cfa26814ae7e0/src/Util/FileLinkUtils.php#L29-L65
202,978
story75/Raptor
src/CommandProxyGenerator.php
CommandProxyGenerator.generateCommandProxy
public function generateCommandProxy($className) { $classMeta = $this->reflectionService->getClassMetaReflection($className); $proxies = []; $cachePath = $this->getRaptorCachePath(); $this->createDirectory($cachePath); $thisNode = new Variable('this'); foreach ($cla...
php
public function generateCommandProxy($className) { $classMeta = $this->reflectionService->getClassMetaReflection($className); $proxies = []; $cachePath = $this->getRaptorCachePath(); $this->createDirectory($cachePath); $thisNode = new Variable('this'); foreach ($cla...
[ "public", "function", "generateCommandProxy", "(", "$", "className", ")", "{", "$", "classMeta", "=", "$", "this", "->", "reflectionService", "->", "getClassMetaReflection", "(", "$", "className", ")", ";", "$", "proxies", "=", "[", "]", ";", "$", "cachePath...
Entry point to create proxies of a bonefish command class @param string $className @return array
[ "Entry", "point", "to", "create", "proxies", "of", "a", "bonefish", "command", "class" ]
e62e9e56be9d7b8ad16971b628c4c77ff4448d77
https://github.com/story75/Raptor/blob/e62e9e56be9d7b8ad16971b628c4c77ff4448d77/src/CommandProxyGenerator.php#L95-L116
202,979
story75/Raptor
src/CommandProxyGenerator.php
CommandProxyGenerator.getCommandName
protected function getCommandName($methodMeta, $classMeta) { $nameSpaceParts = explode('\\', $classMeta->getNamespace()); $vendor = $nameSpaceParts[0]; $package = $nameSpaceParts[1]; return strtolower($vendor . ':' . $package . ':' . str_replace(self::COMMAND_SUFFIX, '', $methodMeta...
php
protected function getCommandName($methodMeta, $classMeta) { $nameSpaceParts = explode('\\', $classMeta->getNamespace()); $vendor = $nameSpaceParts[0]; $package = $nameSpaceParts[1]; return strtolower($vendor . ':' . $package . ':' . str_replace(self::COMMAND_SUFFIX, '', $methodMeta...
[ "protected", "function", "getCommandName", "(", "$", "methodMeta", ",", "$", "classMeta", ")", "{", "$", "nameSpaceParts", "=", "explode", "(", "'\\\\'", ",", "$", "classMeta", "->", "getNamespace", "(", ")", ")", ";", "$", "vendor", "=", "$", "nameSpacePa...
Create a unique command name @param MethodMeta $methodMeta @param ClassMeta $classMeta @return string
[ "Create", "a", "unique", "command", "name" ]
e62e9e56be9d7b8ad16971b628c4c77ff4448d77
https://github.com/story75/Raptor/blob/e62e9e56be9d7b8ad16971b628c4c77ff4448d77/src/CommandProxyGenerator.php#L125-L132
202,980
naucon/Utility
src/IteratorReverseAbstract.php
IteratorReverseAbstract.next
public function next() { $this->_itemValid = true; if (!prev($this->_items)) { // no next item $this->_itemValid = false; } else { $this->_itemPosition--; } }
php
public function next() { $this->_itemValid = true; if (!prev($this->_items)) { // no next item $this->_itemValid = false; } else { $this->_itemPosition--; } }
[ "public", "function", "next", "(", ")", "{", "$", "this", "->", "_itemValid", "=", "true", ";", "if", "(", "!", "prev", "(", "$", "this", "->", "_items", ")", ")", "{", "// no next item", "$", "this", "->", "_itemValid", "=", "false", ";", "}", "el...
set next item to current item @return void
[ "set", "next", "item", "to", "current", "item" ]
d225bb5d09d82400917f710c9d502949a66442c4
https://github.com/naucon/Utility/blob/d225bb5d09d82400917f710c9d502949a66442c4/src/IteratorReverseAbstract.php#L74-L84
202,981
Weblab-nl/restclient
src/Adapters/OAuth.php
OAuth.fetchAccessToken
private function fetchAccessToken() { // Setup the params $params = [ 'client_id' => $this->clientID, 'client_secret' => $this->secret, 'grant_type' => 'authorization_code', 'code' => $this->requestToken ]; if (isset($this-...
php
private function fetchAccessToken() { // Setup the params $params = [ 'client_id' => $this->clientID, 'client_secret' => $this->secret, 'grant_type' => 'authorization_code', 'code' => $this->requestToken ]; if (isset($this-...
[ "private", "function", "fetchAccessToken", "(", ")", "{", "// Setup the params", "$", "params", "=", "[", "'client_id'", "=>", "$", "this", "->", "clientID", ",", "'client_secret'", "=>", "$", "this", "->", "secret", ",", "'grant_type'", "=>", "'authorization_co...
Does a cURL to request a new access token @throws \Exception
[ "Does", "a", "cURL", "to", "request", "a", "new", "access", "token" ]
6bc4e7890580b7b31e78032e40be5a67122b0dd0
https://github.com/Weblab-nl/restclient/blob/6bc4e7890580b7b31e78032e40be5a67122b0dd0/src/Adapters/OAuth.php#L223-L238
202,982
Weblab-nl/restclient
src/Adapters/OAuth.php
OAuth.refreshAccessToken
private function refreshAccessToken() { // Setup the params $params = [ 'client_id' => $this->clientID, 'client_secret' => $this->secret, 'grant_type' => 'refresh_token', 'refresh_token' => $this->refreshToken ]; // Parse the cURL r...
php
private function refreshAccessToken() { // Setup the params $params = [ 'client_id' => $this->clientID, 'client_secret' => $this->secret, 'grant_type' => 'refresh_token', 'refresh_token' => $this->refreshToken ]; // Parse the cURL r...
[ "private", "function", "refreshAccessToken", "(", ")", "{", "// Setup the params", "$", "params", "=", "[", "'client_id'", "=>", "$", "this", "->", "clientID", ",", "'client_secret'", "=>", "$", "this", "->", "secret", ",", "'grant_type'", "=>", "'refresh_token'...
Refreshes the access token @throws \Exception
[ "Refreshes", "the", "access", "token" ]
6bc4e7890580b7b31e78032e40be5a67122b0dd0
https://github.com/Weblab-nl/restclient/blob/6bc4e7890580b7b31e78032e40be5a67122b0dd0/src/Adapters/OAuth.php#L245-L256
202,983
Weblab-nl/restclient
src/Adapters/OAuth.php
OAuth.processRequestToken
public function processRequestToken($token) { // Setup the params $params = [ 'client_id' => $this->clientID, 'client_secret' => $this->secret, 'code' => $token, 'grant_type' => 'authorization_code', 'redirect_uri' => $this->re...
php
public function processRequestToken($token) { // Setup the params $params = [ 'client_id' => $this->clientID, 'client_secret' => $this->secret, 'code' => $token, 'grant_type' => 'authorization_code', 'redirect_uri' => $this->re...
[ "public", "function", "processRequestToken", "(", "$", "token", ")", "{", "// Setup the params", "$", "params", "=", "[", "'client_id'", "=>", "$", "this", "->", "clientID", ",", "'client_secret'", "=>", "$", "this", "->", "secret", ",", "'code'", "=>", "$",...
Convert a request token to an access token @param string $token @return mixed
[ "Convert", "a", "request", "token", "to", "an", "access", "token" ]
6bc4e7890580b7b31e78032e40be5a67122b0dd0
https://github.com/Weblab-nl/restclient/blob/6bc4e7890580b7b31e78032e40be5a67122b0dd0/src/Adapters/OAuth.php#L291-L303
202,984
Dev4Media/ngnfeed-ebay
src/D4m/NgnFeed/Ebay/Serializer/Normalizer/GetSetMethodNormalizer.php
GetSetMethodNormalizer.setCallbacks
public function setCallbacks(array $callbacks) { foreach ($callbacks as $attribute => $callback) { if (!is_callable($callback)) { throw new \InvalidArgumentException(sprintf('The given callback for attribute "%s" is not callable.', $attribute)); } } $t...
php
public function setCallbacks(array $callbacks) { foreach ($callbacks as $attribute => $callback) { if (!is_callable($callback)) { throw new \InvalidArgumentException(sprintf('The given callback for attribute "%s" is not callable.', $attribute)); } } $t...
[ "public", "function", "setCallbacks", "(", "array", "$", "callbacks", ")", "{", "foreach", "(", "$", "callbacks", "as", "$", "attribute", "=>", "$", "callback", ")", "{", "if", "(", "!", "is_callable", "(", "$", "callback", ")", ")", "{", "throw", "new...
Set normalization callbacks @param array $callbacks help normalize the result @throws InvalidArgumentException if a non-callable callback is set
[ "Set", "normalization", "callbacks" ]
fb9652e30c7e4823a4e4dd571f41c8839953e72c
https://github.com/Dev4Media/ngnfeed-ebay/blob/fb9652e30c7e4823a4e4dd571f41c8839953e72c/src/D4m/NgnFeed/Ebay/Serializer/Normalizer/GetSetMethodNormalizer.php#L30-L38
202,985
Dev4Media/ngnfeed-ebay
src/D4m/NgnFeed/Ebay/Serializer/Normalizer/GetSetMethodNormalizer.php
GetSetMethodNormalizer.formatAttribute
protected function formatAttribute($attributeName) { if (in_array($attributeName, $this->camelizedAttributes)) { return preg_replace_callback( '/(^|_|\.)+(.)/', function ($match) { return ('.' === $match[1] ? '_' : '').strtoupper($match[2]); },...
php
protected function formatAttribute($attributeName) { if (in_array($attributeName, $this->camelizedAttributes)) { return preg_replace_callback( '/(^|_|\.)+(.)/', function ($match) { return ('.' === $match[1] ? '_' : '').strtoupper($match[2]); },...
[ "protected", "function", "formatAttribute", "(", "$", "attributeName", ")", "{", "if", "(", "in_array", "(", "$", "attributeName", ",", "$", "this", "->", "camelizedAttributes", ")", ")", "{", "return", "preg_replace_callback", "(", "'/(^|_|\\.)+(.)/'", ",", "fu...
Format attribute name to access parameters or methods As option, if attribute name is found on camelizedAttributes array returns attribute name in camelcase format @param string $attributeName @return string
[ "Format", "attribute", "name", "to", "access", "parameters", "or", "methods", "As", "option", "if", "attribute", "name", "is", "found", "on", "camelizedAttributes", "array", "returns", "attribute", "name", "in", "camelcase", "format" ]
fb9652e30c7e4823a4e4dd571f41c8839953e72c
https://github.com/Dev4Media/ngnfeed-ebay/blob/fb9652e30c7e4823a4e4dd571f41c8839953e72c/src/D4m/NgnFeed/Ebay/Serializer/Normalizer/GetSetMethodNormalizer.php#L174-L185
202,986
realboard/DBInstance
src/Realboard/Component/Database/DBInstance/Service/RestServiceHandler.php
RestServiceHandler.getServerVersion
public function getServerVersion() { $di = new DBInstance($this->rawConfig); $version = $di->getServerVersion(); unset($di); return array( 'version' => $version, ); }
php
public function getServerVersion() { $di = new DBInstance($this->rawConfig); $version = $di->getServerVersion(); unset($di); return array( 'version' => $version, ); }
[ "public", "function", "getServerVersion", "(", ")", "{", "$", "di", "=", "new", "DBInstance", "(", "$", "this", "->", "rawConfig", ")", ";", "$", "version", "=", "$", "di", "->", "getServerVersion", "(", ")", ";", "unset", "(", "$", "di", ")", ";", ...
Get DBInstance database version. @return array
[ "Get", "DBInstance", "database", "version", "." ]
f2cde7fdf480d5eb5a491a5cf81ff7f4b3be0a35
https://github.com/realboard/DBInstance/blob/f2cde7fdf480d5eb5a491a5cf81ff7f4b3be0a35/src/Realboard/Component/Database/DBInstance/Service/RestServiceHandler.php#L132-L141
202,987
nilstr/Flash-Messages-for-Anax-MVC
src/FlashMessages/FlashMessages.php
FlashMessages.message
public function message($type, $message) { if ( $this->session->has('flashMessages') ) { $flashMessages = $this->session->get('flashMessages'); $flashMessages[] = ['type' => $type, 'message' => $message]; $this->session->set('flashMessages', $flashMessages); } els...
php
public function message($type, $message) { if ( $this->session->has('flashMessages') ) { $flashMessages = $this->session->get('flashMessages'); $flashMessages[] = ['type' => $type, 'message' => $message]; $this->session->set('flashMessages', $flashMessages); } els...
[ "public", "function", "message", "(", "$", "type", ",", "$", "message", ")", "{", "if", "(", "$", "this", "->", "session", "->", "has", "(", "'flashMessages'", ")", ")", "{", "$", "flashMessages", "=", "$", "this", "->", "session", "->", "get", "(", ...
Saves the message in the session. @param string $type The type of flash message. Will be the class of the output div. @param string $message The message to output. @return void
[ "Saves", "the", "message", "in", "the", "session", "." ]
7129241dd72a91eb0fcfe0e1d25144692334230c
https://github.com/nilstr/Flash-Messages-for-Anax-MVC/blob/7129241dd72a91eb0fcfe0e1d25144692334230c/src/FlashMessages/FlashMessages.php#L66-L75
202,988
nilstr/Flash-Messages-for-Anax-MVC
src/FlashMessages/FlashMessages.php
FlashMessages.output
public function output() { if ( $this->session->has('flashMessages') ) { $flashMessages = $this->session->get('flashMessages'); $this->session->set('flashMessages', []); $html = null; foreach ($flashMessages as $message) { $html .= "<div class=...
php
public function output() { if ( $this->session->has('flashMessages') ) { $flashMessages = $this->session->get('flashMessages'); $this->session->set('flashMessages', []); $html = null; foreach ($flashMessages as $message) { $html .= "<div class=...
[ "public", "function", "output", "(", ")", "{", "if", "(", "$", "this", "->", "session", "->", "has", "(", "'flashMessages'", ")", ")", "{", "$", "flashMessages", "=", "$", "this", "->", "session", "->", "get", "(", "'flashMessages'", ")", ";", "$", "...
Gets and resets the flash messages from session and building html. @return string The html for the output.
[ "Gets", "and", "resets", "the", "flash", "messages", "from", "session", "and", "building", "html", "." ]
7129241dd72a91eb0fcfe0e1d25144692334230c
https://github.com/nilstr/Flash-Messages-for-Anax-MVC/blob/7129241dd72a91eb0fcfe0e1d25144692334230c/src/FlashMessages/FlashMessages.php#L83-L94
202,989
mamasu/mama-log
src/log/Log.php
Log.elapsedTime
public function elapsedTime() { $currentTime = microtime(true); if ($this->startTime === null) { $this->startTime = $currentTime; $this->finishTime = $currentTime; } else { $this->finishTime = $currentTime; $this->ela...
php
public function elapsedTime() { $currentTime = microtime(true); if ($this->startTime === null) { $this->startTime = $currentTime; $this->finishTime = $currentTime; } else { $this->finishTime = $currentTime; $this->ela...
[ "public", "function", "elapsedTime", "(", ")", "{", "$", "currentTime", "=", "microtime", "(", "true", ")", ";", "if", "(", "$", "this", "->", "startTime", "===", "null", ")", "{", "$", "this", "->", "startTime", "=", "$", "currentTime", ";", "$", "t...
Calculated the different time of the log line.
[ "Calculated", "the", "different", "time", "of", "the", "log", "line", "." ]
86431258fc42a3f364af2d959382d43c2a2dd3a0
https://github.com/mamasu/mama-log/blob/86431258fc42a3f364af2d959382d43c2a2dd3a0/src/log/Log.php#L54-L63
202,990
jmfeurprier/perf-caching
lib/perf/Caching/CacheClient.php
CacheClient.store
public function store($id, $data, $maxLifetimeSeconds = null) { $creationTimestamp = time(); if (null === $maxLifetimeSeconds) { $expirationTimestamp = null; } else { $expirationTimestamp = ($creationTimestamp + (int) $maxLifetimeSeconds); } $entry =...
php
public function store($id, $data, $maxLifetimeSeconds = null) { $creationTimestamp = time(); if (null === $maxLifetimeSeconds) { $expirationTimestamp = null; } else { $expirationTimestamp = ($creationTimestamp + (int) $maxLifetimeSeconds); } $entry =...
[ "public", "function", "store", "(", "$", "id", ",", "$", "data", ",", "$", "maxLifetimeSeconds", "=", "null", ")", "{", "$", "creationTimestamp", "=", "time", "(", ")", ";", "if", "(", "null", "===", "$", "maxLifetimeSeconds", ")", "{", "$", "expiratio...
Attempts to store provided content into cache. Cache file will hold creation and expiration timestamps, and provided content. @param mixed $id Cache item unique identifier (ex: 123). @param mixed $data Content to be added to cache. @param null|int $maxLifetimeSeconds (Optional) duration in seconds after which cache fi...
[ "Attempts", "to", "store", "provided", "content", "into", "cache", ".", "Cache", "file", "will", "hold", "creation", "and", "expiration", "timestamps", "and", "provided", "content", "." ]
16cf61dae3aa4d6dcb8722e14760934457087173
https://github.com/jmfeurprier/perf-caching/blob/16cf61dae3aa4d6dcb8722e14760934457087173/lib/perf/Caching/CacheClient.php#L62-L77
202,991
jmfeurprier/perf-caching
lib/perf/Caching/CacheClient.php
CacheClient.tryFetch
public function tryFetch($id, $maxLifetimeSeconds = null) { $entry = $this->storage->tryFetch($id); if (null === $entry) { return null; } if (null !== $maxLifetimeSeconds) { if (($this->nowTimestamp - $entry->creationTimestamp()) > $maxLifetimeSeconds) { ...
php
public function tryFetch($id, $maxLifetimeSeconds = null) { $entry = $this->storage->tryFetch($id); if (null === $entry) { return null; } if (null !== $maxLifetimeSeconds) { if (($this->nowTimestamp - $entry->creationTimestamp()) > $maxLifetimeSeconds) { ...
[ "public", "function", "tryFetch", "(", "$", "id", ",", "$", "maxLifetimeSeconds", "=", "null", ")", "{", "$", "entry", "=", "$", "this", "->", "storage", "->", "tryFetch", "(", "$", "id", ")", ";", "if", "(", "null", "===", "$", "entry", ")", "{", ...
Attempts to retrieve data from cache. @param mixed $id Cache entry unique identifier (ex: "123"). @param null|int $maxLifetimeSeconds Duration in seconds. If provided, will bypass expiration timestamp in cache file, using creation timestamp + provided duration to check whether cached content has expired or not. @retur...
[ "Attempts", "to", "retrieve", "data", "from", "cache", "." ]
16cf61dae3aa4d6dcb8722e14760934457087173
https://github.com/jmfeurprier/perf-caching/blob/16cf61dae3aa4d6dcb8722e14760934457087173/lib/perf/Caching/CacheClient.php#L88-L109
202,992
silverorange/Concentrate
Concentrate/Concentrator.php
Concentrate_Concentrator.getDependsInfo
public function getDependsInfo() { $dependsInfo = $this->getCachedValue('dependsInfo'); if ($dependsInfo === false) { $data = $this->dataProvider->getData(); $dependsInfo = array(); foreach ($this->getPackageSortOrder() as $packageId => $order) { ...
php
public function getDependsInfo() { $dependsInfo = $this->getCachedValue('dependsInfo'); if ($dependsInfo === false) { $data = $this->dataProvider->getData(); $dependsInfo = array(); foreach ($this->getPackageSortOrder() as $packageId => $order) { ...
[ "public", "function", "getDependsInfo", "(", ")", "{", "$", "dependsInfo", "=", "$", "this", "->", "getCachedValue", "(", "'dependsInfo'", ")", ";", "if", "(", "$", "dependsInfo", "===", "false", ")", "{", "$", "data", "=", "$", "this", "->", "dataProvid...
Gets a flat list of file dependencies for each file @return array
[ "Gets", "a", "flat", "list", "of", "file", "dependencies", "for", "each", "file" ]
e0b679bedc105dc4280bb68a233c31246d20e6c5
https://github.com/silverorange/Concentrate/blob/e0b679bedc105dc4280bb68a233c31246d20e6c5/Concentrate/Concentrator.php#L454-L494
202,993
freialib/freia.autoloader
src/SymbolLoader.php
SymbolLoader.instance
static function instance($syspath, $conf) { $i = new static; $i->env = $i->environementInstance($syspath, $conf); return $i; }
php
static function instance($syspath, $conf) { $i = new static; $i->env = $i->environementInstance($syspath, $conf); return $i; }
[ "static", "function", "instance", "(", "$", "syspath", ",", "$", "conf", ")", "{", "$", "i", "=", "new", "static", ";", "$", "i", "->", "env", "=", "$", "i", "->", "environementInstance", "(", "$", "syspath", ",", "$", "conf", ")", ";", "return", ...
You may set debugMode to true to use debug modules, otherwise if modules with a debug type in the autoload rules section are found they will be ignored. @return static
[ "You", "may", "set", "debugMode", "to", "true", "to", "use", "debug", "modules", "otherwise", "if", "modules", "with", "a", "debug", "type", "in", "the", "autoload", "rules", "section", "are", "found", "they", "will", "be", "ignored", "." ]
45e0dfcd56d55cf533f12255db647e8a05fcd494
https://github.com/freialib/freia.autoloader/blob/45e0dfcd56d55cf533f12255db647e8a05fcd494/src/SymbolLoader.php#L24-L29
202,994
freialib/freia.autoloader
src/SymbolLoader.php
SymbolLoader.exists
function exists($symbol, $autoload = false) { return class_exists($symbol, $autoload) || interface_exists($symbol, $autoload) || trait_exists($symbol, $autoload); }
php
function exists($symbol, $autoload = false) { return class_exists($symbol, $autoload) || interface_exists($symbol, $autoload) || trait_exists($symbol, $autoload); }
[ "function", "exists", "(", "$", "symbol", ",", "$", "autoload", "=", "false", ")", "{", "return", "class_exists", "(", "$", "symbol", ",", "$", "autoload", ")", "||", "interface_exists", "(", "$", "symbol", ",", "$", "autoload", ")", "||", "trait_exists"...
Maintained for backwards comaptibility. @param string symbol (class, interface, traits, etc) @param boolean autoload while checking? @return boolean symbol exists
[ "Maintained", "for", "backwards", "comaptibility", "." ]
45e0dfcd56d55cf533f12255db647e8a05fcd494
https://github.com/freialib/freia.autoloader/blob/45e0dfcd56d55cf533f12255db647e8a05fcd494/src/SymbolLoader.php#L48-L52
202,995
freialib/freia.autoloader
src/SymbolLoader.php
SymbolLoader.load
function load($symbol) { if ($this->env->knownUnknown($symbol)) { return false; } if ($this->env->autoresolve($symbol)) { return true; } $ns_pos = \strripos($symbol, '\\'); if ($ns_pos !== false && $ns_pos != 0) { $ns = \substr($symbol, 0, $ns_pos + 1); // Validate Main Segment // ======...
php
function load($symbol) { if ($this->env->knownUnknown($symbol)) { return false; } if ($this->env->autoresolve($symbol)) { return true; } $ns_pos = \strripos($symbol, '\\'); if ($ns_pos !== false && $ns_pos != 0) { $ns = \substr($symbol, 0, $ns_pos + 1); // Validate Main Segment // ======...
[ "function", "load", "(", "$", "symbol", ")", "{", "if", "(", "$", "this", "->", "env", "->", "knownUnknown", "(", "$", "symbol", ")", ")", "{", "return", "false", ";", "}", "if", "(", "$", "this", "->", "env", "->", "autoresolve", "(", "$", "symb...
Load given symbol @return boolean
[ "Load", "given", "symbol" ]
45e0dfcd56d55cf533f12255db647e8a05fcd494
https://github.com/freialib/freia.autoloader/blob/45e0dfcd56d55cf533f12255db647e8a05fcd494/src/SymbolLoader.php#L59-L141
202,996
Wedeto/HTTP
src/CachePolicy.php
CachePolicy.setExpireDate
public function setExpireDate(DateTimeInterface $dt) { $this->expire_time = (int)$dt->format('U') - time(); return $this; }
php
public function setExpireDate(DateTimeInterface $dt) { $this->expire_time = (int)$dt->format('U') - time(); return $this; }
[ "public", "function", "setExpireDate", "(", "DateTimeInterface", "$", "dt", ")", "{", "$", "this", "->", "expire_time", "=", "(", "int", ")", "$", "dt", "->", "format", "(", "'U'", ")", "-", "time", "(", ")", ";", "return", "$", "this", ";", "}" ]
Set the exact moment when the cache should expire. @param DateTimeInterface $dt When the cache should expire @return CachePolicy Provides fluent interface
[ "Set", "the", "exact", "moment", "when", "the", "cache", "should", "expire", "." ]
7318eff1b81a3c103c4263466d09b7f3593b70b9
https://github.com/Wedeto/HTTP/blob/7318eff1b81a3c103c4263466d09b7f3593b70b9/src/CachePolicy.php#L58-L62
202,997
Wedeto/HTTP
src/CachePolicy.php
CachePolicy.setExpiresIn
public function setExpiresIn(DateInterval $interval) { $now = new DateTimeImmutable(); $expire = $now->add($interval); $this->setExpiresInSeconds($expire->getTimestamp() - $now->getTimestamp()); return $this; }
php
public function setExpiresIn(DateInterval $interval) { $now = new DateTimeImmutable(); $expire = $now->add($interval); $this->setExpiresInSeconds($expire->getTimestamp() - $now->getTimestamp()); return $this; }
[ "public", "function", "setExpiresIn", "(", "DateInterval", "$", "interval", ")", "{", "$", "now", "=", "new", "DateTimeImmutable", "(", ")", ";", "$", "expire", "=", "$", "now", "->", "add", "(", "$", "interval", ")", ";", "$", "this", "->", "setExpire...
Set the time until the cache should expire. @param DateInterval $interval In what time the cache should expire. @return CachePolicy Provides fluent interface
[ "Set", "the", "time", "until", "the", "cache", "should", "expire", "." ]
7318eff1b81a3c103c4263466d09b7f3593b70b9
https://github.com/Wedeto/HTTP/blob/7318eff1b81a3c103c4263466d09b7f3593b70b9/src/CachePolicy.php#L80-L86
202,998
Wedeto/HTTP
src/CachePolicy.php
CachePolicy.setExpires
public function setExpires($period) { if (is_int($period)) return $this->setExpiresInSeconds($period); if ($period instanceof DateTimeInterface) return $this->setExpireDate($period); if ($period instanceof DateInterval) return $this->setExpiresIn($period);...
php
public function setExpires($period) { if (is_int($period)) return $this->setExpiresInSeconds($period); if ($period instanceof DateTimeInterface) return $this->setExpireDate($period); if ($period instanceof DateInterval) return $this->setExpiresIn($period);...
[ "public", "function", "setExpires", "(", "$", "period", ")", "{", "if", "(", "is_int", "(", "$", "period", ")", ")", "return", "$", "this", "->", "setExpiresInSeconds", "(", "$", "period", ")", ";", "if", "(", "$", "period", "instanceof", "DateTimeInterf...
Set the when the cache should expire. Wrapper for setExpiresIn, setExpiresInSeconds and setExpireDate, with type detection. @param mixed $period Can be int (seconds), DateTimeInterface or DateInterval. @return CachePolicy Provides fluent interface
[ "Set", "the", "when", "the", "cache", "should", "expire", ".", "Wrapper", "for", "setExpiresIn", "setExpiresInSeconds", "and", "setExpireDate", "with", "type", "detection", "." ]
7318eff1b81a3c103c4263466d09b7f3593b70b9
https://github.com/Wedeto/HTTP/blob/7318eff1b81a3c103c4263466d09b7f3593b70b9/src/CachePolicy.php#L95-L105
202,999
Wedeto/HTTP
src/CachePolicy.php
CachePolicy.setCachePolicy
public function setCachePolicy(string $policy) { if ($policy !== self::CACHE_DISABLE && $policy !== self::CACHE_PUBLIC && $policy !== self::CACHE_PRIVATE) throw new \InvalidArgumentException("Invalid cache policy: " . $policy); $this->cache_policy = $policy; return $this; }
php
public function setCachePolicy(string $policy) { if ($policy !== self::CACHE_DISABLE && $policy !== self::CACHE_PUBLIC && $policy !== self::CACHE_PRIVATE) throw new \InvalidArgumentException("Invalid cache policy: " . $policy); $this->cache_policy = $policy; return $this; }
[ "public", "function", "setCachePolicy", "(", "string", "$", "policy", ")", "{", "if", "(", "$", "policy", "!==", "self", "::", "CACHE_DISABLE", "&&", "$", "policy", "!==", "self", "::", "CACHE_PUBLIC", "&&", "$", "policy", "!==", "self", "::", "CACHE_PRIVA...
Set the cache policy for this response. @param string $policy One of CachePolicy::CACHE_PUBLIC, CACHE_PRIVATE or CACHE_DISABLED. @return CachePolicy Provides fluent interface
[ "Set", "the", "cache", "policy", "for", "this", "response", "." ]
7318eff1b81a3c103c4263466d09b7f3593b70b9
https://github.com/Wedeto/HTTP/blob/7318eff1b81a3c103c4263466d09b7f3593b70b9/src/CachePolicy.php#L120-L127