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
201,400
EdwinDayot/shorty-framework
src/Framework/Application.php
Application.createRequest
private function createRequest(Request $request = null): void { if (!$this->request && is_null($request)) { $request = ServerRequest::fromGlobals() ->withParsedBody(json_decode(file_get_contents('php://input'))); } $this->container->set(Request::class, $request);...
php
private function createRequest(Request $request = null): void { if (!$this->request && is_null($request)) { $request = ServerRequest::fromGlobals() ->withParsedBody(json_decode(file_get_contents('php://input'))); } $this->container->set(Request::class, $request);...
[ "private", "function", "createRequest", "(", "Request", "$", "request", "=", "null", ")", ":", "void", "{", "if", "(", "!", "$", "this", "->", "request", "&&", "is_null", "(", "$", "request", ")", ")", "{", "$", "request", "=", "ServerRequest", "::", ...
Create the request object.
[ "Create", "the", "request", "object", "." ]
e03c991ea86aedbd87674d1ee2f9041b55b5e578
https://github.com/EdwinDayot/shorty-framework/blob/e03c991ea86aedbd87674d1ee2f9041b55b5e578/src/Framework/Application.php#L196-L205
201,401
EdwinDayot/shorty-framework
src/Framework/Application.php
Application.registerErrorHandler
private function registerErrorHandler(): void { $whoops = new Run(); $whoops->pushHandler(new PrettyPageHandler()); $whoops->register(); $this->errorHandler = $whoops; }
php
private function registerErrorHandler(): void { $whoops = new Run(); $whoops->pushHandler(new PrettyPageHandler()); $whoops->register(); $this->errorHandler = $whoops; }
[ "private", "function", "registerErrorHandler", "(", ")", ":", "void", "{", "$", "whoops", "=", "new", "Run", "(", ")", ";", "$", "whoops", "->", "pushHandler", "(", "new", "PrettyPageHandler", "(", ")", ")", ";", "$", "whoops", "->", "register", "(", "...
Register the error handler.
[ "Register", "the", "error", "handler", "." ]
e03c991ea86aedbd87674d1ee2f9041b55b5e578
https://github.com/EdwinDayot/shorty-framework/blob/e03c991ea86aedbd87674d1ee2f9041b55b5e578/src/Framework/Application.php#L233-L240
201,402
EdwinDayot/shorty-framework
src/Framework/Application.php
Application.registerProviders
private function registerProviders(): void { $this->providers = array_merge($this->providers, $this->getConfigProviders()); foreach ($this->providers as $provider) { $provider = $this->container->get($provider); $provider->boot(); } }
php
private function registerProviders(): void { $this->providers = array_merge($this->providers, $this->getConfigProviders()); foreach ($this->providers as $provider) { $provider = $this->container->get($provider); $provider->boot(); } }
[ "private", "function", "registerProviders", "(", ")", ":", "void", "{", "$", "this", "->", "providers", "=", "array_merge", "(", "$", "this", "->", "providers", ",", "$", "this", "->", "getConfigProviders", "(", ")", ")", ";", "foreach", "(", "$", "this"...
Registers the providers by booting them.
[ "Registers", "the", "providers", "by", "booting", "them", "." ]
e03c991ea86aedbd87674d1ee2f9041b55b5e578
https://github.com/EdwinDayot/shorty-framework/blob/e03c991ea86aedbd87674d1ee2f9041b55b5e578/src/Framework/Application.php#L245-L253
201,403
EdwinDayot/shorty-framework
src/Framework/Application.php
Application.handleRequest
private function handleRequest(array $middlewares): void { $requestHandler = new RequestHandler($this->container, $middlewares); $this->response = $requestHandler->handle($this->request); }
php
private function handleRequest(array $middlewares): void { $requestHandler = new RequestHandler($this->container, $middlewares); $this->response = $requestHandler->handle($this->request); }
[ "private", "function", "handleRequest", "(", "array", "$", "middlewares", ")", ":", "void", "{", "$", "requestHandler", "=", "new", "RequestHandler", "(", "$", "this", "->", "container", ",", "$", "middlewares", ")", ";", "$", "this", "->", "response", "="...
Handles the request and triggers middlewares. @param array $middlewares
[ "Handles", "the", "request", "and", "triggers", "middlewares", "." ]
e03c991ea86aedbd87674d1ee2f9041b55b5e578
https://github.com/EdwinDayot/shorty-framework/blob/e03c991ea86aedbd87674d1ee2f9041b55b5e578/src/Framework/Application.php#L260-L265
201,404
EdwinDayot/shorty-framework
src/Framework/Application.php
Application.prepareResponse
public function prepareResponse() { try { $this->setBaseMiddlewares(); $this->handleRequest($this->middlewares); $this->router->build(); $this->handleRequest($this->routeMiddlewares); $this->response = $this->router->run(); } catch (Excepti...
php
public function prepareResponse() { try { $this->setBaseMiddlewares(); $this->handleRequest($this->middlewares); $this->router->build(); $this->handleRequest($this->routeMiddlewares); $this->response = $this->router->run(); } catch (Excepti...
[ "public", "function", "prepareResponse", "(", ")", "{", "try", "{", "$", "this", "->", "setBaseMiddlewares", "(", ")", ";", "$", "this", "->", "handleRequest", "(", "$", "this", "->", "middlewares", ")", ";", "$", "this", "->", "router", "->", "build", ...
Prepare the response object.
[ "Prepare", "the", "response", "object", "." ]
e03c991ea86aedbd87674d1ee2f9041b55b5e578
https://github.com/EdwinDayot/shorty-framework/blob/e03c991ea86aedbd87674d1ee2f9041b55b5e578/src/Framework/Application.php#L358-L370
201,405
phpgears/event-async
src/Serializer/JsonEventSerializer.php
JsonEventSerializer.getEventDefinition
private function getEventDefinition(string $serialized): array { $definition = $this->getDeserializationDefinition($serialized); if (!isset($definition['class'], $definition['payload'], $definition['attributes']) || \count(\array_diff(\array_keys($definition), ['class', 'payload', 'attr...
php
private function getEventDefinition(string $serialized): array { $definition = $this->getDeserializationDefinition($serialized); if (!isset($definition['class'], $definition['payload'], $definition['attributes']) || \count(\array_diff(\array_keys($definition), ['class', 'payload', 'attr...
[ "private", "function", "getEventDefinition", "(", "string", "$", "serialized", ")", ":", "array", "{", "$", "definition", "=", "$", "this", "->", "getDeserializationDefinition", "(", "$", "serialized", ")", ";", "if", "(", "!", "isset", "(", "$", "definition...
Get event definition from serialization. @param string $serialized @throws EventSerializationException @return array<string, mixed>
[ "Get", "event", "definition", "from", "serialization", "." ]
e2d72b32e8852ec3926636af1c686a7c582b0bca
https://github.com/phpgears/event-async/blob/e2d72b32e8852ec3926636af1c686a7c582b0bca/src/Serializer/JsonEventSerializer.php#L126-L140
201,406
phpgears/event-async
src/Serializer/JsonEventSerializer.php
JsonEventSerializer.getDeserializationDefinition
private function getDeserializationDefinition(string $serialized): array { if (\trim($serialized) === '') { throw new EventSerializationException('Malformed JSON serialized event: empty string'); } $definition = \json_decode($serialized, true, 512, static::JSON_DECODE_OPTIONS); ...
php
private function getDeserializationDefinition(string $serialized): array { if (\trim($serialized) === '') { throw new EventSerializationException('Malformed JSON serialized event: empty string'); } $definition = \json_decode($serialized, true, 512, static::JSON_DECODE_OPTIONS); ...
[ "private", "function", "getDeserializationDefinition", "(", "string", "$", "serialized", ")", ":", "array", "{", "if", "(", "\\", "trim", "(", "$", "serialized", ")", "===", "''", ")", "{", "throw", "new", "EventSerializationException", "(", "'Malformed JSON ser...
Get deserialization definition. @param string $serialized @return array<string, mixed>
[ "Get", "deserialization", "definition", "." ]
e2d72b32e8852ec3926636af1c686a7c582b0bca
https://github.com/phpgears/event-async/blob/e2d72b32e8852ec3926636af1c686a7c582b0bca/src/Serializer/JsonEventSerializer.php#L149-L168
201,407
itcreator/custom-cmf
Module/Language/src/Cmf/Language/Factory.php
Factory.init
private static function init() { if (!self::$defaultLng) { $config = Application::getConfigManager()->loadForModule('Cmf\Language'); self::$defaultLng = strtolower($config->defaultLanguage); $currentLng = $config->currentLanguage; self::$currentLng = $currentL...
php
private static function init() { if (!self::$defaultLng) { $config = Application::getConfigManager()->loadForModule('Cmf\Language'); self::$defaultLng = strtolower($config->defaultLanguage); $currentLng = $config->currentLanguage; self::$currentLng = $currentL...
[ "private", "static", "function", "init", "(", ")", "{", "if", "(", "!", "self", "::", "$", "defaultLng", ")", "{", "$", "config", "=", "Application", "::", "getConfigManager", "(", ")", "->", "loadForModule", "(", "'Cmf\\Language'", ")", ";", "self", "::...
Initialization of language manager @return void
[ "Initialization", "of", "language", "manager" ]
42fc0535dfa0f641856f06673f6ab596b2020c40
https://github.com/itcreator/custom-cmf/blob/42fc0535dfa0f641856f06673f6ab596b2020c40/Module/Language/src/Cmf/Language/Factory.php#L33-L41
201,408
jyokum/healthgraph
src/HealthGraph/Authorization.php
Authorization.getAuthorizationButton
public static function getAuthorizationButton( $client_id, $redirect_url, $state = '', $text = 'connect', $color = 'blue', $caption = 'white', $size = 200, $url = 'https://runkeeper.com/apps/authorize' ) { $link = self::getAuthorizationLink($cl...
php
public static function getAuthorizationButton( $client_id, $redirect_url, $state = '', $text = 'connect', $color = 'blue', $caption = 'white', $size = 200, $url = 'https://runkeeper.com/apps/authorize' ) { $link = self::getAuthorizationLink($cl...
[ "public", "static", "function", "getAuthorizationButton", "(", "$", "client_id", ",", "$", "redirect_url", ",", "$", "state", "=", "''", ",", "$", "text", "=", "'connect'", ",", "$", "color", "=", "'blue'", ",", "$", "caption", "=", "'white'", ",", "$", ...
Generates a button for establishing a connection with a RunKeeper account. @param string $client_id The unique identifier that your application received upon registration. @param string $redirect_url The page on your site where the user will be redirected after accepting or denying the access request. @param string $t...
[ "Generates", "a", "button", "for", "establishing", "a", "connection", "with", "a", "RunKeeper", "account", "." ]
6b3b4c4eb797f1fcf056024c8b15a16665bf8758
https://github.com/jyokum/healthgraph/blob/6b3b4c4eb797f1fcf056024c8b15a16665bf8758/src/HealthGraph/Authorization.php#L27-L61
201,409
jyokum/healthgraph
src/HealthGraph/Authorization.php
Authorization.getAuthorizationLink
public static function getAuthorizationLink( $client_id, $redirect_url, $state = '', $url = 'https://runkeeper.com/apps/authorize' ) { $data = array( 'client_id' => $client_id, 'response_type' => 'code', 'redirect_uri' => $redirect_url, ...
php
public static function getAuthorizationLink( $client_id, $redirect_url, $state = '', $url = 'https://runkeeper.com/apps/authorize' ) { $data = array( 'client_id' => $client_id, 'response_type' => 'code', 'redirect_uri' => $redirect_url, ...
[ "public", "static", "function", "getAuthorizationLink", "(", "$", "client_id", ",", "$", "redirect_url", ",", "$", "state", "=", "''", ",", "$", "url", "=", "'https://runkeeper.com/apps/authorize'", ")", "{", "$", "data", "=", "array", "(", "'client_id'", "=>"...
Generates a link for establishing a connection with a RunKeeper account. @param string $client_id The unique identifier that your application received upon registration. @param string $redirect_url The page on your site where the user will be redirected after accepting or denying the access request. @param string $url...
[ "Generates", "a", "link", "for", "establishing", "a", "connection", "with", "a", "RunKeeper", "account", "." ]
6b3b4c4eb797f1fcf056024c8b15a16665bf8758
https://github.com/jyokum/healthgraph/blob/6b3b4c4eb797f1fcf056024c8b15a16665bf8758/src/HealthGraph/Authorization.php#L74-L87
201,410
vperyod/vperyod.session-handler
src/SessionAwareTrait.php
SessionAwareTrait.getSession
protected function getSession(Request $request) : Session\Session { $session = $request->getAttribute(SessionHandler::SESSION_ATTRIBUTE); if (! $session instanceof Session\Session) { throw new \Exception( 'Session not available in request at: ' . SessionH...
php
protected function getSession(Request $request) : Session\Session { $session = $request->getAttribute(SessionHandler::SESSION_ATTRIBUTE); if (! $session instanceof Session\Session) { throw new \Exception( 'Session not available in request at: ' . SessionH...
[ "protected", "function", "getSession", "(", "Request", "$", "request", ")", ":", "Session", "\\", "Session", "{", "$", "session", "=", "$", "request", "->", "getAttribute", "(", "SessionHandler", "::", "SESSION_ATTRIBUTE", ")", ";", "if", "(", "!", "$", "s...
Get session from request @param Request $request PSR7 Request @return Session\Session @throws Exception if session attribute is invalid @access protected
[ "Get", "session", "from", "request" ]
61a607be009296b69bdb328ed3a26940e1b925bb
https://github.com/vperyod/vperyod.session-handler/blob/61a607be009296b69bdb328ed3a26940e1b925bb/src/SessionAwareTrait.php#L50-L61
201,411
itkg/core
src/Itkg/Core/Config.php
Config.load
public function load(array $files = array()) { $loader = new YamlLoader(new FileLocator, new YamlParser); foreach ($files as $file) { $configValues = $loader->load($file); $configValues = $this->loadImports($loader, $file, $configValues); $this->params = array_...
php
public function load(array $files = array()) { $loader = new YamlLoader(new FileLocator, new YamlParser); foreach ($files as $file) { $configValues = $loader->load($file); $configValues = $this->loadImports($loader, $file, $configValues); $this->params = array_...
[ "public", "function", "load", "(", "array", "$", "files", "=", "array", "(", ")", ")", "{", "$", "loader", "=", "new", "YamlLoader", "(", "new", "FileLocator", ",", "new", "YamlParser", ")", ";", "foreach", "(", "$", "files", "as", "$", "file", ")", ...
Load config files @param array $files
[ "Load", "config", "files" ]
e5e4efb05feb4d23b0df41f2b21fd095103e593b
https://github.com/itkg/core/blob/e5e4efb05feb4d23b0df41f2b21fd095103e593b/src/Itkg/Core/Config.php#L45-L56
201,412
itkg/core
src/Itkg/Core/Config.php
Config.get
public function get($key) { if ($this->has($key)) { return $this->params[$key]; } throw new \InvalidArgumentException(sprintf("Config key %s doest not exist", $key)); }
php
public function get($key) { if ($this->has($key)) { return $this->params[$key]; } throw new \InvalidArgumentException(sprintf("Config key %s doest not exist", $key)); }
[ "public", "function", "get", "(", "$", "key", ")", "{", "if", "(", "$", "this", "->", "has", "(", "$", "key", ")", ")", "{", "return", "$", "this", "->", "params", "[", "$", "key", "]", ";", "}", "throw", "new", "\\", "InvalidArgumentException", ...
Get a config value for a key @param $key @return mixed @throws \InvalidArgumentException
[ "Get", "a", "config", "value", "for", "a", "key" ]
e5e4efb05feb4d23b0df41f2b21fd095103e593b
https://github.com/itkg/core/blob/e5e4efb05feb4d23b0df41f2b21fd095103e593b/src/Itkg/Core/Config.php#L86-L93
201,413
agentmedia/phine-core
src/Core/Snippets/TreeBranches/Base/ContentBranch.php
ContentBranch.CreateInUrl
final protected function CreateInUrl() { $args = $this->EditParams(); $args['parent'] = $this->item->GetID(); return BackendRouter::ModuleUrl(new ModuleForm(), $args); }
php
final protected function CreateInUrl() { $args = $this->EditParams(); $args['parent'] = $this->item->GetID(); return BackendRouter::ModuleUrl(new ModuleForm(), $args); }
[ "final", "protected", "function", "CreateInUrl", "(", ")", "{", "$", "args", "=", "$", "this", "->", "EditParams", "(", ")", ";", "$", "args", "[", "'parent'", "]", "=", "$", "this", "->", "item", "->", "GetID", "(", ")", ";", "return", "BackendRoute...
The url for creating content in the current item @return string
[ "The", "url", "for", "creating", "content", "in", "the", "current", "item" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Snippets/TreeBranches/Base/ContentBranch.php#L119-L124
201,414
agentmedia/phine-core
src/Core/Snippets/TreeBranches/Base/ContentBranch.php
ContentBranch.CanEdit
final protected function CanEdit() { $form = $this->module->ContentForm(); return BackendModule::Guard()->Allow(BackendAction::Edit(), $this->content) && BackendModule::Guard()->Allow(BackendAction::Read(), $form); }
php
final protected function CanEdit() { $form = $this->module->ContentForm(); return BackendModule::Guard()->Allow(BackendAction::Edit(), $this->content) && BackendModule::Guard()->Allow(BackendAction::Read(), $form); }
[ "final", "protected", "function", "CanEdit", "(", ")", "{", "$", "form", "=", "$", "this", "->", "module", "->", "ContentForm", "(", ")", ";", "return", "BackendModule", "::", "Guard", "(", ")", "->", "Allow", "(", "BackendAction", "::", "Edit", "(", "...
True if the the content can be edited @return Boolean
[ "True", "if", "the", "the", "content", "can", "be", "edited" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Snippets/TreeBranches/Base/ContentBranch.php#L178-L183
201,415
agentmedia/phine-core
src/Core/Snippets/TreeBranches/Base/ContentBranch.php
ContentBranch.CanCreateIn
final protected function CanCreateIn() { return $this->AllowChildren() && BackendModule::Guard()->Allow(BackendAction::Create(), $this->content); }
php
final protected function CanCreateIn() { return $this->AllowChildren() && BackendModule::Guard()->Allow(BackendAction::Create(), $this->content); }
[ "final", "protected", "function", "CanCreateIn", "(", ")", "{", "return", "$", "this", "->", "AllowChildren", "(", ")", "&&", "BackendModule", "::", "Guard", "(", ")", "->", "Allow", "(", "BackendAction", "::", "Create", "(", ")", ",", "$", "this", "->",...
True if the content can be created in @return Boolean
[ "True", "if", "the", "content", "can", "be", "created", "in" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Snippets/TreeBranches/Base/ContentBranch.php#L198-L202
201,416
agentmedia/phine-core
src/Core/Snippets/TreeBranches/Base/ContentBranch.php
ContentBranch.CanCreateAfter
final protected function CanCreateAfter() { $parentItem = $this->tree->ParentOf($this->item); if ($parentItem) { $parent = $this->tree->ContentByItem($parentItem); return BackendModule::Guard()->Allow(BackendAction::Create(), $parent); } return $this->...
php
final protected function CanCreateAfter() { $parentItem = $this->tree->ParentOf($this->item); if ($parentItem) { $parent = $this->tree->ContentByItem($parentItem); return BackendModule::Guard()->Allow(BackendAction::Create(), $parent); } return $this->...
[ "final", "protected", "function", "CanCreateAfter", "(", ")", "{", "$", "parentItem", "=", "$", "this", "->", "tree", "->", "ParentOf", "(", "$", "this", "->", "item", ")", ";", "if", "(", "$", "parentItem", ")", "{", "$", "parent", "=", "$", "this",...
True if there can be content created after @return boolean
[ "True", "if", "there", "can", "be", "content", "created", "after" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Snippets/TreeBranches/Base/ContentBranch.php#L217-L226
201,417
Polosa/shade-framework-core
app/NestedContainer.php
NestedContainer.__isset
public function __isset($name) { return isset($this->children[$name]) && !is_null($this->children[$name]->getValue()); }
php
public function __isset($name) { return isset($this->children[$name]) && !is_null($this->children[$name]->getValue()); }
[ "public", "function", "__isset", "(", "$", "name", ")", "{", "return", "isset", "(", "$", "this", "->", "children", "[", "$", "name", "]", ")", "&&", "!", "is_null", "(", "$", "this", "->", "children", "[", "$", "name", "]", "->", "getValue", "(", ...
Check if child set @param string $name Child name @return bool
[ "Check", "if", "child", "set" ]
d735d3e8e0616fb9cf4ffc25b8425762ed07940f
https://github.com/Polosa/shade-framework-core/blob/d735d3e8e0616fb9cf4ffc25b8425762ed07940f/app/NestedContainer.php#L118-L121
201,418
Polosa/shade-framework-core
app/NestedContainer.php
NestedContainer.overwrite
public function overwrite($container) { $originalValue = $this->getValue(); $newValue = $container->getValue(); if (is_null($newValue)) { $resultValue = $originalValue; } elseif (is_array($newValue) && is_array($originalValue)) { $resultValue = array_replace_...
php
public function overwrite($container) { $originalValue = $this->getValue(); $newValue = $container->getValue(); if (is_null($newValue)) { $resultValue = $originalValue; } elseif (is_array($newValue) && is_array($originalValue)) { $resultValue = array_replace_...
[ "public", "function", "overwrite", "(", "$", "container", ")", "{", "$", "originalValue", "=", "$", "this", "->", "getValue", "(", ")", ";", "$", "newValue", "=", "$", "container", "->", "getValue", "(", ")", ";", "if", "(", "is_null", "(", "$", "new...
Overwrite Container's data @param self $container Container to overwrite by @return self
[ "Overwrite", "Container", "s", "data" ]
d735d3e8e0616fb9cf4ffc25b8425762ed07940f
https://github.com/Polosa/shade-framework-core/blob/d735d3e8e0616fb9cf4ffc25b8425762ed07940f/app/NestedContainer.php#L154-L170
201,419
freialib/hlin.tools
src/Request.php
Request.input
function input(array $formats, $output = 'array') { if (in_array('post', $formats)) { $post = $this->context->web->requestPostData(); if ( ! empty($post)) { if ($output == 'array') { return $post; } } } if (in_array('json', $formats)) { $input = $this->context->web->requestBody(); if...
php
function input(array $formats, $output = 'array') { if (in_array('post', $formats)) { $post = $this->context->web->requestPostData(); if ( ! empty($post)) { if ($output == 'array') { return $post; } } } if (in_array('json', $formats)) { $input = $this->context->web->requestBody(); if...
[ "function", "input", "(", "array", "$", "formats", ",", "$", "output", "=", "'array'", ")", "{", "if", "(", "in_array", "(", "'post'", ",", "$", "formats", ")", ")", "{", "$", "post", "=", "$", "this", "->", "context", "->", "web", "->", "requestPo...
Given a set of acceptable formats the system tries to retrieve the data format specified and return it in the specified output format. If there is no input the method will return null. Supported formats: - post - json - query (alias: get) - raw-query - files Supported output formats: - array @return mixed|null input
[ "Given", "a", "set", "of", "acceptable", "formats", "the", "system", "tries", "to", "retrieve", "the", "data", "format", "specified", "and", "return", "it", "in", "the", "specified", "output", "format", ".", "If", "there", "is", "no", "input", "the", "meth...
42ad9e9fe081918d2ee5d52b72d174ccdcf7cbe7
https://github.com/freialib/hlin.tools/blob/42ad9e9fe081918d2ee5d52b72d174ccdcf7cbe7/src/Request.php#L43-L90
201,420
bandama-framework/bandama-framework
src/foundation/router/Route.php
Route.match
public function match($url) { // Remove the start and end slash of URL $url = trim($url, '/'); // Replace path parameters (:parameter) by $path = preg_replace_callback('#:([\w]+)#', [$this, 'paramMatch'], $this->path); // Define the regex patterb with the new path after replaced the parameters of path $rege...
php
public function match($url) { // Remove the start and end slash of URL $url = trim($url, '/'); // Replace path parameters (:parameter) by $path = preg_replace_callback('#:([\w]+)#', [$this, 'paramMatch'], $this->path); // Define the regex patterb with the new path after replaced the parameters of path $rege...
[ "public", "function", "match", "(", "$", "url", ")", "{", "// Remove the start and end slash of URL", "$", "url", "=", "trim", "(", "$", "url", ",", "'/'", ")", ";", "// Replace path parameters (:parameter) by", "$", "path", "=", "preg_replace_callback", "(", "'#:...
Test if the current route matches the URL @param string $url @return boolean|mixed
[ "Test", "if", "the", "current", "route", "matches", "the", "URL" ]
234ed703baf9e31268941c9d5f6d5e004cc53066
https://github.com/bandama-framework/bandama-framework/blob/234ed703baf9e31268941c9d5f6d5e004cc53066/src/foundation/router/Route.php#L102-L119
201,421
bandama-framework/bandama-framework
src/foundation/router/Route.php
Route.execute
public function execute($matches) { if (is_string($this->callable)) { // If the callable is a string, call the action of controller $params = explode('#', $this->callable); if (count($params) == 2) { $controllerPrefix = $params[0]; $controllerPrefix = str_replace(':', '...
php
public function execute($matches) { if (is_string($this->callable)) { // If the callable is a string, call the action of controller $params = explode('#', $this->callable); if (count($params) == 2) { $controllerPrefix = $params[0]; $controllerPrefix = str_replace(':', '...
[ "public", "function", "execute", "(", "$", "matches", ")", "{", "if", "(", "is_string", "(", "$", "this", "->", "callable", ")", ")", "{", "// If the callable is a string, call the action of controller", "$", "params", "=", "explode", "(", "'#'", ",", "$", "th...
Execute the callable of route @param array $matches URL parameters @return mixed
[ "Execute", "the", "callable", "of", "route" ]
234ed703baf9e31268941c9d5f6d5e004cc53066
https://github.com/bandama-framework/bandama-framework/blob/234ed703baf9e31268941c9d5f6d5e004cc53066/src/foundation/router/Route.php#L128-L153
201,422
bandama-framework/bandama-framework
src/foundation/router/Route.php
Route.getUrl
public function getUrl($params) { $path = $this->path; foreach ($params as $k => $v) { $path = str_replace(":$k", $v, $path); } return $path; }
php
public function getUrl($params) { $path = $this->path; foreach ($params as $k => $v) { $path = str_replace(":$k", $v, $path); } return $path; }
[ "public", "function", "getUrl", "(", "$", "params", ")", "{", "$", "path", "=", "$", "this", "->", "path", ";", "foreach", "(", "$", "params", "as", "$", "k", "=>", "$", "v", ")", "{", "$", "path", "=", "str_replace", "(", "\":$k\"", ",", "$", ...
Generate the URL with the parameters @param array $params Route parameters @return string
[ "Generate", "the", "URL", "with", "the", "parameters" ]
234ed703baf9e31268941c9d5f6d5e004cc53066
https://github.com/bandama-framework/bandama-framework/blob/234ed703baf9e31268941c9d5f6d5e004cc53066/src/foundation/router/Route.php#L162-L170
201,423
yuncms/yii2-article
backend/controllers/ArticleController.php
ArticleController.actionAudit
public function actionAudit($id) { $model = $this->findModel($id); $model->setPublished(); Yii::$app->getSession()->setFlash('success', Yii::t('article', 'Update success.')); return $this->redirect(Url::previous('actions-redirect')); }
php
public function actionAudit($id) { $model = $this->findModel($id); $model->setPublished(); Yii::$app->getSession()->setFlash('success', Yii::t('article', 'Update success.')); return $this->redirect(Url::previous('actions-redirect')); }
[ "public", "function", "actionAudit", "(", "$", "id", ")", "{", "$", "model", "=", "$", "this", "->", "findModel", "(", "$", "id", ")", ";", "$", "model", "->", "setPublished", "(", ")", ";", "Yii", "::", "$", "app", "->", "getSession", "(", ")", ...
Audit an existing Comment model. If Audit is successful, the browser will be redirected to the 'index' page. @param integer $id @return mixed
[ "Audit", "an", "existing", "Comment", "model", ".", "If", "Audit", "is", "successful", "the", "browser", "will", "be", "redirected", "to", "the", "index", "page", "." ]
177ec4d3d143b2f2a69bce760e873485cf3df192
https://github.com/yuncms/yii2-article/blob/177ec4d3d143b2f2a69bce760e873485cf3df192/backend/controllers/ArticleController.php#L112-L118
201,424
PenoaksDev/Milky-Framework
src/Milky/Account/AccountManager.php
AccountManager.resolveGuard
public function resolveGuard( $name ) { $config = Config::get( 'auth.guards.' . $name ); if ( is_null( $config ) ) throw new AccountException( "Auth guard [" . $name . "] is not defined in the configuration" ); $uses = $config['uses']; $auth = $this->resolveAuth( $config['auth'] ?: $this->getDefaultAuth()...
php
public function resolveGuard( $name ) { $config = Config::get( 'auth.guards.' . $name ); if ( is_null( $config ) ) throw new AccountException( "Auth guard [" . $name . "] is not defined in the configuration" ); $uses = $config['uses']; $auth = $this->resolveAuth( $config['auth'] ?: $this->getDefaultAuth()...
[ "public", "function", "resolveGuard", "(", "$", "name", ")", "{", "$", "config", "=", "Config", "::", "get", "(", "'auth.guards.'", ".", "$", "name", ")", ";", "if", "(", "is_null", "(", "$", "config", ")", ")", "throw", "new", "AccountException", "(",...
Resolve the implemented Account Guard @param string $name
[ "Resolve", "the", "implemented", "Account", "Guard" ]
8afd7156610a70371aa5b1df50b8a212bf7b142c
https://github.com/PenoaksDev/Milky-Framework/blob/8afd7156610a70371aa5b1df50b8a212bf7b142c/src/Milky/Account/AccountManager.php#L64-L100
201,425
PenoaksDev/Milky-Framework
src/Milky/Account/AccountManager.php
AccountManager.resolveAuth
public function resolveAuth( $auth ) { $config = Config::get( 'auth.auths.' . $auth ); $uses = $config['uses']; switch ( $uses ) { case 'database': { $auth = new DatabaseAuth( $config['table'] ); break; } case 'eloquent': { $auth = new EloquentAuth( $config['usrModel'], $config['grp...
php
public function resolveAuth( $auth ) { $config = Config::get( 'auth.auths.' . $auth ); $uses = $config['uses']; switch ( $uses ) { case 'database': { $auth = new DatabaseAuth( $config['table'] ); break; } case 'eloquent': { $auth = new EloquentAuth( $config['usrModel'], $config['grp...
[ "public", "function", "resolveAuth", "(", "$", "auth", ")", "{", "$", "config", "=", "Config", "::", "get", "(", "'auth.auths.'", ".", "$", "auth", ")", ";", "$", "uses", "=", "$", "config", "[", "'uses'", "]", ";", "switch", "(", "$", "uses", ")",...
Resolve the implemented Account Auth @param string $auth @return AccountAuth
[ "Resolve", "the", "implemented", "Account", "Auth" ]
8afd7156610a70371aa5b1df50b8a212bf7b142c
https://github.com/PenoaksDev/Milky-Framework/blob/8afd7156610a70371aa5b1df50b8a212bf7b142c/src/Milky/Account/AccountManager.php#L108-L138
201,426
PenoaksDev/Milky-Framework
src/Milky/Account/AccountManager.php
AccountManager.viaRequest
public function viaRequest( $name, callable $callback ) { $this->guards[$name] = new RequestGuard( $callback, Request::i() ); }
php
public function viaRequest( $name, callable $callback ) { $this->guards[$name] = new RequestGuard( $callback, Request::i() ); }
[ "public", "function", "viaRequest", "(", "$", "name", ",", "callable", "$", "callback", ")", "{", "$", "this", "->", "guards", "[", "$", "name", "]", "=", "new", "RequestGuard", "(", "$", "callback", ",", "Request", "::", "i", "(", ")", ")", ";", "...
Register a callback based guard @param $name @param callable $callback
[ "Register", "a", "callback", "based", "guard" ]
8afd7156610a70371aa5b1df50b8a212bf7b142c
https://github.com/PenoaksDev/Milky-Framework/blob/8afd7156610a70371aa5b1df50b8a212bf7b142c/src/Milky/Account/AccountManager.php#L166-L169
201,427
CommonApi/Fieldhandler
FieldhandlerUsageTrait.php
FieldhandlerUsageTrait.editFieldhandlerMethod
protected function editFieldhandlerMethod() { if (in_array($this->method, array('validate', 'sanitize', 'format'))) { return $this; } throw new InvalidArgumentException( get_class($this) . ' passed in invalid Fieldhandler method ' . $this->met...
php
protected function editFieldhandlerMethod() { if (in_array($this->method, array('validate', 'sanitize', 'format'))) { return $this; } throw new InvalidArgumentException( get_class($this) . ' passed in invalid Fieldhandler method ' . $this->met...
[ "protected", "function", "editFieldhandlerMethod", "(", ")", "{", "if", "(", "in_array", "(", "$", "this", "->", "method", ",", "array", "(", "'validate'", ",", "'sanitize'", ",", "'format'", ")", ")", ")", "{", "return", "$", "this", ";", "}", "throw", ...
Edit Method for Fieldhandler Method @return $this @since 1.0.0 @throws \CommonApi\Exception\InvalidArgumentException
[ "Edit", "Method", "for", "Fieldhandler", "Method" ]
38584132ab55cdf45ffa6a10fa7c78fa6f78984b
https://github.com/CommonApi/Fieldhandler/blob/38584132ab55cdf45ffa6a10fa7c78fa6f78984b/FieldhandlerUsageTrait.php#L117-L129
201,428
CommonApi/Fieldhandler
FieldhandlerUsageTrait.php
FieldhandlerUsageTrait.editFieldhandlerAttribute
protected function editFieldhandlerAttribute($attribute) { $field_name = 'field_' . $attribute; $this->$field_name = null; if (isset($this->field[$attribute])) { $this->$field_name = $this->field[$attribute]; return $this; } if ($attribute === 'val...
php
protected function editFieldhandlerAttribute($attribute) { $field_name = 'field_' . $attribute; $this->$field_name = null; if (isset($this->field[$attribute])) { $this->$field_name = $this->field[$attribute]; return $this; } if ($attribute === 'val...
[ "protected", "function", "editFieldhandlerAttribute", "(", "$", "attribute", ")", "{", "$", "field_name", "=", "'field_'", ".", "$", "attribute", ";", "$", "this", "->", "$", "field_name", "=", "null", ";", "if", "(", "isset", "(", "$", "this", "->", "fi...
Edit Fieldhandler Attribute @param string $attribute @return $this @since 1.0.0 @throws \CommonApi\Exception\InvalidArgumentException
[ "Edit", "Fieldhandler", "Attribute" ]
38584132ab55cdf45ffa6a10fa7c78fa6f78984b
https://github.com/CommonApi/Fieldhandler/blob/38584132ab55cdf45ffa6a10fa7c78fa6f78984b/FieldhandlerUsageTrait.php#L140-L162
201,429
CommonApi/Fieldhandler
FieldhandlerUsageTrait.php
FieldhandlerUsageTrait.executeConstraint
protected function executeConstraint(array $options = array()) { try { $method = $this->method; return $this->fieldhandler->$method( $this->field_name, $this->field_value, ucfirst(strtolower($this->field_type)), $option...
php
protected function executeConstraint(array $options = array()) { try { $method = $this->method; return $this->fieldhandler->$method( $this->field_name, $this->field_value, ucfirst(strtolower($this->field_type)), $option...
[ "protected", "function", "executeConstraint", "(", "array", "$", "options", "=", "array", "(", ")", ")", "{", "try", "{", "$", "method", "=", "$", "this", "->", "method", ";", "return", "$", "this", "->", "fieldhandler", "->", "$", "method", "(", "$", ...
Execute Fieldhandler Method @param array $options @return $this @since 1.0.0 @throws \CommonApi\Exception\RuntimeException
[ "Execute", "Fieldhandler", "Method" ]
38584132ab55cdf45ffa6a10fa7c78fa6f78984b
https://github.com/CommonApi/Fieldhandler/blob/38584132ab55cdf45ffa6a10fa7c78fa6f78984b/FieldhandlerUsageTrait.php#L173-L195
201,430
t3v/t3v_core
Classes/Domain/Repository/AbstractRepository.php
AbstractRepository.initializeObject
public function initializeObject() { $querySettings = $this->objectManager->get(Typo3QuerySettings::class); $querySettings->setIgnoreEnableFields(false); $querySettings->setRespectStoragePage(false); $this->setDefaultQuerySettings($querySettings); }
php
public function initializeObject() { $querySettings = $this->objectManager->get(Typo3QuerySettings::class); $querySettings->setIgnoreEnableFields(false); $querySettings->setRespectStoragePage(false); $this->setDefaultQuerySettings($querySettings); }
[ "public", "function", "initializeObject", "(", ")", "{", "$", "querySettings", "=", "$", "this", "->", "objectManager", "->", "get", "(", "Typo3QuerySettings", "::", "class", ")", ";", "$", "querySettings", "->", "setIgnoreEnableFields", "(", "false", ")", ";"...
The life cycle method.
[ "The", "life", "cycle", "method", "." ]
8c04b7688cc2773f11fcc87fda3f7cd53d80a980
https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Domain/Repository/AbstractRepository.php#L40-L46
201,431
t3v/t3v_core
Classes/Domain/Repository/AbstractRepository.php
AbstractRepository.findByUid
public function findByUid($uid, array $querySettings = ['respectSysLanguage' => false]) { if ($uid && $uid > 0) { // Create a new query. $query = $this->createquery(); // Apply the passed query settings. $query = $this->applyQuerySettings($query, $querySettings); // Set the query con...
php
public function findByUid($uid, array $querySettings = ['respectSysLanguage' => false]) { if ($uid && $uid > 0) { // Create a new query. $query = $this->createquery(); // Apply the passed query settings. $query = $this->applyQuerySettings($query, $querySettings); // Set the query con...
[ "public", "function", "findByUid", "(", "$", "uid", ",", "array", "$", "querySettings", "=", "[", "'respectSysLanguage'", "=>", "false", "]", ")", "{", "if", "(", "$", "uid", "&&", "$", "uid", ">", "0", ")", "{", "// Create a new query.", "$", "query", ...
Finds objects by UID, overrides the default one. @param int $uid The UID @param array $querySettings The optional query settings to apply @return object|null The found object or null if no object was found
[ "Finds", "objects", "by", "UID", "overrides", "the", "default", "one", "." ]
8c04b7688cc2773f11fcc87fda3f7cd53d80a980
https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Domain/Repository/AbstractRepository.php#L55-L73
201,432
t3v/t3v_core
Classes/Domain/Repository/AbstractRepository.php
AbstractRepository.findByUids
public function findByUids($uids, array $querySettings = ['respectSysLanguage' => false]) { if (is_string($uids)) { $uids = GeneralUtility::intExplode(',', $uids, true); } if (!empty($uids)) { // Create a new query. $query = $this->createquery(); // Apply the passed query settings....
php
public function findByUids($uids, array $querySettings = ['respectSysLanguage' => false]) { if (is_string($uids)) { $uids = GeneralUtility::intExplode(',', $uids, true); } if (!empty($uids)) { // Create a new query. $query = $this->createquery(); // Apply the passed query settings....
[ "public", "function", "findByUids", "(", "$", "uids", ",", "array", "$", "querySettings", "=", "[", "'respectSysLanguage'", "=>", "false", "]", ")", "{", "if", "(", "is_string", "(", "$", "uids", ")", ")", "{", "$", "uids", "=", "GeneralUtility", "::", ...
Finds objects by multiple UIDs. @param array|string $uids The UIDs as array or as string, seperated by `,` @param array $querySettings The optional query settings to apply @return \TYPO3\CMS\Extbase\Persistence\Generic\QueryResult|null The found objects or null if no objects were found
[ "Finds", "objects", "by", "multiple", "UIDs", "." ]
8c04b7688cc2773f11fcc87fda3f7cd53d80a980
https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Domain/Repository/AbstractRepository.php#L82-L104
201,433
t3v/t3v_core
Classes/Domain/Repository/AbstractRepository.php
AbstractRepository.getRawObjectByUid
public function getRawObjectByUid(int $uid, int $languageUid = 0, array $querySettings = ['respectSysLanguage' => false]) { if ($uid && $uid > 0) { // Create a new query. $query = $this->createquery(); // Set the passend language UID. $settings = $query->getQuerySettings(); $settings-...
php
public function getRawObjectByUid(int $uid, int $languageUid = 0, array $querySettings = ['respectSysLanguage' => false]) { if ($uid && $uid > 0) { // Create a new query. $query = $this->createquery(); // Set the passend language UID. $settings = $query->getQuerySettings(); $settings-...
[ "public", "function", "getRawObjectByUid", "(", "int", "$", "uid", ",", "int", "$", "languageUid", "=", "0", ",", "array", "$", "querySettings", "=", "[", "'respectSysLanguage'", "=>", "false", "]", ")", "{", "if", "(", "$", "uid", "&&", "$", "uid", ">...
Gets a raw object by UID. @param int $uid The UID @param int $languageUid The language UID, defaults to `0` @param array $querySettings The optional query settings to apply @return object|null The raw object or null if no object was found
[ "Gets", "a", "raw", "object", "by", "UID", "." ]
8c04b7688cc2773f11fcc87fda3f7cd53d80a980
https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Domain/Repository/AbstractRepository.php#L114-L136
201,434
t3v/t3v_core
Classes/Domain/Repository/AbstractRepository.php
AbstractRepository.getRawModelByUid
public function getRawModelByUid(int $uid, int $languageUid = 0, array $querySettings = ['respectSysLanguage' => false]) { return $this->getRawObjectByUid($uid, $languageUid, $querySettings); }
php
public function getRawModelByUid(int $uid, int $languageUid = 0, array $querySettings = ['respectSysLanguage' => false]) { return $this->getRawObjectByUid($uid, $languageUid, $querySettings); }
[ "public", "function", "getRawModelByUid", "(", "int", "$", "uid", ",", "int", "$", "languageUid", "=", "0", ",", "array", "$", "querySettings", "=", "[", "'respectSysLanguage'", "=>", "false", "]", ")", "{", "return", "$", "this", "->", "getRawObjectByUid", ...
Gets a raw model by UID, alias for `getRawObjectByUid`. @param int $uid The UID @param int $languageUid The language UID, defaults to `0` @param array $querySettings The optional query settings to apply @return object|null The raw model or null if no model was found
[ "Gets", "a", "raw", "model", "by", "UID", "alias", "for", "getRawObjectByUid", "." ]
8c04b7688cc2773f11fcc87fda3f7cd53d80a980
https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Domain/Repository/AbstractRepository.php#L146-L148
201,435
t3v/t3v_core
Classes/Domain/Repository/AbstractRepository.php
AbstractRepository.findByPid
public function findByPid(int $pid, int $limit = 0, array $querySettings = ['respectSysLanguage' => true]) { if ($pid && $pid > 0) { // Create a new query. $query = $this->createquery(); // Apply the passed query settings. $query = $this->applyQuerySettings($query, $querySettings); /...
php
public function findByPid(int $pid, int $limit = 0, array $querySettings = ['respectSysLanguage' => true]) { if ($pid && $pid > 0) { // Create a new query. $query = $this->createquery(); // Apply the passed query settings. $query = $this->applyQuerySettings($query, $querySettings); /...
[ "public", "function", "findByPid", "(", "int", "$", "pid", ",", "int", "$", "limit", "=", "0", ",", "array", "$", "querySettings", "=", "[", "'respectSysLanguage'", "=>", "true", "]", ")", "{", "if", "(", "$", "pid", "&&", "$", "pid", ">", "0", ")"...
Finds objects by PID. @param int $pid The PID @param int $limit The optional limit, defaults to `0` @param array $querySettings The optional query settings to apply @return \TYPO3\CMS\Extbase\Persistence\Generic\QueryResult|null The found objects or null if no objects were found
[ "Finds", "objects", "by", "PID", "." ]
8c04b7688cc2773f11fcc87fda3f7cd53d80a980
https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Domain/Repository/AbstractRepository.php#L158-L181
201,436
t3v/t3v_core
Classes/Domain/Repository/AbstractRepository.php
AbstractRepository.findByPids
public function findByPids($pids, int $limit = 0, array $querySettings = ['respectSysLanguage' => true]) { if (is_string($pids)) { $pids = GeneralUtility::intExplode(',', $pids, true); } if (!empty($pids)) { // Create query $query = $this->createquery(); // Apply the passed query s...
php
public function findByPids($pids, int $limit = 0, array $querySettings = ['respectSysLanguage' => true]) { if (is_string($pids)) { $pids = GeneralUtility::intExplode(',', $pids, true); } if (!empty($pids)) { // Create query $query = $this->createquery(); // Apply the passed query s...
[ "public", "function", "findByPids", "(", "$", "pids", ",", "int", "$", "limit", "=", "0", ",", "array", "$", "querySettings", "=", "[", "'respectSysLanguage'", "=>", "true", "]", ")", "{", "if", "(", "is_string", "(", "$", "pids", ")", ")", "{", "$",...
Finds objects by multiple PIDs. @param array|string $pids The PIDs as array or as string, seperated by `,` @param int $limit The optional limit, defaults to `0` @param array $querySettings The optional query settings @return \TYPO3\CMS\Extbase\Persistence\Generic\QueryResult|null The found objects or null if no object...
[ "Finds", "objects", "by", "multiple", "PIDs", "." ]
8c04b7688cc2773f11fcc87fda3f7cd53d80a980
https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Domain/Repository/AbstractRepository.php#L191-L218
201,437
t3v/t3v_core
Classes/Domain/Repository/AbstractRepository.php
AbstractRepository.applyQuerySettings
protected function applyQuerySettings($query, array $settings) { if (!empty($settings)) { $respectStoragePage = $settings['respectStoragePage']; if (is_bool($respectStoragePage)) { $query->getQuerySettings()->setRespectStoragePage($respectStoragePage); } $respectSysLanguage = $sett...
php
protected function applyQuerySettings($query, array $settings) { if (!empty($settings)) { $respectStoragePage = $settings['respectStoragePage']; if (is_bool($respectStoragePage)) { $query->getQuerySettings()->setRespectStoragePage($respectStoragePage); } $respectSysLanguage = $sett...
[ "protected", "function", "applyQuerySettings", "(", "$", "query", ",", "array", "$", "settings", ")", "{", "if", "(", "!", "empty", "(", "$", "settings", ")", ")", "{", "$", "respectStoragePage", "=", "$", "settings", "[", "'respectStoragePage'", "]", ";",...
Applies settings on a query. @param object $query The query @param array $settings The settings to apply @return object The query with the applied settings
[ "Applies", "settings", "on", "a", "query", "." ]
8c04b7688cc2773f11fcc87fda3f7cd53d80a980
https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Domain/Repository/AbstractRepository.php#L227-L249
201,438
t3v/t3v_core
Classes/Domain/Repository/AbstractRepository.php
AbstractRepository.getOrderingsByField
protected function getOrderingsByField(string $field, array $values, string $order = QueryInterface::ORDER_DESCENDING): array { $orderings = []; if (!empty($values)) { foreach ($values as $value) { $orderings["$field={$value}"] = $order; } } return $orderings; }
php
protected function getOrderingsByField(string $field, array $values, string $order = QueryInterface::ORDER_DESCENDING): array { $orderings = []; if (!empty($values)) { foreach ($values as $value) { $orderings["$field={$value}"] = $order; } } return $orderings; }
[ "protected", "function", "getOrderingsByField", "(", "string", "$", "field", ",", "array", "$", "values", ",", "string", "$", "order", "=", "QueryInterface", "::", "ORDER_DESCENDING", ")", ":", "array", "{", "$", "orderings", "=", "[", "]", ";", "if", "(",...
Gets the orderings by a field. @param string $field The field @param array $values The values @param string $order The optional order, defaults to `QueryInterface::ORDER_DESCENDING` @return array The orderings
[ "Gets", "the", "orderings", "by", "a", "field", "." ]
8c04b7688cc2773f11fcc87fda3f7cd53d80a980
https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Domain/Repository/AbstractRepository.php#L259-L269
201,439
Retentio/Boomgo
src/Boomgo/Mapper/SimpleMapper.php
SimpleMapper.serialize
public function serialize($object) { if (!is_object($object)) { throw new \InvalidArgumentException('Argument must be an object'); } $reflectedObject = new \ReflectionObject($object); $reflectedProperties = $reflectedObject->getProperties(); $array = array(); ...
php
public function serialize($object) { if (!is_object($object)) { throw new \InvalidArgumentException('Argument must be an object'); } $reflectedObject = new \ReflectionObject($object); $reflectedProperties = $reflectedObject->getProperties(); $array = array(); ...
[ "public", "function", "serialize", "(", "$", "object", ")", "{", "if", "(", "!", "is_object", "(", "$", "object", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'Argument must be an object'", ")", ";", "}", "$", "reflectedObject", "="...
Convert an object to a mongoable array @param mixed $object @return array
[ "Convert", "an", "object", "to", "a", "mongoable", "array" ]
95cc53777425dd76cd0034046fa4f9e72c04d73a
https://github.com/Retentio/Boomgo/blob/95cc53777425dd76cd0034046fa4f9e72c04d73a/src/Boomgo/Mapper/SimpleMapper.php#L93-L117
201,440
Retentio/Boomgo
src/Boomgo/Mapper/SimpleMapper.php
SimpleMapper.getValue
private function getValue($object, \ReflectionProperty $property) { $value = null; if ($property->isPublic()) { $value = $property->getValue($object); } else { // Try to use accessor if property is not public $accessorName = $this->formatter->getPhpAccess...
php
private function getValue($object, \ReflectionProperty $property) { $value = null; if ($property->isPublic()) { $value = $property->getValue($object); } else { // Try to use accessor if property is not public $accessorName = $this->formatter->getPhpAccess...
[ "private", "function", "getValue", "(", "$", "object", ",", "\\", "ReflectionProperty", "$", "property", ")", "{", "$", "value", "=", "null", ";", "if", "(", "$", "property", "->", "isPublic", "(", ")", ")", "{", "$", "value", "=", "$", "property", "...
Return a value for an object property @param mixed $object @param \ReflectionProperty $property @return mixed
[ "Return", "a", "value", "for", "an", "object", "property" ]
95cc53777425dd76cd0034046fa4f9e72c04d73a
https://github.com/Retentio/Boomgo/blob/95cc53777425dd76cd0034046fa4f9e72c04d73a/src/Boomgo/Mapper/SimpleMapper.php#L161-L179
201,441
Retentio/Boomgo
src/Boomgo/Mapper/SimpleMapper.php
SimpleMapper.setValue
private function setValue($object, \ReflectionProperty $property, $value) { if ($property->isPublic()) { $property->setValue($object, $value); } else { // Try to use mutator if property is not public $mutatorName = $this->formatter->getPhpMutator($property->getNam...
php
private function setValue($object, \ReflectionProperty $property, $value) { if ($property->isPublic()) { $property->setValue($object, $value); } else { // Try to use mutator if property is not public $mutatorName = $this->formatter->getPhpMutator($property->getNam...
[ "private", "function", "setValue", "(", "$", "object", ",", "\\", "ReflectionProperty", "$", "property", ",", "$", "value", ")", "{", "if", "(", "$", "property", "->", "isPublic", "(", ")", ")", "{", "$", "property", "->", "setValue", "(", "$", "object...
Define a value for an object property @param mixed $object @param \ReflectionProperty $property @param mixed $value
[ "Define", "a", "value", "for", "an", "object", "property" ]
95cc53777425dd76cd0034046fa4f9e72c04d73a
https://github.com/Retentio/Boomgo/blob/95cc53777425dd76cd0034046fa4f9e72c04d73a/src/Boomgo/Mapper/SimpleMapper.php#L188-L202
201,442
kaiohken1982/NeobazaarDocumentModule
src/Document/Model/ModelFetcher.php
ModelFetcher.get
public function get($idOrDocument, $type = Document::DOCUMENT_TYPE_CLASSIFIED) { $neobazaarService = $this->getServiceLocator()->get('neobazaar.service.main'); $classifiedService = $this->getServiceLocator()->get('document.service.classified'); $documentRepository = $neobazaarService->getDo...
php
public function get($idOrDocument, $type = Document::DOCUMENT_TYPE_CLASSIFIED) { $neobazaarService = $this->getServiceLocator()->get('neobazaar.service.main'); $classifiedService = $this->getServiceLocator()->get('document.service.classified'); $documentRepository = $neobazaarService->getDo...
[ "public", "function", "get", "(", "$", "idOrDocument", ",", "$", "type", "=", "Document", "::", "DOCUMENT_TYPE_CLASSIFIED", ")", "{", "$", "neobazaarService", "=", "$", "this", "->", "getServiceLocator", "(", ")", "->", "get", "(", "'neobazaar.service.main'", ...
Fetch the correct model depending on user auth @param string|int|object $entity @param unknown $type @return object
[ "Fetch", "the", "correct", "model", "depending", "on", "user", "auth" ]
edb0223878fe02e791d2a0266c5a7c0f2029e3fe
https://github.com/kaiohken1982/NeobazaarDocumentModule/blob/edb0223878fe02e791d2a0266c5a7c0f2029e3fe/src/Document/Model/ModelFetcher.php#L44-L77
201,443
ciims/ciims-themes-default
Theme.php
Theme.afterSave
public function afterSave() { // Bust the cache Yii::app()->cache->delete($this->theme . '_settings_tweets'); Yii::app()->cache->delete($this->theme . '_settings_facebook_data'); Yii::app()->cache->delete($this->theme . '_settings_g+_activities'); return parent::afterSave(); }
php
public function afterSave() { // Bust the cache Yii::app()->cache->delete($this->theme . '_settings_tweets'); Yii::app()->cache->delete($this->theme . '_settings_facebook_data'); Yii::app()->cache->delete($this->theme . '_settings_g+_activities'); return parent::afterSave(); }
[ "public", "function", "afterSave", "(", ")", "{", "// Bust the cache", "Yii", "::", "app", "(", ")", "->", "cache", "->", "delete", "(", "$", "this", "->", "theme", ".", "'_settings_tweets'", ")", ";", "Yii", "::", "app", "(", ")", "->", "cache", "->",...
AfterSave Event Clears the local cache
[ "AfterSave", "Event", "Clears", "the", "local", "cache" ]
62c64e11f003bf61e137a7ebeed9804caa379f8e
https://github.com/ciims/ciims-themes-default/blob/62c64e11f003bf61e137a7ebeed9804caa379f8e/Theme.php#L79-L86
201,444
ciims/ciims-themes-default
Theme.php
Theme.getTweets
public function getTweets($postData=NULL) { header("Content-Type: application/json"); if ($this->twitterHandle == NULL || $this->twitterTweetsToFetch == 0) return false; try { $connection = new TwitterOAuth( Cii::getConfig('ha_twitter_key', NULL, NULL), Cii::getConfig('ha_twitte...
php
public function getTweets($postData=NULL) { header("Content-Type: application/json"); if ($this->twitterHandle == NULL || $this->twitterTweetsToFetch == 0) return false; try { $connection = new TwitterOAuth( Cii::getConfig('ha_twitter_key', NULL, NULL), Cii::getConfig('ha_twitte...
[ "public", "function", "getTweets", "(", "$", "postData", "=", "NULL", ")", "{", "header", "(", "\"Content-Type: application/json\"", ")", ";", "if", "(", "$", "this", "->", "twitterHandle", "==", "NULL", "||", "$", "this", "->", "twitterTweetsToFetch", "==", ...
getTweets callback method @param array $postdata $_POST response data
[ "getTweets", "callback", "method" ]
62c64e11f003bf61e137a7ebeed9804caa379f8e
https://github.com/ciims/ciims-themes-default/blob/62c64e11f003bf61e137a7ebeed9804caa379f8e/Theme.php#L92-L131
201,445
ciims/ciims-themes-default
Theme.php
Theme.getGooglePlusPosts
public function getGooglePlusPosts($postData=NULL) { $key = Cii::getConfig('google_plus_public_server_key'); if ($key == NULL || $this->googlePlusUserId == NULL) return false; $result = Yii::app()->cache->get($this->theme . '_settings_g+_activities'); if ($result == false) { $client = new Googl...
php
public function getGooglePlusPosts($postData=NULL) { $key = Cii::getConfig('google_plus_public_server_key'); if ($key == NULL || $this->googlePlusUserId == NULL) return false; $result = Yii::app()->cache->get($this->theme . '_settings_g+_activities'); if ($result == false) { $client = new Googl...
[ "public", "function", "getGooglePlusPosts", "(", "$", "postData", "=", "NULL", ")", "{", "$", "key", "=", "Cii", "::", "getConfig", "(", "'google_plus_public_server_key'", ")", ";", "if", "(", "$", "key", "==", "NULL", "||", "$", "this", "->", "googlePlusU...
getGooglePlusPosts callback method Retrieves recent activities from Google+ @param array $postdata $_POST response data
[ "getGooglePlusPosts", "callback", "method", "Retrieves", "recent", "activities", "from", "Google", "+" ]
62c64e11f003bf61e137a7ebeed9804caa379f8e
https://github.com/ciims/ciims-themes-default/blob/62c64e11f003bf61e137a7ebeed9804caa379f8e/Theme.php#L175-L196
201,446
austinkregel/Menu
src/Menu/Interfaces/AbstractMenu.php
AbstractMenu.generateLink
protected function generateLink($route, $params = null) { if ($route instanceof Closure) { // Have to stringify this before calling Route::has because it will // Fail if we don't pass a string in $route = $this->stringify($route); } if (\Route::has($route)...
php
protected function generateLink($route, $params = null) { if ($route instanceof Closure) { // Have to stringify this before calling Route::has because it will // Fail if we don't pass a string in $route = $this->stringify($route); } if (\Route::has($route)...
[ "protected", "function", "generateLink", "(", "$", "route", ",", "$", "params", "=", "null", ")", "{", "if", "(", "$", "route", "instanceof", "Closure", ")", "{", "// Have to stringify this before calling Route::has because it will", "// Fail if we don't pass a string in"...
This will generate a url relating to the given route, whether that is from a raw url or if it is a route. It will also grab the params for the values. @param string $route @param mixed $params @return string
[ "This", "will", "generate", "a", "url", "relating", "to", "the", "given", "route", "whether", "that", "is", "from", "a", "raw", "url", "or", "if", "it", "is", "a", "route", ".", "It", "will", "also", "grab", "the", "params", "for", "the", "values", "...
6bbae2ad210afc47f7eca1051a8cedf6a29a78ab
https://github.com/austinkregel/Menu/blob/6bbae2ad210afc47f7eca1051a8cedf6a29a78ab/src/Menu/Interfaces/AbstractMenu.php#L90-L112
201,447
austinkregel/Menu
src/Menu/Interfaces/AbstractMenu.php
AbstractMenu.run
private function run($callback) { $injects = []; $reflectionFunction = new \ReflectionFunction($callback); foreach ($reflectionFunction->getParameters() as $parameter) { if ($class = $parameter->getClass()) { $injects[] = app($class->name); } }...
php
private function run($callback) { $injects = []; $reflectionFunction = new \ReflectionFunction($callback); foreach ($reflectionFunction->getParameters() as $parameter) { if ($class = $parameter->getClass()) { $injects[] = app($class->name); } }...
[ "private", "function", "run", "(", "$", "callback", ")", "{", "$", "injects", "=", "[", "]", ";", "$", "reflectionFunction", "=", "new", "\\", "ReflectionFunction", "(", "$", "callback", ")", ";", "foreach", "(", "$", "reflectionFunction", "->", "getParame...
This is a dependancy injection function which allows the config function to have new classes without needing them to have a need for actually newing up the new objects. @param Callback $callback @return Closure
[ "This", "is", "a", "dependancy", "injection", "function", "which", "allows", "the", "config", "function", "to", "have", "new", "classes", "without", "needing", "them", "to", "have", "a", "need", "for", "actually", "newing", "up", "the", "new", "objects", "."...
6bbae2ad210afc47f7eca1051a8cedf6a29a78ab
https://github.com/austinkregel/Menu/blob/6bbae2ad210afc47f7eca1051a8cedf6a29a78ab/src/Menu/Interfaces/AbstractMenu.php#L171-L182
201,448
Fulfillment-dot-com/api-wrapper-php
src/Http/Request.php
Request.makeRequest
function makeRequest($method, $url, $apiRequest = null, $queryString = null) { $urlEndPoint = $this->config->getEndpoint() . '/' . $url; //we want to see the url being called $this->climate->out($this->config->getLoggerPrefix() . 'URL: ' . $urlEndPoint); $data = [ 'headers' => [ 'Authorization' => 'Be...
php
function makeRequest($method, $url, $apiRequest = null, $queryString = null) { $urlEndPoint = $this->config->getEndpoint() . '/' . $url; //we want to see the url being called $this->climate->out($this->config->getLoggerPrefix() . 'URL: ' . $urlEndPoint); $data = [ 'headers' => [ 'Authorization' => 'Be...
[ "function", "makeRequest", "(", "$", "method", ",", "$", "url", ",", "$", "apiRequest", "=", "null", ",", "$", "queryString", "=", "null", ")", "{", "$", "urlEndPoint", "=", "$", "this", "->", "config", "->", "getEndpoint", "(", ")", ".", "'/'", ".",...
Make a request to the API using Guzzle @param $method string The HTTP VERB to use for this request @param $url string The relative URL after the hostname @param null $apiRequest array The contents of the api body @param null $queryString array Data to add as a queryString to the url @return mi...
[ "Make", "a", "request", "to", "the", "API", "using", "Guzzle" ]
f4352843d060bc1b460c1283f25c210c9b94d324
https://github.com/Fulfillment-dot-com/api-wrapper-php/blob/f4352843d060bc1b460c1283f25c210c9b94d324/src/Http/Request.php#L118-L185
201,449
ZendExperts/phpids
lib/IDS/Init.php
IDS_Init.setConfigPath
public function setConfigPath($path) { if (file_exists($path)) { $this->configPath = $path; } else { throw new Exception( 'Configuration file could not be found at ' . htmlspecialchars($path, ENT_QUOTES, 'UTF-8') ); } }
php
public function setConfigPath($path) { if (file_exists($path)) { $this->configPath = $path; } else { throw new Exception( 'Configuration file could not be found at ' . htmlspecialchars($path, ENT_QUOTES, 'UTF-8') ); } }
[ "public", "function", "setConfigPath", "(", "$", "path", ")", "{", "if", "(", "file_exists", "(", "$", "path", ")", ")", "{", "$", "this", "->", "configPath", "=", "$", "path", ";", "}", "else", "{", "throw", "new", "Exception", "(", "'Configuration fi...
Sets the path to the configuration file @param string $path the path to the config @throws Exception if file not found @return void
[ "Sets", "the", "path", "to", "the", "configuration", "file" ]
f30df04eea47b94d056e2ae9ec8fea1c626f1c03
https://github.com/ZendExperts/phpids/blob/f30df04eea47b94d056e2ae9ec8fea1c626f1c03/lib/IDS/Init.php#L132-L142
201,450
ZendExperts/phpids
lib/IDS/Init.php
IDS_Init._mergeConfig
protected function _mergeConfig($current, $successor) { if (is_array($current) and is_array($successor)) { foreach ($successor as $key => $value) { if (isset($current[$key]) and is_array($value) and is_array($current[$key])) { ...
php
protected function _mergeConfig($current, $successor) { if (is_array($current) and is_array($successor)) { foreach ($successor as $key => $value) { if (isset($current[$key]) and is_array($value) and is_array($current[$key])) { ...
[ "protected", "function", "_mergeConfig", "(", "$", "current", ",", "$", "successor", ")", "{", "if", "(", "is_array", "(", "$", "current", ")", "and", "is_array", "(", "$", "successor", ")", ")", "{", "foreach", "(", "$", "successor", "as", "$", "key",...
Merge config hashes recursivly The algorithm merges configuration arrays recursively. If an element is an array in both, the values will be appended. If it is a scalar in both, the value will be replaced. @param array $current The legacy hash @param array $successor The hash which values count more when in doubt @r...
[ "Merge", "config", "hashes", "recursivly" ]
f30df04eea47b94d056e2ae9ec8fea1c626f1c03
https://github.com/ZendExperts/phpids/blob/f30df04eea47b94d056e2ae9ec8fea1c626f1c03/lib/IDS/Init.php#L198-L213
201,451
zarathustra323/modlr-data
src/Zarathustra/ModlrData/Metadata/EntityMetadata.php
EntityMetadata.merge
public function merge(EntityMetadata $metadata) { $this->setType($metadata->type); $this->setAbstract($metadata->isAbstract()); $this->setPolymorphic($metadata->isPolymorphic()); $this->extends = $metadata->extends; $this->mergeAttributes($metadata->getAttributes()); ...
php
public function merge(EntityMetadata $metadata) { $this->setType($metadata->type); $this->setAbstract($metadata->isAbstract()); $this->setPolymorphic($metadata->isPolymorphic()); $this->extends = $metadata->extends; $this->mergeAttributes($metadata->getAttributes()); ...
[ "public", "function", "merge", "(", "EntityMetadata", "$", "metadata", ")", "{", "$", "this", "->", "setType", "(", "$", "metadata", "->", "type", ")", ";", "$", "this", "->", "setAbstract", "(", "$", "metadata", "->", "isAbstract", "(", ")", ")", ";",...
Merges an EntityMetadata instance with this instance. For use with entity class extension. @param EntityMetadata $metadata @return self
[ "Merges", "an", "EntityMetadata", "instance", "with", "this", "instance", ".", "For", "use", "with", "entity", "class", "extension", "." ]
7c2c767216055f75abf8cf22e2200f11998ed24e
https://github.com/zarathustra323/modlr-data/blob/7c2c767216055f75abf8cf22e2200f11998ed24e/src/Zarathustra/ModlrData/Metadata/EntityMetadata.php#L83-L92
201,452
zarathustra323/modlr-data
src/Zarathustra/ModlrData/Metadata/EntityMetadata.php
EntityMetadata.setType
public function setType($type) { if (!is_string($type) || empty($type)) { throw MetadataException::invalidEntityType(); } $this->type = $type; return $this; }
php
public function setType($type) { if (!is_string($type) || empty($type)) { throw MetadataException::invalidEntityType(); } $this->type = $type; return $this; }
[ "public", "function", "setType", "(", "$", "type", ")", "{", "if", "(", "!", "is_string", "(", "$", "type", ")", "||", "empty", "(", "$", "type", ")", ")", "{", "throw", "MetadataException", "::", "invalidEntityType", "(", ")", ";", "}", "$", "this",...
Sets the entity type. @param string $type @return self @throws MetadataException If the type is not a string or is empty.
[ "Sets", "the", "entity", "type", "." ]
7c2c767216055f75abf8cf22e2200f11998ed24e
https://github.com/zarathustra323/modlr-data/blob/7c2c767216055f75abf8cf22e2200f11998ed24e/src/Zarathustra/ModlrData/Metadata/EntityMetadata.php#L101-L108
201,453
zarathustra323/modlr-data
src/Zarathustra/ModlrData/Metadata/EntityMetadata.php
EntityMetadata.mergeAttributes
private function mergeAttributes(array $toAdd) { $this->attributes = array_merge($this->attributes, $toAdd); ksort($this->attributes); return $this; }
php
private function mergeAttributes(array $toAdd) { $this->attributes = array_merge($this->attributes, $toAdd); ksort($this->attributes); return $this; }
[ "private", "function", "mergeAttributes", "(", "array", "$", "toAdd", ")", "{", "$", "this", "->", "attributes", "=", "array_merge", "(", "$", "this", "->", "attributes", ",", "$", "toAdd", ")", ";", "ksort", "(", "$", "this", "->", "attributes", ")", ...
Merges attributes with this instance's attributes. @param array $toAdd @return self
[ "Merges", "attributes", "with", "this", "instance", "s", "attributes", "." ]
7c2c767216055f75abf8cf22e2200f11998ed24e
https://github.com/zarathustra323/modlr-data/blob/7c2c767216055f75abf8cf22e2200f11998ed24e/src/Zarathustra/ModlrData/Metadata/EntityMetadata.php#L116-L121
201,454
zarathustra323/modlr-data
src/Zarathustra/ModlrData/Metadata/EntityMetadata.php
EntityMetadata.mergeRelationships
private function mergeRelationships(array $toAdd) { $this->relationships = array_merge($this->relationships, $toAdd); ksort($this->relationships); return $this; }
php
private function mergeRelationships(array $toAdd) { $this->relationships = array_merge($this->relationships, $toAdd); ksort($this->relationships); return $this; }
[ "private", "function", "mergeRelationships", "(", "array", "$", "toAdd", ")", "{", "$", "this", "->", "relationships", "=", "array_merge", "(", "$", "this", "->", "relationships", ",", "$", "toAdd", ")", ";", "ksort", "(", "$", "this", "->", "relationships...
Merges relationships with this instance's relationships. @param array $toAdd @return self
[ "Merges", "relationships", "with", "this", "instance", "s", "relationships", "." ]
7c2c767216055f75abf8cf22e2200f11998ed24e
https://github.com/zarathustra323/modlr-data/blob/7c2c767216055f75abf8cf22e2200f11998ed24e/src/Zarathustra/ModlrData/Metadata/EntityMetadata.php#L129-L134
201,455
zarathustra323/modlr-data
src/Zarathustra/ModlrData/Metadata/EntityMetadata.php
EntityMetadata.addAttribute
public function addAttribute(AttributeMetadata $attribute) { if (isset($this->relationships[$attribute->getKey()])) { throw MetadataException::fieldKeyInUse('attribute', 'relationship', $attribute->getKey(), $this->type); } $this->attributes[$attribute->getKey()] = $attribute; ...
php
public function addAttribute(AttributeMetadata $attribute) { if (isset($this->relationships[$attribute->getKey()])) { throw MetadataException::fieldKeyInUse('attribute', 'relationship', $attribute->getKey(), $this->type); } $this->attributes[$attribute->getKey()] = $attribute; ...
[ "public", "function", "addAttribute", "(", "AttributeMetadata", "$", "attribute", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "relationships", "[", "$", "attribute", "->", "getKey", "(", ")", "]", ")", ")", "{", "throw", "MetadataException", "::"...
Adds an attribute field to this entity. @param AttributeMetadata $attribute @return self @throws MetadataException If the attribute key already exists as a relationship.
[ "Adds", "an", "attribute", "field", "to", "this", "entity", "." ]
7c2c767216055f75abf8cf22e2200f11998ed24e
https://github.com/zarathustra323/modlr-data/blob/7c2c767216055f75abf8cf22e2200f11998ed24e/src/Zarathustra/ModlrData/Metadata/EntityMetadata.php#L208-L216
201,456
gplcart/backup
handlers/Module.php
Module.backup
public function backup(array $data, $model) { $directory = gplcart_file_private_module('backup'); if (!file_exists($directory) && !mkdir($directory, 0775, true)) { return false; } $data['type'] = 'module'; $data['name'] = $this->translation->text('Module @name',...
php
public function backup(array $data, $model) { $directory = gplcart_file_private_module('backup'); if (!file_exists($directory) && !mkdir($directory, 0775, true)) { return false; } $data['type'] = 'module'; $data['name'] = $this->translation->text('Module @name',...
[ "public", "function", "backup", "(", "array", "$", "data", ",", "$", "model", ")", "{", "$", "directory", "=", "gplcart_file_private_module", "(", "'backup'", ")", ";", "if", "(", "!", "file_exists", "(", "$", "directory", ")", "&&", "!", "mkdir", "(", ...
Creates a module backup @param array $data @param \gplcart\modules\backup\models\Backup $model @return boolean
[ "Creates", "a", "module", "backup" ]
5838e2f47f0bb8c2e18b6697e20bec5682b71393
https://github.com/gplcart/backup/blob/5838e2f47f0bb8c2e18b6697e20bec5682b71393/handlers/Module.php#L49-L71
201,457
phossa/phossa-logger
src/Phossa/Logger/Handler/BrowserHandler.php
BrowserHandler.flush
public static function flush() { // Check content type $html = true; foreach (headers_list() as $header) { if (stripos($header, 'content-type:') === 0) { if (stripos($header, 'application/javascript') !== false || stripos($header, 'text/javascr...
php
public static function flush() { // Check content type $html = true; foreach (headers_list() as $header) { if (stripos($header, 'content-type:') === 0) { if (stripos($header, 'application/javascript') !== false || stripos($header, 'text/javascr...
[ "public", "static", "function", "flush", "(", ")", "{", "// Check content type", "$", "html", "=", "true", ";", "foreach", "(", "headers_list", "(", ")", "as", "$", "header", ")", "{", "if", "(", "stripos", "(", "$", "header", ",", "'content-type:'", ")"...
flush the messages to browser by adding to HTML page @return void @access public @static @api
[ "flush", "the", "messages", "to", "browser", "by", "adding", "to", "HTML", "page" ]
dfec8a1e6015c66d2aa77134077902fd3d49e41d
https://github.com/phossa/phossa-logger/blob/dfec8a1e6015c66d2aa77134077902fd3d49e41d/src/Phossa/Logger/Handler/BrowserHandler.php#L93-L118
201,458
itkg/core
src/Itkg/Core/Command/CommandExecuterAbstract.php
CommandExecuterAbstract.execute
public function execute(InputInterface $input, OutputInterface $output) { $this->output = $output; try { $this->doExecute($input, $output); } catch (\Exception $e) { $this->writeException($e); } }
php
public function execute(InputInterface $input, OutputInterface $output) { $this->output = $output; try { $this->doExecute($input, $output); } catch (\Exception $e) { $this->writeException($e); } }
[ "public", "function", "execute", "(", "InputInterface", "$", "input", ",", "OutputInterface", "$", "output", ")", "{", "$", "this", "->", "output", "=", "$", "output", ";", "try", "{", "$", "this", "->", "doExecute", "(", "$", "input", ",", "$", "outpu...
Execute command and type @param InputInterface $input @param OutputInterface $output @throws \RuntimeException @throws \LogicException @return void
[ "Execute", "command", "and", "type" ]
e5e4efb05feb4d23b0df41f2b21fd095103e593b
https://github.com/itkg/core/blob/e5e4efb05feb4d23b0df41f2b21fd095103e593b/src/Itkg/Core/Command/CommandExecuterAbstract.php#L63-L71
201,459
itkg/core
src/Itkg/Core/Command/CommandExecuterAbstract.php
CommandExecuterAbstract.write
protected function write($message, array $record = array()) { $record = array_merge($this->defautlRecord, $record); $record['msg'] = $message; $this->output->writeln($this->formatter->format($record)); }
php
protected function write($message, array $record = array()) { $record = array_merge($this->defautlRecord, $record); $record['msg'] = $message; $this->output->writeln($this->formatter->format($record)); }
[ "protected", "function", "write", "(", "$", "message", ",", "array", "$", "record", "=", "array", "(", ")", ")", "{", "$", "record", "=", "array_merge", "(", "$", "this", "->", "defautlRecord", ",", "$", "record", ")", ";", "$", "record", "[", "'msg'...
Write a message with extra record params @param string $message @param array $record
[ "Write", "a", "message", "with", "extra", "record", "params" ]
e5e4efb05feb4d23b0df41f2b21fd095103e593b
https://github.com/itkg/core/blob/e5e4efb05feb4d23b0df41f2b21fd095103e593b/src/Itkg/Core/Command/CommandExecuterAbstract.php#L90-L95
201,460
itkg/core
src/Itkg/Core/Command/CommandExecuterAbstract.php
CommandExecuterAbstract.writeException
protected function writeException(\Exception $exception, array $record = array()) { $record = array_merge($this->defautlRecord, $record); $this->output->writeln($this->formatter->formatException($exception, $record)); }
php
protected function writeException(\Exception $exception, array $record = array()) { $record = array_merge($this->defautlRecord, $record); $this->output->writeln($this->formatter->formatException($exception, $record)); }
[ "protected", "function", "writeException", "(", "\\", "Exception", "$", "exception", ",", "array", "$", "record", "=", "array", "(", ")", ")", "{", "$", "record", "=", "array_merge", "(", "$", "this", "->", "defautlRecord", ",", "$", "record", ")", ";", ...
Write an exception with extra record params @param \Exception $exception @param array $record
[ "Write", "an", "exception", "with", "extra", "record", "params" ]
e5e4efb05feb4d23b0df41f2b21fd095103e593b
https://github.com/itkg/core/blob/e5e4efb05feb4d23b0df41f2b21fd095103e593b/src/Itkg/Core/Command/CommandExecuterAbstract.php#L128-L132
201,461
web-chefs/LaraAppSpawn
src/Components/Database.php
Database.boot
public function boot(Application $app, ConfigContract &$appConfig) { // Setup test DB $appConfig->set('database.connections.' . $this->connection, $this->options); $appConfig->set('database.default', $this->connection); // Set database migration path EG: /mysite/database/ $a...
php
public function boot(Application $app, ConfigContract &$appConfig) { // Setup test DB $appConfig->set('database.connections.' . $this->connection, $this->options); $appConfig->set('database.default', $this->connection); // Set database migration path EG: /mysite/database/ $a...
[ "public", "function", "boot", "(", "Application", "$", "app", ",", "ConfigContract", "&", "$", "appConfig", ")", "{", "// Setup test DB", "$", "appConfig", "->", "set", "(", "'database.connections.'", ".", "$", "this", "->", "connection", ",", "$", "this", "...
Run setup component. @return
[ "Run", "setup", "component", "." ]
0eda486590fe7ca450836b9927a2498ff853cba6
https://github.com/web-chefs/LaraAppSpawn/blob/0eda486590fe7ca450836b9927a2498ff853cba6/src/Components/Database.php#L58-L66
201,462
Torann/skosh-generator
src/Site.php
Site.addContent
public function addContent($content) { if ($content instanceof Page) { $this->addPage($content); } else { if ($content) { $this->addChild($content); } else { throw new Exception("Unknown content type."); ...
php
public function addContent($content) { if ($content instanceof Page) { $this->addPage($content); } else { if ($content) { $this->addChild($content); } else { throw new Exception("Unknown content type."); ...
[ "public", "function", "addContent", "(", "$", "content", ")", "{", "if", "(", "$", "content", "instanceof", "Page", ")", "{", "$", "this", "->", "addPage", "(", "$", "content", ")", ";", "}", "else", "{", "if", "(", "$", "content", ")", "{", "$", ...
Add content to site. @param Page|Content $content @throws Exception
[ "Add", "content", "to", "site", "." ]
ea60e037d92398d7c146eb2349735d5692e3c48c
https://github.com/Torann/skosh-generator/blob/ea60e037d92398d7c146eb2349735d5692e3c48c/src/Site.php#L69-L82
201,463
Torann/skosh-generator
src/Site.php
Site.addChild
public function addChild(Content $child) { $this->pages[$child->id] = $child; // Group by category if (!isset($this->categories[$child->category])) { $this->categories[$child->category] = []; } // Add post to category $this->categories[$child->category][...
php
public function addChild(Content $child) { $this->pages[$child->id] = $child; // Group by category if (!isset($this->categories[$child->category])) { $this->categories[$child->category] = []; } // Add post to category $this->categories[$child->category][...
[ "public", "function", "addChild", "(", "Content", "$", "child", ")", "{", "$", "this", "->", "pages", "[", "$", "child", "->", "id", "]", "=", "$", "child", ";", "// Group by category", "if", "(", "!", "isset", "(", "$", "this", "->", "categories", "...
Add child to page. @param Content $child
[ "Add", "child", "to", "page", "." ]
ea60e037d92398d7c146eb2349735d5692e3c48c
https://github.com/Torann/skosh-generator/blob/ea60e037d92398d7c146eb2349735d5692e3c48c/src/Site.php#L99-L110
201,464
shgysk8zer0/core_api
traits/pdo_backups.php
PDO_Backups.restore
final public function restore($fname = null) { if (is_null($fname)) { $fname = $this->database; } if ($this->pathExtension($fname) === '') { $fname .= '.sql'; } if ($this->pathDirname($fname) === '.') { $fname = $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . $fname; } if (@file_exists($fname...
php
final public function restore($fname = null) { if (is_null($fname)) { $fname = $this->database; } if ($this->pathExtension($fname) === '') { $fname .= '.sql'; } if ($this->pathDirname($fname) === '.') { $fname = $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . $fname; } if (@file_exists($fname...
[ "final", "public", "function", "restore", "(", "$", "fname", "=", "null", ")", "{", "if", "(", "is_null", "(", "$", "fname", ")", ")", "{", "$", "fname", "=", "$", "this", "->", "database", ";", "}", "if", "(", "$", "this", "->", "pathExtension", ...
Restore a file from a mysqldump @param string $fname Name of file, defaults to database name @return bool
[ "Restore", "a", "file", "from", "a", "mysqldump" ]
9e9b8baf761af874b95256ad2462e55fbb2b2e58
https://github.com/shgysk8zer0/core_api/blob/9e9b8baf761af874b95256ad2462e55fbb2b2e58/traits/pdo_backups.php#L76-L92
201,465
ARCANESOFT/Media
src/Media.php
Media.all
public function all($directory = '/') { $directories = $this->directories($directory)->transform(function ($item) { return $item + ['type' => self::MEDIA_TYPE_DIRECTORY]; }); $files = $this->files($directory)->transform(function (array $item) { return $item + ['type'...
php
public function all($directory = '/') { $directories = $this->directories($directory)->transform(function ($item) { return $item + ['type' => self::MEDIA_TYPE_DIRECTORY]; }); $files = $this->files($directory)->transform(function (array $item) { return $item + ['type'...
[ "public", "function", "all", "(", "$", "directory", "=", "'/'", ")", "{", "$", "directories", "=", "$", "this", "->", "directories", "(", "$", "directory", ")", "->", "transform", "(", "function", "(", "$", "item", ")", "{", "return", "$", "item", "+...
Get all the directories & files from a given location. @param string $directory @return array
[ "Get", "all", "the", "directories", "&", "files", "from", "a", "given", "location", "." ]
e98aad52f94e6587fcbf79c56f7bf7072929bfc9
https://github.com/ARCANESOFT/Media/blob/e98aad52f94e6587fcbf79c56f7bf7072929bfc9/src/Media.php#L136-L147
201,466
ARCANESOFT/Media
src/Media.php
Media.files
public function files($directory) { $this->checkDirectory($directory); $disk = $this->disk(); // TODO: Add a feature to exclude unwanted files. $files = array_map(function ($filePath) use ($disk, $directory) { return [ 'name' => str_replace("$dir...
php
public function files($directory) { $this->checkDirectory($directory); $disk = $this->disk(); // TODO: Add a feature to exclude unwanted files. $files = array_map(function ($filePath) use ($disk, $directory) { return [ 'name' => str_replace("$dir...
[ "public", "function", "files", "(", "$", "directory", ")", "{", "$", "this", "->", "checkDirectory", "(", "$", "directory", ")", ";", "$", "disk", "=", "$", "this", "->", "disk", "(", ")", ";", "// TODO: Add a feature to exclude unwanted files.", "$", "files...
Get a collection of all files in a directory. @param string $directory @return \Arcanesoft\Media\Entities\FileCollection
[ "Get", "a", "collection", "of", "all", "files", "in", "a", "directory", "." ]
e98aad52f94e6587fcbf79c56f7bf7072929bfc9
https://github.com/ARCANESOFT/Media/blob/e98aad52f94e6587fcbf79c56f7bf7072929bfc9/src/Media.php#L178-L198
201,467
ARCANESOFT/Media
src/Media.php
Media.file
public function file($path) { return $this->files(dirname($path))->first(function ($file) use ($path) { return $file['path'] === $path; }, function () use ($path) { throw new FileNotFoundException("File [$path] not found!"); }); }
php
public function file($path) { return $this->files(dirname($path))->first(function ($file) use ($path) { return $file['path'] === $path; }, function () use ($path) { throw new FileNotFoundException("File [$path] not found!"); }); }
[ "public", "function", "file", "(", "$", "path", ")", "{", "return", "$", "this", "->", "files", "(", "dirname", "(", "$", "path", ")", ")", "->", "first", "(", "function", "(", "$", "file", ")", "use", "(", "$", "path", ")", "{", "return", "$", ...
Get the file details. @param string $path @return array
[ "Get", "the", "file", "details", "." ]
e98aad52f94e6587fcbf79c56f7bf7072929bfc9
https://github.com/ARCANESOFT/Media/blob/e98aad52f94e6587fcbf79c56f7bf7072929bfc9/src/Media.php#L207-L214
201,468
ARCANESOFT/Media
src/Media.php
Media.storeMany
public function storeMany($directory, array $files) { $uploaded = []; foreach ($files as $file) { /** @var \Illuminate\Http\UploadedFile $file */ $uploaded[$directory.'/'.$file->getClientOriginalName()] = $this->store($directory, $file); } return $uploaded; ...
php
public function storeMany($directory, array $files) { $uploaded = []; foreach ($files as $file) { /** @var \Illuminate\Http\UploadedFile $file */ $uploaded[$directory.'/'.$file->getClientOriginalName()] = $this->store($directory, $file); } return $uploaded; ...
[ "public", "function", "storeMany", "(", "$", "directory", ",", "array", "$", "files", ")", "{", "$", "uploaded", "=", "[", "]", ";", "foreach", "(", "$", "files", "as", "$", "file", ")", "{", "/** @var \\Illuminate\\Http\\UploadedFile $file */", "$", "upload...
Store an array of files. @param string $directory @param array $files @return array
[ "Store", "an", "array", "of", "files", "." ]
e98aad52f94e6587fcbf79c56f7bf7072929bfc9
https://github.com/ARCANESOFT/Media/blob/e98aad52f94e6587fcbf79c56f7bf7072929bfc9/src/Media.php#L224-L234
201,469
ARCANESOFT/Media
src/Media.php
Media.isExcludedDirectory
public function isExcludedDirectory($directory) { foreach ($this->getExcludedDirectories() as $pattern) { if (Str::is($pattern, $directory)) return true; } return false; }
php
public function isExcludedDirectory($directory) { foreach ($this->getExcludedDirectories() as $pattern) { if (Str::is($pattern, $directory)) return true; } return false; }
[ "public", "function", "isExcludedDirectory", "(", "$", "directory", ")", "{", "foreach", "(", "$", "this", "->", "getExcludedDirectories", "(", ")", "as", "$", "pattern", ")", "{", "if", "(", "Str", "::", "is", "(", "$", "pattern", ",", "$", "directory",...
Check if the directory is excluded. @param string $directory @return bool
[ "Check", "if", "the", "directory", "is", "excluded", "." ]
e98aad52f94e6587fcbf79c56f7bf7072929bfc9
https://github.com/ARCANESOFT/Media/blob/e98aad52f94e6587fcbf79c56f7bf7072929bfc9/src/Media.php#L345-L352
201,470
ARCANESOFT/Media
src/Media.php
Media.checkDirectory
protected function checkDirectory(&$directory) { $directory = trim($directory, '/'); $this->checkDirectoryExists($directory); $this->checkDirectoryAccess($directory); }
php
protected function checkDirectory(&$directory) { $directory = trim($directory, '/'); $this->checkDirectoryExists($directory); $this->checkDirectoryAccess($directory); }
[ "protected", "function", "checkDirectory", "(", "&", "$", "directory", ")", "{", "$", "directory", "=", "trim", "(", "$", "directory", ",", "'/'", ")", ";", "$", "this", "->", "checkDirectoryExists", "(", "$", "directory", ")", ";", "$", "this", "->", ...
Check the given directory location. @param string &$directory @throws \Arcanesoft\Media\Exceptions\DirectoryNotFound @throws \Arcanesoft\Media\Exceptions\AccessNotAllowed
[ "Check", "the", "given", "directory", "location", "." ]
e98aad52f94e6587fcbf79c56f7bf7072929bfc9
https://github.com/ARCANESOFT/Media/blob/e98aad52f94e6587fcbf79c56f7bf7072929bfc9/src/Media.php#L367-L373
201,471
azhai/code-refactor
examples/class-wp-site.php
WP_Site.get_instance
public static function get_instance($site_id) { global $wpdb; $site_id = (int) $site_id; if (! $site_id) { return false; } $_site = wp_cache_get($site_id, 'sites'); if (! $_site) { $_site = $wpdb->get_row($wpdb->prepare("SELECT * FROM {$wpdb...
php
public static function get_instance($site_id) { global $wpdb; $site_id = (int) $site_id; if (! $site_id) { return false; } $_site = wp_cache_get($site_id, 'sites'); if (! $_site) { $_site = $wpdb->get_row($wpdb->prepare("SELECT * FROM {$wpdb...
[ "public", "static", "function", "get_instance", "(", "$", "site_id", ")", "{", "global", "$", "wpdb", ";", "$", "site_id", "=", "(", "int", ")", "$", "site_id", ";", "if", "(", "!", "$", "site_id", ")", "{", "return", "false", ";", "}", "$", "_site...
Retrieves a site from the database by its ID. @static @since 4.5.0 @global wpdb $wpdb WordPress database abstraction object. @param int $site_id The ID of the site to retrieve. @return WP_Site|false The site's object if found. False if not.
[ "Retrieves", "a", "site", "from", "the", "database", "by", "its", "ID", "." ]
cddb437d72f8239957daeba8211dda5e9366d6ca
https://github.com/azhai/code-refactor/blob/cddb437d72f8239957daeba8211dda5e9366d6ca/examples/class-wp-site.php#L157-L179
201,472
azhai/code-refactor
examples/class-wp-site.php
WP_Site.__isset
public function __isset($key) { switch ($key) { case 'id': case 'network_id': return true; case 'blogname': case 'siteurl': case 'post_count': case 'home': if (! did_action('ms_loaded')) { ...
php
public function __isset($key) { switch ($key) { case 'id': case 'network_id': return true; case 'blogname': case 'siteurl': case 'post_count': case 'home': if (! did_action('ms_loaded')) { ...
[ "public", "function", "__isset", "(", "$", "key", ")", "{", "switch", "(", "$", "key", ")", "{", "case", "'id'", ":", "case", "'network_id'", ":", "return", "true", ";", "case", "'blogname'", ":", "case", "'siteurl'", ":", "case", "'post_count'", ":", ...
Isset-er. Allows current multisite naming conventions when checking for properties. Checks for extended site properties. @since 4.6.0 @param string $key Property to check if set. @return bool Whether the property is set.
[ "Isset", "-", "er", "." ]
cddb437d72f8239957daeba8211dda5e9366d6ca
https://github.com/azhai/code-refactor/blob/cddb437d72f8239957daeba8211dda5e9366d6ca/examples/class-wp-site.php#L257-L283
201,473
azhai/code-refactor
examples/class-wp-site.php
WP_Site.get_details
private function get_details() { $details = wp_cache_get($this->blog_id, 'site-details'); if (false === $details) { switch_to_blog($this->blog_id); // Create a raw copy of the object for backwards compatibility with the filter below. $details = new stdClass(); ...
php
private function get_details() { $details = wp_cache_get($this->blog_id, 'site-details'); if (false === $details) { switch_to_blog($this->blog_id); // Create a raw copy of the object for backwards compatibility with the filter below. $details = new stdClass(); ...
[ "private", "function", "get_details", "(", ")", "{", "$", "details", "=", "wp_cache_get", "(", "$", "this", "->", "blog_id", ",", "'site-details'", ")", ";", "if", "(", "false", "===", "$", "details", ")", "{", "switch_to_blog", "(", "$", "this", "->", ...
Retrieves the details for this site. This method is used internally to lazy-load the extended properties of a site. @since 4.6.0 @see WP_Site::__get() @return stdClass A raw site object with all details included.
[ "Retrieves", "the", "details", "for", "this", "site", "." ]
cddb437d72f8239957daeba8211dda5e9366d6ca
https://github.com/azhai/code-refactor/blob/cddb437d72f8239957daeba8211dda5e9366d6ca/examples/class-wp-site.php#L320-L353
201,474
hd-deman/ShortMessage
lib/ShortMessage/Client/DevinoClient.php
DevinoClient.getsessionIdApiCall
public static function getsessionIdApiCall($login, $password) { $sessionId = ""; try { $response = self::$buzz->get(self::BASE_URL.'/User/sessionId?login='.$login.'&password='.$password); $sessionId = str_replace('"', '', $response->getContent()); } catch (\Exception...
php
public static function getsessionIdApiCall($login, $password) { $sessionId = ""; try { $response = self::$buzz->get(self::BASE_URL.'/User/sessionId?login='.$login.'&password='.$password); $sessionId = str_replace('"', '', $response->getContent()); } catch (\Exception...
[ "public", "static", "function", "getsessionIdApiCall", "(", "$", "login", ",", "$", "password", ")", "{", "$", "sessionId", "=", "\"\"", ";", "try", "{", "$", "response", "=", "self", "::", "$", "buzz", "->", "get", "(", "self", "::", "BASE_URL", ".", ...
Session ID Queue @access public @static @param string $login User name @param string $password Password @return string Session ID @throws DevinoException
[ "Session", "ID", "Queue" ]
b18595fa11fcff34d3d6dbb95dc1011bcbcd09ac
https://github.com/hd-deman/ShortMessage/blob/b18595fa11fcff34d3d6dbb95dc1011bcbcd09ac/lib/ShortMessage/Client/DevinoClient.php#L37-L50
201,475
hd-deman/ShortMessage
lib/ShortMessage/Client/DevinoClient.php
DevinoClient.createRequestParameters
protected static function createRequestParameters($sessionId, $sourceAddres, $destinationAddress, $data, $sendDate = null, $validity = 0) { $parameters = array( 'sessionId' => $sessionId, 'sourceAddress' => $sourceAddres, 'data' => $data ); if (gettype($d...
php
protected static function createRequestParameters($sessionId, $sourceAddres, $destinationAddress, $data, $sendDate = null, $validity = 0) { $parameters = array( 'sessionId' => $sessionId, 'sourceAddress' => $sourceAddres, 'data' => $data ); if (gettype($d...
[ "protected", "static", "function", "createRequestParameters", "(", "$", "sessionId", ",", "$", "sourceAddres", ",", "$", "destinationAddress", ",", "$", "data", ",", "$", "sendDate", "=", "null", ",", "$", "validity", "=", "0", ")", "{", "$", "parameters", ...
SMS send request parameters preparation @access public @static @param string $sessionId Session ID. @see getsessionId_St @param string $sourceAddres sender name(up to 11 chars) or phone number(up to 15 digits) @param string $destinationAddress destination phone. Country code+cellular code+phone numb...
[ "SMS", "send", "request", "parameters", "preparation" ]
b18595fa11fcff34d3d6dbb95dc1011bcbcd09ac
https://github.com/hd-deman/ShortMessage/blob/b18595fa11fcff34d3d6dbb95dc1011bcbcd09ac/lib/ShortMessage/Client/DevinoClient.php#L107-L134
201,476
Linkvalue-Interne/MajoraFrameworkExtraBundle
src/Majora/Bundle/FrameworkExtraBundle/Controller/ControllerTrait.php
ControllerTrait.checkSecurity
protected function checkSecurity($intention, $resource = null) { $securityMapping = $this->getSecurityMapping(); return $this->container->get('security.authorization_checker')->isGranted( (array) (empty($securityMapping[$intention]) ? $intention : $securi...
php
protected function checkSecurity($intention, $resource = null) { $securityMapping = $this->getSecurityMapping(); return $this->container->get('security.authorization_checker')->isGranted( (array) (empty($securityMapping[$intention]) ? $intention : $securi...
[ "protected", "function", "checkSecurity", "(", "$", "intention", ",", "$", "resource", "=", "null", ")", "{", "$", "securityMapping", "=", "$", "this", "->", "getSecurityMapping", "(", ")", ";", "return", "$", "this", "->", "container", "->", "get", "(", ...
checks security for given intention @param string $intention @param mixed $resource @return boolean
[ "checks", "security", "for", "given", "intention" ]
6f368380cfc39d27fafb0844e9a53b4d86d7c034
https://github.com/Linkvalue-Interne/MajoraFrameworkExtraBundle/blob/6f368380cfc39d27fafb0844e9a53b4d86d7c034/src/Majora/Bundle/FrameworkExtraBundle/Controller/ControllerTrait.php#L43-L54
201,477
Linkvalue-Interne/MajoraFrameworkExtraBundle
src/Majora/Bundle/FrameworkExtraBundle/Controller/ControllerTrait.php
ControllerTrait.extractQueryFilter
protected function extractQueryFilter(Request $request) { return array_map( function ($value) { return array_filter(explode(',', trim($value, ',')), function ($var) { return !empty($var); }); }, $request->query->all() ...
php
protected function extractQueryFilter(Request $request) { return array_map( function ($value) { return array_filter(explode(',', trim($value, ',')), function ($var) { return !empty($var); }); }, $request->query->all() ...
[ "protected", "function", "extractQueryFilter", "(", "Request", "$", "request", ")", "{", "return", "array_map", "(", "function", "(", "$", "value", ")", "{", "return", "array_filter", "(", "explode", "(", "','", ",", "trim", "(", "$", "value", ",", "','", ...
Extract available query filter from request. @param Request $request @return array
[ "Extract", "available", "query", "filter", "from", "request", "." ]
6f368380cfc39d27fafb0844e9a53b4d86d7c034
https://github.com/Linkvalue-Interne/MajoraFrameworkExtraBundle/blob/6f368380cfc39d27fafb0844e9a53b4d86d7c034/src/Majora/Bundle/FrameworkExtraBundle/Controller/ControllerTrait.php#L63-L73
201,478
Linkvalue-Interne/MajoraFrameworkExtraBundle
src/Majora/Bundle/FrameworkExtraBundle/Controller/ControllerTrait.php
ControllerTrait.retrieveOr404
protected function retrieveOr404($entityId, $loaderId) { if (!$this->container->has($loaderId)) { throw new NotFoundHttpException(sprintf('Unknow required loader : "%s"', $loaderId )); } if (!$entity = $this->container->get($loaderId)->retrieve($entit...
php
protected function retrieveOr404($entityId, $loaderId) { if (!$this->container->has($loaderId)) { throw new NotFoundHttpException(sprintf('Unknow required loader : "%s"', $loaderId )); } if (!$entity = $this->container->get($loaderId)->retrieve($entit...
[ "protected", "function", "retrieveOr404", "(", "$", "entityId", ",", "$", "loaderId", ")", "{", "if", "(", "!", "$", "this", "->", "container", "->", "has", "(", "$", "loaderId", ")", ")", "{", "throw", "new", "NotFoundHttpException", "(", "sprintf", "("...
Retrieves entity for given id into given repository service. @param $entityId @param $loaderId @return Object @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
[ "Retrieves", "entity", "for", "given", "id", "into", "given", "repository", "service", "." ]
6f368380cfc39d27fafb0844e9a53b4d86d7c034
https://github.com/Linkvalue-Interne/MajoraFrameworkExtraBundle/blob/6f368380cfc39d27fafb0844e9a53b4d86d7c034/src/Majora/Bundle/FrameworkExtraBundle/Controller/ControllerTrait.php#L85-L98
201,479
Linkvalue-Interne/MajoraFrameworkExtraBundle
src/Majora/Bundle/FrameworkExtraBundle/Controller/ControllerTrait.php
ControllerTrait.create404
protected function create404($entityId, $loaderId) { return new NotFoundHttpException(sprintf('Entity with id "%s" not found%s.', $entityId, $this->container->getParameter('kernel.debug') ? sprintf(' : (looked into "%s")', $loaderId) : '' )); ...
php
protected function create404($entityId, $loaderId) { return new NotFoundHttpException(sprintf('Entity with id "%s" not found%s.', $entityId, $this->container->getParameter('kernel.debug') ? sprintf(' : (looked into "%s")', $loaderId) : '' )); ...
[ "protected", "function", "create404", "(", "$", "entityId", ",", "$", "loaderId", ")", "{", "return", "new", "NotFoundHttpException", "(", "sprintf", "(", "'Entity with id \"%s\" not found%s.'", ",", "$", "entityId", ",", "$", "this", "->", "container", "->", "g...
create a formatted http not found exception. @param string $entityId @param string $loaderId @return NotFoundHttpException
[ "create", "a", "formatted", "http", "not", "found", "exception", "." ]
6f368380cfc39d27fafb0844e9a53b4d86d7c034
https://github.com/Linkvalue-Interne/MajoraFrameworkExtraBundle/blob/6f368380cfc39d27fafb0844e9a53b4d86d7c034/src/Majora/Bundle/FrameworkExtraBundle/Controller/ControllerTrait.php#L108-L116
201,480
erenmustafaozdal/laravel-modules-base
src/Controllers/OperationTrait.php
OperationTrait.destroyModel
public function destroyModel($model, $path = null) { $this->model = $model; try { if ( ! $this->model->delete()) { throw new DestroyException($this->model); } event(new $this->events['success']($this->model)); if (is_null($path)) { ...
php
public function destroyModel($model, $path = null) { $this->model = $model; try { if ( ! $this->model->delete()) { throw new DestroyException($this->model); } event(new $this->events['success']($this->model)); if (is_null($path)) { ...
[ "public", "function", "destroyModel", "(", "$", "model", ",", "$", "path", "=", "null", ")", "{", "$", "this", "->", "model", "=", "$", "model", ";", "try", "{", "if", "(", "!", "$", "this", "->", "model", "->", "delete", "(", ")", ")", "{", "t...
destroy data of the eloquent model or models @param \Illuminate\Database\Eloquent\Model|array $model [Model|ids] @param string|null $path @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
[ "destroy", "data", "of", "the", "eloquent", "model", "or", "models" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Controllers/OperationTrait.php#L209-L233
201,481
erenmustafaozdal/laravel-modules-base
src/Controllers/OperationTrait.php
OperationTrait.destroyGroupAction
protected function destroyGroupAction($class) { $result = $class::destroy($this->request->id); if ( is_integer($result) && $result > 0) { return true; } return false; }
php
protected function destroyGroupAction($class) { $result = $class::destroy($this->request->id); if ( is_integer($result) && $result > 0) { return true; } return false; }
[ "protected", "function", "destroyGroupAction", "(", "$", "class", ")", "{", "$", "result", "=", "$", "class", "::", "destroy", "(", "$", "this", "->", "request", "->", "id", ")", ";", "if", "(", "is_integer", "(", "$", "result", ")", "&&", "$", "resu...
destroy group action @param $class @return boolean
[ "destroy", "group", "action" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Controllers/OperationTrait.php#L261-L268
201,482
erenmustafaozdal/laravel-modules-base
src/Controllers/OperationTrait.php
OperationTrait.notPublishGroupAction
protected function notPublishGroupAction($class) { try { if ( ! $class::whereIn('id', $this->request->id)->update(['is_publish' => false])) { throw new UpdateException($this->request->id, 'group not not published'); } event(new $this->events['success']($th...
php
protected function notPublishGroupAction($class) { try { if ( ! $class::whereIn('id', $this->request->id)->update(['is_publish' => false])) { throw new UpdateException($this->request->id, 'group not not published'); } event(new $this->events['success']($th...
[ "protected", "function", "notPublishGroupAction", "(", "$", "class", ")", "{", "try", "{", "if", "(", "!", "$", "class", "::", "whereIn", "(", "'id'", ",", "$", "this", "->", "request", "->", "id", ")", "->", "update", "(", "[", "'is_publish'", "=>", ...
not publish group action @param $class @return boolean
[ "not", "publish", "group", "action" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Controllers/OperationTrait.php#L276-L288
201,483
erenmustafaozdal/laravel-modules-base
src/Controllers/OperationTrait.php
OperationTrait.fillModel
protected function fillModel($datas) { $grouped = collect($datas)->groupBy('relation_type'); foreach($grouped as $key => $groups) { // no relation if ($key === 'not') { foreach($groups as $group) { $this->model->fill($group['datas'])->save...
php
protected function fillModel($datas) { $grouped = collect($datas)->groupBy('relation_type'); foreach($grouped as $key => $groups) { // no relation if ($key === 'not') { foreach($groups as $group) { $this->model->fill($group['datas'])->save...
[ "protected", "function", "fillModel", "(", "$", "datas", ")", "{", "$", "grouped", "=", "collect", "(", "$", "datas", ")", "->", "groupBy", "(", "'relation_type'", ")", ";", "foreach", "(", "$", "grouped", "as", "$", "key", "=>", "$", "groups", ")", ...
fill model datas to database @param array $datas @return boolean
[ "fill", "model", "datas", "to", "database" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Controllers/OperationTrait.php#L296-L351
201,484
erenmustafaozdal/laravel-modules-base
src/Controllers/OperationTrait.php
OperationTrait.getData
protected function getData() { if ( ! $this->fileOptions) { return $this->request->all(); } $excepts = collect($this->fileOptions)->keyBy(function ($item) { $columns = explode('.', $item['column']); return count($columns) === 1 ? $columns[0] : $columns[1]...
php
protected function getData() { if ( ! $this->fileOptions) { return $this->request->all(); } $excepts = collect($this->fileOptions)->keyBy(function ($item) { $columns = explode('.', $item['column']); return count($columns) === 1 ? $columns[0] : $columns[1]...
[ "protected", "function", "getData", "(", ")", "{", "if", "(", "!", "$", "this", "->", "fileOptions", ")", "{", "return", "$", "this", "->", "request", "->", "all", "(", ")", ";", "}", "$", "excepts", "=", "collect", "(", "$", "this", "->", "fileOpt...
get data, if image column passed, except it
[ "get", "data", "if", "image", "column", "passed", "except", "it" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Controllers/OperationTrait.php#L356-L367
201,485
erenmustafaozdal/laravel-modules-base
src/Controllers/OperationTrait.php
OperationTrait.preUploadFile
private function preUploadFile($exception) { $datas = []; foreach($this->fileOptions as $options) { $result = $this->uploadFile($options); if ($result !== false) { $datas[] = $result; } } if ( ! empty($datas) && ! $this->fillModel(...
php
private function preUploadFile($exception) { $datas = []; foreach($this->fileOptions as $options) { $result = $this->uploadFile($options); if ($result !== false) { $datas[] = $result; } } if ( ! empty($datas) && ! $this->fillModel(...
[ "private", "function", "preUploadFile", "(", "$", "exception", ")", "{", "$", "datas", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "fileOptions", "as", "$", "options", ")", "{", "$", "result", "=", "$", "this", "->", "uploadFile", "(", "$"...
pre upload file control function @param $exception
[ "pre", "upload", "file", "control", "function" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Controllers/OperationTrait.php#L374-L387
201,486
erenmustafaozdal/laravel-modules-base
src/Controllers/OperationTrait.php
OperationTrait.uploadFile
protected function uploadFile($options) { if ( $options['type'] === 'file' ) { $this->repo = new FileRepository($options); $this->hasFile = true; } else { $this->repo = new ImageRepository($options); $this->hasPhoto = true; } if ( ! $t...
php
protected function uploadFile($options) { if ( $options['type'] === 'file' ) { $this->repo = new FileRepository($options); $this->hasFile = true; } else { $this->repo = new ImageRepository($options); $this->hasPhoto = true; } if ( ! $t...
[ "protected", "function", "uploadFile", "(", "$", "options", ")", "{", "if", "(", "$", "options", "[", "'type'", "]", "===", "'file'", ")", "{", "$", "this", "->", "repo", "=", "new", "FileRepository", "(", "$", "options", ")", ";", "$", "this", "->",...
upload file or files @param array $options @return array|boolean
[ "upload", "file", "or", "files" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Controllers/OperationTrait.php#L395-L410
201,487
erenmustafaozdal/laravel-modules-base
src/Controllers/OperationTrait.php
OperationTrait.returnData
protected function returnData($type) { $data = ['result' => $type]; if ( $this->hasPhoto ){ $data['photos'] = $this->repo->files; } if ( $this->hasFile ) { $data['files'] = $this->repo->files; } return $data; }
php
protected function returnData($type) { $data = ['result' => $type]; if ( $this->hasPhoto ){ $data['photos'] = $this->repo->files; } if ( $this->hasFile ) { $data['files'] = $this->repo->files; } return $data; }
[ "protected", "function", "returnData", "(", "$", "type", ")", "{", "$", "data", "=", "[", "'result'", "=>", "$", "type", "]", ";", "if", "(", "$", "this", "->", "hasPhoto", ")", "{", "$", "data", "[", "'photos'", "]", "=", "$", "this", "->", "rep...
return data for api @param string $type @return array
[ "return", "data", "for", "api" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Controllers/OperationTrait.php#L418-L428
201,488
erenmustafaozdal/laravel-modules-base
src/Controllers/OperationTrait.php
OperationTrait.redirectRoute
protected function redirectRoute($path, $isUpdate = false) { $indexPos = strpos($path,'index'); $dotPos = strpos($path,'.'); $slug = getModelSlug($this->model); // İlişkisiz yalın sayfalardan index hariç if ( $indexPos === false && $dotPos === false ) { return re...
php
protected function redirectRoute($path, $isUpdate = false) { $indexPos = strpos($path,'index'); $dotPos = strpos($path,'.'); $slug = getModelSlug($this->model); // İlişkisiz yalın sayfalardan index hariç if ( $indexPos === false && $dotPos === false ) { return re...
[ "protected", "function", "redirectRoute", "(", "$", "path", ",", "$", "isUpdate", "=", "false", ")", "{", "$", "indexPos", "=", "strpos", "(", "$", "path", ",", "'index'", ")", ";", "$", "dotPos", "=", "strpos", "(", "$", "path", ",", "'.'", ")", "...
return redirect url path @param string $path @param boolean $isUpdate @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
[ "return", "redirect", "url", "path" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Controllers/OperationTrait.php#L437-L464
201,489
erenmustafaozdal/laravel-modules-base
src/Controllers/OperationTrait.php
OperationTrait.setElfinderToOptions
protected function setElfinderToOptions($column) { $this->fileOptions = collect($this->fileOptions)->map(function($item, $key) use($column) { if ( (is_array($column) && $key === $column['index'] && $item['column'] === $column['column']) || $item['column'] ...
php
protected function setElfinderToOptions($column) { $this->fileOptions = collect($this->fileOptions)->map(function($item, $key) use($column) { if ( (is_array($column) && $key === $column['index'] && $item['column'] === $column['column']) || $item['column'] ...
[ "protected", "function", "setElfinderToOptions", "(", "$", "column", ")", "{", "$", "this", "->", "fileOptions", "=", "collect", "(", "$", "this", "->", "fileOptions", ")", "->", "map", "(", "function", "(", "$", "item", ",", "$", "key", ")", "use", "(...
set to file options is file from elfinder @param string|array $column
[ "set", "to", "file", "options", "is", "file", "from", "elfinder" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Controllers/OperationTrait.php#L481-L493
201,490
erenmustafaozdal/laravel-modules-base
src/Controllers/OperationTrait.php
OperationTrait.updateAlias
protected function updateAlias($model, $events = [], $path = null) { $namespace = getBaseName($model, 'Events'); $events = $events ? $events : [ 'success' => "{$namespace}\\UpdateSuccess", 'fail' => "{$namespace}\\UpdateFail", ]; $this->setEvents($even...
php
protected function updateAlias($model, $events = [], $path = null) { $namespace = getBaseName($model, 'Events'); $events = $events ? $events : [ 'success' => "{$namespace}\\UpdateSuccess", 'fail' => "{$namespace}\\UpdateFail", ]; $this->setEvents($even...
[ "protected", "function", "updateAlias", "(", "$", "model", ",", "$", "events", "=", "[", "]", ",", "$", "path", "=", "null", ")", "{", "$", "namespace", "=", "getBaseName", "(", "$", "model", ",", "'Events'", ")", ";", "$", "events", "=", "$", "eve...
update alias method @param \Illuminate\Database\Eloquent\Model $model @param array $events @param string|null $path @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
[ "update", "alias", "method" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Controllers/OperationTrait.php#L555-L565
201,491
erenmustafaozdal/laravel-modules-base
src/Controllers/OperationTrait.php
OperationTrait.groupAlias
protected function groupAlias($model, $subBase = 'Events') { $namespace = getBaseName($model, $subBase); $events = []; switch($this->request->action) { case 'activate': $events['activationSuccess'] = \ErenMustafaOzdal\LaravelUserModule\Events\Auth\ActivateSuccess:...
php
protected function groupAlias($model, $subBase = 'Events') { $namespace = getBaseName($model, $subBase); $events = []; switch($this->request->action) { case 'activate': $events['activationSuccess'] = \ErenMustafaOzdal\LaravelUserModule\Events\Auth\ActivateSuccess:...
[ "protected", "function", "groupAlias", "(", "$", "model", ",", "$", "subBase", "=", "'Events'", ")", "{", "$", "namespace", "=", "getBaseName", "(", "$", "model", ",", "$", "subBase", ")", ";", "$", "events", "=", "[", "]", ";", "switch", "(", "$", ...
group operation alias method @param \Illuminate\Database\Eloquent\Model $model @param string $subBase @return boolean
[ "group", "operation", "alias", "method" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Controllers/OperationTrait.php#L574-L604
201,492
erenmustafaozdal/laravel-modules-base
src/Controllers/OperationTrait.php
OperationTrait.cloneModel
protected function cloneModel($model, $lastCopy, $changeColumns = [], $relations = []) { // model copy $clone = $model->replicate(); $clone->copied_id = $model->id; if ( is_null($lastCopy) ) { foreach($changeColumns as $column) { $clone->$column = "{$model...
php
protected function cloneModel($model, $lastCopy, $changeColumns = [], $relations = []) { // model copy $clone = $model->replicate(); $clone->copied_id = $model->id; if ( is_null($lastCopy) ) { foreach($changeColumns as $column) { $clone->$column = "{$model...
[ "protected", "function", "cloneModel", "(", "$", "model", ",", "$", "lastCopy", ",", "$", "changeColumns", "=", "[", "]", ",", "$", "relations", "=", "[", "]", ")", "{", "// model copy", "$", "clone", "=", "$", "model", "->", "replicate", "(", ")", "...
clone model and relation @param $model @param $lastCopy @param array $changeColumns @param array $relations @return \Illuminate\Database\Eloquent\Model|boolean
[ "clone", "model", "and", "relation" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Controllers/OperationTrait.php#L615-L658
201,493
erenmustafaozdal/laravel-modules-base
src/Controllers/OperationTrait.php
OperationTrait.setModuleThumbnails
protected function setModuleThumbnails($category, $model, $uploadType) { $module = getModule(get_called_class()); if (is_null($category->thumbnails)) { return; } Config::set("{$module}.{$model}.uploads.{$uploadType}.thumbnails",$category->thumbnails->map(function($item) ...
php
protected function setModuleThumbnails($category, $model, $uploadType) { $module = getModule(get_called_class()); if (is_null($category->thumbnails)) { return; } Config::set("{$module}.{$model}.uploads.{$uploadType}.thumbnails",$category->thumbnails->map(function($item) ...
[ "protected", "function", "setModuleThumbnails", "(", "$", "category", ",", "$", "model", ",", "$", "uploadType", ")", "{", "$", "module", "=", "getModule", "(", "get_called_class", "(", ")", ")", ";", "if", "(", "is_null", "(", "$", "category", "->", "th...
set the module config @param $category @param string $model @param string $uploadType @return void
[ "set", "the", "module", "config" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Controllers/OperationTrait.php#L681-L695
201,494
PhoxPHP/Console
src/Command/Help.php
Help.listRunnables
protected function listRunnables() { $commands = array_values(Command::getRegisteredCommands()); $format = "| %8.60s | %-50.30s\n"; printf($format, "id", "class"); $this->env->sendOutput('-----------------------------------'); foreach($commands as $runnable) { printf($format, $runnable->getId(), get_cl...
php
protected function listRunnables() { $commands = array_values(Command::getRegisteredCommands()); $format = "| %8.60s | %-50.30s\n"; printf($format, "id", "class"); $this->env->sendOutput('-----------------------------------'); foreach($commands as $runnable) { printf($format, $runnable->getId(), get_cl...
[ "protected", "function", "listRunnables", "(", ")", "{", "$", "commands", "=", "array_values", "(", "Command", "::", "getRegisteredCommands", "(", ")", ")", ";", "$", "format", "=", "\"| %8.60s | %-50.30s\\n\"", ";", "printf", "(", "$", "format", ",", "\"id\""...
Lists all registered runnables id. @access protected @return <void>
[ "Lists", "all", "registered", "runnables", "id", "." ]
fee1238cfdb3592964bb5d5a2336e70b8ffd20e9
https://github.com/PhoxPHP/Console/blob/fee1238cfdb3592964bb5d5a2336e70b8ffd20e9/src/Command/Help.php#L113-L124
201,495
PhoxPHP/Console
src/Command/Help.php
Help.createRunnable
protected function createRunnable() { $runnable = new StdClass(); $response = $this->cmd->question('1. Runnable class name? [required]'); if (strlen($response) < 3) { return $this->env->sendOutput('runnable class name is required.', 'red'); } $runnable->name = rtrim($response); $response = $this->cmd->...
php
protected function createRunnable() { $runnable = new StdClass(); $response = $this->cmd->question('1. Runnable class name? [required]'); if (strlen($response) < 3) { return $this->env->sendOutput('runnable class name is required.', 'red'); } $runnable->name = rtrim($response); $response = $this->cmd->...
[ "protected", "function", "createRunnable", "(", ")", "{", "$", "runnable", "=", "new", "StdClass", "(", ")", ";", "$", "response", "=", "$", "this", "->", "cmd", "->", "question", "(", "'1. Runnable class name? [required]'", ")", ";", "if", "(", "strlen", ...
Creates a new runnable class. @param $arguments <Array> @access protected @return <void>
[ "Creates", "a", "new", "runnable", "class", "." ]
fee1238cfdb3592964bb5d5a2336e70b8ffd20e9
https://github.com/PhoxPHP/Console/blob/fee1238cfdb3592964bb5d5a2336e70b8ffd20e9/src/Command/Help.php#L133-L171
201,496
PhoxPHP/Console
src/Command/Help.php
Help.listRunnableCommands
protected function listRunnableCommands(String $runnableId) { if (!Command::hasCommand($runnableId)) { $this->cmd->error(sprintf('[%s] is not a valid runnable id', $runnableId)); } $runnable = Command::getCommandById($runnableId); $commands = $runnable->runnableCommands(); $format = "| %8.60s | %-50.30s...
php
protected function listRunnableCommands(String $runnableId) { if (!Command::hasCommand($runnableId)) { $this->cmd->error(sprintf('[%s] is not a valid runnable id', $runnableId)); } $runnable = Command::getCommandById($runnableId); $commands = $runnable->runnableCommands(); $format = "| %8.60s | %-50.30s...
[ "protected", "function", "listRunnableCommands", "(", "String", "$", "runnableId", ")", "{", "if", "(", "!", "Command", "::", "hasCommand", "(", "$", "runnableId", ")", ")", "{", "$", "this", "->", "cmd", "->", "error", "(", "sprintf", "(", "'[%s] is not a...
Lists commands available in a runnable object. @param $runnableId <String> @access protected @return <void>
[ "Lists", "commands", "available", "in", "a", "runnable", "object", "." ]
fee1238cfdb3592964bb5d5a2336e70b8ffd20e9
https://github.com/PhoxPHP/Console/blob/fee1238cfdb3592964bb5d5a2336e70b8ffd20e9/src/Command/Help.php#L180-L195
201,497
PhoxPHP/Console
src/Command/Help.php
Help.displayHelpInformation
protected function displayHelpInformation() { $this->env->sendOutput('PhoxPHP Command Line Interface help.', 'green'); $this->env->sendOutput('Usage:'. $this->env->addTab() . 'php console [command id] [...arguments]'); $this->env->sendOutput($this->env->addTab() . 'E.g: ' . 'php console help list-commands' . $th...
php
protected function displayHelpInformation() { $this->env->sendOutput('PhoxPHP Command Line Interface help.', 'green'); $this->env->sendOutput('Usage:'. $this->env->addTab() . 'php console [command id] [...arguments]'); $this->env->sendOutput($this->env->addTab() . 'E.g: ' . 'php console help list-commands' . $th...
[ "protected", "function", "displayHelpInformation", "(", ")", "{", "$", "this", "->", "env", "->", "sendOutput", "(", "'PhoxPHP Command Line Interface help.'", ",", "'green'", ")", ";", "$", "this", "->", "env", "->", "sendOutput", "(", "'Usage:'", ".", "$", "t...
Displays cli help information. @access protected @return <void>
[ "Displays", "cli", "help", "information", "." ]
fee1238cfdb3592964bb5d5a2336e70b8ffd20e9
https://github.com/PhoxPHP/Console/blob/fee1238cfdb3592964bb5d5a2336e70b8ffd20e9/src/Command/Help.php#L203-L211
201,498
eureka-framework/component-orm
src/Orm/Config/ConfigAbstract.php
ConfigAbstract.validate
protected function validate() { if (empty($this->author)) { throw new \Exception('Author is empty!'); } if (empty($this->classname)) { throw new \Exception('Class name is empty!'); } if (empty($this->namespace)) { throw new \Exception('Na...
php
protected function validate() { if (empty($this->author)) { throw new \Exception('Author is empty!'); } if (empty($this->classname)) { throw new \Exception('Class name is empty!'); } if (empty($this->namespace)) { throw new \Exception('Na...
[ "protected", "function", "validate", "(", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "author", ")", ")", "{", "throw", "new", "\\", "Exception", "(", "'Author is empty!'", ")", ";", "}", "if", "(", "empty", "(", "$", "this", "->", "classna...
Check if config has required values. @return self @throws \Exception
[ "Check", "if", "config", "has", "required", "values", "." ]
bce48121d26c4e923534f9dc70da597634184316
https://github.com/eureka-framework/component-orm/blob/bce48121d26c4e923534f9dc70da597634184316/src/Orm/Config/ConfigAbstract.php#L212-L243
201,499
netgen/site-legacy-bundle
bundle/Command/SymlinkLegacyCommand.php
SymlinkLegacyCommand.symlinkLegacyExtensionSiteAccesses
protected function symlinkLegacyExtensionSiteAccesses(string $legacyExtensionPath, OutputInterface $output): void { $legacyRootDir = $this->getContainer()->getParameter('ezpublish_legacy.root_dir'); /** @var \DirectoryIterator[] $directories */ $directories = []; $path = $legacyExt...
php
protected function symlinkLegacyExtensionSiteAccesses(string $legacyExtensionPath, OutputInterface $output): void { $legacyRootDir = $this->getContainer()->getParameter('ezpublish_legacy.root_dir'); /** @var \DirectoryIterator[] $directories */ $directories = []; $path = $legacyExt...
[ "protected", "function", "symlinkLegacyExtensionSiteAccesses", "(", "string", "$", "legacyExtensionPath", ",", "OutputInterface", "$", "output", ")", ":", "void", "{", "$", "legacyRootDir", "=", "$", "this", "->", "getContainer", "(", ")", "->", "getParameter", "(...
Symlinks siteccesses from a legacy extension.
[ "Symlinks", "siteccesses", "from", "a", "legacy", "extension", "." ]
943224cdee28cfb9ef07854c11c91d060456b394
https://github.com/netgen/site-legacy-bundle/blob/943224cdee28cfb9ef07854c11c91d060456b394/bundle/Command/SymlinkLegacyCommand.php#L104-L140