id
int32
0
241k
repo
stringlengths
6
63
path
stringlengths
5
140
func_name
stringlengths
3
151
original_string
stringlengths
84
13k
language
stringclasses
1 value
code
stringlengths
84
13k
code_tokens
list
docstring
stringlengths
3
47.2k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
91
247
203,000
Vectrex/vxPHP
src/Form/FormElement/LabelElement.php
LabelElement.setAttribute
public function setAttribute($attr, $value) { $attr = strtolower($attr); if(is_null($value)) { unset($this->attributes[$attr]); } else { $this->attributes[$attr] = $value; } return $this; }
php
public function setAttribute($attr, $value) { $attr = strtolower($attr); if(is_null($value)) { unset($this->attributes[$attr]); } else { $this->attributes[$attr] = $value; } return $this; }
[ "public", "function", "setAttribute", "(", "$", "attr", ",", "$", "value", ")", "{", "$", "attr", "=", "strtolower", "(", "$", "attr", ")", ";", "if", "(", "is_null", "(", "$", "value", ")", ")", "{", "unset", "(", "$", "this", "->", "attributes", ...
sets attributes of form label @param string $attr @param string $value @return LabelElement
[ "sets", "attributes", "of", "form", "label" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Form/FormElement/LabelElement.php#L80-L94
203,001
Vectrex/vxPHP
src/Form/FormElement/LabelElement.php
LabelElement.render
public function render() { $attr = []; foreach($this->attributes as $k => $v) { $attr[] = sprintf('%s="%s"', $k, $v); } return sprintf('<label %s>%s</label>', implode(' ', $attr), trim($this->labelText) ); }
php
public function render() { $attr = []; foreach($this->attributes as $k => $v) { $attr[] = sprintf('%s="%s"', $k, $v); } return sprintf('<label %s>%s</label>', implode(' ', $attr), trim($this->labelText) ); }
[ "public", "function", "render", "(", ")", "{", "$", "attr", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "attributes", "as", "$", "k", "=>", "$", "v", ")", "{", "$", "attr", "[", "]", "=", "sprintf", "(", "'%s=\"%s\"'", ",", "$", "k",...
render the label element if a form element was assigned a matching "for" attribute can be generated @return string
[ "render", "the", "label", "element", "if", "a", "form", "element", "was", "assigned", "a", "matching", "for", "attribute", "can", "be", "generated" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Form/FormElement/LabelElement.php#L119-L133
203,002
DeimosProject/Helper
src/Helper/Helpers/Str/Str.php
Str.translit
public function translit($string) { $string = \strtr($string, $this->transliterationTable); return \iconv(\mb_internal_encoding(), 'ASCII//TRANSLIT', $string); }
php
public function translit($string) { $string = \strtr($string, $this->transliterationTable); return \iconv(\mb_internal_encoding(), 'ASCII//TRANSLIT', $string); }
[ "public", "function", "translit", "(", "$", "string", ")", "{", "$", "string", "=", "\\", "strtr", "(", "$", "string", ",", "$", "this", "->", "transliterationTable", ")", ";", "return", "\\", "iconv", "(", "\\", "mb_internal_encoding", "(", ")", ",", ...
transliteration cyr->lat @param $string @return string
[ "transliteration", "cyr", "-", ">", "lat" ]
39c67de21a87c7c6391b2f98416063f41c94e26f
https://github.com/DeimosProject/Helper/blob/39c67de21a87c7c6391b2f98416063f41c94e26f/src/Helper/Helpers/Str/Str.php#L231-L236
203,003
eureka-framework/component-template
src/Template/Block.php
Block.end
public function end($name, $append = true) { $content = trim(ob_get_contents()); ob_end_clean(); $hash = md5($content); if (isset($this->hashCache[$hash])) { return; } $this->hashCache[$hash] = true; if (isset($this->blocks[$name]) && $append) ...
php
public function end($name, $append = true) { $content = trim(ob_get_contents()); ob_end_clean(); $hash = md5($content); if (isset($this->hashCache[$hash])) { return; } $this->hashCache[$hash] = true; if (isset($this->blocks[$name]) && $append) ...
[ "public", "function", "end", "(", "$", "name", ",", "$", "append", "=", "true", ")", "{", "$", "content", "=", "trim", "(", "ob_get_contents", "(", ")", ")", ";", "ob_end_clean", "(", ")", ";", "$", "hash", "=", "md5", "(", "$", "content", ")", "...
End to catch block and save it. @param string $name @param bool $append Append content to previous block. Otherwise, reset content. @return void
[ "End", "to", "catch", "block", "and", "save", "it", "." ]
42e9b3954b79892ba340ba7ca909f03ee99c36fe
https://github.com/eureka-framework/component-template/blob/42e9b3954b79892ba340ba7ca909f03ee99c36fe/src/Template/Block.php#L94-L112
203,004
praxigento/mobi_mod_downline
Plugin/Magento/Framework/App/FrontControllerInterface.php
FrontControllerInterface.beforeDispatch
public function beforeDispatch( \Magento\Framework\App\FrontControllerInterface $subject, \Magento\Framework\App\RequestInterface $request ) { $code = $request->getParam(static::REQ_REFERRAL); if (!empty($code)) { $this->session->logout(); } $this->hlpRefC...
php
public function beforeDispatch( \Magento\Framework\App\FrontControllerInterface $subject, \Magento\Framework\App\RequestInterface $request ) { $code = $request->getParam(static::REQ_REFERRAL); if (!empty($code)) { $this->session->logout(); } $this->hlpRefC...
[ "public", "function", "beforeDispatch", "(", "\\", "Magento", "\\", "Framework", "\\", "App", "\\", "FrontControllerInterface", "$", "subject", ",", "\\", "Magento", "\\", "Framework", "\\", "App", "\\", "RequestInterface", "$", "request", ")", "{", "$", "code...
Extract referral code from GET-variable or cookie and save it into registry. @param \Magento\Framework\App\FrontControllerInterface $subject @param \Magento\Framework\App\RequestInterface $request
[ "Extract", "referral", "code", "from", "GET", "-", "variable", "or", "cookie", "and", "save", "it", "into", "registry", "." ]
0f3c276dfff1aa029f9fd205ccfc56f207a2e75b
https://github.com/praxigento/mobi_mod_downline/blob/0f3c276dfff1aa029f9fd205ccfc56f207a2e75b/Plugin/Magento/Framework/App/FrontControllerInterface.php#L34-L43
203,005
jabernardo/lollipop-php
Library/Utils/Vars.php
Vars.fuse
static function fuse(&$opt1, $opt2) { return isset($opt1) ? $opt1 : (isset($opt2) ? $opt2 : null); }
php
static function fuse(&$opt1, $opt2) { return isset($opt1) ? $opt1 : (isset($opt2) ? $opt2 : null); }
[ "static", "function", "fuse", "(", "&", "$", "opt1", ",", "$", "opt2", ")", "{", "return", "isset", "(", "$", "opt1", ")", "?", "$", "opt1", ":", "(", "isset", "(", "$", "opt2", ")", "?", "$", "opt2", ":", "null", ")", ";", "}" ]
Alternate a value to undefined variable @param reference &$opt1 Variable @param mixed $opt2 Alternative value @return mixed
[ "Alternate", "a", "value", "to", "undefined", "variable" ]
004d80b21f7246bb3e08c7b9f74a165b0d3ca0f5
https://github.com/jabernardo/lollipop-php/blob/004d80b21f7246bb3e08c7b9f74a165b0d3ca0f5/Library/Utils/Vars.php#L23-L25
203,006
Vectrex/vxPHP
src/Template/TemplateBuffer.php
TemplateBuffer.includeFile
public function includeFile($templateFilename) { /* @deprecated use $this when accessing assigned variables */ $tpl = $this; eval('?>' . file_get_contents(Application::getInstance()->getRootPath() . (defined('TPL_PATH') ? str_replace('/', DIRECTORY_SEPARATOR, ltrim...
php
public function includeFile($templateFilename) { /* @deprecated use $this when accessing assigned variables */ $tpl = $this; eval('?>' . file_get_contents(Application::getInstance()->getRootPath() . (defined('TPL_PATH') ? str_replace('/', DIRECTORY_SEPARATOR, ltrim...
[ "public", "function", "includeFile", "(", "$", "templateFilename", ")", "{", "/* @deprecated use $this when accessing assigned variables */", "$", "tpl", "=", "$", "this", ";", "eval", "(", "'?>'", ".", "file_get_contents", "(", "Application", "::", "getInstance", "("...
include another template file does only path handling included files are within the same scope as the including file @param string $templateFilename @throws \vxPHP\Application\Exception\ApplicationException
[ "include", "another", "template", "file", "does", "only", "path", "handling", "included", "files", "are", "within", "the", "same", "scope", "as", "the", "including", "file" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Template/TemplateBuffer.php#L44-L56
203,007
n2n/n2n-io
src/app/n2n/io/fs/FsPath.php
FsPath.createFile
public function createFile($perm) { if ($this->isFile()) return false; IoUtils::touch($this->path); IoUtils::chmod($this->path, $perm); return true; }
php
public function createFile($perm) { if ($this->isFile()) return false; IoUtils::touch($this->path); IoUtils::chmod($this->path, $perm); return true; }
[ "public", "function", "createFile", "(", "$", "perm", ")", "{", "if", "(", "$", "this", "->", "isFile", "(", ")", ")", "return", "false", ";", "IoUtils", "::", "touch", "(", "$", "this", "->", "path", ")", ";", "IoUtils", "::", "chmod", "(", "$", ...
Atomically creates a new, empty file named by this abstract path if and only if a file with this name does not yet exist. @return bool true if the named file does not exist and was successfully created; false if the named file already exists
[ "Atomically", "creates", "a", "new", "empty", "file", "named", "by", "this", "abstract", "path", "if", "and", "only", "if", "a", "file", "with", "this", "name", "does", "not", "yet", "exist", "." ]
ff642e195f0c0db1273b6c067eff1192cf2cd987
https://github.com/n2n/n2n-io/blob/ff642e195f0c0db1273b6c067eff1192cf2cd987/src/app/n2n/io/fs/FsPath.php#L158-L165
203,008
phpffcms/ffcms-core
src/Helper/Mailer.php
Mailer.tpl
public function tpl(string $tpl, ?array $params = [], ?string $dir = null) { try { $this->message = App::$View->render($tpl, $params, $dir); } catch (SyntaxException $e) { } return $this; }
php
public function tpl(string $tpl, ?array $params = [], ?string $dir = null) { try { $this->message = App::$View->render($tpl, $params, $dir); } catch (SyntaxException $e) { } return $this; }
[ "public", "function", "tpl", "(", "string", "$", "tpl", ",", "?", "array", "$", "params", "=", "[", "]", ",", "?", "string", "$", "dir", "=", "null", ")", "{", "try", "{", "$", "this", "->", "message", "=", "App", "::", "$", "View", "->", "rend...
Set tpl file @param string $tpl @param array|null $params @param null|string $dir @return $this
[ "Set", "tpl", "file" ]
44a309553ef9f115ccfcfd71f2ac6e381c612082
https://github.com/phpffcms/ffcms-core/blob/44a309553ef9f115ccfcfd71f2ac6e381c612082/src/Helper/Mailer.php#L49-L56
203,009
phpffcms/ffcms-core
src/Helper/Mailer.php
Mailer.send
public function send(string $address, string $subject, ?string $message = null): bool { // try to get message from global if not passed direct if ($message === null) { $message = $this->message; } try { if ($message === null) { throw new \Exce...
php
public function send(string $address, string $subject, ?string $message = null): bool { // try to get message from global if not passed direct if ($message === null) { $message = $this->message; } try { if ($message === null) { throw new \Exce...
[ "public", "function", "send", "(", "string", "$", "address", ",", "string", "$", "subject", ",", "?", "string", "$", "message", "=", "null", ")", ":", "bool", "{", "// try to get message from global if not passed direct", "if", "(", "$", "message", "===", "nul...
Set mail to address @param string $address @param string $subject @param null|string $message @return bool
[ "Set", "mail", "to", "address" ]
44a309553ef9f115ccfcfd71f2ac6e381c612082
https://github.com/phpffcms/ffcms-core/blob/44a309553ef9f115ccfcfd71f2ac6e381c612082/src/Helper/Mailer.php#L65-L91
203,010
agentmedia/phine-core
src/Core/Modules/Backend/LayoutForm.php
LayoutForm.Init
protected function Init() { $this->layout = new Layout(Request::GetData('layout')); $this->layoutRights = new LayoutRights($this->layout->GetUserGroupRights()); $this->InitAreas(); $this->AddNameField(); $this->AddAreasField(); $this->AddUserGroupField(); $thi...
php
protected function Init() { $this->layout = new Layout(Request::GetData('layout')); $this->layoutRights = new LayoutRights($this->layout->GetUserGroupRights()); $this->InitAreas(); $this->AddNameField(); $this->AddAreasField(); $this->AddUserGroupField(); $thi...
[ "protected", "function", "Init", "(", ")", "{", "$", "this", "->", "layout", "=", "new", "Layout", "(", "Request", "::", "GetData", "(", "'layout'", ")", ")", ";", "$", "this", "->", "layoutRights", "=", "new", "LayoutRights", "(", "$", "this", "->", ...
Initializes the layout form @return boolea
[ "Initializes", "the", "layout", "form" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Modules/Backend/LayoutForm.php#L58-L68
203,011
agentmedia/phine-core
src/Core/Modules/Backend/LayoutForm.php
LayoutForm.AddAreasField
private function AddAreasField() { $name = 'Areas'; $field = Input::Text($name, join(', ' , $this->areaNames)); $this->AddField($field); if ($this->layout->Exists()) { $field->SetHtmlAttribute('readonly', 'readonly'); } else { $...
php
private function AddAreasField() { $name = 'Areas'; $field = Input::Text($name, join(', ' , $this->areaNames)); $this->AddField($field); if ($this->layout->Exists()) { $field->SetHtmlAttribute('readonly', 'readonly'); } else { $...
[ "private", "function", "AddAreasField", "(", ")", "{", "$", "name", "=", "'Areas'", ";", "$", "field", "=", "Input", "::", "Text", "(", "$", "name", ",", "join", "(", "', '", ",", "$", "this", "->", "areaNames", ")", ")", ";", "$", "this", "->", ...
Adds the server path field to the form
[ "Adds", "the", "server", "path", "field", "to", "the", "form" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Modules/Backend/LayoutForm.php#L132-L146
203,012
agentmedia/phine-core
src/Core/Modules/Backend/LayoutForm.php
LayoutForm.OnSuccess
protected function OnSuccess() { $action = Action::Update(); $isNew = !$this->layout->Exists(); if ($isNew) { $action = Action::Create(); $this->layout->SetUser(self::Guard()->GetUser()); } $oldFile = $isNew ? '' : PathUtil::LayoutTemplate($thi...
php
protected function OnSuccess() { $action = Action::Update(); $isNew = !$this->layout->Exists(); if ($isNew) { $action = Action::Create(); $this->layout->SetUser(self::Guard()->GetUser()); } $oldFile = $isNew ? '' : PathUtil::LayoutTemplate($thi...
[ "protected", "function", "OnSuccess", "(", ")", "{", "$", "action", "=", "Action", "::", "Update", "(", ")", ";", "$", "isNew", "=", "!", "$", "this", "->", "layout", "->", "Exists", "(", ")", ";", "if", "(", "$", "isNew", ")", "{", "$", "action"...
Saves the layout
[ "Saves", "the", "layout" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Modules/Backend/LayoutForm.php#L151-L176
203,013
itkg/core
src/Itkg/Core/CollectionAbstract.php
CollectionAbstract.getById
public function getById($id) { if (isset($this->elements[$id])) { return $this->elements[$id]; } throw new \InvalidArgumentException(sprintf('Element for id %s does not exist', $id)); }
php
public function getById($id) { if (isset($this->elements[$id])) { return $this->elements[$id]; } throw new \InvalidArgumentException(sprintf('Element for id %s does not exist', $id)); }
[ "public", "function", "getById", "(", "$", "id", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "elements", "[", "$", "id", "]", ")", ")", "{", "return", "$", "this", "->", "elements", "[", "$", "id", "]", ";", "}", "throw", "new", "\\",...
Get an entity by its ID @param $id @return EntityAbstract @throws \InvalidArgumentException
[ "Get", "an", "entity", "by", "its", "ID" ]
e5e4efb05feb4d23b0df41f2b21fd095103e593b
https://github.com/itkg/core/blob/e5e4efb05feb4d23b0df41f2b21fd095103e593b/src/Itkg/Core/CollectionAbstract.php#L47-L54
203,014
ekyna/PaymentBundle
Form/EventListener/BuildConfigSubscriber.php
BuildConfigSubscriber.buildConfigField
public function buildConfigField(FormEvent $event) { /** @var array $data */ $data = $event->getData(); if (is_null($data)) { return; } $propertyPath = is_array($data) ? '[factoryName]' : 'factoryName'; $factoryName = PropertyAccess::createPropertyAccesso...
php
public function buildConfigField(FormEvent $event) { /** @var array $data */ $data = $event->getData(); if (is_null($data)) { return; } $propertyPath = is_array($data) ? '[factoryName]' : 'factoryName'; $factoryName = PropertyAccess::createPropertyAccesso...
[ "public", "function", "buildConfigField", "(", "FormEvent", "$", "event", ")", "{", "/** @var array $data */", "$", "data", "=", "$", "event", "->", "getData", "(", ")", ";", "if", "(", "is_null", "(", "$", "data", ")", ")", "{", "return", ";", "}", "$...
Builds the config field. @param FormEvent $event
[ "Builds", "the", "config", "field", "." ]
1b4f4103b28e3a4f8dbfac2cbd872d728238f4d1
https://github.com/ekyna/PaymentBundle/blob/1b4f4103b28e3a4f8dbfac2cbd872d728238f4d1/Form/EventListener/BuildConfigSubscriber.php#L38-L90
203,015
Finesse/QueryScribe
src/QueryBricks/JoinTrait.php
JoinTrait.innerJoin
public function innerJoin($table, ...$criterion): self { $this->join[] = $this->joinArgumentsToJoinObject('INNER', $table, $criterion); return $this; }
php
public function innerJoin($table, ...$criterion): self { $this->join[] = $this->joinArgumentsToJoinObject('INNER', $table, $criterion); return $this; }
[ "public", "function", "innerJoin", "(", "$", "table", ",", "...", "$", "criterion", ")", ":", "self", "{", "$", "this", "->", "join", "[", "]", "=", "$", "this", "->", "joinArgumentsToJoinObject", "(", "'INNER'", ",", "$", "table", ",", "$", "criterion...
Adds a table joined with the "inner" rule. The first argument is a table name or an array where the first value is a table name and the second value is the table alias name. The rest arguments may have one of the following formats: - column1, rule, column1 — column compared to another column by the given rule. Includ...
[ "Adds", "a", "table", "joined", "with", "the", "inner", "rule", "." ]
4edba721e37693780d142229b3ecb0cd4004c7a5
https://github.com/Finesse/QueryScribe/blob/4edba721e37693780d142229b3ecb0cd4004c7a5/src/QueryBricks/JoinTrait.php#L58-L62
203,016
Finesse/QueryScribe
src/QueryBricks/JoinTrait.php
JoinTrait.outerJoin
public function outerJoin($table, ...$criterion): self { $this->join[] = $this->joinArgumentsToJoinObject('OUTER', $table, $criterion); return $this; }
php
public function outerJoin($table, ...$criterion): self { $this->join[] = $this->joinArgumentsToJoinObject('OUTER', $table, $criterion); return $this; }
[ "public", "function", "outerJoin", "(", "$", "table", ",", "...", "$", "criterion", ")", ":", "self", "{", "$", "this", "->", "join", "[", "]", "=", "$", "this", "->", "joinArgumentsToJoinObject", "(", "'OUTER'", ",", "$", "table", ",", "$", "criterion...
Adds a table joined with the "outer" rule. @see innerJoin The arguments format @return $this @throws InvalidArgumentException @throws InvalidReturnValueException
[ "Adds", "a", "table", "joined", "with", "the", "outer", "rule", "." ]
4edba721e37693780d142229b3ecb0cd4004c7a5
https://github.com/Finesse/QueryScribe/blob/4edba721e37693780d142229b3ecb0cd4004c7a5/src/QueryBricks/JoinTrait.php#L72-L76
203,017
Finesse/QueryScribe
src/QueryBricks/JoinTrait.php
JoinTrait.leftJoin
public function leftJoin($table, ...$criterion): self { $this->join[] = $this->joinArgumentsToJoinObject('LEFT', $table, $criterion); return $this; }
php
public function leftJoin($table, ...$criterion): self { $this->join[] = $this->joinArgumentsToJoinObject('LEFT', $table, $criterion); return $this; }
[ "public", "function", "leftJoin", "(", "$", "table", ",", "...", "$", "criterion", ")", ":", "self", "{", "$", "this", "->", "join", "[", "]", "=", "$", "this", "->", "joinArgumentsToJoinObject", "(", "'LEFT'", ",", "$", "table", ",", "$", "criterion",...
Adds a table joined with the "left" rule. @see innerJoin The arguments format @return $this @throws InvalidArgumentException @throws InvalidReturnValueException
[ "Adds", "a", "table", "joined", "with", "the", "left", "rule", "." ]
4edba721e37693780d142229b3ecb0cd4004c7a5
https://github.com/Finesse/QueryScribe/blob/4edba721e37693780d142229b3ecb0cd4004c7a5/src/QueryBricks/JoinTrait.php#L86-L90
203,018
Finesse/QueryScribe
src/QueryBricks/JoinTrait.php
JoinTrait.rightJoin
public function rightJoin($table, ...$criterion): self { $this->join[] = $this->joinArgumentsToJoinObject('RIGHT', $table, $criterion); return $this; }
php
public function rightJoin($table, ...$criterion): self { $this->join[] = $this->joinArgumentsToJoinObject('RIGHT', $table, $criterion); return $this; }
[ "public", "function", "rightJoin", "(", "$", "table", ",", "...", "$", "criterion", ")", ":", "self", "{", "$", "this", "->", "join", "[", "]", "=", "$", "this", "->", "joinArgumentsToJoinObject", "(", "'RIGHT'", ",", "$", "table", ",", "$", "criterion...
Adds a table joined with the "right" rule. @see innerJoin The arguments format @return $this @throws InvalidArgumentException @throws InvalidReturnValueException
[ "Adds", "a", "table", "joined", "with", "the", "right", "rule", "." ]
4edba721e37693780d142229b3ecb0cd4004c7a5
https://github.com/Finesse/QueryScribe/blob/4edba721e37693780d142229b3ecb0cd4004c7a5/src/QueryBricks/JoinTrait.php#L100-L104
203,019
Finesse/QueryScribe
src/QueryBricks/JoinTrait.php
JoinTrait.joinArgumentsToJoinObject
protected function joinArgumentsToJoinObject(string $type, $table, array $criterion = []): Join { if (is_array($table)) { $tableName = $table[0] ?? null; $tableAlias = $table[1] ?? null; } else { $tableName = $table; $tableAlias = null; } ...
php
protected function joinArgumentsToJoinObject(string $type, $table, array $criterion = []): Join { if (is_array($table)) { $tableName = $table[0] ?? null; $tableAlias = $table[1] ?? null; } else { $tableName = $table; $tableAlias = null; } ...
[ "protected", "function", "joinArgumentsToJoinObject", "(", "string", "$", "type", ",", "$", "table", ",", "array", "$", "criterion", "=", "[", "]", ")", ":", "Join", "{", "if", "(", "is_array", "(", "$", "table", ")", ")", "{", "$", "tableName", "=", ...
Converts `join` method arguments to a join object @see innerJoin The arguments format @params string $type The join type (INNER, LEFT, etc.) @params mixed $table The joined table @params array The join criterion arguments @return Join @throws InvalidArgumentException @throws InvalidReturnValueException
[ "Converts", "join", "method", "arguments", "to", "a", "join", "object" ]
4edba721e37693780d142229b3ecb0cd4004c7a5
https://github.com/Finesse/QueryScribe/blob/4edba721e37693780d142229b3ecb0cd4004c7a5/src/QueryBricks/JoinTrait.php#L163-L192
203,020
wb-crowdfusion/crowdfusion
system/core/classes/mvc/controllers/AbstractApiController.php
AbstractApiController.passthruParameter
protected function passthruParameter(&$dto, $variableName) { $reqName = str_replace('.','_', $variableName); if($this->Request->getParameter($reqName) !== null && $this->Request->getParameter($reqName) != '') $dto->setParameter($variableName, $this->Request->getParameter($reqName)); }
php
protected function passthruParameter(&$dto, $variableName) { $reqName = str_replace('.','_', $variableName); if($this->Request->getParameter($reqName) !== null && $this->Request->getParameter($reqName) != '') $dto->setParameter($variableName, $this->Request->getParameter($reqName)); }
[ "protected", "function", "passthruParameter", "(", "&", "$", "dto", ",", "$", "variableName", ")", "{", "$", "reqName", "=", "str_replace", "(", "'.'", ",", "'_'", ",", "$", "variableName", ")", ";", "if", "(", "$", "this", "->", "Request", "->", "getP...
copied from AbstractController
[ "copied", "from", "AbstractController" ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/mvc/controllers/AbstractApiController.php#L135-L139
203,021
AnonymPHP/Anonym-Route
RouteMatcher.php
RouteMatcher.matchWhen
public function matchWhen($url = null) { if (null !== $url) { $this->setMatchUrl($url); } return strpos($this->getRequestedUrl(), $this->getMatchUrl()) === 0; }
php
public function matchWhen($url = null) { if (null !== $url) { $this->setMatchUrl($url); } return strpos($this->getRequestedUrl(), $this->getMatchUrl()) === 0; }
[ "public", "function", "matchWhen", "(", "$", "url", "=", "null", ")", "{", "if", "(", "null", "!==", "$", "url", ")", "{", "$", "this", "->", "setMatchUrl", "(", "$", "url", ")", ";", "}", "return", "strpos", "(", "$", "this", "->", "getRequestedUr...
match uri for when( method @param null|string $url @return bool
[ "match", "uri", "for", "when", "(", "method" ]
bb7f8004fbbd2998af8b0061f404f026f11466ab
https://github.com/AnonymPHP/Anonym-Route/blob/bb7f8004fbbd2998af8b0061f404f026f11466ab/RouteMatcher.php#L71-L78
203,022
apioo/psx-validate
src/Filter/Collection.php
Collection.apply
public function apply($value) { $modified = false; foreach ($this->filters as $filter) { $result = $filter->apply($value); if ($result === false) { return false; } elseif ($result === true) { } else { $modified = true;...
php
public function apply($value) { $modified = false; foreach ($this->filters as $filter) { $result = $filter->apply($value); if ($result === false) { return false; } elseif ($result === true) { } else { $modified = true;...
[ "public", "function", "apply", "(", "$", "value", ")", "{", "$", "modified", "=", "false", ";", "foreach", "(", "$", "this", "->", "filters", "as", "$", "filter", ")", "{", "$", "result", "=", "$", "filter", "->", "apply", "(", "$", "value", ")", ...
Returns true if all filters allow the value @param mixed $value @return boolean
[ "Returns", "true", "if", "all", "filters", "allow", "the", "value" ]
4860c6a2c7f7ca52d3bd6d7e6ec7d6a7ddcfd83d
https://github.com/apioo/psx-validate/blob/4860c6a2c7f7ca52d3bd6d7e6ec7d6a7ddcfd83d/src/Filter/Collection.php#L53-L70
203,023
Linkvalue-Interne/MobileNotif
src/Model/GcmMessage.php
GcmMessage.setData
public function setData(array $data) { $reservedDataKeys = array( 'from', 'notification', 'to', 'registration_ids', 'collapse_key', 'priority', 'restricted_package_name', 'content_available', 'delay_w...
php
public function setData(array $data) { $reservedDataKeys = array( 'from', 'notification', 'to', 'registration_ids', 'collapse_key', 'priority', 'restricted_package_name', 'content_available', 'delay_w...
[ "public", "function", "setData", "(", "array", "$", "data", ")", "{", "$", "reservedDataKeys", "=", "array", "(", "'from'", ",", "'notification'", ",", "'to'", ",", "'registration_ids'", ",", "'collapse_key'", ",", "'priority'", ",", "'restricted_package_name'", ...
Set the value of Data. @param array $data @return self
[ "Set", "the", "value", "of", "Data", "." ]
e6e4c4219f3bbb0aee32e90e5fdfc8c6a7ed53f6
https://github.com/Linkvalue-Interne/MobileNotif/blob/e6e4c4219f3bbb0aee32e90e5fdfc8c6a7ed53f6/src/Model/GcmMessage.php#L733-L771
203,024
cloudtek/dynamodm
lib/Cloudtek/DynamoDM/Persister/DocumentPersister.php
DocumentPersister.addFilterToQueryBuilder
public function addFilterToQueryBuilder(QueryBuilder $qb) { $filters = $this->dm->getFilterCollection()->getFilterCriteria($this->class); foreach ($filters as $filter) { $qb->addCriteria($filter); } }
php
public function addFilterToQueryBuilder(QueryBuilder $qb) { $filters = $this->dm->getFilterCollection()->getFilterCriteria($this->class); foreach ($filters as $filter) { $qb->addCriteria($filter); } }
[ "public", "function", "addFilterToQueryBuilder", "(", "QueryBuilder", "$", "qb", ")", "{", "$", "filters", "=", "$", "this", "->", "dm", "->", "getFilterCollection", "(", ")", "->", "getFilterCriteria", "(", "$", "this", "->", "class", ")", ";", "foreach", ...
Adds filter criteria to a QueryBuilder instance. @param QueryBuilder $qb @return void
[ "Adds", "filter", "criteria", "to", "a", "QueryBuilder", "instance", "." ]
119d355e2c5cbaef1f867970349b4432f5704fcd
https://github.com/cloudtek/dynamodm/blob/119d355e2c5cbaef1f867970349b4432f5704fcd/lib/Cloudtek/DynamoDM/Persister/DocumentPersister.php#L110-L117
203,025
cloudtek/dynamodm
lib/Cloudtek/DynamoDM/Persister/DocumentPersister.php
DocumentPersister.createDocument
private function createDocument($data, $document = null, $refresh = false) { if ($this->class->isLockable) { $lockAttribute = $this->class->getLockMetadata()->attributeName; if (isset($result[$lockAttribute]) && $data[$lockAttribute] === LockMode::PESSIMISTIC_WRITE) { ...
php
private function createDocument($data, $document = null, $refresh = false) { if ($this->class->isLockable) { $lockAttribute = $this->class->getLockMetadata()->attributeName; if (isset($result[$lockAttribute]) && $data[$lockAttribute] === LockMode::PESSIMISTIC_WRITE) { ...
[ "private", "function", "createDocument", "(", "$", "data", ",", "$", "document", "=", "null", ",", "$", "refresh", "=", "false", ")", "{", "if", "(", "$", "this", "->", "class", "->", "isLockable", ")", "{", "$", "lockAttribute", "=", "$", "this", "-...
Creates or fills a single document object from a query result. @param array $data Raw result data from DynamoDB. @param object $document The document object to fill, if any. @param bool $refresh Refresh hint for UnitOfWork behavior. @return object The filled and managed document object or NULL, if the query r...
[ "Creates", "or", "fills", "a", "single", "document", "object", "from", "a", "query", "result", "." ]
119d355e2c5cbaef1f867970349b4432f5704fcd
https://github.com/cloudtek/dynamodm/blob/119d355e2c5cbaef1f867970349b4432f5704fcd/lib/Cloudtek/DynamoDM/Persister/DocumentPersister.php#L131-L149
203,026
cloudtek/dynamodm
lib/Cloudtek/DynamoDM/Persister/DocumentPersister.php
DocumentPersister.createReferenceInverseSideQuery
public function createReferenceInverseSideQuery(PropertyMetadata $mapping, $owner) { $targetClass = $this->dm->getClassMetadata($mapping->targetDocument); $mappedBy = $targetClass->getPropertyMetadata($mapping->mappedBy); $qb = $this->dm->createQueryBuilder($mapping->targetDocume...
php
public function createReferenceInverseSideQuery(PropertyMetadata $mapping, $owner) { $targetClass = $this->dm->getClassMetadata($mapping->targetDocument); $mappedBy = $targetClass->getPropertyMetadata($mapping->mappedBy); $qb = $this->dm->createQueryBuilder($mapping->targetDocume...
[ "public", "function", "createReferenceInverseSideQuery", "(", "PropertyMetadata", "$", "mapping", ",", "$", "owner", ")", "{", "$", "targetClass", "=", "$", "this", "->", "dm", "->", "getClassMetadata", "(", "$", "mapping", "->", "targetDocument", ")", ";", "$...
Build and return a query capable of populating the given inverse-side reference. @param PropertyMetadata $mapping @param object $owner @return Query|Scan
[ "Build", "and", "return", "a", "query", "capable", "of", "populating", "the", "given", "inverse", "-", "side", "reference", "." ]
119d355e2c5cbaef1f867970349b4432f5704fcd
https://github.com/cloudtek/dynamodm/blob/119d355e2c5cbaef1f867970349b4432f5704fcd/lib/Cloudtek/DynamoDM/Persister/DocumentPersister.php#L159-L193
203,027
cloudtek/dynamodm
lib/Cloudtek/DynamoDM/Persister/DocumentPersister.php
DocumentPersister.delete
public function delete($document) { $qb = $this->dm->createQueryBuilder($this->class->name); $identifier = $this->uow->getDocumentIdentifier($document); $qb->delete(); $qb->setIdentifier($identifier); if ($this->class->isLockable) { $qb->attr($this->clas...
php
public function delete($document) { $qb = $this->dm->createQueryBuilder($this->class->name); $identifier = $this->uow->getDocumentIdentifier($document); $qb->delete(); $qb->setIdentifier($identifier); if ($this->class->isLockable) { $qb->attr($this->clas...
[ "public", "function", "delete", "(", "$", "document", ")", "{", "$", "qb", "=", "$", "this", "->", "dm", "->", "createQueryBuilder", "(", "$", "this", "->", "class", "->", "name", ")", ";", "$", "identifier", "=", "$", "this", "->", "uow", "->", "g...
Removes a document from DynamoDB @param object $document @return void @throws LockException
[ "Removes", "a", "document", "from", "DynamoDB" ]
119d355e2c5cbaef1f867970349b4432f5704fcd
https://github.com/cloudtek/dynamodm/blob/119d355e2c5cbaef1f867970349b4432f5704fcd/lib/Cloudtek/DynamoDM/Persister/DocumentPersister.php#L237-L261
203,028
cloudtek/dynamodm
lib/Cloudtek/DynamoDM/Persister/DocumentPersister.php
DocumentPersister.insert
public function insert($document) { $class = $this->dm->getClassMetadata(get_class($document)); $changeset = $this->uow->getDocumentChangeSet($document); $qb = $this->dm->createQueryBuilder($this->class->name); foreach ($class->propertyMetadata as $mapping) { ...
php
public function insert($document) { $class = $this->dm->getClassMetadata(get_class($document)); $changeset = $this->uow->getDocumentChangeSet($document); $qb = $this->dm->createQueryBuilder($this->class->name); foreach ($class->propertyMetadata as $mapping) { ...
[ "public", "function", "insert", "(", "$", "document", ")", "{", "$", "class", "=", "$", "this", "->", "dm", "->", "getClassMetadata", "(", "get_class", "(", "$", "document", ")", ")", ";", "$", "changeset", "=", "$", "this", "->", "uow", "->", "getDo...
Insert the provided document. @param object $document @return void
[ "Insert", "the", "provided", "document", "." ]
119d355e2c5cbaef1f867970349b4432f5704fcd
https://github.com/cloudtek/dynamodm/blob/119d355e2c5cbaef1f867970349b4432f5704fcd/lib/Cloudtek/DynamoDM/Persister/DocumentPersister.php#L317-L347
203,029
cloudtek/dynamodm
lib/Cloudtek/DynamoDM/Persister/DocumentPersister.php
DocumentPersister.load
public function load(Identifier $identifier, $document = null, $lockMode = LockMode::NONE) { $qb = $this->dm->createQueryBuilder($this->class->name); $query = $qb->get()->setIdentifier($identifier)->getQuery(); $result = $query->getSingleMarshalledResult(); return $result ? $th...
php
public function load(Identifier $identifier, $document = null, $lockMode = LockMode::NONE) { $qb = $this->dm->createQueryBuilder($this->class->name); $query = $qb->get()->setIdentifier($identifier)->getQuery(); $result = $query->getSingleMarshalledResult(); return $result ? $th...
[ "public", "function", "load", "(", "Identifier", "$", "identifier", ",", "$", "document", "=", "null", ",", "$", "lockMode", "=", "LockMode", "::", "NONE", ")", "{", "$", "qb", "=", "$", "this", "->", "dm", "->", "createQueryBuilder", "(", "$", "this",...
Find a document by Identifier instance. @param Identifier $identifier @param object|null $document Document to load the data into. If not specified, a new document is created. @param int $lockMode @return object|null The loaded and managed document instance or null if no document was found
[ "Find", "a", "document", "by", "Identifier", "instance", "." ]
119d355e2c5cbaef1f867970349b4432f5704fcd
https://github.com/cloudtek/dynamodm/blob/119d355e2c5cbaef1f867970349b4432f5704fcd/lib/Cloudtek/DynamoDM/Persister/DocumentPersister.php#L360-L367
203,030
cloudtek/dynamodm
lib/Cloudtek/DynamoDM/Persister/DocumentPersister.php
DocumentPersister.loadAll
public function loadAll(array $criteria = [], $limit = null) { $qb = $this->dm->createQueryBuilder($this->class->name)->addCriteria($criteria); return $qb->getQuery()->limit($limit)->execute(); }
php
public function loadAll(array $criteria = [], $limit = null) { $qb = $this->dm->createQueryBuilder($this->class->name)->addCriteria($criteria); return $qb->getQuery()->limit($limit)->execute(); }
[ "public", "function", "loadAll", "(", "array", "$", "criteria", "=", "[", "]", ",", "$", "limit", "=", "null", ")", "{", "$", "qb", "=", "$", "this", "->", "dm", "->", "createQueryBuilder", "(", "$", "this", "->", "class", "->", "name", ")", "->", ...
Load all documents from a table, optionally limited by the provided criteria. @param array $criteria Query criteria. @param int|null $limit Limit the number of documents returned. @return Iterator
[ "Load", "all", "documents", "from", "a", "table", "optionally", "limited", "by", "the", "provided", "criteria", "." ]
119d355e2c5cbaef1f867970349b4432f5704fcd
https://github.com/cloudtek/dynamodm/blob/119d355e2c5cbaef1f867970349b4432f5704fcd/lib/Cloudtek/DynamoDM/Persister/DocumentPersister.php#L377-L382
203,031
cloudtek/dynamodm
lib/Cloudtek/DynamoDM/Persister/DocumentPersister.php
DocumentPersister.loadReferenceManyCollectionInverseSide
private function loadReferenceManyCollectionInverseSide(PersistentCollectionInterface $collection) { $query = $this->createReferenceInverseSideQuery($collection->getMapping(), $collection->getOwner()); $documents = $query->execute()->toArray(); foreach ($documents as $key => $document) ...
php
private function loadReferenceManyCollectionInverseSide(PersistentCollectionInterface $collection) { $query = $this->createReferenceInverseSideQuery($collection->getMapping(), $collection->getOwner()); $documents = $query->execute()->toArray(); foreach ($documents as $key => $document) ...
[ "private", "function", "loadReferenceManyCollectionInverseSide", "(", "PersistentCollectionInterface", "$", "collection", ")", "{", "$", "query", "=", "$", "this", "->", "createReferenceInverseSideQuery", "(", "$", "collection", "->", "getMapping", "(", ")", ",", "$",...
Populate an inverse-side ReferenceMany association. @param PersistentCollectionInterface $collection @return void
[ "Populate", "an", "inverse", "-", "side", "ReferenceMany", "association", "." ]
119d355e2c5cbaef1f867970349b4432f5704fcd
https://github.com/cloudtek/dynamodm/blob/119d355e2c5cbaef1f867970349b4432f5704fcd/lib/Cloudtek/DynamoDM/Persister/DocumentPersister.php#L451-L459
203,032
cloudtek/dynamodm
lib/Cloudtek/DynamoDM/Persister/DocumentPersister.php
DocumentPersister.loadReferenceManyCollectionOwningSide
private function loadReferenceManyCollectionOwningSide(PersistentCollectionInterface $collection) { $mapping = $collection->getMapping(); /** @var Identifier[] $identifiers */ $identifiers = array_map( function ($referenceData) use ($mapping) { return $this->ap->...
php
private function loadReferenceManyCollectionOwningSide(PersistentCollectionInterface $collection) { $mapping = $collection->getMapping(); /** @var Identifier[] $identifiers */ $identifiers = array_map( function ($referenceData) use ($mapping) { return $this->ap->...
[ "private", "function", "loadReferenceManyCollectionOwningSide", "(", "PersistentCollectionInterface", "$", "collection", ")", "{", "$", "mapping", "=", "$", "collection", "->", "getMapping", "(", ")", ";", "/** @var Identifier[] $identifiers */", "$", "identifiers", "=", ...
Populate an owning-side ReferenceMany association. @param PersistentCollectionInterface $collection @return void
[ "Populate", "an", "owning", "-", "side", "ReferenceMany", "association", "." ]
119d355e2c5cbaef1f867970349b4432f5704fcd
https://github.com/cloudtek/dynamodm/blob/119d355e2c5cbaef1f867970349b4432f5704fcd/lib/Cloudtek/DynamoDM/Persister/DocumentPersister.php#L468-L556
203,033
cloudtek/dynamodm
lib/Cloudtek/DynamoDM/Persister/DocumentPersister.php
DocumentPersister.loadReferenceManyWithRepositoryMethod
private function loadReferenceManyWithRepositoryMethod(PersistentCollectionInterface $collection) { $iterator = $this->createReferenceManyWithRepositoryMethodIterator($collection); $mapping = $collection->getMapping(); $documents = $iterator->toArray(); foreach ($documents as $key...
php
private function loadReferenceManyWithRepositoryMethod(PersistentCollectionInterface $collection) { $iterator = $this->createReferenceManyWithRepositoryMethodIterator($collection); $mapping = $collection->getMapping(); $documents = $iterator->toArray(); foreach ($documents as $key...
[ "private", "function", "loadReferenceManyWithRepositoryMethod", "(", "PersistentCollectionInterface", "$", "collection", ")", "{", "$", "iterator", "=", "$", "this", "->", "createReferenceManyWithRepositoryMethodIterator", "(", "$", "collection", ")", ";", "$", "mapping",...
Populate a ReferenceMany association with a custom repository method. @param PersistentCollectionInterface $collection @return void
[ "Populate", "a", "ReferenceMany", "association", "with", "a", "custom", "repository", "method", "." ]
119d355e2c5cbaef1f867970349b4432f5704fcd
https://github.com/cloudtek/dynamodm/blob/119d355e2c5cbaef1f867970349b4432f5704fcd/lib/Cloudtek/DynamoDM/Persister/DocumentPersister.php#L565-L577
203,034
cloudtek/dynamodm
lib/Cloudtek/DynamoDM/Persister/DocumentPersister.php
DocumentPersister.lock
public function lock($document, $lockMode) { $qb = $this->dm->createQueryBuilder($this->class->name); $identifier = $this->uow->getDocumentIdentifier($document); $lockMapping = $this->class->lockMetadata; $qb->update(); $qb->setIdentifier($identifier); $qb...
php
public function lock($document, $lockMode) { $qb = $this->dm->createQueryBuilder($this->class->name); $identifier = $this->uow->getDocumentIdentifier($document); $lockMapping = $this->class->lockMetadata; $qb->update(); $qb->setIdentifier($identifier); $qb...
[ "public", "function", "lock", "(", "$", "document", ",", "$", "lockMode", ")", "{", "$", "qb", "=", "$", "this", "->", "dm", "->", "createQueryBuilder", "(", "$", "this", "->", "class", "->", "name", ")", ";", "$", "identifier", "=", "$", "this", "...
Locks document by storing the lock mode on the mapped lock attribute. @param object $document @param int $lockMode @return void
[ "Locks", "document", "by", "storing", "the", "lock", "mode", "on", "the", "mapped", "lock", "attribute", "." ]
119d355e2c5cbaef1f867970349b4432f5704fcd
https://github.com/cloudtek/dynamodm/blob/119d355e2c5cbaef1f867970349b4432f5704fcd/lib/Cloudtek/DynamoDM/Persister/DocumentPersister.php#L587-L600
203,035
cloudtek/dynamodm
lib/Cloudtek/DynamoDM/Persister/DocumentPersister.php
DocumentPersister.upsert
public function upsert($document, $parentPath = null) { $class = $this->dm->getClassMetadata(get_class($document)); $changeset = $this->uow->getDocumentChangeSet($document); if (!$class->isEmbeddedDocument) { $qb = $this->dm->createQueryBuilder($class->name); ...
php
public function upsert($document, $parentPath = null) { $class = $this->dm->getClassMetadata(get_class($document)); $changeset = $this->uow->getDocumentChangeSet($document); if (!$class->isEmbeddedDocument) { $qb = $this->dm->createQueryBuilder($class->name); ...
[ "public", "function", "upsert", "(", "$", "document", ",", "$", "parentPath", "=", "null", ")", "{", "$", "class", "=", "$", "this", "->", "dm", "->", "getClassMetadata", "(", "get_class", "(", "$", "document", ")", ")", ";", "$", "changeset", "=", "...
Update a document if it already exists in DynamoDB, or insert if it does not. @param object $document @param RootPath|null $parentPath For embedded documents, the QueryBuilder object representing the top-level document path. @return void
[ "Update", "a", "document", "if", "it", "already", "exists", "in", "DynamoDB", "or", "insert", "if", "it", "does", "not", "." ]
119d355e2c5cbaef1f867970349b4432f5704fcd
https://github.com/cloudtek/dynamodm/blob/119d355e2c5cbaef1f867970349b4432f5704fcd/lib/Cloudtek/DynamoDM/Persister/DocumentPersister.php#L881-L960
203,036
cloudtek/dynamodm
lib/Cloudtek/DynamoDM/Schema/Identifier/Identifier.php
Identifier.addToQueryCondition
public function addToQueryCondition(Expr $expr) { $expr->attr($this->getHashKey()->getPropertyMetadata()->name)->equals($this->getHashValue()); }
php
public function addToQueryCondition(Expr $expr) { $expr->attr($this->getHashKey()->getPropertyMetadata()->name)->equals($this->getHashValue()); }
[ "public", "function", "addToQueryCondition", "(", "Expr", "$", "expr", ")", "{", "$", "expr", "->", "attr", "(", "$", "this", "->", "getHashKey", "(", ")", "->", "getPropertyMetadata", "(", ")", "->", "name", ")", "->", "equals", "(", "$", "this", "->"...
Add a conditon for this identifer's values to the provided query expression. @param Expr $expr @return void
[ "Add", "a", "conditon", "for", "this", "identifer", "s", "values", "to", "the", "provided", "query", "expression", "." ]
119d355e2c5cbaef1f867970349b4432f5704fcd
https://github.com/cloudtek/dynamodm/blob/119d355e2c5cbaef1f867970349b4432f5704fcd/lib/Cloudtek/DynamoDM/Schema/Identifier/Identifier.php#L75-L78
203,037
cloudtek/dynamodm
lib/Cloudtek/DynamoDM/Schema/Identifier/Identifier.php
Identifier.getDocument
public function getDocument(DocumentManager $dm) { // Check identity map first, if its already in there just return it. $document = $dm->getUnitOfWork()->tryGetByIdentifier($this); if ($document !== false) { return $document; } $document = $dm->getProxyFactory()-...
php
public function getDocument(DocumentManager $dm) { // Check identity map first, if its already in there just return it. $document = $dm->getUnitOfWork()->tryGetByIdentifier($this); if ($document !== false) { return $document; } $document = $dm->getProxyFactory()-...
[ "public", "function", "getDocument", "(", "DocumentManager", "$", "dm", ")", "{", "// Check identity map first, if its already in there just return it.", "$", "document", "=", "$", "dm", "->", "getUnitOfWork", "(", ")", "->", "tryGetByIdentifier", "(", "$", "this", ")...
Gets a reference to the target document without actually loading it. If partial objects are allowed, this method will return a partial object that only has its identifier populated. Otherwise a proxy is returned that automatically loads itself on first access. @param DocumentManager $dm @return object The document r...
[ "Gets", "a", "reference", "to", "the", "target", "document", "without", "actually", "loading", "it", "." ]
119d355e2c5cbaef1f867970349b4432f5704fcd
https://github.com/cloudtek/dynamodm/blob/119d355e2c5cbaef1f867970349b4432f5704fcd/lib/Cloudtek/DynamoDM/Schema/Identifier/Identifier.php#L113-L125
203,038
cloudtek/dynamodm
lib/Cloudtek/DynamoDM/Schema/Identifier/Identifier.php
Identifier.getDocumentPartial
public function getDocumentPartial(DocumentManager $dm) { // Check identity map first, if its already in there just return it. $document = $dm->getUnitOfWork()->tryGetByIdentifier($this); if ($document !== false) { return $document; } $document = $this->class->ne...
php
public function getDocumentPartial(DocumentManager $dm) { // Check identity map first, if its already in there just return it. $document = $dm->getUnitOfWork()->tryGetByIdentifier($this); if ($document !== false) { return $document; } $document = $this->class->ne...
[ "public", "function", "getDocumentPartial", "(", "DocumentManager", "$", "dm", ")", "{", "// Check identity map first, if its already in there just return it.", "$", "document", "=", "$", "dm", "->", "getUnitOfWork", "(", ")", "->", "tryGetByIdentifier", "(", "$", "this...
Gets a partial reference to the target document without actually loading it, if the document is not yet loaded. The returned reference may be a partial object if the document is not yet loaded/managed. If it is a partial object it will not initialize the rest of the document state on access. Thus you can only ever saf...
[ "Gets", "a", "partial", "reference", "to", "the", "target", "document", "without", "actually", "loading", "it", "if", "the", "document", "is", "not", "yet", "loaded", "." ]
119d355e2c5cbaef1f867970349b4432f5704fcd
https://github.com/cloudtek/dynamodm/blob/119d355e2c5cbaef1f867970349b4432f5704fcd/lib/Cloudtek/DynamoDM/Schema/Identifier/Identifier.php#L146-L159
203,039
Beotie/Beotie-PSR7-stream
src/Stream/FileInfoComponent/MetadataComponent.php
MetadataComponent.isMetadataMethod
protected function isMetadataMethod(string &$subject, int $key, string $pattern) { unset($key); if (!preg_match($pattern, $subject)) { $subject = false; } return; }
php
protected function isMetadataMethod(string &$subject, int $key, string $pattern) { unset($key); if (!preg_match($pattern, $subject)) { $subject = false; } return; }
[ "protected", "function", "isMetadataMethod", "(", "string", "&", "$", "subject", ",", "int", "$", "key", ",", "string", "$", "pattern", ")", "{", "unset", "(", "$", "key", ")", ";", "if", "(", "!", "preg_match", "(", "$", "pattern", ",", "$", "subjec...
Is metadata method Update the method as subject is is not matching the given patter to false @param string $subject The subject @param int $key The subject key @param string $pattern The matching pattern @return void
[ "Is", "metadata", "method" ]
8f4f4bfb8252e392fc17eed2a2b0682c4e9d08ca
https://github.com/Beotie/Beotie-PSR7-stream/blob/8f4f4bfb8252e392fc17eed2a2b0682c4e9d08ca/src/Stream/FileInfoComponent/MetadataComponent.php#L104-L112
203,040
shgysk8zer0/core_api
traits/magic/domdocument.php
DOMDocument._nodeBuilder
final protected function _nodeBuilder($key, $value = null, \DOMNode &$parent = null) { if (is_null($parent)) { $parent = $this; } if (is_string($key)) { if (substr($key, 0, 1) === '@' and (is_string($value) or is_numeric($value))) { $parent->setAttribute(substr($key, 1), $value); } else { $node ...
php
final protected function _nodeBuilder($key, $value = null, \DOMNode &$parent = null) { if (is_null($parent)) { $parent = $this; } if (is_string($key)) { if (substr($key, 0, 1) === '@' and (is_string($value) or is_numeric($value))) { $parent->setAttribute(substr($key, 1), $value); } else { $node ...
[ "final", "protected", "function", "_nodeBuilder", "(", "$", "key", ",", "$", "value", "=", "null", ",", "\\", "DOMNode", "&", "$", "parent", "=", "null", ")", "{", "if", "(", "is_null", "(", "$", "parent", ")", ")", "{", "$", "parent", "=", "$", ...
Dynamically and seemingly magically build nodes and append to parent @param mixed $key Int or string to become tagname of new node @param mixed $value String, array, sdtClass object, DOMNode @param \DOMNode $parent Parent element to append to (defaults to $this) @return void
[ "Dynamically", "and", "seemingly", "magically", "build", "nodes", "and", "append", "to", "parent" ]
9e9b8baf761af874b95256ad2462e55fbb2b2e58
https://github.com/shgysk8zer0/core_api/blob/9e9b8baf761af874b95256ad2462e55fbb2b2e58/traits/magic/domdocument.php#L149-L180
203,041
cubicmushroom/valueobjects
src/Structure/Collection.php
Collection.fromNative
public static function fromNative() { $array = \func_get_arg(0); $items = array(); foreach ($array as $item) { if ($item instanceof \Traversable || \is_array($item)) { $items[] = static::fromNative($item); } else { $items[] = new Strin...
php
public static function fromNative() { $array = \func_get_arg(0); $items = array(); foreach ($array as $item) { if ($item instanceof \Traversable || \is_array($item)) { $items[] = static::fromNative($item); } else { $items[] = new Strin...
[ "public", "static", "function", "fromNative", "(", ")", "{", "$", "array", "=", "\\", "func_get_arg", "(", "0", ")", ";", "$", "items", "=", "array", "(", ")", ";", "foreach", "(", "$", "array", "as", "$", "item", ")", "{", "if", "(", "$", "item"...
Returns a new Collection object @param \SplFixedArray $array @return self
[ "Returns", "a", "new", "Collection", "object" ]
4554239ab75d65eeb9773219aa5b07e9fbfabb92
https://github.com/cubicmushroom/valueobjects/blob/4554239ab75d65eeb9773219aa5b07e9fbfabb92/src/Structure/Collection.php#L21-L37
203,042
cubicmushroom/valueobjects
src/Structure/Collection.php
Collection.contains
public function contains(ValueObjectInterface $object) { foreach ($this->items as $item) { if ($item->sameValueAs($object)) { return true; } } return false; }
php
public function contains(ValueObjectInterface $object) { foreach ($this->items as $item) { if ($item->sameValueAs($object)) { return true; } } return false; }
[ "public", "function", "contains", "(", "ValueObjectInterface", "$", "object", ")", "{", "foreach", "(", "$", "this", "->", "items", "as", "$", "item", ")", "{", "if", "(", "$", "item", "->", "sameValueAs", "(", "$", "object", ")", ")", "{", "return", ...
Tells whether the Collection contains an object @param ValueObjectInterface $object @return bool
[ "Tells", "whether", "the", "Collection", "contains", "an", "object" ]
4554239ab75d65eeb9773219aa5b07e9fbfabb92
https://github.com/cubicmushroom/valueobjects/blob/4554239ab75d65eeb9773219aa5b07e9fbfabb92/src/Structure/Collection.php#L95-L104
203,043
drdplusinfo/drdplus-fight-properties
DrdPlus/FightProperties/FightProperties.php
FightProperties.getShieldHolding
private function getShieldHolding(): ItemHoldingCode { if ($this->weaponlikeHolding->holdsByMainHand()) { return ItemHoldingCode::getIt(ItemHoldingCode::OFFHAND); } if ($this->weaponlikeHolding->holdsByOffhand()) { return ItemHoldingCode::getIt(ItemHoldingCode::MAIN_H...
php
private function getShieldHolding(): ItemHoldingCode { if ($this->weaponlikeHolding->holdsByMainHand()) { return ItemHoldingCode::getIt(ItemHoldingCode::OFFHAND); } if ($this->weaponlikeHolding->holdsByOffhand()) { return ItemHoldingCode::getIt(ItemHoldingCode::MAIN_H...
[ "private", "function", "getShieldHolding", "(", ")", ":", "ItemHoldingCode", "{", "if", "(", "$", "this", "->", "weaponlikeHolding", "->", "holdsByMainHand", "(", ")", ")", "{", "return", "ItemHoldingCode", "::", "getIt", "(", "ItemHoldingCode", "::", "OFFHAND",...
Gives holding opposite to given weapon holding. @return ItemHoldingCode @throws \DrdPlus\FightProperties\Exceptions\NoHandLeftForShield
[ "Gives", "holding", "opposite", "to", "given", "weapon", "holding", "." ]
66cfce5fa8ba940ee5b9069c5ce6d5a645d4e1a1
https://github.com/drdplusinfo/drdplus-fight-properties/blob/66cfce5fa8ba940ee5b9069c5ce6d5a645d4e1a1/DrdPlus/FightProperties/FightProperties.php#L346-L361
203,044
drdplusinfo/drdplus-fight-properties
DrdPlus/FightProperties/FightProperties.php
FightProperties.getFightNumberModifier
private function getFightNumberModifier(): int { $fightNumberModifier = 0; // strength effect $fightNumberModifier += $this->getFightNumberMalusByStrength(); // skills effect $fightNumberModifier += $this->getFightNumberMalusBySkills(); // combat actions effect ...
php
private function getFightNumberModifier(): int { $fightNumberModifier = 0; // strength effect $fightNumberModifier += $this->getFightNumberMalusByStrength(); // skills effect $fightNumberModifier += $this->getFightNumberMalusBySkills(); // combat actions effect ...
[ "private", "function", "getFightNumberModifier", "(", ")", ":", "int", "{", "$", "fightNumberModifier", "=", "0", ";", "// strength effect", "$", "fightNumberModifier", "+=", "$", "this", "->", "getFightNumberMalusByStrength", "(", ")", ";", "// skills effect", "$",...
Fight number update according to a missing strength, missing skill and by a combat action @return int
[ "Fight", "number", "update", "according", "to", "a", "missing", "strength", "missing", "skill", "and", "by", "a", "combat", "action" ]
66cfce5fa8ba940ee5b9069c5ce6d5a645d4e1a1
https://github.com/drdplusinfo/drdplus-fight-properties/blob/66cfce5fa8ba940ee5b9069c5ce6d5a645d4e1a1/DrdPlus/FightProperties/FightProperties.php#L400-L414
203,045
niridoy/LaraveIinstaller
src/Helpers/FinalInstallManager.php
FinalInstallManager.generateKey
private static function generateKey($outputLog) { try{ Artisan::call('key:generate', ["--force"=> true], $outputLog); } catch(Exception $e){ return $this->response($e->getMessage()); } return $outputLog; }
php
private static function generateKey($outputLog) { try{ Artisan::call('key:generate', ["--force"=> true], $outputLog); } catch(Exception $e){ return $this->response($e->getMessage()); } return $outputLog; }
[ "private", "static", "function", "generateKey", "(", "$", "outputLog", ")", "{", "try", "{", "Artisan", "::", "call", "(", "'key:generate'", ",", "[", "\"--force\"", "=>", "true", "]", ",", "$", "outputLog", ")", ";", "}", "catch", "(", "Exception", "$",...
Generate New Application Key. @param collection $outputLog @return collection
[ "Generate", "New", "Application", "Key", "." ]
8339cf45bf393be57fb4e6c63179a6865028f076
https://github.com/niridoy/LaraveIinstaller/blob/8339cf45bf393be57fb4e6c63179a6865028f076/src/Helpers/FinalInstallManager.php#L32-L42
203,046
Wedeto/DB
src/Query/FieldName.php
FieldName.toSQL
public function toSQL(Parameters $params, bool $inner_clause) { $field = $this->getField(); $table = $this->getTable(); if (empty($table)) $table = $params->getDefaultTable(); $drv = $params->getDriver(); if (!empty($table)) { list($table, $al...
php
public function toSQL(Parameters $params, bool $inner_clause) { $field = $this->getField(); $table = $this->getTable(); if (empty($table)) $table = $params->getDefaultTable(); $drv = $params->getDriver(); if (!empty($table)) { list($table, $al...
[ "public", "function", "toSQL", "(", "Parameters", "$", "params", ",", "bool", "$", "inner_clause", ")", "{", "$", "field", "=", "$", "this", "->", "getField", "(", ")", ";", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "if", "("...
Write a field name as SQL query syntax @param Parameters $params The query parameters: tables and placeholder values @param bool $inner_clause Unused @return string The generated SQL
[ "Write", "a", "field", "name", "as", "SQL", "query", "syntax" ]
715f8f2e3ae6b53c511c40b620921cb9c87e6f62
https://github.com/Wedeto/DB/blob/715f8f2e3ae6b53c511c40b620921cb9c87e6f62/src/Query/FieldName.php#L58-L78
203,047
wobblecode/WobbleCodeUserBundle
Manager/OrganizationManager.php
OrganizationManager.setupOrganization
public function setupOrganization(User $user) { $guestCreateOrganization = false; $invitationHash = $this->session->get('newInvitation', false); if ($guestCreateOrganization || $invitationHash == false) { $organization = $this->createOrganization($user); } if ($...
php
public function setupOrganization(User $user) { $guestCreateOrganization = false; $invitationHash = $this->session->get('newInvitation', false); if ($guestCreateOrganization || $invitationHash == false) { $organization = $this->createOrganization($user); } if ($...
[ "public", "function", "setupOrganization", "(", "User", "$", "user", ")", "{", "$", "guestCreateOrganization", "=", "false", ";", "$", "invitationHash", "=", "$", "this", "->", "session", "->", "get", "(", "'newInvitation'", ",", "false", ")", ";", "if", "...
Setup organization from signup. It chekcs if there is an invitationHash in session @todo Add Bundle option for $guestCreateOrganization @param User $user @return Organization
[ "Setup", "organization", "from", "signup", ".", "It", "chekcs", "if", "there", "is", "an", "invitationHash", "in", "session" ]
7b8206f8b4a50fbc61f7bfe4f83eb466cad96440
https://github.com/wobblecode/WobbleCodeUserBundle/blob/7b8206f8b4a50fbc61f7bfe4f83eb466cad96440/Manager/OrganizationManager.php#L66-L80
203,048
wobblecode/WobbleCodeUserBundle
Manager/OrganizationManager.php
OrganizationManager.createOrganization
public function createOrganization(User $user) { $organization = new $this->organizationClass; $organization->setOwner($user); $organization->addUser($user); $role = new Role; $role->setRoles(array('ROLE_ORGANIZATION_OWNER')); $role->setUser($user); $role->se...
php
public function createOrganization(User $user) { $organization = new $this->organizationClass; $organization->setOwner($user); $organization->addUser($user); $role = new Role; $role->setRoles(array('ROLE_ORGANIZATION_OWNER')); $role->setUser($user); $role->se...
[ "public", "function", "createOrganization", "(", "User", "$", "user", ")", "{", "$", "organization", "=", "new", "$", "this", "->", "organizationClass", ";", "$", "organization", "->", "setOwner", "(", "$", "user", ")", ";", "$", "organization", "->", "add...
It creates and completes a new Organization @param OrganizationInterface $organization New empty organization @param User $user User that owns the organizartion @return Organization The new organization
[ "It", "creates", "and", "completes", "a", "new", "Organization" ]
7b8206f8b4a50fbc61f7bfe4f83eb466cad96440
https://github.com/wobblecode/WobbleCodeUserBundle/blob/7b8206f8b4a50fbc61f7bfe4f83eb466cad96440/Manager/OrganizationManager.php#L90-L133
203,049
wobblecode/WobbleCodeUserBundle
Manager/OrganizationManager.php
OrganizationManager.addMember
public function addMember(OrganizationInterface $organization, User $user, array $roles) { if ($organization->getOwner() === null) { $organization->setOwner($user); } $user->addOrganization($organization); $organization->addUser($user); $role = new Role(); ...
php
public function addMember(OrganizationInterface $organization, User $user, array $roles) { if ($organization->getOwner() === null) { $organization->setOwner($user); } $user->addOrganization($organization); $organization->addUser($user); $role = new Role(); ...
[ "public", "function", "addMember", "(", "OrganizationInterface", "$", "organization", ",", "User", "$", "user", ",", "array", "$", "roles", ")", "{", "if", "(", "$", "organization", "->", "getOwner", "(", ")", "===", "null", ")", "{", "$", "organization", ...
Add member to an organization with specifics roles @param OrganizationInterface $organization @param User $user @param array $roles
[ "Add", "member", "to", "an", "organization", "with", "specifics", "roles" ]
7b8206f8b4a50fbc61f7bfe4f83eb466cad96440
https://github.com/wobblecode/WobbleCodeUserBundle/blob/7b8206f8b4a50fbc61f7bfe4f83eb466cad96440/Manager/OrganizationManager.php#L142-L160
203,050
wobblecode/WobbleCodeUserBundle
Manager/OrganizationManager.php
OrganizationManager.processInvitationByHash
public function processInvitationByHash(User $user, $hash) { $invitation = $this->dm->getRepository('WobbleCodeUserBundle:Invitation')->findOneBy( [ 'hash' => $hash, 'status' => 'pending' ] ); if (!$invitation) { return f...
php
public function processInvitationByHash(User $user, $hash) { $invitation = $this->dm->getRepository('WobbleCodeUserBundle:Invitation')->findOneBy( [ 'hash' => $hash, 'status' => 'pending' ] ); if (!$invitation) { return f...
[ "public", "function", "processInvitationByHash", "(", "User", "$", "user", ",", "$", "hash", ")", "{", "$", "invitation", "=", "$", "this", "->", "dm", "->", "getRepository", "(", "'WobbleCodeUserBundle:Invitation'", ")", "->", "findOneBy", "(", "[", "'hash'",...
Finds an Invitation by Hash and add member if exists @param User $user @param string $hash Secret Invitation Hash
[ "Finds", "an", "Invitation", "by", "Hash", "and", "add", "member", "if", "exists" ]
7b8206f8b4a50fbc61f7bfe4f83eb466cad96440
https://github.com/wobblecode/WobbleCodeUserBundle/blob/7b8206f8b4a50fbc61f7bfe4f83eb466cad96440/Manager/OrganizationManager.php#L168-L185
203,051
wobblecode/WobbleCodeUserBundle
Manager/OrganizationManager.php
OrganizationManager.addMemberByInvitation
public function addMemberByInvitation(OrganizationInterface $organization, User $user, Invitation $invitation) { $this->addMember($organization, $user, $invitation->getRoles()); $invitation->setStatus('accepted'); $invitation->setTo($user); $this->dm->persist($invitation); $...
php
public function addMemberByInvitation(OrganizationInterface $organization, User $user, Invitation $invitation) { $this->addMember($organization, $user, $invitation->getRoles()); $invitation->setStatus('accepted'); $invitation->setTo($user); $this->dm->persist($invitation); $...
[ "public", "function", "addMemberByInvitation", "(", "OrganizationInterface", "$", "organization", ",", "User", "$", "user", ",", "Invitation", "$", "invitation", ")", "{", "$", "this", "->", "addMember", "(", "$", "organization", ",", "$", "user", ",", "$", ...
Add member to an Organization using settings from invitation @param OrganizationInterface $organization @param User $user @param Invitation $invitation
[ "Add", "member", "to", "an", "Organization", "using", "settings", "from", "invitation" ]
7b8206f8b4a50fbc61f7bfe4f83eb466cad96440
https://github.com/wobblecode/WobbleCodeUserBundle/blob/7b8206f8b4a50fbc61f7bfe4f83eb466cad96440/Manager/OrganizationManager.php#L194-L202
203,052
wobblecode/WobbleCodeUserBundle
Manager/OrganizationManager.php
OrganizationManager.getAdminOwner
public function getAdminOwner() { $repo = $this->dm->getRepository($this->organizationClass); return $repo->findOneBy([ 'adminOwner' => true ]); }
php
public function getAdminOwner() { $repo = $this->dm->getRepository($this->organizationClass); return $repo->findOneBy([ 'adminOwner' => true ]); }
[ "public", "function", "getAdminOwner", "(", ")", "{", "$", "repo", "=", "$", "this", "->", "dm", "->", "getRepository", "(", "$", "this", "->", "organizationClass", ")", ";", "return", "$", "repo", "->", "findOneBy", "(", "[", "'adminOwner'", "=>", "true...
Gets the system admin Organization @return OrganizationInterface
[ "Gets", "the", "system", "admin", "Organization" ]
7b8206f8b4a50fbc61f7bfe4f83eb466cad96440
https://github.com/wobblecode/WobbleCodeUserBundle/blob/7b8206f8b4a50fbc61f7bfe4f83eb466cad96440/Manager/OrganizationManager.php#L209-L216
203,053
agentmedia/phine-core
src/Core/Logic/Rendering/ContentRenderer.php
ContentRenderer.Render
function Render() { if (!self::Guard()->Allow(Action::Read(), $this->content)) { return ''; } ContentTranslator::Singleton()->SetContent($this->content); $module = ClassFinder::CreateFrontendModule($this->content->GetType()); $module->SetTreeItem($this->tr...
php
function Render() { if (!self::Guard()->Allow(Action::Read(), $this->content)) { return ''; } ContentTranslator::Singleton()->SetContent($this->content); $module = ClassFinder::CreateFrontendModule($this->content->GetType()); $module->SetTreeItem($this->tr...
[ "function", "Render", "(", ")", "{", "if", "(", "!", "self", "::", "Guard", "(", ")", "->", "Allow", "(", "Action", "::", "Read", "(", ")", ",", "$", "this", "->", "content", ")", ")", "{", "return", "''", ";", "}", "ContentTranslator", "::", "Si...
Renders the content @return string Returns the rendered content
[ "Renders", "the", "content" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Rendering/ContentRenderer.php#L67-L77
203,054
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/Media.php
Media.getC2Ms
public function getC2Ms(Criteria $criteria = null, ConnectionInterface $con = null) { $partial = $this->collC2MsPartial && !$this->isNew(); if (null === $this->collC2Ms || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collC2Ms) { // return empty...
php
public function getC2Ms(Criteria $criteria = null, ConnectionInterface $con = null) { $partial = $this->collC2MsPartial && !$this->isNew(); if (null === $this->collC2Ms || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collC2Ms) { // return empty...
[ "public", "function", "getC2Ms", "(", "Criteria", "$", "criteria", "=", "null", ",", "ConnectionInterface", "$", "con", "=", "null", ")", "{", "$", "partial", "=", "$", "this", "->", "collC2MsPartial", "&&", "!", "$", "this", "->", "isNew", "(", ")", "...
Gets an array of ChildC2M objects which contain a foreign key that references this object. If the $criteria is not null, it is used to always fetch the results from the database. Otherwise the results are fetched from the database the first time, then cached. Next time the same method is called without $criteria, the ...
[ "Gets", "an", "array", "of", "ChildC2M", "objects", "which", "contain", "a", "foreign", "key", "that", "references", "this", "object", "." ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Media.php#L3169-L3211
203,055
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/Media.php
Media.countM2Ps
public function countM2Ps(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) { $partial = $this->collM2PsPartial && !$this->isNew(); if (null === $this->collM2Ps || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collM2Ps) { ...
php
public function countM2Ps(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) { $partial = $this->collM2PsPartial && !$this->isNew(); if (null === $this->collM2Ps || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collM2Ps) { ...
[ "public", "function", "countM2Ps", "(", "Criteria", "$", "criteria", "=", "null", ",", "$", "distinct", "=", "false", ",", "ConnectionInterface", "$", "con", "=", "null", ")", "{", "$", "partial", "=", "$", "this", "->", "collM2PsPartial", "&&", "!", "$"...
Returns the number of related M2P objects. @param Criteria $criteria @param boolean $distinct @param ConnectionInterface $con @return int Count of related M2P objects. @throws PropelException
[ "Returns", "the", "number", "of", "related", "M2P", "objects", "." ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Media.php#L3511-L3534
203,056
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/Media.php
Media.getM2PsJoinPage
public function getM2PsJoinPage(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN) { $query = ChildM2PQuery::create(null, $criteria); $query->joinWith('Page', $joinBehavior); return $this->getM2Ps($query, $con); }
php
public function getM2PsJoinPage(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN) { $query = ChildM2PQuery::create(null, $criteria); $query->joinWith('Page', $joinBehavior); return $this->getM2Ps($query, $con); }
[ "public", "function", "getM2PsJoinPage", "(", "Criteria", "$", "criteria", "=", "null", ",", "ConnectionInterface", "$", "con", "=", "null", ",", "$", "joinBehavior", "=", "Criteria", "::", "LEFT_JOIN", ")", "{", "$", "query", "=", "ChildM2PQuery", "::", "cr...
If this collection has already been initialized with an identical criteria, it returns the collection. Otherwise if this Media is new, it will return an empty collection; or if this Media has previously been saved, it will retrieve related M2Ps from storage. This method is protected by default in order to keep the pub...
[ "If", "this", "collection", "has", "already", "been", "initialized", "with", "an", "identical", "criteria", "it", "returns", "the", "collection", ".", "Otherwise", "if", "this", "Media", "is", "new", "it", "will", "return", "an", "empty", "collection", ";", ...
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Media.php#L3607-L3613
203,057
fxpio/fxp-doctrine-extensions
Validator/Constraints/UniqueEntityValidator.php
UniqueEntityValidator.getCriteria
protected function getCriteria($entity, Constraint $constraint, ObjectManager $em) { /** @var UniqueEntity $constraint */ /** @var \Doctrine\ORM\Mapping\ClassMetadata $class */ $class = $em->getClassMetadata(ClassUtils::getClass($entity)); $fields = (array) $constraint->fields; ...
php
protected function getCriteria($entity, Constraint $constraint, ObjectManager $em) { /** @var UniqueEntity $constraint */ /** @var \Doctrine\ORM\Mapping\ClassMetadata $class */ $class = $em->getClassMetadata(ClassUtils::getClass($entity)); $fields = (array) $constraint->fields; ...
[ "protected", "function", "getCriteria", "(", "$", "entity", ",", "Constraint", "$", "constraint", ",", "ObjectManager", "$", "em", ")", "{", "/** @var UniqueEntity $constraint */", "/** @var \\Doctrine\\ORM\\Mapping\\ClassMetadata $class */", "$", "class", "=", "$", "em",...
Gets criteria. @param object $entity @param Constraint $constraint @param ObjectManager $em @throws ConstraintDefinitionException @return null|array Null if there is no constraint
[ "Gets", "criteria", "." ]
82942f51d47cdd79a20a5725ee1b3ecfc69e9d77
https://github.com/fxpio/fxp-doctrine-extensions/blob/82942f51d47cdd79a20a5725ee1b3ecfc69e9d77/Validator/Constraints/UniqueEntityValidator.php#L91-L108
203,058
fxpio/fxp-doctrine-extensions
Validator/Constraints/UniqueEntityValidator.php
UniqueEntityValidator.getResult
private function getResult($entity, Constraint $constraint, array $criteria, ObjectManager $em) { /** @var UniqueEntity $constraint */ $filters = SqlFilterUtil::findFilters($em, (array) $constraint->filters, $constraint->allFilters); SqlFilterUtil::disableFilters($em, $filters); $re...
php
private function getResult($entity, Constraint $constraint, array $criteria, ObjectManager $em) { /** @var UniqueEntity $constraint */ $filters = SqlFilterUtil::findFilters($em, (array) $constraint->filters, $constraint->allFilters); SqlFilterUtil::disableFilters($em, $filters); $re...
[ "private", "function", "getResult", "(", "$", "entity", ",", "Constraint", "$", "constraint", ",", "array", "$", "criteria", ",", "ObjectManager", "$", "em", ")", "{", "/** @var UniqueEntity $constraint */", "$", "filters", "=", "SqlFilterUtil", "::", "findFilters...
Get entity result. @param object $entity @param Constraint $constraint @param array $criteria @param ObjectManager $em @return array
[ "Get", "entity", "result", "." ]
82942f51d47cdd79a20a5725ee1b3ecfc69e9d77
https://github.com/fxpio/fxp-doctrine-extensions/blob/82942f51d47cdd79a20a5725ee1b3ecfc69e9d77/Validator/Constraints/UniqueEntityValidator.php#L120-L135
203,059
fxpio/fxp-doctrine-extensions
Validator/Constraints/UniqueEntityValidator.php
UniqueEntityValidator.isValidResult
private function isValidResult($result, $entity) { return 0 === \count($result) || (1 === \count($result) && $entity === ($result instanceof \Iterator ? $result->current() : current($result))); }
php
private function isValidResult($result, $entity) { return 0 === \count($result) || (1 === \count($result) && $entity === ($result instanceof \Iterator ? $result->current() : current($result))); }
[ "private", "function", "isValidResult", "(", "$", "result", ",", "$", "entity", ")", "{", "return", "0", "===", "\\", "count", "(", "$", "result", ")", "||", "(", "1", "===", "\\", "count", "(", "$", "result", ")", "&&", "$", "entity", "===", "(", ...
Check if the result is valid. If no entity matched the query criteria or a single entity matched, which is the same as the entity being validated, the criteria is unique. @param array|\Iterator $result @param object $entity @return bool
[ "Check", "if", "the", "result", "is", "valid", "." ]
82942f51d47cdd79a20a5725ee1b3ecfc69e9d77
https://github.com/fxpio/fxp-doctrine-extensions/blob/82942f51d47cdd79a20a5725ee1b3ecfc69e9d77/Validator/Constraints/UniqueEntityValidator.php#L149-L154
203,060
fxpio/fxp-doctrine-extensions
Validator/Constraints/UniqueEntityValidator.php
UniqueEntityValidator.findFieldCriteriaStep2
private function findFieldCriteriaStep2(array &$criteria, ObjectManager $em, ClassMetadata $class, $fieldName): void { if (null !== $criteria[$fieldName] && $class->hasAssociation($fieldName)) { /* Ensure the Proxy is initialized before using reflection to * read its identifiers. Th...
php
private function findFieldCriteriaStep2(array &$criteria, ObjectManager $em, ClassMetadata $class, $fieldName): void { if (null !== $criteria[$fieldName] && $class->hasAssociation($fieldName)) { /* Ensure the Proxy is initialized before using reflection to * read its identifiers. Th...
[ "private", "function", "findFieldCriteriaStep2", "(", "array", "&", "$", "criteria", ",", "ObjectManager", "$", "em", ",", "ClassMetadata", "$", "class", ",", "$", "fieldName", ")", ":", "void", "{", "if", "(", "null", "!==", "$", "criteria", "[", "$", "...
Finds the criteria for the entity field. @param array $criteria @param ObjectManager $em @param ClassMetadata $class @param string $fieldName @throws ConstraintDefinitionException
[ "Finds", "the", "criteria", "for", "the", "entity", "field", "." ]
82942f51d47cdd79a20a5725ee1b3ecfc69e9d77
https://github.com/fxpio/fxp-doctrine-extensions/blob/82942f51d47cdd79a20a5725ee1b3ecfc69e9d77/Validator/Constraints/UniqueEntityValidator.php#L208-L230
203,061
climphp/Clim
Clim/Cli/MiddlewareStack.php
MiddlewareStack.handleResult
protected function handleResult(ContextInterface $context, $result) { $validated = $this->validateResult($result); if (is_null($validated)) { $validated = $result; } if ($validated instanceof ContextInterface) { $context = $validated; } elseif (!is_nu...
php
protected function handleResult(ContextInterface $context, $result) { $validated = $this->validateResult($result); if (is_null($validated)) { $validated = $result; } if ($validated instanceof ContextInterface) { $context = $validated; } elseif (!is_nu...
[ "protected", "function", "handleResult", "(", "ContextInterface", "$", "context", ",", "$", "result", ")", "{", "$", "validated", "=", "$", "this", "->", "validateResult", "(", "$", "result", ")", ";", "if", "(", "is_null", "(", "$", "validated", ")", ")...
Validate middleware result. Imprementer shall invoke exceptions in this method if result is not valid. @param ContextInterface $context A context object @param mixed $result @return ContextInterface|null
[ "Validate", "middleware", "result", ".", "Imprementer", "shall", "invoke", "exceptions", "in", "this", "method", "if", "result", "is", "not", "valid", "." ]
d2d09a82e1b7a0b8d454e585e6db421ff02ec8e4
https://github.com/climphp/Clim/blob/d2d09a82e1b7a0b8d454e585e6db421ff02ec8e4/Clim/Cli/MiddlewareStack.php#L111-L125
203,062
Wedeto/HTTP
src/Response/FileResponse.php
FileResponse.output
public function output(string $mime) { // Nothing to output, the webserver will handle it if ($this->xsendfile) return; $bytes = readfile($this->filename); if (!empty($this->length) && $bytes != $this->length) { self::getLogger()->warning( ...
php
public function output(string $mime) { // Nothing to output, the webserver will handle it if ($this->xsendfile) return; $bytes = readfile($this->filename); if (!empty($this->length) && $bytes != $this->length) { self::getLogger()->warning( ...
[ "public", "function", "output", "(", "string", "$", "mime", ")", "{", "// Nothing to output, the webserver will handle it", "if", "(", "$", "this", "->", "xsendfile", ")", "return", ";", "$", "bytes", "=", "readfile", "(", "$", "this", "->", "filename", ")", ...
Serve the file to the user
[ "Serve", "the", "file", "to", "the", "user" ]
7318eff1b81a3c103c4263466d09b7f3593b70b9
https://github.com/Wedeto/HTTP/blob/7318eff1b81a3c103c4263466d09b7f3593b70b9/src/Response/FileResponse.php#L142-L156
203,063
Vectrex/vxPHP
src/Routing/Route.php
Route.getPath
public function getPath(array $pathParameters = null) { $path = $this->path; //insert path parameters if(!empty($this->placeholders)) { foreach ($this->placeholders as $placeholder) { // use path parameter if it was passed on $regExp = '~\{' . $placeholder['name'] . '(=.*?)?\}~'; ...
php
public function getPath(array $pathParameters = null) { $path = $this->path; //insert path parameters if(!empty($this->placeholders)) { foreach ($this->placeholders as $placeholder) { // use path parameter if it was passed on $regExp = '~\{' . $placeholder['name'] . '(=.*?)?\}~'; ...
[ "public", "function", "getPath", "(", "array", "$", "pathParameters", "=", "null", ")", "{", "$", "path", "=", "$", "this", "->", "path", ";", "//insert path parameters", "if", "(", "!", "empty", "(", "$", "this", "->", "placeholders", ")", ")", "{", "...
get path of route When path parameters are passed on to method a path using these parameter values is generated, but path parameters are not stored and do not overwrite previously set path parameters. When no (or only some) path parameters are passed on previously set path parameters are considered when generating th...
[ "get", "path", "of", "route" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Routing/Route.php#L301-L344
203,064
Vectrex/vxPHP
src/Routing/Route.php
Route.setRequestMethods
public function setRequestMethods(array $requestMethods) { $requestMethods = array_map('strtoupper', $requestMethods); $allowedMethods = ['GET', 'POST', 'PUT', 'DELETE', 'PATCH']; foreach($requestMethods as $requestMethod) { if(!in_array($requestMethod, $allowedMethods)) { throw new \Inva...
php
public function setRequestMethods(array $requestMethods) { $requestMethods = array_map('strtoupper', $requestMethods); $allowedMethods = ['GET', 'POST', 'PUT', 'DELETE', 'PATCH']; foreach($requestMethods as $requestMethod) { if(!in_array($requestMethod, $allowedMethods)) { throw new \Inva...
[ "public", "function", "setRequestMethods", "(", "array", "$", "requestMethods", ")", "{", "$", "requestMethods", "=", "array_map", "(", "'strtoupper'", ",", "$", "requestMethods", ")", ";", "$", "allowedMethods", "=", "[", "'GET'", ",", "'POST'", ",", "'PUT'",...
set all allowed request methods for a route @param array $requestMethods @return \vxPHP\Routing\Route
[ "set", "all", "allowed", "request", "methods", "for", "a", "route" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Routing/Route.php#L469-L484
203,065
Vectrex/vxPHP
src/Routing/Route.php
Route.allowsRequestMethod
public function allowsRequestMethod($requestMethod) { return empty($this->requestMethods) || in_array(strtoupper($requestMethod), $this->requestMethods); }
php
public function allowsRequestMethod($requestMethod) { return empty($this->requestMethods) || in_array(strtoupper($requestMethod), $this->requestMethods); }
[ "public", "function", "allowsRequestMethod", "(", "$", "requestMethod", ")", "{", "return", "empty", "(", "$", "this", "->", "requestMethods", ")", "||", "in_array", "(", "strtoupper", "(", "$", "requestMethod", ")", ",", "$", "this", "->", "requestMethods", ...
check whether a request method is allowed with the route @param string $requestMethod @return boolean
[ "check", "whether", "a", "request", "method", "is", "allowed", "with", "the", "route" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Routing/Route.php#L492-L496
203,066
Vectrex/vxPHP
src/Routing/Route.php
Route.getPathParameter
public function getPathParameter($name, $default = null) { // lazy initialization of parameters if(empty($this->pathParameters) && !is_null($this->placeholders)) { // collect all placeholder names $names = array_keys($this->placeholders); // extract values if(preg_match('~' . $this->match . '~', l...
php
public function getPathParameter($name, $default = null) { // lazy initialization of parameters if(empty($this->pathParameters) && !is_null($this->placeholders)) { // collect all placeholder names $names = array_keys($this->placeholders); // extract values if(preg_match('~' . $this->match . '~', l...
[ "public", "function", "getPathParameter", "(", "$", "name", ",", "$", "default", "=", "null", ")", "{", "// lazy initialization of parameters", "if", "(", "empty", "(", "$", "this", "->", "pathParameters", ")", "&&", "!", "is_null", "(", "$", "this", "->", ...
get path parameter @param string $name @param string $default @return string
[ "get", "path", "parameter" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Routing/Route.php#L522-L576
203,067
Vectrex/vxPHP
src/Routing/Route.php
Route.redirect
public function redirect($queryParams = [], $statusCode = 302) { $request = Request::createFromGlobals(); $application = Application::getInstance(); $urlSegments = [ $request->getSchemeAndHttpHost() ]; if($application->getRouter()->getServerSideRewrite()) { if(($scriptName = basename($request->getS...
php
public function redirect($queryParams = [], $statusCode = 302) { $request = Request::createFromGlobals(); $application = Application::getInstance(); $urlSegments = [ $request->getSchemeAndHttpHost() ]; if($application->getRouter()->getServerSideRewrite()) { if(($scriptName = basename($request->getS...
[ "public", "function", "redirect", "(", "$", "queryParams", "=", "[", "]", ",", "$", "statusCode", "=", "302", ")", "{", "$", "request", "=", "Request", "::", "createFromGlobals", "(", ")", ";", "$", "application", "=", "Application", "::", "getInstance", ...
redirect using configured redirect information if route has no redirect set, redirect will lead to "start page" @param array $queryParams @param int $statusCode @return RedirectResponse @throws \vxPHP\Application\Exception\ApplicationException
[ "redirect", "using", "configured", "redirect", "information", "if", "route", "has", "no", "redirect", "set", "redirect", "will", "lead", "to", "start", "page" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Routing/Route.php#L634-L662
203,068
as3io/As3ModlrBundle
DependencyInjection/Utility.php
Utility.locateResource
public static function locateResource($path, ContainerBuilder $container) { if (0 === stripos($path, '@')) { // Treat as a bundle path, e.g. @SomeBundle/path/to/something. // Correct backslashed paths. $path = str_replace('\\', '/', $path); $parts = explode(...
php
public static function locateResource($path, ContainerBuilder $container) { if (0 === stripos($path, '@')) { // Treat as a bundle path, e.g. @SomeBundle/path/to/something. // Correct backslashed paths. $path = str_replace('\\', '/', $path); $parts = explode(...
[ "public", "static", "function", "locateResource", "(", "$", "path", ",", "ContainerBuilder", "$", "container", ")", "{", "if", "(", "0", "===", "stripos", "(", "$", "path", ",", "'@'", ")", ")", "{", "// Treat as a bundle path, e.g. @SomeBundle/path/to/something."...
Locates a file resource path for a given config path. Is needed in order to retrieve a bundle's directory, if used. @static @param string $path @param ContainerBuilder $container @return string @throws \RuntimeException
[ "Locates", "a", "file", "resource", "path", "for", "a", "given", "config", "path", ".", "Is", "needed", "in", "order", "to", "retrieve", "a", "bundle", "s", "directory", "if", "used", "." ]
7ce2abb7390c7eaf4081c5b7e00b96e7001774a4
https://github.com/as3io/As3ModlrBundle/blob/7ce2abb7390c7eaf4081c5b7e00b96e7001774a4/DependencyInjection/Utility.php#L116-L145
203,069
horntell/php-sdk
lib/guzzle/GuzzleHttp/Exception/RequestException.php
RequestException.emittedError
public function emittedError($value = null) { if ($value === null) { return $this->emittedErrorEvent; } elseif ($value === true) { $this->emittedErrorEvent = true; } else { throw new \InvalidArgumentException('You cannot set the emitted ' ....
php
public function emittedError($value = null) { if ($value === null) { return $this->emittedErrorEvent; } elseif ($value === true) { $this->emittedErrorEvent = true; } else { throw new \InvalidArgumentException('You cannot set the emitted ' ....
[ "public", "function", "emittedError", "(", "$", "value", "=", "null", ")", "{", "if", "(", "$", "value", "===", "null", ")", "{", "return", "$", "this", "->", "emittedErrorEvent", ";", "}", "elseif", "(", "$", "value", "===", "true", ")", "{", "$", ...
Check or set if the exception was emitted in an error event. This value is used in the RequestEvents::emitBefore() method to check to see if an exception has already been emitted in an error event. @param bool|null Set to true to set the exception as having emitted an error. Leave null to retrieve the current setting...
[ "Check", "or", "set", "if", "the", "exception", "was", "emitted", "in", "an", "error", "event", "." ]
e5205e9396a21b754d5651a8aa5898da5922a1b7
https://github.com/horntell/php-sdk/blob/e5205e9396a21b754d5651a8aa5898da5922a1b7/lib/guzzle/GuzzleHttp/Exception/RequestException.php#L116-L126
203,070
erenmustafaozdal/laravel-modules-base
src/Requests/BaseRequest.php
BaseRequest.addFileRule
protected function addFileRule($attribute, $size, $mimes, $count = 1, $isRequired = false) { if ($this->has($attribute) && is_string($this->$attribute)) { $this->rules[$attribute] = "elfinder_max:{$size}|elfinder:{$mimes}"; } else if ($this->file($attribute) && is_array($this->$attr...
php
protected function addFileRule($attribute, $size, $mimes, $count = 1, $isRequired = false) { if ($this->has($attribute) && is_string($this->$attribute)) { $this->rules[$attribute] = "elfinder_max:{$size}|elfinder:{$mimes}"; } else if ($this->file($attribute) && is_array($this->$attr...
[ "protected", "function", "addFileRule", "(", "$", "attribute", ",", "$", "size", ",", "$", "mimes", ",", "$", "count", "=", "1", ",", "$", "isRequired", "=", "false", ")", "{", "if", "(", "$", "this", "->", "has", "(", "$", "attribute", ")", "&&", ...
add file rule to rules @param string $attribute @param string $size @param string $mimes @param integer $count @param boolean $isRequired @return void
[ "add", "file", "rule", "to", "rules" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Requests/BaseRequest.php#L58-L93
203,071
MBHFramework/mbh-rest
Mbh/App.php
App.getSetting
public function getSetting($key, $defaultValue = null) { return $this->hasSetting($key) ? $this->settings[$key] : $defaultValue; }
php
public function getSetting($key, $defaultValue = null) { return $this->hasSetting($key) ? $this->settings[$key] : $defaultValue; }
[ "public", "function", "getSetting", "(", "$", "key", ",", "$", "defaultValue", "=", "null", ")", "{", "return", "$", "this", "->", "hasSetting", "(", "$", "key", ")", "?", "$", "this", "->", "settings", "[", "$", "key", "]", ":", "$", "defaultValue",...
Get app setting with given key @param string $key @param mixed $defaultValue @return mixed
[ "Get", "app", "setting", "with", "given", "key" ]
e23b4e66dc2b8da35e06312dcfdba41c4cfc2c83
https://github.com/MBHFramework/mbh-rest/blob/e23b4e66dc2b8da35e06312dcfdba41c4cfc2c83/Mbh/App.php#L169-L172
203,072
MBHFramework/mbh-rest
Mbh/App.php
App.get
public function get($pattern, $callback = null, $inject = null) { return $this->map([ 'GET', 'HEAD' ], $pattern, $callback, $inject); }
php
public function get($pattern, $callback = null, $inject = null) { return $this->map([ 'GET', 'HEAD' ], $pattern, $callback, $inject); }
[ "public", "function", "get", "(", "$", "pattern", ",", "$", "callback", "=", "null", ",", "$", "inject", "=", "null", ")", "{", "return", "$", "this", "->", "map", "(", "[", "'GET'", ",", "'HEAD'", "]", ",", "$", "pattern", ",", "$", "callback", ...
Adds a new route for the HTTP request method `GET` @param string $route the route to match, e.g. `/users/jane` @param callable|null $callback (optional) the callback to execute, e.g. an anonymous function @param array|null $inject (optional) any arguments that should be prepended to those matched in the route @return ...
[ "Adds", "a", "new", "route", "for", "the", "HTTP", "request", "method", "GET" ]
e23b4e66dc2b8da35e06312dcfdba41c4cfc2c83
https://github.com/MBHFramework/mbh-rest/blob/e23b4e66dc2b8da35e06312dcfdba41c4cfc2c83/Mbh/App.php#L206-L209
203,073
MBHFramework/mbh-rest
Mbh/App.php
App.post
public function post($pattern, $callback = null, $inject = null) { return $this->map([ 'POST' ], $pattern, $callback, $inject); }
php
public function post($pattern, $callback = null, $inject = null) { return $this->map([ 'POST' ], $pattern, $callback, $inject); }
[ "public", "function", "post", "(", "$", "pattern", ",", "$", "callback", "=", "null", ",", "$", "inject", "=", "null", ")", "{", "return", "$", "this", "->", "map", "(", "[", "'POST'", "]", ",", "$", "pattern", ",", "$", "callback", ",", "$", "in...
Adds a new route for the HTTP request method `POST` @param string $pattern the route to match, e.g. `/users/jane` @param callable|null $callback (optional) the callback to execute, e.g. an anonymous function @param array|null $inject (optional) any arguments that should be prepended to those matched in the route @retu...
[ "Adds", "a", "new", "route", "for", "the", "HTTP", "request", "method", "POST" ]
e23b4e66dc2b8da35e06312dcfdba41c4cfc2c83
https://github.com/MBHFramework/mbh-rest/blob/e23b4e66dc2b8da35e06312dcfdba41c4cfc2c83/Mbh/App.php#L219-L222
203,074
MBHFramework/mbh-rest
Mbh/App.php
App.put
public function put($pattern, $callback = null, $inject = null) { return $this->map([ 'PUT' ], $pattern, $callback, $inject); }
php
public function put($pattern, $callback = null, $inject = null) { return $this->map([ 'PUT' ], $pattern, $callback, $inject); }
[ "public", "function", "put", "(", "$", "pattern", ",", "$", "callback", "=", "null", ",", "$", "inject", "=", "null", ")", "{", "return", "$", "this", "->", "map", "(", "[", "'PUT'", "]", ",", "$", "pattern", ",", "$", "callback", ",", "$", "inje...
Adds a new route for the HTTP request method `PUT` @param string $pattern the route to match, e.g. `/users/jane` @param callable|null $callback (optional) the callback to execute, e.g. an anonymous function @param array|null $inject (optional) any arguments that should be prepended to those matched in the route @retur...
[ "Adds", "a", "new", "route", "for", "the", "HTTP", "request", "method", "PUT" ]
e23b4e66dc2b8da35e06312dcfdba41c4cfc2c83
https://github.com/MBHFramework/mbh-rest/blob/e23b4e66dc2b8da35e06312dcfdba41c4cfc2c83/Mbh/App.php#L232-L235
203,075
MBHFramework/mbh-rest
Mbh/App.php
App.patch
public function patch($pattern, $callback = null, $inject = null) { return $this->map([ 'PATCH' ], $pattern, $callback, $inject); }
php
public function patch($pattern, $callback = null, $inject = null) { return $this->map([ 'PATCH' ], $pattern, $callback, $inject); }
[ "public", "function", "patch", "(", "$", "pattern", ",", "$", "callback", "=", "null", ",", "$", "inject", "=", "null", ")", "{", "return", "$", "this", "->", "map", "(", "[", "'PATCH'", "]", ",", "$", "pattern", ",", "$", "callback", ",", "$", "...
Adds a new route for the HTTP request method `PATCH` @param string $pattern the route to match, e.g. `/users/jane` @param callable|null $callback (optional) the callback to execute, e.g. an anonymous function @param array|null $inject (optional) any arguments that should be prepended to those matched in the route @ret...
[ "Adds", "a", "new", "route", "for", "the", "HTTP", "request", "method", "PATCH" ]
e23b4e66dc2b8da35e06312dcfdba41c4cfc2c83
https://github.com/MBHFramework/mbh-rest/blob/e23b4e66dc2b8da35e06312dcfdba41c4cfc2c83/Mbh/App.php#L245-L248
203,076
MBHFramework/mbh-rest
Mbh/App.php
App.delete
public function delete($pattern, $callback = null, $inject = null) { return $this->map([ 'DELETE' ], $pattern, $callback, $inject); }
php
public function delete($pattern, $callback = null, $inject = null) { return $this->map([ 'DELETE' ], $pattern, $callback, $inject); }
[ "public", "function", "delete", "(", "$", "pattern", ",", "$", "callback", "=", "null", ",", "$", "inject", "=", "null", ")", "{", "return", "$", "this", "->", "map", "(", "[", "'DELETE'", "]", ",", "$", "pattern", ",", "$", "callback", ",", "$", ...
Adds a new route for the HTTP request method `DELETE` @param string $pattern the route to match, e.g. `/users/jane` @param callable|null $callback (optional) the callback to execute, e.g. an anonymous function @param array|null $inject (optional) any arguments that should be prepended to those matched in the route @re...
[ "Adds", "a", "new", "route", "for", "the", "HTTP", "request", "method", "DELETE" ]
e23b4e66dc2b8da35e06312dcfdba41c4cfc2c83
https://github.com/MBHFramework/mbh-rest/blob/e23b4e66dc2b8da35e06312dcfdba41c4cfc2c83/Mbh/App.php#L258-L261
203,077
MBHFramework/mbh-rest
Mbh/App.php
App.head
public function head($pattern, $callback = null, $inject = null) { return $this->map([ 'HEAD' ], $pattern, $callback, $inject); }
php
public function head($pattern, $callback = null, $inject = null) { return $this->map([ 'HEAD' ], $pattern, $callback, $inject); }
[ "public", "function", "head", "(", "$", "pattern", ",", "$", "callback", "=", "null", ",", "$", "inject", "=", "null", ")", "{", "return", "$", "this", "->", "map", "(", "[", "'HEAD'", "]", ",", "$", "pattern", ",", "$", "callback", ",", "$", "in...
Adds a new route for the HTTP request method `HEAD` @param string $pattern the route to match, e.g. `/users/jane` @param callable|null $callback (optional) the callback to execute, e.g. an anonymous function @param array|null $inject (optional) any arguments that should be prepended to those matched in the route @retu...
[ "Adds", "a", "new", "route", "for", "the", "HTTP", "request", "method", "HEAD" ]
e23b4e66dc2b8da35e06312dcfdba41c4cfc2c83
https://github.com/MBHFramework/mbh-rest/blob/e23b4e66dc2b8da35e06312dcfdba41c4cfc2c83/Mbh/App.php#L271-L274
203,078
MBHFramework/mbh-rest
Mbh/App.php
App.trace
public function trace($pattern, $callback = null, $inject = null) { return $this->map([ 'TRACE' ], $pattern, $callback, $inject); }
php
public function trace($pattern, $callback = null, $inject = null) { return $this->map([ 'TRACE' ], $pattern, $callback, $inject); }
[ "public", "function", "trace", "(", "$", "pattern", ",", "$", "callback", "=", "null", ",", "$", "inject", "=", "null", ")", "{", "return", "$", "this", "->", "map", "(", "[", "'TRACE'", "]", ",", "$", "pattern", ",", "$", "callback", ",", "$", "...
Adds a new route for the HTTP request method `TRACE` @param string $pattern the route to match, e.g. `/users/jane` @param callable|null $callback (optional) the callback to execute, e.g. an anonymous function @param array|null $inject (optional) any arguments that should be prepended to those matched in the route @ret...
[ "Adds", "a", "new", "route", "for", "the", "HTTP", "request", "method", "TRACE" ]
e23b4e66dc2b8da35e06312dcfdba41c4cfc2c83
https://github.com/MBHFramework/mbh-rest/blob/e23b4e66dc2b8da35e06312dcfdba41c4cfc2c83/Mbh/App.php#L284-L287
203,079
MBHFramework/mbh-rest
Mbh/App.php
App.options
public function options($pattern, $callback = null, $inject = null) { return $this->map([ 'OPTIONS' ], $pattern, $callback, $inject); }
php
public function options($pattern, $callback = null, $inject = null) { return $this->map([ 'OPTIONS' ], $pattern, $callback, $inject); }
[ "public", "function", "options", "(", "$", "pattern", ",", "$", "callback", "=", "null", ",", "$", "inject", "=", "null", ")", "{", "return", "$", "this", "->", "map", "(", "[", "'OPTIONS'", "]", ",", "$", "pattern", ",", "$", "callback", ",", "$",...
Adds a new route for the HTTP request method `OPTIONS` @param string $pattern the route to match, e.g. `/users/jane` @param callable|null $callback (optional) the callback to execute, e.g. an anonymous function @param array|null $inject (optional) any arguments that should be prepended to those matched in the route @r...
[ "Adds", "a", "new", "route", "for", "the", "HTTP", "request", "method", "OPTIONS" ]
e23b4e66dc2b8da35e06312dcfdba41c4cfc2c83
https://github.com/MBHFramework/mbh-rest/blob/e23b4e66dc2b8da35e06312dcfdba41c4cfc2c83/Mbh/App.php#L297-L300
203,080
MBHFramework/mbh-rest
Mbh/App.php
App.connect
public function connect($pattern, $callback = null, $inject = null) { return $this->map([ 'CONNECT' ], $pattern, $callback, $inject); }
php
public function connect($pattern, $callback = null, $inject = null) { return $this->map([ 'CONNECT' ], $pattern, $callback, $inject); }
[ "public", "function", "connect", "(", "$", "pattern", ",", "$", "callback", "=", "null", ",", "$", "inject", "=", "null", ")", "{", "return", "$", "this", "->", "map", "(", "[", "'CONNECT'", "]", ",", "$", "pattern", ",", "$", "callback", ",", "$",...
Adds a new route for the HTTP request method `CONNECT` @param string $pattern the route to match, e.g. `/users/jane` @param callable|null $callback (optional) the callback to execute, e.g. an anonymous function @param array|null $inject (optional) any arguments that should be prepended to those matched in the route @r...
[ "Adds", "a", "new", "route", "for", "the", "HTTP", "request", "method", "CONNECT" ]
e23b4e66dc2b8da35e06312dcfdba41c4cfc2c83
https://github.com/MBHFramework/mbh-rest/blob/e23b4e66dc2b8da35e06312dcfdba41c4cfc2c83/Mbh/App.php#L310-L313
203,081
Vectrex/vxPHP
src/Controller/Controller.php
Controller.createControllerFromRoute
public static function createControllerFromRoute(Route $route, array $parameters = null) { $controllerClass = Application::getInstance()->getApplicationNamespace() . $route->getControllerClassName(); /** * @var Controller */ $instance = new $controllerClass($route, $parameters); if($method = $instan...
php
public static function createControllerFromRoute(Route $route, array $parameters = null) { $controllerClass = Application::getInstance()->getApplicationNamespace() . $route->getControllerClassName(); /** * @var Controller */ $instance = new $controllerClass($route, $parameters); if($method = $instan...
[ "public", "static", "function", "createControllerFromRoute", "(", "Route", "$", "route", ",", "array", "$", "parameters", "=", "null", ")", "{", "$", "controllerClass", "=", "Application", "::", "getInstance", "(", ")", "->", "getApplicationNamespace", "(", ")",...
determines controller class name from a routes controllerString property and returns a controller instance an additional parameters array will be passed on to the constructor @param Route $route @param array $parameters @return \vxPHP\Controller\Controller @throws \vxPHP\Application\Exception\ApplicationException
[ "determines", "controller", "class", "name", "from", "a", "routes", "controllerString", "property", "and", "returns", "a", "controller", "instance", "an", "additional", "parameters", "array", "will", "be", "passed", "on", "to", "the", "constructor" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Controller/Controller.php#L190-L208
203,082
Vectrex/vxPHP
src/Controller/Controller.php
Controller.addEchoToJsonResponse
protected function addEchoToJsonResponse(JsonResponse $r) { // handle JSON encoded request data if($this->isXhr && $this->xhrBag && $this->xhrBag->get('echo') == 1) { // echo is the original xmlHttpRequest sans echo property $echo = json_decode($this->xhrBag->get('xmlHttpRequest')); unset($echo->echo...
php
protected function addEchoToJsonResponse(JsonResponse $r) { // handle JSON encoded request data if($this->isXhr && $this->xhrBag && $this->xhrBag->get('echo') == 1) { // echo is the original xmlHttpRequest sans echo property $echo = json_decode($this->xhrBag->get('xmlHttpRequest')); unset($echo->echo...
[ "protected", "function", "addEchoToJsonResponse", "(", "JsonResponse", "$", "r", ")", "{", "// handle JSON encoded request data", "if", "(", "$", "this", "->", "isXhr", "&&", "$", "this", "->", "xhrBag", "&&", "$", "this", "->", "xhrBag", "->", "get", "(", "...
add an echo property to a JsonResponse, if request indicates that echo was requested useful with vxJS.xhr based widgets @param JsonResponse $r @return JsonResponse @throws \Exception
[ "add", "an", "echo", "property", "to", "a", "JsonResponse", "if", "request", "indicates", "that", "echo", "was", "requested", "useful", "with", "vxJS", ".", "xhr", "based", "widgets" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Controller/Controller.php#L264-L302
203,083
Linkvalue-Interne/MajoraFrameworkExtraBundle
src/Majora/Framework/Domain/Action/Dal/DalActionTrait.php
DalActionTrait.assertEntityIsValid
protected function assertEntityIsValid($entity, $scope = null) { if (!$this->validator) { throw new \BadMethodCallException(sprintf( 'Method %s() cannot be used while validator is not configured.', __METHOD__ )); } $scopes = $scope ? (...
php
protected function assertEntityIsValid($entity, $scope = null) { if (!$this->validator) { throw new \BadMethodCallException(sprintf( 'Method %s() cannot be used while validator is not configured.', __METHOD__ )); } $scopes = $scope ? (...
[ "protected", "function", "assertEntityIsValid", "(", "$", "entity", ",", "$", "scope", "=", "null", ")", "{", "if", "(", "!", "$", "this", "->", "validator", ")", "{", "throw", "new", "\\", "BadMethodCallException", "(", "sprintf", "(", "'Method %s() cannot ...
assert given entity is valid on given scope. @param object $entity @param string|array $scope @throws ValidationException If given object is invalid on given scope
[ "assert", "given", "entity", "is", "valid", "on", "given", "scope", "." ]
6f368380cfc39d27fafb0844e9a53b4d86d7c034
https://github.com/Linkvalue-Interne/MajoraFrameworkExtraBundle/blob/6f368380cfc39d27fafb0844e9a53b4d86d7c034/src/Majora/Framework/Domain/Action/Dal/DalActionTrait.php#L55-L77
203,084
Linkvalue-Interne/MajoraFrameworkExtraBundle
src/Majora/Framework/Domain/Action/Dal/DalActionTrait.php
DalActionTrait.fireEvent
protected function fireEvent($eventName, Event $event) { if (!$this->eventDispatcher) { throw new \BadMethodCallException(sprintf( 'Method %s() cannot be used while event dispatcher is not configured.', __METHOD__ )); } $this->eventDis...
php
protected function fireEvent($eventName, Event $event) { if (!$this->eventDispatcher) { throw new \BadMethodCallException(sprintf( 'Method %s() cannot be used while event dispatcher is not configured.', __METHOD__ )); } $this->eventDis...
[ "protected", "function", "fireEvent", "(", "$", "eventName", ",", "Event", "$", "event", ")", "{", "if", "(", "!", "$", "this", "->", "eventDispatcher", ")", "{", "throw", "new", "\\", "BadMethodCallException", "(", "sprintf", "(", "'Method %s() cannot be used...
fire given event. @param string $eventName @param Event $event @throws \BadMethodCallException If any event dispatcher set
[ "fire", "given", "event", "." ]
6f368380cfc39d27fafb0844e9a53b4d86d7c034
https://github.com/Linkvalue-Interne/MajoraFrameworkExtraBundle/blob/6f368380cfc39d27fafb0844e9a53b4d86d7c034/src/Majora/Framework/Domain/Action/Dal/DalActionTrait.php#L87-L97
203,085
pipaslot/forms
src/Forms/Rendering/Bootstrap3StackRenderer.php
Bootstrap3StackRenderer.prepareForm
protected function prepareForm(Form $form) { $form->getElementPrototype()->class[] = 'form-horizontal'; $translator = $form->getTranslator(); foreach ($form->controls as $control) { /** @var BaseControl $control */ if ($control instanceof HiddenField) { continue; } elseif ($control instanceof Button...
php
protected function prepareForm(Form $form) { $form->getElementPrototype()->class[] = 'form-horizontal'; $translator = $form->getTranslator(); foreach ($form->controls as $control) { /** @var BaseControl $control */ if ($control instanceof HiddenField) { continue; } elseif ($control instanceof Button...
[ "protected", "function", "prepareForm", "(", "Form", "$", "form", ")", "{", "$", "form", "->", "getElementPrototype", "(", ")", "->", "class", "[", "]", "=", "'form-horizontal'", ";", "$", "translator", "=", "$", "form", "->", "getTranslator", "(", ")", ...
Make form and controls compatible with Twitter Bootstrap @param Form $form
[ "Make", "form", "and", "controls", "compatible", "with", "Twitter", "Bootstrap" ]
9e1d48db512f843270fd4079ed3ff1b1729c951b
https://github.com/pipaslot/forms/blob/9e1d48db512f843270fd4079ed3ff1b1729c951b/src/Forms/Rendering/Bootstrap3StackRenderer.php#L37-L58
203,086
clacy-builders/graphics-php
src/Points.php
Points.rectangle
public static function rectangle(Point $corner, $width, $height, $ccw = false) { $points = new Points($corner); $points->addPoint($corner); $points->addPoint($corner)->translateX($width); $points->addPoint($corner)->translate($width, $height); $points->addPoint($corner)->translateY($height); $points->rever...
php
public static function rectangle(Point $corner, $width, $height, $ccw = false) { $points = new Points($corner); $points->addPoint($corner); $points->addPoint($corner)->translateX($width); $points->addPoint($corner)->translate($width, $height); $points->addPoint($corner)->translateY($height); $points->rever...
[ "public", "static", "function", "rectangle", "(", "Point", "$", "corner", ",", "$", "width", ",", "$", "height", ",", "$", "ccw", "=", "false", ")", "{", "$", "points", "=", "new", "Points", "(", "$", "corner", ")", ";", "$", "points", "->", "addPo...
Calculates the points for a rectangle. @param Point $corner The top left corner. @param float $width @param float $height @param boolean $ccw Whether to list the points counterclockwise or not.
[ "Calculates", "the", "points", "for", "a", "rectangle", "." ]
c56556c9265ea4537efdc14ae89a8f36454812d9
https://github.com/clacy-builders/graphics-php/blob/c56556c9265ea4537efdc14ae89a8f36454812d9/src/Points.php#L52-L61
203,087
clacy-builders/graphics-php
src/Points.php
Points.polygon
public static function polygon(Point $center, $n, $radius, $ccw = false) { return self::star($center, $n, $radius, [], $ccw); }
php
public static function polygon(Point $center, $n, $radius, $ccw = false) { return self::star($center, $n, $radius, [], $ccw); }
[ "public", "static", "function", "polygon", "(", "Point", "$", "center", ",", "$", "n", ",", "$", "radius", ",", "$", "ccw", "=", "false", ")", "{", "return", "self", "::", "star", "(", "$", "center", ",", "$", "n", ",", "$", "radius", ",", "[", ...
Calculates the points for a regular polygon. @param Point $center @param int $n Number of corners. @param float $radius @param boolean $ccw Whether to list the points counterclockwise or not.
[ "Calculates", "the", "points", "for", "a", "regular", "polygon", "." ]
c56556c9265ea4537efdc14ae89a8f36454812d9
https://github.com/clacy-builders/graphics-php/blob/c56556c9265ea4537efdc14ae89a8f36454812d9/src/Points.php#L71-L74
203,088
clacy-builders/graphics-php
src/Points.php
Points.star
public static function star(Point $center, $n, $radius, $starRadii = [], $ccw = false) { $points = new Points($center); if (!is_array($starRadii)) { $starRadii = [$starRadii]; } $radii = array_merge([$radius], $starRadii); $count = count($radii); $delta = deg2rad(360) / $n / $count; $angle = Angle::cr...
php
public static function star(Point $center, $n, $radius, $starRadii = [], $ccw = false) { $points = new Points($center); if (!is_array($starRadii)) { $starRadii = [$starRadii]; } $radii = array_merge([$radius], $starRadii); $count = count($radii); $delta = deg2rad(360) / $n / $count; $angle = Angle::cr...
[ "public", "static", "function", "star", "(", "Point", "$", "center", ",", "$", "n", ",", "$", "radius", ",", "$", "starRadii", "=", "[", "]", ",", "$", "ccw", "=", "false", ")", "{", "$", "points", "=", "new", "Points", "(", "$", "center", ")", ...
Calculates the Points for a regular star polygon. @param Point $center @param int $n Number of corners of the underlying polygon. @param float $radius @param float|float[] $starRadii @param boolean $ccw Whether to list the points counterclockwise or not.
[ "Calculates", "the", "Points", "for", "a", "regular", "star", "polygon", "." ]
c56556c9265ea4537efdc14ae89a8f36454812d9
https://github.com/clacy-builders/graphics-php/blob/c56556c9265ea4537efdc14ae89a8f36454812d9/src/Points.php#L85-L103
203,089
clacy-builders/graphics-php
src/Points.php
Points.sector
public static function sector(Point $center, Angle $start, Angle $stop, $radius, $ccw = false) { $points = new Points($center); $points->addPoint($center); $points->addPoint($center)->translateX($radius)->rotate($center, $start); $points->addPoint($center)->translateX($radius)->rotate($center, $stop); $point...
php
public static function sector(Point $center, Angle $start, Angle $stop, $radius, $ccw = false) { $points = new Points($center); $points->addPoint($center); $points->addPoint($center)->translateX($radius)->rotate($center, $start); $points->addPoint($center)->translateX($radius)->rotate($center, $stop); $point...
[ "public", "static", "function", "sector", "(", "Point", "$", "center", ",", "Angle", "$", "start", ",", "Angle", "$", "stop", ",", "$", "radius", ",", "$", "ccw", "=", "false", ")", "{", "$", "points", "=", "new", "Points", "(", "$", "center", ")",...
Calculates the points for a sector of a circle. @param Point $center @param Angle $start @param Angle $stop Must be greater than <code>$start</code>. @param float $radius @param boolean $ccw Whether to list the points counterclockwise or not.
[ "Calculates", "the", "points", "for", "a", "sector", "of", "a", "circle", "." ]
c56556c9265ea4537efdc14ae89a8f36454812d9
https://github.com/clacy-builders/graphics-php/blob/c56556c9265ea4537efdc14ae89a8f36454812d9/src/Points.php#L129-L137
203,090
clacy-builders/graphics-php
src/Points.php
Points.ringSector
public static function ringSector(Point $center, Angle $start, Angle $stop, $radius, $innerRadius, $ccw = false) { $points = new Points($center, false); if ($ccw) { $swap = $start; $start = $stop; $stop = $swap; } $points->addPoint($center)->translateX($radius)->rotate($center, $start); $points->addPoint($c...
php
public static function ringSector(Point $center, Angle $start, Angle $stop, $radius, $innerRadius, $ccw = false) { $points = new Points($center, false); if ($ccw) { $swap = $start; $start = $stop; $stop = $swap; } $points->addPoint($center)->translateX($radius)->rotate($center, $start); $points->addPoint($c...
[ "public", "static", "function", "ringSector", "(", "Point", "$", "center", ",", "Angle", "$", "start", ",", "Angle", "$", "stop", ",", "$", "radius", ",", "$", "innerRadius", ",", "$", "ccw", "=", "false", ")", "{", "$", "points", "=", "new", "Points...
Calculates the points for a sector of a ring. @param Point $center @param Angle $start @param Angle $stop Must be greater than <code>$start</code>. @param float $radius @param float $innerRadius @param boolean $ccw Whether to list the points counterclockwise or not.
[ "Calculates", "the", "points", "for", "a", "sector", "of", "a", "ring", "." ]
c56556c9265ea4537efdc14ae89a8f36454812d9
https://github.com/clacy-builders/graphics-php/blob/c56556c9265ea4537efdc14ae89a8f36454812d9/src/Points.php#L149-L159
203,091
clacy-builders/graphics-php
src/Points.php
Points.roundedRectangle
public static function roundedRectangle(Point $corner, $width, $height, $radius, $ccw = false) { $points = new Points($corner, false); $points->addPoint($corner)->translateX($width - $radius); $points->addPoint($corner)->translate($width, $radius); $points->addPoint($corner)->translate($width, $height - $radiu...
php
public static function roundedRectangle(Point $corner, $width, $height, $radius, $ccw = false) { $points = new Points($corner, false); $points->addPoint($corner)->translateX($width - $radius); $points->addPoint($corner)->translate($width, $radius); $points->addPoint($corner)->translate($width, $height - $radiu...
[ "public", "static", "function", "roundedRectangle", "(", "Point", "$", "corner", ",", "$", "width", ",", "$", "height", ",", "$", "radius", ",", "$", "ccw", "=", "false", ")", "{", "$", "points", "=", "new", "Points", "(", "$", "corner", ",", "false"...
Calculates the points for a rounded rectangle. @param Point $corner The top left corner. @param float $width @param float $height @param float $radius @param boolean $ccw Whether to list the points counterclockwise or not.
[ "Calculates", "the", "points", "for", "a", "rounded", "rectangle", "." ]
c56556c9265ea4537efdc14ae89a8f36454812d9
https://github.com/clacy-builders/graphics-php/blob/c56556c9265ea4537efdc14ae89a8f36454812d9/src/Points.php#L170-L183
203,092
clacy-builders/graphics-php
src/Points.php
Points.scale
public function scale(Point $center, $factor) { foreach ($this->points as $point) { $point->scale($center, $factor); } $this->start->scale($center, $factor); return $this; }
php
public function scale(Point $center, $factor) { foreach ($this->points as $point) { $point->scale($center, $factor); } $this->start->scale($center, $factor); return $this; }
[ "public", "function", "scale", "(", "Point", "$", "center", ",", "$", "factor", ")", "{", "foreach", "(", "$", "this", "->", "points", "as", "$", "point", ")", "{", "$", "point", "->", "scale", "(", "$", "center", ",", "$", "factor", ")", ";", "}...
Scales points. @param Point $center @param float $factor
[ "Scales", "points", "." ]
c56556c9265ea4537efdc14ae89a8f36454812d9
https://github.com/clacy-builders/graphics-php/blob/c56556c9265ea4537efdc14ae89a8f36454812d9/src/Points.php#L206-L213
203,093
clacy-builders/graphics-php
src/Points.php
Points.scaleX
public function scaleX(Point $center, $factor) { foreach ($this->points as $point) { $point->scaleX($center, $factor); } $this->start->scaleX($center, $factor); $this->reverseIfCcw($factor < 0); return $this; }
php
public function scaleX(Point $center, $factor) { foreach ($this->points as $point) { $point->scaleX($center, $factor); } $this->start->scaleX($center, $factor); $this->reverseIfCcw($factor < 0); return $this; }
[ "public", "function", "scaleX", "(", "Point", "$", "center", ",", "$", "factor", ")", "{", "foreach", "(", "$", "this", "->", "points", "as", "$", "point", ")", "{", "$", "point", "->", "scaleX", "(", "$", "center", ",", "$", "factor", ")", ";", ...
Scales points along the X-axis. @param Point $center @param float $factor
[ "Scales", "points", "along", "the", "X", "-", "axis", "." ]
c56556c9265ea4537efdc14ae89a8f36454812d9
https://github.com/clacy-builders/graphics-php/blob/c56556c9265ea4537efdc14ae89a8f36454812d9/src/Points.php#L221-L229
203,094
clacy-builders/graphics-php
src/Points.php
Points.translate
public function translate($deltaX, $deltaY) { foreach ($this->points as $point) { $point->translate($deltaX, $deltaY); } $this->start->translate($deltaX, $deltaY); return $this; }
php
public function translate($deltaX, $deltaY) { foreach ($this->points as $point) { $point->translate($deltaX, $deltaY); } $this->start->translate($deltaX, $deltaY); return $this; }
[ "public", "function", "translate", "(", "$", "deltaX", ",", "$", "deltaY", ")", "{", "foreach", "(", "$", "this", "->", "points", "as", "$", "point", ")", "{", "$", "point", "->", "translate", "(", "$", "deltaX", ",", "$", "deltaY", ")", ";", "}", ...
Translates points. @param float $deltaX @param float $deltaY
[ "Translates", "points", "." ]
c56556c9265ea4537efdc14ae89a8f36454812d9
https://github.com/clacy-builders/graphics-php/blob/c56556c9265ea4537efdc14ae89a8f36454812d9/src/Points.php#L283-L290
203,095
clacy-builders/graphics-php
src/Points.php
Points.translateX
public function translateX($deltaX) { foreach ($this->points as $point) { $point->translateX($deltaX); } $this->start->translateX($deltaX); return $this; }
php
public function translateX($deltaX) { foreach ($this->points as $point) { $point->translateX($deltaX); } $this->start->translateX($deltaX); return $this; }
[ "public", "function", "translateX", "(", "$", "deltaX", ")", "{", "foreach", "(", "$", "this", "->", "points", "as", "$", "point", ")", "{", "$", "point", "->", "translateX", "(", "$", "deltaX", ")", ";", "}", "$", "this", "->", "start", "->", "tra...
Translates points along the X-axis. @param float $deltaX @param float $deltaY
[ "Translates", "points", "along", "the", "X", "-", "axis", "." ]
c56556c9265ea4537efdc14ae89a8f36454812d9
https://github.com/clacy-builders/graphics-php/blob/c56556c9265ea4537efdc14ae89a8f36454812d9/src/Points.php#L298-L305
203,096
clacy-builders/graphics-php
src/Points.php
Points.translateY
public function translateY($deltaY) { foreach ($this->points as $point) { $point->translateY($deltaY); } $this->start->translateY($deltaY); return $this; }
php
public function translateY($deltaY) { foreach ($this->points as $point) { $point->translateY($deltaY); } $this->start->translateY($deltaY); return $this; }
[ "public", "function", "translateY", "(", "$", "deltaY", ")", "{", "foreach", "(", "$", "this", "->", "points", "as", "$", "point", ")", "{", "$", "point", "->", "translateY", "(", "$", "deltaY", ")", ";", "}", "$", "this", "->", "start", "->", "tra...
Translates points along the Y-axis. @param float $deltaX @param float $deltaY
[ "Translates", "points", "along", "the", "Y", "-", "axis", "." ]
c56556c9265ea4537efdc14ae89a8f36454812d9
https://github.com/clacy-builders/graphics-php/blob/c56556c9265ea4537efdc14ae89a8f36454812d9/src/Points.php#L313-L320
203,097
Wedeto/Log
src/Logger.php
Logger.getLogger
public static function getLogger($module = "") { if (is_object($module)) $module = get_class($module); elseif (empty($module) || strtoupper($module) === "ROOT") $module = ""; $module = trim(str_replace('\\', '.', $module), ". \\"); if (!isset(self::$module_lo...
php
public static function getLogger($module = "") { if (is_object($module)) $module = get_class($module); elseif (empty($module) || strtoupper($module) === "ROOT") $module = ""; $module = trim(str_replace('\\', '.', $module), ". \\"); if (!isset(self::$module_lo...
[ "public", "static", "function", "getLogger", "(", "$", "module", "=", "\"\"", ")", "{", "if", "(", "is_object", "(", "$", "module", ")", ")", "$", "module", "=", "get_class", "(", "$", "module", ")", ";", "elseif", "(", "empty", "(", "$", "module", ...
Get a logger for a specific module. @param mixed $module A string indicating the module, or a class name or object that will be used to find the appropriate name. @return Logger The instance for the specified module
[ "Get", "a", "logger", "for", "a", "specific", "module", "." ]
88252c5052089fdcc5dae466d1ad5889bb2b735f
https://github.com/Wedeto/Log/blob/88252c5052089fdcc5dae466d1ad5889bb2b735f/src/Logger.php#L100-L112
203,098
Wedeto/Log
src/Logger.php
Logger.resetGlobalState
public static function resetGlobalState() { foreach (self::$module_loggers as $logger) $logger->removeLogWriters(); self::$module_loggers = []; self::$accept_mode = self::MODE_ACCEPT_MOST_SPECIFIC; }
php
public static function resetGlobalState() { foreach (self::$module_loggers as $logger) $logger->removeLogWriters(); self::$module_loggers = []; self::$accept_mode = self::MODE_ACCEPT_MOST_SPECIFIC; }
[ "public", "static", "function", "resetGlobalState", "(", ")", "{", "foreach", "(", "self", "::", "$", "module_loggers", "as", "$", "logger", ")", "$", "logger", "->", "removeLogWriters", "(", ")", ";", "self", "::", "$", "module_loggers", "=", "[", "]", ...
This method will reset all global state in the Logger object. It will remove all writers from all loggers and then remove all loggers. Note that this will not remove existing logger instances from other objects - this is why the writers are removed.
[ "This", "method", "will", "reset", "all", "global", "state", "in", "the", "Logger", "object", ".", "It", "will", "remove", "all", "writers", "from", "all", "loggers", "and", "then", "remove", "all", "loggers", ".", "Note", "that", "this", "will", "not", ...
88252c5052089fdcc5dae466d1ad5889bb2b735f
https://github.com/Wedeto/Log/blob/88252c5052089fdcc5dae466d1ad5889bb2b735f/src/Logger.php#L120-L126
203,099
Wedeto/Log
src/Logger.php
Logger.setLevel
public function setLevel(string $level) { if (!defined(LogLevel::class . '::' . strtoupper($level))) throw new \DomainException("Invalid log level: $level"); $this->level = $level; $this->level_num = self::$LEVEL_NUMERIC[$level]; return $this; }
php
public function setLevel(string $level) { if (!defined(LogLevel::class . '::' . strtoupper($level))) throw new \DomainException("Invalid log level: $level"); $this->level = $level; $this->level_num = self::$LEVEL_NUMERIC[$level]; return $this; }
[ "public", "function", "setLevel", "(", "string", "$", "level", ")", "{", "if", "(", "!", "defined", "(", "LogLevel", "::", "class", ".", "'::'", ".", "strtoupper", "(", "$", "level", ")", ")", ")", "throw", "new", "\\", "DomainException", "(", "\"Inval...
Set the log level for this module. Any log messages with a severity lower than this threshold will not bubble up. @param string $level The minimum log level of messages to handle
[ "Set", "the", "log", "level", "for", "this", "module", ".", "Any", "log", "messages", "with", "a", "severity", "lower", "than", "this", "threshold", "will", "not", "bubble", "up", "." ]
88252c5052089fdcc5dae466d1ad5889bb2b735f
https://github.com/Wedeto/Log/blob/88252c5052089fdcc5dae466d1ad5889bb2b735f/src/Logger.php#L203-L211