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
238,200
codebobbly/dvoconnector
Classes/Controller/AssociationController.php
AssociationController.indexAction
public function indexAction() { $this->checkStaticTemplateIsIncluded(); $this->checkSettings(); $arguments = $this->request->getArguments(); return $this->forward('listAssociations', null, null, $arguments); }
php
public function indexAction() { $this->checkStaticTemplateIsIncluded(); $this->checkSettings(); $arguments = $this->request->getArguments(); return $this->forward('listAssociations', null, null, $arguments); }
[ "public", "function", "indexAction", "(", ")", "{", "$", "this", "->", "checkStaticTemplateIsIncluded", "(", ")", ";", "$", "this", "->", "checkSettings", "(", ")", ";", "$", "arguments", "=", "$", "this", "->", "request", "->", "getArguments", "(", ")", ...
index action. @return string
[ "index", "action", "." ]
9b63790d2fc9fd21bf415b4a5757678895b73bbc
https://github.com/codebobbly/dvoconnector/blob/9b63790d2fc9fd21bf415b4a5757678895b73bbc/Classes/Controller/AssociationController.php#L84-L91
238,201
codebobbly/dvoconnector
Classes/Controller/AssociationController.php
AssociationController.listSubAssociationsAction
public function listSubAssociationsAction(string $aID = null, string $filter = null) { $this->checkStaticTemplateIsIncluded(); $this->checkSettings(); $this->slotExtendedAssignMultiple([ self::VIEW_VARIABLE_ASSOCIATION_ID => $aID, self::VIEW_VARIABLE_FILTER => $this-...
php
public function listSubAssociationsAction(string $aID = null, string $filter = null) { $this->checkStaticTemplateIsIncluded(); $this->checkSettings(); $this->slotExtendedAssignMultiple([ self::VIEW_VARIABLE_ASSOCIATION_ID => $aID, self::VIEW_VARIABLE_FILTER => $this-...
[ "public", "function", "listSubAssociationsAction", "(", "string", "$", "aID", "=", "null", ",", "string", "$", "filter", "=", "null", ")", "{", "$", "this", "->", "checkStaticTemplateIsIncluded", "(", ")", ";", "$", "this", "->", "checkSettings", "(", ")", ...
list sub associations action. @param string $aID parent associations ID @param string $filter Filter @return string
[ "list", "sub", "associations", "action", "." ]
9b63790d2fc9fd21bf415b4a5757678895b73bbc
https://github.com/codebobbly/dvoconnector/blob/9b63790d2fc9fd21bf415b4a5757678895b73bbc/Classes/Controller/AssociationController.php#L101-L113
238,202
codebobbly/dvoconnector
Classes/Controller/AssociationController.php
AssociationController.detailAssociationAction
public function detailAssociationAction(string $aID) { $this->checkStaticTemplateIsIncluded(); $this->checkSettings(); $this->slotExtendedAssignMultiple([ self::VIEW_VARIABLE_ASSOCIATION_ID => $aID ], __CLASS__, __FUNCTION__); return $this->view->render(); }
php
public function detailAssociationAction(string $aID) { $this->checkStaticTemplateIsIncluded(); $this->checkSettings(); $this->slotExtendedAssignMultiple([ self::VIEW_VARIABLE_ASSOCIATION_ID => $aID ], __CLASS__, __FUNCTION__); return $this->view->render(); }
[ "public", "function", "detailAssociationAction", "(", "string", "$", "aID", ")", "{", "$", "this", "->", "checkStaticTemplateIsIncluded", "(", ")", ";", "$", "this", "->", "checkSettings", "(", ")", ";", "$", "this", "->", "slotExtendedAssignMultiple", "(", "[...
detail association action. @param string $aID association ID @return string
[ "detail", "association", "action", "." ]
9b63790d2fc9fd21bf415b4a5757678895b73bbc
https://github.com/codebobbly/dvoconnector/blob/9b63790d2fc9fd21bf415b4a5757678895b73bbc/Classes/Controller/AssociationController.php#L143-L153
238,203
codebobbly/dvoconnector
Classes/Controller/AssociationController.php
AssociationController.detailEventAction
public function detailEventAction(string $aID, string $eID) { $this->checkStaticTemplateIsIncluded(); $this->checkSettings(); $this->slotExtendedAssignMultiple([ self::VIEW_VARIABLE_ASSOCIATION_ID => $aID, self::VIEW_VARIABLE_EVENT_ID => $eID ], __CLASS__, __...
php
public function detailEventAction(string $aID, string $eID) { $this->checkStaticTemplateIsIncluded(); $this->checkSettings(); $this->slotExtendedAssignMultiple([ self::VIEW_VARIABLE_ASSOCIATION_ID => $aID, self::VIEW_VARIABLE_EVENT_ID => $eID ], __CLASS__, __...
[ "public", "function", "detailEventAction", "(", "string", "$", "aID", ",", "string", "$", "eID", ")", "{", "$", "this", "->", "checkStaticTemplateIsIncluded", "(", ")", ";", "$", "this", "->", "checkSettings", "(", ")", ";", "$", "this", "->", "slotExtende...
detail event action. @param string $aID association ID @param string $eID event ID @return string
[ "detail", "event", "action", "." ]
9b63790d2fc9fd21bf415b4a5757678895b73bbc
https://github.com/codebobbly/dvoconnector/blob/9b63790d2fc9fd21bf415b4a5757678895b73bbc/Classes/Controller/AssociationController.php#L163-L174
238,204
codebobbly/dvoconnector
Classes/Controller/AssociationController.php
AssociationController.detailFunctionaryAction
public function detailFunctionaryAction(string $aID, string $fID) { $this->checkStaticTemplateIsIncluded(); $this->checkSettings(); $this->slotExtendedAssignMultiple([ self::VIEW_VARIABLE_ASSOCIATION_ID => $aID, self::VIEW_VARIABLE_FUNCTIONARY_ID => $fID ], _...
php
public function detailFunctionaryAction(string $aID, string $fID) { $this->checkStaticTemplateIsIncluded(); $this->checkSettings(); $this->slotExtendedAssignMultiple([ self::VIEW_VARIABLE_ASSOCIATION_ID => $aID, self::VIEW_VARIABLE_FUNCTIONARY_ID => $fID ], _...
[ "public", "function", "detailFunctionaryAction", "(", "string", "$", "aID", ",", "string", "$", "fID", ")", "{", "$", "this", "->", "checkStaticTemplateIsIncluded", "(", ")", ";", "$", "this", "->", "checkSettings", "(", ")", ";", "$", "this", "->", "slotE...
detail functionary action. @param string $aID association ID @param string $fID functionary ID @return string
[ "detail", "functionary", "action", "." ]
9b63790d2fc9fd21bf415b4a5757678895b73bbc
https://github.com/codebobbly/dvoconnector/blob/9b63790d2fc9fd21bf415b4a5757678895b73bbc/Classes/Controller/AssociationController.php#L249-L260
238,205
marando/phpSOFA
src/Marando/IAU/iauCpv.php
iauCpv.Cpv
public static function Cpv(array $pv, array &$c) { // Added in PHP porting... initialize $c array $c[] = [0, 0, 0]; $c[] = [0, 0, 0]; IAU::Cp($pv[0], $c[0]); IAU::Cp($pv[1], $c[1]); return; }
php
public static function Cpv(array $pv, array &$c) { // Added in PHP porting... initialize $c array $c[] = [0, 0, 0]; $c[] = [0, 0, 0]; IAU::Cp($pv[0], $c[0]); IAU::Cp($pv[1], $c[1]); return; }
[ "public", "static", "function", "Cpv", "(", "array", "$", "pv", ",", "array", "&", "$", "c", ")", "{", "// Added in PHP porting... initialize $c array", "$", "c", "[", "]", "=", "[", "0", ",", "0", ",", "0", "]", ";", "$", "c", "[", "]", "=", "[", ...
- - - - - - - i a u C p v - - - - - - - Copy a position/velocity vector. This function is part of the International Astronomical Union's SOFA (Standards Of Fundamental Astronomy) software collection. Status: vector/matrix support function. Given: pv double[2][3] position/velocity vector to be copied Return...
[ "-", "-", "-", "-", "-", "-", "-", "i", "a", "u", "C", "p", "v", "-", "-", "-", "-", "-", "-", "-" ]
757fa49fe335ae1210eaa7735473fd4388b13f07
https://github.com/marando/phpSOFA/blob/757fa49fe335ae1210eaa7735473fd4388b13f07/src/Marando/IAU/iauCpv.php#L34-L43
238,206
indigophp-archive/codeception-fuel-module
fuel/fuel/core/classes/image/imagemagick.php
Image_Imagemagick.exec
protected function exec($program, $params, $passthru = false) { // Determine the path $this->im_path = realpath($this->config['imagemagick_dir'].$program); if ( ! $this->im_path) { $this->im_path = realpath($this->config['imagemagick_dir'].$program.'.exe'); } if ( ! $this->im_path) { throw new \Ru...
php
protected function exec($program, $params, $passthru = false) { // Determine the path $this->im_path = realpath($this->config['imagemagick_dir'].$program); if ( ! $this->im_path) { $this->im_path = realpath($this->config['imagemagick_dir'].$program.'.exe'); } if ( ! $this->im_path) { throw new \Ru...
[ "protected", "function", "exec", "(", "$", "program", ",", "$", "params", ",", "$", "passthru", "=", "false", ")", "{", "// Determine the path", "$", "this", "->", "im_path", "=", "realpath", "(", "$", "this", "->", "config", "[", "'imagemagick_dir'", "]"...
Executes the specified imagemagick executable and returns the output. @param string $program The name of the executable. @param string $params The parameters of the executable. @param boolean $passthru Returns the output if false or pass it to browser. @return mixed Either returns the output or re...
[ "Executes", "the", "specified", "imagemagick", "executable", "and", "returns", "the", "output", "." ]
0973b7cbd540a0e89cc5bb7af94627f77f09bf49
https://github.com/indigophp-archive/codeception-fuel-module/blob/0973b7cbd540a0e89cc5bb7af94627f77f09bf49/fuel/fuel/core/classes/image/imagemagick.php#L309-L335
238,207
ddehart/dilmun
src/Kishar/Page.php
Page.setContents
public function setContents($contents) { $contents_exist = file_exists($contents); if ($contents_exist) { $this->contents = file_get_contents($contents); $this->updateLog("info", "Page contents set from {$contents}"); } else { $this->contents = false; ...
php
public function setContents($contents) { $contents_exist = file_exists($contents); if ($contents_exist) { $this->contents = file_get_contents($contents); $this->updateLog("info", "Page contents set from {$contents}"); } else { $this->contents = false; ...
[ "public", "function", "setContents", "(", "$", "contents", ")", "{", "$", "contents_exist", "=", "file_exists", "(", "$", "contents", ")", ";", "if", "(", "$", "contents_exist", ")", "{", "$", "this", "->", "contents", "=", "file_get_contents", "(", "$", ...
Sets the Page's contents to the contents of a file @param string $contents The path to the file containing the page's contents @return bool Returns true if the file exists Returns false if the file does not exist
[ "Sets", "the", "Page", "s", "contents", "to", "the", "contents", "of", "a", "file" ]
e2a294dbcd4c6754063c247be64930c5ee91378f
https://github.com/ddehart/dilmun/blob/e2a294dbcd4c6754063c247be64930c5ee91378f/src/Kishar/Page.php#L24-L39
238,208
slickframework/template
src/Engine/Twig.php
Twig.getTwigEnvironment
private function getTwigEnvironment() { if (null == $this->twigEnvironment) { $this->twigEnvironment = $this->createTwigEnvironment(); } return $this->twigEnvironment; }
php
private function getTwigEnvironment() { if (null == $this->twigEnvironment) { $this->twigEnvironment = $this->createTwigEnvironment(); } return $this->twigEnvironment; }
[ "private", "function", "getTwigEnvironment", "(", ")", "{", "if", "(", "null", "==", "$", "this", "->", "twigEnvironment", ")", "{", "$", "this", "->", "twigEnvironment", "=", "$", "this", "->", "createTwigEnvironment", "(", ")", ";", "}", "return", "$", ...
Creates a twig environment if not injected @return Twig_Environment
[ "Creates", "a", "twig", "environment", "if", "not", "injected" ]
d31abe9608acb30cfb8a6abd9cdf9d334f682fef
https://github.com/slickframework/template/blob/d31abe9608acb30cfb8a6abd9cdf9d334f682fef/src/Engine/Twig.php#L158-L164
238,209
slickframework/template
src/Engine/Twig.php
Twig.createTwigEnvironment
private function createTwigEnvironment() { $twigEnv = new Twig_Environment( $this->getLoader(), $this->getOptions() ); if ($this->options['debug']) { $twigEnv->addExtension(new Twig_Extension_Debug()); } return $twigEnv; }
php
private function createTwigEnvironment() { $twigEnv = new Twig_Environment( $this->getLoader(), $this->getOptions() ); if ($this->options['debug']) { $twigEnv->addExtension(new Twig_Extension_Debug()); } return $twigEnv; }
[ "private", "function", "createTwigEnvironment", "(", ")", "{", "$", "twigEnv", "=", "new", "Twig_Environment", "(", "$", "this", "->", "getLoader", "(", ")", ",", "$", "this", "->", "getOptions", "(", ")", ")", ";", "if", "(", "$", "this", "->", "optio...
Creates the twig environment @return Twig_Environment
[ "Creates", "the", "twig", "environment" ]
d31abe9608acb30cfb8a6abd9cdf9d334f682fef
https://github.com/slickframework/template/blob/d31abe9608acb30cfb8a6abd9cdf9d334f682fef/src/Engine/Twig.php#L171-L183
238,210
slickframework/template
src/Engine/Twig.php
Twig.getLoader
private function getLoader() { if (null == $this->loader) { $this->loader = new Twig_Loader_Filesystem( $this->locations ); } return $this->loader; }
php
private function getLoader() { if (null == $this->loader) { $this->loader = new Twig_Loader_Filesystem( $this->locations ); } return $this->loader; }
[ "private", "function", "getLoader", "(", ")", "{", "if", "(", "null", "==", "$", "this", "->", "loader", ")", "{", "$", "this", "->", "loader", "=", "new", "Twig_Loader_Filesystem", "(", "$", "this", "->", "locations", ")", ";", "}", "return", "$", "...
Creates a file system loader @return Twig_Loader_Filesystem
[ "Creates", "a", "file", "system", "loader" ]
d31abe9608acb30cfb8a6abd9cdf9d334f682fef
https://github.com/slickframework/template/blob/d31abe9608acb30cfb8a6abd9cdf9d334f682fef/src/Engine/Twig.php#L190-L198
238,211
slickframework/template
src/Engine/Twig.php
Twig.getOptions
private function getOptions() { $options = []; foreach($this->optionsMap as $property => $name) { $options[$name] = $this->options[$property]; } return $options; }
php
private function getOptions() { $options = []; foreach($this->optionsMap as $property => $name) { $options[$name] = $this->options[$property]; } return $options; }
[ "private", "function", "getOptions", "(", ")", "{", "$", "options", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "optionsMap", "as", "$", "property", "=>", "$", "name", ")", "{", "$", "options", "[", "$", "name", "]", "=", "$", "this", ...
Returns current configured options @return array
[ "Returns", "current", "configured", "options" ]
d31abe9608acb30cfb8a6abd9cdf9d334f682fef
https://github.com/slickframework/template/blob/d31abe9608acb30cfb8a6abd9cdf9d334f682fef/src/Engine/Twig.php#L205-L212
238,212
thecodingmachine/utils.i18n.fine.file-translator
src/MessageFileLanguage.php
MessageFileLanguage.save
public function save() { if($this->msg) { ksort($this->msg); $file = $this->folder."messages_".$this->language.".php"; $old = umask(00002); if (file_exists($file) && !is_writable($file)) { throw new FileTranslatorException('Cannot write to file "'.$file.'".'); } elseif (!file_exists($file)) {...
php
public function save() { if($this->msg) { ksort($this->msg); $file = $this->folder."messages_".$this->language.".php"; $old = umask(00002); if (file_exists($file) && !is_writable($file)) { throw new FileTranslatorException('Cannot write to file "'.$file.'".'); } elseif (!file_exists($file)) {...
[ "public", "function", "save", "(", ")", "{", "if", "(", "$", "this", "->", "msg", ")", "{", "ksort", "(", "$", "this", "->", "msg", ")", ";", "$", "file", "=", "$", "this", "->", "folder", ".", "\"messages_\"", ".", "$", "this", "->", "language",...
Saves the file for current language
[ "Saves", "the", "file", "for", "current", "language" ]
67b180fed62562b36d28d6d61707fde4f62abf9a
https://github.com/thecodingmachine/utils.i18n.fine.file-translator/blob/67b180fed62562b36d28d6d61707fde4f62abf9a/src/MessageFileLanguage.php#L50-L82
238,213
thecodingmachine/utils.i18n.fine.file-translator
src/MessageFileLanguage.php
MessageFileLanguage.deleteMessage
public function deleteMessage($key) { if(isset($this->msg[$key])) { unset($this->msg[$key]); } if(!$this->msg) { $this->deleteFile(); } }
php
public function deleteMessage($key) { if(isset($this->msg[$key])) { unset($this->msg[$key]); } if(!$this->msg) { $this->deleteFile(); } }
[ "public", "function", "deleteMessage", "(", "$", "key", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "msg", "[", "$", "key", "]", ")", ")", "{", "unset", "(", "$", "this", "->", "msg", "[", "$", "key", "]", ")", ";", "}", "if", "(", ...
Sets the message @var $key Remove a message for key
[ "Sets", "the", "message" ]
67b180fed62562b36d28d6d61707fde4f62abf9a
https://github.com/thecodingmachine/utils.i18n.fine.file-translator/blob/67b180fed62562b36d28d6d61707fde4f62abf9a/src/MessageFileLanguage.php#L132-L139
238,214
Arbitracker/VCSWrapper
src/main/php/Arbit/VCSWrapper/HgCli/Directory.php
Directory.initializeResouces
protected function initializeResouces() { if ($this->resources !== null) { return; } $this->resources = array(); $contents = dir($this->root . $this->path); while (($path = $contents->read()) !== false) { if (in_array($path, array('.', '..', '.hg')))...
php
protected function initializeResouces() { if ($this->resources !== null) { return; } $this->resources = array(); $contents = dir($this->root . $this->path); while (($path = $contents->read()) !== false) { if (in_array($path, array('.', '..', '.hg')))...
[ "protected", "function", "initializeResouces", "(", ")", "{", "if", "(", "$", "this", "->", "resources", "!==", "null", ")", "{", "return", ";", "}", "$", "this", "->", "resources", "=", "array", "(", ")", ";", "$", "contents", "=", "dir", "(", "$", ...
Initialize the resources array. Initilaize the array containing all child elements of the current directly as \Arbit\VCSWrapper\HgCli\Resource objects. @return array(\Arbit\VCSWrapper\HgCli\Resource)
[ "Initialize", "the", "resources", "array", "." ]
64907c0c438600ce67d79a5d17f5155563f2bbf2
https://github.com/Arbitracker/VCSWrapper/blob/64907c0c438600ce67d79a5d17f5155563f2bbf2/src/main/php/Arbit/VCSWrapper/HgCli/Directory.php#L52-L73
238,215
gearhub/tactician-for-laravel
src/Locator.php
Locator.getHandlerForCommand
public function getHandlerForCommand($commandName) { $command = str_replace($this->commandNamespace, '', $commandName); $handlerName = $this->handlerNamespace.'\\'.trim($command, '\\').'Handler'; if (!class_exists($handlerName)) { throw MissingHandlerException::forCommand($c...
php
public function getHandlerForCommand($commandName) { $command = str_replace($this->commandNamespace, '', $commandName); $handlerName = $this->handlerNamespace.'\\'.trim($command, '\\').'Handler'; if (!class_exists($handlerName)) { throw MissingHandlerException::forCommand($c...
[ "public", "function", "getHandlerForCommand", "(", "$", "commandName", ")", "{", "$", "command", "=", "str_replace", "(", "$", "this", "->", "commandNamespace", ",", "''", ",", "$", "commandName", ")", ";", "$", "handlerName", "=", "$", "this", "->", "hand...
Attempts to find the command's respective handler. @param string $commandName @return mixed @throws MissingHandlerException
[ "Attempts", "to", "find", "the", "command", "s", "respective", "handler", "." ]
417bb3683ceefe636ce1cd16ee03031649c80735
https://github.com/gearhub/tactician-for-laravel/blob/417bb3683ceefe636ce1cd16ee03031649c80735/src/Locator.php#L57-L69
238,216
AlexHowansky/ork-phpcs
Ork/Sniffs/Functions/FunctionCallSignatureSniff.php
FunctionCallSignatureSniff.isMultiLineCall
public function isMultiLineCall(File $phpcsFile, $stackPtr, $openBracket, $tokens) { $closeBracket = $tokens[$openBracket]['parenthesis_closer']; if ($tokens[$openBracket]['line'] !== $tokens[$closeBracket]['line']) { return true; } return false; }
php
public function isMultiLineCall(File $phpcsFile, $stackPtr, $openBracket, $tokens) { $closeBracket = $tokens[$openBracket]['parenthesis_closer']; if ($tokens[$openBracket]['line'] !== $tokens[$closeBracket]['line']) { return true; } return false; }
[ "public", "function", "isMultiLineCall", "(", "File", "$", "phpcsFile", ",", "$", "stackPtr", ",", "$", "openBracket", ",", "$", "tokens", ")", "{", "$", "closeBracket", "=", "$", "tokens", "[", "$", "openBracket", "]", "[", "'parenthesis_closer'", "]", ";...
Determine if this is a multi-line function call. @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. @param int $stackPtr The position of the current token in the stack passed in $tokens. @param int $openBracket The position of the opening bracket ...
[ "Determine", "if", "this", "is", "a", "multi", "-", "line", "function", "call", "." ]
2dab6c5c49713158a1895ddacb36030b23672927
https://github.com/AlexHowansky/ork-phpcs/blob/2dab6c5c49713158a1895ddacb36030b23672927/Ork/Sniffs/Functions/FunctionCallSignatureSniff.php#L186-L195
238,217
tonjoo/tiga-framework
src/Template/h2o.php
h2o.addTag
public static function addTag($tag, $class = null) { $tags = array(); if (is_string($tag)) { if (is_null($class)) { $class = ucwords("{$tag}_Tag"); } $tags[$tag] = $class; } elseif (is_array($tag)) { $tags = $tag; } ...
php
public static function addTag($tag, $class = null) { $tags = array(); if (is_string($tag)) { if (is_null($class)) { $class = ucwords("{$tag}_Tag"); } $tags[$tag] = $class; } elseif (is_array($tag)) { $tags = $tag; } ...
[ "public", "static", "function", "addTag", "(", "$", "tag", ",", "$", "class", "=", "null", ")", "{", "$", "tags", "=", "array", "(", ")", ";", "if", "(", "is_string", "(", "$", "tag", ")", ")", "{", "if", "(", "is_null", "(", "$", "class", ")",...
Register a new tag. h2o::addTag('tag_name', 'ClassName'); h2o::addTag(array( 'tag_name' => 'MagClass', 'tag_name2' => 'TagClass2' )); h2o::addTag('tag_name'); // Tag_name_Tag h2o::addTag(array('tag_name', @param unknown_type $tag @param unknown_type $class
[ "Register", "a", "new", "tag", "." ]
3c2eebd3bc616106fa1bba3e43f1791aff75eec5
https://github.com/tonjoo/tiga-framework/blob/3c2eebd3bc616106fa1bba3e43f1791aff75eec5/src/Template/h2o.php#L192-L216
238,218
tonjoo/tiga-framework
src/Template/h2o.php
h2o.addFilter
public static function addFilter($filter, $callback = null) { if (is_array($filter)) { $filters = $filter; foreach ($filters as $key => $filter) { if (is_numeric($key)) { $key = $filter; } self::addFilter($key, $filt...
php
public static function addFilter($filter, $callback = null) { if (is_array($filter)) { $filters = $filter; foreach ($filters as $key => $filter) { if (is_numeric($key)) { $key = $filter; } self::addFilter($key, $filt...
[ "public", "static", "function", "addFilter", "(", "$", "filter", ",", "$", "callback", "=", "null", ")", "{", "if", "(", "is_array", "(", "$", "filter", ")", ")", "{", "$", "filters", "=", "$", "filter", ";", "foreach", "(", "$", "filters", "as", "...
Register a new filter to h2o runtime. @param unknown_type $filter @param unknown_type $callback @return unknown
[ "Register", "a", "new", "filter", "to", "h2o", "runtime", "." ]
3c2eebd3bc616106fa1bba3e43f1791aff75eec5
https://github.com/tonjoo/tiga-framework/blob/3c2eebd3bc616106fa1bba3e43f1791aff75eec5/src/Template/h2o.php#L226-L255
238,219
l-x/Fna
src/Fna/Wrapper.php
Wrapper.getArrayType
protected function getArrayType(array $array) { $indices = count(array_filter(array_keys($array), 'is_string')); if ($indices == 0) { $type = self::ARRAY_TYPE_LIST; } elseif ($indices == count($array)) { $type = self::ARRAY_TYPE_DICT; } else { $type = self::ARRAY_TYPE_MIXED; } return $type; }
php
protected function getArrayType(array $array) { $indices = count(array_filter(array_keys($array), 'is_string')); if ($indices == 0) { $type = self::ARRAY_TYPE_LIST; } elseif ($indices == count($array)) { $type = self::ARRAY_TYPE_DICT; } else { $type = self::ARRAY_TYPE_MIXED; } return $type; }
[ "protected", "function", "getArrayType", "(", "array", "$", "array", ")", "{", "$", "indices", "=", "count", "(", "array_filter", "(", "array_keys", "(", "$", "array", ")", ",", "'is_string'", ")", ")", ";", "if", "(", "$", "indices", "==", "0", ")", ...
Determines wether an array is index or key based @param array $array @return int
[ "Determines", "wether", "an", "array", "is", "index", "or", "key", "based" ]
1dc221769fd6bc6155181ffc1bdbcb10c698002c
https://github.com/l-x/Fna/blob/1dc221769fd6bc6155181ffc1bdbcb10c698002c/src/Fna/Wrapper.php#L96-L108
238,220
l-x/Fna
src/Fna/Wrapper.php
Wrapper.getCallbackReflection
protected function getCallbackReflection($callback) { if (is_string($callback) && strpos($callback, '::') !== false) { $callback = explode('::', $callback, 2); } switch (true) { case is_string($callback) && function_exists($callback): case $callback instanceof \Closure: $reflection_method = new \Refl...
php
protected function getCallbackReflection($callback) { if (is_string($callback) && strpos($callback, '::') !== false) { $callback = explode('::', $callback, 2); } switch (true) { case is_string($callback) && function_exists($callback): case $callback instanceof \Closure: $reflection_method = new \Refl...
[ "protected", "function", "getCallbackReflection", "(", "$", "callback", ")", "{", "if", "(", "is_string", "(", "$", "callback", ")", "&&", "strpos", "(", "$", "callback", ",", "'::'", ")", "!==", "false", ")", "{", "$", "callback", "=", "explode", "(", ...
Returns the reflection instance based on the type of the provided callable @param callable $callback @return \ReflectionFunction|\ReflectionMethod @throws InvalidCallbackException
[ "Returns", "the", "reflection", "instance", "based", "on", "the", "type", "of", "the", "provided", "callable" ]
1dc221769fd6bc6155181ffc1bdbcb10c698002c
https://github.com/l-x/Fna/blob/1dc221769fd6bc6155181ffc1bdbcb10c698002c/src/Fna/Wrapper.php#L118-L139
238,221
l-x/Fna
src/Fna/Wrapper.php
Wrapper.setCallback
protected function setCallback($callback) { if (!is_callable($callback)) { throw new InvalidCallbackException('Invalid callback'); } $this->reflection_parameter = $this ->getCallbackReflection($callback) ->getParameters() ; $this->callback = $callback; return $this; }
php
protected function setCallback($callback) { if (!is_callable($callback)) { throw new InvalidCallbackException('Invalid callback'); } $this->reflection_parameter = $this ->getCallbackReflection($callback) ->getParameters() ; $this->callback = $callback; return $this; }
[ "protected", "function", "setCallback", "(", "$", "callback", ")", "{", "if", "(", "!", "is_callable", "(", "$", "callback", ")", ")", "{", "throw", "new", "InvalidCallbackException", "(", "'Invalid callback'", ")", ";", "}", "$", "this", "->", "reflection_p...
Gets the reflection class for and sets the callback @param callable $callback @return $this @throws InvalidCallbackException
[ "Gets", "the", "reflection", "class", "for", "and", "sets", "the", "callback" ]
1dc221769fd6bc6155181ffc1bdbcb10c698002c
https://github.com/l-x/Fna/blob/1dc221769fd6bc6155181ffc1bdbcb10c698002c/src/Fna/Wrapper.php#L149-L161
238,222
l-x/Fna
src/Fna/Wrapper.php
Wrapper.prepareArguments
protected function prepareArguments($reflection_parameter, $arguments) { $array_type = $this->getArrayType($arguments); $prepared = array(); if ($array_type == self::ARRAY_TYPE_LIST) { $prepared = $arguments; } elseif ($array_type == self::ARRAY_TYPE_DICT) { foreach ($reflection_parameter as $parameter) ...
php
protected function prepareArguments($reflection_parameter, $arguments) { $array_type = $this->getArrayType($arguments); $prepared = array(); if ($array_type == self::ARRAY_TYPE_LIST) { $prepared = $arguments; } elseif ($array_type == self::ARRAY_TYPE_DICT) { foreach ($reflection_parameter as $parameter) ...
[ "protected", "function", "prepareArguments", "(", "$", "reflection_parameter", ",", "$", "arguments", ")", "{", "$", "array_type", "=", "$", "this", "->", "getArrayType", "(", "$", "arguments", ")", ";", "$", "prepared", "=", "array", "(", ")", ";", "if", ...
Prepares the argument array for use with call_user_func_array @param \ReflectionParameter[] $reflection_parameter @param array $arguments @return array @throws InvalidParameterException
[ "Prepares", "the", "argument", "array", "for", "use", "with", "call_user_func_array" ]
1dc221769fd6bc6155181ffc1bdbcb10c698002c
https://github.com/l-x/Fna/blob/1dc221769fd6bc6155181ffc1bdbcb10c698002c/src/Fna/Wrapper.php#L172-L197
238,223
sebardo/ecommerce
EcommerceBundle/Controller/CheckoutController.php
CheckoutController.detailAction
public function detailAction(Request $request) { $cart = $this->getCurrentCart(); $form = $this->createForm('EcommerceBundle\Form\CartType', $cart); return array( 'cart' => $cart, 'form' => $form->createView() ); }
php
public function detailAction(Request $request) { $cart = $this->getCurrentCart(); $form = $this->createForm('EcommerceBundle\Form\CartType', $cart); return array( 'cart' => $cart, 'form' => $form->createView() ); }
[ "public", "function", "detailAction", "(", "Request", "$", "request", ")", "{", "$", "cart", "=", "$", "this", "->", "getCurrentCart", "(", ")", ";", "$", "form", "=", "$", "this", "->", "createForm", "(", "'EcommerceBundle\\Form\\CartType'", ",", "$", "ca...
Displays current cart summary page. The parameters includes the form . @param Request @return Response @Route("/cart/detail") @Template("EcommerceBundle:Checkout/cart:detail.html.twig")
[ "Displays", "current", "cart", "summary", "page", ".", "The", "parameters", "includes", "the", "form", "." ]
3e17545e69993f10a1df17f9887810c7378fc7f9
https://github.com/sebardo/ecommerce/blob/3e17545e69993f10a1df17f9887810c7378fc7f9/EcommerceBundle/Controller/CheckoutController.php#L68-L78
238,224
sebardo/ecommerce
EcommerceBundle/Controller/CheckoutController.php
CheckoutController.addAction
public function addAction(Request $request) { $em = $this->getDoctrine()->getManager(); $coreManager = $this->get('core_manager'); $checkoutManager = $this->get('checkout_manager'); $cart = $this->getCurrentCart(); $emptyItem = new CartItem(); try { ...
php
public function addAction(Request $request) { $em = $this->getDoctrine()->getManager(); $coreManager = $this->get('core_manager'); $checkoutManager = $this->get('checkout_manager'); $cart = $this->getCurrentCart(); $emptyItem = new CartItem(); try { ...
[ "public", "function", "addAction", "(", "Request", "$", "request", ")", "{", "$", "em", "=", "$", "this", "->", "getDoctrine", "(", ")", "->", "getManager", "(", ")", ";", "$", "coreManager", "=", "$", "this", "->", "get", "(", "'core_manager'", ")", ...
Adds item to cart. It uses the resolver service so you can populate the new item instance with proper values based on current request. It redirect to cart summary page by default. @param Request $request @return Response @Route("/cart/add") @Template("EcommerceBundle:Front:detail.html.twig")
[ "Adds", "item", "to", "cart", ".", "It", "uses", "the", "resolver", "service", "so", "you", "can", "populate", "the", "new", "item", "instance", "with", "proper", "values", "based", "on", "current", "request", "." ]
3e17545e69993f10a1df17f9887810c7378fc7f9
https://github.com/sebardo/ecommerce/blob/3e17545e69993f10a1df17f9887810c7378fc7f9/EcommerceBundle/Controller/CheckoutController.php#L93-L125
238,225
sebardo/ecommerce
EcommerceBundle/Controller/CheckoutController.php
CheckoutController.saveAction
public function saveAction(Request $request) { $cart = $this->getCurrentCart(); $form = $this->createForm(CartType::class, $cart); if ($form->handleRequest($request)->isValid()) { $em = $this->getDoctrine()->getManager(); $em->persist($cart); ...
php
public function saveAction(Request $request) { $cart = $this->getCurrentCart(); $form = $this->createForm(CartType::class, $cart); if ($form->handleRequest($request)->isValid()) { $em = $this->getDoctrine()->getManager(); $em->persist($cart); ...
[ "public", "function", "saveAction", "(", "Request", "$", "request", ")", "{", "$", "cart", "=", "$", "this", "->", "getCurrentCart", "(", ")", ";", "$", "form", "=", "$", "this", "->", "createForm", "(", "CartType", "::", "class", ",", "$", "cart", "...
This action is used to submit the cart summary form. If the form and updated cart are valid, it refreshes the cart data and saves it using the operator. If there are any errors, it displays the cart detail page. @param Request $request @return Response @Route("/cart/save") @Template("EcommerceBundle:Front:detail.htm...
[ "This", "action", "is", "used", "to", "submit", "the", "cart", "summary", "form", ".", "If", "the", "form", "and", "updated", "cart", "are", "valid", "it", "refreshes", "the", "cart", "data", "and", "saves", "it", "using", "the", "operator", "." ]
3e17545e69993f10a1df17f9887810c7378fc7f9
https://github.com/sebardo/ecommerce/blob/3e17545e69993f10a1df17f9887810c7378fc7f9/EcommerceBundle/Controller/CheckoutController.php#L140-L167
238,226
sebardo/ecommerce
EcommerceBundle/Controller/CheckoutController.php
CheckoutController.removeAction
public function removeAction($id) { $em = $this->getDoctrine()->getManager(); $cart = $this->getCurrentCart(); $repository = $em->getRepository('EcommerceBundle:CartItem'); $item = $repository->find($id); if (!$item || false === $cart->hasItem($item)) { // Write ...
php
public function removeAction($id) { $em = $this->getDoctrine()->getManager(); $cart = $this->getCurrentCart(); $repository = $em->getRepository('EcommerceBundle:CartItem'); $item = $repository->find($id); if (!$item || false === $cart->hasItem($item)) { // Write ...
[ "public", "function", "removeAction", "(", "$", "id", ")", "{", "$", "em", "=", "$", "this", "->", "getDoctrine", "(", ")", "->", "getManager", "(", ")", ";", "$", "cart", "=", "$", "this", "->", "getCurrentCart", "(", ")", ";", "$", "repository", ...
Removes item from cart. It takes an item id as an argument. If the item is found and the current user cart contains that item, it will be removed and the cart - refreshed and saved. @param mixed $id @return Response @Route("/cart/remove/{id}")
[ "Removes", "item", "from", "cart", ".", "It", "takes", "an", "item", "id", "as", "an", "argument", "." ]
3e17545e69993f10a1df17f9887810c7378fc7f9
https://github.com/sebardo/ecommerce/blob/3e17545e69993f10a1df17f9887810c7378fc7f9/EcommerceBundle/Controller/CheckoutController.php#L181-L200
238,227
sebardo/ecommerce
EcommerceBundle/Controller/CheckoutController.php
CheckoutController.editBillingAction
public function editBillingAction(Request $request) { if($request->isXmlHttpRequest()){ $em = $this->container->get('doctrine')->getManager(); $checkoutManager = $this->container->get('checkout_manager'); /** @var Address $address */ $address = $checkoutManag...
php
public function editBillingAction(Request $request) { if($request->isXmlHttpRequest()){ $em = $this->container->get('doctrine')->getManager(); $checkoutManager = $this->container->get('checkout_manager'); /** @var Address $address */ $address = $checkoutManag...
[ "public", "function", "editBillingAction", "(", "Request", "$", "request", ")", "{", "if", "(", "$", "request", "->", "isXmlHttpRequest", "(", ")", ")", "{", "$", "em", "=", "$", "this", "->", "container", "->", "get", "(", "'doctrine'", ")", "->", "ge...
Edit the billing address @param Request $request @Route("/profile/billing/") @Method({"GET","POST"})
[ "Edit", "the", "billing", "address" ]
3e17545e69993f10a1df17f9887810c7378fc7f9
https://github.com/sebardo/ecommerce/blob/3e17545e69993f10a1df17f9887810c7378fc7f9/EcommerceBundle/Controller/CheckoutController.php#L601-L632
238,228
sebardo/ecommerce
EcommerceBundle/Controller/CheckoutController.php
CheckoutController.setBillingAddressAction
public function setBillingAddressAction($id) { $em = $this->container->get('doctrine')->getManager(); $user = $this->container->get('security.token_storage')->getToken()->getUser(); $address = $em->getRepository('EcommerceBundle:Address') ->findOneBy(array( 'i...
php
public function setBillingAddressAction($id) { $em = $this->container->get('doctrine')->getManager(); $user = $this->container->get('security.token_storage')->getToken()->getUser(); $address = $em->getRepository('EcommerceBundle:Address') ->findOneBy(array( 'i...
[ "public", "function", "setBillingAddressAction", "(", "$", "id", ")", "{", "$", "em", "=", "$", "this", "->", "container", "->", "get", "(", "'doctrine'", ")", "->", "getManager", "(", ")", ";", "$", "user", "=", "$", "this", "->", "container", "->", ...
Set the address as the billing address @param integer $id @throws AccessDeniedException @return RedirectResponse @Route("/profile/delivery/{id}/set-for-billing") @Method("GET") @Template("EcommerceBundle:Profile:Delivery/show.html.twig")
[ "Set", "the", "address", "as", "the", "billing", "address" ]
3e17545e69993f10a1df17f9887810c7378fc7f9
https://github.com/sebardo/ecommerce/blob/3e17545e69993f10a1df17f9887810c7378fc7f9/EcommerceBundle/Controller/CheckoutController.php#L646-L670
238,229
sebardo/ecommerce
EcommerceBundle/Controller/CheckoutController.php
CheckoutController.showDeliveryAction
public function showDeliveryAction() { $em = $this->container->get('doctrine')->getManager(); $user = $this->container->get('security.token_storage')->getToken()->getUser(); $addresses = $em->getRepository('EcommerceBundle:Address') ->findBy(array( 'actor' => ...
php
public function showDeliveryAction() { $em = $this->container->get('doctrine')->getManager(); $user = $this->container->get('security.token_storage')->getToken()->getUser(); $addresses = $em->getRepository('EcommerceBundle:Address') ->findBy(array( 'actor' => ...
[ "public", "function", "showDeliveryAction", "(", ")", "{", "$", "em", "=", "$", "this", "->", "container", "->", "get", "(", "'doctrine'", ")", "->", "getManager", "(", ")", ";", "$", "user", "=", "$", "this", "->", "container", "->", "get", "(", "'s...
Show delivery addresses @return Response @Route("/profile/delivery/") @Method({"GET","POST"}) @Template("EcommerceBundle:Profile:Delivery/show.html.twig")
[ "Show", "delivery", "addresses" ]
3e17545e69993f10a1df17f9887810c7378fc7f9
https://github.com/sebardo/ecommerce/blob/3e17545e69993f10a1df17f9887810c7378fc7f9/EcommerceBundle/Controller/CheckoutController.php#L681-L694
238,230
sebardo/ecommerce
EcommerceBundle/Controller/CheckoutController.php
CheckoutController.newDeliveryAction
public function newDeliveryAction(Request $request) { if($request->isXmlHttpRequest()){ $em = $this->container->get('doctrine')->getManager(); $user = $this->container->get('security.token_storage')->getToken()->getUser(); /** @var Address $address */ $countr...
php
public function newDeliveryAction(Request $request) { if($request->isXmlHttpRequest()){ $em = $this->container->get('doctrine')->getManager(); $user = $this->container->get('security.token_storage')->getToken()->getUser(); /** @var Address $address */ $countr...
[ "public", "function", "newDeliveryAction", "(", "Request", "$", "request", ")", "{", "if", "(", "$", "request", "->", "isXmlHttpRequest", "(", ")", ")", "{", "$", "em", "=", "$", "this", "->", "container", "->", "get", "(", "'doctrine'", ")", "->", "ge...
Add delivery address @param Request $request @return Response @Route("/profile/delivery/new") @Method({"GET","POST"})
[ "Add", "delivery", "address" ]
3e17545e69993f10a1df17f9887810c7378fc7f9
https://github.com/sebardo/ecommerce/blob/3e17545e69993f10a1df17f9887810c7378fc7f9/EcommerceBundle/Controller/CheckoutController.php#L705-L739
238,231
sebardo/ecommerce
EcommerceBundle/Controller/CheckoutController.php
CheckoutController.editDeliveryAction
public function editDeliveryAction(Request $request, $id) { if($request->isXmlHttpRequest()){ $em = $this->container->get('doctrine')->getManager(); $user = $this->container->get('security.token_storage')->getToken()->getUser(); /** @var Address $address */ ...
php
public function editDeliveryAction(Request $request, $id) { if($request->isXmlHttpRequest()){ $em = $this->container->get('doctrine')->getManager(); $user = $this->container->get('security.token_storage')->getToken()->getUser(); /** @var Address $address */ ...
[ "public", "function", "editDeliveryAction", "(", "Request", "$", "request", ",", "$", "id", ")", "{", "if", "(", "$", "request", "->", "isXmlHttpRequest", "(", ")", ")", "{", "$", "em", "=", "$", "this", "->", "container", "->", "get", "(", "'doctrine'...
Edit delivery addresses @param Request $request @param integer $id @throws AccessDeniedException @return Response @Route("/profile/delivery/{id}/edit") @Method({"GET","POST"})
[ "Edit", "delivery", "addresses" ]
3e17545e69993f10a1df17f9887810c7378fc7f9
https://github.com/sebardo/ecommerce/blob/3e17545e69993f10a1df17f9887810c7378fc7f9/EcommerceBundle/Controller/CheckoutController.php#L753-L786
238,232
sebardo/ecommerce
EcommerceBundle/Controller/CheckoutController.php
CheckoutController.deleteDeliveryAction
public function deleteDeliveryAction($id) { $em = $this->container->get('doctrine')->getManager(); $user = $this->container->get('security.token_storage')->getToken()->getUser(); $address = $em->getRepository('EcommerceBundle:Address') ->findOneBy(array( 'id' ...
php
public function deleteDeliveryAction($id) { $em = $this->container->get('doctrine')->getManager(); $user = $this->container->get('security.token_storage')->getToken()->getUser(); $address = $em->getRepository('EcommerceBundle:Address') ->findOneBy(array( 'id' ...
[ "public", "function", "deleteDeliveryAction", "(", "$", "id", ")", "{", "$", "em", "=", "$", "this", "->", "container", "->", "get", "(", "'doctrine'", ")", "->", "getManager", "(", ")", ";", "$", "user", "=", "$", "this", "->", "container", "->", "g...
Delete delivery addresses @param integer $id @throws AccessDeniedException @return RedirectResponse @Route("/profile/delivery/{id}/delete") @Method({"GET","POST"}) @Template("EcommerceBundle:Profile:Delivery/edit.html.twig")
[ "Delete", "delivery", "addresses" ]
3e17545e69993f10a1df17f9887810c7378fc7f9
https://github.com/sebardo/ecommerce/blob/3e17545e69993f10a1df17f9887810c7378fc7f9/EcommerceBundle/Controller/CheckoutController.php#L800-L819
238,233
marando/phpSOFA
src/Marando/IAU/iauBi00.php
iauBi00.Bi00
public static function Bi00(&$dpsibi, &$depsbi, &$dra) { /* The frame bias corrections in longitude and obliquity */ $DPBIAS = -0.041775 * DAS2R; $DEBIAS = -0.0068192 * DAS2R; /* The ICRS RA of the J2000.0 equinox (Chapront et al., 2002) */ $DRA0 = -0.0146 * DAS2R; /* Return the results (which...
php
public static function Bi00(&$dpsibi, &$depsbi, &$dra) { /* The frame bias corrections in longitude and obliquity */ $DPBIAS = -0.041775 * DAS2R; $DEBIAS = -0.0068192 * DAS2R; /* The ICRS RA of the J2000.0 equinox (Chapront et al., 2002) */ $DRA0 = -0.0146 * DAS2R; /* Return the results (which...
[ "public", "static", "function", "Bi00", "(", "&", "$", "dpsibi", ",", "&", "$", "depsbi", ",", "&", "$", "dra", ")", "{", "/* The frame bias corrections in longitude and obliquity */", "$", "DPBIAS", "=", "-", "0.041775", "*", "DAS2R", ";", "$", "DEBIAS", "=...
- - - - - - - - i a u B i 0 0 - - - - - - - - Frame bias components of IAU 2000 precession-nutation models (part of MHB2000 with additions). This function is part of the International Astronomical Union's SOFA (Standards Of Fundamental Astronomy) software collection. Status: canonical model. Returned: dpsibi,depsb...
[ "-", "-", "-", "-", "-", "-", "-", "-", "i", "a", "u", "B", "i", "0", "0", "-", "-", "-", "-", "-", "-", "-", "-" ]
757fa49fe335ae1210eaa7735473fd4388b13f07
https://github.com/marando/phpSOFA/blob/757fa49fe335ae1210eaa7735473fd4388b13f07/src/Marando/IAU/iauBi00.php#L58-L72
238,234
diskerror/Utilities
src/Stack.php
Stack.offsetSet
final public function offsetSet($key, $value) { $key = (string) $key; if ( array_key_exists($key, $this->_stack) ) { throw new \DomainException('Key already exists.'); } $this->_stack[$key] = $value; }
php
final public function offsetSet($key, $value) { $key = (string) $key; if ( array_key_exists($key, $this->_stack) ) { throw new \DomainException('Key already exists.'); } $this->_stack[$key] = $value; }
[ "final", "public", "function", "offsetSet", "(", "$", "key", ",", "$", "value", ")", "{", "$", "key", "=", "(", "string", ")", "$", "key", ";", "if", "(", "array_key_exists", "(", "$", "key", ",", "$", "this", "->", "_stack", ")", ")", "{", "thro...
Sets a value to the new named location with array notation. @param string $key @param mixed $value @throws DomainException
[ "Sets", "a", "value", "to", "the", "new", "named", "location", "with", "array", "notation", "." ]
cc5eec2417f7c2c76a84584ebd5237197dc54236
https://github.com/diskerror/Utilities/blob/cc5eec2417f7c2c76a84584ebd5237197dc54236/src/Stack.php#L100-L109
238,235
webriq/core
module/Paragraph/src/Grid/Paragraph/Model/ContentUri/Paragraph.php
Paragraph.getSiteInfo
protected function getSiteInfo() { if ( null === $this->siteInfo ) { $this->siteInfo = $this->getServiceLocator() ->get( 'SiteInfo' ); } return $this->siteInfo; }
php
protected function getSiteInfo() { if ( null === $this->siteInfo ) { $this->siteInfo = $this->getServiceLocator() ->get( 'SiteInfo' ); } return $this->siteInfo; }
[ "protected", "function", "getSiteInfo", "(", ")", "{", "if", "(", "null", "===", "$", "this", "->", "siteInfo", ")", "{", "$", "this", "->", "siteInfo", "=", "$", "this", "->", "getServiceLocator", "(", ")", "->", "get", "(", "'SiteInfo'", ")", ";", ...
Get cached site-info @return \Zork\Db\SiteInfo
[ "Get", "cached", "site", "-", "info" ]
cfeb6e8a4732561c2215ec94e736c07f9b8bc990
https://github.com/webriq/core/blob/cfeb6e8a4732561c2215ec94e736c07f9b8bc990/module/Paragraph/src/Grid/Paragraph/Model/ContentUri/Paragraph.php#L35-L44
238,236
webriq/core
module/Paragraph/src/Grid/Paragraph/Model/ContentUri/Paragraph.php
Paragraph.getFallbackUri
protected function getFallbackUri( $paragraphId, $absolute = false ) { $uri = '/app/' . $this->locale . '/paragraph/render/' . $paragraphId; if ( $absolute ) { $uri = $this->getSiteInfo() ->getSubdomainUrl( null, $uri ); } return $uri; ...
php
protected function getFallbackUri( $paragraphId, $absolute = false ) { $uri = '/app/' . $this->locale . '/paragraph/render/' . $paragraphId; if ( $absolute ) { $uri = $this->getSiteInfo() ->getSubdomainUrl( null, $uri ); } return $uri; ...
[ "protected", "function", "getFallbackUri", "(", "$", "paragraphId", ",", "$", "absolute", "=", "false", ")", "{", "$", "uri", "=", "'/app/'", ".", "$", "this", "->", "locale", ".", "'/paragraph/render/'", ".", "$", "paragraphId", ";", "if", "(", "$", "ab...
Get fallback uri for a paragraph @param int $paragraphId @param bool $absolute @return string
[ "Get", "fallback", "uri", "for", "a", "paragraph" ]
cfeb6e8a4732561c2215ec94e736c07f9b8bc990
https://github.com/webriq/core/blob/cfeb6e8a4732561c2215ec94e736c07f9b8bc990/module/Paragraph/src/Grid/Paragraph/Model/ContentUri/Paragraph.php#L53-L64
238,237
webriq/core
module/Paragraph/src/Grid/Paragraph/Model/ContentUri/Paragraph.php
Paragraph.getSubdomain
protected function getSubdomain( $subdomainId = null ) { static $subdomains = array(); $siteInfo = $this->getSiteInfo(); if ( empty( $subdomainId ) || $siteInfo->getSubdomainId() == $subdomainId ) { return $siteInfo->getSubdomain(); } if ( ! isset( $subd...
php
protected function getSubdomain( $subdomainId = null ) { static $subdomains = array(); $siteInfo = $this->getSiteInfo(); if ( empty( $subdomainId ) || $siteInfo->getSubdomainId() == $subdomainId ) { return $siteInfo->getSubdomain(); } if ( ! isset( $subd...
[ "protected", "function", "getSubdomain", "(", "$", "subdomainId", "=", "null", ")", "{", "static", "$", "subdomains", "=", "array", "(", ")", ";", "$", "siteInfo", "=", "$", "this", "->", "getSiteInfo", "(", ")", ";", "if", "(", "empty", "(", "$", "s...
Get subdomain by subdomain id @staticvar array $subdomains @param int|null $subdomainId @return string
[ "Get", "subdomain", "by", "subdomain", "id" ]
cfeb6e8a4732561c2215ec94e736c07f9b8bc990
https://github.com/webriq/core/blob/cfeb6e8a4732561c2215ec94e736c07f9b8bc990/module/Paragraph/src/Grid/Paragraph/Model/ContentUri/Paragraph.php#L73-L101
238,238
webriq/core
module/Paragraph/src/Grid/Paragraph/Model/ContentUri/Paragraph.php
Paragraph.getUriForContent
protected function getUriForContent( $contentId, $absolute = false ) { /* @var $model \Grid\Core\Model\Uri\Model */ $service = $this->getServiceLocator(); $model = $service->get( 'Grid\Core\Model\Uri\Model' ); $subdomain = $this->getSiteInfo()->getSubdomainId(); $uri...
php
protected function getUriForContent( $contentId, $absolute = false ) { /* @var $model \Grid\Core\Model\Uri\Model */ $service = $this->getServiceLocator(); $model = $service->get( 'Grid\Core\Model\Uri\Model' ); $subdomain = $this->getSiteInfo()->getSubdomainId(); $uri...
[ "protected", "function", "getUriForContent", "(", "$", "contentId", ",", "$", "absolute", "=", "false", ")", "{", "/* @var $model \\Grid\\Core\\Model\\Uri\\Model */", "$", "service", "=", "$", "this", "->", "getServiceLocator", "(", ")", ";", "$", "model", "=", ...
Get uri for a content paragraph @param int $contentId @param bool $absolute @return string
[ "Get", "uri", "for", "a", "content", "paragraph" ]
cfeb6e8a4732561c2215ec94e736c07f9b8bc990
https://github.com/webriq/core/blob/cfeb6e8a4732561c2215ec94e736c07f9b8bc990/module/Paragraph/src/Grid/Paragraph/Model/ContentUri/Paragraph.php#L110-L139
238,239
webriq/core
module/Paragraph/src/Grid/Paragraph/Model/ContentUri/Paragraph.php
Paragraph.getUriById
protected function getUriById( $paragraphId, $absolute = false ) { /* @var $model \Grid\Paragraph\Model\Paragraph\Model */ $service = $this->getServiceLocator(); $model = $service->get( 'Grid\Paragraph\Model\Paragraph\Model' ); $paragraph = $model->find( $paragraphId ); ...
php
protected function getUriById( $paragraphId, $absolute = false ) { /* @var $model \Grid\Paragraph\Model\Paragraph\Model */ $service = $this->getServiceLocator(); $model = $service->get( 'Grid\Paragraph\Model\Paragraph\Model' ); $paragraph = $model->find( $paragraphId ); ...
[ "protected", "function", "getUriById", "(", "$", "paragraphId", ",", "$", "absolute", "=", "false", ")", "{", "/* @var $model \\Grid\\Paragraph\\Model\\Paragraph\\Model */", "$", "service", "=", "$", "this", "->", "getServiceLocator", "(", ")", ";", "$", "model", ...
Get uri by id @param int $paragraphId @param bool $absolute @return string
[ "Get", "uri", "by", "id" ]
cfeb6e8a4732561c2215ec94e736c07f9b8bc990
https://github.com/webriq/core/blob/cfeb6e8a4732561c2215ec94e736c07f9b8bc990/module/Paragraph/src/Grid/Paragraph/Model/ContentUri/Paragraph.php#L148-L172
238,240
webriq/core
module/Paragraph/src/Grid/Paragraph/Model/ContentUri/Paragraph.php
Paragraph.getUri
public function getUri( $absolute = false ) { if ( empty( $this->contentId ) ) { return '#error-paragraph-missing:contentId'; } if ( 'content' == $this->subType ) { return $this->getUriForContent( $this->contentId, $absolute ); } retu...
php
public function getUri( $absolute = false ) { if ( empty( $this->contentId ) ) { return '#error-paragraph-missing:contentId'; } if ( 'content' == $this->subType ) { return $this->getUriForContent( $this->contentId, $absolute ); } retu...
[ "public", "function", "getUri", "(", "$", "absolute", "=", "false", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "contentId", ")", ")", "{", "return", "'#error-paragraph-missing:contentId'", ";", "}", "if", "(", "'content'", "==", "$", "this", "...
Get uri for a paragraph @param bool $absolute @return string
[ "Get", "uri", "for", "a", "paragraph" ]
cfeb6e8a4732561c2215ec94e736c07f9b8bc990
https://github.com/webriq/core/blob/cfeb6e8a4732561c2215ec94e736c07f9b8bc990/module/Paragraph/src/Grid/Paragraph/Model/ContentUri/Paragraph.php#L180-L193
238,241
tigron/skeleton-core
lib/Skeleton/Core/Web/Session.php
Session.set_sticky
public static function set_sticky($key, $value) { if (self::$sticky === null) { self::$sticky = new \Skeleton\Core\Web\Session\Sticky(); } self::$sticky->$key = $value; }
php
public static function set_sticky($key, $value) { if (self::$sticky === null) { self::$sticky = new \Skeleton\Core\Web\Session\Sticky(); } self::$sticky->$key = $value; }
[ "public", "static", "function", "set_sticky", "(", "$", "key", ",", "$", "value", ")", "{", "if", "(", "self", "::", "$", "sticky", "===", "null", ")", "{", "self", "::", "$", "sticky", "=", "new", "\\", "Skeleton", "\\", "Core", "\\", "Web", "\\",...
Set a sticky session variable @access public @param string $key @param mixed $value
[ "Set", "a", "sticky", "session", "variable" ]
543af3cc44326651e3fed869c13078474b787ecb
https://github.com/tigron/skeleton-core/blob/543af3cc44326651e3fed869c13078474b787ecb/lib/Skeleton/Core/Web/Session.php#L67-L73
238,242
vijityannapon/laravel-logs
src/LogsServiceProvider.php
LogsServiceProvider.registerLogs
protected function registerLogs() { $this->app->singleton('logs', function($app) { $config = $this->app->config->get('logs'); if ($config['adapter'] == 'loggly') { return new Adapters\Loggly(); } elseif ($config['adapter'] == 'stackdriver') { ...
php
protected function registerLogs() { $this->app->singleton('logs', function($app) { $config = $this->app->config->get('logs'); if ($config['adapter'] == 'loggly') { return new Adapters\Loggly(); } elseif ($config['adapter'] == 'stackdriver') { ...
[ "protected", "function", "registerLogs", "(", ")", "{", "$", "this", "->", "app", "->", "singleton", "(", "'logs'", ",", "function", "(", "$", "app", ")", "{", "$", "config", "=", "$", "this", "->", "app", "->", "config", "->", "get", "(", "'logs'", ...
Register logs. @return void
[ "Register", "logs", "." ]
45b29f05b4653ae10cc12ed9c2812a7c06b5b509
https://github.com/vijityannapon/laravel-logs/blob/45b29f05b4653ae10cc12ed9c2812a7c06b5b509/src/LogsServiceProvider.php#L40-L61
238,243
indigophp/indigo-skeleton
classes/Model.php
Model.compile_properties
protected static function compile_properties(array $properties, $defaults = true) { $p = $properties; $properties = []; foreach ($p as $key => $value) { if (is_int($key)) { $key = $value; $value = []; } // Get property defaults if ($defaults and $property = static::property($key, false...
php
protected static function compile_properties(array $properties, $defaults = true) { $p = $properties; $properties = []; foreach ($p as $key => $value) { if (is_int($key)) { $key = $value; $value = []; } // Get property defaults if ($defaults and $property = static::property($key, false...
[ "protected", "static", "function", "compile_properties", "(", "array", "$", "properties", ",", "$", "defaults", "=", "true", ")", "{", "$", "p", "=", "$", "properties", ";", "$", "properties", "=", "[", "]", ";", "foreach", "(", "$", "p", "as", "$", ...
Compiles skeleton properties @param [] $properties @param boolean $defaults @return []
[ "Compiles", "skeleton", "properties" ]
d6fc206d8b8d48ae9812cc9a06ddc9ccfd0a341d
https://github.com/indigophp/indigo-skeleton/blob/d6fc206d8b8d48ae9812cc9a06ddc9ccfd0a341d/classes/Model.php#L52-L75
238,244
indigophp/indigo-skeleton
classes/Model.php
Model.skeleton_properties
public static function skeleton_properties($type) { $class = get_called_class(); if (isset(static::$_skeleton_cached[$class][$type])) { return static::$_skeleton_cached[$class][$type]; } $var = '_' . $type . '_properties'; $properties = []; if (property_exists($class, $var)) { $properties = st...
php
public static function skeleton_properties($type) { $class = get_called_class(); if (isset(static::$_skeleton_cached[$class][$type])) { return static::$_skeleton_cached[$class][$type]; } $var = '_' . $type . '_properties'; $properties = []; if (property_exists($class, $var)) { $properties = st...
[ "public", "static", "function", "skeleton_properties", "(", "$", "type", ")", "{", "$", "class", "=", "get_called_class", "(", ")", ";", "if", "(", "isset", "(", "static", "::", "$", "_skeleton_cached", "[", "$", "class", "]", "[", "$", "type", "]", ")...
Handles property caching @param string $type @return []
[ "Handles", "property", "caching" ]
d6fc206d8b8d48ae9812cc9a06ddc9ccfd0a341d
https://github.com/indigophp/indigo-skeleton/blob/d6fc206d8b8d48ae9812cc9a06ddc9ccfd0a341d/classes/Model.php#L84-L102
238,245
indigophp/indigo-skeleton
classes/Model.php
Model.fieldsets
public static function fieldsets() { $class = get_called_class(); if (array_key_exists($class, static::$_fieldsets_cached)) { return static::$_fieldsets_cached[$class]; } $fieldsets = []; if (property_exists($class, '_fieldsets')) { $fieldsets = []; foreach (static::$_fieldsets as $fieldset ...
php
public static function fieldsets() { $class = get_called_class(); if (array_key_exists($class, static::$_fieldsets_cached)) { return static::$_fieldsets_cached[$class]; } $fieldsets = []; if (property_exists($class, '_fieldsets')) { $fieldsets = []; foreach (static::$_fieldsets as $fieldset ...
[ "public", "static", "function", "fieldsets", "(", ")", "{", "$", "class", "=", "get_called_class", "(", ")", ";", "if", "(", "array_key_exists", "(", "$", "class", ",", "static", "::", "$", "_fieldsets_cached", ")", ")", "{", "return", "static", "::", "$...
Returns the model fieldsets @return []
[ "Returns", "the", "model", "fieldsets" ]
d6fc206d8b8d48ae9812cc9a06ddc9ccfd0a341d
https://github.com/indigophp/indigo-skeleton/blob/d6fc206d8b8d48ae9812cc9a06ddc9ccfd0a341d/classes/Model.php#L139-L180
238,246
indigophp/indigo-skeleton
classes/Model.php
Model.generateInput
protected static function generateInput($field, array $propertyConfig) { $type = \Arr::get($propertyConfig, 'type', 'text'); // Build up a config array to pass to the parent $config = [ 'name' => $field, 'label' => \Arr::get($propertyConfig, 'label', $field), 'attributes' => \Arr::get($prope...
php
protected static function generateInput($field, array $propertyConfig) { $type = \Arr::get($propertyConfig, 'type', 'text'); // Build up a config array to pass to the parent $config = [ 'name' => $field, 'label' => \Arr::get($propertyConfig, 'label', $field), 'attributes' => \Arr::get($prope...
[ "protected", "static", "function", "generateInput", "(", "$", "field", ",", "array", "$", "propertyConfig", ")", "{", "$", "type", "=", "\\", "Arr", "::", "get", "(", "$", "propertyConfig", ",", "'type'", ",", "'text'", ")", ";", "// Build up a config array ...
Processes the given field and returns an element @param string $field Name of the field to add @param [] $propertyConfig Array of any config to be added to the field @return Input Form input
[ "Processes", "the", "given", "field", "and", "returns", "an", "element" ]
d6fc206d8b8d48ae9812cc9a06ddc9ccfd0a341d
https://github.com/indigophp/indigo-skeleton/blob/d6fc206d8b8d48ae9812cc9a06ddc9ccfd0a341d/classes/Model.php#L238-L293
238,247
indigophp/indigo-skeleton
classes/Model.php
Model.generate_filters
public static function generate_filters() { if (static::$builder === null) { static::setBuilder(new Basic); } $form = []; // Loop through and add all fields foreach (static::list_properties() as $field => $config) { $form[] = static::generateInput($field, $config); } return $form; }
php
public static function generate_filters() { if (static::$builder === null) { static::setBuilder(new Basic); } $form = []; // Loop through and add all fields foreach (static::list_properties() as $field => $config) { $form[] = static::generateInput($field, $config); } return $form; }
[ "public", "static", "function", "generate_filters", "(", ")", "{", "if", "(", "static", "::", "$", "builder", "===", "null", ")", "{", "static", "::", "setBuilder", "(", "new", "Basic", ")", ";", "}", "$", "form", "=", "[", "]", ";", "// Loop through a...
Generates filters used in list @return [] Array of form elements
[ "Generates", "filters", "used", "in", "list" ]
d6fc206d8b8d48ae9812cc9a06ddc9ccfd0a341d
https://github.com/indigophp/indigo-skeleton/blob/d6fc206d8b8d48ae9812cc9a06ddc9ccfd0a341d/classes/Model.php#L300-L316
238,248
xcitestudios/php-network
src/Email/EmailBodyPartCollection.php
EmailBodyPartCollection.deserializeJSON
public function deserializeJSON($jsonString) { $data = \json_decode($jsonString); $this->clear(); foreach ($data as $v) { $part = new EmailBodyPart(); $part->updateFromObject($v); $this->add($v); } }
php
public function deserializeJSON($jsonString) { $data = \json_decode($jsonString); $this->clear(); foreach ($data as $v) { $part = new EmailBodyPart(); $part->updateFromObject($v); $this->add($v); } }
[ "public", "function", "deserializeJSON", "(", "$", "jsonString", ")", "{", "$", "data", "=", "\\", "json_decode", "(", "$", "jsonString", ")", ";", "$", "this", "->", "clear", "(", ")", ";", "foreach", "(", "$", "data", "as", "$", "v", ")", "{", "$...
Updates the element implementing this interface using a JSON representation. This means updating the state of this object with that defined in the JSON as opposed to returning a new instance of this object. @param string $jsonString Representation of the object @return void
[ "Updates", "the", "element", "implementing", "this", "interface", "using", "a", "JSON", "representation", ".", "This", "means", "updating", "the", "state", "of", "this", "object", "with", "that", "defined", "in", "the", "JSON", "as", "opposed", "to", "returnin...
4278b7bd5b5cf64ceb08005f6bce18be79b76cd3
https://github.com/xcitestudios/php-network/blob/4278b7bd5b5cf64ceb08005f6bce18be79b76cd3/src/Email/EmailBodyPartCollection.php#L104-L117
238,249
tux-rampage/rampage-php
library/rampage/core/services/LocaleFactory.php
LocaleFactory.findLocale
protected function findLocale() { $locale = null; if (PHP_SAPI == 'cli') { $locale = getenv('LANG'); } else if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) && extension_loaded('intl')) { $locale = \Locale::acceptFromHttp($_SERVER['HTTP_ACCEPT_LANGUAGE']); } ...
php
protected function findLocale() { $locale = null; if (PHP_SAPI == 'cli') { $locale = getenv('LANG'); } else if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) && extension_loaded('intl')) { $locale = \Locale::acceptFromHttp($_SERVER['HTTP_ACCEPT_LANGUAGE']); } ...
[ "protected", "function", "findLocale", "(", ")", "{", "$", "locale", "=", "null", ";", "if", "(", "PHP_SAPI", "==", "'cli'", ")", "{", "$", "locale", "=", "getenv", "(", "'LANG'", ")", ";", "}", "else", "if", "(", "isset", "(", "$", "_SERVER", "[",...
Find the current locale @return string
[ "Find", "the", "current", "locale" ]
1c679b04a6d477e2f8fdb86135e1d9f0c128b1cf
https://github.com/tux-rampage/rampage-php/blob/1c679b04a6d477e2f8fdb86135e1d9f0c128b1cf/library/rampage/core/services/LocaleFactory.php#L42-L53
238,250
pletfix/core
src/Bootstraps/HandleExceptions.php
HandleExceptions.handleShutdown
public function handleShutdown() { $error = error_get_last(); if ($error !== null && $this->isFatal($error['type'])) { $this->handleException(new FatalErrorException($error['message'], $error['type'], 0, $error['file'], $error['line'])); // @codeCoverageIgnore } // @codeCoverageI...
php
public function handleShutdown() { $error = error_get_last(); if ($error !== null && $this->isFatal($error['type'])) { $this->handleException(new FatalErrorException($error['message'], $error['type'], 0, $error['file'], $error['line'])); // @codeCoverageIgnore } // @codeCoverageI...
[ "public", "function", "handleShutdown", "(", ")", "{", "$", "error", "=", "error_get_last", "(", ")", ";", "if", "(", "$", "error", "!==", "null", "&&", "$", "this", "->", "isFatal", "(", "$", "error", "[", "'type'", "]", ")", ")", "{", "$", "this"...
Convert an fatal Error to an FatalErrorException. A fatal Error can not be caught because it is not throwable. The application will be shut down immediately. It will be occur e.g. if you try to call a function which does not exists. @see http://php.net/manual/en/function.set-error-handler.php
[ "Convert", "an", "fatal", "Error", "to", "an", "FatalErrorException", "." ]
974945500f278eb6c1779832e08bbfca1007a7b3
https://github.com/pletfix/core/blob/974945500f278eb6c1779832e08bbfca1007a7b3/src/Bootstraps/HandleExceptions.php#L90-L96
238,251
extendsframework/extends-shell
src/Descriptor/Descriptor.php
Descriptor.getOptionNotation
protected function getOptionNotation(OptionInterface $option): string { $multiple = $option->isMultiple(); $short = $option->getShort(); $long = $option->getLong(); $flag = $option->isFlag(); $notation = ''; if ($short !== null) { $notation .= '-' . $shor...
php
protected function getOptionNotation(OptionInterface $option): string { $multiple = $option->isMultiple(); $short = $option->getShort(); $long = $option->getLong(); $flag = $option->isFlag(); $notation = ''; if ($short !== null) { $notation .= '-' . $shor...
[ "protected", "function", "getOptionNotation", "(", "OptionInterface", "$", "option", ")", ":", "string", "{", "$", "multiple", "=", "$", "option", "->", "isMultiple", "(", ")", ";", "$", "short", "=", "$", "option", "->", "getShort", "(", ")", ";", "$", ...
Get option notation. @param OptionInterface $option @return string
[ "Get", "option", "notation", "." ]
115a38dd7e2af82d56d15407d7955da2d382521b
https://github.com/extendsframework/extends-shell/blob/115a38dd7e2af82d56d15407d7955da2d382521b/src/Descriptor/Descriptor.php#L273-L306
238,252
dotronglong/titan-common
src/Stream.php
Stream.calculateSize
private function calculateSize() { // Clear the stat cache if the stream has a URI if ($this->uri) { clearstatcache(true, $this->uri); } $stats = fstat($this->stream); if (isset($stats[static::META_SIZE])) { $this->size = $stats[static::META_SIZE]; ...
php
private function calculateSize() { // Clear the stat cache if the stream has a URI if ($this->uri) { clearstatcache(true, $this->uri); } $stats = fstat($this->stream); if (isset($stats[static::META_SIZE])) { $this->size = $stats[static::META_SIZE]; ...
[ "private", "function", "calculateSize", "(", ")", "{", "// Clear the stat cache if the stream has a URI", "if", "(", "$", "this", "->", "uri", ")", "{", "clearstatcache", "(", "true", ",", "$", "this", "->", "uri", ")", ";", "}", "$", "stats", "=", "fstat", ...
Calculate current size of stream @return int|null
[ "Calculate", "current", "size", "of", "stream" ]
2970334da25b70100ac15d8fc1459e3a8b8b2a3e
https://github.com/dotronglong/titan-common/blob/2970334da25b70100ac15d8fc1459e3a8b8b2a3e/src/Stream.php#L240-L255
238,253
erikkubica/netlime-theme-megamenu
Menu_Item_Megamenu_Fields_Walker.php
Menu_Item_Megamenu_Fields_Walker.get_fields
protected function get_fields($item, $depth, $args = array(), $id = 0) { ob_start(); /** * Get menu item custom fields from plugins/themes * * @since 0.1.0 * @since 1.0.0 Pass correct parameters. * * @param int $item_id Menu item ID. * ...
php
protected function get_fields($item, $depth, $args = array(), $id = 0) { ob_start(); /** * Get menu item custom fields from plugins/themes * * @since 0.1.0 * @since 1.0.0 Pass correct parameters. * * @param int $item_id Menu item ID. * ...
[ "protected", "function", "get_fields", "(", "$", "item", ",", "$", "depth", ",", "$", "args", "=", "array", "(", ")", ",", "$", "id", "=", "0", ")", "{", "ob_start", "(", ")", ";", "/**\n * Get menu item custom fields from plugins/themes\n *\n ...
Get custom fields @access protected @since 0.1.0 @uses add_action() Calls 'menu_item_custom_fields' hook @param object $item Menu item data object. @param int $depth Depth of menu item. Used for padding. @param array $args Menu item args. @param int $id Nav menu ID. @return string Form fields
[ "Get", "custom", "fields" ]
cd9c364fa8fcf9ca63bb17935f5af215ad234cf1
https://github.com/erikkubica/netlime-theme-megamenu/blob/cd9c364fa8fcf9ca63bb17935f5af215ad234cf1/Menu_Item_Megamenu_Fields_Walker.php#L49-L70
238,254
polary/polary
extensions/yii2-deploy/commands/DeployController.php
DeployController.actionInstall
public function actionInstall() { $this->stdout("Run composer dump-autoload ... "); $this->executeCommand('$ composer dump-autoload'); $this->stdout("[DONE]\n"); $scriptComponent = $this->getScript(); if ($scripts = $scriptComponent->getScript('yii2-yiithings-install-cmd')) ...
php
public function actionInstall() { $this->stdout("Run composer dump-autoload ... "); $this->executeCommand('$ composer dump-autoload'); $this->stdout("[DONE]\n"); $scriptComponent = $this->getScript(); if ($scripts = $scriptComponent->getScript('yii2-yiithings-install-cmd')) ...
[ "public", "function", "actionInstall", "(", ")", "{", "$", "this", "->", "stdout", "(", "\"Run composer dump-autoload ... \"", ")", ";", "$", "this", "->", "executeCommand", "(", "'$ composer dump-autoload'", ")", ";", "$", "this", "->", "stdout", "(", "\"[DONE]...
Run installation.
[ "Run", "installation", "." ]
683212e631e59faedce488f0d2cea82c94a83aae
https://github.com/polary/polary/blob/683212e631e59faedce488f0d2cea82c94a83aae/extensions/yii2-deploy/commands/DeployController.php#L38-L52
238,255
edunola13/utils
handler/SessionHandler/SessionHandlerDB.php
SessionHandlerDB.open
public function open($sessionPath, $sessionName){ //si la sesión no está abierta tengo que abrir conexión a base de datos if(!$this->opened){ $this->connection= new DataBaseAR(FALSE); $this->connection->connect($this->dataBase); $this->opened= TRUE; ...
php
public function open($sessionPath, $sessionName){ //si la sesión no está abierta tengo que abrir conexión a base de datos if(!$this->opened){ $this->connection= new DataBaseAR(FALSE); $this->connection->connect($this->dataBase); $this->opened= TRUE; ...
[ "public", "function", "open", "(", "$", "sessionPath", ",", "$", "sessionName", ")", "{", "//si la sesión no está abierta tengo que abrir conexión a base de datos", "if", "(", "!", "$", "this", "->", "opened", ")", "{", "$", "this", "->", "connection", "=", "new",...
Abre la conexion a la base de datos si no esta abierta @param string $sessionPath @param string $sessionName @return boolean
[ "Abre", "la", "conexion", "a", "la", "base", "de", "datos", "si", "no", "esta", "abierta" ]
6c637731cf805dba465658bbaf5cd8aefa6f8f22
https://github.com/edunola13/utils/blob/6c637731cf805dba465658bbaf5cd8aefa6f8f22/handler/SessionHandler/SessionHandlerDB.php#L44-L55
238,256
edunola13/utils
handler/SessionHandler/SessionHandlerDB.php
SessionHandlerDB.read
public function read($sessionId){ //si la sesión está abierta y tengo lock if($this->opened){ $sql= $this->connection->connection->prepare('SELECT session_data FROM sessions WHERE session_id = :id'); $sql->bindValue('id', $sessionId); $sql->execute(); $re...
php
public function read($sessionId){ //si la sesión está abierta y tengo lock if($this->opened){ $sql= $this->connection->connection->prepare('SELECT session_data FROM sessions WHERE session_id = :id'); $sql->bindValue('id', $sessionId); $sql->execute(); $re...
[ "public", "function", "read", "(", "$", "sessionId", ")", "{", "//si la sesión está abierta y tengo lock ", "if", "(", "$", "this", "->", "opened", ")", "{", "$", "sql", "=", "$", "this", "->", "connection", "->", "connection", "->", "prepare", "(", "'SELECT...
Lee los datos de la session de la base de datos Si no hay nada retorna "" @param string $sessionId @return string
[ "Lee", "los", "datos", "de", "la", "session", "de", "la", "base", "de", "datos", "Si", "no", "hay", "nada", "retorna" ]
6c637731cf805dba465658bbaf5cd8aefa6f8f22
https://github.com/edunola13/utils/blob/6c637731cf805dba465658bbaf5cd8aefa6f8f22/handler/SessionHandler/SessionHandlerDB.php#L71-L86
238,257
edunola13/utils
handler/SessionHandler/SessionHandlerDB.php
SessionHandlerDB.write
public function write($sessionId, $sessionData){ //si la sesión está abierta y tengo lock if($this->opened){ $sql= $this->connection->connection->prepare('REPLACE INTO sessions (session_id, session_data, session_expiration) VALUES(:id, :data, :expiration)'); $sql->bindValue('id'...
php
public function write($sessionId, $sessionData){ //si la sesión está abierta y tengo lock if($this->opened){ $sql= $this->connection->connection->prepare('REPLACE INTO sessions (session_id, session_data, session_expiration) VALUES(:id, :data, :expiration)'); $sql->bindValue('id'...
[ "public", "function", "write", "(", "$", "sessionId", ",", "$", "sessionData", ")", "{", "//si la sesión está abierta y tengo lock ", "if", "(", "$", "this", "->", "opened", ")", "{", "$", "sql", "=", "$", "this", "->", "connection", "->", "connection", "->"...
Escribe los datos de la session en la base de datos @param string $sessionId @param string $sessionData @return boolean
[ "Escribe", "los", "datos", "de", "la", "session", "en", "la", "base", "de", "datos" ]
6c637731cf805dba465658bbaf5cd8aefa6f8f22
https://github.com/edunola13/utils/blob/6c637731cf805dba465658bbaf5cd8aefa6f8f22/handler/SessionHandler/SessionHandlerDB.php#L93-L107
238,258
edunola13/utils
handler/SessionHandler/SessionHandlerDB.php
SessionHandlerDB.destroy
public function destroy($sessionId){ //si la sesión está abierta y tengo lock if($this->opened){ $sql= $this->connection->connection->prepare('DELETE FROM sessions WHERE session_id = :id'); $sql->bindValue('id', $sessionId); return $sql->execute() === TRUE; }...
php
public function destroy($sessionId){ //si la sesión está abierta y tengo lock if($this->opened){ $sql= $this->connection->connection->prepare('DELETE FROM sessions WHERE session_id = :id'); $sql->bindValue('id', $sessionId); return $sql->execute() === TRUE; }...
[ "public", "function", "destroy", "(", "$", "sessionId", ")", "{", "//si la sesión está abierta y tengo lock ", "if", "(", "$", "this", "->", "opened", ")", "{", "$", "sql", "=", "$", "this", "->", "connection", "->", "connection", "->", "prepare", "(", "'DEL...
Destruye los datos e la session de la base de datos @param string $sessionId @return boolean
[ "Destruye", "los", "datos", "e", "la", "session", "de", "la", "base", "de", "datos" ]
6c637731cf805dba465658bbaf5cd8aefa6f8f22
https://github.com/edunola13/utils/blob/6c637731cf805dba465658bbaf5cd8aefa6f8f22/handler/SessionHandler/SessionHandlerDB.php#L113-L123
238,259
edunola13/utils
handler/SessionHandler/SessionHandlerDB.php
SessionHandlerDB.gc
public function gc($lifetime){ //si la sesión está abierta y tengo lock if($this->opened){ $fecha= new \DateTime(); $sql= $this->connection->connection->prepare('DELETE FROM sessions WHERE session_expiration < :fecha'); $sql->bindValue('fecha', $fecha->format('Y-m-d ...
php
public function gc($lifetime){ //si la sesión está abierta y tengo lock if($this->opened){ $fecha= new \DateTime(); $sql= $this->connection->connection->prepare('DELETE FROM sessions WHERE session_expiration < :fecha'); $sql->bindValue('fecha', $fecha->format('Y-m-d ...
[ "public", "function", "gc", "(", "$", "lifetime", ")", "{", "//si la sesión está abierta y tengo lock ", "if", "(", "$", "this", "->", "opened", ")", "{", "$", "fecha", "=", "new", "\\", "DateTime", "(", ")", ";", "$", "sql", "=", "$", "this", "->", "c...
Elimina las session en la que su tiempo de expiration sea menor que el tiempo actual @param int $lifetime @return boolean
[ "Elimina", "las", "session", "en", "la", "que", "su", "tiempo", "de", "expiration", "sea", "menor", "que", "el", "tiempo", "actual" ]
6c637731cf805dba465658bbaf5cd8aefa6f8f22
https://github.com/edunola13/utils/blob/6c637731cf805dba465658bbaf5cd8aefa6f8f22/handler/SessionHandler/SessionHandlerDB.php#L129-L140
238,260
solo-framework/solo-logger
src/Logger.php
Logger.init
public static function init($settings = null) { if (!is_null($settings)) self::$settings = array_replace_recursive(self::$settings, $settings); }
php
public static function init($settings = null) { if (!is_null($settings)) self::$settings = array_replace_recursive(self::$settings, $settings); }
[ "public", "static", "function", "init", "(", "$", "settings", "=", "null", ")", "{", "if", "(", "!", "is_null", "(", "$", "settings", ")", ")", "self", "::", "$", "settings", "=", "array_replace_recursive", "(", "self", "::", "$", "settings", ",", "$",...
Init the logger @param mixed $settings @return void
[ "Init", "the", "logger" ]
2f0a9f789479c4e9ab6ee9fe5817f256eb18db70
https://github.com/solo-framework/solo-logger/blob/2f0a9f789479c4e9ab6ee9fe5817f256eb18db70/src/Logger.php#L117-L121
238,261
angelk/bbCodeBundle
src/Potaka/BbcodeBundle/BbCode/TextToHtml.php
TextToHtml.getHtml
public function getHtml(string $text) : string { $textAsHtml = htmlspecialchars($text, ENT_QUOTES); $textWithNewLines = nl2br($textAsHtml); $tokenized = $this->tokenizer->tokenize($textWithNewLines); $html = $this->bbCode->format($tokenized); return $html; }
php
public function getHtml(string $text) : string { $textAsHtml = htmlspecialchars($text, ENT_QUOTES); $textWithNewLines = nl2br($textAsHtml); $tokenized = $this->tokenizer->tokenize($textWithNewLines); $html = $this->bbCode->format($tokenized); return $html; }
[ "public", "function", "getHtml", "(", "string", "$", "text", ")", ":", "string", "{", "$", "textAsHtml", "=", "htmlspecialchars", "(", "$", "text", ",", "ENT_QUOTES", ")", ";", "$", "textWithNewLines", "=", "nl2br", "(", "$", "textAsHtml", ")", ";", "$",...
Transform string to html escaped string with applied bb-code. @param string $text @return string
[ "Transform", "string", "to", "html", "escaped", "string", "with", "applied", "bb", "-", "code", "." ]
bd5512d2bcddb1bd841469a66ff9af60b3f85f34
https://github.com/angelk/bbCodeBundle/blob/bd5512d2bcddb1bd841469a66ff9af60b3f85f34/src/Potaka/BbcodeBundle/BbCode/TextToHtml.php#L37-L46
238,262
OWeb/OWeb-Framework
OWeb/defaults/controllers/demo/jquery/ui/Tabs.php
Tabs.doRefresh
public function doRefresh(){ //Validating elements. Should be already done but let's say on the safe side $this->form->validateElements(); //If valid apply values to the accordion if($this->form->isValid()){ foreach($this->form->getElements() as $element){ $this->tabs->addParams($element->getName(), ...
php
public function doRefresh(){ //Validating elements. Should be already done but let's say on the safe side $this->form->validateElements(); //If valid apply values to the accordion if($this->form->isValid()){ foreach($this->form->getElements() as $element){ $this->tabs->addParams($element->getName(), ...
[ "public", "function", "doRefresh", "(", ")", "{", "//Validating elements. Should be already done but let's say on the safe side", "$", "this", "->", "form", "->", "validateElements", "(", ")", ";", "//If valid apply values to the accordion", "if", "(", "$", "this", "->", ...
If form returned an action
[ "If", "form", "returned", "an", "action" ]
fb441f51afb16860b0c946a55c36c789fbb125fa
https://github.com/OWeb/OWeb-Framework/blob/fb441f51afb16860b0c946a55c36c789fbb125fa/OWeb/defaults/controllers/demo/jquery/ui/Tabs.php#L56-L66
238,263
mtils/ems-signal
src/Signal/NamedEvent/BusHolderTrait.php
BusHolderTrait.getEventBus
public function getEventBus() { if (!$this->eventBus) { if (isset(static::$staticEventBus)) { return static::$staticEventBus; } $this->eventBus = new Bus; } return $this->eventBus; }
php
public function getEventBus() { if (!$this->eventBus) { if (isset(static::$staticEventBus)) { return static::$staticEventBus; } $this->eventBus = new Bus; } return $this->eventBus; }
[ "public", "function", "getEventBus", "(", ")", "{", "if", "(", "!", "$", "this", "->", "eventBus", ")", "{", "if", "(", "isset", "(", "static", "::", "$", "staticEventBus", ")", ")", "{", "return", "static", "::", "$", "staticEventBus", ";", "}", "$"...
Return the eventBus @return \Signal\Contracts\NamedEvent\Bus
[ "Return", "the", "eventBus" ]
3246eea699dce1a6d6f758bcfc89b20320f6becc
https://github.com/mtils/ems-signal/blob/3246eea699dce1a6d6f758bcfc89b20320f6becc/src/Signal/NamedEvent/BusHolderTrait.php#L20-L29
238,264
setrun/setrun-component-sys
src/components/base/SearchForm.php
SearchForm.createDataProvider
protected function createDataProvider() : ActiveDataProvider { $query = $this->buildQuery(); $dataProvider = new ActiveDataProvider([ 'query' => $query, 'sort' => [ 'defaultOrder' => $this->defaultOrder ] ]); if (!$this->load($th...
php
protected function createDataProvider() : ActiveDataProvider { $query = $this->buildQuery(); $dataProvider = new ActiveDataProvider([ 'query' => $query, 'sort' => [ 'defaultOrder' => $this->defaultOrder ] ]); if (!$this->load($th...
[ "protected", "function", "createDataProvider", "(", ")", ":", "ActiveDataProvider", "{", "$", "query", "=", "$", "this", "->", "buildQuery", "(", ")", ";", "$", "dataProvider", "=", "new", "ActiveDataProvider", "(", "[", "'query'", "=>", "$", "query", ",", ...
Create ActiveDataProvider. @return \yii\data\ActiveDataProvider
[ "Create", "ActiveDataProvider", "." ]
ad9a6442a2921e0f061ed4e455b050c56029d565
https://github.com/setrun/setrun-component-sys/blob/ad9a6442a2921e0f061ed4e455b050c56029d565/src/components/base/SearchForm.php#L164-L185
238,265
setrun/setrun-component-sys
src/components/base/SearchForm.php
SearchForm.requestData
protected function requestData() : array { switch ($this->method) { case 'post': return Yii::$app->request->post(); case 'get': return Yii::$app->request->getQueryParams(); default: throw new InvalidConfigException('Request ...
php
protected function requestData() : array { switch ($this->method) { case 'post': return Yii::$app->request->post(); case 'get': return Yii::$app->request->getQueryParams(); default: throw new InvalidConfigException('Request ...
[ "protected", "function", "requestData", "(", ")", ":", "array", "{", "switch", "(", "$", "this", "->", "method", ")", "{", "case", "'post'", ":", "return", "Yii", "::", "$", "app", "->", "request", "->", "post", "(", ")", ";", "case", "'get'", ":", ...
Get request data params. @return array @throws \yii\base\InvalidConfigException
[ "Get", "request", "data", "params", "." ]
ad9a6442a2921e0f061ed4e455b050c56029d565
https://github.com/setrun/setrun-component-sys/blob/ad9a6442a2921e0f061ed4e455b050c56029d565/src/components/base/SearchForm.php#L211-L221
238,266
setrun/setrun-component-sys
src/components/base/SearchForm.php
SearchForm.filterTimestamp
protected function filterTimestamp(&$query, $attr = 'updated_at') { if (!is_null($this->{$attr}) && strpos($this->{$attr}, ' - ') !== false ) { list($start_date, $end_date) = explode(' - ', $this->{$attr}); $query->andFilterWhere(['>=', $attr, (int)strtotime($start_date)]); ...
php
protected function filterTimestamp(&$query, $attr = 'updated_at') { if (!is_null($this->{$attr}) && strpos($this->{$attr}, ' - ') !== false ) { list($start_date, $end_date) = explode(' - ', $this->{$attr}); $query->andFilterWhere(['>=', $attr, (int)strtotime($start_date)]); ...
[ "protected", "function", "filterTimestamp", "(", "&", "$", "query", ",", "$", "attr", "=", "'updated_at'", ")", "{", "if", "(", "!", "is_null", "(", "$", "this", "->", "{", "$", "attr", "}", ")", "&&", "strpos", "(", "$", "this", "->", "{", "$", ...
Add filter on timestamp. @param string $attr
[ "Add", "filter", "on", "timestamp", "." ]
ad9a6442a2921e0f061ed4e455b050c56029d565
https://github.com/setrun/setrun-component-sys/blob/ad9a6442a2921e0f061ed4e455b050c56029d565/src/components/base/SearchForm.php#L227-L234
238,267
timostamm/pathinfo
src/Path.php
Path.isIn
public function isIn($directory, $cwd = null) { $dir = Path::info($directory); if ($dir->isEmpty()) { throw new \InvalidArgumentException('Directory is empty.'); } $dir = $dir->normalize()->assumeDirectory(); $self = $this->normalize(); if (! $dir->isAbsolute() && is_null($cwd)) { throw new \Inval...
php
public function isIn($directory, $cwd = null) { $dir = Path::info($directory); if ($dir->isEmpty()) { throw new \InvalidArgumentException('Directory is empty.'); } $dir = $dir->normalize()->assumeDirectory(); $self = $this->normalize(); if (! $dir->isAbsolute() && is_null($cwd)) { throw new \Inval...
[ "public", "function", "isIn", "(", "$", "directory", ",", "$", "cwd", "=", "null", ")", "{", "$", "dir", "=", "Path", "::", "info", "(", "$", "directory", ")", ";", "if", "(", "$", "dir", "->", "isEmpty", "(", ")", ")", "{", "throw", "new", "\\...
Tests whether the path is within the given directory. @param string|Path $directory @param string|Path|NULL $cwd @throws \InvalidArgumentException @return boolean
[ "Tests", "whether", "the", "path", "is", "within", "the", "given", "directory", "." ]
da92edbdcbf2862c37225fa92054eab6c01911c3
https://github.com/timostamm/pathinfo/blob/da92edbdcbf2862c37225fa92054eab6c01911c3/src/Path.php#L44-L75
238,268
timostamm/pathinfo
src/Path.php
Path.relativeTo
public function relativeTo($directory, $cwd = null) { $dir = Path::info($directory); if ($dir->isEmpty()) { throw new \InvalidArgumentException('Directory is empty.'); } $dir = $dir->normalize()->assumeDirectory(); $self = $this->normalize()->dir(); if (! $dir->isAbsolute() && is_null($cwd)) { thr...
php
public function relativeTo($directory, $cwd = null) { $dir = Path::info($directory); if ($dir->isEmpty()) { throw new \InvalidArgumentException('Directory is empty.'); } $dir = $dir->normalize()->assumeDirectory(); $self = $this->normalize()->dir(); if (! $dir->isAbsolute() && is_null($cwd)) { thr...
[ "public", "function", "relativeTo", "(", "$", "directory", ",", "$", "cwd", "=", "null", ")", "{", "$", "dir", "=", "Path", "::", "info", "(", "$", "directory", ")", ";", "if", "(", "$", "dir", "->", "isEmpty", "(", ")", ")", "{", "throw", "new",...
Gets the relative path to the given directory. Example: new Path('/var/wwwroot/js/script.js')->relativeTo('/var/wwwroot/') => js/script.js If you provide a working directory, you can use relative paths. new Path('js/script.js')->relativeTo('.', '/var/wwwroot/') => js/script.js If the current path is a directory, it ...
[ "Gets", "the", "relative", "path", "to", "the", "given", "directory", "." ]
da92edbdcbf2862c37225fa92054eab6c01911c3
https://github.com/timostamm/pathinfo/blob/da92edbdcbf2862c37225fa92054eab6c01911c3/src/Path.php#L94-L134
238,269
timostamm/pathinfo
src/Path.php
Path.set
public function set($path) { if (! is_string($path)) { throw new \InvalidArgumentException(); } if ($path === '') { $this->setParts([]); } else { $this->setParts(explode('/', $path)); } return $this; }
php
public function set($path) { if (! is_string($path)) { throw new \InvalidArgumentException(); } if ($path === '') { $this->setParts([]); } else { $this->setParts(explode('/', $path)); } return $this; }
[ "public", "function", "set", "(", "$", "path", ")", "{", "if", "(", "!", "is_string", "(", "$", "path", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", ")", ";", "}", "if", "(", "$", "path", "===", "''", ")", "{", "$", "this...
Set the path. @param string $path @throws \InvalidArgumentException @return self
[ "Set", "the", "path", "." ]
da92edbdcbf2862c37225fa92054eab6c01911c3
https://github.com/timostamm/pathinfo/blob/da92edbdcbf2862c37225fa92054eab6c01911c3/src/Path.php#L202-L213
238,270
timostamm/pathinfo
src/Path.php
Path.isEmpty
public function isEmpty() { if ($this->partCount === 0) { return true; } if ($this->partCount === 1) { return $this->firstPart === ''; } if ($this->partCount === 3 && $this->isStreamWrapped()) { return true; } return false; }
php
public function isEmpty() { if ($this->partCount === 0) { return true; } if ($this->partCount === 1) { return $this->firstPart === ''; } if ($this->partCount === 3 && $this->isStreamWrapped()) { return true; } return false; }
[ "public", "function", "isEmpty", "(", ")", "{", "if", "(", "$", "this", "->", "partCount", "===", "0", ")", "{", "return", "true", ";", "}", "if", "(", "$", "this", "->", "partCount", "===", "1", ")", "{", "return", "$", "this", "->", "firstPart", ...
Is the this path empty? @return boolean
[ "Is", "the", "this", "path", "empty?" ]
da92edbdcbf2862c37225fa92054eab6c01911c3
https://github.com/timostamm/pathinfo/blob/da92edbdcbf2862c37225fa92054eab6c01911c3/src/Path.php#L230-L242
238,271
timostamm/pathinfo
src/Path.php
Path.isStreamWrapped
public function isStreamWrapped() { $maybeStreamWrapped = $this->partCount > 1 && $this->firstPart !== '' && $this->parts[1] === '' && ':' === substr($this->firstPart, -1); if (! $maybeStreamWrapped) { return false; } $name = substr($this->firstPart, 0, -1); return in_array($name, stream_get_wrappers()); ...
php
public function isStreamWrapped() { $maybeStreamWrapped = $this->partCount > 1 && $this->firstPart !== '' && $this->parts[1] === '' && ':' === substr($this->firstPart, -1); if (! $maybeStreamWrapped) { return false; } $name = substr($this->firstPart, 0, -1); return in_array($name, stream_get_wrappers()); ...
[ "public", "function", "isStreamWrapped", "(", ")", "{", "$", "maybeStreamWrapped", "=", "$", "this", "->", "partCount", ">", "1", "&&", "$", "this", "->", "firstPart", "!==", "''", "&&", "$", "this", "->", "parts", "[", "1", "]", "===", "''", "&&", "...
Is this a stream-wrapped path? @see http://php.net/manual/de/class.streamwrapper.php @return boolean
[ "Is", "this", "a", "stream", "-", "wrapped", "path?" ]
da92edbdcbf2862c37225fa92054eab6c01911c3
https://github.com/timostamm/pathinfo/blob/da92edbdcbf2862c37225fa92054eab6c01911c3/src/Path.php#L263-L271
238,272
timostamm/pathinfo
src/Path.php
Path.equals
public function equals($path) { $p = Path::info($path); return $p->normalize()->get() === $this->normalize()->get(); }
php
public function equals($path) { $p = Path::info($path); return $p->normalize()->get() === $this->normalize()->get(); }
[ "public", "function", "equals", "(", "$", "path", ")", "{", "$", "p", "=", "Path", "::", "info", "(", "$", "path", ")", ";", "return", "$", "p", "->", "normalize", "(", ")", "->", "get", "(", ")", "===", "$", "this", "->", "normalize", "(", ")"...
Returns true if both parts are equal after normalization. @param string|Path $path @return boolean
[ "Returns", "true", "if", "both", "parts", "are", "equal", "after", "normalization", "." ]
da92edbdcbf2862c37225fa92054eab6c01911c3
https://github.com/timostamm/pathinfo/blob/da92edbdcbf2862c37225fa92054eab6c01911c3/src/Path.php#L279-L283
238,273
timostamm/pathinfo
src/Path.php
Path.dir
public function dir() { $dir = clone $this; if ($this->lastPart === '') { // already dir } else if ($this->lastPart === '..' || $this->lastPart === '.') { $dir->parts[] = ''; } else { array_pop($dir->parts); $dir->parts[] = ''; } $dir->setParts($dir->parts); return $dir; }
php
public function dir() { $dir = clone $this; if ($this->lastPart === '') { // already dir } else if ($this->lastPart === '..' || $this->lastPart === '.') { $dir->parts[] = ''; } else { array_pop($dir->parts); $dir->parts[] = ''; } $dir->setParts($dir->parts); return $dir; }
[ "public", "function", "dir", "(", ")", "{", "$", "dir", "=", "clone", "$", "this", ";", "if", "(", "$", "this", "->", "lastPart", "===", "''", ")", "{", "// already dir", "}", "else", "if", "(", "$", "this", "->", "lastPart", "===", "'..'", "||", ...
Returns a new path object that points to the dirname part. @return static a new Path object
[ "Returns", "a", "new", "path", "object", "that", "points", "to", "the", "dirname", "part", "." ]
da92edbdcbf2862c37225fa92054eab6c01911c3
https://github.com/timostamm/pathinfo/blob/da92edbdcbf2862c37225fa92054eab6c01911c3/src/Path.php#L290-L303
238,274
timostamm/pathinfo
src/Path.php
Path.resolve
public function resolve($path) { if ($path instanceof Path) { $add = clone $path; } else if (is_string($path)) { $add = new Path($path); } else { throw new \InvalidArgumentException(); } $base = clone $this; if ($base->partCount === 0) { return $add; } if ($add->isAbsolute()) { ret...
php
public function resolve($path) { if ($path instanceof Path) { $add = clone $path; } else if (is_string($path)) { $add = new Path($path); } else { throw new \InvalidArgumentException(); } $base = clone $this; if ($base->partCount === 0) { return $add; } if ($add->isAbsolute()) { ret...
[ "public", "function", "resolve", "(", "$", "path", ")", "{", "if", "(", "$", "path", "instanceof", "Path", ")", "{", "$", "add", "=", "clone", "$", "path", ";", "}", "else", "if", "(", "is_string", "(", "$", "path", ")", ")", "{", "$", "add", "...
Adds a path to the current path and returns the new path object. Example: Resolving 'foo/bar' from the path '/dir' produces '/dir/foo/bar'. Noteworthy special cases: - If the path to resolve is absolute, this absolute path is returned and our current base is dropped. - If the path to resolve is empty, a slash is adde...
[ "Adds", "a", "path", "to", "the", "current", "path", "and", "returns", "the", "new", "path", "object", "." ]
da92edbdcbf2862c37225fa92054eab6c01911c3
https://github.com/timostamm/pathinfo/blob/da92edbdcbf2862c37225fa92054eab6c01911c3/src/Path.php#L381-L413
238,275
firelit/firelit-framework
src/Router.php
Router.triggerError
public function triggerError($errorCode, $errorMessage = '') { $callError = $errorCode; if (!isset($this->error[$errorCode]) || !is_callable($this->error[$errorCode])) { if (isset($this->error[0]) && is_callable($this->error[0])) { $callError = 0; } else { ...
php
public function triggerError($errorCode, $errorMessage = '') { $callError = $errorCode; if (!isset($this->error[$errorCode]) || !is_callable($this->error[$errorCode])) { if (isset($this->error[0]) && is_callable($this->error[0])) { $callError = 0; } else { ...
[ "public", "function", "triggerError", "(", "$", "errorCode", ",", "$", "errorMessage", "=", "''", ")", "{", "$", "callError", "=", "$", "errorCode", ";", "if", "(", "!", "isset", "(", "$", "this", "->", "error", "[", "$", "errorCode", "]", ")", "||",...
Trigger an error route based on the error code and exit script with that error code @param int $errorCode @param string $errorMessage @return void
[ "Trigger", "an", "error", "route", "based", "on", "the", "error", "code", "and", "exit", "script", "with", "that", "error", "code" ]
308639d40391dd82b45038e35d5e3589d2666886
https://github.com/firelit/firelit-framework/blob/308639d40391dd82b45038e35d5e3589d2666886/src/Router.php#L217-L238
238,276
0x20h/phloppy
src/Client/Producer.php
Producer.addJob
public function addJob($queue, Job $job, $maxlen = 0, $async = false) { $command = [ 'ADDJOB', $queue, $job->getBody(), $this->getReplicationTimeout(), 'REPLICATE', $this->getReplicationFactor(), 'DELAY', $job->getDelay(), '...
php
public function addJob($queue, Job $job, $maxlen = 0, $async = false) { $command = [ 'ADDJOB', $queue, $job->getBody(), $this->getReplicationTimeout(), 'REPLICATE', $this->getReplicationFactor(), 'DELAY', $job->getDelay(), '...
[ "public", "function", "addJob", "(", "$", "queue", ",", "Job", "$", "job", ",", "$", "maxlen", "=", "0", ",", "$", "async", "=", "false", ")", "{", "$", "command", "=", "[", "'ADDJOB'", ",", "$", "queue", ",", "$", "job", "->", "getBody", "(", ...
Enqueue the given job. @param string $queue @param Job $job @param int $maxlen specifies that if there are already count messages queued for the specified queue name, the message is refused and an error reported to the client. @oaram bool $async asks the server to let the command return ASAP and replicate the ...
[ "Enqueue", "the", "given", "job", "." ]
d917f0578360395899bd583724046d36ac459535
https://github.com/0x20h/phloppy/blob/d917f0578360395899bd583724046d36ac459535/src/Client/Producer.php#L39-L65
238,277
GrupaZero/core
src/Gzero/Core/Http/Controllers/Api/FileController.php
FileController.show
public function show($id) { $file = $this->repository->getById($id); if (!$file) { return $this->errorNotFound(); } $this->authorize('read', $file); return new FileResource($file); }
php
public function show($id) { $file = $this->repository->getById($id); if (!$file) { return $this->errorNotFound(); } $this->authorize('read', $file); return new FileResource($file); }
[ "public", "function", "show", "(", "$", "id", ")", "{", "$", "file", "=", "$", "this", "->", "repository", "->", "getById", "(", "$", "id", ")", ";", "if", "(", "!", "$", "file", ")", "{", "return", "$", "this", "->", "errorNotFound", "(", ")", ...
Display a specified file. @SWG\Get( path="/files/{id}", tags={"files"}, summary="Returns a specific file by id", description="Returns a specific file by id", produces={"application/json"}, security={{"AdminAccess": {}}}, @SWG\Parameter( name="id", in="path", description="Id of file that needs to be returned.", require...
[ "Display", "a", "specified", "file", "." ]
093e515234fa0385b259ba4d8bc7832174a44eab
https://github.com/GrupaZero/core/blob/093e515234fa0385b259ba4d8bc7832174a44eab/src/Gzero/Core/Http/Controllers/Api/FileController.php#L204-L214
238,278
HeroicTeam/m
Html/Table.php
Table.setHeading
public function setHeading($column) { $columns = is_array($column) ? $column : func_get_args(); $this->_head = array_values($columns); return $this; }
php
public function setHeading($column) { $columns = is_array($column) ? $column : func_get_args(); $this->_head = array_values($columns); return $this; }
[ "public", "function", "setHeading", "(", "$", "column", ")", "{", "$", "columns", "=", "is_array", "(", "$", "column", ")", "?", "$", "column", ":", "func_get_args", "(", ")", ";", "$", "this", "->", "_head", "=", "array_values", "(", "$", "columns", ...
Set the columns for the table heading. @param string|array $column @return \m\Html\Table
[ "Set", "the", "columns", "for", "the", "table", "heading", "." ]
daa6d5956ee6c989379fe5fae39feccc59cf4add
https://github.com/HeroicTeam/m/blob/daa6d5956ee6c989379fe5fae39feccc59cf4add/Html/Table.php#L30-L37
238,279
HeroicTeam/m
Html/Table.php
Table.setRow
public function setRow($column) { $columns = is_array($column) ? $column : func_get_args(); // If this is a sequential array if (array_keys($columns) === range(0, count($columns) - 1)) { $assocArray = array(); for($i=0;$i<count($this...
php
public function setRow($column) { $columns = is_array($column) ? $column : func_get_args(); // If this is a sequential array if (array_keys($columns) === range(0, count($columns) - 1)) { $assocArray = array(); for($i=0;$i<count($this...
[ "public", "function", "setRow", "(", "$", "column", ")", "{", "$", "columns", "=", "is_array", "(", "$", "column", ")", "?", "$", "column", ":", "func_get_args", "(", ")", ";", "// If this is a sequential array", "if", "(", "array_keys", "(", "$", "columns...
Sets the colums for a table row. @param string|array $column @return \m\Html\Table
[ "Sets", "the", "colums", "for", "a", "table", "row", "." ]
daa6d5956ee6c989379fe5fae39feccc59cf4add
https://github.com/HeroicTeam/m/blob/daa6d5956ee6c989379fe5fae39feccc59cf4add/Html/Table.php#L55-L75
238,280
HeroicTeam/m
Html/Table.php
Table.setRows
public function setRows(array $rows) { if (isset($rows['_head'])) { $this->setHeading($rows['_head']); unset($rows['_head']); } if (!empty($rows)) { foreach($rows as $row) { $this->setRow($row); } } ...
php
public function setRows(array $rows) { if (isset($rows['_head'])) { $this->setHeading($rows['_head']); unset($rows['_head']); } if (!empty($rows)) { foreach($rows as $row) { $this->setRow($row); } } ...
[ "public", "function", "setRows", "(", "array", "$", "rows", ")", "{", "if", "(", "isset", "(", "$", "rows", "[", "'_head'", "]", ")", ")", "{", "$", "this", "->", "setHeading", "(", "$", "rows", "[", "'_head'", "]", ")", ";", "unset", "(", "$", ...
Set several rows at once. You can also set the heading by providing an array item with the key of "_head". @param array $rows @return \m\Html\Table
[ "Set", "several", "rows", "at", "once", ".", "You", "can", "also", "set", "the", "heading", "by", "providing", "an", "array", "item", "with", "the", "key", "of", "_head", "." ]
daa6d5956ee6c989379fe5fae39feccc59cf4add
https://github.com/HeroicTeam/m/blob/daa6d5956ee6c989379fe5fae39feccc59cf4add/Html/Table.php#L96-L110
238,281
HeroicTeam/m
Html/Table.php
Table.render
public function render() { // Render the table container $output = "<table {$this->renderAttributes()} >\n\t<tbody>\n"; // Render the heading $output .= "\t\t<th>\n"; foreach ($this->_head as $heading) { $output .= "\t\t\t<t...
php
public function render() { // Render the table container $output = "<table {$this->renderAttributes()} >\n\t<tbody>\n"; // Render the heading $output .= "\t\t<th>\n"; foreach ($this->_head as $heading) { $output .= "\t\t\t<t...
[ "public", "function", "render", "(", ")", "{", "// Render the table container", "$", "output", "=", "\"<table {$this->renderAttributes()} >\\n\\t<tbody>\\n\"", ";", "// Render the heading", "$", "output", ".=", "\"\\t\\t<th>\\n\"", ";", "foreach", "(", "$", "this", "->", ...
Renders the table and returns it as a string. @return string
[ "Renders", "the", "table", "and", "returns", "it", "as", "a", "string", "." ]
daa6d5956ee6c989379fe5fae39feccc59cf4add
https://github.com/HeroicTeam/m/blob/daa6d5956ee6c989379fe5fae39feccc59cf4add/Html/Table.php#L162-L224
238,282
WellCommerce/Form
Elements/AbstractNode.php
AbstractNode.getElementType
protected function getElementType() { $class = $this->getElementClass($this); $parts = explode('\\', $class); $type = end($parts); $replace = '$1_$2'; return ctype_lower($type) ? $type : strtolower(preg_replace('/(.)([A-Z])/', $replace, $type)); }
php
protected function getElementType() { $class = $this->getElementClass($this); $parts = explode('\\', $class); $type = end($parts); $replace = '$1_$2'; return ctype_lower($type) ? $type : strtolower(preg_replace('/(.)([A-Z])/', $replace, $type)); }
[ "protected", "function", "getElementType", "(", ")", "{", "$", "class", "=", "$", "this", "->", "getElementClass", "(", "$", "this", ")", ";", "$", "parts", "=", "explode", "(", "'\\\\'", ",", "$", "class", ")", ";", "$", "type", "=", "end", "(", "...
Returns friendly element type used for example in Twig macros @return mixed|string
[ "Returns", "friendly", "element", "type", "used", "for", "example", "in", "Twig", "macros" ]
dad15dbdcf1d13f927fa86f5198bcb6abed1974a
https://github.com/WellCommerce/Form/blob/dad15dbdcf1d13f927fa86f5198bcb6abed1974a/Elements/AbstractNode.php#L183-L191
238,283
WellCommerce/Form
Elements/AbstractNode.php
AbstractNode.getJavascriptNodeName
protected function getJavascriptNodeName(ElementInterface $element) { $class = $this->getElementClass($element); $parts = explode('\\', $class); return 'GForm' . end($parts); }
php
protected function getJavascriptNodeName(ElementInterface $element) { $class = $this->getElementClass($element); $parts = explode('\\', $class); return 'GForm' . end($parts); }
[ "protected", "function", "getJavascriptNodeName", "(", "ElementInterface", "$", "element", ")", "{", "$", "class", "=", "$", "this", "->", "getElementClass", "(", "$", "element", ")", ";", "$", "parts", "=", "explode", "(", "'\\\\'", ",", "$", "class", ")"...
Returns element javascript-friendly name @param ElementInterface $element @return string
[ "Returns", "element", "javascript", "-", "friendly", "name" ]
dad15dbdcf1d13f927fa86f5198bcb6abed1974a
https://github.com/WellCommerce/Form/blob/dad15dbdcf1d13f927fa86f5198bcb6abed1974a/Elements/AbstractNode.php#L223-L229
238,284
arvici/framework
src/Arvici/Heart/Config/Configuration.php
Configuration.define
public static function define($section, \Closure $closure) { $config = call_user_func($closure, self::getInstance()); if (! is_array($config)) { throw new \Exception("You should return an array in the Configuration::define closure!"); } self::getInstance()->add($section,...
php
public static function define($section, \Closure $closure) { $config = call_user_func($closure, self::getInstance()); if (! is_array($config)) { throw new \Exception("You should return an array in the Configuration::define closure!"); } self::getInstance()->add($section,...
[ "public", "static", "function", "define", "(", "$", "section", ",", "\\", "Closure", "$", "closure", ")", "{", "$", "config", "=", "call_user_func", "(", "$", "closure", ",", "self", "::", "getInstance", "(", ")", ")", ";", "if", "(", "!", "is_array", ...
Define multiple configuration keys and values in a closure. @param string $section Section to define. @param \Closure $closure Function (inline) that will return the values. @throws \Exception
[ "Define", "multiple", "configuration", "keys", "and", "values", "in", "a", "closure", "." ]
4d0933912fef8f9edc756ef1ace009e96d9fc4b1
https://github.com/arvici/framework/blob/4d0933912fef8f9edc756ef1ace009e96d9fc4b1/src/Arvici/Heart/Config/Configuration.php#L57-L65
238,285
arvici/framework
src/Arvici/Heart/Config/Configuration.php
Configuration.getSection
public function getSection($section, $default = -1) { // Return if section is defined. if (isset($this->config[$section])) { return $this->config[$section]; } if ($default !== -1) { return $default; } // Find the default value (in default conf...
php
public function getSection($section, $default = -1) { // Return if section is defined. if (isset($this->config[$section])) { return $this->config[$section]; } if ($default !== -1) { return $default; } // Find the default value (in default conf...
[ "public", "function", "getSection", "(", "$", "section", ",", "$", "default", "=", "-", "1", ")", "{", "// Return if section is defined.", "if", "(", "isset", "(", "$", "this", "->", "config", "[", "$", "section", "]", ")", ")", "{", "return", "$", "th...
Get the whole set of the configuration section. @param string $section section name. @param mixed $default default value when undefined. Leave undefined to use the build-in defined defaults for the section. @return mixed @codeCoverageIgnore ignore due to a coverage bug.
[ "Get", "the", "whole", "set", "of", "the", "configuration", "section", "." ]
4d0933912fef8f9edc756ef1ace009e96d9fc4b1
https://github.com/arvici/framework/blob/4d0933912fef8f9edc756ef1ace009e96d9fc4b1/src/Arvici/Heart/Config/Configuration.php#L133-L147
238,286
arvici/framework
src/Arvici/Heart/Config/Configuration.php
Configuration.add
public function add($section, $config = array()) { if (! isset($this->config[$section])) { $this->config[$section] = array(); } $this->config[$section] = array_merge($this->config[$section], $config); }
php
public function add($section, $config = array()) { if (! isset($this->config[$section])) { $this->config[$section] = array(); } $this->config[$section] = array_merge($this->config[$section], $config); }
[ "public", "function", "add", "(", "$", "section", ",", "$", "config", "=", "array", "(", ")", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "config", "[", "$", "section", "]", ")", ")", "{", "$", "this", "->", "config", "[", "$", ...
Add section data to the configuration. @param string $section @param array $config
[ "Add", "section", "data", "to", "the", "configuration", "." ]
4d0933912fef8f9edc756ef1ace009e96d9fc4b1
https://github.com/arvici/framework/blob/4d0933912fef8f9edc756ef1ace009e96d9fc4b1/src/Arvici/Heart/Config/Configuration.php#L155-L162
238,287
arvici/framework
src/Arvici/Heart/Config/Configuration.php
Configuration.doGetSection
private function doGetSection($section) { return isset($this->config[$section]) ? $this->config[$section] : null; }
php
private function doGetSection($section) { return isset($this->config[$section]) ? $this->config[$section] : null; }
[ "private", "function", "doGetSection", "(", "$", "section", ")", "{", "return", "isset", "(", "$", "this", "->", "config", "[", "$", "section", "]", ")", "?", "$", "this", "->", "config", "[", "$", "section", "]", ":", "null", ";", "}" ]
Get section configuration data. @deprecated Since 1.2.0. Will be removed in 2.0.0. @param string $section @return array|null @codeCoverageIgnore
[ "Get", "section", "configuration", "data", "." ]
4d0933912fef8f9edc756ef1ace009e96d9fc4b1
https://github.com/arvici/framework/blob/4d0933912fef8f9edc756ef1ace009e96d9fc4b1/src/Arvici/Heart/Config/Configuration.php#L184-L187
238,288
mvccore/ext-router-extended
src/MvcCore/Ext/Routers/Extendeds/Preparing.php
Preparing.prepare
protected function prepare () { $request = & $this->request; // store original path value for later use $request->SetOriginalPath($request->GetPath(TRUE)); // switching media site version and targeting localized version // will be only by GET method, other methods are not very useful // to localize or t...
php
protected function prepare () { $request = & $this->request; // store original path value for later use $request->SetOriginalPath($request->GetPath(TRUE)); // switching media site version and targeting localized version // will be only by GET method, other methods are not very useful // to localize or t...
[ "protected", "function", "prepare", "(", ")", "{", "$", "request", "=", "&", "$", "this", "->", "request", ";", "// store original path value for later use", "$", "request", "->", "SetOriginalPath", "(", "$", "request", "->", "GetPath", "(", "TRUE", ")", ")", ...
Prepare extended router media site version or localization processing. @return void
[ "Prepare", "extended", "router", "media", "site", "version", "or", "localization", "processing", "." ]
39f95c1242509edae3b973db70364d7cdc61f2f5
https://github.com/mvccore/ext-router-extended/blob/39f95c1242509edae3b973db70364d7cdc61f2f5/src/MvcCore/Ext/Routers/Extendeds/Preparing.php#L31-L64
238,289
mvccore/ext-router-extended
src/MvcCore/Ext/Routers/Extendeds/Preparing.php
Preparing.setUpSession
protected function setUpSession () { if ($this->session === NULL) { $sessionClass = $this->application->GetSessionClass(); $selfClass = version_compare(PHP_VERSION, '5.5', '>') ? self::class : __CLASS__; $this->session = $sessionClass::GetNamespace($selfClass); $this->session->SetExpirationSeconds($this->...
php
protected function setUpSession () { if ($this->session === NULL) { $sessionClass = $this->application->GetSessionClass(); $selfClass = version_compare(PHP_VERSION, '5.5', '>') ? self::class : __CLASS__; $this->session = $sessionClass::GetNamespace($selfClass); $this->session->SetExpirationSeconds($this->...
[ "protected", "function", "setUpSession", "(", ")", "{", "if", "(", "$", "this", "->", "session", "===", "NULL", ")", "{", "$", "sessionClass", "=", "$", "this", "->", "application", "->", "GetSessionClass", "(", ")", ";", "$", "selfClass", "=", "version_...
If session namespace by this class is not initialized, initialize session namespace under this class name and move expiration to configured value. @return void
[ "If", "session", "namespace", "by", "this", "class", "is", "not", "initialized", "initialize", "session", "namespace", "under", "this", "class", "name", "and", "move", "expiration", "to", "configured", "value", "." ]
39f95c1242509edae3b973db70364d7cdc61f2f5
https://github.com/mvccore/ext-router-extended/blob/39f95c1242509edae3b973db70364d7cdc61f2f5/src/MvcCore/Ext/Routers/Extendeds/Preparing.php#L72-L79
238,290
Innmind/neo4j-onm
src/RepositoryFactory.php
RepositoryFactory.register
private function register( Entity $meta, Repository $repository ): self { $this->repositories = $this->repositories->put( $meta, $repository ); return $this; }
php
private function register( Entity $meta, Repository $repository ): self { $this->repositories = $this->repositories->put( $meta, $repository ); return $this; }
[ "private", "function", "register", "(", "Entity", "$", "meta", ",", "Repository", "$", "repository", ")", ":", "self", "{", "$", "this", "->", "repositories", "=", "$", "this", "->", "repositories", "->", "put", "(", "$", "meta", ",", "$", "repository", ...
Register a new repository instance To be used in case the repository can't be instanciated automatically
[ "Register", "a", "new", "repository", "instance" ]
816216802a9716bb5f20cc38336313b043bf764c
https://github.com/Innmind/neo4j-onm/blob/816216802a9716bb5f20cc38336313b043bf764c/src/RepositoryFactory.php#L74-L84
238,291
popy-dev/popy-calendar
src/Parser/SymbolParser/Chain.php
Chain.addParser
public function addParser(SymbolParserInterface $parser) { if ($parser instanceof self) { // Reducing recursivity $this->addParsers($parser->parsers); } else { $this->parsers[] = $parser; } return $this; }
php
public function addParser(SymbolParserInterface $parser) { if ($parser instanceof self) { // Reducing recursivity $this->addParsers($parser->parsers); } else { $this->parsers[] = $parser; } return $this; }
[ "public", "function", "addParser", "(", "SymbolParserInterface", "$", "parser", ")", "{", "if", "(", "$", "parser", "instanceof", "self", ")", "{", "// Reducing recursivity", "$", "this", "->", "addParsers", "(", "$", "parser", "->", "parsers", ")", ";", "}"...
Adds a Parser to the chain. @param SymbolParserInterface $parser
[ "Adds", "a", "Parser", "to", "the", "chain", "." ]
989048be18451c813cfce926229c6aaddd1b0639
https://github.com/popy-dev/popy-calendar/blob/989048be18451c813cfce926229c6aaddd1b0639/src/Parser/SymbolParser/Chain.php#L40-L50
238,292
scholtz/AsyncWeb
src/AsyncWeb/Storage/Session.php
Session.set
public static function set($var, $value) { // var_dump($var." ".$value); Session::init(true); if (!Session::check_checksum()) return false; $_SESSION[$var] = $value; $_SESSION[__SESSION_checksum_var] = Session::make_checksum(); return $value; }
php
public static function set($var, $value) { // var_dump($var." ".$value); Session::init(true); if (!Session::check_checksum()) return false; $_SESSION[$var] = $value; $_SESSION[__SESSION_checksum_var] = Session::make_checksum(); return $value; }
[ "public", "static", "function", "set", "(", "$", "var", ",", "$", "value", ")", "{", "// \tvar_dump($var.\" \".$value);", "Session", "::", "init", "(", "true", ")", ";", "if", "(", "!", "Session", "::", "check_checksum", "(", ")", ")", "return", "false", ...
Nastavi session premennu @param string $var @param string $value
[ "Nastavi", "session", "premennu" ]
66a906298080c2c66d8f0fb85211b6100b3776bf
https://github.com/scholtz/AsyncWeb/blob/66a906298080c2c66d8f0fb85211b6100b3776bf/src/AsyncWeb/Storage/Session.php#L191-L198
238,293
scholtz/AsyncWeb
src/AsyncWeb/Storage/Session.php
Session._unset
public static function _unset($var) { Session::init(true); if (!Session::check_checksum()) return false; unset($_SESSION[$var]); $_SESSION[__SESSION_checksum_var] = Session::make_checksum(); return true; }
php
public static function _unset($var) { Session::init(true); if (!Session::check_checksum()) return false; unset($_SESSION[$var]); $_SESSION[__SESSION_checksum_var] = Session::make_checksum(); return true; }
[ "public", "static", "function", "_unset", "(", "$", "var", ")", "{", "Session", "::", "init", "(", "true", ")", ";", "if", "(", "!", "Session", "::", "check_checksum", "(", ")", ")", "return", "false", ";", "unset", "(", "$", "_SESSION", "[", "$", ...
Odstrani session premennu @param unknown_type $var @return unknown
[ "Odstrani", "session", "premennu" ]
66a906298080c2c66d8f0fb85211b6100b3776bf
https://github.com/scholtz/AsyncWeb/blob/66a906298080c2c66d8f0fb85211b6100b3776bf/src/AsyncWeb/Storage/Session.php#L205-L211
238,294
scholtz/AsyncWeb
src/AsyncWeb/Storage/Session.php
Session.make_checksum
private static function make_checksum() { $ret = ""; $_SESSION[__SESSION_time_var] = \AsyncWeb\Date\Time::get(); if (isset($_SESSION) && is_array($_SESSION)) foreach ($_SESSION as $s => $v) { if ($s != __SESSION_checksum_var) { $ret = md5($ret . $s); } ...
php
private static function make_checksum() { $ret = ""; $_SESSION[__SESSION_time_var] = \AsyncWeb\Date\Time::get(); if (isset($_SESSION) && is_array($_SESSION)) foreach ($_SESSION as $s => $v) { if ($s != __SESSION_checksum_var) { $ret = md5($ret . $s); } ...
[ "private", "static", "function", "make_checksum", "(", ")", "{", "$", "ret", "=", "\"\"", ";", "$", "_SESSION", "[", "__SESSION_time_var", "]", "=", "\\", "AsyncWeb", "\\", "Date", "\\", "Time", "::", "get", "(", ")", ";", "if", "(", "isset", "(", "$...
Vytvori md5 session checksum @return string32 session checksum
[ "Vytvori", "md5", "session", "checksum" ]
66a906298080c2c66d8f0fb85211b6100b3776bf
https://github.com/scholtz/AsyncWeb/blob/66a906298080c2c66d8f0fb85211b6100b3776bf/src/AsyncWeb/Storage/Session.php#L251-L261
238,295
mszewcz/php-light-framework
src/Validator/Specific/Isbn.php
Isbn.validateIsbn10
private function validateIsbn10(): bool { $value = \str_replace(['-', ' '], '', $this->value); if (!\preg_match($this->patterns['isbn10-basic'], $value)) { $this->setError(self::VALIDATOR_ERROR_ISBN_INCORRECT_FORMAT); return false; } $sum = 0; for ($i...
php
private function validateIsbn10(): bool { $value = \str_replace(['-', ' '], '', $this->value); if (!\preg_match($this->patterns['isbn10-basic'], $value)) { $this->setError(self::VALIDATOR_ERROR_ISBN_INCORRECT_FORMAT); return false; } $sum = 0; for ($i...
[ "private", "function", "validateIsbn10", "(", ")", ":", "bool", "{", "$", "value", "=", "\\", "str_replace", "(", "[", "'-'", ",", "' '", "]", ",", "''", ",", "$", "this", "->", "value", ")", ";", "if", "(", "!", "\\", "preg_match", "(", "$", "th...
Validates ISBN-10 number @return bool
[ "Validates", "ISBN", "-", "10", "number" ]
4d3b46781c387202c2dfbdb8760151b3ae8ef49c
https://github.com/mszewcz/php-light-framework/blob/4d3b46781c387202c2dfbdb8760151b3ae8ef49c/src/Validator/Specific/Isbn.php#L49-L73
238,296
mszewcz/php-light-framework
src/Validator/Specific/Isbn.php
Isbn.validateAuto
private function validateAuto(): bool { if (\preg_match($this->patterns['isbn13-basic'], $this->value)) { return $this->validateIsbn13(); } if (\preg_match($this->patterns['isbn13-separated'], $this->value) && \strlen($this->value) == 17) { return $this->validateIsbn1...
php
private function validateAuto(): bool { if (\preg_match($this->patterns['isbn13-basic'], $this->value)) { return $this->validateIsbn13(); } if (\preg_match($this->patterns['isbn13-separated'], $this->value) && \strlen($this->value) == 17) { return $this->validateIsbn1...
[ "private", "function", "validateAuto", "(", ")", ":", "bool", "{", "if", "(", "\\", "preg_match", "(", "$", "this", "->", "patterns", "[", "'isbn13-basic'", "]", ",", "$", "this", "->", "value", ")", ")", "{", "return", "$", "this", "->", "validateIsbn...
Validates ISBN number with auto format detection @return bool
[ "Validates", "ISBN", "number", "with", "auto", "format", "detection" ]
4d3b46781c387202c2dfbdb8760151b3ae8ef49c
https://github.com/mszewcz/php-light-framework/blob/4d3b46781c387202c2dfbdb8760151b3ae8ef49c/src/Validator/Specific/Isbn.php#L106-L123
238,297
jaeger-app/exceptions
src/Exception.php
Exception.logException
public function logException(\Exception $e) { $error = $e->getMessage() . $e->getTraceAsString(); return $this->logEmergency($error); }
php
public function logException(\Exception $e) { $error = $e->getMessage() . $e->getTraceAsString(); return $this->logEmergency($error); }
[ "public", "function", "logException", "(", "\\", "Exception", "$", "e", ")", "{", "$", "error", "=", "$", "e", "->", "getMessage", "(", ")", ".", "$", "e", "->", "getTraceAsString", "(", ")", ";", "return", "$", "this", "->", "logEmergency", "(", "$"...
Logs an exeption @param \Exception $e @return bool
[ "Logs", "an", "exeption" ]
38ae3f1db547a311ccb306bb2c1ffc43d33890bf
https://github.com/jaeger-app/exceptions/blob/38ae3f1db547a311ccb306bb2c1ffc43d33890bf/src/Exception.php#L33-L37
238,298
marando/phpSOFA
src/Marando/IAU/iauUtcut1.php
iauUtcut1.Utcut1
public static function Utcut1($utc1, $utc2, $dut1, &$ut11, &$ut12) { $iy; $im; $id; $js; $jw; $w; $dat; $dta; $tai1; $tai2; /* Look up TAI-UTC. */ if (IAU::Jd2cal($utc1, $utc2, $iy, $im, $id, $w)) return -1; $js = IAU::Dat($iy, $im, $id, 0.0, $dat); if ($js...
php
public static function Utcut1($utc1, $utc2, $dut1, &$ut11, &$ut12) { $iy; $im; $id; $js; $jw; $w; $dat; $dta; $tai1; $tai2; /* Look up TAI-UTC. */ if (IAU::Jd2cal($utc1, $utc2, $iy, $im, $id, $w)) return -1; $js = IAU::Dat($iy, $im, $id, 0.0, $dat); if ($js...
[ "public", "static", "function", "Utcut1", "(", "$", "utc1", ",", "$", "utc2", ",", "$", "dut1", ",", "&", "$", "ut11", ",", "&", "$", "ut12", ")", "{", "$", "iy", ";", "$", "im", ";", "$", "id", ";", "$", "js", ";", "$", "jw", ";", "$", "...
- - - - - - - - - - i a u U t c u t 1 - - - - - - - - - - Time scale transformation: Coordinated Universal Time, UTC, to Universal Time, UT1. This function is part of the International Astronomical Union's SOFA (Standards of Fundamental Astronomy) software collection. Status: canonical. Given: utc1,utc2 double ...
[ "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "i", "a", "u", "U", "t", "c", "u", "t", "1", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-" ]
757fa49fe335ae1210eaa7735473fd4388b13f07
https://github.com/marando/phpSOFA/blob/757fa49fe335ae1210eaa7735473fd4388b13f07/src/Marando/IAU/iauUtcut1.php#L79-L114
238,299
tadcka/Tree
Validator/NodeValidator.php
NodeValidator.validateByOnlyOne
public function validateByOnlyOne($nodeType, TreeInterface $tree) { if (!$nodeType) { return true; } $config = $this->getNodeTypeConfig($nodeType); if (null === $config) { return false; } if ($config->isOnlyOne()) { return !in_arr...
php
public function validateByOnlyOne($nodeType, TreeInterface $tree) { if (!$nodeType) { return true; } $config = $this->getNodeTypeConfig($nodeType); if (null === $config) { return false; } if ($config->isOnlyOne()) { return !in_arr...
[ "public", "function", "validateByOnlyOne", "(", "$", "nodeType", ",", "TreeInterface", "$", "tree", ")", "{", "if", "(", "!", "$", "nodeType", ")", "{", "return", "true", ";", "}", "$", "config", "=", "$", "this", "->", "getNodeTypeConfig", "(", "$", "...
Validate by only one. @param string $nodeType @param TreeInterface $tree @return bool
[ "Validate", "by", "only", "one", "." ]
b45038283225508b09a05f99651ecd5127a08f20
https://github.com/tadcka/Tree/blob/b45038283225508b09a05f99651ecd5127a08f20/Validator/NodeValidator.php#L58-L74