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
205,100
wdbo/webdocbook
src/WebDocBook/Controller/DefaultController.php
DefaultController.directoryAction
public function directoryAction($path) { try { $this->setPath($path); } catch (NotFoundException $e) { throw $e; } $dbfile = new WDBFile($this->getpath()); if ($dbfile->isFile()) { return $this->fileAction($this->getPath()); } ...
php
public function directoryAction($path) { try { $this->setPath($path); } catch (NotFoundException $e) { throw $e; } $dbfile = new WDBFile($this->getpath()); if ($dbfile->isFile()) { return $this->fileAction($this->getPath()); } ...
[ "public", "function", "directoryAction", "(", "$", "path", ")", "{", "try", "{", "$", "this", "->", "setPath", "(", "$", "path", ")", ";", "}", "catch", "(", "NotFoundException", "$", "e", ")", "{", "throw", "$", "e", ";", "}", "$", "dbfile", "=", ...
Directory path action @param string $path @return array @throws \WebDocBook\Exception\NotFoundException
[ "Directory", "path", "action" ]
7d4e806f674b6222c9a3e85bfed34e72bc9d584e
https://github.com/wdbo/webdocbook/blob/7d4e806f674b6222c9a3e85bfed34e72bc9d584e/src/WebDocBook/Controller/DefaultController.php#L64-L110
205,101
wdbo/webdocbook
src/WebDocBook/Controller/DefaultController.php
DefaultController.fileAction
public function fileAction($path) { try { $this->setPath($path); } catch (NotFoundException $e) { throw $e; } $dbfile = new WDBFile($this->getPath()); if ($dbfile->isDir()) { return $this->directoryAction($this->getPath()); } ...
php
public function fileAction($path) { try { $this->setPath($path); } catch (NotFoundException $e) { throw $e; } $dbfile = new WDBFile($this->getPath()); if ($dbfile->isDir()) { return $this->directoryAction($this->getPath()); } ...
[ "public", "function", "fileAction", "(", "$", "path", ")", "{", "try", "{", "$", "this", "->", "setPath", "(", "$", "path", ")", ";", "}", "catch", "(", "NotFoundException", "$", "e", ")", "{", "throw", "$", "e", ";", "}", "$", "dbfile", "=", "ne...
File path action @param string $path @return array @throws \WebDocBook\Exception\NotFoundException
[ "File", "path", "action" ]
7d4e806f674b6222c9a3e85bfed34e72bc9d584e
https://github.com/wdbo/webdocbook/blob/7d4e806f674b6222c9a3e85bfed34e72bc9d584e/src/WebDocBook/Controller/DefaultController.php#L119-L149
205,102
wdbo/webdocbook
src/WebDocBook/Controller/DefaultController.php
DefaultController.rssFeedAction
public function rssFeedAction($path) { try { $this->setPath($path); } catch (NotFoundException $e) { throw $e; } $dbfile = new WDBFile($this->getpath()); $contents = array(); $tpl_params = array( 'page' => $dbfile->g...
php
public function rssFeedAction($path) { try { $this->setPath($path); } catch (NotFoundException $e) { throw $e; } $dbfile = new WDBFile($this->getpath()); $contents = array(); $tpl_params = array( 'page' => $dbfile->g...
[ "public", "function", "rssFeedAction", "(", "$", "path", ")", "{", "try", "{", "$", "this", "->", "setPath", "(", "$", "path", ")", ";", "}", "catch", "(", "NotFoundException", "$", "e", ")", "{", "throw", "$", "e", ";", "}", "$", "dbfile", "=", ...
RSS action for concerned path @param string $path @return array @throws \WebDocBook\Exception\NotFoundException
[ "RSS", "action", "for", "concerned", "path" ]
7d4e806f674b6222c9a3e85bfed34e72bc9d584e
https://github.com/wdbo/webdocbook/blob/7d4e806f674b6222c9a3e85bfed34e72bc9d584e/src/WebDocBook/Controller/DefaultController.php#L158-L202
205,103
wdbo/webdocbook
src/WebDocBook/Controller/DefaultController.php
DefaultController.sitemapAction
public function sitemapAction($path) { try { $this->setPath($path); } catch (NotFoundException $e) { throw $e; } $dbfile = new WDBFile($this->getpath()); if (!$dbfile->isDir()) { throw new NotFoundException( 'Can not build ...
php
public function sitemapAction($path) { try { $this->setPath($path); } catch (NotFoundException $e) { throw $e; } $dbfile = new WDBFile($this->getpath()); if (!$dbfile->isDir()) { throw new NotFoundException( 'Can not build ...
[ "public", "function", "sitemapAction", "(", "$", "path", ")", "{", "try", "{", "$", "this", "->", "setPath", "(", "$", "path", ")", ";", "}", "catch", "(", "NotFoundException", "$", "e", ")", "{", "throw", "$", "e", ";", "}", "$", "dbfile", "=", ...
Sitemap action for a path @param string $path @return array @throws \WebDocBook\Exception\NotFoundException
[ "Sitemap", "action", "for", "a", "path" ]
7d4e806f674b6222c9a3e85bfed34e72bc9d584e
https://github.com/wdbo/webdocbook/blob/7d4e806f674b6222c9a3e85bfed34e72bc9d584e/src/WebDocBook/Controller/DefaultController.php#L211-L235
205,104
wdbo/webdocbook
src/WebDocBook/Controller/DefaultController.php
DefaultController.htmlOnlyAction
public function htmlOnlyAction($path) { try { $this->setPath($path); } catch (NotFoundException $e) { throw $e; } $dbfile = new WDBFile($this->getpath()); if (!$dbfile->isFile()) { throw new NotFoundException( 'Can not send...
php
public function htmlOnlyAction($path) { try { $this->setPath($path); } catch (NotFoundException $e) { throw $e; } $dbfile = new WDBFile($this->getpath()); if (!$dbfile->isFile()) { throw new NotFoundException( 'Can not send...
[ "public", "function", "htmlOnlyAction", "(", "$", "path", ")", "{", "try", "{", "$", "this", "->", "setPath", "(", "$", "path", ")", ";", "}", "catch", "(", "NotFoundException", "$", "e", ")", "{", "throw", "$", "e", ";", "}", "$", "dbfile", "=", ...
HTML only version of a path @param string $path @return array @throws \WebDocBook\Exception\NotFoundException
[ "HTML", "only", "version", "of", "a", "path" ]
7d4e806f674b6222c9a3e85bfed34e72bc9d584e
https://github.com/wdbo/webdocbook/blob/7d4e806f674b6222c9a3e85bfed34e72bc9d584e/src/WebDocBook/Controller/DefaultController.php#L244-L266
205,105
wdbo/webdocbook
src/WebDocBook/Controller/DefaultController.php
DefaultController.plainTextAction
public function plainTextAction($path) { try { $this->setPath($path); } catch (NotFoundException $e) { throw $e; } $dbfile = new WDBFile($this->getpath()); if (!$dbfile->isFile()) { throw new NotFoundException( 'Can not sen...
php
public function plainTextAction($path) { try { $this->setPath($path); } catch (NotFoundException $e) { throw $e; } $dbfile = new WDBFile($this->getpath()); if (!$dbfile->isFile()) { throw new NotFoundException( 'Can not sen...
[ "public", "function", "plainTextAction", "(", "$", "path", ")", "{", "try", "{", "$", "this", "->", "setPath", "(", "$", "path", ")", ";", "}", "catch", "(", "NotFoundException", "$", "e", ")", "{", "throw", "$", "e", ";", "}", "$", "dbfile", "=", ...
Raw plain text action of a path @param string $path @return array @throws \WebDocBook\Exception\NotFoundException
[ "Raw", "plain", "text", "action", "of", "a", "path" ]
7d4e806f674b6222c9a3e85bfed34e72bc9d584e
https://github.com/wdbo/webdocbook/blob/7d4e806f674b6222c9a3e85bfed34e72bc9d584e/src/WebDocBook/Controller/DefaultController.php#L275-L304
205,106
wdbo/webdocbook
src/WebDocBook/Controller/DefaultController.php
DefaultController.downloadAction
public function downloadAction($path) { try { $this->setPath($path); } catch (NotFoundException $e) { throw $e; } $dbfile = new WDBFile($this->getpath()); if (!$dbfile->isFile()) { throw new NotFoundException( 'Can not send...
php
public function downloadAction($path) { try { $this->setPath($path); } catch (NotFoundException $e) { throw $e; } $dbfile = new WDBFile($this->getpath()); if (!$dbfile->isFile()) { throw new NotFoundException( 'Can not send...
[ "public", "function", "downloadAction", "(", "$", "path", ")", "{", "try", "{", "$", "this", "->", "setPath", "(", "$", "path", ")", ";", "}", "catch", "(", "NotFoundException", "$", "e", ")", "{", "throw", "$", "e", ";", "}", "$", "dbfile", "=", ...
Download action of a path @param string $path @throws \WebDocBook\Exception\NotFoundException
[ "Download", "action", "of", "a", "path" ]
7d4e806f674b6222c9a3e85bfed34e72bc9d584e
https://github.com/wdbo/webdocbook/blob/7d4e806f674b6222c9a3e85bfed34e72bc9d584e/src/WebDocBook/Controller/DefaultController.php#L312-L331
205,107
wdbo/webdocbook
src/WebDocBook/Controller/DefaultController.php
DefaultController.searchAction
public function searchAction($path) { try { $this->setPath($path); } catch (NotFoundException $e) { throw $e; } $search = $this->wdb->getRequest()->getArgument('s'); if (empty($search)) { return $this->indexAction($path); } ...
php
public function searchAction($path) { try { $this->setPath($path); } catch (NotFoundException $e) { throw $e; } $search = $this->wdb->getRequest()->getArgument('s'); if (empty($search)) { return $this->indexAction($path); } ...
[ "public", "function", "searchAction", "(", "$", "path", ")", "{", "try", "{", "$", "this", "->", "setPath", "(", "$", "path", ")", ";", "}", "catch", "(", "NotFoundException", "$", "e", ")", "{", "throw", "$", "e", ";", "}", "$", "search", "=", "...
Global search action of a path @param string $path @return array @throws \WebDocBook\Exception\NotFoundException
[ "Global", "search", "action", "of", "a", "path" ]
7d4e806f674b6222c9a3e85bfed34e72bc9d584e
https://github.com/wdbo/webdocbook/blob/7d4e806f674b6222c9a3e85bfed34e72bc9d584e/src/WebDocBook/Controller/DefaultController.php#L340-L372
205,108
PhoxPHP/Glider
src/Console/Command/Seed.php
Seed.createSeed
protected function createSeed() { $templateTags = []; $seedsDirectory = $this->cmd->getConfigOpt('seeds_storage'); $filename = trim($this->cmd->question('Seed filename?')); $templateTags['phx:class'] = Helper::getQualifiedClassName($filename); $path = $seedsDirectory . '/' . $filename . '.php'; if (file...
php
protected function createSeed() { $templateTags = []; $seedsDirectory = $this->cmd->getConfigOpt('seeds_storage'); $filename = trim($this->cmd->question('Seed filename?')); $templateTags['phx:class'] = Helper::getQualifiedClassName($filename); $path = $seedsDirectory . '/' . $filename . '.php'; if (file...
[ "protected", "function", "createSeed", "(", ")", "{", "$", "templateTags", "=", "[", "]", ";", "$", "seedsDirectory", "=", "$", "this", "->", "cmd", "->", "getConfigOpt", "(", "'seeds_storage'", ")", ";", "$", "filename", "=", "trim", "(", "$", "this", ...
Create new seed class. @access protected @return <void>
[ "Create", "new", "seed", "class", "." ]
17aaf3b7bb6e70ea3ae1f04e30a7690e884bf042
https://github.com/PhoxPHP/Glider/blob/17aaf3b7bb6e70ea3ae1f04e30a7690e884bf042/src/Console/Command/Seed.php#L110-L131
205,109
PhoxPHP/Glider
src/Console/Command/Seed.php
Seed.runSeeds
protected function runSeeds() { foreach($this->getSeeders() as $file) { require_once $file; $className = basename($file, '.php'); $this->runSeed($className); } }
php
protected function runSeeds() { foreach($this->getSeeders() as $file) { require_once $file; $className = basename($file, '.php'); $this->runSeed($className); } }
[ "protected", "function", "runSeeds", "(", ")", "{", "foreach", "(", "$", "this", "->", "getSeeders", "(", ")", "as", "$", "file", ")", "{", "require_once", "$", "file", ";", "$", "className", "=", "basename", "(", "$", "file", ",", "'.php'", ")", ";"...
Runs all seeders. @access protected @return <void>
[ "Runs", "all", "seeders", "." ]
17aaf3b7bb6e70ea3ae1f04e30a7690e884bf042
https://github.com/PhoxPHP/Glider/blob/17aaf3b7bb6e70ea3ae1f04e30a7690e884bf042/src/Console/Command/Seed.php#L139-L146
205,110
PhoxPHP/Glider
src/Console/Command/Seed.php
Seed.runSeed
protected function runSeed(String $className) { if (!class_exists($className)) { throw new SeederNotFoundException( sprintf( '[%s] seeder class not found.', $className ) ); } $seeder = new $className(); return $seeder->run(); }
php
protected function runSeed(String $className) { if (!class_exists($className)) { throw new SeederNotFoundException( sprintf( '[%s] seeder class not found.', $className ) ); } $seeder = new $className(); return $seeder->run(); }
[ "protected", "function", "runSeed", "(", "String", "$", "className", ")", "{", "if", "(", "!", "class_exists", "(", "$", "className", ")", ")", "{", "throw", "new", "SeederNotFoundException", "(", "sprintf", "(", "'[%s] seeder class not found.'", ",", "$", "cl...
Runs a single seeder. @param $className <String> @access protected @return <void>
[ "Runs", "a", "single", "seeder", "." ]
17aaf3b7bb6e70ea3ae1f04e30a7690e884bf042
https://github.com/PhoxPHP/Glider/blob/17aaf3b7bb6e70ea3ae1f04e30a7690e884bf042/src/Console/Command/Seed.php#L155-L168
205,111
PhoxPHP/Glider
src/Console/Command/Seed.php
Seed.getSeeders
protected function getSeeders() : Array { $seeders = []; $seedsDirectory = $this->cmd->getConfigOpt('seeds_storage'); foreach(glob($seedsDirectory . '/*' . '.php') as $file) { $seeders[] = $file; } return $seeders; }
php
protected function getSeeders() : Array { $seeders = []; $seedsDirectory = $this->cmd->getConfigOpt('seeds_storage'); foreach(glob($seedsDirectory . '/*' . '.php') as $file) { $seeders[] = $file; } return $seeders; }
[ "protected", "function", "getSeeders", "(", ")", ":", "Array", "{", "$", "seeders", "=", "[", "]", ";", "$", "seedsDirectory", "=", "$", "this", "->", "cmd", "->", "getConfigOpt", "(", "'seeds_storage'", ")", ";", "foreach", "(", "glob", "(", "$", "see...
Returns an array of seeder files. @access protected @return <Array>
[ "Returns", "an", "array", "of", "seeder", "files", "." ]
17aaf3b7bb6e70ea3ae1f04e30a7690e884bf042
https://github.com/PhoxPHP/Glider/blob/17aaf3b7bb6e70ea3ae1f04e30a7690e884bf042/src/Console/Command/Seed.php#L176-L185
205,112
slickframework/form
src/Renderer/Checkbox.php
Checkbox.getLabelAttributes
public function getLabelAttributes() { $result = []; $label = $this->element->getLabel(); foreach ($label->getAttributes() as $attribute => $value) { if (null === $value) { $result[] = $attribute; continue; } $result[] = "{...
php
public function getLabelAttributes() { $result = []; $label = $this->element->getLabel(); foreach ($label->getAttributes() as $attribute => $value) { if (null === $value) { $result[] = $attribute; continue; } $result[] = "{...
[ "public", "function", "getLabelAttributes", "(", ")", "{", "$", "result", "=", "[", "]", ";", "$", "label", "=", "$", "this", "->", "element", "->", "getLabel", "(", ")", ";", "foreach", "(", "$", "label", "->", "getAttributes", "(", ")", "as", "$", ...
Returns the elements's label attributes as a string @return string
[ "Returns", "the", "elements", "s", "label", "attributes", "as", "a", "string" ]
e7d536b3bad49194e246ff93587da2589e31a003
https://github.com/slickframework/form/blob/e7d536b3bad49194e246ff93587da2589e31a003/src/Renderer/Checkbox.php#L37-L50
205,113
gisostallenberg/correct-horse-battery-staple
src/CorrectHorseBatteryStaple.php
CorrectHorseBatteryStaple.verifyCommand
private function verifyCommand() { $process = new Process('which cracklib-check'); $process->setTimeout(10); $process->run(); if ($process->isSuccessful()) { return trim($process->getOutput() ); } $process = new Process('whereis cracklib-check'); $pr...
php
private function verifyCommand() { $process = new Process('which cracklib-check'); $process->setTimeout(10); $process->run(); if ($process->isSuccessful()) { return trim($process->getOutput() ); } $process = new Process('whereis cracklib-check'); $pr...
[ "private", "function", "verifyCommand", "(", ")", "{", "$", "process", "=", "new", "Process", "(", "'which cracklib-check'", ")", ";", "$", "process", "->", "setTimeout", "(", "10", ")", ";", "$", "process", "->", "run", "(", ")", ";", "if", "(", "$", ...
Verify the command to be available @return string @throws RuntimeException
[ "Verify", "the", "command", "to", "be", "available" ]
5be41f0bcba23d25e173e49117e30a738b75a353
https://github.com/gisostallenberg/correct-horse-battery-staple/blob/5be41f0bcba23d25e173e49117e30a738b75a353/src/CorrectHorseBatteryStaple.php#L54-L72
205,114
gisostallenberg/correct-horse-battery-staple
src/CorrectHorseBatteryStaple.php
CorrectHorseBatteryStaple.check
public function check($password) { if (empty($password) ) { throw new InvalidArgumentException('The password cannot be empty'); } $process = new Process($this->command); $process->setInput($password); $process->mustRun(); return $this->verifyOutput($process->...
php
public function check($password) { if (empty($password) ) { throw new InvalidArgumentException('The password cannot be empty'); } $process = new Process($this->command); $process->setInput($password); $process->mustRun(); return $this->verifyOutput($process->...
[ "public", "function", "check", "(", "$", "password", ")", "{", "if", "(", "empty", "(", "$", "password", ")", ")", "{", "throw", "new", "InvalidArgumentException", "(", "'The password cannot be empty'", ")", ";", "}", "$", "process", "=", "new", "Process", ...
Performs an obscure check with the given password @param string $password @throws ProcessFailedException
[ "Performs", "an", "obscure", "check", "with", "the", "given", "password" ]
5be41f0bcba23d25e173e49117e30a738b75a353
https://github.com/gisostallenberg/correct-horse-battery-staple/blob/5be41f0bcba23d25e173e49117e30a738b75a353/src/CorrectHorseBatteryStaple.php#L80-L89
205,115
gisostallenberg/correct-horse-battery-staple
src/CorrectHorseBatteryStaple.php
CorrectHorseBatteryStaple.verifyOutput
private function verifyOutput($output) { $output = trim($output); $result = 'unknown'; if (preg_match('/: ([^:]+)$/', $output, $matches) ) { $result = $matches[1]; } $this->message = $result; if (array_key_exists($result, $this->messageStatus) ) { ...
php
private function verifyOutput($output) { $output = trim($output); $result = 'unknown'; if (preg_match('/: ([^:]+)$/', $output, $matches) ) { $result = $matches[1]; } $this->message = $result; if (array_key_exists($result, $this->messageStatus) ) { ...
[ "private", "function", "verifyOutput", "(", "$", "output", ")", "{", "$", "output", "=", "trim", "(", "$", "output", ")", ";", "$", "result", "=", "'unknown'", ";", "if", "(", "preg_match", "(", "'/: ([^:]+)$/'", ",", "$", "output", ",", "$", "matches"...
Checks the result of the password check @param string $output
[ "Checks", "the", "result", "of", "the", "password", "check" ]
5be41f0bcba23d25e173e49117e30a738b75a353
https://github.com/gisostallenberg/correct-horse-battery-staple/blob/5be41f0bcba23d25e173e49117e30a738b75a353/src/CorrectHorseBatteryStaple.php#L96-L113
205,116
bruno-barros/w.eloquent-framework
src/weloquent/Support/Navigation/BootstrapMenuWalker.php
BootstrapMenuWalker.start_lvl
public function start_lvl( &$output, $depth = 0, $args = array() ) { // depth dependent classes $indent = ( $depth > 0 ? str_repeat( "\t", $depth ) : '' ); // code indent $display_depth = ( $depth + 1); // because it counts the first submenu as 0 $classes = array( 'sub-menu', ( $display_depth == 0 ? 'dr...
php
public function start_lvl( &$output, $depth = 0, $args = array() ) { // depth dependent classes $indent = ( $depth > 0 ? str_repeat( "\t", $depth ) : '' ); // code indent $display_depth = ( $depth + 1); // because it counts the first submenu as 0 $classes = array( 'sub-menu', ( $display_depth == 0 ? 'dr...
[ "public", "function", "start_lvl", "(", "&", "$", "output", ",", "$", "depth", "=", "0", ",", "$", "args", "=", "array", "(", ")", ")", "{", "// depth dependent classes", "$", "indent", "=", "(", "$", "depth", ">", "0", "?", "str_repeat", "(", "\"\\t...
Starts the list before the elements are added. add classes to ul sub-menus @param string $output @param int $depth @param array $args @return string
[ "Starts", "the", "list", "before", "the", "elements", "are", "added", ".", "add", "classes", "to", "ul", "sub", "-", "menus" ]
d252dcb1ba1b6b1cecf67877d7d6d3ba57ebedbd
https://github.com/bruno-barros/w.eloquent-framework/blob/d252dcb1ba1b6b1cecf67877d7d6d3ba57ebedbd/src/weloquent/Support/Navigation/BootstrapMenuWalker.php#L20-L34
205,117
Synapse-Cmf/synapse-cmf
src/Synapse/Cmf/Framework/Engine/Resolver/ThemeResolver.php
ThemeResolver.resolve
public function resolve($themeName = null) { switch (true) { // given theme name case $themeName: if (!$theme = $this->themeLoader->retrieveByName($themeName)) { throw new InvalidThemeException(sprintf( 'No themes registere...
php
public function resolve($themeName = null) { switch (true) { // given theme name case $themeName: if (!$theme = $this->themeLoader->retrieveByName($themeName)) { throw new InvalidThemeException(sprintf( 'No themes registere...
[ "public", "function", "resolve", "(", "$", "themeName", "=", "null", ")", "{", "switch", "(", "true", ")", "{", "// given theme name", "case", "$", "themeName", ":", "if", "(", "!", "$", "theme", "=", "$", "this", "->", "themeLoader", "->", "retrieveByNa...
Select Theme to use from given parameters and return it. @param string $themeName optional theme name to use @return Theme @throws InvalidThemeException If no theme found for given theme name
[ "Select", "Theme", "to", "use", "from", "given", "parameters", "and", "return", "it", "." ]
d8122a4150a83d5607289724425cf35c56a5e880
https://github.com/Synapse-Cmf/synapse-cmf/blob/d8122a4150a83d5607289724425cf35c56a5e880/src/Synapse/Cmf/Framework/Engine/Resolver/ThemeResolver.php#L35-L69
205,118
noizu/fragmented-keys
src/NoizuLabs/FragmentedKeys/Tag.php
Tag.Increment
public function Increment() { if($this->version == null) { $this->_getVersion(); } $this->version += .1; $this->_StoreVersion(); }
php
public function Increment() { if($this->version == null) { $this->_getVersion(); } $this->version += .1; $this->_StoreVersion(); }
[ "public", "function", "Increment", "(", ")", "{", "if", "(", "$", "this", "->", "version", "==", "null", ")", "{", "$", "this", "->", "_getVersion", "(", ")", ";", "}", "$", "this", "->", "version", "+=", ".1", ";", "$", "this", "->", "_StoreVersio...
Increment version number.
[ "Increment", "version", "number", "." ]
5eccc8553ba11920d6d84e20e89b50c28d941b45
https://github.com/noizu/fragmented-keys/blob/5eccc8553ba11920d6d84e20e89b50c28d941b45/src/NoizuLabs/FragmentedKeys/Tag.php#L144-L151
205,119
noizu/fragmented-keys
src/NoizuLabs/FragmentedKeys/Tag.php
Tag._getVersion
protected function _getVersion() { if(empty($this->version)) { $result = $this->cacheHandler->get($this->getTagName()); if(empty($result)) { $this->ResetTagVersion(); } else { $this->version = $result; } ...
php
protected function _getVersion() { if(empty($this->version)) { $result = $this->cacheHandler->get($this->getTagName()); if(empty($result)) { $this->ResetTagVersion(); } else { $this->version = $result; } ...
[ "protected", "function", "_getVersion", "(", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "version", ")", ")", "{", "$", "result", "=", "$", "this", "->", "cacheHandler", "->", "get", "(", "$", "this", "->", "getTagName", "(", ")", ")", ";...
return current version number of tag-instance @return int
[ "return", "current", "version", "number", "of", "tag", "-", "instance" ]
5eccc8553ba11920d6d84e20e89b50c28d941b45
https://github.com/noizu/fragmented-keys/blob/5eccc8553ba11920d6d84e20e89b50c28d941b45/src/NoizuLabs/FragmentedKeys/Tag.php#L167-L179
205,120
phPoirot/Client-OAuth2
mod/Authenticate/IdentifierTokenAssertion.php
IdentifierTokenAssertion.getOwnerId
function getOwnerId() { if ($this->withIdentity() instanceof iIdentityOfUser) { /** @var IdentityOAuthToken|iIdentityOfUser $identity */ $identity = $this->withIdentity(); $userId = $identity->getOwnerId(); } else { $userInfo ...
php
function getOwnerId() { if ($this->withIdentity() instanceof iIdentityOfUser) { /** @var IdentityOAuthToken|iIdentityOfUser $identity */ $identity = $this->withIdentity(); $userId = $identity->getOwnerId(); } else { $userInfo ...
[ "function", "getOwnerId", "(", ")", "{", "if", "(", "$", "this", "->", "withIdentity", "(", ")", "instanceof", "iIdentityOfUser", ")", "{", "/** @var IdentityOAuthToken|iIdentityOfUser $identity */", "$", "identity", "=", "$", "this", "->", "withIdentity", "(", ")...
Get Owner Identifier @return mixed
[ "Get", "Owner", "Identifier" ]
8745fd54afbbb185669b9e38b1241ecc8ffc7268
https://github.com/phPoirot/Client-OAuth2/blob/8745fd54afbbb185669b9e38b1241ecc8ffc7268/mod/Authenticate/IdentifierTokenAssertion.php#L30-L46
205,121
phPoirot/Client-OAuth2
mod/Authenticate/IdentifierTokenAssertion.php
IdentifierTokenAssertion.getAuthInfo
function getAuthInfo($grants = false) { if ($this->_c_info) return $this->_c_info; $options = null; if ( $grants ) $options['include_grants'] = true; try { $info = $this->federation()->getMyAccountInfo($options); } catch (exOAuthAccessD...
php
function getAuthInfo($grants = false) { if ($this->_c_info) return $this->_c_info; $options = null; if ( $grants ) $options['include_grants'] = true; try { $info = $this->federation()->getMyAccountInfo($options); } catch (exOAuthAccessD...
[ "function", "getAuthInfo", "(", "$", "grants", "=", "false", ")", "{", "if", "(", "$", "this", "->", "_c_info", ")", "return", "$", "this", "->", "_c_info", ";", "$", "options", "=", "null", ";", "if", "(", "$", "grants", ")", "$", "options", "[", ...
Retrieve User Info From OAuth Server @param bool $grants @return array
[ "Retrieve", "User", "Info", "From", "OAuth", "Server" ]
8745fd54afbbb185669b9e38b1241ecc8ffc7268
https://github.com/phPoirot/Client-OAuth2/blob/8745fd54afbbb185669b9e38b1241ecc8ffc7268/mod/Authenticate/IdentifierTokenAssertion.php#L56-L74
205,122
phPoirot/Client-OAuth2
mod/Authenticate/IdentifierTokenAssertion.php
IdentifierTokenAssertion.federation
function federation() { if ($this->_c_federation) return $this->_c_federation; $federation = clone $this->federation; $federation->setTokenProvider( $this->insTokenProvider() ); return $this->_c_federation = $federation; }
php
function federation() { if ($this->_c_federation) return $this->_c_federation; $federation = clone $this->federation; $federation->setTokenProvider( $this->insTokenProvider() ); return $this->_c_federation = $federation; }
[ "function", "federation", "(", ")", "{", "if", "(", "$", "this", "->", "_c_federation", ")", "return", "$", "this", "->", "_c_federation", ";", "$", "federation", "=", "clone", "$", "this", "->", "federation", ";", "$", "federation", "->", "setTokenProvide...
Access Federation Commands Of Identified User @return Federation
[ "Access", "Federation", "Commands", "Of", "Identified", "User" ]
8745fd54afbbb185669b9e38b1241ecc8ffc7268
https://github.com/phPoirot/Client-OAuth2/blob/8745fd54afbbb185669b9e38b1241ecc8ffc7268/mod/Authenticate/IdentifierTokenAssertion.php#L82-L94
205,123
phPoirot/Client-OAuth2
mod/Authenticate/IdentifierTokenAssertion.php
IdentifierTokenAssertion.insTokenProvider
function insTokenProvider() { if ($this->_tokenProvider) return $this->_tokenProvider; /** @var IdentityOAuthToken|iIdentityAccTokenProvider $identity */ $identity = $this->withIdentity(); $tokenProvider = new TokenProviderSolid( $identity->getAccessToken() ...
php
function insTokenProvider() { if ($this->_tokenProvider) return $this->_tokenProvider; /** @var IdentityOAuthToken|iIdentityAccTokenProvider $identity */ $identity = $this->withIdentity(); $tokenProvider = new TokenProviderSolid( $identity->getAccessToken() ...
[ "function", "insTokenProvider", "(", ")", "{", "if", "(", "$", "this", "->", "_tokenProvider", ")", "return", "$", "this", "->", "_tokenProvider", ";", "/** @var IdentityOAuthToken|iIdentityAccTokenProvider $identity */", "$", "identity", "=", "$", "this", "->", "wi...
Token Provider Help Call API`s Behalf Of User with given token [code] $federation = clone \Module\OAuth2Client\Services::OAuthFederate(); $federation->setTokenProvider($tokenProvider); $info = $federation->getMyAccountInfo(); [/code] @return TokenProviderSolid
[ "Token", "Provider", "Help", "Call", "API", "s", "Behalf", "Of", "User", "with", "given", "token" ]
8745fd54afbbb185669b9e38b1241ecc8ffc7268
https://github.com/phPoirot/Client-OAuth2/blob/8745fd54afbbb185669b9e38b1241ecc8ffc7268/mod/Authenticate/IdentifierTokenAssertion.php#L111-L124
205,124
praxisnetau/silverware-navigation
src/Components/BarNavigation.php
BarNavigation.getCollapseClassNames
public function getCollapseClassNames() { $classes = $this->styles('navbar.collapse', 'collapse'); if ($this->hasRows()) { $classes[] = $this->style('navbar.column'); } if ($align = $this->ItemAlign) { $classes[] = $this->style(sprintf('navba...
php
public function getCollapseClassNames() { $classes = $this->styles('navbar.collapse', 'collapse'); if ($this->hasRows()) { $classes[] = $this->style('navbar.column'); } if ($align = $this->ItemAlign) { $classes[] = $this->style(sprintf('navba...
[ "public", "function", "getCollapseClassNames", "(", ")", "{", "$", "classes", "=", "$", "this", "->", "styles", "(", "'navbar.collapse'", ",", "'collapse'", ")", ";", "if", "(", "$", "this", "->", "hasRows", "(", ")", ")", "{", "$", "classes", "[", "]"...
Answers an array of collapse class names for the HTML template. @return array
[ "Answers", "an", "array", "of", "collapse", "class", "names", "for", "the", "HTML", "template", "." ]
04e6f3003c2871348d5bba7869d4fc273641627e
https://github.com/praxisnetau/silverware-navigation/blob/04e6f3003c2871348d5bba7869d4fc273641627e/src/Components/BarNavigation.php#L589-L608
205,125
praxisnetau/silverware-navigation
src/Components/BarNavigation.php
BarNavigation.getLogoDimensions
public function getLogoDimensions() { // Initialise: $data = []; // Obtain Dimensions: $widths = $this->dbObject('BrandLogoWidth'); $heights = $this->dbObject('BrandLogoHeight'); // Iterate Width Viewports: foreach...
php
public function getLogoDimensions() { // Initialise: $data = []; // Obtain Dimensions: $widths = $this->dbObject('BrandLogoWidth'); $heights = $this->dbObject('BrandLogoHeight'); // Iterate Width Viewports: foreach...
[ "public", "function", "getLogoDimensions", "(", ")", "{", "// Initialise:", "$", "data", "=", "[", "]", ";", "// Obtain Dimensions:", "$", "widths", "=", "$", "this", "->", "dbObject", "(", "'BrandLogoWidth'", ")", ";", "$", "heights", "=", "$", "this", "-...
Answers a list of logo dimensions for the custom CSS template. @return ArrayList
[ "Answers", "a", "list", "of", "logo", "dimensions", "for", "the", "custom", "CSS", "template", "." ]
04e6f3003c2871348d5bba7869d4fc273641627e
https://github.com/praxisnetau/silverware-navigation/blob/04e6f3003c2871348d5bba7869d4fc273641627e/src/Components/BarNavigation.php#L709-L755
205,126
praxisnetau/silverware-navigation
src/Components/BarNavigation.php
BarNavigation.getBackgroundOptions
public function getBackgroundOptions() { return [ self::BG_PRIMARY => _t(__CLASS__ . '.PRIMARY', 'Primary'), self::BG_LIGHT => _t(__CLASS__ . '.LIGHT', 'Light'), self::BG_DARK => _t(__CLASS__ . '.DARK', 'Dark') ]; }
php
public function getBackgroundOptions() { return [ self::BG_PRIMARY => _t(__CLASS__ . '.PRIMARY', 'Primary'), self::BG_LIGHT => _t(__CLASS__ . '.LIGHT', 'Light'), self::BG_DARK => _t(__CLASS__ . '.DARK', 'Dark') ]; }
[ "public", "function", "getBackgroundOptions", "(", ")", "{", "return", "[", "self", "::", "BG_PRIMARY", "=>", "_t", "(", "__CLASS__", ".", "'.PRIMARY'", ",", "'Primary'", ")", ",", "self", "::", "BG_LIGHT", "=>", "_t", "(", "__CLASS__", ".", "'.LIGHT'", ",...
Answers an array of options for the background field. @return array
[ "Answers", "an", "array", "of", "options", "for", "the", "background", "field", "." ]
04e6f3003c2871348d5bba7869d4fc273641627e
https://github.com/praxisnetau/silverware-navigation/blob/04e6f3003c2871348d5bba7869d4fc273641627e/src/Components/BarNavigation.php#L762-L769
205,127
praxisnetau/silverware-navigation
src/Components/BarNavigation.php
BarNavigation.getItemAlignOptions
public function getItemAlignOptions() { return [ self::ITEM_ALIGN_START => _t(__CLASS__ . '.START', 'Start'), self::ITEM_ALIGN_CENTER => _t(__CLASS__ . '.CENTER', 'Center'), self::ITEM_ALIGN_END => _t(__CLASS__ . '.END', 'End'), self::ITEM_ALIGN_BETWEEN => _t(...
php
public function getItemAlignOptions() { return [ self::ITEM_ALIGN_START => _t(__CLASS__ . '.START', 'Start'), self::ITEM_ALIGN_CENTER => _t(__CLASS__ . '.CENTER', 'Center'), self::ITEM_ALIGN_END => _t(__CLASS__ . '.END', 'End'), self::ITEM_ALIGN_BETWEEN => _t(...
[ "public", "function", "getItemAlignOptions", "(", ")", "{", "return", "[", "self", "::", "ITEM_ALIGN_START", "=>", "_t", "(", "__CLASS__", ".", "'.START'", ",", "'Start'", ")", ",", "self", "::", "ITEM_ALIGN_CENTER", "=>", "_t", "(", "__CLASS__", ".", "'.CEN...
Answers an array of options for the item align field. @return array
[ "Answers", "an", "array", "of", "options", "for", "the", "item", "align", "field", "." ]
04e6f3003c2871348d5bba7869d4fc273641627e
https://github.com/praxisnetau/silverware-navigation/blob/04e6f3003c2871348d5bba7869d4fc273641627e/src/Components/BarNavigation.php#L802-L811
205,128
praxisnetau/silverware-navigation
src/Components/BarNavigation.php
BarNavigation.getItemJustifyOptions
public function getItemJustifyOptions() { return [ self::ITEM_ALIGN_START => _t(__CLASS__ . '.START', 'Start'), self::ITEM_ALIGN_CENTER => _t(__CLASS__ . '.CENTER', 'Center'), self::ITEM_ALIGN_END => _t(__CLASS__ . '.END', 'End'), self::ITEM_ALIGN_BASELINE => ...
php
public function getItemJustifyOptions() { return [ self::ITEM_ALIGN_START => _t(__CLASS__ . '.START', 'Start'), self::ITEM_ALIGN_CENTER => _t(__CLASS__ . '.CENTER', 'Center'), self::ITEM_ALIGN_END => _t(__CLASS__ . '.END', 'End'), self::ITEM_ALIGN_BASELINE => ...
[ "public", "function", "getItemJustifyOptions", "(", ")", "{", "return", "[", "self", "::", "ITEM_ALIGN_START", "=>", "_t", "(", "__CLASS__", ".", "'.START'", ",", "'Start'", ")", ",", "self", "::", "ITEM_ALIGN_CENTER", "=>", "_t", "(", "__CLASS__", ".", "'.C...
Answers an array of options for the item justify field. @return array
[ "Answers", "an", "array", "of", "options", "for", "the", "item", "justify", "field", "." ]
04e6f3003c2871348d5bba7869d4fc273641627e
https://github.com/praxisnetau/silverware-navigation/blob/04e6f3003c2871348d5bba7869d4fc273641627e/src/Components/BarNavigation.php#L818-L827
205,129
selikhovleonid/nadir
src/core/WebCtrlResolver.php
WebCtrlResolver.createCtrl
protected function createCtrl() { $oView = ViewFactory::createView( $this->ctrlName, str_replace('action', '', $this->actionName) ); $aComponentsRootMap = AppHelper::getInstance()->getConfig('componentsRootMap'); if (!isset($aComponentsRootMap['co...
php
protected function createCtrl() { $oView = ViewFactory::createView( $this->ctrlName, str_replace('action', '', $this->actionName) ); $aComponentsRootMap = AppHelper::getInstance()->getConfig('componentsRootMap'); if (!isset($aComponentsRootMap['co...
[ "protected", "function", "createCtrl", "(", ")", "{", "$", "oView", "=", "ViewFactory", "::", "createView", "(", "$", "this", "->", "ctrlName", ",", "str_replace", "(", "'action'", ",", "''", ",", "$", "this", "->", "actionName", ")", ")", ";", "$", "a...
It creates the controller object, assignes it with default view and layout objects. @return \nadir\core\AWebController.
[ "It", "creates", "the", "controller", "object", "assignes", "it", "with", "default", "view", "and", "layout", "objects", "." ]
47545fccd8516c8f0a20c02ba62f68269c7199da
https://github.com/selikhovleonid/nadir/blob/47545fccd8516c8f0a20c02ba62f68269c7199da/src/core/WebCtrlResolver.php#L30-L59
205,130
octris/sqlbuilder
libs/Sqlbuilder/Template.php
Template.resolveSql
public function resolveSql(array $parameters = array()) { // sql statement from template $sql = preg_replace_callback('|/\*\*(.+?)\*\*/|', function($match) use (&$parameters) { $name = trim($match[1]); $snippet = $this->builder->resolveSnippet($name, $parameters); ...
php
public function resolveSql(array $parameters = array()) { // sql statement from template $sql = preg_replace_callback('|/\*\*(.+?)\*\*/|', function($match) use (&$parameters) { $name = trim($match[1]); $snippet = $this->builder->resolveSnippet($name, $parameters); ...
[ "public", "function", "resolveSql", "(", "array", "$", "parameters", "=", "array", "(", ")", ")", "{", "// sql statement from template", "$", "sql", "=", "preg_replace_callback", "(", "'|/\\*\\*(.+?)\\*\\*/|'", ",", "function", "(", "$", "match", ")", "use", "("...
Resolve SQL statement. @param array $parameters Optional parameters for forming SQL statement. @return string Resolved SQL statement.
[ "Resolve", "SQL", "statement", "." ]
d22a494fd4814b3245fce20b4076eec1b382ffd3
https://github.com/octris/sqlbuilder/blob/d22a494fd4814b3245fce20b4076eec1b382ffd3/libs/Sqlbuilder/Template.php#L54-L77
205,131
ben-gibson/foursquare-venue-client
src/Factory/ContactFactory.php
ContactFactory.create
public function create(Description $description) { return new ContactEntity( $description->getOptionalProperty('phone'), $description->getOptionalProperty('twitter'), $description->getOptionalProperty('facebook') ); }
php
public function create(Description $description) { return new ContactEntity( $description->getOptionalProperty('phone'), $description->getOptionalProperty('twitter'), $description->getOptionalProperty('facebook') ); }
[ "public", "function", "create", "(", "Description", "$", "description", ")", "{", "return", "new", "ContactEntity", "(", "$", "description", "->", "getOptionalProperty", "(", "'phone'", ")", ",", "$", "description", "->", "getOptionalProperty", "(", "'twitter'", ...
Create contact information from a description. @param Description $description The contact description. @return ContactEntity
[ "Create", "contact", "information", "from", "a", "description", "." ]
ce5e7c308f87d5ccc28ab8d27a9cb51bd106d969
https://github.com/ben-gibson/foursquare-venue-client/blob/ce5e7c308f87d5ccc28ab8d27a9cb51bd106d969/src/Factory/ContactFactory.php#L19-L26
205,132
alphacomm/alpharpc
src/AlphaRPC/Manager/WorkerHandler/Action.php
Action.addWorker
public function addWorker($worker) { if (!$worker instanceof Worker) { throw new \Exception('$worker is not an instance of Worker'); } $this->workerList[$worker->getId()] = $worker; return $this; }
php
public function addWorker($worker) { if (!$worker instanceof Worker) { throw new \Exception('$worker is not an instance of Worker'); } $this->workerList[$worker->getId()] = $worker; return $this; }
[ "public", "function", "addWorker", "(", "$", "worker", ")", "{", "if", "(", "!", "$", "worker", "instanceof", "Worker", ")", "{", "throw", "new", "\\", "Exception", "(", "'$worker is not an instance of Worker'", ")", ";", "}", "$", "this", "->", "workerList"...
Adds a worker to the action. @param Worker $worker @return Action @throws \Exception
[ "Adds", "a", "worker", "to", "the", "action", "." ]
cf162854500554c4ba8d39f2675de35a49c30ed0
https://github.com/alphacomm/alpharpc/blob/cf162854500554c4ba8d39f2675de35a49c30ed0/src/AlphaRPC/Manager/WorkerHandler/Action.php#L76-L84
205,133
alphacomm/alpharpc
src/AlphaRPC/Manager/WorkerHandler/Action.php
Action.removeWorker
public function removeWorker($id) { if ($id instanceof Worker) { $id = $id->getId(); } if (isset($this->waitingList[$id])) { unset($this->waitingList[$id]); } if (isset($this->workerList[$id])) { unset($this->workerList[$id]); } ...
php
public function removeWorker($id) { if ($id instanceof Worker) { $id = $id->getId(); } if (isset($this->waitingList[$id])) { unset($this->waitingList[$id]); } if (isset($this->workerList[$id])) { unset($this->workerList[$id]); } ...
[ "public", "function", "removeWorker", "(", "$", "id", ")", "{", "if", "(", "$", "id", "instanceof", "Worker", ")", "{", "$", "id", "=", "$", "id", "->", "getId", "(", ")", ";", "}", "if", "(", "isset", "(", "$", "this", "->", "waitingList", "[", ...
Removes the worker from the action. @param Worker $id @return Action
[ "Removes", "the", "worker", "from", "the", "action", "." ]
cf162854500554c4ba8d39f2675de35a49c30ed0
https://github.com/alphacomm/alpharpc/blob/cf162854500554c4ba8d39f2675de35a49c30ed0/src/AlphaRPC/Manager/WorkerHandler/Action.php#L93-L107
205,134
alphacomm/alpharpc
src/AlphaRPC/Manager/WorkerHandler/Action.php
Action.addWaitingWorker
public function addWaitingWorker($id) { if ($id instanceof Worker) { $id = $id->getId(); } if (!isset($this->workerList[$id])) { throw new \Exception('Trying to add non existent worker to the queue.'); } $worker = $this->workerList[$id]; $thi...
php
public function addWaitingWorker($id) { if ($id instanceof Worker) { $id = $id->getId(); } if (!isset($this->workerList[$id])) { throw new \Exception('Trying to add non existent worker to the queue.'); } $worker = $this->workerList[$id]; $thi...
[ "public", "function", "addWaitingWorker", "(", "$", "id", ")", "{", "if", "(", "$", "id", "instanceof", "Worker", ")", "{", "$", "id", "=", "$", "id", "->", "getId", "(", ")", ";", "}", "if", "(", "!", "isset", "(", "$", "this", "->", "workerList...
Adds the worker to the waiting list if it is not already in there. @param string|Worker $id @return Action @throws \Exception
[ "Adds", "the", "worker", "to", "the", "waiting", "list", "if", "it", "is", "not", "already", "in", "there", "." ]
cf162854500554c4ba8d39f2675de35a49c30ed0
https://github.com/alphacomm/alpharpc/blob/cf162854500554c4ba8d39f2675de35a49c30ed0/src/AlphaRPC/Manager/WorkerHandler/Action.php#L117-L139
205,135
alphacomm/alpharpc
src/AlphaRPC/Manager/WorkerHandler/Action.php
Action.fetchWaitingWorker
public function fetchWaitingWorker() { $count = count($this->waitingList); for ($i = 0; $i < $count; $i++) { $worker = array_shift($this->waitingList); if ($worker->isValid() && $worker->isReady()) { return $worker; } } $this->read...
php
public function fetchWaitingWorker() { $count = count($this->waitingList); for ($i = 0; $i < $count; $i++) { $worker = array_shift($this->waitingList); if ($worker->isValid() && $worker->isReady()) { return $worker; } } $this->read...
[ "public", "function", "fetchWaitingWorker", "(", ")", "{", "$", "count", "=", "count", "(", "$", "this", "->", "waitingList", ")", ";", "for", "(", "$", "i", "=", "0", ";", "$", "i", "<", "$", "count", ";", "$", "i", "++", ")", "{", "$", "worke...
Gets the first available worker in the waiting list. @return Worker|null
[ "Gets", "the", "first", "available", "worker", "in", "the", "waiting", "list", "." ]
cf162854500554c4ba8d39f2675de35a49c30ed0
https://github.com/alphacomm/alpharpc/blob/cf162854500554c4ba8d39f2675de35a49c30ed0/src/AlphaRPC/Manager/WorkerHandler/Action.php#L146-L159
205,136
alphacomm/alpharpc
src/AlphaRPC/Manager/WorkerHandler/Action.php
Action.cleanup
public function cleanup() { foreach ($this->workerList as $worker) { if (!$worker->isValid()) { $this->removeWorker($worker); } } return $this; }
php
public function cleanup() { foreach ($this->workerList as $worker) { if (!$worker->isValid()) { $this->removeWorker($worker); } } return $this; }
[ "public", "function", "cleanup", "(", ")", "{", "foreach", "(", "$", "this", "->", "workerList", "as", "$", "worker", ")", "{", "if", "(", "!", "$", "worker", "->", "isValid", "(", ")", ")", "{", "$", "this", "->", "removeWorker", "(", "$", "worker...
Removes all invalid workers. @return Action
[ "Removes", "all", "invalid", "workers", "." ]
cf162854500554c4ba8d39f2675de35a49c30ed0
https://github.com/alphacomm/alpharpc/blob/cf162854500554c4ba8d39f2675de35a49c30ed0/src/AlphaRPC/Manager/WorkerHandler/Action.php#L187-L196
205,137
acacha/forge-publish
src/Console/Commands/PublishInit.php
PublishInit.confirmAnUserIsCreatedInAcachaLaravelForge
protected function confirmAnUserIsCreatedInAcachaLaravelForge() { $this->info(''); $this->info('Please visit and login on http://forge.acacha.org'); $this->info(''); $this->error('Please use Github Social Login for login!!!'); while (! $this->confirm('Do you have an user cre...
php
protected function confirmAnUserIsCreatedInAcachaLaravelForge() { $this->info(''); $this->info('Please visit and login on http://forge.acacha.org'); $this->info(''); $this->error('Please use Github Social Login for login!!!'); while (! $this->confirm('Do you have an user cre...
[ "protected", "function", "confirmAnUserIsCreatedInAcachaLaravelForge", "(", ")", "{", "$", "this", "->", "info", "(", "''", ")", ";", "$", "this", "->", "info", "(", "'Please visit and login on http://forge.acacha.org'", ")", ";", "$", "this", "->", "info", "(", ...
Confirm an user is created in Acacha Laravel Forge.
[ "Confirm", "an", "user", "is", "created", "in", "Acacha", "Laravel", "Forge", "." ]
010779e3d2297c763b82dc3fbde992edffb3a6c6
https://github.com/acacha/forge-publish/blob/010779e3d2297c763b82dc3fbde992edffb3a6c6/src/Console/Commands/PublishInit.php#L69-L78
205,138
YiMAproject/yimaWidgetator
src/yimaWidgetator/Widget/AbstractWidgetMvc.php
AbstractWidgetMvc.getLayout
function getLayout() { $layoutName = ($this->layout) ? $this->layout : $this->getDefaultLayoutName(); if (strstr($layoutName, '/') === false) { // we have just layout name // the directory prefix assigned to it $DS = (defined('DS')) ? constant('DS') :...
php
function getLayout() { $layoutName = ($this->layout) ? $this->layout : $this->getDefaultLayoutName(); if (strstr($layoutName, '/') === false) { // we have just layout name // the directory prefix assigned to it $DS = (defined('DS')) ? constant('DS') :...
[ "function", "getLayout", "(", ")", "{", "$", "layoutName", "=", "(", "$", "this", "->", "layout", ")", "?", "$", "this", "->", "layout", ":", "$", "this", "->", "getDefaultLayoutName", "(", ")", ";", "if", "(", "strstr", "(", "$", "layoutName", ",", ...
Get view script layout @return string|ModelInterface
[ "Get", "view", "script", "layout" ]
332bc9318e6ceaec918147b30317da2f5b3d2636
https://github.com/YiMAproject/yimaWidgetator/blob/332bc9318e6ceaec918147b30317da2f5b3d2636/src/yimaWidgetator/Widget/AbstractWidgetMvc.php#L69-L90
205,139
YiMAproject/yimaWidgetator
src/yimaWidgetator/Widget/AbstractWidgetMvc.php
AbstractWidgetMvc.deriveLayoutPathPrefix
final function deriveLayoutPathPrefix() { $moduleNamespace = $this->deriveModuleNamespace(); $path = ($moduleNamespace) ? $moduleNamespace .'/' : ''; $path .= $this->deriveWidgetName(); // in some cases widget name contains \ from class namespace $path = str_replace('\\', ...
php
final function deriveLayoutPathPrefix() { $moduleNamespace = $this->deriveModuleNamespace(); $path = ($moduleNamespace) ? $moduleNamespace .'/' : ''; $path .= $this->deriveWidgetName(); // in some cases widget name contains \ from class namespace $path = str_replace('\\', ...
[ "final", "function", "deriveLayoutPathPrefix", "(", ")", "{", "$", "moduleNamespace", "=", "$", "this", "->", "deriveModuleNamespace", "(", ")", ";", "$", "path", "=", "(", "$", "moduleNamespace", ")", "?", "$", "moduleNamespace", ".", "'/'", ":", "''", ";...
Get layout path prefixed to module layout name note: WidgetNamespace\WidgetName inflected: widget_namespace\widget_name @return string
[ "Get", "layout", "path", "prefixed", "to", "module", "layout", "name" ]
332bc9318e6ceaec918147b30317da2f5b3d2636
https://github.com/YiMAproject/yimaWidgetator/blob/332bc9318e6ceaec918147b30317da2f5b3d2636/src/yimaWidgetator/Widget/AbstractWidgetMvc.php#L138-L148
205,140
air-php/database
src/Connection.php
Connection.getConnection
private function getConnection() { if (!isset($this->connection)) { $config = new Configuration(); $this->connection = DriverManager::getConnection($this->connectionParams, $config); } return $this->connection; }
php
private function getConnection() { if (!isset($this->connection)) { $config = new Configuration(); $this->connection = DriverManager::getConnection($this->connectionParams, $config); } return $this->connection; }
[ "private", "function", "getConnection", "(", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "connection", ")", ")", "{", "$", "config", "=", "new", "Configuration", "(", ")", ";", "$", "this", "->", "connection", "=", "DriverManager", "::",...
Returns the connection object. @return Connection
[ "Returns", "the", "connection", "object", "." ]
74bdd485b36f3f353b51ab146d2130dd9fc714bd
https://github.com/air-php/database/blob/74bdd485b36f3f353b51ab146d2130dd9fc714bd/src/Connection.php#L70-L79
205,141
air-php/database
src/Connection.php
Connection.setTimezone
public function setTimezone($timezone) { $smt = $this->getConnection()->prepare('SET time_zone = ?'); $smt->bindValue(1, $timezone); $smt->execute(); }
php
public function setTimezone($timezone) { $smt = $this->getConnection()->prepare('SET time_zone = ?'); $smt->bindValue(1, $timezone); $smt->execute(); }
[ "public", "function", "setTimezone", "(", "$", "timezone", ")", "{", "$", "smt", "=", "$", "this", "->", "getConnection", "(", ")", "->", "prepare", "(", "'SET time_zone = ?'", ")", ";", "$", "smt", "->", "bindValue", "(", "1", ",", "$", "timezone", ")...
Sets a timezone. @param string $timezone The timezone you wish to set.
[ "Sets", "a", "timezone", "." ]
74bdd485b36f3f353b51ab146d2130dd9fc714bd
https://github.com/air-php/database/blob/74bdd485b36f3f353b51ab146d2130dd9fc714bd/src/Connection.php#L87-L92
205,142
hal-platform/hal-core
src/Crypto/Encryption.php
Encryption.encrypt
public function encrypt($data) { if (!$data || !is_scalar($data)) { return null; } $nonce = random_bytes(SODIUM_CRYPTO_SECRETBOX_NONCEBYTES); $cipher = sodium_crypto_secretbox($data, $nonce, $this->key); return base64_encode($nonce . $cipher); }
php
public function encrypt($data) { if (!$data || !is_scalar($data)) { return null; } $nonce = random_bytes(SODIUM_CRYPTO_SECRETBOX_NONCEBYTES); $cipher = sodium_crypto_secretbox($data, $nonce, $this->key); return base64_encode($nonce . $cipher); }
[ "public", "function", "encrypt", "(", "$", "data", ")", "{", "if", "(", "!", "$", "data", "||", "!", "is_scalar", "(", "$", "data", ")", ")", "{", "return", "null", ";", "}", "$", "nonce", "=", "random_bytes", "(", "SODIUM_CRYPTO_SECRETBOX_NONCEBYTES", ...
Encrypt a string. @param string $data @return string|null
[ "Encrypt", "a", "string", "." ]
30d456f8392fc873301ad4217d2ae90436c67090
https://github.com/hal-platform/hal-core/blob/30d456f8392fc873301ad4217d2ae90436c67090/src/Crypto/Encryption.php#L52-L62
205,143
acacha/forge-publish
src/Console/Commands/Traits/ChecksSite.php
ChecksSite.checkSite
protected function checkSite() { $sites = $this->fetchSites(fp_env('ACACHA_FORGE_SERVER')); return in_array(fp_env('ACACHA_FORGE_SITE'), collect($sites)->pluck('id')->toArray()); }
php
protected function checkSite() { $sites = $this->fetchSites(fp_env('ACACHA_FORGE_SERVER')); return in_array(fp_env('ACACHA_FORGE_SITE'), collect($sites)->pluck('id')->toArray()); }
[ "protected", "function", "checkSite", "(", ")", "{", "$", "sites", "=", "$", "this", "->", "fetchSites", "(", "fp_env", "(", "'ACACHA_FORGE_SERVER'", ")", ")", ";", "return", "in_array", "(", "fp_env", "(", "'ACACHA_FORGE_SITE'", ")", ",", "collect", "(", ...
Check site. @return bool
[ "Check", "site", "." ]
010779e3d2297c763b82dc3fbde992edffb3a6c6
https://github.com/acacha/forge-publish/blob/010779e3d2297c763b82dc3fbde992edffb3a6c6/src/Console/Commands/Traits/ChecksSite.php#L19-L23
205,144
acacha/forge-publish
src/Console/Commands/Traits/ChecksSite.php
ChecksSite.checkSiteAndAbort
protected function checkSiteAndAbort($site = null) { $site = $site ? $site : fp_env('ACACHA_FORGE_SITE'); if (! $this->checkSite($site)) { $this->error('Site ' . $site . ' not valid'); die(); } }
php
protected function checkSiteAndAbort($site = null) { $site = $site ? $site : fp_env('ACACHA_FORGE_SITE'); if (! $this->checkSite($site)) { $this->error('Site ' . $site . ' not valid'); die(); } }
[ "protected", "function", "checkSiteAndAbort", "(", "$", "site", "=", "null", ")", "{", "$", "site", "=", "$", "site", "?", "$", "site", ":", "fp_env", "(", "'ACACHA_FORGE_SITE'", ")", ";", "if", "(", "!", "$", "this", "->", "checkSite", "(", "$", "si...
Check site and abort. @param null $site
[ "Check", "site", "and", "abort", "." ]
010779e3d2297c763b82dc3fbde992edffb3a6c6
https://github.com/acacha/forge-publish/blob/010779e3d2297c763b82dc3fbde992edffb3a6c6/src/Console/Commands/Traits/ChecksSite.php#L30-L37
205,145
gluephp/glue
src/Router/Router.php
Router.resolveErrorHandler
public function resolveErrorHandler($errorCode) { return array_key_exists($errorCode, $this->errorHandlers) ? call_user_func_array($this->errorHandlers[$errorCode], []) : ''; }
php
public function resolveErrorHandler($errorCode) { return array_key_exists($errorCode, $this->errorHandlers) ? call_user_func_array($this->errorHandlers[$errorCode], []) : ''; }
[ "public", "function", "resolveErrorHandler", "(", "$", "errorCode", ")", "{", "return", "array_key_exists", "(", "$", "errorCode", ",", "$", "this", "->", "errorHandlers", ")", "?", "call_user_func_array", "(", "$", "this", "->", "errorHandlers", "[", "$", "er...
Resolve an error handler @return [type] [description]
[ "Resolve", "an", "error", "handler" ]
d54e0905dfe74d1c114c04f33fa89a60e2651562
https://github.com/gluephp/glue/blob/d54e0905dfe74d1c114c04f33fa89a60e2651562/src/Router/Router.php#L42-L47
205,146
Synapse-Cmf/synapse-cmf
src/Synapse/Cmf/Framework/Theme/Zone/Repository/Doctrine/DoctrineRepository.php
DoctrineRepository.onCreateZone
public function onCreateZone(ZoneEvent $event) { $zone = $event->getZone(); if ($zone->getComponents()->isEmpty()) { return; } $this->save($zone); }
php
public function onCreateZone(ZoneEvent $event) { $zone = $event->getZone(); if ($zone->getComponents()->isEmpty()) { return; } $this->save($zone); }
[ "public", "function", "onCreateZone", "(", "ZoneEvent", "$", "event", ")", "{", "$", "zone", "=", "$", "event", "->", "getZone", "(", ")", ";", "if", "(", "$", "zone", "->", "getComponents", "(", ")", "->", "isEmpty", "(", ")", ")", "{", "return", ...
Zone creation event handler. Triggers persistence call only if component was defined into it. @param ZoneEvent $event
[ "Zone", "creation", "event", "handler", ".", "Triggers", "persistence", "call", "only", "if", "component", "was", "defined", "into", "it", "." ]
d8122a4150a83d5607289724425cf35c56a5e880
https://github.com/Synapse-Cmf/synapse-cmf/blob/d8122a4150a83d5607289724425cf35c56a5e880/src/Synapse/Cmf/Framework/Theme/Zone/Repository/Doctrine/DoctrineRepository.php#L38-L46
205,147
phpui/hom-php
src/HOM/Container.php
Container.setItem
public function setItem($item, $index = null): ContainerInterface { if (is_null($index)) { $this->items[] = $item; } else { $this->items[$index] = $item; } return $this; }
php
public function setItem($item, $index = null): ContainerInterface { if (is_null($index)) { $this->items[] = $item; } else { $this->items[$index] = $item; } return $this; }
[ "public", "function", "setItem", "(", "$", "item", ",", "$", "index", "=", "null", ")", ":", "ContainerInterface", "{", "if", "(", "is_null", "(", "$", "index", ")", ")", "{", "$", "this", "->", "items", "[", "]", "=", "$", "item", ";", "}", "els...
Set an item into children list. @param mixed $item @param mixed $index Optional. @return \HOM\ContainerInterface
[ "Set", "an", "item", "into", "children", "list", "." ]
c4eccd3e64cf8c7b5ff663f9fea3f31579e17006
https://github.com/phpui/hom-php/blob/c4eccd3e64cf8c7b5ff663f9fea3f31579e17006/src/HOM/Container.php#L54-L62
205,148
phpui/hom-php
src/HOM/Container.php
Container.removeItemByIndex
public function removeItemByIndex($index): ContainerInterface { if ($this->hasItem($index)) { $this->items[$index] = null; //prevente unset item. unset($this->items[$index]); //unset only index, not the item. } return $this; }
php
public function removeItemByIndex($index): ContainerInterface { if ($this->hasItem($index)) { $this->items[$index] = null; //prevente unset item. unset($this->items[$index]); //unset only index, not the item. } return $this; }
[ "public", "function", "removeItemByIndex", "(", "$", "index", ")", ":", "ContainerInterface", "{", "if", "(", "$", "this", "->", "hasItem", "(", "$", "index", ")", ")", "{", "$", "this", "->", "items", "[", "$", "index", "]", "=", "null", ";", "//pre...
Removes the child from the children list for the given index. @param mixed $index @return \HOM\ContainerInterface
[ "Removes", "the", "child", "from", "the", "children", "list", "for", "the", "given", "index", "." ]
c4eccd3e64cf8c7b5ff663f9fea3f31579e17006
https://github.com/phpui/hom-php/blob/c4eccd3e64cf8c7b5ff663f9fea3f31579e17006/src/HOM/Container.php#L127-L135
205,149
phpui/hom-php
src/HOM/Container.php
Container.getItemsCode
protected function getItemsCode(): string { $code = ''; if ($this->countItems() > 0) { foreach ($this->getAllItems() as $item) { if (is_string($item)) { $code .= $item; } else { $code .= (string) $item; ...
php
protected function getItemsCode(): string { $code = ''; if ($this->countItems() > 0) { foreach ($this->getAllItems() as $item) { if (is_string($item)) { $code .= $item; } else { $code .= (string) $item; ...
[ "protected", "function", "getItemsCode", "(", ")", ":", "string", "{", "$", "code", "=", "''", ";", "if", "(", "$", "this", "->", "countItems", "(", ")", ">", "0", ")", "{", "foreach", "(", "$", "this", "->", "getAllItems", "(", ")", "as", "$", "...
Get html code for children. @return string
[ "Get", "html", "code", "for", "children", "." ]
c4eccd3e64cf8c7b5ff663f9fea3f31579e17006
https://github.com/phpui/hom-php/blob/c4eccd3e64cf8c7b5ff663f9fea3f31579e17006/src/HOM/Container.php#L142-L155
205,150
Etenil/assegai
src/assegai/Controller.php
Controller.helper
function helper($helper_name) { if(array_key_exists($helper_name, $this->helpers)) { return $this->helpers[$helper_name]; } else { $classname = 'Helper_' . ucwords($helper_name); return new $classname($this->modules, $this->server, $this->request, $this->secur...
php
function helper($helper_name) { if(array_key_exists($helper_name, $this->helpers)) { return $this->helpers[$helper_name]; } else { $classname = 'Helper_' . ucwords($helper_name); return new $classname($this->modules, $this->server, $this->request, $this->secur...
[ "function", "helper", "(", "$", "helper_name", ")", "{", "if", "(", "array_key_exists", "(", "$", "helper_name", ",", "$", "this", "->", "helpers", ")", ")", "{", "return", "$", "this", "->", "helpers", "[", "$", "helper_name", "]", ";", "}", "else", ...
Instanciates a helper.
[ "Instanciates", "a", "helper", "." ]
d43cce1a88f1c332f60dd0a4374b17764852af9e
https://github.com/Etenil/assegai/blob/d43cce1a88f1c332f60dd0a4374b17764852af9e/src/assegai/Controller.php#L147-L155
205,151
Etenil/assegai
src/assegai/Controller.php
Controller.view
function view($view_name, array $var_list = NULL, array $block_list = NULL) { if($var_list === NULL) { $var_list = array(); // Avoids notices. } $vars = (object)$var_list; $blocks = (object)$block_list; if($hook_data = $this->modules->preView($this->request, $vie...
php
function view($view_name, array $var_list = NULL, array $block_list = NULL) { if($var_list === NULL) { $var_list = array(); // Avoids notices. } $vars = (object)$var_list; $blocks = (object)$block_list; if($hook_data = $this->modules->preView($this->request, $vie...
[ "function", "view", "(", "$", "view_name", ",", "array", "$", "var_list", "=", "NULL", ",", "array", "$", "block_list", "=", "NULL", ")", "{", "if", "(", "$", "var_list", "===", "NULL", ")", "{", "$", "var_list", "=", "array", "(", ")", ";", "// Av...
Loads a view.
[ "Loads", "a", "view", "." ]
d43cce1a88f1c332f60dd0a4374b17764852af9e
https://github.com/Etenil/assegai/blob/d43cce1a88f1c332f60dd0a4374b17764852af9e/src/assegai/Controller.php#L160-L231
205,152
Etenil/assegai
src/assegai/Controller.php
Controller.model
protected function model($model_name) { if(stripos($model_name, 'model') === false) { $model_name = sprintf('%s\models\%s', $this->server->getAppName(), $model_name); } if($hook_data = $this->modules->preModel($model_name)) { return $hook_data; } if(...
php
protected function model($model_name) { if(stripos($model_name, 'model') === false) { $model_name = sprintf('%s\models\%s', $this->server->getAppName(), $model_name); } if($hook_data = $this->modules->preModel($model_name)) { return $hook_data; } if(...
[ "protected", "function", "model", "(", "$", "model_name", ")", "{", "if", "(", "stripos", "(", "$", "model_name", ",", "'model'", ")", "===", "false", ")", "{", "$", "model_name", "=", "sprintf", "(", "'%s\\models\\%s'", ",", "$", "this", "->", "server",...
Loads a model.
[ "Loads", "a", "model", "." ]
d43cce1a88f1c332f60dd0a4374b17764852af9e
https://github.com/Etenil/assegai/blob/d43cce1a88f1c332f60dd0a4374b17764852af9e/src/assegai/Controller.php#L236-L257
205,153
Etenil/assegai
src/assegai/Controller.php
Controller.dump
protected function dump($var, $no_html = false) { $dump = var_export($var, true); if($no_html) { return $dump; } else { return '<pre>' . htmlentities($dump) . '</pre>' . PHP_EOL;; } }
php
protected function dump($var, $no_html = false) { $dump = var_export($var, true); if($no_html) { return $dump; } else { return '<pre>' . htmlentities($dump) . '</pre>' . PHP_EOL;; } }
[ "protected", "function", "dump", "(", "$", "var", ",", "$", "no_html", "=", "false", ")", "{", "$", "dump", "=", "var_export", "(", "$", "var", ",", "true", ")", ";", "if", "(", "$", "no_html", ")", "{", "return", "$", "dump", ";", "}", "else", ...
Tiny wrapper arround var_dump to ease debugging. @param mixed $var is the variable to be dumped @param boolean $no_html defines whether the variable contains messy HTML characters or not. The given $var will be escaped if set to false. Default is false. @return The HTML code of a human representation of the $var.
[ "Tiny", "wrapper", "arround", "var_dump", "to", "ease", "debugging", "." ]
d43cce1a88f1c332f60dd0a4374b17764852af9e
https://github.com/Etenil/assegai/blob/d43cce1a88f1c332f60dd0a4374b17764852af9e/src/assegai/Controller.php#L277-L285
205,154
Etenil/assegai
src/assegai/Controller.php
Controller.checkCsrf
protected final function checkCsrf() { $valid = false; $r = $this->request; if($r->getSession('assegai_csrf_token') && $r->post('csrf') && $r->getSession('assegai_csrf_token') == $r->post('csrf')) { $valid = true; } ...
php
protected final function checkCsrf() { $valid = false; $r = $this->request; if($r->getSession('assegai_csrf_token') && $r->post('csrf') && $r->getSession('assegai_csrf_token') == $r->post('csrf')) { $valid = true; } ...
[ "protected", "final", "function", "checkCsrf", "(", ")", "{", "$", "valid", "=", "false", ";", "$", "r", "=", "$", "this", "->", "request", ";", "if", "(", "$", "r", "->", "getSession", "(", "'assegai_csrf_token'", ")", "&&", "$", "r", "->", "post", ...
Checks the validity of the CSRF token.
[ "Checks", "the", "validity", "of", "the", "CSRF", "token", "." ]
d43cce1a88f1c332f60dd0a4374b17764852af9e
https://github.com/Etenil/assegai/blob/d43cce1a88f1c332f60dd0a4374b17764852af9e/src/assegai/Controller.php#L319-L333
205,155
objective-php/events-handler
src/EventsHandlerAwareTrait.php
EventsHandlerAwareTrait.trigger
public function trigger($eventName, $origin = null, $context = [], EventInterface $event = null) { if ($eventsHandler = $this->getEventsHandler()) { $eventsHandler->trigger($eventName, $origin, $context, $event); } }
php
public function trigger($eventName, $origin = null, $context = [], EventInterface $event = null) { if ($eventsHandler = $this->getEventsHandler()) { $eventsHandler->trigger($eventName, $origin, $context, $event); } }
[ "public", "function", "trigger", "(", "$", "eventName", ",", "$", "origin", "=", "null", ",", "$", "context", "=", "[", "]", ",", "EventInterface", "$", "event", "=", "null", ")", "{", "if", "(", "$", "eventsHandler", "=", "$", "this", "->", "getEven...
Proxy trigger method @param string $eventName @param mixed $origin @param array $context @param EventInterface|null $event
[ "Proxy", "trigger", "method" ]
2e8fb6c5649bb1cc22ae4541ea0467031b4505ed
https://github.com/objective-php/events-handler/blob/2e8fb6c5649bb1cc22ae4541ea0467031b4505ed/src/EventsHandlerAwareTrait.php#L49-L54
205,156
objective-php/events-handler
src/EventsHandlerAwareTrait.php
EventsHandlerAwareTrait.bind
public function bind($eventName, $callback, $mode = EventsHandlerInterface::BINDING_MODE_LAST) { if ($eventsHandler = $this->getEventsHandler()) { $eventsHandler->bind($eventName, $callback, $mode); } }
php
public function bind($eventName, $callback, $mode = EventsHandlerInterface::BINDING_MODE_LAST) { if ($eventsHandler = $this->getEventsHandler()) { $eventsHandler->bind($eventName, $callback, $mode); } }
[ "public", "function", "bind", "(", "$", "eventName", ",", "$", "callback", ",", "$", "mode", "=", "EventsHandlerInterface", "::", "BINDING_MODE_LAST", ")", "{", "if", "(", "$", "eventsHandler", "=", "$", "this", "->", "getEventsHandler", "(", ")", ")", "{"...
Proxy bind method @param string $eventName @param string $callback @param string $mode
[ "Proxy", "bind", "method" ]
2e8fb6c5649bb1cc22ae4541ea0467031b4505ed
https://github.com/objective-php/events-handler/blob/2e8fb6c5649bb1cc22ae4541ea0467031b4505ed/src/EventsHandlerAwareTrait.php#L63-L68
205,157
RadialCorp/magento-core
src/app/code/community/Radial/Core/Model/Observer.php
Radial_Core_Model_Observer.processExchangePlatformOrder
public function processExchangePlatformOrder(Varien_Event_Observer $observer) { $order = $observer->getEvent()->getOrder(); $quote = $order->getQuote(); Mage::dispatchEvent('ebayenterprise_giftcard_redeem', array('quote' => $quote, 'order' => $order)); return $this; }
php
public function processExchangePlatformOrder(Varien_Event_Observer $observer) { $order = $observer->getEvent()->getOrder(); $quote = $order->getQuote(); Mage::dispatchEvent('ebayenterprise_giftcard_redeem', array('quote' => $quote, 'order' => $order)); return $this; }
[ "public", "function", "processExchangePlatformOrder", "(", "Varien_Event_Observer", "$", "observer", ")", "{", "$", "order", "=", "$", "observer", "->", "getEvent", "(", ")", "->", "getOrder", "(", ")", ";", "$", "quote", "=", "$", "order", "->", "getQuote",...
Perform all processing necessary for the order to be placed with the Exchange Platform - allocate inventory, redeem SVC. If any of the observers need to indicate that an order should not be created, the observer method should throw an exception. Observers the 'sales_order_place_before' event. @see Mage_Sales_Model_Ord...
[ "Perform", "all", "processing", "necessary", "for", "the", "order", "to", "be", "placed", "with", "the", "Exchange", "Platform", "-", "allocate", "inventory", "redeem", "SVC", ".", "If", "any", "of", "the", "observers", "need", "to", "indicate", "that", "an"...
9bb5f218d9caf79eab8598f4f8447037a0cc6355
https://github.com/RadialCorp/magento-core/blob/9bb5f218d9caf79eab8598f4f8447037a0cc6355/src/app/code/community/Radial/Core/Model/Observer.php#L91-L97
205,158
RadialCorp/magento-core
src/app/code/community/Radial/Core/Model/Observer.php
Radial_Core_Model_Observer.rollbackExchangePlatformOrder
public function rollbackExchangePlatformOrder(Varien_Event_Observer $observer) { Mage::helper('ebayenterprise_magelog')->debug(__METHOD__); Mage::dispatchEvent('eb2c_order_creation_failure', array( 'quote' => $observer->getEvent()->getQuote(), 'order' => $observer->getEvent()...
php
public function rollbackExchangePlatformOrder(Varien_Event_Observer $observer) { Mage::helper('ebayenterprise_magelog')->debug(__METHOD__); Mage::dispatchEvent('eb2c_order_creation_failure', array( 'quote' => $observer->getEvent()->getQuote(), 'order' => $observer->getEvent()...
[ "public", "function", "rollbackExchangePlatformOrder", "(", "Varien_Event_Observer", "$", "observer", ")", "{", "Mage", "::", "helper", "(", "'ebayenterprise_magelog'", ")", "->", "debug", "(", "__METHOD__", ")", ";", "Mage", "::", "dispatchEvent", "(", "'eb2c_order...
Roll back any Exchange Platform actions made for the order - rollback allocation, void SVC redemptions, void payment auths. Observes the 'sales_model_service_quote_submit_failure' event. @see Mage_Sales_Model_Service_Quote::submitOrder @param Varien_Event_Observer $observer Contains the failed order as well as the quo...
[ "Roll", "back", "any", "Exchange", "Platform", "actions", "made", "for", "the", "order", "-", "rollback", "allocation", "void", "SVC", "redemptions", "void", "payment", "auths", ".", "Observes", "the", "sales_model_service_quote_submit_failure", "event", "." ]
9bb5f218d9caf79eab8598f4f8447037a0cc6355
https://github.com/RadialCorp/magento-core/blob/9bb5f218d9caf79eab8598f4f8447037a0cc6355/src/app/code/community/Radial/Core/Model/Observer.php#L106-L114
205,159
RadialCorp/magento-core
src/app/code/community/Radial/Core/Model/Observer.php
Radial_Core_Model_Observer.handleShipGroupChargeType
public function handleShipGroupChargeType(Varien_Event_Observer $observer) { $event = $observer->getEvent(); $shipGroup = $event->getShipGroupPayload(); Mage::helper('radial_core/shipping_chargetype')->setShippingChargeType($shipGroup); return $this; }
php
public function handleShipGroupChargeType(Varien_Event_Observer $observer) { $event = $observer->getEvent(); $shipGroup = $event->getShipGroupPayload(); Mage::helper('radial_core/shipping_chargetype')->setShippingChargeType($shipGroup); return $this; }
[ "public", "function", "handleShipGroupChargeType", "(", "Varien_Event_Observer", "$", "observer", ")", "{", "$", "event", "=", "$", "observer", "->", "getEvent", "(", ")", ";", "$", "shipGroup", "=", "$", "event", "->", "getShipGroupPayload", "(", ")", ";", ...
respond to the order create's request for a valid ship group charge type @param Varien_Event_Observer $observer @return self
[ "respond", "to", "the", "order", "create", "s", "request", "for", "a", "valid", "ship", "group", "charge", "type" ]
9bb5f218d9caf79eab8598f4f8447037a0cc6355
https://github.com/RadialCorp/magento-core/blob/9bb5f218d9caf79eab8598f4f8447037a0cc6355/src/app/code/community/Radial/Core/Model/Observer.php#L135-L141
205,160
RadialCorp/magento-core
src/app/code/community/Radial/Core/Model/Observer.php
Radial_Core_Model_Observer.handleSalesQuoteCollectTotalsAfter
public function handleSalesQuoteCollectTotalsAfter(Varien_Event_Observer $observer) { $event = $observer->getEvent(); /** @var Mage_Sales_Model_Quote $quote */ $quote = $event->getQuote(); /** @var Mage_Sales_Model_Resource_Quote_Address_Collection */ $addresses = $quote->get...
php
public function handleSalesQuoteCollectTotalsAfter(Varien_Event_Observer $observer) { $event = $observer->getEvent(); /** @var Mage_Sales_Model_Quote $quote */ $quote = $event->getQuote(); /** @var Mage_Sales_Model_Resource_Quote_Address_Collection */ $addresses = $quote->get...
[ "public", "function", "handleSalesQuoteCollectTotalsAfter", "(", "Varien_Event_Observer", "$", "observer", ")", "{", "$", "event", "=", "$", "observer", "->", "getEvent", "(", ")", ";", "/** @var Mage_Sales_Model_Quote $quote */", "$", "quote", "=", "$", "event", "-...
Account for shipping discounts not attached to an item. Combine all shipping discounts into one. @see self::handleSalesConvertQuoteAddressToOrderAddress @see Mage_SalesRule_Model_Validator::processShippingAmount @param Varien_Event_Observer @return void
[ "Account", "for", "shipping", "discounts", "not", "attached", "to", "an", "item", ".", "Combine", "all", "shipping", "discounts", "into", "one", "." ]
9bb5f218d9caf79eab8598f4f8447037a0cc6355
https://github.com/RadialCorp/magento-core/blob/9bb5f218d9caf79eab8598f4f8447037a0cc6355/src/app/code/community/Radial/Core/Model/Observer.php#L152-L172
205,161
RadialCorp/magento-core
src/app/code/community/Radial/Core/Model/Observer.php
Radial_Core_Model_Observer.handleSalesRuleValidatorProcess
public function handleSalesRuleValidatorProcess(Varien_Event_Observer $observer) { /** @var Varien_Event $event */ $event = $observer->getEvent(); /** @var Mage_SalesRule_Model_Rule $rule */ $rule = $event->getRule(); /** @var Mage_Sales_Model_Quote $quote */ $quote =...
php
public function handleSalesRuleValidatorProcess(Varien_Event_Observer $observer) { /** @var Varien_Event $event */ $event = $observer->getEvent(); /** @var Mage_SalesRule_Model_Rule $rule */ $rule = $event->getRule(); /** @var Mage_Sales_Model_Quote $quote */ $quote =...
[ "public", "function", "handleSalesRuleValidatorProcess", "(", "Varien_Event_Observer", "$", "observer", ")", "{", "/** @var Varien_Event $event */", "$", "event", "=", "$", "observer", "->", "getEvent", "(", ")", ";", "/** @var Mage_SalesRule_Model_Rule $rule */", "$", "r...
Account for discounts in order create request. @see self::handleSalesConvertQuoteItemToOrderItem @see Mage_SalesRule_Model_Validator::process @see Order-Datatypes-Common-1.0.xsd:PromoDiscountSet @param Varien_Event_Observer @return void
[ "Account", "for", "discounts", "in", "order", "create", "request", "." ]
9bb5f218d9caf79eab8598f4f8447037a0cc6355
https://github.com/RadialCorp/magento-core/blob/9bb5f218d9caf79eab8598f4f8447037a0cc6355/src/app/code/community/Radial/Core/Model/Observer.php#L183-L226
205,162
RadialCorp/magento-core
src/app/code/community/Radial/Core/Model/Observer.php
Radial_Core_Model_Observer.calculateDiscountAmount
protected function calculateDiscountAmount(Mage_Sales_Model_Quote_Item_Abstract $item, Varien_Object $result, array $data) { /** @var float */ $itemRowTotal = $item->getBaseRowTotal(); /** @var float */ $currentDiscountAmount = $result->getBaseDiscountAmount(); /** @var float...
php
protected function calculateDiscountAmount(Mage_Sales_Model_Quote_Item_Abstract $item, Varien_Object $result, array $data) { /** @var float */ $itemRowTotal = $item->getBaseRowTotal(); /** @var float */ $currentDiscountAmount = $result->getBaseDiscountAmount(); /** @var float...
[ "protected", "function", "calculateDiscountAmount", "(", "Mage_Sales_Model_Quote_Item_Abstract", "$", "item", ",", "Varien_Object", "$", "result", ",", "array", "$", "data", ")", "{", "/** @var float */", "$", "itemRowTotal", "=", "$", "item", "->", "getBaseRowTotal",...
When the previously applied discount amount on the item row total is less than the current applied discount recalculate the current discount to account for previously applied discount. Otherwise, don't recalculate the current discount. @param Mage_Sales_Model_Quote_Item @param Varien_Object @param array @return flo...
[ "When", "the", "previously", "applied", "discount", "amount", "on", "the", "item", "row", "total", "is", "less", "than", "the", "current", "applied", "discount", "recalculate", "the", "current", "discount", "to", "account", "for", "previously", "applied", "disco...
9bb5f218d9caf79eab8598f4f8447037a0cc6355
https://github.com/RadialCorp/magento-core/blob/9bb5f218d9caf79eab8598f4f8447037a0cc6355/src/app/code/community/Radial/Core/Model/Observer.php#L239-L258
205,163
ellipsephp/handlers-adr
src/ContainerResponder.php
ContainerResponder.response
public function response(ServerRequestInterface $request, PayloadInterface $payload): ResponseInterface { $responder = $this->container->get($this->id); if ($responder instanceof ResponderInterface) { return $responder->response($request, $payload); } throw new Contai...
php
public function response(ServerRequestInterface $request, PayloadInterface $payload): ResponseInterface { $responder = $this->container->get($this->id); if ($responder instanceof ResponderInterface) { return $responder->response($request, $payload); } throw new Contai...
[ "public", "function", "response", "(", "ServerRequestInterface", "$", "request", ",", "PayloadInterface", "$", "payload", ")", ":", "ResponseInterface", "{", "$", "responder", "=", "$", "this", "->", "container", "->", "get", "(", "$", "this", "->", "id", ")...
Get the responder from the container then proxy its response method. @param \Psr\Http\Message\ServerRequestInterface $request @param \Ellipse\ADR\PayloadInterface $payload @return \Psr\Http\Message\ResponseInterface @throws \Ellipse\Handlers\Exceptions\ContainedResponderTypeException
[ "Get", "the", "responder", "from", "the", "container", "then", "proxy", "its", "response", "method", "." ]
1c0879494a8b7718f7e157d0cd41b4c5ec19b5c5
https://github.com/ellipsephp/handlers-adr/blob/1c0879494a8b7718f7e157d0cd41b4c5ec19b5c5/src/ContainerResponder.php#L50-L61
205,164
as3io/modlr
src/Metadata/Cache/CacheWarmer.php
CacheWarmer.clear
public function clear($type = null) { if (false === $this->mf->hasCache()) { return []; } return $this->doClear($this->getTypes($type)); }
php
public function clear($type = null) { if (false === $this->mf->hasCache()) { return []; } return $this->doClear($this->getTypes($type)); }
[ "public", "function", "clear", "(", "$", "type", "=", "null", ")", "{", "if", "(", "false", "===", "$", "this", "->", "mf", "->", "hasCache", "(", ")", ")", "{", "return", "[", "]", ";", "}", "return", "$", "this", "->", "doClear", "(", "$", "t...
Clears metadata objects from the cache. @param string|array|null $type @return array
[ "Clears", "metadata", "objects", "from", "the", "cache", "." ]
7e684b88bb22a2e18397df9402075c6533084b16
https://github.com/as3io/modlr/blob/7e684b88bb22a2e18397df9402075c6533084b16/src/Metadata/Cache/CacheWarmer.php#L38-L44
205,165
as3io/modlr
src/Metadata/Cache/CacheWarmer.php
CacheWarmer.warm
public function warm($type = null) { if (false === $this->mf->hasCache()) { return []; } return $this->doWarm($this->getTypes($type)); }
php
public function warm($type = null) { if (false === $this->mf->hasCache()) { return []; } return $this->doWarm($this->getTypes($type)); }
[ "public", "function", "warm", "(", "$", "type", "=", "null", ")", "{", "if", "(", "false", "===", "$", "this", "->", "mf", "->", "hasCache", "(", ")", ")", "{", "return", "[", "]", ";", "}", "return", "$", "this", "->", "doWarm", "(", "$", "thi...
Warms up metadata objects into the cache. @param string|array|null $type @return array
[ "Warms", "up", "metadata", "objects", "into", "the", "cache", "." ]
7e684b88bb22a2e18397df9402075c6533084b16
https://github.com/as3io/modlr/blob/7e684b88bb22a2e18397df9402075c6533084b16/src/Metadata/Cache/CacheWarmer.php#L52-L58
205,166
as3io/modlr
src/Metadata/Cache/CacheWarmer.php
CacheWarmer.doClear
private function doClear(array $types) { $cleared = []; $this->mf->enableCache(false); foreach ($types as $type) { $metadata = $this->mf->getMetadataForType($type); $this->mf->getCache()->evictMetadataFromCache($metadata); $cleared[] = $type; } ...
php
private function doClear(array $types) { $cleared = []; $this->mf->enableCache(false); foreach ($types as $type) { $metadata = $this->mf->getMetadataForType($type); $this->mf->getCache()->evictMetadataFromCache($metadata); $cleared[] = $type; } ...
[ "private", "function", "doClear", "(", "array", "$", "types", ")", "{", "$", "cleared", "=", "[", "]", ";", "$", "this", "->", "mf", "->", "enableCache", "(", "false", ")", ";", "foreach", "(", "$", "types", "as", "$", "type", ")", "{", "$", "met...
Clears metadata objects for the provided model types. @param array $types @return array
[ "Clears", "metadata", "objects", "for", "the", "provided", "model", "types", "." ]
7e684b88bb22a2e18397df9402075c6533084b16
https://github.com/as3io/modlr/blob/7e684b88bb22a2e18397df9402075c6533084b16/src/Metadata/Cache/CacheWarmer.php#L66-L80
205,167
as3io/modlr
src/Metadata/Cache/CacheWarmer.php
CacheWarmer.doWarm
private function doWarm(array $types) { $warmed = []; $this->doClear($types); foreach ($types as $type) { $this->mf->getMetadataForType($type); $warmed[] = $type; } return $warmed; }
php
private function doWarm(array $types) { $warmed = []; $this->doClear($types); foreach ($types as $type) { $this->mf->getMetadataForType($type); $warmed[] = $type; } return $warmed; }
[ "private", "function", "doWarm", "(", "array", "$", "types", ")", "{", "$", "warmed", "=", "[", "]", ";", "$", "this", "->", "doClear", "(", "$", "types", ")", ";", "foreach", "(", "$", "types", "as", "$", "type", ")", "{", "$", "this", "->", "...
Warms up the metadata objects for the provided model types. @param array $types @return array
[ "Warms", "up", "the", "metadata", "objects", "for", "the", "provided", "model", "types", "." ]
7e684b88bb22a2e18397df9402075c6533084b16
https://github.com/as3io/modlr/blob/7e684b88bb22a2e18397df9402075c6533084b16/src/Metadata/Cache/CacheWarmer.php#L88-L97
205,168
IftekherSunny/Planet-Framework
src/Sun/Mail/Mailer.php
Mailer.send
public function send($email, $name = null, $subject, $body, $attachment = null, $bcc = null) { $this->phpMailer->isSMTP(); $this->phpMailer->Host = $this->app->config->getMail('host'); $this->phpMailer->SMTPAuth = true; $this->phpMailer->Username = $this->app->config->getMail('u...
php
public function send($email, $name = null, $subject, $body, $attachment = null, $bcc = null) { $this->phpMailer->isSMTP(); $this->phpMailer->Host = $this->app->config->getMail('host'); $this->phpMailer->SMTPAuth = true; $this->phpMailer->Username = $this->app->config->getMail('u...
[ "public", "function", "send", "(", "$", "email", ",", "$", "name", "=", "null", ",", "$", "subject", ",", "$", "body", ",", "$", "attachment", "=", "null", ",", "$", "bcc", "=", "null", ")", "{", "$", "this", "->", "phpMailer", "->", "isSMTP", "(...
To send an email @param string $email @param string $name @param string $subject @param string $body @param string $attachment @param array $bcc @return bool @throws MailerException
[ "To", "send", "an", "email" ]
530e772fb97695c1c4e1af73f81675f189474d9f
https://github.com/IftekherSunny/Planet-Framework/blob/530e772fb97695c1c4e1af73f81675f189474d9f/src/Sun/Mail/Mailer.php#L63-L117
205,169
IftekherSunny/Planet-Framework
src/Sun/Mail/Mailer.php
Mailer.logEmail
protected function logEmail($body) { if(!$this->filesystem->exists($this->getLogDirectory())) { $this->filesystem->createDirectory($this->getLogDirectory()); } return $this->filesystem->create($this->logFileName, $body); }
php
protected function logEmail($body) { if(!$this->filesystem->exists($this->getLogDirectory())) { $this->filesystem->createDirectory($this->getLogDirectory()); } return $this->filesystem->create($this->logFileName, $body); }
[ "protected", "function", "logEmail", "(", "$", "body", ")", "{", "if", "(", "!", "$", "this", "->", "filesystem", "->", "exists", "(", "$", "this", "->", "getLogDirectory", "(", ")", ")", ")", "{", "$", "this", "->", "filesystem", "->", "createDirector...
Generate Email Log File @param $body @return bool
[ "Generate", "Email", "Log", "File" ]
530e772fb97695c1c4e1af73f81675f189474d9f
https://github.com/IftekherSunny/Planet-Framework/blob/530e772fb97695c1c4e1af73f81675f189474d9f/src/Sun/Mail/Mailer.php#L126-L133
205,170
PhoxPHP/Glider
src/Console/TemplateBuilder.php
TemplateBuilder.createClassTemplate
public function createClassTemplate(String $templateName, String $filename, $savePath=null, Array $templateTags) { $template = file_get_contents(__DIR__ . '/templates/' . $templateName); foreach($templateTags as $key => $tag) { if (!preg_match_all('/' . $key . '/', $template)) { throw new RuntimeException(s...
php
public function createClassTemplate(String $templateName, String $filename, $savePath=null, Array $templateTags) { $template = file_get_contents(__DIR__ . '/templates/' . $templateName); foreach($templateTags as $key => $tag) { if (!preg_match_all('/' . $key . '/', $template)) { throw new RuntimeException(s...
[ "public", "function", "createClassTemplate", "(", "String", "$", "templateName", ",", "String", "$", "filename", ",", "$", "savePath", "=", "null", ",", "Array", "$", "templateTags", ")", "{", "$", "template", "=", "file_get_contents", "(", "__DIR__", ".", "...
Builds a class template. @param $templateName <String> @param $filename <String> @param $savePath <String> @param $templateTags <Array> @access public @return <void>
[ "Builds", "a", "class", "template", "." ]
17aaf3b7bb6e70ea3ae1f04e30a7690e884bf042
https://github.com/PhoxPHP/Glider/blob/17aaf3b7bb6e70ea3ae1f04e30a7690e884bf042/src/Console/TemplateBuilder.php#L68-L101
205,171
stonedz/pff2
src/modules/logger/Utils/LoggerFile.php
LoggerFile.getLogFile
public function getLogFile() { if ($this->_fp === null) { $this->LOG_DIR = ROOT .DS. 'app' . DS . 'logs'; $filename = $this->LOG_DIR . DS . date("Y-m-d"); $this->_fp = fopen($filename, 'a'); if ($this->_fp === false) { throw new LoggerEx...
php
public function getLogFile() { if ($this->_fp === null) { $this->LOG_DIR = ROOT .DS. 'app' . DS . 'logs'; $filename = $this->LOG_DIR . DS . date("Y-m-d"); $this->_fp = fopen($filename, 'a'); if ($this->_fp === false) { throw new LoggerEx...
[ "public", "function", "getLogFile", "(", ")", "{", "if", "(", "$", "this", "->", "_fp", "===", "null", ")", "{", "$", "this", "->", "LOG_DIR", "=", "ROOT", ".", "DS", ".", "'app'", ".", "DS", ".", "'logs'", ";", "$", "filename", "=", "$", "this",...
Opens log file only if it's not already open @throws LoggerException @return null|resource
[ "Opens", "log", "file", "only", "if", "it", "s", "not", "already", "open" ]
ec3b087d4d4732816f61ac487f0cb25511e0da88
https://github.com/stonedz/pff2/blob/ec3b087d4d4732816f61ac487f0cb25511e0da88/src/modules/logger/Utils/LoggerFile.php#L55-L69
205,172
crisu83/yii-consoletools
commands/FlushCommand.php
FlushCommand.flush
protected function flush() { echo "\nFlushing directories... "; foreach ($this->flushPaths as $dir) { $path = $this->basePath . '/' . $dir; if (file_exists($path)) { $this->flushDirectory($path); } $this->ensureDirectory($path); ...
php
protected function flush() { echo "\nFlushing directories... "; foreach ($this->flushPaths as $dir) { $path = $this->basePath . '/' . $dir; if (file_exists($path)) { $this->flushDirectory($path); } $this->ensureDirectory($path); ...
[ "protected", "function", "flush", "(", ")", "{", "echo", "\"\\nFlushing directories... \"", ";", "foreach", "(", "$", "this", "->", "flushPaths", "as", "$", "dir", ")", "{", "$", "path", "=", "$", "this", "->", "basePath", ".", "'/'", ".", "$", "dir", ...
Flushes directories.
[ "Flushes", "directories", "." ]
53bcb1bcdd33b9ef79034ff9c0d5bbfb3f971afc
https://github.com/crisu83/yii-consoletools/blob/53bcb1bcdd33b9ef79034ff9c0d5bbfb3f971afc/commands/FlushCommand.php#L47-L58
205,173
crisu83/yii-consoletools
commands/FlushCommand.php
FlushCommand.flushDirectory
protected function flushDirectory($path, $delete = false) { if (is_dir($path)) { $entries = scandir($path); foreach ($entries as $entry) { $exclude = array_merge(array('.', '..'), $this->exclude); if (in_array($entry, $exclude)) { c...
php
protected function flushDirectory($path, $delete = false) { if (is_dir($path)) { $entries = scandir($path); foreach ($entries as $entry) { $exclude = array_merge(array('.', '..'), $this->exclude); if (in_array($entry, $exclude)) { c...
[ "protected", "function", "flushDirectory", "(", "$", "path", ",", "$", "delete", "=", "false", ")", "{", "if", "(", "is_dir", "(", "$", "path", ")", ")", "{", "$", "entries", "=", "scandir", "(", "$", "path", ")", ";", "foreach", "(", "$", "entries...
Flushes a directory recursively. @param string $path the directory path. @param boolean $delete whether to delete the directory.
[ "Flushes", "a", "directory", "recursively", "." ]
53bcb1bcdd33b9ef79034ff9c0d5bbfb3f971afc
https://github.com/crisu83/yii-consoletools/blob/53bcb1bcdd33b9ef79034ff9c0d5bbfb3f971afc/commands/FlushCommand.php#L65-L85
205,174
jasny/meta
src/Source/CombinedSource.php
CombinedSource.mergeMeta
protected function mergeMeta(array $meta, array $sourceMeta): array { $properties = $meta['properties'] ?? []; $sourceProperties = $sourceMeta['properties'] ?? []; foreach ($sourceProperties as $name => $data) { $properties[$name] = array_merge($properties[$name] ?? [], $data); ...
php
protected function mergeMeta(array $meta, array $sourceMeta): array { $properties = $meta['properties'] ?? []; $sourceProperties = $sourceMeta['properties'] ?? []; foreach ($sourceProperties as $name => $data) { $properties[$name] = array_merge($properties[$name] ?? [], $data); ...
[ "protected", "function", "mergeMeta", "(", "array", "$", "meta", ",", "array", "$", "sourceMeta", ")", ":", "array", "{", "$", "properties", "=", "$", "meta", "[", "'properties'", "]", "??", "[", "]", ";", "$", "sourceProperties", "=", "$", "sourceMeta",...
Merge meta data @param array $meta @param array $sourceMeta @return array
[ "Merge", "meta", "data" ]
26cf119542433776fecc6c31341787091fc2dbb6
https://github.com/jasny/meta/blob/26cf119542433776fecc6c31341787091fc2dbb6/src/Source/CombinedSource.php#L60-L73
205,175
Phpillip/phpillip
src/Controller/ContentController.php
ContentController.page
public function page(Request $request, Application $app, Paginator $paginator) { return array_merge( ['pages' => count($paginator)], $this->extractViewParameters($request, ['app', 'paginator']) ); }
php
public function page(Request $request, Application $app, Paginator $paginator) { return array_merge( ['pages' => count($paginator)], $this->extractViewParameters($request, ['app', 'paginator']) ); }
[ "public", "function", "page", "(", "Request", "$", "request", ",", "Application", "$", "app", ",", "Paginator", "$", "paginator", ")", "{", "return", "array_merge", "(", "[", "'pages'", "=>", "count", "(", "$", "paginator", ")", "]", ",", "$", "this", ...
Paginated list of contents @param Request $request @param Application $app @param Paginator $paginator @return array
[ "Paginated", "list", "of", "contents" ]
c37afaafb536361e7e0b564659f1cd5b80b98be9
https://github.com/Phpillip/phpillip/blob/c37afaafb536361e7e0b564659f1cd5b80b98be9/src/Controller/ContentController.php#L36-L42
205,176
Phpillip/phpillip
src/Controller/ContentController.php
ContentController.extractViewParameters
protected function extractViewParameters(Request $request, array $exclude = []) { $parameters = []; foreach ($request->attributes as $key => $value) { if (strpos($key, '_') !== 0 && !in_array($key, $exclude)) { $parameters[$key] = $value; } } ...
php
protected function extractViewParameters(Request $request, array $exclude = []) { $parameters = []; foreach ($request->attributes as $key => $value) { if (strpos($key, '_') !== 0 && !in_array($key, $exclude)) { $parameters[$key] = $value; } } ...
[ "protected", "function", "extractViewParameters", "(", "Request", "$", "request", ",", "array", "$", "exclude", "=", "[", "]", ")", "{", "$", "parameters", "=", "[", "]", ";", "foreach", "(", "$", "request", "->", "attributes", "as", "$", "key", "=>", ...
Extract view parameters from Request attributes @param Request $request @param array $exclude Keys to exclude from view @return array
[ "Extract", "view", "parameters", "from", "Request", "attributes" ]
c37afaafb536361e7e0b564659f1cd5b80b98be9
https://github.com/Phpillip/phpillip/blob/c37afaafb536361e7e0b564659f1cd5b80b98be9/src/Controller/ContentController.php#L65-L76
205,177
IftekherSunny/Planet-Framework
src/Sun/Bus/CommandTranslator.php
CommandTranslator.translate
public function translate($object) { $commandBaseNamespace = app()->getNamespace() . "Commands"; $handlerBaseNamespace = app()->getNamespace(). "Handlers"; $reflectionObject = new ReflectionClass($object); $commandNamespace = $this->getCommandNamespace($commandBaseNamespace,...
php
public function translate($object) { $commandBaseNamespace = app()->getNamespace() . "Commands"; $handlerBaseNamespace = app()->getNamespace(). "Handlers"; $reflectionObject = new ReflectionClass($object); $commandNamespace = $this->getCommandNamespace($commandBaseNamespace,...
[ "public", "function", "translate", "(", "$", "object", ")", "{", "$", "commandBaseNamespace", "=", "app", "(", ")", "->", "getNamespace", "(", ")", ".", "\"Commands\"", ";", "$", "handlerBaseNamespace", "=", "app", "(", ")", "->", "getNamespace", "(", ")",...
To translate command to command handler @param $object @return string @throws CommandNotFoundException @throws HandlerNotFoundException
[ "To", "translate", "command", "to", "command", "handler" ]
530e772fb97695c1c4e1af73f81675f189474d9f
https://github.com/IftekherSunny/Planet-Framework/blob/530e772fb97695c1c4e1af73f81675f189474d9f/src/Sun/Bus/CommandTranslator.php#L19-L48
205,178
IftekherSunny/Planet-Framework
src/Sun/Support/Config.php
Config.find
public function find($item = null, $array = null) { if(is_null($item)) return null; if(strpos($item, '.')) { $arr = explode('.', $item); if(count($arr) > 2 ) { $itemToSearch = join('.', array_slice($arr, 1)); } else { ...
php
public function find($item = null, $array = null) { if(is_null($item)) return null; if(strpos($item, '.')) { $arr = explode('.', $item); if(count($arr) > 2 ) { $itemToSearch = join('.', array_slice($arr, 1)); } else { ...
[ "public", "function", "find", "(", "$", "item", "=", "null", ",", "$", "array", "=", "null", ")", "{", "if", "(", "is_null", "(", "$", "item", ")", ")", "return", "null", ";", "if", "(", "strpos", "(", "$", "item", ",", "'.'", ")", ")", "{", ...
Recursively finds an item from the settings array @param string $item @param array $array @return object/$this
[ "Recursively", "finds", "an", "item", "from", "the", "settings", "array" ]
530e772fb97695c1c4e1af73f81675f189474d9f
https://github.com/IftekherSunny/Planet-Framework/blob/530e772fb97695c1c4e1af73f81675f189474d9f/src/Sun/Support/Config.php#L191-L225
205,179
makinacorpus/drupal-calista
src/PropertyInfo/EntityProperyInfoExtractor.php
EntityProperyInfoExtractor.getLabelFor
private function getLabelFor($property) { switch ($property) { case 'nid': return t("Node ID."); case 'vid': return t("Revision ID."); case 'type': return t("Type"); case 'language': return t(...
php
private function getLabelFor($property) { switch ($property) { case 'nid': return t("Node ID."); case 'vid': return t("Revision ID."); case 'type': return t("Type"); case 'language': return t(...
[ "private", "function", "getLabelFor", "(", "$", "property", ")", "{", "switch", "(", "$", "property", ")", "{", "case", "'nid'", ":", "return", "t", "(", "\"Node ID.\"", ")", ";", "case", "'vid'", ":", "return", "t", "(", "\"Revision ID.\"", ")", ";", ...
Attempt to guess the property description, knowing that Drupalisms are strong and a lot of people will always use the same colum names @param string $property @param string
[ "Attempt", "to", "guess", "the", "property", "description", "knowing", "that", "Drupalisms", "are", "strong", "and", "a", "lot", "of", "people", "will", "always", "use", "the", "same", "colum", "names" ]
cceb6b975fc3e80f0f83c803fc6f6a9ac5852b53
https://github.com/makinacorpus/drupal-calista/blob/cceb6b975fc3e80f0f83c803fc6f6a9ac5852b53/src/PropertyInfo/EntityProperyInfoExtractor.php#L43-L118
205,180
makinacorpus/drupal-calista
src/PropertyInfo/EntityProperyInfoExtractor.php
EntityProperyInfoExtractor.schemaApiTypeToPropertyInfoType
private function schemaApiTypeToPropertyInfoType($type) { switch ($type) { case 'serial': case 'int': return new Type(Type::BUILTIN_TYPE_INT, true); case 'float': case 'numeric': return new Type(Type::BUILTIN_TYPE_FLOAT, true); c...
php
private function schemaApiTypeToPropertyInfoType($type) { switch ($type) { case 'serial': case 'int': return new Type(Type::BUILTIN_TYPE_INT, true); case 'float': case 'numeric': return new Type(Type::BUILTIN_TYPE_FLOAT, true); c...
[ "private", "function", "schemaApiTypeToPropertyInfoType", "(", "$", "type", ")", "{", "switch", "(", "$", "type", ")", "{", "case", "'serial'", ":", "case", "'int'", ":", "return", "new", "Type", "(", "Type", "::", "BUILTIN_TYPE_INT", ",", "true", ")", ";"...
Convert schema API type to property info type @param string $type @return null|Type
[ "Convert", "schema", "API", "type", "to", "property", "info", "type" ]
cceb6b975fc3e80f0f83c803fc6f6a9ac5852b53
https://github.com/makinacorpus/drupal-calista/blob/cceb6b975fc3e80f0f83c803fc6f6a9ac5852b53/src/PropertyInfo/EntityProperyInfoExtractor.php#L127-L144
205,181
makinacorpus/drupal-calista
src/PropertyInfo/EntityProperyInfoExtractor.php
EntityProperyInfoExtractor.getEntityTypeInfo
private function getEntityTypeInfo($class) { $entityType = $this->getEntityType($class); if (!$entityType) { return [null, null]; } $info = entity_get_info($entityType); if (!$info) { return [null, null]; } return [$entityType, $inf...
php
private function getEntityTypeInfo($class) { $entityType = $this->getEntityType($class); if (!$entityType) { return [null, null]; } $info = entity_get_info($entityType); if (!$info) { return [null, null]; } return [$entityType, $inf...
[ "private", "function", "getEntityTypeInfo", "(", "$", "class", ")", "{", "$", "entityType", "=", "$", "this", "->", "getEntityType", "(", "$", "class", ")", ";", "if", "(", "!", "$", "entityType", ")", "{", "return", "[", "null", ",", "null", "]", ";...
Get entity type info for the given class @param string $class @return array If entity type is found, first key is the entity type, second value is the entity info array
[ "Get", "entity", "type", "info", "for", "the", "given", "class" ]
cceb6b975fc3e80f0f83c803fc6f6a9ac5852b53
https://github.com/makinacorpus/drupal-calista/blob/cceb6b975fc3e80f0f83c803fc6f6a9ac5852b53/src/PropertyInfo/EntityProperyInfoExtractor.php#L155-L170
205,182
makinacorpus/drupal-calista
src/PropertyInfo/EntityProperyInfoExtractor.php
EntityProperyInfoExtractor.findFieldInstances
private function findFieldInstances($entityType, $entityInfo) { $ret = []; // Add field properties, since Drupal does not differenciate entity // bundles using different class for different object, we are just // gonna give the whole field list foreach (field_info_instances(...
php
private function findFieldInstances($entityType, $entityInfo) { $ret = []; // Add field properties, since Drupal does not differenciate entity // bundles using different class for different object, we are just // gonna give the whole field list foreach (field_info_instances(...
[ "private", "function", "findFieldInstances", "(", "$", "entityType", ",", "$", "entityInfo", ")", "{", "$", "ret", "=", "[", "]", ";", "// Add field properties, since Drupal does not differenciate entity", "// bundles using different class for different object, we are just", "/...
Guess the while field instances for the given entity type @param string $entityType @param array $entityInfo @param string $property @return null|array
[ "Guess", "the", "while", "field", "instances", "for", "the", "given", "entity", "type" ]
cceb6b975fc3e80f0f83c803fc6f6a9ac5852b53
https://github.com/makinacorpus/drupal-calista/blob/cceb6b975fc3e80f0f83c803fc6f6a9ac5852b53/src/PropertyInfo/EntityProperyInfoExtractor.php#L181-L200
205,183
makinacorpus/drupal-calista
src/PropertyInfo/EntityProperyInfoExtractor.php
EntityProperyInfoExtractor.findFieldInstanceFor
private function findFieldInstanceFor($entityType, $entityInfo, $property) { $instances = $this->findFieldInstances($entityType, $entityInfo); if (isset($instances[$property])) { return $instances[$property]; } }
php
private function findFieldInstanceFor($entityType, $entityInfo, $property) { $instances = $this->findFieldInstances($entityType, $entityInfo); if (isset($instances[$property])) { return $instances[$property]; } }
[ "private", "function", "findFieldInstanceFor", "(", "$", "entityType", ",", "$", "entityInfo", ",", "$", "property", ")", "{", "$", "instances", "=", "$", "this", "->", "findFieldInstances", "(", "$", "entityType", ",", "$", "entityInfo", ")", ";", "if", "...
Guess the field instance for a single property of the given entity type @param string $entityType @param array $entityInfo @param string $property @return null|array
[ "Guess", "the", "field", "instance", "for", "a", "single", "property", "of", "the", "given", "entity", "type" ]
cceb6b975fc3e80f0f83c803fc6f6a9ac5852b53
https://github.com/makinacorpus/drupal-calista/blob/cceb6b975fc3e80f0f83c803fc6f6a9ac5852b53/src/PropertyInfo/EntityProperyInfoExtractor.php#L211-L218
205,184
salernolabs/camelize
src/Camel.php
Camel.camelize
public function camelize($input) { $input = trim($input); if (empty($input)) { throw new \Exception("Can not camelize an empty string."); } $output = ''; $capitalizeNext = $this->shouldCapitalizeFirstLetter; for ($i = 0; $i < mb_strlen($input); ...
php
public function camelize($input) { $input = trim($input); if (empty($input)) { throw new \Exception("Can not camelize an empty string."); } $output = ''; $capitalizeNext = $this->shouldCapitalizeFirstLetter; for ($i = 0; $i < mb_strlen($input); ...
[ "public", "function", "camelize", "(", "$", "input", ")", "{", "$", "input", "=", "trim", "(", "$", "input", ")", ";", "if", "(", "empty", "(", "$", "input", ")", ")", "{", "throw", "new", "\\", "Exception", "(", "\"Can not camelize an empty string.\"", ...
Camel Case a String @param $input @return string
[ "Camel", "Case", "a", "String" ]
6098e9827fd21509592fc7062b653582d0dd00d1
https://github.com/salernolabs/camelize/blob/6098e9827fd21509592fc7062b653582d0dd00d1/src/Camel.php#L37-L72
205,185
philipbrown/money
src/Money.php
Money.equals
public function equals(Money $money) { return $this->isSameCurrency($money) && $this->cents == $money->cents; }
php
public function equals(Money $money) { return $this->isSameCurrency($money) && $this->cents == $money->cents; }
[ "public", "function", "equals", "(", "Money", "$", "money", ")", "{", "return", "$", "this", "->", "isSameCurrency", "(", "$", "money", ")", "&&", "$", "this", "->", "cents", "==", "$", "money", "->", "cents", ";", "}" ]
Check the equality of two Money objects. First check the currency and then check the value. @param PhilipBrown\Money\Money @return bool
[ "Check", "the", "equality", "of", "two", "Money", "objects", ".", "First", "check", "the", "currency", "and", "then", "check", "the", "value", "." ]
2ba3a1e4b52869f8696384a5033459708f25c109
https://github.com/philipbrown/money/blob/2ba3a1e4b52869f8696384a5033459708f25c109/src/Money.php#L86-L89
205,186
philipbrown/money
src/Money.php
Money.add
public function add(Money $money) { if($this->isSameCurrency($money)) { return Money::init($this->cents + $money->cents, $this->currency->getIsoCode()); } throw new InvalidCurrencyException("You can't add two Money objects with different currencies"); }
php
public function add(Money $money) { if($this->isSameCurrency($money)) { return Money::init($this->cents + $money->cents, $this->currency->getIsoCode()); } throw new InvalidCurrencyException("You can't add two Money objects with different currencies"); }
[ "public", "function", "add", "(", "Money", "$", "money", ")", "{", "if", "(", "$", "this", "->", "isSameCurrency", "(", "$", "money", ")", ")", "{", "return", "Money", "::", "init", "(", "$", "this", "->", "cents", "+", "$", "money", "->", "cents",...
Add two the value of two Money objects and return a new Money object. @param PhilipBrown\Money\Money $money @return PhilipBrown\Money\Money
[ "Add", "two", "the", "value", "of", "two", "Money", "objects", "and", "return", "a", "new", "Money", "object", "." ]
2ba3a1e4b52869f8696384a5033459708f25c109
https://github.com/philipbrown/money/blob/2ba3a1e4b52869f8696384a5033459708f25c109/src/Money.php#L97-L105
205,187
philipbrown/money
src/Money.php
Money.multiply
public function multiply($number) { return Money::init((int) round($this->cents * $number, 0, PHP_ROUND_HALF_EVEN), $this->currency->getIsoCode()); }
php
public function multiply($number) { return Money::init((int) round($this->cents * $number, 0, PHP_ROUND_HALF_EVEN), $this->currency->getIsoCode()); }
[ "public", "function", "multiply", "(", "$", "number", ")", "{", "return", "Money", "::", "init", "(", "(", "int", ")", "round", "(", "$", "this", "->", "cents", "*", "$", "number", ",", "0", ",", "PHP_ROUND_HALF_EVEN", ")", ",", "$", "this", "->", ...
Multiply two Money objects together and return a new Money object @param int $number @return PhilipBrown\Money\Money
[ "Multiply", "two", "Money", "objects", "together", "and", "return", "a", "new", "Money", "object" ]
2ba3a1e4b52869f8696384a5033459708f25c109
https://github.com/philipbrown/money/blob/2ba3a1e4b52869f8696384a5033459708f25c109/src/Money.php#L129-L132
205,188
ZhukV/LanguageDetector
src/Ideea/LanguageDetector/LanguageDetector.php
LanguageDetector.addVisitor
public function addVisitor(VisitorInterface $visitor, $priority = 0) { $this->sortedVisitors = null; $this->visitors[spl_object_hash($visitor)] = array( 'priority' => $priority, 'visitor' => $visitor ); return $this; }
php
public function addVisitor(VisitorInterface $visitor, $priority = 0) { $this->sortedVisitors = null; $this->visitors[spl_object_hash($visitor)] = array( 'priority' => $priority, 'visitor' => $visitor ); return $this; }
[ "public", "function", "addVisitor", "(", "VisitorInterface", "$", "visitor", ",", "$", "priority", "=", "0", ")", "{", "$", "this", "->", "sortedVisitors", "=", "null", ";", "$", "this", "->", "visitors", "[", "spl_object_hash", "(", "$", "visitor", ")", ...
Add detection visitor @param VisitorInterface $visitor @param int $priority @return LanguageDetector
[ "Add", "detection", "visitor" ]
e5138f4c789e899801e098ce1e719337b015af7c
https://github.com/ZhukV/LanguageDetector/blob/e5138f4c789e899801e098ce1e719337b015af7c/src/Ideea/LanguageDetector/LanguageDetector.php#L46-L56
205,189
ZhukV/LanguageDetector
src/Ideea/LanguageDetector/LanguageDetector.php
LanguageDetector.createDefault
public static function createDefault(DictionaryInterface $dictionary = null) { /** @var LanguageDetector $detector */ $detector = new static(); $dataDirectory = realpath(__DIR__ . '/../../../data'); $alphabetLoader = new AlphabetLoader(); $sectionLoader = new SectionLoader(...
php
public static function createDefault(DictionaryInterface $dictionary = null) { /** @var LanguageDetector $detector */ $detector = new static(); $dataDirectory = realpath(__DIR__ . '/../../../data'); $alphabetLoader = new AlphabetLoader(); $sectionLoader = new SectionLoader(...
[ "public", "static", "function", "createDefault", "(", "DictionaryInterface", "$", "dictionary", "=", "null", ")", "{", "/** @var LanguageDetector $detector */", "$", "detector", "=", "new", "static", "(", ")", ";", "$", "dataDirectory", "=", "realpath", "(", "__DI...
Create default detector @param DictionaryInterface $dictionary @return LanguageDetector
[ "Create", "default", "detector" ]
e5138f4c789e899801e098ce1e719337b015af7c
https://github.com/ZhukV/LanguageDetector/blob/e5138f4c789e899801e098ce1e719337b015af7c/src/Ideea/LanguageDetector/LanguageDetector.php#L123-L145
205,190
wigedev/farm
src/FormBuilder/FormElement/Checkboxgroup.php
Checkboxgroup.setDefaultValue
public function setDefaultValue($value) : FormElement { if (is_array($value)) { $value = implode(',', $value); } parent::setDefaultValue($value); return $this; }
php
public function setDefaultValue($value) : FormElement { if (is_array($value)) { $value = implode(',', $value); } parent::setDefaultValue($value); return $this; }
[ "public", "function", "setDefaultValue", "(", "$", "value", ")", ":", "FormElement", "{", "if", "(", "is_array", "(", "$", "value", ")", ")", "{", "$", "value", "=", "implode", "(", "','", ",", "$", "value", ")", ";", "}", "parent", "::", "setDefault...
Sets the default or database value for the element. Overridden to convert arrays to strings. @param mixed $value The value of the form field. @return FormElement
[ "Sets", "the", "default", "or", "database", "value", "for", "the", "element", ".", "Overridden", "to", "convert", "arrays", "to", "strings", "." ]
7a1729ec78628b7e5435e4a42e42d547a07af851
https://github.com/wigedev/farm/blob/7a1729ec78628b7e5435e4a42e42d547a07af851/src/FormBuilder/FormElement/Checkboxgroup.php#L31-L38
205,191
wigedev/farm
src/FormBuilder/FormElement/Checkboxgroup.php
Checkboxgroup.setUserValue
public function setUserValue(string $value) : FormElement { if (is_array($value)) { $value = implode(',', $value); } parent::setUserValue($value); return $this; }
php
public function setUserValue(string $value) : FormElement { if (is_array($value)) { $value = implode(',', $value); } parent::setUserValue($value); return $this; }
[ "public", "function", "setUserValue", "(", "string", "$", "value", ")", ":", "FormElement", "{", "if", "(", "is_array", "(", "$", "value", ")", ")", "{", "$", "value", "=", "implode", "(", "','", ",", "$", "value", ")", ";", "}", "parent", "::", "s...
Sets a user value to be validated. Overridden to convert arrays to strings. @param string $value @return FormElement
[ "Sets", "a", "user", "value", "to", "be", "validated", ".", "Overridden", "to", "convert", "arrays", "to", "strings", "." ]
7a1729ec78628b7e5435e4a42e42d547a07af851
https://github.com/wigedev/farm/blob/7a1729ec78628b7e5435e4a42e42d547a07af851/src/FormBuilder/FormElement/Checkboxgroup.php#L46-L53
205,192
wigedev/farm
src/FormBuilder/FormElement/Checkboxgroup.php
Checkboxgroup.validate
public function validate() : void { if (null === $this->is_valid) { if (null === $this->user_value && null !== $this->default_value) { // There is a preset value, and its not being changed $this->is_valid = true; } elseif (null != $this->validator && f...
php
public function validate() : void { if (null === $this->is_valid) { if (null === $this->user_value && null !== $this->default_value) { // There is a preset value, and its not being changed $this->is_valid = true; } elseif (null != $this->validator && f...
[ "public", "function", "validate", "(", ")", ":", "void", "{", "if", "(", "null", "===", "$", "this", "->", "is_valid", ")", "{", "if", "(", "null", "===", "$", "this", "->", "user_value", "&&", "null", "!==", "$", "this", "->", "default_value", ")", ...
Validates the user value according to the validator defined for this element.
[ "Validates", "the", "user", "value", "according", "to", "the", "validator", "defined", "for", "this", "element", "." ]
7a1729ec78628b7e5435e4a42e42d547a07af851
https://github.com/wigedev/farm/blob/7a1729ec78628b7e5435e4a42e42d547a07af851/src/FormBuilder/FormElement/Checkboxgroup.php#L68-L102
205,193
Falc/TwigTextExtension
src/TextExtension.php
TextExtension.p2br
public function p2br($data) { // Remove opening <p> tags $data = preg_replace('#<p[^>]*?>#', '', $data); // Remove trailing </p> to prevent it to be replaced with unneeded <br /> $data = preg_replace('#</p>$#', '', $data); // Replace each end of paragraph with two <br /> ...
php
public function p2br($data) { // Remove opening <p> tags $data = preg_replace('#<p[^>]*?>#', '', $data); // Remove trailing </p> to prevent it to be replaced with unneeded <br /> $data = preg_replace('#</p>$#', '', $data); // Replace each end of paragraph with two <br /> ...
[ "public", "function", "p2br", "(", "$", "data", ")", "{", "// Remove opening <p> tags", "$", "data", "=", "preg_replace", "(", "'#<p[^>]*?>#'", ",", "''", ",", "$", "data", ")", ";", "// Remove trailing </p> to prevent it to be replaced with unneeded <br />", "$", "da...
Replaces paragraph formatting with double linebreaks. Example: '<p>This is a text.</p><p>This should be another paragraph.</p>' Output: 'This is a text.<br /><br>This should be another paragraph.' @param string $data Text to format. @return string Formatted text.
[ "Replaces", "paragraph", "formatting", "with", "double", "linebreaks", "." ]
5036da5fddf5c055bd98d42209ae1d8cd88b1889
https://github.com/Falc/TwigTextExtension/blob/5036da5fddf5c055bd98d42209ae1d8cd88b1889/src/TextExtension.php#L73-L85
205,194
Falc/TwigTextExtension
src/TextExtension.php
TextExtension.paragraphs_slice
public function paragraphs_slice($text, $offset = 0, $length = null) { $result = array(); preg_match_all('#<p[^>]*>(.*?)</p>#', $text, $result); // Null length = all the paragraphs if ($length === null) { $length = count($result[0]) - $offset; } return a...
php
public function paragraphs_slice($text, $offset = 0, $length = null) { $result = array(); preg_match_all('#<p[^>]*>(.*?)</p>#', $text, $result); // Null length = all the paragraphs if ($length === null) { $length = count($result[0]) - $offset; } return a...
[ "public", "function", "paragraphs_slice", "(", "$", "text", ",", "$", "offset", "=", "0", ",", "$", "length", "=", "null", ")", "{", "$", "result", "=", "array", "(", ")", ";", "preg_match_all", "(", "'#<p[^>]*>(.*?)</p>#'", ",", "$", "text", ",", "$",...
Extracts paragraphs from a string. This function uses array_slice(). The function signatures are similar. @see http://www.php.net/manual/en/function.array-slice.php @param string $text String containing paragraphs. @param integer $offset Number of paragraphs to offset. Default: 0. @param ...
[ "Extracts", "paragraphs", "from", "a", "string", "." ]
5036da5fddf5c055bd98d42209ae1d8cd88b1889
https://github.com/Falc/TwigTextExtension/blob/5036da5fddf5c055bd98d42209ae1d8cd88b1889/src/TextExtension.php#L99-L110
205,195
Falc/TwigTextExtension
src/TextExtension.php
TextExtension.regex_replace
public function regex_replace($subject, $pattern, $replacement, $limit = -1) { return preg_replace($pattern, $replacement, $subject, $limit); }
php
public function regex_replace($subject, $pattern, $replacement, $limit = -1) { return preg_replace($pattern, $replacement, $subject, $limit); }
[ "public", "function", "regex_replace", "(", "$", "subject", ",", "$", "pattern", ",", "$", "replacement", ",", "$", "limit", "=", "-", "1", ")", "{", "return", "preg_replace", "(", "$", "pattern", ",", "$", "replacement", ",", "$", "subject", ",", "$",...
Performs a regular expression search and replace. @see http://php.net/manual/en/function.preg-replace.php @param string $subject String or array of strings to search and replace. @param mixed $pattern Pattern to search for. It can be either a string or an array with strings. @param mixed ...
[ "Performs", "a", "regular", "expression", "search", "and", "replace", "." ]
5036da5fddf5c055bd98d42209ae1d8cd88b1889
https://github.com/Falc/TwigTextExtension/blob/5036da5fddf5c055bd98d42209ae1d8cd88b1889/src/TextExtension.php#L123-L126
205,196
antaresproject/translations
src/Http/Datatables/Languages.php
Languages.getActionsColumn
protected function getActionsColumn($canAddLanguage) { return function ($row) use($canAddLanguage) { $btns = []; $html = app('html'); if ($canAddLanguage && !$row->is_default) { $btns[] = $html->create('li', $html->link(handles("antares::translations/langu...
php
protected function getActionsColumn($canAddLanguage) { return function ($row) use($canAddLanguage) { $btns = []; $html = app('html'); if ($canAddLanguage && !$row->is_default) { $btns[] = $html->create('li', $html->link(handles("antares::translations/langu...
[ "protected", "function", "getActionsColumn", "(", "$", "canAddLanguage", ")", "{", "return", "function", "(", "$", "row", ")", "use", "(", "$", "canAddLanguage", ")", "{", "$", "btns", "=", "[", "]", ";", "$", "html", "=", "app", "(", "'html'", ")", ...
Actions column for datatable @param boolean $canAddLanguage @return String
[ "Actions", "column", "for", "datatable" ]
63097aeb97f18c5aeeef7dcf15f0c67959951685
https://github.com/antaresproject/translations/blob/63097aeb97f18c5aeeef7dcf15f0c67959951685/src/Http/Datatables/Languages.php#L90-L106
205,197
ekyna/AdminBundle
Operator/ResourceOperator.php
ResourceOperator.persistResource
protected function persistResource(ResourceEvent $event) { $resource = $event->getResource(); // TODO Validation ? try { $this->manager->persist($resource); $this->manager->flush(); } catch(DBALException $e) { if ($this->debug) { ...
php
protected function persistResource(ResourceEvent $event) { $resource = $event->getResource(); // TODO Validation ? try { $this->manager->persist($resource); $this->manager->flush(); } catch(DBALException $e) { if ($this->debug) { ...
[ "protected", "function", "persistResource", "(", "ResourceEvent", "$", "event", ")", "{", "$", "resource", "=", "$", "event", "->", "getResource", "(", ")", ";", "// TODO Validation ?", "try", "{", "$", "this", "->", "manager", "->", "persist", "(", "$", "...
Persists a resource. @param ResourceEvent $event @return ResourceEvent @throws DBALException @throws \Exception
[ "Persists", "a", "resource", "." ]
3f58e253ae9cf651add7f3d587caec80eaea459a
https://github.com/ekyna/AdminBundle/blob/3f58e253ae9cf651add7f3d587caec80eaea459a/Operator/ResourceOperator.php#L173-L197
205,198
crodas/ConcurrentFileWriter
src/ConcurrentFileWriter/Util.php
Util.delete
public static function delete($path) { if (!is_readable($path)) { return false; } if (!is_dir($path)) { unlink($path); return true; } foreach (scandir($path) as $file) { if ($file === '.' || $file === '..') { c...
php
public static function delete($path) { if (!is_readable($path)) { return false; } if (!is_dir($path)) { unlink($path); return true; } foreach (scandir($path) as $file) { if ($file === '.' || $file === '..') { c...
[ "public", "static", "function", "delete", "(", "$", "path", ")", "{", "if", "(", "!", "is_readable", "(", "$", "path", ")", ")", "{", "return", "false", ";", "}", "if", "(", "!", "is_dir", "(", "$", "path", ")", ")", "{", "unlink", "(", "$", "p...
Deletes a file or directory recursively.
[ "Deletes", "a", "file", "or", "directory", "recursively", "." ]
13f88d8c2daf5fe9c70f8be6aeb3d862cd2a5e5a
https://github.com/crodas/ConcurrentFileWriter/blob/13f88d8c2daf5fe9c70f8be6aeb3d862cd2a5e5a/src/ConcurrentFileWriter/Util.php#L21-L47
205,199
PhoxPHP/Glider
src/Query/Parameters.php
Parameters.setParameter
public function setParameter(String $key, $value, Bool $override=false) { if ($this->getParameter($key)) { $defValue = $this->getParameter($key); $this->parameters[$key] = [$defValue]; $this->parameters[$key][] = $value; return; } $this->parameters[$key] = $value; }
php
public function setParameter(String $key, $value, Bool $override=false) { if ($this->getParameter($key)) { $defValue = $this->getParameter($key); $this->parameters[$key] = [$defValue]; $this->parameters[$key][] = $value; return; } $this->parameters[$key] = $value; }
[ "public", "function", "setParameter", "(", "String", "$", "key", ",", "$", "value", ",", "Bool", "$", "override", "=", "false", ")", "{", "if", "(", "$", "this", "->", "getParameter", "(", "$", "key", ")", ")", "{", "$", "defValue", "=", "$", "this...
Sets a parameter key and value. @param $key <String> @param $value <Mixed> @param $override <Boolean> If this option is set to true, the parameter value will be overriden if a value has already been set. @access public @return <void>
[ "Sets", "a", "parameter", "key", "and", "value", "." ]
17aaf3b7bb6e70ea3ae1f04e30a7690e884bf042
https://github.com/PhoxPHP/Glider/blob/17aaf3b7bb6e70ea3ae1f04e30a7690e884bf042/src/Query/Parameters.php#L44-L54