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
198,600
craig-mcmahon/google-helper
src/GoogleHelper/GoogleHelper.php
GoogleHelper.cmdLineAuth
public function cmdLineAuth() { $authUrl = $this->client->createAuthUrl(); //Request authorization print "Please visit:\n$authUrl\n\n"; print "Please enter the auth code:\n"; $authCode = trim(fgets(STDIN)); // Exchange authorization code for access token $acc...
php
public function cmdLineAuth() { $authUrl = $this->client->createAuthUrl(); //Request authorization print "Please visit:\n$authUrl\n\n"; print "Please enter the auth code:\n"; $authCode = trim(fgets(STDIN)); // Exchange authorization code for access token $acc...
[ "public", "function", "cmdLineAuth", "(", ")", "{", "$", "authUrl", "=", "$", "this", "->", "client", "->", "createAuthUrl", "(", ")", ";", "//Request authorization", "print", "\"Please visit:\\n$authUrl\\n\\n\"", ";", "print", "\"Please enter the auth code:\\n\"", ";...
Auth over command line
[ "Auth", "over", "command", "line" ]
6b877efd7c9827555ecac65ee01e337849db6611
https://github.com/craig-mcmahon/google-helper/blob/6b877efd7c9827555ecac65ee01e337849db6611/src/GoogleHelper/GoogleHelper.php#L79-L93
198,601
ivopetkov/notifications-bearframework-addon
classes/Notifications.php
Notifications.make
public function make(string $title = null, string $text = null): Notification { if (self::$newNotificationCache === null) { self::$newNotificationCache = new Notification(); } $notification = clone(self::$newNotificationCache); if ($title !== null) { $notifica...
php
public function make(string $title = null, string $text = null): Notification { if (self::$newNotificationCache === null) { self::$newNotificationCache = new Notification(); } $notification = clone(self::$newNotificationCache); if ($title !== null) { $notifica...
[ "public", "function", "make", "(", "string", "$", "title", "=", "null", ",", "string", "$", "text", "=", "null", ")", ":", "Notification", "{", "if", "(", "self", "::", "$", "newNotificationCache", "===", "null", ")", "{", "self", "::", "$", "newNotifi...
Constructs a new notification and returns it. @param ?string $title The notification title. @param ?string $text The notification text. @return \BearFramework\Notifications\Notification
[ "Constructs", "a", "new", "notification", "and", "returns", "it", "." ]
78a3b5995fcceee98a462e333bd3b4dd4fa155af
https://github.com/ivopetkov/notifications-bearframework-addon/blob/78a3b5995fcceee98a462e333bd3b4dd4fa155af/classes/Notifications.php#L35-L48
198,602
ivopetkov/notifications-bearframework-addon
classes/Notifications.php
Notifications.send
public function send(string $recipientID, Notification $notification): void { $app = App::get(); if ($notification->id === null) { $notification->id = 'n' . uniqid() . 'x' . base_convert(rand(0, 999999999), 10, 16); } if ($notification->dateCreated === null) { ...
php
public function send(string $recipientID, Notification $notification): void { $app = App::get(); if ($notification->id === null) { $notification->id = 'n' . uniqid() . 'x' . base_convert(rand(0, 999999999), 10, 16); } if ($notification->dateCreated === null) { ...
[ "public", "function", "send", "(", "string", "$", "recipientID", ",", "Notification", "$", "notification", ")", ":", "void", "{", "$", "app", "=", "App", "::", "get", "(", ")", ";", "if", "(", "$", "notification", "->", "id", "===", "null", ")", "{",...
Sends a notification. @param string $recipientID The recipient ID. @param \BearFramework\Notifications\Notification $notification The notification to send. @return void No value is returned. @throws \Exception
[ "Sends", "a", "notification", "." ]
78a3b5995fcceee98a462e333bd3b4dd4fa155af
https://github.com/ivopetkov/notifications-bearframework-addon/blob/78a3b5995fcceee98a462e333bd3b4dd4fa155af/classes/Notifications.php#L58-L92
198,603
Xiphe/THEDEBUG
src/Xiphe/THEDEBUG/ADEBUG.php
ADEBUG.setOptsByArray
public function setOptsByArray($options) { foreach (self::$_setableOptions as $optionKey) { if (isset($options[$optionKey])) { $this->$optionKey = $options[$optionKey]; } } return $this; }
php
public function setOptsByArray($options) { foreach (self::$_setableOptions as $optionKey) { if (isset($options[$optionKey])) { $this->$optionKey = $options[$optionKey]; } } return $this; }
[ "public", "function", "setOptsByArray", "(", "$", "options", ")", "{", "foreach", "(", "self", "::", "$", "_setableOptions", "as", "$", "optionKey", ")", "{", "if", "(", "isset", "(", "$", "options", "[", "$", "optionKey", "]", ")", ")", "{", "$", "t...
Retrieve an option array and set valid keys as instance variables. @param array $options
[ "Retrieve", "an", "option", "array", "and", "set", "valid", "keys", "as", "instance", "variables", "." ]
76983738a781cc495241672d57e7650aee57a2db
https://github.com/Xiphe/THEDEBUG/blob/76983738a781cc495241672d57e7650aee57a2db/src/Xiphe/THEDEBUG/ADEBUG.php#L96-L105
198,604
Xiphe/THEDEBUG
src/Xiphe/THEDEBUG/ADEBUG.php
ADEBUG.getScope
public function getScope() { $calledHere = $this->backTrace[$this->backTraceOffset+1]; if (isset($calledHere['class'])) { return (object) array( 'type' => 'Method', 'name' => $calledHere['class'].$calledHere['type'].$calledHere['function'] ); } elseif(isset($calledHere['function'])) { r...
php
public function getScope() { $calledHere = $this->backTrace[$this->backTraceOffset+1]; if (isset($calledHere['class'])) { return (object) array( 'type' => 'Method', 'name' => $calledHere['class'].$calledHere['type'].$calledHere['function'] ); } elseif(isset($calledHere['function'])) { r...
[ "public", "function", "getScope", "(", ")", "{", "$", "calledHere", "=", "$", "this", "->", "backTrace", "[", "$", "this", "->", "backTraceOffset", "+", "1", "]", ";", "if", "(", "isset", "(", "$", "calledHere", "[", "'class'", "]", ")", ")", "{", ...
Get the current function or method scope according to the backtraceOffset @return object
[ "Get", "the", "current", "function", "or", "method", "scope", "according", "to", "the", "backtraceOffset" ]
76983738a781cc495241672d57e7650aee57a2db
https://github.com/Xiphe/THEDEBUG/blob/76983738a781cc495241672d57e7650aee57a2db/src/Xiphe/THEDEBUG/ADEBUG.php#L112-L130
198,605
Xiphe/THEDEBUG
src/Xiphe/THEDEBUG/ADEBUG.php
ADEBUG.getID
public function getID() { if (!isset($this->ID)) { $this->ID = md5($this->file.$this->line); } return $this->ID; }
php
public function getID() { if (!isset($this->ID)) { $this->ID = md5($this->file.$this->line); } return $this->ID; }
[ "public", "function", "getID", "(", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "ID", ")", ")", "{", "$", "this", "->", "ID", "=", "md5", "(", "$", "this", "->", "file", ".", "$", "this", "->", "line", ")", ";", "}", "return", ...
Generate a hash from the file and line @return string the id
[ "Generate", "a", "hash", "from", "the", "file", "and", "line" ]
76983738a781cc495241672d57e7650aee57a2db
https://github.com/Xiphe/THEDEBUG/blob/76983738a781cc495241672d57e7650aee57a2db/src/Xiphe/THEDEBUG/ADEBUG.php#L137-L143
198,606
Xiphe/THEDEBUG
src/Xiphe/THEDEBUG/ADEBUG.php
ADEBUG.setLineAndFile
public function setLineAndFile() { if (isset($this->backTrace[$this->backTraceOffset])) { /* Reset the ID because its based on the current line and file */ $this->ID = null; $calledHere = $this->backTrace[$this->backTraceOffset]; if (isset($calledHere['line'])) { $this->line = $calledHere['l...
php
public function setLineAndFile() { if (isset($this->backTrace[$this->backTraceOffset])) { /* Reset the ID because its based on the current line and file */ $this->ID = null; $calledHere = $this->backTrace[$this->backTraceOffset]; if (isset($calledHere['line'])) { $this->line = $calledHere['l...
[ "public", "function", "setLineAndFile", "(", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "backTrace", "[", "$", "this", "->", "backTraceOffset", "]", ")", ")", "{", "/* Reset the ID because its based on the current line and file */", "$", "this", "->", ...
Use the backTraceOffset and find the file and line in which the debug was called @return void
[ "Use", "the", "backTraceOffset", "and", "find", "the", "file", "and", "line", "in", "which", "the", "debug", "was", "called" ]
76983738a781cc495241672d57e7650aee57a2db
https://github.com/Xiphe/THEDEBUG/blob/76983738a781cc495241672d57e7650aee57a2db/src/Xiphe/THEDEBUG/ADEBUG.php#L150-L166
198,607
Xiphe/THEDEBUG
src/Xiphe/THEDEBUG/ADEBUG.php
ADEBUG.put
public function put() { X\THEDEBUG::i()->doCallback('beforePut', array(&$this)); $this->doCallback('beforePut', array(&$this)); switch (strtolower($this->modus)) { case 'firephp': $this->putFirePHP(); break; case 'chromephp': $this->putChromePHP(); break; default: $this->putInlin...
php
public function put() { X\THEDEBUG::i()->doCallback('beforePut', array(&$this)); $this->doCallback('beforePut', array(&$this)); switch (strtolower($this->modus)) { case 'firephp': $this->putFirePHP(); break; case 'chromephp': $this->putChromePHP(); break; default: $this->putInlin...
[ "public", "function", "put", "(", ")", "{", "X", "\\", "THEDEBUG", "::", "i", "(", ")", "->", "doCallback", "(", "'beforePut'", ",", "array", "(", "&", "$", "this", ")", ")", ";", "$", "this", "->", "doCallback", "(", "'beforePut'", ",", "array", "...
fire the appropriate output method for the current modus @return void
[ "fire", "the", "appropriate", "output", "method", "for", "the", "current", "modus" ]
76983738a781cc495241672d57e7650aee57a2db
https://github.com/Xiphe/THEDEBUG/blob/76983738a781cc495241672d57e7650aee57a2db/src/Xiphe/THEDEBUG/ADEBUG.php#L173-L188
198,608
Xiphe/THEDEBUG
src/Xiphe/THEDEBUG/ADEBUG.php
ADEBUG.putChromePHP
public function putChromePHP() { $ChromePHP = X\THEDEBUG::getChromePHP(); $ChromePHP->backtrace = $this->file.': '.$this->line; $this->_improveVar(); $args = array(); if (!empty($this->name)) { $args[] = $this->name.':'; } $args[] = $this->variable; call_user_func_array( array( ...
php
public function putChromePHP() { $ChromePHP = X\THEDEBUG::getChromePHP(); $ChromePHP->backtrace = $this->file.': '.$this->line; $this->_improveVar(); $args = array(); if (!empty($this->name)) { $args[] = $this->name.':'; } $args[] = $this->variable; call_user_func_array( array( ...
[ "public", "function", "putChromePHP", "(", ")", "{", "$", "ChromePHP", "=", "X", "\\", "THEDEBUG", "::", "getChromePHP", "(", ")", ";", "$", "ChromePHP", "->", "backtrace", "=", "$", "this", "->", "file", ".", "': '", ".", "$", "this", "->", "line", ...
Pass the debug to ChromePHP @return void
[ "Pass", "the", "debug", "to", "ChromePHP" ]
76983738a781cc495241672d57e7650aee57a2db
https://github.com/Xiphe/THEDEBUG/blob/76983738a781cc495241672d57e7650aee57a2db/src/Xiphe/THEDEBUG/ADEBUG.php#L195-L213
198,609
Xiphe/THEDEBUG
src/Xiphe/THEDEBUG/ADEBUG.php
ADEBUG.putFirePHP
public function putFirePHP() { $FirePHP = X\THEDEBUG::getFirePHP(); $this->_improveVar(); call_user_func_array( array($FirePHP, $this->_getMethod()), array( $this->variable, $this->name, array( 'File' => $this->file, 'Line' => $this->line ) ) ); }
php
public function putFirePHP() { $FirePHP = X\THEDEBUG::getFirePHP(); $this->_improveVar(); call_user_func_array( array($FirePHP, $this->_getMethod()), array( $this->variable, $this->name, array( 'File' => $this->file, 'Line' => $this->line ) ) ); }
[ "public", "function", "putFirePHP", "(", ")", "{", "$", "FirePHP", "=", "X", "\\", "THEDEBUG", "::", "getFirePHP", "(", ")", ";", "$", "this", "->", "_improveVar", "(", ")", ";", "call_user_func_array", "(", "array", "(", "$", "FirePHP", ",", "$", "thi...
Pass the debug to firePHP @return void
[ "Pass", "the", "debug", "to", "firePHP" ]
76983738a781cc495241672d57e7650aee57a2db
https://github.com/Xiphe/THEDEBUG/blob/76983738a781cc495241672d57e7650aee57a2db/src/Xiphe/THEDEBUG/ADEBUG.php#L220-L236
198,610
Xiphe/THEDEBUG
src/Xiphe/THEDEBUG/ADEBUG.php
ADEBUG._improveVar
private function _improveVar() { switch ($this->variableType) { case 'boolean': $this->variable = '(boolean) '.($this->variable ? 'true' : 'false'); break; case 'NULL': $this->variable = '(null) NULL'; break; case 'string': $this->variable = '"'.$this->variable.'"'; default: bre...
php
private function _improveVar() { switch ($this->variableType) { case 'boolean': $this->variable = '(boolean) '.($this->variable ? 'true' : 'false'); break; case 'NULL': $this->variable = '(null) NULL'; break; case 'string': $this->variable = '"'.$this->variable.'"'; default: bre...
[ "private", "function", "_improveVar", "(", ")", "{", "switch", "(", "$", "this", "->", "variableType", ")", "{", "case", "'boolean'", ":", "$", "this", "->", "variable", "=", "'(boolean) '", ".", "(", "$", "this", "->", "variable", "?", "'true'", ":", ...
Make our variable more understandable. @return null
[ "Make", "our", "variable", "more", "understandable", "." ]
76983738a781cc495241672d57e7650aee57a2db
https://github.com/Xiphe/THEDEBUG/blob/76983738a781cc495241672d57e7650aee57a2db/src/Xiphe/THEDEBUG/ADEBUG.php#L290-L304
198,611
Xiphe/THEDEBUG
src/Xiphe/THEDEBUG/ADEBUG.php
ADEBUG._allocateArgs
private function _allocateArgs($arguments) { if (empty($arguments)) { return; } /* First argument is the variable to be debugged */ $this->variable = $arguments[0]; $this->variableType = gettype($this->variable); /* * The second and third argument can be either an integer representing ...
php
private function _allocateArgs($arguments) { if (empty($arguments)) { return; } /* First argument is the variable to be debugged */ $this->variable = $arguments[0]; $this->variableType = gettype($this->variable); /* * The second and third argument can be either an integer representing ...
[ "private", "function", "_allocateArgs", "(", "$", "arguments", ")", "{", "if", "(", "empty", "(", "$", "arguments", ")", ")", "{", "return", ";", "}", "/* First argument is the variable to be debugged */", "$", "this", "->", "variable", "=", "$", "arguments", ...
Check which arguments were passed and name them. @param array $arguments @return void
[ "Check", "which", "arguments", "were", "passed", "and", "name", "them", "." ]
76983738a781cc495241672d57e7650aee57a2db
https://github.com/Xiphe/THEDEBUG/blob/76983738a781cc495241672d57e7650aee57a2db/src/Xiphe/THEDEBUG/ADEBUG.php#L312-L346
198,612
Dhii/config
src/DereferenceTokensCapableTrait.php
DereferenceTokensCapableTrait._dereferenceTokens
protected function _dereferenceTokens($value) { if (is_scalar($value) && !is_string($value)) { return $value; } try { $value = $this->_normalizeString($value); } catch (InvalidArgumentException $e) { return $value; } $...
php
protected function _dereferenceTokens($value) { if (is_scalar($value) && !is_string($value)) { return $value; } try { $value = $this->_normalizeString($value); } catch (InvalidArgumentException $e) { return $value; } $...
[ "protected", "function", "_dereferenceTokens", "(", "$", "value", ")", "{", "if", "(", "is_scalar", "(", "$", "value", ")", "&&", "!", "is_string", "(", "$", "value", ")", ")", "{", "return", "$", "value", ";", "}", "try", "{", "$", "value", "=", "...
Replaces tokens with their values. @since [*next-version*] @param string|Stringable|mixed $value The value, in which tokens may be found. If value is not stringable, will return it as is. @throws RuntimeException If tokens could not be replaced. @return string|Stringable The value with tokens replaced.
[ "Replaces", "tokens", "with", "their", "values", "." ]
1ab9a7ccf9c0ebd7c6fcbce600b4c00b52b2fdcf
https://github.com/Dhii/config/blob/1ab9a7ccf9c0ebd7c6fcbce600b4c00b52b2fdcf/src/DereferenceTokensCapableTrait.php#L31-L54
198,613
libreworks/caridea-dao
src/Exception/Translator/Doctrine.php
Doctrine.translate
public static function translate(\Exception $e): \Exception { if ($e instanceof \Doctrine\DBAL\Exception\ConnectionException) { return new \Caridea\Dao\Exception\Unreachable("System unreachable or connection timed out", $e->getCode(), $e); } elseif ($e instanceof \Doctrine\ORM\EntityNotF...
php
public static function translate(\Exception $e): \Exception { if ($e instanceof \Doctrine\DBAL\Exception\ConnectionException) { return new \Caridea\Dao\Exception\Unreachable("System unreachable or connection timed out", $e->getCode(), $e); } elseif ($e instanceof \Doctrine\ORM\EntityNotF...
[ "public", "static", "function", "translate", "(", "\\", "Exception", "$", "e", ")", ":", "\\", "Exception", "{", "if", "(", "$", "e", "instanceof", "\\", "Doctrine", "\\", "DBAL", "\\", "Exception", "\\", "ConnectionException", ")", "{", "return", "new", ...
Translates a Doctrine exception. @param \Exception $e The exception to translate @return \Exception The exception to use
[ "Translates", "a", "Doctrine", "exception", "." ]
22c2fc81f63050ad23f7b0c40e430ff026e1e767
https://github.com/libreworks/caridea-dao/blob/22c2fc81f63050ad23f7b0c40e430ff026e1e767/src/Exception/Translator/Doctrine.php#L37-L61
198,614
Wedeto/DB
src/Query/OrderClause.php
OrderClause.toSQL
public function toSQL(Parameters $params, bool $inner_clause) { $drv = $params->getDriver(); $clauses = $this->getClauses(); $strs = array(); foreach ($clauses as $clause) $strs[] = $drv->toSQL($params, $clause); if (count($strs) === 0) return; ...
php
public function toSQL(Parameters $params, bool $inner_clause) { $drv = $params->getDriver(); $clauses = $this->getClauses(); $strs = array(); foreach ($clauses as $clause) $strs[] = $drv->toSQL($params, $clause); if (count($strs) === 0) return; ...
[ "public", "function", "toSQL", "(", "Parameters", "$", "params", ",", "bool", "$", "inner_clause", ")", "{", "$", "drv", "=", "$", "params", "->", "getDriver", "(", ")", ";", "$", "clauses", "=", "$", "this", "->", "getClauses", "(", ")", ";", "$", ...
Write a order clause as SQL query syntax @param Parameters $params The query parameters: tables and placeholder values @param bool $inner_clause Unused @return string The generated SQL
[ "Write", "a", "order", "clause", "as", "SQL", "query", "syntax" ]
715f8f2e3ae6b53c511c40b620921cb9c87e6f62
https://github.com/Wedeto/DB/blob/715f8f2e3ae6b53c511c40b620921cb9c87e6f62/src/Query/OrderClause.php#L84-L97
198,615
Linkvalue-Interne/MajoraGeneratorBundle
src/Majora/Bundle/GeneratorBundle/Generator/ContentModifier/AbstractPhpClassContentModifier.php
AbstractPhpClassContentModifier.retrieveBundleInfoFromGeneratedFile
protected function retrieveBundleInfoFromGeneratedFile(SplFileInfo $generatedFile, Inflector $inflector) { if($generatedFile->getExtension() !== 'php'){ throw new UnsupportedFileForContentModifierException(sprintf( 'This content modifier requires to be used on a PHP file, "%s" is...
php
protected function retrieveBundleInfoFromGeneratedFile(SplFileInfo $generatedFile, Inflector $inflector) { if($generatedFile->getExtension() !== 'php'){ throw new UnsupportedFileForContentModifierException(sprintf( 'This content modifier requires to be used on a PHP file, "%s" is...
[ "protected", "function", "retrieveBundleInfoFromGeneratedFile", "(", "SplFileInfo", "$", "generatedFile", ",", "Inflector", "$", "inflector", ")", "{", "if", "(", "$", "generatedFile", "->", "getExtension", "(", ")", "!==", "'php'", ")", "{", "throw", "new", "Un...
Retrieve information of the Bundle which contains the given file. @param SplFileInfo $generatedFile @param Inflector $inflector @return BundleInfo @throws UnsupportedFileForContentModifierException when file is not a PHP file @throws \UnexpectedValueException when we could not retrieve bundle info from file
[ "Retrieve", "information", "of", "the", "Bundle", "which", "contains", "the", "given", "file", "." ]
9f745c1f64e913df90d86b4fd0770121c563552d
https://github.com/Linkvalue-Interne/MajoraGeneratorBundle/blob/9f745c1f64e913df90d86b4fd0770121c563552d/src/Majora/Bundle/GeneratorBundle/Generator/ContentModifier/AbstractPhpClassContentModifier.php#L26-L81
198,616
bkstg/schedule-bundle
Timeline/EventSubscriber/EventTimelineSubscriber.php
EventTimelineSubscriber.createInvitationTimelineEntries
public function createInvitationTimelineEntries(EntityPublishedEvent $published_event): void { // Only act on event objects. $event = $published_event->getObject(); if (!$event instanceof Event) { return; } // Get the author for the event. $author = $this...
php
public function createInvitationTimelineEntries(EntityPublishedEvent $published_event): void { // Only act on event objects. $event = $published_event->getObject(); if (!$event instanceof Event) { return; } // Get the author for the event. $author = $this...
[ "public", "function", "createInvitationTimelineEntries", "(", "EntityPublishedEvent", "$", "published_event", ")", ":", "void", "{", "// Only act on event objects.", "$", "event", "=", "$", "published_event", "->", "getObject", "(", ")", ";", "if", "(", "!", "$", ...
Create invited timeline events. @param EntityPublishedEvent $published_event The published event. @return void
[ "Create", "invited", "timeline", "events", "." ]
e64ac897aa7b28bc48319470d65de13cd4788afe
https://github.com/bkstg/schedule-bundle/blob/e64ac897aa7b28bc48319470d65de13cd4788afe/Timeline/EventSubscriber/EventTimelineSubscriber.php#L62-L93
198,617
bkstg/schedule-bundle
Timeline/EventSubscriber/EventTimelineSubscriber.php
EventTimelineSubscriber.createScheduleTimelineEntry
public function createScheduleTimelineEntry(EntityPublishedEvent $event): void { // Only act on schedule objects. $schedule = $event->getObject(); if (!$schedule instanceof Schedule) { return; } // Get the author for the schedule. $author = $this->user_pr...
php
public function createScheduleTimelineEntry(EntityPublishedEvent $event): void { // Only act on schedule objects. $schedule = $event->getObject(); if (!$schedule instanceof Schedule) { return; } // Get the author for the schedule. $author = $this->user_pr...
[ "public", "function", "createScheduleTimelineEntry", "(", "EntityPublishedEvent", "$", "event", ")", ":", "void", "{", "// Only act on schedule objects.", "$", "schedule", "=", "$", "event", "->", "getObject", "(", ")", ";", "if", "(", "!", "$", "schedule", "ins...
Create the schedule timeline entry. @param EntityPublishedEvent $event The published event. @return void
[ "Create", "the", "schedule", "timeline", "entry", "." ]
e64ac897aa7b28bc48319470d65de13cd4788afe
https://github.com/bkstg/schedule-bundle/blob/e64ac897aa7b28bc48319470d65de13cd4788afe/Timeline/EventSubscriber/EventTimelineSubscriber.php#L102-L131
198,618
OxfordInfoLabs/kinikit-core
src/Util/CodeUtils.php
CodeUtils.normalisePropertyName
public function normalisePropertyName($propertyName) { if ((strlen ( $propertyName ) > 1) && ((ord ( $propertyName [1] ) >= ord ( "a" )) || is_numeric ( $propertyName [1] ))) { $propertyName = strtolower ( $propertyName [0] ) . substr ( $propertyName, 1 ); } return $propertyName; }
php
public function normalisePropertyName($propertyName) { if ((strlen ( $propertyName ) > 1) && ((ord ( $propertyName [1] ) >= ord ( "a" )) || is_numeric ( $propertyName [1] ))) { $propertyName = strtolower ( $propertyName [0] ) . substr ( $propertyName, 1 ); } return $propertyName; }
[ "public", "function", "normalisePropertyName", "(", "$", "propertyName", ")", "{", "if", "(", "(", "strlen", "(", "$", "propertyName", ")", ">", "1", ")", "&&", "(", "(", "ord", "(", "$", "propertyName", "[", "1", "]", ")", ">=", "ord", "(", "\"a\"",...
Normalise the property name using the standard rules we might expect. @param string $propertyName
[ "Normalise", "the", "property", "name", "using", "the", "standard", "rules", "we", "might", "expect", "." ]
edc1b2e6ffabd595c4c7d322279b3dd1e59ef359
https://github.com/OxfordInfoLabs/kinikit-core/blob/edc1b2e6ffabd595c4c7d322279b3dd1e59ef359/src/Util/CodeUtils.php#L40-L47
198,619
AlexyaFramework/Database
Alexya/Database/QueryBuilder.php
QueryBuilder.select
public function select($columns = "*") : QueryBuilder { $this->_query[] = "SELECT"; //Parse column(s) if(is_array($columns)) { $select_columns = ""; $size = sizeof($columns); for($i = 0; $i < $size; $i++) { if($i > 0) { ...
php
public function select($columns = "*") : QueryBuilder { $this->_query[] = "SELECT"; //Parse column(s) if(is_array($columns)) { $select_columns = ""; $size = sizeof($columns); for($i = 0; $i < $size; $i++) { if($i > 0) { ...
[ "public", "function", "select", "(", "$", "columns", "=", "\"*\"", ")", ":", "QueryBuilder", "{", "$", "this", "->", "_query", "[", "]", "=", "\"SELECT\"", ";", "//Parse column(s)", "if", "(", "is_array", "(", "$", "columns", ")", ")", "{", "$", "selec...
Begins the select query. @param string|array $columns Column(s) to select, if empty has same effect as "*". @return QueryBuilder Chainability object.
[ "Begins", "the", "select", "query", "." ]
5eb12dc183700ed2357495f4d2c2863ca033eb5a
https://github.com/AlexyaFramework/Database/blob/5eb12dc183700ed2357495f4d2c2863ca033eb5a/Alexya/Database/QueryBuilder.php#L63-L96
198,620
AlexyaFramework/Database
Alexya/Database/QueryBuilder.php
QueryBuilder.insert
public function insert(string $table) : QueryBuilder { $this->_query[] = "INSERT INTO"; $this->_query[] = "`". $this->sanitize($table) ."`"; return $this; }
php
public function insert(string $table) : QueryBuilder { $this->_query[] = "INSERT INTO"; $this->_query[] = "`". $this->sanitize($table) ."`"; return $this; }
[ "public", "function", "insert", "(", "string", "$", "table", ")", ":", "QueryBuilder", "{", "$", "this", "->", "_query", "[", "]", "=", "\"INSERT INTO\"", ";", "$", "this", "->", "_query", "[", "]", "=", "\"`\"", ".", "$", "this", "->", "sanitize", "...
Begins the insert query @param string $table Table name @return QueryBuilder Chainability object
[ "Begins", "the", "insert", "query" ]
5eb12dc183700ed2357495f4d2c2863ca033eb5a
https://github.com/AlexyaFramework/Database/blob/5eb12dc183700ed2357495f4d2c2863ca033eb5a/Alexya/Database/QueryBuilder.php#L105-L111
198,621
AlexyaFramework/Database
Alexya/Database/QueryBuilder.php
QueryBuilder.update
public function update(string $table) : QueryBuilder { $this->_query[] = "UPDATE"; $this->_query[] = "`". $this->sanitize($table) ."`"; return $this; }
php
public function update(string $table) : QueryBuilder { $this->_query[] = "UPDATE"; $this->_query[] = "`". $this->sanitize($table) ."`"; return $this; }
[ "public", "function", "update", "(", "string", "$", "table", ")", ":", "QueryBuilder", "{", "$", "this", "->", "_query", "[", "]", "=", "\"UPDATE\"", ";", "$", "this", "->", "_query", "[", "]", "=", "\"`\"", ".", "$", "this", "->", "sanitize", "(", ...
Begins the update query @param string $table Table name @return QueryBuilder Chainability object
[ "Begins", "the", "update", "query" ]
5eb12dc183700ed2357495f4d2c2863ca033eb5a
https://github.com/AlexyaFramework/Database/blob/5eb12dc183700ed2357495f4d2c2863ca033eb5a/Alexya/Database/QueryBuilder.php#L120-L126
198,622
AlexyaFramework/Database
Alexya/Database/QueryBuilder.php
QueryBuilder.delete
public function delete(string $table) : QueryBuilder { $this->_query[] = "DELETE FROM"; $this->_query[] = "`". $this->sanitize($table) ."`"; return $this; }
php
public function delete(string $table) : QueryBuilder { $this->_query[] = "DELETE FROM"; $this->_query[] = "`". $this->sanitize($table) ."`"; return $this; }
[ "public", "function", "delete", "(", "string", "$", "table", ")", ":", "QueryBuilder", "{", "$", "this", "->", "_query", "[", "]", "=", "\"DELETE FROM\"", ";", "$", "this", "->", "_query", "[", "]", "=", "\"`\"", ".", "$", "this", "->", "sanitize", "...
Begins the delete query @param string $table Table name @return QueryBuilder Chainability object
[ "Begins", "the", "delete", "query" ]
5eb12dc183700ed2357495f4d2c2863ca033eb5a
https://github.com/AlexyaFramework/Database/blob/5eb12dc183700ed2357495f4d2c2863ca033eb5a/Alexya/Database/QueryBuilder.php#L135-L141
198,623
AlexyaFramework/Database
Alexya/Database/QueryBuilder.php
QueryBuilder.from
public function from(string $tables) : QueryBuilder { $this->_query[] = "FROM"; $this->_query[] = '`'. $this->sanitize($tables) .'`'; return $this; }
php
public function from(string $tables) : QueryBuilder { $this->_query[] = "FROM"; $this->_query[] = '`'. $this->sanitize($tables) .'`'; return $this; }
[ "public", "function", "from", "(", "string", "$", "tables", ")", ":", "QueryBuilder", "{", "$", "this", "->", "_query", "[", "]", "=", "\"FROM\"", ";", "$", "this", "->", "_query", "[", "]", "=", "'`'", ".", "$", "this", "->", "sanitize", "(", "$",...
Begins the FORM part of the query @param string $tables Table name @return QueryBuilder Chainability object
[ "Begins", "the", "FORM", "part", "of", "the", "query" ]
5eb12dc183700ed2357495f4d2c2863ca033eb5a
https://github.com/AlexyaFramework/Database/blob/5eb12dc183700ed2357495f4d2c2863ca033eb5a/Alexya/Database/QueryBuilder.php#L150-L156
198,624
AlexyaFramework/Database
Alexya/Database/QueryBuilder.php
QueryBuilder.where
public function where(array $condition) : QueryBuilder { $this->_query[] = "WHERE"; foreach($condition as $key => $value) { $this->_query[] = $this->parseTags([$key, $value]); } return $this; }
php
public function where(array $condition) : QueryBuilder { $this->_query[] = "WHERE"; foreach($condition as $key => $value) { $this->_query[] = $this->parseTags([$key, $value]); } return $this; }
[ "public", "function", "where", "(", "array", "$", "condition", ")", ":", "QueryBuilder", "{", "$", "this", "->", "_query", "[", "]", "=", "\"WHERE\"", ";", "foreach", "(", "$", "condition", "as", "$", "key", "=>", "$", "value", ")", "{", "$", "this",...
Begins the WHERE statement of the query Example: ```php $query->where([ "username" => "test" ]); $query->where( "AND" => [ ["username" => "test"], ["password" => "test"] ] ); ``` @param array $condition Where condition @return QueryBuilder Chainability object
[ "Begins", "the", "WHERE", "statement", "of", "the", "query" ]
5eb12dc183700ed2357495f4d2c2863ca033eb5a
https://github.com/AlexyaFramework/Database/blob/5eb12dc183700ed2357495f4d2c2863ca033eb5a/Alexya/Database/QueryBuilder.php#L179-L188
198,625
AlexyaFramework/Database
Alexya/Database/QueryBuilder.php
QueryBuilder.order
public function order(string $column, string $method = "DESC") : QueryBuilder { $this->_query[] = "ORDER BY"; $this->_query[] = "`". $this->sanitize($column) ."`"; $this->_query[] = (strtoupper($method) === "DESC") ? "DESC" : "ASC"; return $this; }
php
public function order(string $column, string $method = "DESC") : QueryBuilder { $this->_query[] = "ORDER BY"; $this->_query[] = "`". $this->sanitize($column) ."`"; $this->_query[] = (strtoupper($method) === "DESC") ? "DESC" : "ASC"; return $this; }
[ "public", "function", "order", "(", "string", "$", "column", ",", "string", "$", "method", "=", "\"DESC\"", ")", ":", "QueryBuilder", "{", "$", "this", "->", "_query", "[", "]", "=", "\"ORDER BY\"", ";", "$", "this", "->", "_query", "[", "]", "=", "\...
Begins the ORDER BY part of the query @param string $column Column name @param string $method Order method @return QueryBuilder Chainability object
[ "Begins", "the", "ORDER", "BY", "part", "of", "the", "query" ]
5eb12dc183700ed2357495f4d2c2863ca033eb5a
https://github.com/AlexyaFramework/Database/blob/5eb12dc183700ed2357495f4d2c2863ca033eb5a/Alexya/Database/QueryBuilder.php#L198-L205
198,626
AlexyaFramework/Database
Alexya/Database/QueryBuilder.php
QueryBuilder.limit
public function limit($limit) : QueryBuilder { $this->_query[] = "LIMIT"; if(is_array($limit)) { $this->_query[] = $this->getQuoted($limit[0]).","; $this->_query[] = $this->getQuoted($limit[1]); return $this; } $this->_query[] = $this->getQuoted...
php
public function limit($limit) : QueryBuilder { $this->_query[] = "LIMIT"; if(is_array($limit)) { $this->_query[] = $this->getQuoted($limit[0]).","; $this->_query[] = $this->getQuoted($limit[1]); return $this; } $this->_query[] = $this->getQuoted...
[ "public", "function", "limit", "(", "$", "limit", ")", ":", "QueryBuilder", "{", "$", "this", "->", "_query", "[", "]", "=", "\"LIMIT\"", ";", "if", "(", "is_array", "(", "$", "limit", ")", ")", "{", "$", "this", "->", "_query", "[", "]", "=", "$...
Begins the LIMIT part of the query @param int|array $limit Limit value @return QueryBuilder Chainability object
[ "Begins", "the", "LIMIT", "part", "of", "the", "query" ]
5eb12dc183700ed2357495f4d2c2863ca033eb5a
https://github.com/AlexyaFramework/Database/blob/5eb12dc183700ed2357495f4d2c2863ca033eb5a/Alexya/Database/QueryBuilder.php#L214-L228
198,627
AlexyaFramework/Database
Alexya/Database/QueryBuilder.php
QueryBuilder.offset
public function offset(int $offset) : QueryBuilder { $this->_query[] = "OFFSET"; $this->_query[] = $offset; return $this; }
php
public function offset(int $offset) : QueryBuilder { $this->_query[] = "OFFSET"; $this->_query[] = $offset; return $this; }
[ "public", "function", "offset", "(", "int", "$", "offset", ")", ":", "QueryBuilder", "{", "$", "this", "->", "_query", "[", "]", "=", "\"OFFSET\"", ";", "$", "this", "->", "_query", "[", "]", "=", "$", "offset", ";", "return", "$", "this", ";", "}"...
Begins the OFFSET part of the query @param int $offset Offset value @return QueryBuilder Chainability object
[ "Begins", "the", "OFFSET", "part", "of", "the", "query" ]
5eb12dc183700ed2357495f4d2c2863ca033eb5a
https://github.com/AlexyaFramework/Database/blob/5eb12dc183700ed2357495f4d2c2863ca033eb5a/Alexya/Database/QueryBuilder.php#L237-L243
198,628
AlexyaFramework/Database
Alexya/Database/QueryBuilder.php
QueryBuilder.set
public function set(array $values) : QueryBuilder { $this->_query[] = "SET"; $set = []; foreach($values as $key => $val) { $set[] = $this->parseTags([$key, $val]); } $this->_query[] = implode(", ", $set); return $this; }
php
public function set(array $values) : QueryBuilder { $this->_query[] = "SET"; $set = []; foreach($values as $key => $val) { $set[] = $this->parseTags([$key, $val]); } $this->_query[] = implode(", ", $set); return $this; }
[ "public", "function", "set", "(", "array", "$", "values", ")", ":", "QueryBuilder", "{", "$", "this", "->", "_query", "[", "]", "=", "\"SET\"", ";", "$", "set", "=", "[", "]", ";", "foreach", "(", "$", "values", "as", "$", "key", "=>", "$", "val"...
Begins the SET part of the query @param array $values Values to set @return QueryBuilder Chainability object
[ "Begins", "the", "SET", "part", "of", "the", "query" ]
5eb12dc183700ed2357495f4d2c2863ca033eb5a
https://github.com/AlexyaFramework/Database/blob/5eb12dc183700ed2357495f4d2c2863ca033eb5a/Alexya/Database/QueryBuilder.php#L252-L264
198,629
AlexyaFramework/Database
Alexya/Database/QueryBuilder.php
QueryBuilder.values
public function values(array $values) : QueryBuilder { $args = func_get_args(); $columns = []; $_values = []; foreach($values as $key => $value) { preg_match("/\(JSON\)\s*([\w]+)/i", $key, $jsonTag); if( is_array($value) || ...
php
public function values(array $values) : QueryBuilder { $args = func_get_args(); $columns = []; $_values = []; foreach($values as $key => $value) { preg_match("/\(JSON\)\s*([\w]+)/i", $key, $jsonTag); if( is_array($value) || ...
[ "public", "function", "values", "(", "array", "$", "values", ")", ":", "QueryBuilder", "{", "$", "args", "=", "func_get_args", "(", ")", ";", "$", "columns", "=", "[", "]", ";", "$", "_values", "=", "[", "]", ";", "foreach", "(", "$", "values", "as...
Begins the VALUES part of the query @param array $values Values to insert @return QueryBuilder Chainability object
[ "Begins", "the", "VALUES", "part", "of", "the", "query" ]
5eb12dc183700ed2357495f4d2c2863ca033eb5a
https://github.com/AlexyaFramework/Database/blob/5eb12dc183700ed2357495f4d2c2863ca033eb5a/Alexya/Database/QueryBuilder.php#L273-L308
198,630
AlexyaFramework/Database
Alexya/Database/QueryBuilder.php
QueryBuilder.sanitize
public function sanitize(string $input) : string { $input = $this->_connection->getConnection()->quote($input); return substr($input, 1, -1); }
php
public function sanitize(string $input) : string { $input = $this->_connection->getConnection()->quote($input); return substr($input, 1, -1); }
[ "public", "function", "sanitize", "(", "string", "$", "input", ")", ":", "string", "{", "$", "input", "=", "$", "this", "->", "_connection", "->", "getConnection", "(", ")", "->", "quote", "(", "$", "input", ")", ";", "return", "substr", "(", "$", "i...
Sanitizes the input. @param string $input Input to sanitize. @return string SQL injection free `$input`.
[ "Sanitizes", "the", "input", "." ]
5eb12dc183700ed2357495f4d2c2863ca033eb5a
https://github.com/AlexyaFramework/Database/blob/5eb12dc183700ed2357495f4d2c2863ca033eb5a/Alexya/Database/QueryBuilder.php#L511-L516
198,631
rawphp/RawConsole
src/RawPHP/RawConsole/Writer/StandardHelpWriter.php
StandardHelpWriter.write
public function write( Command $command, Option $option = NULL ) { $output = PHP_EOL; $output .= '-----------------------------------------------------' . PHP_EOL; $output .= $command->name . ' ' . $command->version . PHP_EOL; $output .= '---------------------------------------------...
php
public function write( Command $command, Option $option = NULL ) { $output = PHP_EOL; $output .= '-----------------------------------------------------' . PHP_EOL; $output .= $command->name . ' ' . $command->version . PHP_EOL; $output .= '---------------------------------------------...
[ "public", "function", "write", "(", "Command", "$", "command", ",", "Option", "$", "option", "=", "NULL", ")", "{", "$", "output", "=", "PHP_EOL", ";", "$", "output", ".=", "'-----------------------------------------------------'", ".", "PHP_EOL", ";", "$", "o...
This method writes the help to the console. @param Command $command the command instance @param Option $option optional option
[ "This", "method", "writes", "the", "help", "to", "the", "console", "." ]
602bedd10f24962305a7ac1979ed326852f4224a
https://github.com/rawphp/RawConsole/blob/602bedd10f24962305a7ac1979ed326852f4224a/src/RawPHP/RawConsole/Writer/StandardHelpWriter.php#L60-L93
198,632
rawphp/RawConsole
src/RawPHP/RawConsole/Writer/StandardHelpWriter.php
StandardHelpWriter._getUsageExample
private function _getUsageExample( Command $command ) { $name = strtolower( str_replace( 'Command', '', get_class( $command ) ) ); if ( FALSE !== strstr( $name, "\\" ) ) { $pts = explode( "\\", $name ); $name = $pts[ count( $pts ) - 1 ]; } $usage = ...
php
private function _getUsageExample( Command $command ) { $name = strtolower( str_replace( 'Command', '', get_class( $command ) ) ); if ( FALSE !== strstr( $name, "\\" ) ) { $pts = explode( "\\", $name ); $name = $pts[ count( $pts ) - 1 ]; } $usage = ...
[ "private", "function", "_getUsageExample", "(", "Command", "$", "command", ")", "{", "$", "name", "=", "strtolower", "(", "str_replace", "(", "'Command'", ",", "''", ",", "get_class", "(", "$", "command", ")", ")", ")", ";", "if", "(", "FALSE", "!==", ...
Prepares the command usage example. @param Command $command the command @return string the command usage example string
[ "Prepares", "the", "command", "usage", "example", "." ]
602bedd10f24962305a7ac1979ed326852f4224a
https://github.com/rawphp/RawConsole/blob/602bedd10f24962305a7ac1979ed326852f4224a/src/RawPHP/RawConsole/Writer/StandardHelpWriter.php#L102-L116
198,633
Linkvalue-Interne/MajoraFrameworkExtraBundle
src/Majora/Framework/Loader/Bridge/Doctrine/DoctrineEventProxy.php
DoctrineEventProxy.registerDoctrineLazyLoader
public function registerDoctrineLazyLoader($entityClass, LazyLoaderInterface $loader) { if (!is_a($entityClass, LazyPropertiesInterface::class, true)) { throw new \InvalidArgumentException(sprintf( 'Class %s has to implement %s to be able to lazy load her properties.', ...
php
public function registerDoctrineLazyLoader($entityClass, LazyLoaderInterface $loader) { if (!is_a($entityClass, LazyPropertiesInterface::class, true)) { throw new \InvalidArgumentException(sprintf( 'Class %s has to implement %s to be able to lazy load her properties.', ...
[ "public", "function", "registerDoctrineLazyLoader", "(", "$", "entityClass", ",", "LazyLoaderInterface", "$", "loader", ")", "{", "if", "(", "!", "is_a", "(", "$", "entityClass", ",", "LazyPropertiesInterface", "::", "class", ",", "true", ")", ")", "{", "throw...
Register a loader for given entity class. @param string $entityClass @param string $loader
[ "Register", "a", "loader", "for", "given", "entity", "class", "." ]
6f368380cfc39d27fafb0844e9a53b4d86d7c034
https://github.com/Linkvalue-Interne/MajoraFrameworkExtraBundle/blob/6f368380cfc39d27fafb0844e9a53b4d86d7c034/src/Majora/Framework/Loader/Bridge/Doctrine/DoctrineEventProxy.php#L41-L52
198,634
Linkvalue-Interne/MajoraFrameworkExtraBundle
src/Majora/Framework/Loader/Bridge/Doctrine/DoctrineEventProxy.php
DoctrineEventProxy.postLoad
public function postLoad(LifecycleEventArgs $event) { if (!$loader = $this->getLoader($entity = $event->getEntity())) { return; } // global handler (deprecated) if (isset($proxies[$loaderClass = static::class])) { @trigger_error( sprintf('Glob...
php
public function postLoad(LifecycleEventArgs $event) { if (!$loader = $this->getLoader($entity = $event->getEntity())) { return; } // global handler (deprecated) if (isset($proxies[$loaderClass = static::class])) { @trigger_error( sprintf('Glob...
[ "public", "function", "postLoad", "(", "LifecycleEventArgs", "$", "event", ")", "{", "if", "(", "!", "$", "loader", "=", "$", "this", "->", "getLoader", "(", "$", "entity", "=", "$", "event", "->", "getEntity", "(", ")", ")", ")", "{", "return", ";",...
"postLoad" Doctrine event handler, notify loaders if define for given event related entity. @param LifecycleEventArgs $event
[ "postLoad", "Doctrine", "event", "handler", "notify", "loaders", "if", "define", "for", "given", "event", "related", "entity", "." ]
6f368380cfc39d27fafb0844e9a53b4d86d7c034
https://github.com/Linkvalue-Interne/MajoraFrameworkExtraBundle/blob/6f368380cfc39d27fafb0844e9a53b4d86d7c034/src/Majora/Framework/Loader/Bridge/Doctrine/DoctrineEventProxy.php#L87-L114
198,635
as3io/As3ModlrBundle
DependencyInjection/ServiceLoader/Persisters.php
Persisters.createConnection
private function createConnection(array $persisterConfig, $configName) { $options = isset($persisterConfig['parameters']['options']) && is_array($persisterConfig['parameters']['options']) ? $persisterConfig['parameters']['options'] : []; $definition = new Definition( 'Doctrine\MongoDB\Co...
php
private function createConnection(array $persisterConfig, $configName) { $options = isset($persisterConfig['parameters']['options']) && is_array($persisterConfig['parameters']['options']) ? $persisterConfig['parameters']['options'] : []; $definition = new Definition( 'Doctrine\MongoDB\Co...
[ "private", "function", "createConnection", "(", "array", "$", "persisterConfig", ",", "$", "configName", ")", "{", "$", "options", "=", "isset", "(", "$", "persisterConfig", "[", "'parameters'", "]", "[", "'options'", "]", ")", "&&", "is_array", "(", "$", ...
Creates the connection service definition. @param array $persisterConfig @param string $configName The name of the connection configuration service @return Definition
[ "Creates", "the", "connection", "service", "definition", "." ]
7ce2abb7390c7eaf4081c5b7e00b96e7001774a4
https://github.com/as3io/As3ModlrBundle/blob/7ce2abb7390c7eaf4081c5b7e00b96e7001774a4/DependencyInjection/ServiceLoader/Persisters.php#L52-L61
198,636
as3io/As3ModlrBundle
DependencyInjection/ServiceLoader/Persisters.php
Persisters.createDataCollector
private function createDataCollector() { $definition = new Definition( Utility::getBundleClass('DataCollector\MongoDb\PrettyDataCollector') ); $definition->addTag('data_collector', ['id' => 'as3persistermongodb', 'template' => 'As3ModlrBundle:Collector:mongodb']); $defini...
php
private function createDataCollector() { $definition = new Definition( Utility::getBundleClass('DataCollector\MongoDb\PrettyDataCollector') ); $definition->addTag('data_collector', ['id' => 'as3persistermongodb', 'template' => 'As3ModlrBundle:Collector:mongodb']); $defini...
[ "private", "function", "createDataCollector", "(", ")", "{", "$", "definition", "=", "new", "Definition", "(", "Utility", "::", "getBundleClass", "(", "'DataCollector\\MongoDb\\PrettyDataCollector'", ")", ")", ";", "$", "definition", "->", "addTag", "(", "'data_coll...
Creates the persistence data collector service definition. @return Definition
[ "Creates", "the", "persistence", "data", "collector", "service", "definition", "." ]
7ce2abb7390c7eaf4081c5b7e00b96e7001774a4
https://github.com/as3io/As3ModlrBundle/blob/7ce2abb7390c7eaf4081c5b7e00b96e7001774a4/DependencyInjection/ServiceLoader/Persisters.php#L100-L108
198,637
as3io/As3ModlrBundle
DependencyInjection/ServiceLoader/Persisters.php
Persisters.createMongoDbPersister
private function createMongoDbPersister($persisterName, array $persisterConfig, ContainerBuilder $container) { // Storage metadata $smfName = sprintf('%s.metadata', $persisterName); $definition = $this->createSmf(); $container->setDefinition($smfName, $definition); // Config...
php
private function createMongoDbPersister($persisterName, array $persisterConfig, ContainerBuilder $container) { // Storage metadata $smfName = sprintf('%s.metadata', $persisterName); $definition = $this->createSmf(); $container->setDefinition($smfName, $definition); // Config...
[ "private", "function", "createMongoDbPersister", "(", "$", "persisterName", ",", "array", "$", "persisterConfig", ",", "ContainerBuilder", "$", "container", ")", "{", "// Storage metadata", "$", "smfName", "=", "sprintf", "(", "'%s.metadata'", ",", "$", "persisterNa...
Creates the MongoDB persister service definition. Will also load support services. @param string $persisterName @param array $persisterConfig @param ContainerBuilder $container @return Definition
[ "Creates", "the", "MongoDB", "persister", "service", "definition", ".", "Will", "also", "load", "support", "services", "." ]
7ce2abb7390c7eaf4081c5b7e00b96e7001774a4
https://github.com/as3io/As3ModlrBundle/blob/7ce2abb7390c7eaf4081c5b7e00b96e7001774a4/DependencyInjection/ServiceLoader/Persisters.php#L147-L189
198,638
as3io/As3ModlrBundle
DependencyInjection/ServiceLoader/Persisters.php
Persisters.createSmf
private function createSmf() { $definition = new Definition( Utility::getLibraryClass('Persister\MongoDb\StorageMetadataFactory'), [new Reference(Utility::getAliasedName('util.entity'))] ); $definition->setPublic(false); return $definition; }
php
private function createSmf() { $definition = new Definition( Utility::getLibraryClass('Persister\MongoDb\StorageMetadataFactory'), [new Reference(Utility::getAliasedName('util.entity'))] ); $definition->setPublic(false); return $definition; }
[ "private", "function", "createSmf", "(", ")", "{", "$", "definition", "=", "new", "Definition", "(", "Utility", "::", "getLibraryClass", "(", "'Persister\\MongoDb\\StorageMetadataFactory'", ")", ",", "[", "new", "Reference", "(", "Utility", "::", "getAliasedName", ...
Creates the storage metadata factory service definition. @return Definition
[ "Creates", "the", "storage", "metadata", "factory", "service", "definition", "." ]
7ce2abb7390c7eaf4081c5b7e00b96e7001774a4
https://github.com/as3io/As3ModlrBundle/blob/7ce2abb7390c7eaf4081c5b7e00b96e7001774a4/DependencyInjection/ServiceLoader/Persisters.php#L210-L218
198,639
thomasez/BisonLabSakonninBundle
Controller/SakonninTemplateController.php
SakonninTemplateController.indexAction
public function indexAction() { $em = $this->getDoctrineManager(); $sakonninTemplates = $em->getRepository('BisonLabSakonninBundle:SakonninTemplate')->findAll(); return $this->render('BisonLabSakonninBundle:SakonninTemplate:index.html.twig', array( 'sakonninTemplates' => $sakon...
php
public function indexAction() { $em = $this->getDoctrineManager(); $sakonninTemplates = $em->getRepository('BisonLabSakonninBundle:SakonninTemplate')->findAll(); return $this->render('BisonLabSakonninBundle:SakonninTemplate:index.html.twig', array( 'sakonninTemplates' => $sakon...
[ "public", "function", "indexAction", "(", ")", "{", "$", "em", "=", "$", "this", "->", "getDoctrineManager", "(", ")", ";", "$", "sakonninTemplates", "=", "$", "em", "->", "getRepository", "(", "'BisonLabSakonninBundle:SakonninTemplate'", ")", "->", "findAll", ...
Lists all sakonninTemplate entities. @Route("/", name="sakonnintemplate_index", methods={"GET"})
[ "Lists", "all", "sakonninTemplate", "entities", "." ]
45ca7ce9874c4a2be7b503d7067b3d11d2b518cb
https://github.com/thomasez/BisonLabSakonninBundle/blob/45ca7ce9874c4a2be7b503d7067b3d11d2b518cb/Controller/SakonninTemplateController.php#L24-L32
198,640
thomasez/BisonLabSakonninBundle
Controller/SakonninTemplateController.php
SakonninTemplateController.newAction
public function newAction(Request $request) { $sakonninTemplate = new Sakonnintemplate(); $default_lang_code = $this->container->get('translator')->getLocale(); $sakonninTemplate->setLangCode($default_lang_code); $form = $this->createForm('BisonLab\SakonninBundle\Form\SakonninTemplat...
php
public function newAction(Request $request) { $sakonninTemplate = new Sakonnintemplate(); $default_lang_code = $this->container->get('translator')->getLocale(); $sakonninTemplate->setLangCode($default_lang_code); $form = $this->createForm('BisonLab\SakonninBundle\Form\SakonninTemplat...
[ "public", "function", "newAction", "(", "Request", "$", "request", ")", "{", "$", "sakonninTemplate", "=", "new", "Sakonnintemplate", "(", ")", ";", "$", "default_lang_code", "=", "$", "this", "->", "container", "->", "get", "(", "'translator'", ")", "->", ...
Creates a new sakonninTemplate entity. @Route("/new", name="sakonnintemplate_new", methods={"GET", "POST"})
[ "Creates", "a", "new", "sakonninTemplate", "entity", "." ]
45ca7ce9874c4a2be7b503d7067b3d11d2b518cb
https://github.com/thomasez/BisonLabSakonninBundle/blob/45ca7ce9874c4a2be7b503d7067b3d11d2b518cb/Controller/SakonninTemplateController.php#L39-L60
198,641
thomasez/BisonLabSakonninBundle
Controller/SakonninTemplateController.php
SakonninTemplateController.showAction
public function showAction(SakonninTemplate $sakonninTemplate) { $deleteForm = $this->createDeleteForm($sakonninTemplate); return $this->render('BisonLabSakonninBundle:SakonninTemplate:show.html.twig', array( 'sakonninTemplate' => $sakonninTemplate, 'delete_form'...
php
public function showAction(SakonninTemplate $sakonninTemplate) { $deleteForm = $this->createDeleteForm($sakonninTemplate); return $this->render('BisonLabSakonninBundle:SakonninTemplate:show.html.twig', array( 'sakonninTemplate' => $sakonninTemplate, 'delete_form'...
[ "public", "function", "showAction", "(", "SakonninTemplate", "$", "sakonninTemplate", ")", "{", "$", "deleteForm", "=", "$", "this", "->", "createDeleteForm", "(", "$", "sakonninTemplate", ")", ";", "return", "$", "this", "->", "render", "(", "'BisonLabSakonninB...
Finds and displays a sakonninTemplate entity. @Route("/{id}", name="sakonnintemplate_show", methods={"GET"})
[ "Finds", "and", "displays", "a", "sakonninTemplate", "entity", "." ]
45ca7ce9874c4a2be7b503d7067b3d11d2b518cb
https://github.com/thomasez/BisonLabSakonninBundle/blob/45ca7ce9874c4a2be7b503d7067b3d11d2b518cb/Controller/SakonninTemplateController.php#L67-L76
198,642
thomasez/BisonLabSakonninBundle
Controller/SakonninTemplateController.php
SakonninTemplateController.editAction
public function editAction(Request $request, SakonninTemplate $sakonninTemplate) { $deleteForm = $this->createDeleteForm($sakonninTemplate); $editForm = $this->createForm('BisonLab\SakonninBundle\Form\SakonninTemplateType', $sakonninTemplate); $editForm->handleRequest($request); if ...
php
public function editAction(Request $request, SakonninTemplate $sakonninTemplate) { $deleteForm = $this->createDeleteForm($sakonninTemplate); $editForm = $this->createForm('BisonLab\SakonninBundle\Form\SakonninTemplateType', $sakonninTemplate); $editForm->handleRequest($request); if ...
[ "public", "function", "editAction", "(", "Request", "$", "request", ",", "SakonninTemplate", "$", "sakonninTemplate", ")", "{", "$", "deleteForm", "=", "$", "this", "->", "createDeleteForm", "(", "$", "sakonninTemplate", ")", ";", "$", "editForm", "=", "$", ...
Displays a form to edit an existing sakonninTemplate entity. @Route("/{id}/edit", name="sakonnintemplate_edit", methods={"GET", "POST"})
[ "Displays", "a", "form", "to", "edit", "an", "existing", "sakonninTemplate", "entity", "." ]
45ca7ce9874c4a2be7b503d7067b3d11d2b518cb
https://github.com/thomasez/BisonLabSakonninBundle/blob/45ca7ce9874c4a2be7b503d7067b3d11d2b518cb/Controller/SakonninTemplateController.php#L83-L101
198,643
thomasez/BisonLabSakonninBundle
Controller/SakonninTemplateController.php
SakonninTemplateController.deleteAction
public function deleteAction(Request $request, SakonninTemplate $sakonninTemplate) { $form = $this->createDeleteForm($sakonninTemplate); $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { $em = $this->getDoctrineManager(); $em->remove($sa...
php
public function deleteAction(Request $request, SakonninTemplate $sakonninTemplate) { $form = $this->createDeleteForm($sakonninTemplate); $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { $em = $this->getDoctrineManager(); $em->remove($sa...
[ "public", "function", "deleteAction", "(", "Request", "$", "request", ",", "SakonninTemplate", "$", "sakonninTemplate", ")", "{", "$", "form", "=", "$", "this", "->", "createDeleteForm", "(", "$", "sakonninTemplate", ")", ";", "$", "form", "->", "handleRequest...
Deletes a sakonninTemplate entity. @Route("/{id}", name="sakonnintemplate_delete", methods={"DELETE"})
[ "Deletes", "a", "sakonninTemplate", "entity", "." ]
45ca7ce9874c4a2be7b503d7067b3d11d2b518cb
https://github.com/thomasez/BisonLabSakonninBundle/blob/45ca7ce9874c4a2be7b503d7067b3d11d2b518cb/Controller/SakonninTemplateController.php#L108-L120
198,644
thomasez/BisonLabSakonninBundle
Controller/SakonninTemplateController.php
SakonninTemplateController.createDeleteForm
private function createDeleteForm(SakonninTemplate $sakonninTemplate) { return $this->createFormBuilder() ->setAction($this->generateUrl('sakonnintemplate_delete', array('id' => $sakonninTemplate->getId()))) ->setMethod('DELETE') ->getForm() ; }
php
private function createDeleteForm(SakonninTemplate $sakonninTemplate) { return $this->createFormBuilder() ->setAction($this->generateUrl('sakonnintemplate_delete', array('id' => $sakonninTemplate->getId()))) ->setMethod('DELETE') ->getForm() ; }
[ "private", "function", "createDeleteForm", "(", "SakonninTemplate", "$", "sakonninTemplate", ")", "{", "return", "$", "this", "->", "createFormBuilder", "(", ")", "->", "setAction", "(", "$", "this", "->", "generateUrl", "(", "'sakonnintemplate_delete'", ",", "arr...
Creates a form to delete a sakonninTemplate entity. @param SakonninTemplate $sakonninTemplate The sakonninTemplate entity @return \Symfony\Component\Form\Form The form
[ "Creates", "a", "form", "to", "delete", "a", "sakonninTemplate", "entity", "." ]
45ca7ce9874c4a2be7b503d7067b3d11d2b518cb
https://github.com/thomasez/BisonLabSakonninBundle/blob/45ca7ce9874c4a2be7b503d7067b3d11d2b518cb/Controller/SakonninTemplateController.php#L129-L136
198,645
Wedeto/DB
src/Query/JoinClause.php
JoinClause.toSQL
public function toSQL(Parameters $params, bool $inner_clause) { $drv = $params->getDriver(); $table = $drv->toSQL($params, $this->getTable()); $condition = $drv->toSQL($params, $this->getCondition()); return $this->getType() . " JOIN " . $table . " ON " . $condition; }
php
public function toSQL(Parameters $params, bool $inner_clause) { $drv = $params->getDriver(); $table = $drv->toSQL($params, $this->getTable()); $condition = $drv->toSQL($params, $this->getCondition()); return $this->getType() . " JOIN " . $table . " ON " . $condition; }
[ "public", "function", "toSQL", "(", "Parameters", "$", "params", ",", "bool", "$", "inner_clause", ")", "{", "$", "drv", "=", "$", "params", "->", "getDriver", "(", ")", ";", "$", "table", "=", "$", "drv", "->", "toSQL", "(", "$", "params", ",", "$...
Write a JOIN clause to SQL query syntax @param Parameters $params The query parameters: tables and placeholder values @param bool $inner_clause @return string The generated SQL
[ "Write", "a", "JOIN", "clause", "to", "SQL", "query", "syntax" ]
715f8f2e3ae6b53c511c40b620921cb9c87e6f62
https://github.com/Wedeto/DB/blob/715f8f2e3ae6b53c511c40b620921cb9c87e6f62/src/Query/JoinClause.php#L92-L98
198,646
dann95/ts3-php
TeamSpeak3/Adapter/FileTransfer.php
FileTransfer.download
public function download($ftkey, $size, $passthru = false) { $this->init($ftkey); if ($passthru) { return $this->passthru($size); } $buff = new String(""); $size = intval($size); $pack = 4096; Signal::getInstance()->emit("filetransferDownloadSta...
php
public function download($ftkey, $size, $passthru = false) { $this->init($ftkey); if ($passthru) { return $this->passthru($size); } $buff = new String(""); $size = intval($size); $pack = 4096; Signal::getInstance()->emit("filetransferDownloadSta...
[ "public", "function", "download", "(", "$", "ftkey", ",", "$", "size", ",", "$", "passthru", "=", "false", ")", "{", "$", "this", "->", "init", "(", "$", "ftkey", ")", ";", "if", "(", "$", "passthru", ")", "{", "return", "$", "this", "->", "passt...
Returns the content of a downloaded file as a String object. @param string $ftkey @param integer $size @param boolean $passthru @throws Ts3Exception @return String
[ "Returns", "the", "content", "of", "a", "downloaded", "file", "as", "a", "String", "object", "." ]
d4693d78b54be0177a2b5fab316c0ff9d036238d
https://github.com/dann95/ts3-php/blob/d4693d78b54be0177a2b5fab316c0ff9d036238d/TeamSpeak3/Adapter/FileTransfer.php#L141-L177
198,647
ekyna/Table
Util/ColumnSort.php
ColumnSort.isValid
static public function isValid($direction, $throw = false) { $valid = in_array($direction, [ static::NONE, static::ASC, static::DESC, ], true); if (!$valid && $throw) { throw new InvalidArgumentException(sprintf("The direction '%s' is not vali...
php
static public function isValid($direction, $throw = false) { $valid = in_array($direction, [ static::NONE, static::ASC, static::DESC, ], true); if (!$valid && $throw) { throw new InvalidArgumentException(sprintf("The direction '%s' is not vali...
[ "static", "public", "function", "isValid", "(", "$", "direction", ",", "$", "throw", "=", "false", ")", "{", "$", "valid", "=", "in_array", "(", "$", "direction", ",", "[", "static", "::", "NONE", ",", "static", "::", "ASC", ",", "static", "::", "DES...
Returns whether the given direction is valid. @param string $direction @param bool $throw @return bool
[ "Returns", "whether", "the", "given", "direction", "is", "valid", "." ]
6f06e8fd8a3248d52f3a91f10508471344db311a
https://github.com/ekyna/Table/blob/6f06e8fd8a3248d52f3a91f10508471344db311a/Util/ColumnSort.php#L27-L40
198,648
t-kanstantsin/fileupload
src/model/Container.php
Container.configure
public static function configure($object, $properties) { foreach ($properties as $name => $value) { if (!property_exists($object, $name)) { throw new InvalidConfigException(sprintf('Property %s in class %s not found.', $name, \get_class($object))); } $obje...
php
public static function configure($object, $properties) { foreach ($properties as $name => $value) { if (!property_exists($object, $name)) { throw new InvalidConfigException(sprintf('Property %s in class %s not found.', $name, \get_class($object))); } $obje...
[ "public", "static", "function", "configure", "(", "$", "object", ",", "$", "properties", ")", "{", "foreach", "(", "$", "properties", "as", "$", "name", "=>", "$", "value", ")", "{", "if", "(", "!", "property_exists", "(", "$", "object", ",", "$", "n...
Configures an object with the initial property values. Inspired by Yii2. @see \yii\BaseYii::configure @param object $object the object to be configured @param array $properties the property initial values given in terms of name-value pairs. @return object the object itself @throws InvalidConfigException
[ "Configures", "an", "object", "with", "the", "initial", "property", "values", ".", "Inspired", "by", "Yii2", "." ]
d6317a9b9b36d992f09affe3900ef7d7ddfd855f
https://github.com/t-kanstantsin/fileupload/blob/d6317a9b9b36d992f09affe3900ef7d7ddfd855f/src/model/Container.php#L22-L32
198,649
t-kanstantsin/fileupload
src/model/Container.php
Container.createObject
public static function createObject($type) { if (\is_string($type)) { return static::get($type); } elseif (\is_array($type)) { if (!isset($type['class'])) { throw new InvalidConfigException('Object configuration must be an array containing a "class" element.')...
php
public static function createObject($type) { if (\is_string($type)) { return static::get($type); } elseif (\is_array($type)) { if (!isset($type['class'])) { throw new InvalidConfigException('Object configuration must be an array containing a "class" element.')...
[ "public", "static", "function", "createObject", "(", "$", "type", ")", "{", "if", "(", "\\", "is_string", "(", "$", "type", ")", ")", "{", "return", "static", "::", "get", "(", "$", "type", ")", ";", "}", "elseif", "(", "\\", "is_array", "(", "$", ...
Creates a new object using the given configuration. Inspired by Yii2. @see \yii\BaseYii::createObject @param string|array $type @return mixed @throws InvalidConfigException @throws \ReflectionException
[ "Creates", "a", "new", "object", "using", "the", "given", "configuration", ".", "Inspired", "by", "Yii2", "." ]
d6317a9b9b36d992f09affe3900ef7d7ddfd855f
https://github.com/t-kanstantsin/fileupload/blob/d6317a9b9b36d992f09affe3900ef7d7ddfd855f/src/model/Container.php#L42-L58
198,650
t-kanstantsin/fileupload
src/model/Container.php
Container.get
public static function get(string $class, array $config = []) { $reflection = new \ReflectionClass($class); if (!$reflection->isInstantiable()) { throw new \ReflectionException(sprintf('`%s` is not instantiable.', $reflection->name)); } if ($reflection->implementsInterfa...
php
public static function get(string $class, array $config = []) { $reflection = new \ReflectionClass($class); if (!$reflection->isInstantiable()) { throw new \ReflectionException(sprintf('`%s` is not instantiable.', $reflection->name)); } if ($reflection->implementsInterfa...
[ "public", "static", "function", "get", "(", "string", "$", "class", ",", "array", "$", "config", "=", "[", "]", ")", "{", "$", "reflection", "=", "new", "\\", "ReflectionClass", "(", "$", "class", ")", ";", "if", "(", "!", "$", "reflection", "->", ...
Creates an instance of the specified class. Inspired by Yii2 di. @see \yii\di\Container::build @param string $class the class name @param array $config configurations to be applied to the new instance @return mixed @throws \ReflectionException @throws InvalidConfigException
[ "Creates", "an", "instance", "of", "the", "specified", "class", ".", "Inspired", "by", "Yii2", "di", "." ]
d6317a9b9b36d992f09affe3900ef7d7ddfd855f
https://github.com/t-kanstantsin/fileupload/blob/d6317a9b9b36d992f09affe3900ef7d7ddfd855f/src/model/Container.php#L69-L85
198,651
eureka-framework/component-password
src/Password/Password.php
Password.generate
public function generate($length = 16, $alpha = 0.6, $numeric = 0.2, $other = 0.2) { $chars = array(); //~ Alphabetic characters for ($index = 0, $max = ceil($alpha * $length); $index < $max; $index++) { if ((bool) rand(0, 1)) { $char = rand(65, 90); // Upper ...
php
public function generate($length = 16, $alpha = 0.6, $numeric = 0.2, $other = 0.2) { $chars = array(); //~ Alphabetic characters for ($index = 0, $max = ceil($alpha * $length); $index < $max; $index++) { if ((bool) rand(0, 1)) { $char = rand(65, 90); // Upper ...
[ "public", "function", "generate", "(", "$", "length", "=", "16", ",", "$", "alpha", "=", "0.6", ",", "$", "numeric", "=", "0.2", ",", "$", "other", "=", "0.2", ")", "{", "$", "chars", "=", "array", "(", ")", ";", "//~ Alphabetic characters", "for", ...
Generate password of given length. @param int $length @param float $alpha % alphabetic chars. @param float $numeric % of numeric chars @param float $other % of other chars @return self
[ "Generate", "password", "of", "given", "length", "." ]
1eed8c97531e64a7bd6f7f58625a684b1dce34c5
https://github.com/eureka-framework/component-password/blob/1eed8c97531e64a7bd6f7f58625a684b1dce34c5/src/Password/Password.php#L48-L96
198,652
itkg/core
src/Itkg/Core/Command/DatabaseListCommand.php
DatabaseListCommand.configureOptions
protected function configureOptions(InputInterface $input) { if ($input->getOption('path')) { $this->finder->setPath($input->getOption('path')); $this->locator->setParams(array('path' => $input->getOption('path'))); } }
php
protected function configureOptions(InputInterface $input) { if ($input->getOption('path')) { $this->finder->setPath($input->getOption('path')); $this->locator->setParams(array('path' => $input->getOption('path'))); } }
[ "protected", "function", "configureOptions", "(", "InputInterface", "$", "input", ")", "{", "if", "(", "$", "input", "->", "getOption", "(", "'path'", ")", ")", "{", "$", "this", "->", "finder", "->", "setPath", "(", "$", "input", "->", "getOption", "(",...
Configure input options @param InputInterface $input
[ "Configure", "input", "options" ]
e5e4efb05feb4d23b0df41f2b21fd095103e593b
https://github.com/itkg/core/blob/e5e4efb05feb4d23b0df41f2b21fd095103e593b/src/Itkg/Core/Command/DatabaseListCommand.php#L119-L125
198,653
itkg/core
src/Itkg/Core/Command/DatabaseListCommand.php
DatabaseListCommand.display
protected function display(OutputInterface $output, array $rows = array(), array $failed = array()) { $this->getApplication()->getHelperSet()->get('table') ->setHeaders(array('Name', 'Scripts', 'Rollbacks', 'Status')) ->setRows($rows) ->render($output); if (!empt...
php
protected function display(OutputInterface $output, array $rows = array(), array $failed = array()) { $this->getApplication()->getHelperSet()->get('table') ->setHeaders(array('Name', 'Scripts', 'Rollbacks', 'Status')) ->setRows($rows) ->render($output); if (!empt...
[ "protected", "function", "display", "(", "OutputInterface", "$", "output", ",", "array", "$", "rows", "=", "array", "(", ")", ",", "array", "$", "failed", "=", "array", "(", ")", ")", "{", "$", "this", "->", "getApplication", "(", ")", "->", "getHelper...
Display result as a table @param OutputInterface $output @param array $rows
[ "Display", "result", "as", "a", "table" ]
e5e4efb05feb4d23b0df41f2b21fd095103e593b
https://github.com/itkg/core/blob/e5e4efb05feb4d23b0df41f2b21fd095103e593b/src/Itkg/Core/Command/DatabaseListCommand.php#L133-L143
198,654
hiqdev/minii-helpers
src/BaseUrl.php
BaseUrl.toRoute
public static function toRoute($route, $scheme = false) { $route = (array) $route; $route[0] = static::normalizeRoute($route[0]); if ($scheme) { return Yii::$app->getUrlManager()->createAbsoluteUrl($route, is_string($scheme) ? $scheme : null); } else { return...
php
public static function toRoute($route, $scheme = false) { $route = (array) $route; $route[0] = static::normalizeRoute($route[0]); if ($scheme) { return Yii::$app->getUrlManager()->createAbsoluteUrl($route, is_string($scheme) ? $scheme : null); } else { return...
[ "public", "static", "function", "toRoute", "(", "$", "route", ",", "$", "scheme", "=", "false", ")", "{", "$", "route", "=", "(", "array", ")", "$", "route", ";", "$", "route", "[", "0", "]", "=", "static", "::", "normalizeRoute", "(", "$", "route"...
Creates a URL for the given route. This method will use [[\yii\web\UrlManager]] to create a URL. You may specify the route as a string, e.g., `site/index`. You may also use an array if you want to specify additional query parameters for the URL being created. The array format must be: ```php // generates: /index.php...
[ "Creates", "a", "URL", "for", "the", "given", "route", "." ]
001b7a56a6ebdc432c4683fe47c00a913f8e57d7
https://github.com/hiqdev/minii-helpers/blob/001b7a56a6ebdc432c4683fe47c00a913f8e57d7/src/BaseUrl.php#L88-L98
198,655
hiqdev/minii-helpers
src/BaseUrl.php
BaseUrl.to
public static function to($url = '', $scheme = false) { if (is_array($url)) { return static::toRoute($url, $scheme); } $url = Yii::getAlias($url); if ($url === '') { $url = Yii::$app->getRequest()->getUrl(); } if (!$scheme) { retu...
php
public static function to($url = '', $scheme = false) { if (is_array($url)) { return static::toRoute($url, $scheme); } $url = Yii::getAlias($url); if ($url === '') { $url = Yii::$app->getRequest()->getUrl(); } if (!$scheme) { retu...
[ "public", "static", "function", "to", "(", "$", "url", "=", "''", ",", "$", "scheme", "=", "false", ")", "{", "if", "(", "is_array", "(", "$", "url", ")", ")", "{", "return", "static", "::", "toRoute", "(", "$", "url", ",", "$", "scheme", ")", ...
Creates a URL based on the given parameters. This method is very similar to [[toRoute()]]. The only difference is that this method requires a route to be specified as an array only. If a string is given, it will be treated as a URL. In particular, if `$url` is - an array: [[toRoute()]] will be called to generate the ...
[ "Creates", "a", "URL", "based", "on", "the", "given", "parameters", "." ]
001b7a56a6ebdc432c4683fe47c00a913f8e57d7
https://github.com/hiqdev/minii-helpers/blob/001b7a56a6ebdc432c4683fe47c00a913f8e57d7/src/BaseUrl.php#L199-L230
198,656
Hnto/nuki
src/Handlers/Repository/RepositoryHandler.php
RepositoryHandler.buildRepository
public function buildRepository(string $key) { $repositoryInfo = $this->get($key); if (is_null($repositoryInfo)) { throw new \Nuki\Exceptions\Base(vsprintf('%1$s is not a registered repository', [$key])); } $this->validate($repositoryInfo, $key); $repository = new $repositoryInfo['Locatio...
php
public function buildRepository(string $key) { $repositoryInfo = $this->get($key); if (is_null($repositoryInfo)) { throw new \Nuki\Exceptions\Base(vsprintf('%1$s is not a registered repository', [$key])); } $this->validate($repositoryInfo, $key); $repository = new $repositoryInfo['Locatio...
[ "public", "function", "buildRepository", "(", "string", "$", "key", ")", "{", "$", "repositoryInfo", "=", "$", "this", "->", "get", "(", "$", "key", ")", ";", "if", "(", "is_null", "(", "$", "repositoryInfo", ")", ")", "{", "throw", "new", "\\", "Nuk...
Build a repository by its key and additional options @param string $key @return \Nuki\Skeletons\Providers\Repository @throws Base
[ "Build", "a", "repository", "by", "its", "key", "and", "additional", "options" ]
c3fb16244e8d611c335a88e3b9c9ee7d81fafc0c
https://github.com/Hnto/nuki/blob/c3fb16244e8d611c335a88e3b9c9ee7d81fafc0c/src/Handlers/Repository/RepositoryHandler.php#L57-L69
198,657
Hnto/nuki
src/Handlers/Repository/RepositoryHandler.php
RepositoryHandler.validate
private function validate(array $repository = [], $key) { if (!isset($repository['Providers']) || empty($repository['Providers'])) { throw new \Nuki\Exceptions\Base(vsprintf('%1$s does not have any providers', [$key])); } if (!class_exists($repository['Location'])) { throw new \Nuki\Excepti...
php
private function validate(array $repository = [], $key) { if (!isset($repository['Providers']) || empty($repository['Providers'])) { throw new \Nuki\Exceptions\Base(vsprintf('%1$s does not have any providers', [$key])); } if (!class_exists($repository['Location'])) { throw new \Nuki\Excepti...
[ "private", "function", "validate", "(", "array", "$", "repository", "=", "[", "]", ",", "$", "key", ")", "{", "if", "(", "!", "isset", "(", "$", "repository", "[", "'Providers'", "]", ")", "||", "empty", "(", "$", "repository", "[", "'Providers'", "]...
Validate repository info @param array $repository @throws \Nuki\Exceptions\Base
[ "Validate", "repository", "info" ]
c3fb16244e8d611c335a88e3b9c9ee7d81fafc0c
https://github.com/Hnto/nuki/blob/c3fb16244e8d611c335a88e3b9c9ee7d81fafc0c/src/Handlers/Repository/RepositoryHandler.php#L77-L85
198,658
eureka-framework/component-database
src/Database/Database.php
Database.getConnection
public function getConnection($name = null) { if ($name === null) { reset($this->config); $name = key($this->config); } if (!isset($this->config[$name])) { throw new \Exception('Configuration name does not exists !'); } if (!isset($this->...
php
public function getConnection($name = null) { if ($name === null) { reset($this->config); $name = key($this->config); } if (!isset($this->config[$name])) { throw new \Exception('Configuration name does not exists !'); } if (!isset($this->...
[ "public", "function", "getConnection", "(", "$", "name", "=", "null", ")", "{", "if", "(", "$", "name", "===", "null", ")", "{", "reset", "(", "$", "this", "->", "config", ")", ";", "$", "name", "=", "key", "(", "$", "this", "->", "config", ")", ...
Create or get existing connection. @param string $name @return \PDO @throws \Exception
[ "Create", "or", "get", "existing", "connection", "." ]
a8a44d8ecff5f692be968205cf2c520643344b5d
https://github.com/eureka-framework/component-database/blob/a8a44d8ecff5f692be968205cf2c520643344b5d/src/Database/Database.php#L95-L122
198,659
eureka-framework/component-database
src/Database/Database.php
Database.getPDO
protected function getPDO($name) { if (!isset($this->config[$name]) || !is_array($this->config[$name])) { throw new \Exception('Config not found ! (config: ' . $name . ')'); } $config = $this->config[$name]; if (!isset($config['dsn'])) { throw new \Exception...
php
protected function getPDO($name) { if (!isset($this->config[$name]) || !is_array($this->config[$name])) { throw new \Exception('Config not found ! (config: ' . $name . ')'); } $config = $this->config[$name]; if (!isset($config['dsn'])) { throw new \Exception...
[ "protected", "function", "getPDO", "(", "$", "name", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "config", "[", "$", "name", "]", ")", "||", "!", "is_array", "(", "$", "this", "->", "config", "[", "$", "name", "]", ")", ")", "{",...
Create new PDO connection @param string $name Config name @return \PDO @throws \Exception
[ "Create", "new", "PDO", "connection" ]
a8a44d8ecff5f692be968205cf2c520643344b5d
https://github.com/eureka-framework/component-database/blob/a8a44d8ecff5f692be968205cf2c520643344b5d/src/Database/Database.php#L131-L164
198,660
MBHFramework/mbh-rest
Mbh/Container.php
Container.registerDefaultServices
private function registerDefaultServices($userSettings) { $defaultSettings = $this->defaultSettings; /** * This service MUST return an array or an * instance of ArrayAccess. * * @return array|ArrayAccess */ $this['settings'] = function () use ($u...
php
private function registerDefaultServices($userSettings) { $defaultSettings = $this->defaultSettings; /** * This service MUST return an array or an * instance of ArrayAccess. * * @return array|ArrayAccess */ $this['settings'] = function () use ($u...
[ "private", "function", "registerDefaultServices", "(", "$", "userSettings", ")", "{", "$", "defaultSettings", "=", "$", "this", "->", "defaultSettings", ";", "/**\n * This service MUST return an array or an\n * instance of ArrayAccess.\n *\n * @return ...
This function registers the default services that Mbh needs to work. All services are shared - that is, they are registered such that the same instance is returned on subsequent calls. @param array $userSettings Associative array of application settings @return void
[ "This", "function", "registers", "the", "default", "services", "that", "Mbh", "needs", "to", "work", "." ]
e23b4e66dc2b8da35e06312dcfdba41c4cfc2c83
https://github.com/MBHFramework/mbh-rest/blob/e23b4e66dc2b8da35e06312dcfdba41c4cfc2c83/Mbh/Container.php#L69-L85
198,661
imsamurai/CakePHP-AdvancedShell
Console/Command/Task/Scheduled/ScheduleSplitter.php
ScheduleSplitter.splitInner
public function splitInner(array $arguments = array()) { if (is_null($this->_InnerSplitter)) { return new ArrayIterator(array($arguments)); } return $this->_InnerSplitter->split($arguments); }
php
public function splitInner(array $arguments = array()) { if (is_null($this->_InnerSplitter)) { return new ArrayIterator(array($arguments)); } return $this->_InnerSplitter->split($arguments); }
[ "public", "function", "splitInner", "(", "array", "$", "arguments", "=", "array", "(", ")", ")", "{", "if", "(", "is_null", "(", "$", "this", "->", "_InnerSplitter", ")", ")", "{", "return", "new", "ArrayIterator", "(", "array", "(", "$", "arguments", ...
Returns iterator over arguments splitted by inner splitter @param array $arguments Script arguments @return Iterator
[ "Returns", "iterator", "over", "arguments", "splitted", "by", "inner", "splitter" ]
087d483742e2a76bee45e35b8d94957b0d20f857
https://github.com/imsamurai/CakePHP-AdvancedShell/blob/087d483742e2a76bee45e35b8d94957b0d20f857/Console/Command/Task/Scheduled/ScheduleSplitter.php#L49-L54
198,662
Subscribo/klarna-invoice-sdk-wrapped
src/pclasses/mysqlstorage.class.php
MySQLStorage.connect
public function connect() { $this->link = mysql_connect($this->addr, $this->user, $this->passwd); if ($this->link === false) { throw new Klarna_DatabaseException( 'Failed to connect to database! ('.mysql_error().')' ); } }
php
public function connect() { $this->link = mysql_connect($this->addr, $this->user, $this->passwd); if ($this->link === false) { throw new Klarna_DatabaseException( 'Failed to connect to database! ('.mysql_error().')' ); } }
[ "public", "function", "connect", "(", ")", "{", "$", "this", "->", "link", "=", "mysql_connect", "(", "$", "this", "->", "addr", ",", "$", "this", "->", "user", ",", "$", "this", "->", "passwd", ")", ";", "if", "(", "$", "this", "->", "link", "==...
Establish a connection to the DB @throws Klarna_DatabaseException If a connection could not be made @return void
[ "Establish", "a", "connection", "to", "the", "DB" ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/pclasses/mysqlstorage.class.php#L118-L126
198,663
Subscribo/klarna-invoice-sdk-wrapped
src/pclasses/mysqlstorage.class.php
MySQLStorage.create
public function create() { if (!mysql_query( "CREATE DATABASE IF NOT EXISTS `{$this->dbName}`", $this->link ) ) { throw new Klarna_DatabaseException( 'Failed to create! ('.mysql_error().')' ); } $create = mysql_...
php
public function create() { if (!mysql_query( "CREATE DATABASE IF NOT EXISTS `{$this->dbName}`", $this->link ) ) { throw new Klarna_DatabaseException( 'Failed to create! ('.mysql_error().')' ); } $create = mysql_...
[ "public", "function", "create", "(", ")", "{", "if", "(", "!", "mysql_query", "(", "\"CREATE DATABASE IF NOT EXISTS `{$this->dbName}`\"", ",", "$", "this", "->", "link", ")", ")", "{", "throw", "new", "Klarna_DatabaseException", "(", "'Failed to create! ('", ".", ...
Initialize the DB by creating the necessary database tables. @throws Klarna_DatabaseException If tables could not be created @return void
[ "Initialize", "the", "DB", "by", "creating", "the", "necessary", "database", "tables", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/pclasses/mysqlstorage.class.php#L135-L169
198,664
Subscribo/klarna-invoice-sdk-wrapped
src/pclasses/mysqlstorage.class.php
MySQLStorage.save
public function save($uri) { $this->splitURI($uri); $this->connect(); if (!is_array($this->pclasses) || count($this->pclasses) == 0) { return; } foreach ($this->pclasses as $pclasses) { foreach ($pclasses as $pclass) { //Remove the pc...
php
public function save($uri) { $this->splitURI($uri); $this->connect(); if (!is_array($this->pclasses) || count($this->pclasses) == 0) { return; } foreach ($this->pclasses as $pclasses) { foreach ($pclasses as $pclass) { //Remove the pc...
[ "public", "function", "save", "(", "$", "uri", ")", "{", "$", "this", "->", "splitURI", "(", "$", "uri", ")", ";", "$", "this", "->", "connect", "(", ")", ";", "if", "(", "!", "is_array", "(", "$", "this", "->", "pclasses", ")", "||", "count", ...
Save pclasses to database @param string $uri pclass uri @throws KlarnaException @return void
[ "Save", "pclasses", "to", "database" ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/pclasses/mysqlstorage.class.php#L266-L319
198,665
Subscribo/klarna-invoice-sdk-wrapped
src/pclasses/mysqlstorage.class.php
MySQLStorage.clear
public function clear($uri) { try { $this->splitURI($uri); unset($this->pclasses); $this->connect(); mysql_query( "DELETE FROM `{$this->dbName}`.`{$this->dbTable}`", $this->link ); } catch(Exception $e) { ...
php
public function clear($uri) { try { $this->splitURI($uri); unset($this->pclasses); $this->connect(); mysql_query( "DELETE FROM `{$this->dbName}`.`{$this->dbTable}`", $this->link ); } catch(Exception $e) { ...
[ "public", "function", "clear", "(", "$", "uri", ")", "{", "try", "{", "$", "this", "->", "splitURI", "(", "$", "uri", ")", ";", "unset", "(", "$", "this", "->", "pclasses", ")", ";", "$", "this", "->", "connect", "(", ")", ";", "mysql_query", "("...
Clear the pclasses @param string $uri pclass uri @throws KlarnaException @return void
[ "Clear", "the", "pclasses" ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/pclasses/mysqlstorage.class.php#L329-L345
198,666
eureka-framework/component-orm
src/Orm/Console/Generator.php
Generator.help
public function help() { $style = new Eurekon\Style(' *** RUN - HELP ***'); Eurekon\Out::std($style->color('fg', Eurekon\Style::COLOR_GREEN)->get()); Eurekon\Out::std(''); $help = new Eurekon\Help('...', true); $help->addArgument('', 'directory', 'Config directory to inspect...
php
public function help() { $style = new Eurekon\Style(' *** RUN - HELP ***'); Eurekon\Out::std($style->color('fg', Eurekon\Style::COLOR_GREEN)->get()); Eurekon\Out::std(''); $help = new Eurekon\Help('...', true); $help->addArgument('', 'directory', 'Config directory to inspect...
[ "public", "function", "help", "(", ")", "{", "$", "style", "=", "new", "Eurekon", "\\", "Style", "(", "' *** RUN - HELP ***'", ")", ";", "Eurekon", "\\", "Out", "::", "std", "(", "$", "style", "->", "color", "(", "'fg'", ",", "Eurekon", "\\", "Style", ...
Help method. @return void
[ "Help", "method", "." ]
bce48121d26c4e923534f9dc70da597634184316
https://github.com/eureka-framework/component-orm/blob/bce48121d26c4e923534f9dc70da597634184316/src/Orm/Console/Generator.php#L43-L56
198,667
eureka-framework/component-orm
src/Orm/Console/Generator.php
Generator.run
public function run() { $argument = Eurekon\Argument::getInstance(); $directory = (string) $argument->get('directory'); $configName = (string) $argument->get('item'); $configNamespace = (string) $argument->get('namespace', null, 'global.database'); $dbName ...
php
public function run() { $argument = Eurekon\Argument::getInstance(); $directory = (string) $argument->get('directory'); $configName = (string) $argument->get('item'); $configNamespace = (string) $argument->get('namespace', null, 'global.database'); $dbName ...
[ "public", "function", "run", "(", ")", "{", "$", "argument", "=", "Eurekon", "\\", "Argument", "::", "getInstance", "(", ")", ";", "$", "directory", "=", "(", "string", ")", "$", "argument", "->", "get", "(", "'directory'", ")", ";", "$", "configName",...
Run method. @return void
[ "Run", "method", "." ]
bce48121d26c4e923534f9dc70da597634184316
https://github.com/eureka-framework/component-orm/blob/bce48121d26c4e923534f9dc70da597634184316/src/Orm/Console/Generator.php#L63-L100
198,668
eureka-framework/component-orm
src/Orm/Console/Generator.php
Generator.findConfigs
protected function findConfigs($currentFile, array $data, $configName = '', $doLoadJoins = false) { $configs = array(); $data = $this->replace($currentFile, $data); foreach ($data['configs'] as $name => $config) { if (!empty($configName) && $name !== $configName) { ...
php
protected function findConfigs($currentFile, array $data, $configName = '', $doLoadJoins = false) { $configs = array(); $data = $this->replace($currentFile, $data); foreach ($data['configs'] as $name => $config) { if (!empty($configName) && $name !== $configName) { ...
[ "protected", "function", "findConfigs", "(", "$", "currentFile", ",", "array", "$", "data", ",", "$", "configName", "=", "''", ",", "$", "doLoadJoins", "=", "false", ")", "{", "$", "configs", "=", "array", "(", ")", ";", "$", "data", "=", "$", "this"...
Find configs. @param string $currentFile @param array $data @param string $configName Filter on name @param bool $doLoadJoins @return array|Config
[ "Find", "configs", "." ]
bce48121d26c4e923534f9dc70da597634184316
https://github.com/eureka-framework/component-orm/blob/bce48121d26c4e923534f9dc70da597634184316/src/Orm/Console/Generator.php#L111-L137
198,669
eureka-framework/component-orm
src/Orm/Console/Generator.php
Generator.loadJoins
protected function loadJoins($currentFile, &$config, $data) { if (empty($config['joins']) || !is_array($config['joins'])) { $config['joins'] = array(); return $this; } foreach ($config['joins'] as $joinName => &$joinConfig) { $filename = $currentFile; ...
php
protected function loadJoins($currentFile, &$config, $data) { if (empty($config['joins']) || !is_array($config['joins'])) { $config['joins'] = array(); return $this; } foreach ($config['joins'] as $joinName => &$joinConfig) { $filename = $currentFile; ...
[ "protected", "function", "loadJoins", "(", "$", "currentFile", ",", "&", "$", "config", ",", "$", "data", ")", "{", "if", "(", "empty", "(", "$", "config", "[", "'joins'", "]", ")", "||", "!", "is_array", "(", "$", "config", "[", "'joins'", "]", ")...
Load joined configs. @param string $currentFile @param array $config Current config @param array $data Global current config data @return self
[ "Load", "joined", "configs", "." ]
bce48121d26c4e923534f9dc70da597634184316
https://github.com/eureka-framework/component-orm/blob/bce48121d26c4e923534f9dc70da597634184316/src/Orm/Console/Generator.php#L147-L168
198,670
asaokamei/ScoreSql
src/Builder/BuildWhere.php
BuildWhere.buildColRelVal
protected function buildColRelVal( $where ) { $rel = $where[ 'rel' ]; $col = $where[ 'col' ]; $val = $where[ 'val' ]; if ( $rel == 'EQ' ) { // EQ: equal to another column (i.e. val is an identifier.) $val = $this->quote( $val ); $rel = '='; ...
php
protected function buildColRelVal( $where ) { $rel = $where[ 'rel' ]; $col = $where[ 'col' ]; $val = $where[ 'val' ]; if ( $rel == 'EQ' ) { // EQ: equal to another column (i.e. val is an identifier.) $val = $this->quote( $val ); $rel = '='; ...
[ "protected", "function", "buildColRelVal", "(", "$", "where", ")", "{", "$", "rel", "=", "$", "where", "[", "'rel'", "]", ";", "$", "col", "=", "$", "where", "[", "'col'", "]", ";", "$", "val", "=", "$", "where", "[", "'val'", "]", ";", "if", "...
for normal case where condition, like col = val @param array $where @return string
[ "for", "normal", "case", "where", "condition", "like", "col", "=", "val" ]
f1fce28476629e98b3c4c1216859c7f5309de7a1
https://github.com/asaokamei/ScoreSql/blob/f1fce28476629e98b3c4c1216859c7f5309de7a1/src/Builder/BuildWhere.php#L150-L167
198,671
kkthek/diqa-util
src/Util/Configuration/ConfigLoader.php
ConfigLoader.loadEnv
public function loadEnv() { $ed = $this->loadEnvDefault(); $ej = $this->loadEnvJson(); if(!$ed && !$ej ) { $msg = "No configuration files found."; $this->error($msg); die($msg); } }
php
public function loadEnv() { $ed = $this->loadEnvDefault(); $ej = $this->loadEnvJson(); if(!$ed && !$ej ) { $msg = "No configuration files found."; $this->error($msg); die($msg); } }
[ "public", "function", "loadEnv", "(", ")", "{", "$", "ed", "=", "$", "this", "->", "loadEnvDefault", "(", ")", ";", "$", "ej", "=", "$", "this", "->", "loadEnvJson", "(", ")", ";", "if", "(", "!", "$", "ed", "&&", "!", "$", "ej", ")", "{", "$...
loads env-default.json and then env.json
[ "loads", "env", "-", "default", ".", "json", "and", "then", "env", ".", "json" ]
df35d16403b5dbf0f7570daded6cfa26814ae7e0
https://github.com/kkthek/diqa-util/blob/df35d16403b5dbf0f7570daded6cfa26814ae7e0/src/Util/Configuration/ConfigLoader.php#L80-L89
198,672
heiglandreas/OrgHeiglFileFinder
src/FileFinder.php
FileFinder.find
public function find() { $this->getFileList()->clear(); foreach ($this->searchLocations as $location) { if (! is_dir($location)) { continue; } $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($location)); forea...
php
public function find() { $this->getFileList()->clear(); foreach ($this->searchLocations as $location) { if (! is_dir($location)) { continue; } $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($location)); forea...
[ "public", "function", "find", "(", ")", "{", "$", "this", "->", "getFileList", "(", ")", "->", "clear", "(", ")", ";", "foreach", "(", "$", "this", "->", "searchLocations", "as", "$", "location", ")", "{", "if", "(", "!", "is_dir", "(", "$", "locat...
Do the actual searching @return FileListInterface[]
[ "Do", "the", "actual", "searching" ]
189d15b95bec7dc186ef73681463c104831234d8
https://github.com/heiglandreas/OrgHeiglFileFinder/blob/189d15b95bec7dc186ef73681463c104831234d8/src/FileFinder.php#L113-L130
198,673
heiglandreas/OrgHeiglFileFinder
src/FileFinder.php
FileFinder.filter
public function filter(\SPLFileInfo $file) { foreach ($this->filterlist as $filter) { if (! $filter->filter($file)) { return false; } } return true; }
php
public function filter(\SPLFileInfo $file) { foreach ($this->filterlist as $filter) { if (! $filter->filter($file)) { return false; } } return true; }
[ "public", "function", "filter", "(", "\\", "SPLFileInfo", "$", "file", ")", "{", "foreach", "(", "$", "this", "->", "filterlist", "as", "$", "filter", ")", "{", "if", "(", "!", "$", "filter", "->", "filter", "(", "$", "file", ")", ")", "{", "return...
Filter the file @param SPLFileInfo $file @return bool
[ "Filter", "the", "file" ]
189d15b95bec7dc186ef73681463c104831234d8
https://github.com/heiglandreas/OrgHeiglFileFinder/blob/189d15b95bec7dc186ef73681463c104831234d8/src/FileFinder.php#L139-L147
198,674
AnonymPHP/Anonym-HttpFoundation
Request.php
Request.file
public function file($name = '', $uploadDir = UPLOAD) { if (isset($_FILES[$name])) { $file = new FileUpload($_FILES[$name], $uploadDir); return $file; } else { throw new FileNotUploadedException(sprintf('Your %s file is not uploaded yet', $name)); } }
php
public function file($name = '', $uploadDir = UPLOAD) { if (isset($_FILES[$name])) { $file = new FileUpload($_FILES[$name], $uploadDir); return $file; } else { throw new FileNotUploadedException(sprintf('Your %s file is not uploaded yet', $name)); } }
[ "public", "function", "file", "(", "$", "name", "=", "''", ",", "$", "uploadDir", "=", "UPLOAD", ")", "{", "if", "(", "isset", "(", "$", "_FILES", "[", "$", "name", "]", ")", ")", "{", "$", "file", "=", "new", "FileUpload", "(", "$", "_FILES", ...
upload a file with input name and uplaod dir, //////////////// $name parameter must be a string and it is has to be exists $uploadDir must be an instance of string and it's must be a dir. @param string $name the name of upload input @param string $uploadDir the dir to upload file @throws FileNotUplo...
[ "upload", "a", "file", "with", "input", "name", "and", "uplaod", "dir" ]
943e5f40f45bc2e11a4b9e1d22c6583c31dc4317
https://github.com/AnonymPHP/Anonym-HttpFoundation/blob/943e5f40f45bc2e11a4b9e1d22c6583c31dc4317/Request.php#L164-L172
198,675
AnonymPHP/Anonym-HttpFoundation
Request.php
Request.findDocumentRootInScriptFileName
private function findDocumentRootInScriptFileName() { $filename = $this->server->get('SCRIPT_FILENAME') ?: false; if (false === $filename) { return false; } $parse = explode('/', $filename); $count = count($parse); if ($count && $count > 1) { ...
php
private function findDocumentRootInScriptFileName() { $filename = $this->server->get('SCRIPT_FILENAME') ?: false; if (false === $filename) { return false; } $parse = explode('/', $filename); $count = count($parse); if ($count && $count > 1) { ...
[ "private", "function", "findDocumentRootInScriptFileName", "(", ")", "{", "$", "filename", "=", "$", "this", "->", "server", "->", "get", "(", "'SCRIPT_FILENAME'", ")", "?", ":", "false", ";", "if", "(", "false", "===", "$", "filename", ")", "{", "return",...
find document root in server script filename @return bool|string
[ "find", "document", "root", "in", "server", "script", "filename" ]
943e5f40f45bc2e11a4b9e1d22c6583c31dc4317
https://github.com/AnonymPHP/Anonym-HttpFoundation/blob/943e5f40f45bc2e11a4b9e1d22c6583c31dc4317/Request.php#L267-L283
198,676
AnonymPHP/Anonym-HttpFoundation
Request.php
Request.getBaseUri
public function getBaseUri() { if ('' !== $qs = $this->getQueryString()) { $qs = '?' . $qs; } return $this->getSchemeAndHost() . $this->getRequestUri() . $qs; }
php
public function getBaseUri() { if ('' !== $qs = $this->getQueryString()) { $qs = '?' . $qs; } return $this->getSchemeAndHost() . $this->getRequestUri() . $qs; }
[ "public", "function", "getBaseUri", "(", ")", "{", "if", "(", "''", "!==", "$", "qs", "=", "$", "this", "->", "getQueryString", "(", ")", ")", "{", "$", "qs", "=", "'?'", ".", "$", "qs", ";", "}", "return", "$", "this", "->", "getSchemeAndHost", ...
find the scheme and request uri @return string
[ "find", "the", "scheme", "and", "request", "uri" ]
943e5f40f45bc2e11a4b9e1d22c6583c31dc4317
https://github.com/AnonymPHP/Anonym-HttpFoundation/blob/943e5f40f45bc2e11a4b9e1d22c6583c31dc4317/Request.php#L373-L380
198,677
AnonymPHP/Anonym-HttpFoundation
Request.php
Request.segment
public function segment($segment) { $segments = $this->segments; return isset($segments[$segment - 1]) ? $segments[$segment - 1] : false; }
php
public function segment($segment) { $segments = $this->segments; return isset($segments[$segment - 1]) ? $segments[$segment - 1] : false; }
[ "public", "function", "segment", "(", "$", "segment", ")", "{", "$", "segments", "=", "$", "this", "->", "segments", ";", "return", "isset", "(", "$", "segments", "[", "$", "segment", "-", "1", "]", ")", "?", "$", "segments", "[", "$", "segment", "...
get url segment @param int $segment @return string|bool
[ "get", "url", "segment" ]
943e5f40f45bc2e11a4b9e1d22c6583c31dc4317
https://github.com/AnonymPHP/Anonym-HttpFoundation/blob/943e5f40f45bc2e11a4b9e1d22c6583c31dc4317/Request.php#L455-L460
198,678
dms-org/common.structure
src/DateTime/DateTime.php
DateTime.inTimezone
public function inTimezone(string $timeZoneId) : TimezonedDateTime { return new TimezonedDateTime( \DateTimeImmutable::createFromFormat( self::DISPLAY_FORMAT, $this->format(self::DISPLAY_FORMAT), new \DateTimeZone($timeZ...
php
public function inTimezone(string $timeZoneId) : TimezonedDateTime { return new TimezonedDateTime( \DateTimeImmutable::createFromFormat( self::DISPLAY_FORMAT, $this->format(self::DISPLAY_FORMAT), new \DateTimeZone($timeZ...
[ "public", "function", "inTimezone", "(", "string", "$", "timeZoneId", ")", ":", "TimezonedDateTime", "{", "return", "new", "TimezonedDateTime", "(", "\\", "DateTimeImmutable", "::", "createFromFormat", "(", "self", "::", "DISPLAY_FORMAT", ",", "$", "this", "->", ...
Returns the current date time as if it were in the supplied timezone @param string $timeZoneId @return TimezonedDateTime
[ "Returns", "the", "current", "date", "time", "as", "if", "it", "were", "in", "the", "supplied", "timezone" ]
23f122182f60df5ec847047a81a39c8aab019ff1
https://github.com/dms-org/common.structure/blob/23f122182f60df5ec847047a81a39c8aab019ff1/src/DateTime/DateTime.php#L153-L162
198,679
enikeishik/ufoframework
src/Ufo/Modules/View.php
View.render
public function render(): string { $obLevel = ob_get_level(); ob_start(); extract($this->data); $templatesPath = $this->config->projectPath . $this->config->templatesPath; $package = ''; $template = $this->template; if (!empty($this->section-...
php
public function render(): string { $obLevel = ob_get_level(); ob_start(); extract($this->data); $templatesPath = $this->config->projectPath . $this->config->templatesPath; $package = ''; $template = $this->template; if (!empty($this->section-...
[ "public", "function", "render", "(", ")", ":", "string", "{", "$", "obLevel", "=", "ob_get_level", "(", ")", ";", "ob_start", "(", ")", ";", "extract", "(", "$", "this", "->", "data", ")", ";", "$", "templatesPath", "=", "$", "this", "->", "config", ...
Generate output. @return string
[ "Generate", "output", "." ]
fb44461bcb0506dbc3257724a2281f756594f62f
https://github.com/enikeishik/ufoframework/blob/fb44461bcb0506dbc3257724a2281f756594f62f/src/Ufo/Modules/View.php#L129-L163
198,680
enikeishik/ufoframework
src/Ufo/Modules/View.php
View.findTemplate
protected function findTemplate(string $templatesPath, string $package, string $templateName): string { if (!empty($package)) { // /templates/default/vendor/module/template.php $templatePath = $templatesPath . $this->config->templatesDefault . ...
php
protected function findTemplate(string $templatesPath, string $package, string $templateName): string { if (!empty($package)) { // /templates/default/vendor/module/template.php $templatePath = $templatesPath . $this->config->templatesDefault . ...
[ "protected", "function", "findTemplate", "(", "string", "$", "templatesPath", ",", "string", "$", "package", ",", "string", "$", "templateName", ")", ":", "string", "{", "if", "(", "!", "empty", "(", "$", "package", ")", ")", "{", "// /templates/default/vend...
Find full path for requested template. Returned path may not exists. @param string $templatesPath @param string $package @param string $templateName @return string
[ "Find", "full", "path", "for", "requested", "template", ".", "Returned", "path", "may", "not", "exists", "." ]
fb44461bcb0506dbc3257724a2281f756594f62f
https://github.com/enikeishik/ufoframework/blob/fb44461bcb0506dbc3257724a2281f756594f62f/src/Ufo/Modules/View.php#L194-L214
198,681
PenoaksDev/Milky-Framework
src/Milky/Database/Eloquent/Builder.php
Builder.withGlobalScope
public function withGlobalScope( $identifier, $scope ) { $this->scopes[$identifier] = $scope; if ( method_exists( $scope, 'extend' ) ) $scope->extend( $this ); return $this; }
php
public function withGlobalScope( $identifier, $scope ) { $this->scopes[$identifier] = $scope; if ( method_exists( $scope, 'extend' ) ) $scope->extend( $this ); return $this; }
[ "public", "function", "withGlobalScope", "(", "$", "identifier", ",", "$", "scope", ")", "{", "$", "this", "->", "scopes", "[", "$", "identifier", "]", "=", "$", "scope", ";", "if", "(", "method_exists", "(", "$", "scope", ",", "'extend'", ")", ")", ...
Register a new global scope. @param string $identifier @param Closure $scope @return $this
[ "Register", "a", "new", "global", "scope", "." ]
8afd7156610a70371aa5b1df50b8a212bf7b142c
https://github.com/PenoaksDev/Milky-Framework/blob/8afd7156610a70371aa5b1df50b8a212bf7b142c/src/Milky/Database/Eloquent/Builder.php#L100-L108
198,682
PenoaksDev/Milky-Framework
src/Milky/Database/Eloquent/Builder.php
Builder.whereCountQuery
protected function whereCountQuery( QueryBuilder $query, $operator = '>=', $count = 1, $boolean = 'and' ) { if ( is_numeric( $count ) ) { $count = new Expression( $count ); } $this->query->addBinding( $query->getBindings(), 'where' ); return $this->where( new Expression( '(' . $query->toSql() . ')' ), $...
php
protected function whereCountQuery( QueryBuilder $query, $operator = '>=', $count = 1, $boolean = 'and' ) { if ( is_numeric( $count ) ) { $count = new Expression( $count ); } $this->query->addBinding( $query->getBindings(), 'where' ); return $this->where( new Expression( '(' . $query->toSql() . ')' ), $...
[ "protected", "function", "whereCountQuery", "(", "QueryBuilder", "$", "query", ",", "$", "operator", "=", "'>='", ",", "$", "count", "=", "1", ",", "$", "boolean", "=", "'and'", ")", "{", "if", "(", "is_numeric", "(", "$", "count", ")", ")", "{", "$"...
Add a sub query count clause to the query. @param Builder $query @param string $operator @param int $count @param string $boolean @return $this
[ "Add", "a", "sub", "query", "count", "clause", "to", "the", "query", "." ]
8afd7156610a70371aa5b1df50b8a212bf7b142c
https://github.com/PenoaksDev/Milky-Framework/blob/8afd7156610a70371aa5b1df50b8a212bf7b142c/src/Milky/Database/Eloquent/Builder.php#L1000-L1010
198,683
PenoaksDev/Milky-Framework
src/Milky/Database/Eloquent/Builder.php
Builder.mergeModelDefinedRelationConstraints
public function mergeModelDefinedRelationConstraints( Builder $relation ) { $removedScopes = $relation->removedScopes(); $relationQuery = $relation->getQuery(); // Here we have some relation query and the original relation. We need to copy over any // where clauses that the developer may have put in the rela...
php
public function mergeModelDefinedRelationConstraints( Builder $relation ) { $removedScopes = $relation->removedScopes(); $relationQuery = $relation->getQuery(); // Here we have some relation query and the original relation. We need to copy over any // where clauses that the developer may have put in the rela...
[ "public", "function", "mergeModelDefinedRelationConstraints", "(", "Builder", "$", "relation", ")", "{", "$", "removedScopes", "=", "$", "relation", "->", "removedScopes", "(", ")", ";", "$", "relationQuery", "=", "$", "relation", "->", "getQuery", "(", ")", "...
Merge the constraints from a relation query to the current query. @param Builder $relation @return Builder|static
[ "Merge", "the", "constraints", "from", "a", "relation", "query", "to", "the", "current", "query", "." ]
8afd7156610a70371aa5b1df50b8a212bf7b142c
https://github.com/PenoaksDev/Milky-Framework/blob/8afd7156610a70371aa5b1df50b8a212bf7b142c/src/Milky/Database/Eloquent/Builder.php#L1018-L1028
198,684
bkstg/schedule-bundle
EventListener/InvitationAutoAcceptListener.php
InvitationAutoAcceptListener.prePersist
public function prePersist(LifecycleEventArgs $args): void { // Only act on invitation objects. $invitation = $args->getObject(); if (!$invitation instanceof Invitation) { return; } // If the event author is the invitee accept the invitation. $event = $in...
php
public function prePersist(LifecycleEventArgs $args): void { // Only act on invitation objects. $invitation = $args->getObject(); if (!$invitation instanceof Invitation) { return; } // If the event author is the invitee accept the invitation. $event = $in...
[ "public", "function", "prePersist", "(", "LifecycleEventArgs", "$", "args", ")", ":", "void", "{", "// Only act on invitation objects.", "$", "invitation", "=", "$", "args", "->", "getObject", "(", ")", ";", "if", "(", "!", "$", "invitation", "instanceof", "In...
Checks the invitation author and accepts if they match. @param LifecycleEventArgs $args The lifecycle arguments. @return void
[ "Checks", "the", "invitation", "author", "and", "accepts", "if", "they", "match", "." ]
e64ac897aa7b28bc48319470d65de13cd4788afe
https://github.com/bkstg/schedule-bundle/blob/e64ac897aa7b28bc48319470d65de13cd4788afe/EventListener/InvitationAutoAcceptListener.php#L26-L39
198,685
mossphp/moss-storage
Moss/Storage/Query/WriteQuery.php
WriteQuery.checkIfEntityExists
protected function checkIfEntityExists() { $query = new ReadQuery($this->connection, $this->model, $this->factory, $this->accessor, $this->dispatcher); foreach ($this->model->primaryFields() as $field) { $value = $this->accessor->getPropertyValue($this->instance, $field->name()); ...
php
protected function checkIfEntityExists() { $query = new ReadQuery($this->connection, $this->model, $this->factory, $this->accessor, $this->dispatcher); foreach ($this->model->primaryFields() as $field) { $value = $this->accessor->getPropertyValue($this->instance, $field->name()); ...
[ "protected", "function", "checkIfEntityExists", "(", ")", "{", "$", "query", "=", "new", "ReadQuery", "(", "$", "this", "->", "connection", ",", "$", "this", "->", "model", ",", "$", "this", "->", "factory", ",", "$", "this", "->", "accessor", ",", "$"...
Returns true if entity exists database @return int
[ "Returns", "true", "if", "entity", "exists", "database" ]
0d123e7ae6bbfce1e2a18e73bf70997277b430c1
https://github.com/mossphp/moss-storage/blob/0d123e7ae6bbfce1e2a18e73bf70997277b430c1/Moss/Storage/Query/WriteQuery.php#L138-L153
198,686
joegreen88/zf1-component-validate
src/Zend/Validate/File/Size.php
Zend_Validate_File_Size.setMax
public function setMax($max) { if (!is_string($max) && !is_numeric($max)) { throw new Zend_Validate_Exception ('Invalid options to validator provided'); } $max = (integer) $this->_fromByteString($max); $min = $this->getMin(true); if (($min !== null) && ($max < $...
php
public function setMax($max) { if (!is_string($max) && !is_numeric($max)) { throw new Zend_Validate_Exception ('Invalid options to validator provided'); } $max = (integer) $this->_fromByteString($max); $min = $this->getMin(true); if (($min !== null) && ($max < $...
[ "public", "function", "setMax", "(", "$", "max", ")", "{", "if", "(", "!", "is_string", "(", "$", "max", ")", "&&", "!", "is_numeric", "(", "$", "max", ")", ")", "{", "throw", "new", "Zend_Validate_Exception", "(", "'Invalid options to validator provided'", ...
Sets the maximum filesize @param integer $max The maximum filesize @throws Zend_Validate_Exception When max is smaller than min @return Zend_Validate_StringLength Provides a fluent interface
[ "Sets", "the", "maximum", "filesize" ]
88d9ea016f73d48ff0ba7d06ecbbf28951fd279e
https://github.com/joegreen88/zf1-component-validate/blob/88d9ea016f73d48ff0ba7d06ecbbf28951fd279e/src/Zend/Validate/File/Size.php#L223-L240
198,687
squareproton/Bond
src/Bond/Normality/Php.php
Php.isValid
public function isValid( &$errors = null, $throwException = false ) { // open pipe $descriptorSpec = array( 0 => array('pipe', 'r'), 1 => array('pipe', 'w'), 2 => array('pipe', 'w'), ); $process = proc_open('php -l', $descriptorSpec, $pipes); ...
php
public function isValid( &$errors = null, $throwException = false ) { // open pipe $descriptorSpec = array( 0 => array('pipe', 'r'), 1 => array('pipe', 'w'), 2 => array('pipe', 'w'), ); $process = proc_open('php -l', $descriptorSpec, $pipes); ...
[ "public", "function", "isValid", "(", "&", "$", "errors", "=", "null", ",", "$", "throwException", "=", "false", ")", "{", "// open pipe", "$", "descriptorSpec", "=", "array", "(", "0", "=>", "array", "(", "'pipe'", ",", "'r'", ")", ",", "1", "=>", "...
Run Php through lint checker @retrun bool Is the passed php valid
[ "Run", "Php", "through", "lint", "checker" ]
a04ad9dd1a35adeaec98237716c2a41ce02b4f1a
https://github.com/squareproton/Bond/blob/a04ad9dd1a35adeaec98237716c2a41ce02b4f1a/src/Bond/Normality/Php.php#L42-L71
198,688
squareproton/Bond
src/Bond/Normality/Php.php
Php.varExport
public static function varExport( $var, $indent = 0, $dontIndentFirstLine = true ) { $export = var_export( $var, true ); // array ( => array ( $export = preg_replace( '/^array \\(/', 'array(', $export ); // UPPERCASE null(s) seem to bother me for some reason. I've no idea why. ...
php
public static function varExport( $var, $indent = 0, $dontIndentFirstLine = true ) { $export = var_export( $var, true ); // array ( => array ( $export = preg_replace( '/^array \\(/', 'array(', $export ); // UPPERCASE null(s) seem to bother me for some reason. I've no idea why. ...
[ "public", "static", "function", "varExport", "(", "$", "var", ",", "$", "indent", "=", "0", ",", "$", "dontIndentFirstLine", "=", "true", ")", "{", "$", "export", "=", "var_export", "(", "$", "var", ",", "true", ")", ";", "// array ( => array (", "$", ...
Return a string which is a php-parsable representation of a variable @param mixed $var @param int $indent @param bool $dontIndentFirstLine @return string
[ "Return", "a", "string", "which", "is", "a", "php", "-", "parsable", "representation", "of", "a", "variable" ]
a04ad9dd1a35adeaec98237716c2a41ce02b4f1a
https://github.com/squareproton/Bond/blob/a04ad9dd1a35adeaec98237716c2a41ce02b4f1a/src/Bond/Normality/Php.php#L80-L107
198,689
hiqsol-attic/composer-extension-plugin
src/Helper.php
Helper.exportVar
public static function exportVar($value) { $closures = self::collectClosures($value); $res = var_export($value, true); if (!empty($closures)) { $subs = []; foreach ($closures as $key => $closure) { $subs["'" . $key . "'"] = self::dumpClosure($closure);...
php
public static function exportVar($value) { $closures = self::collectClosures($value); $res = var_export($value, true); if (!empty($closures)) { $subs = []; foreach ($closures as $key => $closure) { $subs["'" . $key . "'"] = self::dumpClosure($closure);...
[ "public", "static", "function", "exportVar", "(", "$", "value", ")", "{", "$", "closures", "=", "self", "::", "collectClosures", "(", "$", "value", ")", ";", "$", "res", "=", "var_export", "(", "$", "value", ",", "true", ")", ";", "if", "(", "!", "...
Returns a parsable string representation of given value. In contrast to var_dump outputs Closures as PHP code. @param mixed $value @return string
[ "Returns", "a", "parsable", "string", "representation", "of", "given", "value", ".", "In", "contrast", "to", "var_dump", "outputs", "Closures", "as", "PHP", "code", "." ]
3e4a5384ca368f43debe277c606846e4299d2bf4
https://github.com/hiqsol-attic/composer-extension-plugin/blob/3e4a5384ca368f43debe277c606846e4299d2bf4/src/Helper.php#L90-L103
198,690
hiqsol-attic/composer-extension-plugin
src/Helper.php
Helper.collectClosures
private static function collectClosures(&$input) { static $closureNo = 1; $closures = []; if (is_array($input)) { foreach ($input as &$value) { if (is_array($value) || $value instanceof Closure) { $closures = array_merge($closures, self::collectClo...
php
private static function collectClosures(&$input) { static $closureNo = 1; $closures = []; if (is_array($input)) { foreach ($input as &$value) { if (is_array($value) || $value instanceof Closure) { $closures = array_merge($closures, self::collectClo...
[ "private", "static", "function", "collectClosures", "(", "&", "$", "input", ")", "{", "static", "$", "closureNo", "=", "1", ";", "$", "closures", "=", "[", "]", ";", "if", "(", "is_array", "(", "$", "input", ")", ")", "{", "foreach", "(", "$", "inp...
Collects closures from given input. Substitutes closures with a tag. @param mixed $input will be changed @return array array of found closures
[ "Collects", "closures", "from", "given", "input", ".", "Substitutes", "closures", "with", "a", "tag", "." ]
3e4a5384ca368f43debe277c606846e4299d2bf4
https://github.com/hiqsol-attic/composer-extension-plugin/blob/3e4a5384ca368f43debe277c606846e4299d2bf4/src/Helper.php#L111-L128
198,691
WideFocus/Feed-Writer
src/ExtractFieldLabelsTrait.php
ExtractFieldLabelsTrait.extractFieldLabels
protected function extractFieldLabels( WriterFieldInterface ...$fields ): array { return array_map( function (WriterFieldInterface $field) : string { return $field->getLabel(); }, $fields ); }
php
protected function extractFieldLabels( WriterFieldInterface ...$fields ): array { return array_map( function (WriterFieldInterface $field) : string { return $field->getLabel(); }, $fields ); }
[ "protected", "function", "extractFieldLabels", "(", "WriterFieldInterface", "...", "$", "fields", ")", ":", "array", "{", "return", "array_map", "(", "function", "(", "WriterFieldInterface", "$", "field", ")", ":", "string", "{", "return", "$", "field", "->", ...
Extract labels from fields. @param WriterFieldInterface[] ...$fields @return string[]
[ "Extract", "labels", "from", "fields", "." ]
c2698394645c75db06962e5e9d638f0cabe69fe3
https://github.com/WideFocus/Feed-Writer/blob/c2698394645c75db06962e5e9d638f0cabe69fe3/src/ExtractFieldLabelsTrait.php#L18-L27
198,692
phospr/DoubleEntryBundle
Model/VendorHandler.php
VendorHandler.createVendor
public function createVendor($name = null) { $vendor = new $this->vendorFqcn($name); $vendor->setOrganization($this->oh->getOrganization()); return $vendor; }
php
public function createVendor($name = null) { $vendor = new $this->vendorFqcn($name); $vendor->setOrganization($this->oh->getOrganization()); return $vendor; }
[ "public", "function", "createVendor", "(", "$", "name", "=", "null", ")", "{", "$", "vendor", "=", "new", "$", "this", "->", "vendorFqcn", "(", "$", "name", ")", ";", "$", "vendor", "->", "setOrganization", "(", "$", "this", "->", "oh", "->", "getOrg...
Create new Vendor @author Tom Haskins-Vaughan <tom@tomhv.uk> @since 0.8.0 @param string $name @return Vendor
[ "Create", "new", "Vendor" ]
d9c421f30922b461483731983c59beb26047fb7f
https://github.com/phospr/DoubleEntryBundle/blob/d9c421f30922b461483731983c59beb26047fb7f/Model/VendorHandler.php#L72-L78
198,693
phospr/DoubleEntryBundle
Model/VendorHandler.php
VendorHandler.findVendorForName
public function findVendorForName($name) { return $this->em ->getRepository($this->vendorFqcn) ->findOneBy(array( 'name' => $name, 'organization' => $this->oh->getOrganization() )) ; }
php
public function findVendorForName($name) { return $this->em ->getRepository($this->vendorFqcn) ->findOneBy(array( 'name' => $name, 'organization' => $this->oh->getOrganization() )) ; }
[ "public", "function", "findVendorForName", "(", "$", "name", ")", "{", "return", "$", "this", "->", "em", "->", "getRepository", "(", "$", "this", "->", "vendorFqcn", ")", "->", "findOneBy", "(", "array", "(", "'name'", "=>", "$", "name", ",", "'organiza...
Find Vendor for name @author Tom Haskins-Vaughan <tom@tomhv.uk> @since 0.8.0 @param string $name @return Vendor
[ "Find", "Vendor", "for", "name" ]
d9c421f30922b461483731983c59beb26047fb7f
https://github.com/phospr/DoubleEntryBundle/blob/d9c421f30922b461483731983c59beb26047fb7f/Model/VendorHandler.php#L90-L99
198,694
phospr/DoubleEntryBundle
Model/VendorHandler.php
VendorHandler.findVendorForSlug
public function findVendorForSlug($slug) { return $this->em ->getRepository($this->vendorFqcn) ->findOneBy(array( 'slug' => $slug, 'organization' => $this->oh->getOrganization() )) ; }
php
public function findVendorForSlug($slug) { return $this->em ->getRepository($this->vendorFqcn) ->findOneBy(array( 'slug' => $slug, 'organization' => $this->oh->getOrganization() )) ; }
[ "public", "function", "findVendorForSlug", "(", "$", "slug", ")", "{", "return", "$", "this", "->", "em", "->", "getRepository", "(", "$", "this", "->", "vendorFqcn", ")", "->", "findOneBy", "(", "array", "(", "'slug'", "=>", "$", "slug", ",", "'organiza...
Find Vendor for slug @author Tom Haskins-Vaughan <tom@tomhv.uk> @since 0.8.0 @param string $slug @return Vendor
[ "Find", "Vendor", "for", "slug" ]
d9c421f30922b461483731983c59beb26047fb7f
https://github.com/phospr/DoubleEntryBundle/blob/d9c421f30922b461483731983c59beb26047fb7f/Model/VendorHandler.php#L111-L120
198,695
johnkrovitch/Sam
Filter/Compass/CompassFilter.php
CompassFilter.run
public function run(array $sources, array $destinations) { $updatedSources = []; foreach ($sources as $source) { // remove .scss extension and add .css extension $css = $this->getCacheDir().$source->getBasename('.scss').'.css'; $this->addNotification('compiling '...
php
public function run(array $sources, array $destinations) { $updatedSources = []; foreach ($sources as $source) { // remove .scss extension and add .css extension $css = $this->getCacheDir().$source->getBasename('.scss').'.css'; $this->addNotification('compiling '...
[ "public", "function", "run", "(", "array", "$", "sources", ",", "array", "$", "destinations", ")", "{", "$", "updatedSources", "=", "[", "]", ";", "foreach", "(", "$", "sources", "as", "$", "source", ")", "{", "// remove .scss extension and add .css extension"...
Compile scss file into css file via compass. @param SplFileInfo[] $sources @param SplFileInfo[] $destinations @return SplFileInfo[] @throws Exception
[ "Compile", "scss", "file", "into", "css", "file", "via", "compass", "." ]
fbd3770c11eecc0a6d8070f439f149062316f606
https://github.com/johnkrovitch/Sam/blob/fbd3770c11eecc0a6d8070f439f149062316f606/Filter/Compass/CompassFilter.php#L20-L49
198,696
johnkrovitch/Sam
Filter/Compass/CompassFilter.php
CompassFilter.checkRequirements
public function checkRequirements() { $process = new Process($this->getBin().' version'); $process->run(); if (!$process->isSuccessful()) { throw new Exception('compass is not found at '.$this->getBin().'. '.$process->getErrorOutput()); } }
php
public function checkRequirements() { $process = new Process($this->getBin().' version'); $process->run(); if (!$process->isSuccessful()) { throw new Exception('compass is not found at '.$this->getBin().'. '.$process->getErrorOutput()); } }
[ "public", "function", "checkRequirements", "(", ")", "{", "$", "process", "=", "new", "Process", "(", "$", "this", "->", "getBin", "(", ")", ".", "' version'", ")", ";", "$", "process", "->", "run", "(", ")", ";", "if", "(", "!", "$", "process", "-...
Check that compass is installed and available. @throws Exception
[ "Check", "that", "compass", "is", "installed", "and", "available", "." ]
fbd3770c11eecc0a6d8070f439f149062316f606
https://github.com/johnkrovitch/Sam/blob/fbd3770c11eecc0a6d8070f439f149062316f606/Filter/Compass/CompassFilter.php#L56-L64
198,697
johnkrovitch/Sam
Filter/Compass/CompassFilter.php
CompassFilter.buildCommandString
protected function buildCommandString($source) { $commandPattern = '%s %s %s %s %s'; $command = sprintf( // pattern $commandPattern, // compass binary path $this->getBin(), // compass command 'compile', // sources ...
php
protected function buildCommandString($source) { $commandPattern = '%s %s %s %s %s'; $command = sprintf( // pattern $commandPattern, // compass binary path $this->getBin(), // compass command 'compile', // sources ...
[ "protected", "function", "buildCommandString", "(", "$", "source", ")", "{", "$", "commandPattern", "=", "'%s %s %s %s %s'", ";", "$", "command", "=", "sprintf", "(", "// pattern", "$", "commandPattern", ",", "// compass binary path", "$", "this", "->", "getBin", ...
Build the compass compile command line. @param SplFileInfo $source @return string
[ "Build", "the", "compass", "compile", "command", "line", "." ]
fbd3770c11eecc0a6d8070f439f149062316f606
https://github.com/johnkrovitch/Sam/blob/fbd3770c11eecc0a6d8070f439f149062316f606/Filter/Compass/CompassFilter.php#L96-L115
198,698
aztech-labs/skwal
src/Table.php
Table.getColumn
public function getColumn($name, $alias = '') { $column = new DerivedColumn($name, $alias); return $column->setTable($this); }
php
public function getColumn($name, $alias = '') { $column = new DerivedColumn($name, $alias); return $column->setTable($this); }
[ "public", "function", "getColumn", "(", "$", "name", ",", "$", "alias", "=", "''", ")", "{", "$", "column", "=", "new", "DerivedColumn", "(", "$", "name", ",", "$", "alias", ")", ";", "return", "$", "column", "->", "setTable", "(", "$", "this", ")"...
Returns a column object correlated to the current table. @param string $name Name of the column to return. @param string $alias Alias to use on the column. @return DerivedColumn
[ "Returns", "a", "column", "object", "correlated", "to", "the", "current", "table", "." ]
cf637c5ddb69f6579ba28a61af9c39639081dc16
https://github.com/aztech-labs/skwal/blob/cf637c5ddb69f6579ba28a61af9c39639081dc16/src/Table.php#L94-L99
198,699
twohill/silverstripe-nestedcontrollers
code/NestedCollectionController.php
NestedCollectionController.getAllRecords
public function getAllRecords() { /* @var DataObject $recordType */ $recordType = $this->getRecordType(); $all = $recordType::get()->filterByCallBack(function (DataObject $obj) { return $obj->canView(); }); return new PaginatedList($all, $this->request); }
php
public function getAllRecords() { /* @var DataObject $recordType */ $recordType = $this->getRecordType(); $all = $recordType::get()->filterByCallBack(function (DataObject $obj) { return $obj->canView(); }); return new PaginatedList($all, $this->request); }
[ "public", "function", "getAllRecords", "(", ")", "{", "/* @var DataObject $recordType */", "$", "recordType", "=", "$", "this", "->", "getRecordType", "(", ")", ";", "$", "all", "=", "$", "recordType", "::", "get", "(", ")", "->", "filterByCallBack", "(", "f...
Gets all the records and returns them, paginated @return PaginatedList @throws \Exception
[ "Gets", "all", "the", "records", "and", "returns", "them", "paginated" ]
2fc263c31b7e23e2f768dc56f4f0df2912b6b3b1
https://github.com/twohill/silverstripe-nestedcontrollers/blob/2fc263c31b7e23e2f768dc56f4f0df2912b6b3b1/code/NestedCollectionController.php#L163-L172