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
207,000
symfony/symfony
src/Symfony/Component/Finder/Finder.php
Finder.ignoreVCS
public function ignoreVCS($ignoreVCS) { if ($ignoreVCS) { $this->ignore |= static::IGNORE_VCS_FILES; } else { $this->ignore &= ~static::IGNORE_VCS_FILES; } return $this; }
php
public function ignoreVCS($ignoreVCS) { if ($ignoreVCS) { $this->ignore |= static::IGNORE_VCS_FILES; } else { $this->ignore &= ~static::IGNORE_VCS_FILES; } return $this; }
[ "public", "function", "ignoreVCS", "(", "$", "ignoreVCS", ")", "{", "if", "(", "$", "ignoreVCS", ")", "{", "$", "this", "->", "ignore", "|=", "static", "::", "IGNORE_VCS_FILES", ";", "}", "else", "{", "$", "this", "->", "ignore", "&=", "~", "static", ...
Forces the finder to ignore version control directories. This option is enabled by default. @param bool $ignoreVCS Whether to exclude VCS files or not @return $this @see ExcludeDirectoryFilterIterator
[ "Forces", "the", "finder", "to", "ignore", "version", "control", "directories", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Finder/Finder.php#L367-L376
207,001
symfony/symfony
src/Symfony/Component/Finder/Finder.php
Finder.ignoreVCSIgnored
public function ignoreVCSIgnored(bool $ignoreVCSIgnored) { if ($ignoreVCSIgnored) { $this->ignore |= static::IGNORE_VCS_IGNORED_FILES; } else { $this->ignore &= ~static::IGNORE_VCS_IGNORED_FILES; } return $this; }
php
public function ignoreVCSIgnored(bool $ignoreVCSIgnored) { if ($ignoreVCSIgnored) { $this->ignore |= static::IGNORE_VCS_IGNORED_FILES; } else { $this->ignore &= ~static::IGNORE_VCS_IGNORED_FILES; } return $this; }
[ "public", "function", "ignoreVCSIgnored", "(", "bool", "$", "ignoreVCSIgnored", ")", "{", "if", "(", "$", "ignoreVCSIgnored", ")", "{", "$", "this", "->", "ignore", "|=", "static", "::", "IGNORE_VCS_IGNORED_FILES", ";", "}", "else", "{", "$", "this", "->", ...
Forces Finder to obey .gitignore and ignore files based on rules listed there. This option is disabled by default. @return $this
[ "Forces", "Finder", "to", "obey", ".", "gitignore", "and", "ignore", "files", "based", "on", "rules", "listed", "there", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Finder/Finder.php#L385-L394
207,002
symfony/symfony
src/Symfony/Component/Finder/Finder.php
Finder.addVCSPattern
public static function addVCSPattern($pattern) { foreach ((array) $pattern as $p) { self::$vcsPatterns[] = $p; } self::$vcsPatterns = array_unique(self::$vcsPatterns); }
php
public static function addVCSPattern($pattern) { foreach ((array) $pattern as $p) { self::$vcsPatterns[] = $p; } self::$vcsPatterns = array_unique(self::$vcsPatterns); }
[ "public", "static", "function", "addVCSPattern", "(", "$", "pattern", ")", "{", "foreach", "(", "(", "array", ")", "$", "pattern", "as", "$", "p", ")", "{", "self", "::", "$", "vcsPatterns", "[", "]", "=", "$", "p", ";", "}", "self", "::", "$", "...
Adds VCS patterns. @see ignoreVCS() @param string|string[] $pattern VCS patterns to ignore
[ "Adds", "VCS", "patterns", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Finder/Finder.php#L403-L410
207,003
symfony/symfony
src/Symfony/Component/Finder/Finder.php
Finder.sortByName
public function sortByName(/* bool $useNaturalSort = false */) { if (\func_num_args() < 1 && __CLASS__ !== \get_class($this) && __CLASS__ !== (new \ReflectionMethod($this, __FUNCTION__))->getDeclaringClass()->getName() && !$this instanceof \PHPUnit\Framework\MockObject\MockObject && !$this instanceof \Proph...
php
public function sortByName(/* bool $useNaturalSort = false */) { if (\func_num_args() < 1 && __CLASS__ !== \get_class($this) && __CLASS__ !== (new \ReflectionMethod($this, __FUNCTION__))->getDeclaringClass()->getName() && !$this instanceof \PHPUnit\Framework\MockObject\MockObject && !$this instanceof \Proph...
[ "public", "function", "sortByName", "(", "/* bool $useNaturalSort = false */", ")", "{", "if", "(", "\\", "func_num_args", "(", ")", "<", "1", "&&", "__CLASS__", "!==", "\\", "get_class", "(", "$", "this", ")", "&&", "__CLASS__", "!==", "(", "new", "\\", "...
Sorts files and directories by name. This can be slow as all the matching files and directories must be retrieved for comparison. @param bool $useNaturalSort Whether to use natural sort or not, disabled by default @return $this @see SortableIterator
[ "Sorts", "files", "and", "directories", "by", "name", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Finder/Finder.php#L441-L451
207,004
symfony/symfony
src/Symfony/Component/Finder/Finder.php
Finder.normalizeDir
private function normalizeDir($dir) { $dir = rtrim($dir, '/'.\DIRECTORY_SEPARATOR); if (preg_match('#^s?ftp://#', $dir)) { $dir .= '/'; } return $dir; }
php
private function normalizeDir($dir) { $dir = rtrim($dir, '/'.\DIRECTORY_SEPARATOR); if (preg_match('#^s?ftp://#', $dir)) { $dir .= '/'; } return $dir; }
[ "private", "function", "normalizeDir", "(", "$", "dir", ")", "{", "$", "dir", "=", "rtrim", "(", "$", "dir", ",", "'/'", ".", "\\", "DIRECTORY_SEPARATOR", ")", ";", "if", "(", "preg_match", "(", "'#^s?ftp://#'", ",", "$", "dir", ")", ")", "{", "$", ...
Normalizes given directory names by removing trailing slashes. Excluding: (s)ftp:// wrapper @param string $dir @return string
[ "Normalizes", "given", "directory", "names", "by", "removing", "trailing", "slashes", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Finder/Finder.php#L801-L810
207,005
symfony/symfony
src/Symfony/Component/Messenger/Worker.php
Worker.run
public function run(array $options = [], callable $onHandledCallback = null): void { $options = array_merge([ 'sleep' => 1000000, ], $options); if (\function_exists('pcntl_signal')) { pcntl_signal(SIGTERM, function () { $this->stop(); }); ...
php
public function run(array $options = [], callable $onHandledCallback = null): void { $options = array_merge([ 'sleep' => 1000000, ], $options); if (\function_exists('pcntl_signal')) { pcntl_signal(SIGTERM, function () { $this->stop(); }); ...
[ "public", "function", "run", "(", "array", "$", "options", "=", "[", "]", ",", "callable", "$", "onHandledCallback", "=", "null", ")", ":", "void", "{", "$", "options", "=", "array_merge", "(", "[", "'sleep'", "=>", "1000000", ",", "]", ",", "$", "op...
Receive the messages and dispatch them to the bus. Valid options are: * sleep (default: 1000000): Time in microseconds to sleep after no messages are found
[ "Receive", "the", "messages", "and", "dispatch", "them", "to", "the", "bus", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Messenger/Worker.php#L65-L115
207,006
symfony/symfony
src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/AutoconfigureTrait.php
AutoconfigureTrait.autoconfigure
final public function autoconfigure(bool $autoconfigured = true) { if ($autoconfigured && $this->definition instanceof ChildDefinition) { throw new InvalidArgumentException(sprintf('The service "%s" cannot have a "parent" and also have "autoconfigure". Try disabling autoconfiguration for the ser...
php
final public function autoconfigure(bool $autoconfigured = true) { if ($autoconfigured && $this->definition instanceof ChildDefinition) { throw new InvalidArgumentException(sprintf('The service "%s" cannot have a "parent" and also have "autoconfigure". Try disabling autoconfiguration for the ser...
[ "final", "public", "function", "autoconfigure", "(", "bool", "$", "autoconfigured", "=", "true", ")", "{", "if", "(", "$", "autoconfigured", "&&", "$", "this", "->", "definition", "instanceof", "ChildDefinition", ")", "{", "throw", "new", "InvalidArgumentExcepti...
Sets whether or not instanceof conditionals should be prepended with a global set. @return $this @throws InvalidArgumentException when a parent is already set
[ "Sets", "whether", "or", "not", "instanceof", "conditionals", "should", "be", "prepended", "with", "a", "global", "set", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/AutoconfigureTrait.php#L26-L34
207,007
symfony/symfony
src/Symfony/Component/HttpFoundation/AcceptHeader.php
AcceptHeader.filter
public function filter($pattern) { return new self(array_filter($this->items, function (AcceptHeaderItem $item) use ($pattern) { return preg_match($pattern, $item->getValue()); })); }
php
public function filter($pattern) { return new self(array_filter($this->items, function (AcceptHeaderItem $item) use ($pattern) { return preg_match($pattern, $item->getValue()); })); }
[ "public", "function", "filter", "(", "$", "pattern", ")", "{", "return", "new", "self", "(", "array_filter", "(", "$", "this", "->", "items", ",", "function", "(", "AcceptHeaderItem", "$", "item", ")", "use", "(", "$", "pattern", ")", "{", "return", "p...
Filters items on their value using given regex. @param string $pattern @return self
[ "Filters", "items", "on", "their", "value", "using", "given", "regex", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/AcceptHeader.php#L134-L139
207,008
symfony/symfony
src/Symfony/Component/Config/Definition/Builder/ValidationBuilder.php
ValidationBuilder.rule
public function rule(\Closure $closure = null) { if (null !== $closure) { $this->rules[] = $closure; return $this; } return $this->rules[] = new ExprBuilder($this->node); }
php
public function rule(\Closure $closure = null) { if (null !== $closure) { $this->rules[] = $closure; return $this; } return $this->rules[] = new ExprBuilder($this->node); }
[ "public", "function", "rule", "(", "\\", "Closure", "$", "closure", "=", "null", ")", "{", "if", "(", "null", "!==", "$", "closure", ")", "{", "$", "this", "->", "rules", "[", "]", "=", "$", "closure", ";", "return", "$", "this", ";", "}", "retur...
Registers a closure to run as normalization or an expression builder to build it if null is provided. @return ExprBuilder|$this
[ "Registers", "a", "closure", "to", "run", "as", "normalization", "or", "an", "expression", "builder", "to", "build", "it", "if", "null", "is", "provided", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Config/Definition/Builder/ValidationBuilder.php#L34-L43
207,009
symfony/symfony
src/Symfony/Component/Console/Question/Question.php
Question.setHidden
public function setHidden($hidden) { if ($this->autocompleterCallback) { throw new LogicException('A hidden question cannot use the autocompleter.'); } $this->hidden = (bool) $hidden; return $this; }
php
public function setHidden($hidden) { if ($this->autocompleterCallback) { throw new LogicException('A hidden question cannot use the autocompleter.'); } $this->hidden = (bool) $hidden; return $this; }
[ "public", "function", "setHidden", "(", "$", "hidden", ")", "{", "if", "(", "$", "this", "->", "autocompleterCallback", ")", "{", "throw", "new", "LogicException", "(", "'A hidden question cannot use the autocompleter.'", ")", ";", "}", "$", "this", "->", "hidde...
Sets whether the user response must be hidden or not. @param bool $hidden @return $this @throws LogicException In case the autocompleter is also used
[ "Sets", "whether", "the", "user", "response", "must", "be", "hidden", "or", "not", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Console/Question/Question.php#L82-L91
207,010
symfony/symfony
src/Symfony/Component/Console/Question/Question.php
Question.setAutocompleterValues
public function setAutocompleterValues($values) { if (\is_array($values)) { $values = $this->isAssoc($values) ? array_merge(array_keys($values), array_values($values)) : array_values($values); $callback = static function () use ($values) { return $values; ...
php
public function setAutocompleterValues($values) { if (\is_array($values)) { $values = $this->isAssoc($values) ? array_merge(array_keys($values), array_values($values)) : array_values($values); $callback = static function () use ($values) { return $values; ...
[ "public", "function", "setAutocompleterValues", "(", "$", "values", ")", "{", "if", "(", "\\", "is_array", "(", "$", "values", ")", ")", "{", "$", "values", "=", "$", "this", "->", "isAssoc", "(", "$", "values", ")", "?", "array_merge", "(", "array_key...
Sets values for the autocompleter. @param iterable|null $values @return $this @throws InvalidArgumentException @throws LogicException
[ "Sets", "values", "for", "the", "autocompleter", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Console/Question/Question.php#L139-L159
207,011
symfony/symfony
src/Symfony/Component/Console/Question/Question.php
Question.setAutocompleterCallback
public function setAutocompleterCallback(callable $callback = null): self { if ($this->hidden && null !== $callback) { throw new LogicException('A hidden question cannot use the autocompleter.'); } $this->autocompleterCallback = $callback; return $this; }
php
public function setAutocompleterCallback(callable $callback = null): self { if ($this->hidden && null !== $callback) { throw new LogicException('A hidden question cannot use the autocompleter.'); } $this->autocompleterCallback = $callback; return $this; }
[ "public", "function", "setAutocompleterCallback", "(", "callable", "$", "callback", "=", "null", ")", ":", "self", "{", "if", "(", "$", "this", "->", "hidden", "&&", "null", "!==", "$", "callback", ")", "{", "throw", "new", "LogicException", "(", "'A hidde...
Sets the callback function used for the autocompleter. The callback is passed the user input as argument and should return an iterable of corresponding suggestions. @return $this
[ "Sets", "the", "callback", "function", "used", "for", "the", "autocompleter", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Console/Question/Question.php#L176-L185
207,012
symfony/symfony
src/Symfony/Component/Console/Question/Question.php
Question.setMaxAttempts
public function setMaxAttempts($attempts) { if (null !== $attempts && $attempts < 1) { throw new InvalidArgumentException('Maximum number of attempts must be a positive value.'); } $this->attempts = $attempts; return $this; }
php
public function setMaxAttempts($attempts) { if (null !== $attempts && $attempts < 1) { throw new InvalidArgumentException('Maximum number of attempts must be a positive value.'); } $this->attempts = $attempts; return $this; }
[ "public", "function", "setMaxAttempts", "(", "$", "attempts", ")", "{", "if", "(", "null", "!==", "$", "attempts", "&&", "$", "attempts", "<", "1", ")", "{", "throw", "new", "InvalidArgumentException", "(", "'Maximum number of attempts must be a positive value.'", ...
Sets the maximum number of attempts. Null means an unlimited number of attempts. @param int|null $attempts @return $this @throws InvalidArgumentException in case the number of attempts is invalid
[ "Sets", "the", "maximum", "number", "of", "attempts", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Console/Question/Question.php#L222-L231
207,013
symfony/symfony
src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php
ExprBuilder.always
public function always(\Closure $then = null) { $this->ifPart = function ($v) { return true; }; if (null !== $then) { $this->thenPart = $then; } return $this; }
php
public function always(\Closure $then = null) { $this->ifPart = function ($v) { return true; }; if (null !== $then) { $this->thenPart = $then; } return $this; }
[ "public", "function", "always", "(", "\\", "Closure", "$", "then", "=", "null", ")", "{", "$", "this", "->", "ifPart", "=", "function", "(", "$", "v", ")", "{", "return", "true", ";", "}", ";", "if", "(", "null", "!==", "$", "then", ")", "{", "...
Marks the expression as being always used. @return $this
[ "Marks", "the", "expression", "as", "being", "always", "used", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php#L38-L47
207,014
symfony/symfony
src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php
ExprBuilder.ifTrue
public function ifTrue(\Closure $closure = null) { if (null === $closure) { $closure = function ($v) { return true === $v; }; } $this->ifPart = $closure; return $this; }
php
public function ifTrue(\Closure $closure = null) { if (null === $closure) { $closure = function ($v) { return true === $v; }; } $this->ifPart = $closure; return $this; }
[ "public", "function", "ifTrue", "(", "\\", "Closure", "$", "closure", "=", "null", ")", "{", "if", "(", "null", "===", "$", "closure", ")", "{", "$", "closure", "=", "function", "(", "$", "v", ")", "{", "return", "true", "===", "$", "v", ";", "}"...
Sets a closure to use as tests. The default one tests if the value is true. @return $this
[ "Sets", "a", "closure", "to", "use", "as", "tests", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php#L56-L65
207,015
symfony/symfony
src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php
ExprBuilder.castToArray
public function castToArray() { $this->ifPart = function ($v) { return !\is_array($v); }; $this->thenPart = function ($v) { return [$v]; }; return $this; }
php
public function castToArray() { $this->ifPart = function ($v) { return !\is_array($v); }; $this->thenPart = function ($v) { return [$v]; }; return $this; }
[ "public", "function", "castToArray", "(", ")", "{", "$", "this", "->", "ifPart", "=", "function", "(", "$", "v", ")", "{", "return", "!", "\\", "is_array", "(", "$", "v", ")", ";", "}", ";", "$", "this", "->", "thenPart", "=", "function", "(", "$...
Transforms variables of any type into an array. @return $this
[ "Transforms", "variables", "of", "any", "type", "into", "an", "array", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php#L144-L150
207,016
symfony/symfony
src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php
ExprBuilder.thenInvalid
public function thenInvalid($message) { $this->thenPart = function ($v) use ($message) { throw new \InvalidArgumentException(sprintf($message, json_encode($v))); }; return $this; }
php
public function thenInvalid($message) { $this->thenPart = function ($v) use ($message) { throw new \InvalidArgumentException(sprintf($message, json_encode($v))); }; return $this; }
[ "public", "function", "thenInvalid", "(", "$", "message", ")", "{", "$", "this", "->", "thenPart", "=", "function", "(", "$", "v", ")", "use", "(", "$", "message", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "sprintf", "(", "$", "m...
Sets a closure marking the value as invalid at processing time. if you want to add the value of the node in your message just use a %s placeholder. @param string $message @return $this @throws \InvalidArgumentException
[ "Sets", "a", "closure", "marking", "the", "value", "as", "invalid", "at", "processing", "time", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php#L187-L192
207,017
symfony/symfony
src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php
ExprBuilder.end
public function end() { if (null === $this->ifPart) { throw new \RuntimeException('You must specify an if part.'); } if (null === $this->thenPart) { throw new \RuntimeException('You must specify a then part.'); } return $this->node; }
php
public function end() { if (null === $this->ifPart) { throw new \RuntimeException('You must specify an if part.'); } if (null === $this->thenPart) { throw new \RuntimeException('You must specify a then part.'); } return $this->node; }
[ "public", "function", "end", "(", ")", "{", "if", "(", "null", "===", "$", "this", "->", "ifPart", ")", "{", "throw", "new", "\\", "RuntimeException", "(", "'You must specify an if part.'", ")", ";", "}", "if", "(", "null", "===", "$", "this", "->", "t...
Returns the related node. @return NodeDefinition|ArrayNodeDefinition|VariableNodeDefinition @throws \RuntimeException
[ "Returns", "the", "related", "node", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php#L215-L225
207,018
symfony/symfony
src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php
ExprBuilder.buildExpressions
public static function buildExpressions(array $expressions) { foreach ($expressions as $k => $expr) { if ($expr instanceof self) { $if = $expr->ifPart; $then = $expr->thenPart; $expressions[$k] = function ($v) use ($if, $then) { ...
php
public static function buildExpressions(array $expressions) { foreach ($expressions as $k => $expr) { if ($expr instanceof self) { $if = $expr->ifPart; $then = $expr->thenPart; $expressions[$k] = function ($v) use ($if, $then) { ...
[ "public", "static", "function", "buildExpressions", "(", "array", "$", "expressions", ")", "{", "foreach", "(", "$", "expressions", "as", "$", "k", "=>", "$", "expr", ")", "{", "if", "(", "$", "expr", "instanceof", "self", ")", "{", "$", "if", "=", "...
Builds the expressions. @param ExprBuilder[] $expressions An array of ExprBuilder instances to build @return array
[ "Builds", "the", "expressions", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php#L234-L247
207,019
symfony/symfony
src/Symfony/Component/Finder/Iterator/MultiplePcreFilterIterator.php
MultiplePcreFilterIterator.isAccepted
protected function isAccepted($string) { // should at least not match one rule to exclude foreach ($this->noMatchRegexps as $regex) { if (preg_match($regex, $string)) { return false; } } // should at least match one rule if ($this->mat...
php
protected function isAccepted($string) { // should at least not match one rule to exclude foreach ($this->noMatchRegexps as $regex) { if (preg_match($regex, $string)) { return false; } } // should at least match one rule if ($this->mat...
[ "protected", "function", "isAccepted", "(", "$", "string", ")", "{", "// should at least not match one rule to exclude", "foreach", "(", "$", "this", "->", "noMatchRegexps", "as", "$", "regex", ")", "{", "if", "(", "preg_match", "(", "$", "regex", ",", "$", "s...
Checks whether the string is accepted by the regex filters. If there is no regexps defined in the class, this method will accept the string. Such case can be handled by child classes before calling the method if they want to apply a different behavior. @param string $string The string to be matched against filters @...
[ "Checks", "whether", "the", "string", "is", "accepted", "by", "the", "regex", "filters", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Finder/Iterator/MultiplePcreFilterIterator.php#L53-L75
207,020
symfony/symfony
src/Symfony/Component/DomCrawler/Field/FileFormField.php
FileFormField.setErrorCode
public function setErrorCode($error) { $codes = [UPLOAD_ERR_INI_SIZE, UPLOAD_ERR_FORM_SIZE, UPLOAD_ERR_PARTIAL, UPLOAD_ERR_NO_FILE, UPLOAD_ERR_NO_TMP_DIR, UPLOAD_ERR_CANT_WRITE, UPLOAD_ERR_EXTENSION]; if (!\in_array($error, $codes)) { throw new \InvalidArgumentException(sprintf('The erro...
php
public function setErrorCode($error) { $codes = [UPLOAD_ERR_INI_SIZE, UPLOAD_ERR_FORM_SIZE, UPLOAD_ERR_PARTIAL, UPLOAD_ERR_NO_FILE, UPLOAD_ERR_NO_TMP_DIR, UPLOAD_ERR_CANT_WRITE, UPLOAD_ERR_EXTENSION]; if (!\in_array($error, $codes)) { throw new \InvalidArgumentException(sprintf('The erro...
[ "public", "function", "setErrorCode", "(", "$", "error", ")", "{", "$", "codes", "=", "[", "UPLOAD_ERR_INI_SIZE", ",", "UPLOAD_ERR_FORM_SIZE", ",", "UPLOAD_ERR_PARTIAL", ",", "UPLOAD_ERR_NO_FILE", ",", "UPLOAD_ERR_NO_TMP_DIR", ",", "UPLOAD_ERR_CANT_WRITE", ",", "UPLOA...
Sets the PHP error code associated with the field. @param int $error The error code (one of UPLOAD_ERR_INI_SIZE, UPLOAD_ERR_FORM_SIZE, UPLOAD_ERR_PARTIAL, UPLOAD_ERR_NO_FILE, UPLOAD_ERR_NO_TMP_DIR, UPLOAD_ERR_CANT_WRITE, or UPLOAD_ERR_EXTENSION) @throws \InvalidArgumentException When error code doesn't exist
[ "Sets", "the", "PHP", "error", "code", "associated", "with", "the", "field", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DomCrawler/Field/FileFormField.php#L28-L36
207,021
symfony/symfony
src/Symfony/Component/HttpFoundation/Request.php
Request.get
public function get($key, $default = null) { if ($this !== $result = $this->attributes->get($key, $this)) { return $result; } if ($this !== $result = $this->query->get($key, $this)) { return $result; } if ($this !== $result = $this->request->get($key...
php
public function get($key, $default = null) { if ($this !== $result = $this->attributes->get($key, $this)) { return $result; } if ($this !== $result = $this->query->get($key, $this)) { return $result; } if ($this !== $result = $this->request->get($key...
[ "public", "function", "get", "(", "$", "key", ",", "$", "default", "=", "null", ")", "{", "if", "(", "$", "this", "!==", "$", "result", "=", "$", "this", "->", "attributes", "->", "get", "(", "$", "key", ",", "$", "this", ")", ")", "{", "return...
Gets a "parameter" value from any bag. This method is mainly useful for libraries that want to provide some flexibility. If you don't need the flexibility in controllers, it is better to explicitly get request parameters from the appropriate public property instead (attributes, query, request). Order of precedence: P...
[ "Gets", "a", "parameter", "value", "from", "any", "bag", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/Request.php#L681-L696
207,022
symfony/symfony
src/Symfony/Component/HttpFoundation/Request.php
Request.getSession
public function getSession() { $session = $this->session; if (!$session instanceof SessionInterface && null !== $session) { $this->setSession($session = $session()); } if (null === $session) { @trigger_error(sprintf('Calling "%s()" when no session has been se...
php
public function getSession() { $session = $this->session; if (!$session instanceof SessionInterface && null !== $session) { $this->setSession($session = $session()); } if (null === $session) { @trigger_error(sprintf('Calling "%s()" when no session has been se...
[ "public", "function", "getSession", "(", ")", "{", "$", "session", "=", "$", "this", "->", "session", ";", "if", "(", "!", "$", "session", "instanceof", "SessionInterface", "&&", "null", "!==", "$", "session", ")", "{", "$", "this", "->", "setSession", ...
Gets the Session. @return SessionInterface|null The session
[ "Gets", "the", "Session", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/Request.php#L703-L716
207,023
symfony/symfony
src/Symfony/Component/HttpFoundation/Request.php
Request.getPathInfo
public function getPathInfo() { if (null === $this->pathInfo) { $this->pathInfo = $this->preparePathInfo(); } return $this->pathInfo; }
php
public function getPathInfo() { if (null === $this->pathInfo) { $this->pathInfo = $this->preparePathInfo(); } return $this->pathInfo; }
[ "public", "function", "getPathInfo", "(", ")", "{", "if", "(", "null", "===", "$", "this", "->", "pathInfo", ")", "{", "$", "this", "->", "pathInfo", "=", "$", "this", "->", "preparePathInfo", "(", ")", ";", "}", "return", "$", "this", "->", "pathInf...
Returns the path being requested relative to the executed script. The path info always starts with a /. Suppose this request is instantiated from /mysite on localhost: * http://localhost/mysite returns an empty string * http://localhost/mysite/about returns '/about' * http://localhost/mysite/enco...
[ "Returns", "the", "path", "being", "requested", "relative", "to", "the", "executed", "script", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/Request.php#L831-L838
207,024
symfony/symfony
src/Symfony/Component/HttpFoundation/Request.php
Request.getBaseUrl
public function getBaseUrl() { if (null === $this->baseUrl) { $this->baseUrl = $this->prepareBaseUrl(); } return $this->baseUrl; }
php
public function getBaseUrl() { if (null === $this->baseUrl) { $this->baseUrl = $this->prepareBaseUrl(); } return $this->baseUrl; }
[ "public", "function", "getBaseUrl", "(", ")", "{", "if", "(", "null", "===", "$", "this", "->", "baseUrl", ")", "{", "$", "this", "->", "baseUrl", "=", "$", "this", "->", "prepareBaseUrl", "(", ")", ";", "}", "return", "$", "this", "->", "baseUrl", ...
Returns the root URL from which this request is executed. The base URL never ends with a /. This is similar to getBasePath(), except that it also includes the script filename (e.g. index.php) if one exists. @return string The raw URL (i.e. not urldecoded)
[ "Returns", "the", "root", "URL", "from", "which", "this", "request", "is", "executed", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/Request.php#L871-L878
207,025
symfony/symfony
src/Symfony/Component/HttpFoundation/Request.php
Request.getMimeTypes
public static function getMimeTypes($format) { if (null === static::$formats) { static::initializeFormats(); } return isset(static::$formats[$format]) ? static::$formats[$format] : []; }
php
public static function getMimeTypes($format) { if (null === static::$formats) { static::initializeFormats(); } return isset(static::$formats[$format]) ? static::$formats[$format] : []; }
[ "public", "static", "function", "getMimeTypes", "(", "$", "format", ")", "{", "if", "(", "null", "===", "static", "::", "$", "formats", ")", "{", "static", "::", "initializeFormats", "(", ")", ";", "}", "return", "isset", "(", "static", "::", "$", "for...
Gets the mime types associated with the format. @param string $format The format @return array The associated mime types
[ "Gets", "the", "mime", "types", "associated", "with", "the", "format", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/Request.php#L1285-L1292
207,026
symfony/symfony
src/Symfony/Component/HttpFoundation/Request.php
Request.getRequestFormat
public function getRequestFormat($default = 'html') { if (null === $this->format) { $this->format = $this->attributes->get('_format'); } return null === $this->format ? $default : $this->format; }
php
public function getRequestFormat($default = 'html') { if (null === $this->format) { $this->format = $this->attributes->get('_format'); } return null === $this->format ? $default : $this->format; }
[ "public", "function", "getRequestFormat", "(", "$", "default", "=", "'html'", ")", "{", "if", "(", "null", "===", "$", "this", "->", "format", ")", "{", "$", "this", "->", "format", "=", "$", "this", "->", "attributes", "->", "get", "(", "'_format'", ...
Gets the request format. Here is the process to determine the format: * format defined by the user (with setRequestFormat()) * _format request attribute * $default @param string|null $default The default format @return string|null The request format
[ "Gets", "the", "request", "format", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/Request.php#L1350-L1357
207,027
symfony/symfony
src/Symfony/Component/HttpFoundation/Request.php
Request.getProtocolVersion
public function getProtocolVersion() { if ($this->isFromTrustedProxy()) { preg_match('~^(HTTP/)?([1-9]\.[0-9]) ~', $this->headers->get('Via'), $matches); if ($matches) { return 'HTTP/'.$matches[2]; } } return $this->server->get('SERVER_PR...
php
public function getProtocolVersion() { if ($this->isFromTrustedProxy()) { preg_match('~^(HTTP/)?([1-9]\.[0-9]) ~', $this->headers->get('Via'), $matches); if ($matches) { return 'HTTP/'.$matches[2]; } } return $this->server->get('SERVER_PR...
[ "public", "function", "getProtocolVersion", "(", ")", "{", "if", "(", "$", "this", "->", "isFromTrustedProxy", "(", ")", ")", "{", "preg_match", "(", "'~^(HTTP/)?([1-9]\\.[0-9]) ~'", ",", "$", "this", "->", "headers", "->", "get", "(", "'Via'", ")", ",", "...
Returns the protocol version. If the application is behind a proxy, the protocol version used in the requests between the client and the proxy and between the proxy and the server might be different. This returns the former (from the "Via" header) if the proxy is trusted (see "setTrustedProxies()"), otherwise it retur...
[ "Returns", "the", "protocol", "version", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/Request.php#L1487-L1498
207,028
symfony/symfony
src/Symfony/Component/HttpFoundation/Request.php
Request.getPreferredLanguage
public function getPreferredLanguage(array $locales = null) { $preferredLanguages = $this->getLanguages(); if (empty($locales)) { return isset($preferredLanguages[0]) ? $preferredLanguages[0] : null; } if (!$preferredLanguages) { return $locales[0]; ...
php
public function getPreferredLanguage(array $locales = null) { $preferredLanguages = $this->getLanguages(); if (empty($locales)) { return isset($preferredLanguages[0]) ? $preferredLanguages[0] : null; } if (!$preferredLanguages) { return $locales[0]; ...
[ "public", "function", "getPreferredLanguage", "(", "array", "$", "locales", "=", "null", ")", "{", "$", "preferredLanguages", "=", "$", "this", "->", "getLanguages", "(", ")", ";", "if", "(", "empty", "(", "$", "locales", ")", ")", "{", "return", "isset"...
Returns the preferred language. @param array $locales An array of ordered available locales @return string|null The preferred locale
[ "Returns", "the", "preferred", "language", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/Request.php#L1572-L1598
207,029
symfony/symfony
src/Symfony/Component/HttpFoundation/Request.php
Request.getAcceptableContentTypes
public function getAcceptableContentTypes() { if (null !== $this->acceptableContentTypes) { return $this->acceptableContentTypes; } return $this->acceptableContentTypes = array_keys(AcceptHeader::fromString($this->headers->get('Accept'))->all()); }
php
public function getAcceptableContentTypes() { if (null !== $this->acceptableContentTypes) { return $this->acceptableContentTypes; } return $this->acceptableContentTypes = array_keys(AcceptHeader::fromString($this->headers->get('Accept'))->all()); }
[ "public", "function", "getAcceptableContentTypes", "(", ")", "{", "if", "(", "null", "!==", "$", "this", "->", "acceptableContentTypes", ")", "{", "return", "$", "this", "->", "acceptableContentTypes", ";", "}", "return", "$", "this", "->", "acceptableContentTyp...
Gets a list of content types acceptable by the client browser. @return array List of content types in preferable order
[ "Gets", "a", "list", "of", "content", "types", "acceptable", "by", "the", "client", "browser", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/Request.php#L1673-L1680
207,030
symfony/symfony
src/Symfony/Component/HttpFoundation/Request.php
Request.prepareBasePath
protected function prepareBasePath() { $baseUrl = $this->getBaseUrl(); if (empty($baseUrl)) { return ''; } $filename = basename($this->server->get('SCRIPT_FILENAME')); if (basename($baseUrl) === $filename) { $basePath = \dirname($baseUrl); } e...
php
protected function prepareBasePath() { $baseUrl = $this->getBaseUrl(); if (empty($baseUrl)) { return ''; } $filename = basename($this->server->get('SCRIPT_FILENAME')); if (basename($baseUrl) === $filename) { $basePath = \dirname($baseUrl); } e...
[ "protected", "function", "prepareBasePath", "(", ")", "{", "$", "baseUrl", "=", "$", "this", "->", "getBaseUrl", "(", ")", ";", "if", "(", "empty", "(", "$", "baseUrl", ")", ")", "{", "return", "''", ";", "}", "$", "filename", "=", "basename", "(", ...
Prepares the base path. @return string base path
[ "Prepares", "the", "base", "path", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/Request.php#L1824-L1843
207,031
symfony/symfony
src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php
AbstractNormalizer.setCircularReferenceLimit
public function setCircularReferenceLimit($circularReferenceLimit) { @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2, use the "circular_reference_limit" key of the context instead.', __METHOD__), E_USER_DEPRECATED); $this->defaultContext[self::CIRCULAR_REFERENCE_LIMIT] = $...
php
public function setCircularReferenceLimit($circularReferenceLimit) { @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2, use the "circular_reference_limit" key of the context instead.', __METHOD__), E_USER_DEPRECATED); $this->defaultContext[self::CIRCULAR_REFERENCE_LIMIT] = $...
[ "public", "function", "setCircularReferenceLimit", "(", "$", "circularReferenceLimit", ")", "{", "@", "trigger_error", "(", "sprintf", "(", "'The \"%s()\" method is deprecated since Symfony 4.2, use the \"circular_reference_limit\" key of the context instead.'", ",", "__METHOD__", ")...
Sets circular reference limit. @deprecated since Symfony 4.2 @param int $circularReferenceLimit Limit of iterations for the same object @return self
[ "Sets", "circular", "reference", "limit", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php#L197-L204
207,032
symfony/symfony
src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php
AbstractNormalizer.setCircularReferenceHandler
public function setCircularReferenceHandler(callable $circularReferenceHandler) { @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2, use the "circular_reference_handler" key of the context instead.', __METHOD__), E_USER_DEPRECATED); $this->defaultContext[self::CIRCULAR_REFER...
php
public function setCircularReferenceHandler(callable $circularReferenceHandler) { @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2, use the "circular_reference_handler" key of the context instead.', __METHOD__), E_USER_DEPRECATED); $this->defaultContext[self::CIRCULAR_REFER...
[ "public", "function", "setCircularReferenceHandler", "(", "callable", "$", "circularReferenceHandler", ")", "{", "@", "trigger_error", "(", "sprintf", "(", "'The \"%s()\" method is deprecated since Symfony 4.2, use the \"circular_reference_handler\" key of the context instead.'", ",", ...
Sets circular reference handler. @deprecated since Symfony 4.2 @param callable $circularReferenceHandler @return self
[ "Sets", "circular", "reference", "handler", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php#L215-L222
207,033
symfony/symfony
src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php
AbstractNormalizer.setCallbacks
public function setCallbacks(array $callbacks) { @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2, use the "callbacks" key of the context instead.', __METHOD__), E_USER_DEPRECATED); foreach ($callbacks as $attribute => $callback) { if (!\is_callable($callback)) ...
php
public function setCallbacks(array $callbacks) { @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2, use the "callbacks" key of the context instead.', __METHOD__), E_USER_DEPRECATED); foreach ($callbacks as $attribute => $callback) { if (!\is_callable($callback)) ...
[ "public", "function", "setCallbacks", "(", "array", "$", "callbacks", ")", "{", "@", "trigger_error", "(", "sprintf", "(", "'The \"%s()\" method is deprecated since Symfony 4.2, use the \"callbacks\" key of the context instead.'", ",", "__METHOD__", ")", ",", "E_USER_DEPRECATED...
Sets normalization callbacks. @deprecated since Symfony 4.2 @param callable[] $callbacks Help normalize the result @return self @throws InvalidArgumentException if a non-callable callback is set
[ "Sets", "normalization", "callbacks", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php#L235-L247
207,034
symfony/symfony
src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php
AbstractNormalizer.setIgnoredAttributes
public function setIgnoredAttributes(array $ignoredAttributes) { @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2, use the "ignored_attributes" key of the context instead.', __METHOD__), E_USER_DEPRECATED); $this->defaultContext[self::IGNORED_ATTRIBUTES] = $this->ignoredAtt...
php
public function setIgnoredAttributes(array $ignoredAttributes) { @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2, use the "ignored_attributes" key of the context instead.', __METHOD__), E_USER_DEPRECATED); $this->defaultContext[self::IGNORED_ATTRIBUTES] = $this->ignoredAtt...
[ "public", "function", "setIgnoredAttributes", "(", "array", "$", "ignoredAttributes", ")", "{", "@", "trigger_error", "(", "sprintf", "(", "'The \"%s()\" method is deprecated since Symfony 4.2, use the \"ignored_attributes\" key of the context instead.'", ",", "__METHOD__", ")", ...
Sets ignored attributes for normalization and denormalization. @deprecated since Symfony 4.2 @return self
[ "Sets", "ignored", "attributes", "for", "normalization", "and", "denormalization", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php#L256-L263
207,035
symfony/symfony
src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php
SecurityExtension.createUserProviders
private function createUserProviders($config, ContainerBuilder $container) { $providerIds = []; foreach ($config['providers'] as $name => $provider) { $id = $this->createUserDaoProvider($name, $provider, $container); $providerIds[str_replace('-', '_', $name)] = $id; }...
php
private function createUserProviders($config, ContainerBuilder $container) { $providerIds = []; foreach ($config['providers'] as $name => $provider) { $id = $this->createUserDaoProvider($name, $provider, $container); $providerIds[str_replace('-', '_', $name)] = $id; }...
[ "private", "function", "createUserProviders", "(", "$", "config", ",", "ContainerBuilder", "$", "container", ")", "{", "$", "providerIds", "=", "[", "]", ";", "foreach", "(", "$", "config", "[", "'providers'", "]", "as", "$", "name", "=>", "$", "provider",...
Parses user providers and returns an array of their ids
[ "Parses", "user", "providers", "and", "returns", "an", "array", "of", "their", "ids" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php#L621-L630
207,036
symfony/symfony
src/Symfony/Component/Intl/Intl.php
Intl.getCurrencyBundle
public static function getCurrencyBundle() { @trigger_error(sprintf('The method "%s()" is deprecated since Symfony 4.3, use "%s" instead.', __METHOD__, Currencies::class), E_USER_DEPRECATED); if (null === self::$currencyBundle) { self::$currencyBundle = new CurrencyBundle( ...
php
public static function getCurrencyBundle() { @trigger_error(sprintf('The method "%s()" is deprecated since Symfony 4.3, use "%s" instead.', __METHOD__, Currencies::class), E_USER_DEPRECATED); if (null === self::$currencyBundle) { self::$currencyBundle = new CurrencyBundle( ...
[ "public", "static", "function", "getCurrencyBundle", "(", ")", "{", "@", "trigger_error", "(", "sprintf", "(", "'The method \"%s()\" is deprecated since Symfony 4.3, use \"%s\" instead.'", ",", "__METHOD__", ",", "Currencies", "::", "class", ")", ",", "E_USER_DEPRECATED", ...
Returns the bundle containing currency information. @return CurrencyBundleInterface The currency resource bundle @deprecated since Symfony 4.3, to be removed in 5.0. Use {@see Currencies} instead.
[ "Returns", "the", "bundle", "containing", "currency", "information", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Intl/Intl.php#L124-L137
207,037
symfony/symfony
src/Symfony/Component/Intl/Intl.php
Intl.getLanguageBundle
public static function getLanguageBundle() { @trigger_error(sprintf('The method "%s()" is deprecated since Symfony 4.3, use "%s" or "%s" instead.', __METHOD__, Languages::class, Scripts::class), E_USER_DEPRECATED); if (null === self::$languageBundle) { self::$languageBundle = new Langua...
php
public static function getLanguageBundle() { @trigger_error(sprintf('The method "%s()" is deprecated since Symfony 4.3, use "%s" or "%s" instead.', __METHOD__, Languages::class, Scripts::class), E_USER_DEPRECATED); if (null === self::$languageBundle) { self::$languageBundle = new Langua...
[ "public", "static", "function", "getLanguageBundle", "(", ")", "{", "@", "trigger_error", "(", "sprintf", "(", "'The method \"%s()\" is deprecated since Symfony 4.3, use \"%s\" or \"%s\" instead.'", ",", "__METHOD__", ",", "Languages", "::", "class", ",", "Scripts", "::", ...
Returns the bundle containing language information. @return LanguageBundleInterface The language resource bundle @deprecated since Symfony 4.3, to be removed in 5.0. Use {@see Languages} or {@see Scripts} instead.
[ "Returns", "the", "bundle", "containing", "language", "information", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Intl/Intl.php#L146-L163
207,038
symfony/symfony
src/Symfony/Component/Intl/Intl.php
Intl.getLocaleBundle
public static function getLocaleBundle() { @trigger_error(sprintf('The method "%s()" is deprecated since Symfony 4.3, use "%s" instead.', __METHOD__, Locales::class), E_USER_DEPRECATED); if (null === self::$localeBundle) { self::$localeBundle = new LocaleBundle( self::ge...
php
public static function getLocaleBundle() { @trigger_error(sprintf('The method "%s()" is deprecated since Symfony 4.3, use "%s" instead.', __METHOD__, Locales::class), E_USER_DEPRECATED); if (null === self::$localeBundle) { self::$localeBundle = new LocaleBundle( self::ge...
[ "public", "static", "function", "getLocaleBundle", "(", ")", "{", "@", "trigger_error", "(", "sprintf", "(", "'The method \"%s()\" is deprecated since Symfony 4.3, use \"%s\" instead.'", ",", "__METHOD__", ",", "Locales", "::", "class", ")", ",", "E_USER_DEPRECATED", ")",...
Returns the bundle containing locale information. @return LocaleBundleInterface The locale resource bundle @deprecated since Symfony 4.3, to be removed in 5.0. Use {@see Locales} instead.
[ "Returns", "the", "bundle", "containing", "locale", "information", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Intl/Intl.php#L172-L184
207,039
symfony/symfony
src/Symfony/Component/Intl/Intl.php
Intl.getRegionBundle
public static function getRegionBundle() { @trigger_error(sprintf('The method "%s()" is deprecated since Symfony 4.3, use "%s" instead.', __METHOD__, Regions::class), E_USER_DEPRECATED); if (null === self::$regionBundle) { self::$regionBundle = new RegionBundle( self::ge...
php
public static function getRegionBundle() { @trigger_error(sprintf('The method "%s()" is deprecated since Symfony 4.3, use "%s" instead.', __METHOD__, Regions::class), E_USER_DEPRECATED); if (null === self::$regionBundle) { self::$regionBundle = new RegionBundle( self::ge...
[ "public", "static", "function", "getRegionBundle", "(", ")", "{", "@", "trigger_error", "(", "sprintf", "(", "'The method \"%s()\" is deprecated since Symfony 4.3, use \"%s\" instead.'", ",", "__METHOD__", ",", "Regions", "::", "class", ")", ",", "E_USER_DEPRECATED", ")",...
Returns the bundle containing region information. @return RegionBundleInterface The region resource bundle @deprecated since Symfony 4.3, to be removed in 5.0. Use {@see Regions} instead.
[ "Returns", "the", "bundle", "containing", "region", "information", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Intl/Intl.php#L193-L206
207,040
symfony/symfony
src/Symfony/Component/Intl/Intl.php
Intl.getIcuVersion
public static function getIcuVersion() { if (false === self::$icuVersion) { if (!self::isExtensionLoaded()) { self::$icuVersion = self::getIcuStubVersion(); } elseif (\defined('INTL_ICU_VERSION')) { self::$icuVersion = INTL_ICU_VERSION; } e...
php
public static function getIcuVersion() { if (false === self::$icuVersion) { if (!self::isExtensionLoaded()) { self::$icuVersion = self::getIcuStubVersion(); } elseif (\defined('INTL_ICU_VERSION')) { self::$icuVersion = INTL_ICU_VERSION; } e...
[ "public", "static", "function", "getIcuVersion", "(", ")", "{", "if", "(", "false", "===", "self", "::", "$", "icuVersion", ")", "{", "if", "(", "!", "self", "::", "isExtensionLoaded", "(", ")", ")", "{", "self", "::", "$", "icuVersion", "=", "self", ...
Returns the version of the installed ICU library. @return string|null The ICU version or NULL if it could not be determined
[ "Returns", "the", "version", "of", "the", "installed", "ICU", "library", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Intl/Intl.php#L213-L236
207,041
symfony/symfony
src/Symfony/Component/Intl/Intl.php
Intl.getIcuDataVersion
public static function getIcuDataVersion() { if (false === self::$icuDataVersion) { self::$icuDataVersion = trim(file_get_contents(self::getDataDirectory().'/version.txt')); } return self::$icuDataVersion; }
php
public static function getIcuDataVersion() { if (false === self::$icuDataVersion) { self::$icuDataVersion = trim(file_get_contents(self::getDataDirectory().'/version.txt')); } return self::$icuDataVersion; }
[ "public", "static", "function", "getIcuDataVersion", "(", ")", "{", "if", "(", "false", "===", "self", "::", "$", "icuDataVersion", ")", "{", "self", "::", "$", "icuDataVersion", "=", "trim", "(", "file_get_contents", "(", "self", "::", "getDataDirectory", "...
Returns the version of the installed ICU data. @return string The version of the installed ICU data
[ "Returns", "the", "version", "of", "the", "installed", "ICU", "data", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Intl/Intl.php#L243-L250
207,042
symfony/symfony
src/Symfony/Component/Intl/Intl.php
Intl.getEntryReader
private static function getEntryReader() { if (null === self::$entryReader) { self::$entryReader = new BundleEntryReader(new BufferedBundleReader( new JsonBundleReader(), self::BUFFER_SIZE )); $localeDataProvider = new LocaleDataProvider( ...
php
private static function getEntryReader() { if (null === self::$entryReader) { self::$entryReader = new BundleEntryReader(new BufferedBundleReader( new JsonBundleReader(), self::BUFFER_SIZE )); $localeDataProvider = new LocaleDataProvider( ...
[ "private", "static", "function", "getEntryReader", "(", ")", "{", "if", "(", "null", "===", "self", "::", "$", "entryReader", ")", "{", "self", "::", "$", "entryReader", "=", "new", "BundleEntryReader", "(", "new", "BufferedBundleReader", "(", "new", "JsonBu...
Returns the cached bundle entry reader. @return BundleEntryReaderInterface The bundle entry reader
[ "Returns", "the", "cached", "bundle", "entry", "reader", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Intl/Intl.php#L277-L292
207,043
symfony/symfony
src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php
TemplateManager.getName
public function getName(Profile $profile, $panel) { $templates = $this->getNames($profile); if (!isset($templates[$panel])) { throw new NotFoundHttpException(sprintf('Panel "%s" is not registered in profiler or is not present in viewed profile.', $panel)); } return $tem...
php
public function getName(Profile $profile, $panel) { $templates = $this->getNames($profile); if (!isset($templates[$panel])) { throw new NotFoundHttpException(sprintf('Panel "%s" is not registered in profiler or is not present in viewed profile.', $panel)); } return $tem...
[ "public", "function", "getName", "(", "Profile", "$", "profile", ",", "$", "panel", ")", "{", "$", "templates", "=", "$", "this", "->", "getNames", "(", "$", "profile", ")", ";", "if", "(", "!", "isset", "(", "$", "templates", "[", "$", "panel", "]...
Gets the template name for a given panel. @param Profile $profile @param string $panel @return mixed @throws NotFoundHttpException
[ "Gets", "the", "template", "name", "for", "a", "given", "panel", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php#L52-L61
207,044
symfony/symfony
src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php
TemplateManager.getNames
public function getNames(Profile $profile) { $templates = []; foreach ($this->templates as $arguments) { if (null === $arguments) { continue; } list($name, $template) = $arguments; if (!$this->profiler->has($name) || !$profile->hasCo...
php
public function getNames(Profile $profile) { $templates = []; foreach ($this->templates as $arguments) { if (null === $arguments) { continue; } list($name, $template) = $arguments; if (!$this->profiler->has($name) || !$profile->hasCo...
[ "public", "function", "getNames", "(", "Profile", "$", "profile", ")", "{", "$", "templates", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "templates", "as", "$", "arguments", ")", "{", "if", "(", "null", "===", "$", "arguments", ")", "{", ...
Gets template names of templates that are present in the viewed profile. @return array @throws \UnexpectedValueException
[ "Gets", "template", "names", "of", "templates", "that", "are", "present", "in", "the", "viewed", "profile", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php#L70-L97
207,045
symfony/symfony
src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php
TemplateManager.templateExists
protected function templateExists($template) { $loader = $this->twig->getLoader(); if ($loader instanceof ExistsLoaderInterface) { return $loader->exists($template); } try { if ($loader instanceof SourceContextLoaderInterface || method_exists($loader, 'getSou...
php
protected function templateExists($template) { $loader = $this->twig->getLoader(); if ($loader instanceof ExistsLoaderInterface) { return $loader->exists($template); } try { if ($loader instanceof SourceContextLoaderInterface || method_exists($loader, 'getSou...
[ "protected", "function", "templateExists", "(", "$", "template", ")", "{", "$", "loader", "=", "$", "this", "->", "twig", "->", "getLoader", "(", ")", ";", "if", "(", "$", "loader", "instanceof", "ExistsLoaderInterface", ")", "{", "return", "$", "loader", ...
to be removed when the minimum required version of Twig is >= 2.0
[ "to", "be", "removed", "when", "the", "minimum", "required", "version", "of", "Twig", "is", ">", "=", "2", ".", "0" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php#L100-L119
207,046
symfony/symfony
src/Symfony/Component/Routing/Generator/UrlGenerator.php
UrlGenerator.getRelativePath
public static function getRelativePath($basePath, $targetPath) { if ($basePath === $targetPath) { return ''; } $sourceDirs = explode('/', isset($basePath[0]) && '/' === $basePath[0] ? substr($basePath, 1) : $basePath); $targetDirs = explode('/', isset($targetPath[0]) && ...
php
public static function getRelativePath($basePath, $targetPath) { if ($basePath === $targetPath) { return ''; } $sourceDirs = explode('/', isset($basePath[0]) && '/' === $basePath[0] ? substr($basePath, 1) : $basePath); $targetDirs = explode('/', isset($targetPath[0]) && ...
[ "public", "static", "function", "getRelativePath", "(", "$", "basePath", ",", "$", "targetPath", ")", "{", "if", "(", "$", "basePath", "===", "$", "targetPath", ")", "{", "return", "''", ";", "}", "$", "sourceDirs", "=", "explode", "(", "'/'", ",", "is...
Returns the target path as relative reference from the base path. Only the URIs path component (no schema, host etc.) is relevant and must be given, starting with a slash. Both paths must be absolute and not contain relative parts. Relative URLs from one resource to another are useful when generating self-contained do...
[ "Returns", "the", "target", "path", "as", "relative", "reference", "from", "the", "base", "path", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Routing/Generator/UrlGenerator.php#L322-L351
207,047
symfony/symfony
src/Symfony/Component/Validator/Mapping/MemberMetadata.php
MemberMetadata.getReflectionMember
public function getReflectionMember($objectOrClassName) { $className = \is_string($objectOrClassName) ? $objectOrClassName : \get_class($objectOrClassName); if (!isset($this->reflMember[$className])) { $this->reflMember[$className] = $this->newReflectionMember($objectOrClassName); ...
php
public function getReflectionMember($objectOrClassName) { $className = \is_string($objectOrClassName) ? $objectOrClassName : \get_class($objectOrClassName); if (!isset($this->reflMember[$className])) { $this->reflMember[$className] = $this->newReflectionMember($objectOrClassName); ...
[ "public", "function", "getReflectionMember", "(", "$", "objectOrClassName", ")", "{", "$", "className", "=", "\\", "is_string", "(", "$", "objectOrClassName", ")", "?", "$", "objectOrClassName", ":", "\\", "get_class", "(", "$", "objectOrClassName", ")", ";", ...
Returns the reflection instance for accessing the member's value. @param object|string $objectOrClassName The object or the class name @return \ReflectionMethod|\ReflectionProperty The reflection instance
[ "Returns", "the", "reflection", "instance", "for", "accessing", "the", "member", "s", "value", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Validator/Mapping/MemberMetadata.php#L164-L172
207,048
symfony/symfony
src/Symfony/Component/PropertyAccess/PropertyAccessorBuilder.php
PropertyAccessorBuilder.getPropertyAccessor
public function getPropertyAccessor() { return new PropertyAccessor($this->magicCall, $this->throwExceptionOnInvalidIndex, $this->cacheItemPool, $this->throwExceptionOnInvalidPropertyPath); }
php
public function getPropertyAccessor() { return new PropertyAccessor($this->magicCall, $this->throwExceptionOnInvalidIndex, $this->cacheItemPool, $this->throwExceptionOnInvalidPropertyPath); }
[ "public", "function", "getPropertyAccessor", "(", ")", "{", "return", "new", "PropertyAccessor", "(", "$", "this", "->", "magicCall", ",", "$", "this", "->", "throwExceptionOnInvalidIndex", ",", "$", "this", "->", "cacheItemPool", ",", "$", "this", "->", "thro...
Builds and returns a new PropertyAccessor object. @return PropertyAccessorInterface The built PropertyAccessor
[ "Builds", "and", "returns", "a", "new", "PropertyAccessor", "object", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/PropertyAccess/PropertyAccessorBuilder.php#L167-L170
207,049
symfony/symfony
src/Symfony/Component/Config/Definition/Builder/NormalizationBuilder.php
NormalizationBuilder.remap
public function remap($key, $plural = null) { $this->remappings[] = [$key, null === $plural ? $key.'s' : $plural]; return $this; }
php
public function remap($key, $plural = null) { $this->remappings[] = [$key, null === $plural ? $key.'s' : $plural]; return $this; }
[ "public", "function", "remap", "(", "$", "key", ",", "$", "plural", "=", "null", ")", "{", "$", "this", "->", "remappings", "[", "]", "=", "[", "$", "key", ",", "null", "===", "$", "plural", "?", "$", "key", ".", "'s'", ":", "$", "plural", "]",...
Registers a key to remap to its plural form. @param string $key The key to remap @param string $plural The plural of the key in case of irregular plural @return $this
[ "Registers", "a", "key", "to", "remap", "to", "its", "plural", "form", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Config/Definition/Builder/NormalizationBuilder.php#L38-L43
207,050
symfony/symfony
src/Symfony/Component/Config/Definition/Builder/NormalizationBuilder.php
NormalizationBuilder.before
public function before(\Closure $closure = null) { if (null !== $closure) { $this->before[] = $closure; return $this; } return $this->before[] = new ExprBuilder($this->node); }
php
public function before(\Closure $closure = null) { if (null !== $closure) { $this->before[] = $closure; return $this; } return $this->before[] = new ExprBuilder($this->node); }
[ "public", "function", "before", "(", "\\", "Closure", "$", "closure", "=", "null", ")", "{", "if", "(", "null", "!==", "$", "closure", ")", "{", "$", "this", "->", "before", "[", "]", "=", "$", "closure", ";", "return", "$", "this", ";", "}", "re...
Registers a closure to run before the normalization or an expression builder to build it if null is provided. @return ExprBuilder|$this
[ "Registers", "a", "closure", "to", "run", "before", "the", "normalization", "or", "an", "expression", "builder", "to", "build", "it", "if", "null", "is", "provided", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Config/Definition/Builder/NormalizationBuilder.php#L50-L59
207,051
symfony/symfony
src/Symfony/Component/HttpKernel/HttpKernel.php
HttpKernel.filterResponse
private function filterResponse(Response $response, Request $request, int $type) { $event = new ResponseEvent($this, $request, $type, $response); $this->dispatcher->dispatch($event, KernelEvents::RESPONSE); $this->finishRequest($request, $type); return $event->getResponse(); }
php
private function filterResponse(Response $response, Request $request, int $type) { $event = new ResponseEvent($this, $request, $type, $response); $this->dispatcher->dispatch($event, KernelEvents::RESPONSE); $this->finishRequest($request, $type); return $event->getResponse(); }
[ "private", "function", "filterResponse", "(", "Response", "$", "response", ",", "Request", "$", "request", ",", "int", "$", "type", ")", "{", "$", "event", "=", "new", "ResponseEvent", "(", "$", "this", ",", "$", "request", ",", "$", "type", ",", "$", ...
Filters a response object. @param Response $response A Response instance @param Request $request An error message in case the response is not a Response object @param int $type The type of the request (one of HttpKernelInterface::MASTER_REQUEST or HttpKernelInterface::SUB_REQUEST) @return Response The filt...
[ "Filters", "a", "response", "object", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpKernel/HttpKernel.php#L186-L195
207,052
symfony/symfony
src/Symfony/Component/HttpKernel/HttpKernel.php
HttpKernel.finishRequest
private function finishRequest(Request $request, int $type) { $this->dispatcher->dispatch(new FinishRequestEvent($this, $request, $type), KernelEvents::FINISH_REQUEST); $this->requestStack->pop(); }
php
private function finishRequest(Request $request, int $type) { $this->dispatcher->dispatch(new FinishRequestEvent($this, $request, $type), KernelEvents::FINISH_REQUEST); $this->requestStack->pop(); }
[ "private", "function", "finishRequest", "(", "Request", "$", "request", ",", "int", "$", "type", ")", "{", "$", "this", "->", "dispatcher", "->", "dispatch", "(", "new", "FinishRequestEvent", "(", "$", "this", ",", "$", "request", ",", "$", "type", ")", ...
Publishes the finish request event, then pop the request from the stack. Note that the order of the operations is important here, otherwise operations such as {@link RequestStack::getParentRequest()} can lead to weird results.
[ "Publishes", "the", "finish", "request", "event", "then", "pop", "the", "request", "from", "the", "stack", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpKernel/HttpKernel.php#L204-L208
207,053
symfony/symfony
src/Symfony/Component/ExpressionLanguage/ExpressionFunction.php
ExpressionFunction.fromPhp
public static function fromPhp($phpFunctionName, $expressionFunctionName = null) { $phpFunctionName = ltrim($phpFunctionName, '\\'); if (!\function_exists($phpFunctionName)) { throw new \InvalidArgumentException(sprintf('PHP function "%s" does not exist.', $phpFunctionName)); } ...
php
public static function fromPhp($phpFunctionName, $expressionFunctionName = null) { $phpFunctionName = ltrim($phpFunctionName, '\\'); if (!\function_exists($phpFunctionName)) { throw new \InvalidArgumentException(sprintf('PHP function "%s" does not exist.', $phpFunctionName)); } ...
[ "public", "static", "function", "fromPhp", "(", "$", "phpFunctionName", ",", "$", "expressionFunctionName", "=", "null", ")", "{", "$", "phpFunctionName", "=", "ltrim", "(", "$", "phpFunctionName", ",", "'\\\\'", ")", ";", "if", "(", "!", "\\", "function_exi...
Creates an ExpressionFunction from a PHP function name. @param string $phpFunctionName The PHP function name @param string|null $expressionFunctionName The expression function name (default: same than the PHP function name) @return self @throws \InvalidArgumentException if given PHP function name does no...
[ "Creates", "an", "ExpressionFunction", "from", "a", "PHP", "function", "name", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/ExpressionLanguage/ExpressionFunction.php#L76-L97
207,054
symfony/symfony
src/Symfony/Component/Translation/DataCollectorTranslator.php
DataCollectorTranslator.getFallbackLocales
public function getFallbackLocales() { if ($this->translator instanceof Translator || method_exists($this->translator, 'getFallbackLocales')) { return $this->translator->getFallbackLocales(); } return []; }
php
public function getFallbackLocales() { if ($this->translator instanceof Translator || method_exists($this->translator, 'getFallbackLocales')) { return $this->translator->getFallbackLocales(); } return []; }
[ "public", "function", "getFallbackLocales", "(", ")", "{", "if", "(", "$", "this", "->", "translator", "instanceof", "Translator", "||", "method_exists", "(", "$", "this", "->", "translator", ",", "'getFallbackLocales'", ")", ")", "{", "return", "$", "this", ...
Gets the fallback locales. @return array The fallback locales
[ "Gets", "the", "fallback", "locales", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Translation/DataCollectorTranslator.php#L119-L126
207,055
symfony/symfony
src/Symfony/Component/HttpFoundation/ServerBag.php
ServerBag.getHeaders
public function getHeaders() { $headers = []; $contentHeaders = ['CONTENT_LENGTH' => true, 'CONTENT_MD5' => true, 'CONTENT_TYPE' => true]; foreach ($this->parameters as $key => $value) { if (0 === strpos($key, 'HTTP_')) { $headers[substr($key, 5)] = $value; ...
php
public function getHeaders() { $headers = []; $contentHeaders = ['CONTENT_LENGTH' => true, 'CONTENT_MD5' => true, 'CONTENT_TYPE' => true]; foreach ($this->parameters as $key => $value) { if (0 === strpos($key, 'HTTP_')) { $headers[substr($key, 5)] = $value; ...
[ "public", "function", "getHeaders", "(", ")", "{", "$", "headers", "=", "[", "]", ";", "$", "contentHeaders", "=", "[", "'CONTENT_LENGTH'", "=>", "true", ",", "'CONTENT_MD5'", "=>", "true", ",", "'CONTENT_TYPE'", "=>", "true", "]", ";", "foreach", "(", "...
Gets the HTTP headers. @return array
[ "Gets", "the", "HTTP", "headers", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/ServerBag.php#L28-L101
207,056
symfony/symfony
src/Symfony/Component/Mailer/Transport/Smtp/Auth/CramMd5Authenticator.php
CramMd5Authenticator.getResponse
private function getResponse(string $secret, string $challenge): string { if (\strlen($secret) > 64) { $secret = pack('H32', md5($secret)); } if (\strlen($secret) < 64) { $secret = str_pad($secret, 64, \chr(0)); } $kipad = substr($secret, 0, 64) ^ st...
php
private function getResponse(string $secret, string $challenge): string { if (\strlen($secret) > 64) { $secret = pack('H32', md5($secret)); } if (\strlen($secret) < 64) { $secret = str_pad($secret, 64, \chr(0)); } $kipad = substr($secret, 0, 64) ^ st...
[ "private", "function", "getResponse", "(", "string", "$", "secret", ",", "string", "$", "challenge", ")", ":", "string", "{", "if", "(", "\\", "strlen", "(", "$", "secret", ")", ">", "64", ")", "{", "$", "secret", "=", "pack", "(", "'H32'", ",", "m...
Generates a CRAM-MD5 response from a server challenge.
[ "Generates", "a", "CRAM", "-", "MD5", "response", "from", "a", "server", "challenge", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Mailer/Transport/Smtp/Auth/CramMd5Authenticator.php#L46-L63
207,057
symfony/symfony
src/Symfony/Component/Yaml/Parser.php
Parser.moveToNextLine
private function moveToNextLine(): bool { if ($this->currentLineNb >= \count($this->lines) - 1) { return false; } $this->currentLine = $this->lines[++$this->currentLineNb]; return true; }
php
private function moveToNextLine(): bool { if ($this->currentLineNb >= \count($this->lines) - 1) { return false; } $this->currentLine = $this->lines[++$this->currentLineNb]; return true; }
[ "private", "function", "moveToNextLine", "(", ")", ":", "bool", "{", "if", "(", "$", "this", "->", "currentLineNb", ">=", "\\", "count", "(", "$", "this", "->", "lines", ")", "-", "1", ")", "{", "return", "false", ";", "}", "$", "this", "->", "curr...
Moves the parser to the next line. @return bool
[ "Moves", "the", "parser", "to", "the", "next", "line", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Yaml/Parser.php#L609-L618
207,058
symfony/symfony
src/Symfony/Component/Yaml/Parser.php
Parser.moveToPreviousLine
private function moveToPreviousLine(): bool { if ($this->currentLineNb < 1) { return false; } $this->currentLine = $this->lines[--$this->currentLineNb]; return true; }
php
private function moveToPreviousLine(): bool { if ($this->currentLineNb < 1) { return false; } $this->currentLine = $this->lines[--$this->currentLineNb]; return true; }
[ "private", "function", "moveToPreviousLine", "(", ")", ":", "bool", "{", "if", "(", "$", "this", "->", "currentLineNb", "<", "1", ")", "{", "return", "false", ";", "}", "$", "this", "->", "currentLine", "=", "$", "this", "->", "lines", "[", "--", "$"...
Moves the parser to the previous line. @return bool
[ "Moves", "the", "parser", "to", "the", "previous", "line", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Yaml/Parser.php#L625-L634
207,059
symfony/symfony
src/Symfony/Component/Workflow/DefinitionBuilder.php
DefinitionBuilder.clear
public function clear() { $this->places = []; $this->transitions = []; $this->initialPlace = null; $this->metadataStore = null; return $this; }
php
public function clear() { $this->places = []; $this->transitions = []; $this->initialPlace = null; $this->metadataStore = null; return $this; }
[ "public", "function", "clear", "(", ")", "{", "$", "this", "->", "places", "=", "[", "]", ";", "$", "this", "->", "transitions", "=", "[", "]", ";", "$", "this", "->", "initialPlace", "=", "null", ";", "$", "this", "->", "metadataStore", "=", "null...
Clear all data in the builder. @return $this
[ "Clear", "all", "data", "in", "the", "builder", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Workflow/DefinitionBuilder.php#L53-L61
207,060
symfony/symfony
src/Symfony/Component/DomCrawler/Form.php
Form.setValues
public function setValues(array $values) { foreach ($values as $name => $value) { $this->fields->set($name, $value); } return $this; }
php
public function setValues(array $values) { foreach ($values as $name => $value) { $this->fields->set($name, $value); } return $this; }
[ "public", "function", "setValues", "(", "array", "$", "values", ")", "{", "foreach", "(", "$", "values", "as", "$", "name", "=>", "$", "value", ")", "{", "$", "this", "->", "fields", "->", "set", "(", "$", "name", ",", "$", "value", ")", ";", "}"...
Sets the value of the fields. @param array $values An array of field values @return $this
[ "Sets", "the", "value", "of", "the", "fields", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DomCrawler/Form.php#L72-L79
207,061
symfony/symfony
src/Symfony/Component/DomCrawler/Form.php
Form.getUri
public function getUri() { $uri = parent::getUri(); if (!\in_array($this->getMethod(), ['POST', 'PUT', 'DELETE', 'PATCH'])) { $query = parse_url($uri, PHP_URL_QUERY); $currentParameters = []; if ($query) { parse_str($query, $currentParameters); ...
php
public function getUri() { $uri = parent::getUri(); if (!\in_array($this->getMethod(), ['POST', 'PUT', 'DELETE', 'PATCH'])) { $query = parse_url($uri, PHP_URL_QUERY); $currentParameters = []; if ($query) { parse_str($query, $currentParameters); ...
[ "public", "function", "getUri", "(", ")", "{", "$", "uri", "=", "parent", "::", "getUri", "(", ")", ";", "if", "(", "!", "\\", "in_array", "(", "$", "this", "->", "getMethod", "(", ")", ",", "[", "'POST'", ",", "'PUT'", ",", "'DELETE'", ",", "'PA...
Gets the URI of the form. The returned URI is not the same as the form "action" attribute. This method merges the value if the method is GET to mimics browser behavior. @return string The URI
[ "Gets", "the", "URI", "of", "the", "form", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DomCrawler/Form.php#L201-L220
207,062
symfony/symfony
src/Symfony/Component/DomCrawler/Form.php
Form.getMethod
public function getMethod() { if (null !== $this->method) { return $this->method; } // If the form was created from a button rather than the form node, check for HTML5 method override if ($this->button !== $this->node && $this->button->getAttribute('formmethod')) { ...
php
public function getMethod() { if (null !== $this->method) { return $this->method; } // If the form was created from a button rather than the form node, check for HTML5 method override if ($this->button !== $this->node && $this->button->getAttribute('formmethod')) { ...
[ "public", "function", "getMethod", "(", ")", "{", "if", "(", "null", "!==", "$", "this", "->", "method", ")", "{", "return", "$", "this", "->", "method", ";", "}", "// If the form was created from a button rather than the form node, check for HTML5 method override", "...
Gets the form method. If no method is defined in the form, GET is returned. @return string The method
[ "Gets", "the", "form", "method", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DomCrawler/Form.php#L239-L251
207,063
symfony/symfony
src/Symfony/Component/DomCrawler/Form.php
Form.disableValidation
public function disableValidation() { foreach ($this->fields->all() as $field) { if ($field instanceof Field\ChoiceFormField) { $field->disableValidation(); } } return $this; }
php
public function disableValidation() { foreach ($this->fields->all() as $field) { if ($field instanceof Field\ChoiceFormField) { $field->disableValidation(); } } return $this; }
[ "public", "function", "disableValidation", "(", ")", "{", "foreach", "(", "$", "this", "->", "fields", "->", "all", "(", ")", "as", "$", "field", ")", "{", "if", "(", "$", "field", "instanceof", "Field", "\\", "ChoiceFormField", ")", "{", "$", "field",...
Disables validation. @return self
[ "Disables", "validation", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DomCrawler/Form.php#L361-L370
207,064
symfony/symfony
src/Symfony/Component/DomCrawler/Form.php
Form.setNode
protected function setNode(\DOMElement $node) { $this->button = $node; if ('button' === $node->nodeName || ('input' === $node->nodeName && \in_array(strtolower($node->getAttribute('type')), ['submit', 'button', 'image']))) { if ($node->hasAttribute('form')) { // if the no...
php
protected function setNode(\DOMElement $node) { $this->button = $node; if ('button' === $node->nodeName || ('input' === $node->nodeName && \in_array(strtolower($node->getAttribute('type')), ['submit', 'button', 'image']))) { if ($node->hasAttribute('form')) { // if the no...
[ "protected", "function", "setNode", "(", "\\", "DOMElement", "$", "node", ")", "{", "$", "this", "->", "button", "=", "$", "node", ";", "if", "(", "'button'", "===", "$", "node", "->", "nodeName", "||", "(", "'input'", "===", "$", "node", "->", "node...
Sets the node for the form. Expects a 'submit' button \DOMElement and finds the corresponding form element, or the form element itself. @throws \LogicException If given node is not a button or input or does not have a form ancestor
[ "Sets", "the", "node", "for", "the", "form", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DomCrawler/Form.php#L379-L405
207,065
symfony/symfony
src/Symfony/Component/DomCrawler/Form.php
Form.initialize
private function initialize() { $this->fields = new FormFieldRegistry(); $xpath = new \DOMXPath($this->node->ownerDocument); // add submitted button if it has a valid name if ('form' !== $this->button->nodeName && $this->button->hasAttribute('name') && $this->button->getAttribute('...
php
private function initialize() { $this->fields = new FormFieldRegistry(); $xpath = new \DOMXPath($this->node->ownerDocument); // add submitted button if it has a valid name if ('form' !== $this->button->nodeName && $this->button->hasAttribute('name') && $this->button->getAttribute('...
[ "private", "function", "initialize", "(", ")", "{", "$", "this", "->", "fields", "=", "new", "FormFieldRegistry", "(", ")", ";", "$", "xpath", "=", "new", "\\", "DOMXPath", "(", "$", "this", "->", "node", "->", "ownerDocument", ")", ";", "// add submitte...
Adds form elements related to this form. Creates an internal copy of the submitted 'button' element and the form node or the entire document depending on whether we need to find non-descendant elements through HTML5 'form' attribute.
[ "Adds", "form", "elements", "related", "to", "this", "form", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DomCrawler/Form.php#L414-L462
207,066
symfony/symfony
src/Symfony/Component/VarDumper/Dumper/CliDumper.php
CliDumper.isWindowsTrueColor
private function isWindowsTrueColor() { $result = 183 <= getenv('ANSICON_VER') || 'ON' === getenv('ConEmuANSI') || 'xterm' === getenv('TERM') || 'Hyper' === getenv('TERM_PROGRAM'); if (!$result && \PHP_VERSION_ID >= 70200) { $version = sprintf( ...
php
private function isWindowsTrueColor() { $result = 183 <= getenv('ANSICON_VER') || 'ON' === getenv('ConEmuANSI') || 'xterm' === getenv('TERM') || 'Hyper' === getenv('TERM_PROGRAM'); if (!$result && \PHP_VERSION_ID >= 70200) { $version = sprintf( ...
[ "private", "function", "isWindowsTrueColor", "(", ")", "{", "$", "result", "=", "183", "<=", "getenv", "(", "'ANSICON_VER'", ")", "||", "'ON'", "===", "getenv", "(", "'ConEmuANSI'", ")", "||", "'xterm'", "===", "getenv", "(", "'TERM'", ")", "||", "'Hyper'"...
Returns true if the Windows terminal supports true color. Note that this does not check an output stream, but relies on environment variables from known implementations, or a PHP and Windows version that supports true color. @return bool
[ "Returns", "true", "if", "the", "Windows", "terminal", "supports", "true", "color", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/VarDumper/Dumper/CliDumper.php#L615-L633
207,067
symfony/symfony
src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php
NodeDefinition.getNode
public function getNode($forceRootNode = false) { if ($forceRootNode) { $this->parent = null; } if (null !== $this->normalization) { $this->normalization->before = ExprBuilder::buildExpressions($this->normalization->before); } if (null !== $this->val...
php
public function getNode($forceRootNode = false) { if ($forceRootNode) { $this->parent = null; } if (null !== $this->normalization) { $this->normalization->before = ExprBuilder::buildExpressions($this->normalization->before); } if (null !== $this->val...
[ "public", "function", "getNode", "(", "$", "forceRootNode", "=", "false", ")", "{", "if", "(", "$", "forceRootNode", ")", "{", "$", "this", "->", "parent", "=", "null", ";", "}", "if", "(", "null", "!==", "$", "this", "->", "normalization", ")", "{",...
Creates the node. @param bool $forceRootNode Whether to force this node as the root node @return NodeInterface
[ "Creates", "the", "node", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php#L115-L133
207,068
symfony/symfony
src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php
NodeDefinition.validation
protected function validation() { if (null === $this->validation) { $this->validation = new ValidationBuilder($this); } return $this->validation; }
php
protected function validation() { if (null === $this->validation) { $this->validation = new ValidationBuilder($this); } return $this->validation; }
[ "protected", "function", "validation", "(", ")", "{", "if", "(", "null", "===", "$", "this", "->", "validation", ")", "{", "$", "this", "->", "validation", "=", "new", "ValidationBuilder", "(", "$", "this", ")", ";", "}", "return", "$", "this", "->", ...
Gets the builder for validation rules. @return ValidationBuilder
[ "Gets", "the", "builder", "for", "validation", "rules", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php#L306-L313
207,069
symfony/symfony
src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php
NodeDefinition.merge
protected function merge() { if (null === $this->merge) { $this->merge = new MergeBuilder($this); } return $this->merge; }
php
protected function merge() { if (null === $this->merge) { $this->merge = new MergeBuilder($this); } return $this->merge; }
[ "protected", "function", "merge", "(", ")", "{", "if", "(", "null", "===", "$", "this", "->", "merge", ")", "{", "$", "this", "->", "merge", "=", "new", "MergeBuilder", "(", "$", "this", ")", ";", "}", "return", "$", "this", "->", "merge", ";", "...
Gets the builder for merging rules. @return MergeBuilder
[ "Gets", "the", "builder", "for", "merging", "rules", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php#L320-L327
207,070
symfony/symfony
src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php
NodeDefinition.normalization
protected function normalization() { if (null === $this->normalization) { $this->normalization = new NormalizationBuilder($this); } return $this->normalization; }
php
protected function normalization() { if (null === $this->normalization) { $this->normalization = new NormalizationBuilder($this); } return $this->normalization; }
[ "protected", "function", "normalization", "(", ")", "{", "if", "(", "null", "===", "$", "this", "->", "normalization", ")", "{", "$", "this", "->", "normalization", "=", "new", "NormalizationBuilder", "(", "$", "this", ")", ";", "}", "return", "$", "this...
Gets the builder for normalization rules. @return NormalizationBuilder
[ "Gets", "the", "builder", "for", "normalization", "rules", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php#L334-L341
207,071
symfony/symfony
src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php
NodeDefinition.setPathSeparator
public function setPathSeparator(string $separator) { if ($this instanceof ParentNodeDefinitionInterface) { if (method_exists($this, 'getChildNodeDefinitions')) { foreach ($this->getChildNodeDefinitions() as $child) { $child->setPathSeparator($separator); ...
php
public function setPathSeparator(string $separator) { if ($this instanceof ParentNodeDefinitionInterface) { if (method_exists($this, 'getChildNodeDefinitions')) { foreach ($this->getChildNodeDefinitions() as $child) { $child->setPathSeparator($separator); ...
[ "public", "function", "setPathSeparator", "(", "string", "$", "separator", ")", "{", "if", "(", "$", "this", "instanceof", "ParentNodeDefinitionInterface", ")", "{", "if", "(", "method_exists", "(", "$", "this", ",", "'getChildNodeDefinitions'", ")", ")", "{", ...
Set PathSeparator to use. @param string $separator @return $this
[ "Set", "PathSeparator", "to", "use", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php#L359-L374
207,072
symfony/symfony
src/Symfony/Component/PropertyInfo/PropertyInfoCacheExtractor.php
PropertyInfoCacheExtractor.extract
private function extract(string $method, array $arguments) { try { $serializedArguments = serialize($arguments); } catch (\Exception $exception) { // If arguments are not serializable, skip the cache return $this->propertyInfoExtractor->{$method}(...$arguments); ...
php
private function extract(string $method, array $arguments) { try { $serializedArguments = serialize($arguments); } catch (\Exception $exception) { // If arguments are not serializable, skip the cache return $this->propertyInfoExtractor->{$method}(...$arguments); ...
[ "private", "function", "extract", "(", "string", "$", "method", ",", "array", "$", "arguments", ")", "{", "try", "{", "$", "serializedArguments", "=", "serialize", "(", "$", "arguments", ")", ";", "}", "catch", "(", "\\", "Exception", "$", "exception", "...
Retrieves the cached data if applicable or delegates to the decorated extractor. @return mixed
[ "Retrieves", "the", "cached", "data", "if", "applicable", "or", "delegates", "to", "the", "decorated", "extractor", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/PropertyInfo/PropertyInfoCacheExtractor.php#L103-L142
207,073
symfony/symfony
src/Symfony/Component/Ldap/Ldap.php
Ldap.create
public static function create($adapter, array $config = []): self { if (!isset(self::$adapterMap[$adapter])) { throw new DriverNotFoundException(sprintf( 'Adapter "%s" not found. You should use one of: %s', $adapter, implode(', ', self::$adapterMap...
php
public static function create($adapter, array $config = []): self { if (!isset(self::$adapterMap[$adapter])) { throw new DriverNotFoundException(sprintf( 'Adapter "%s" not found. You should use one of: %s', $adapter, implode(', ', self::$adapterMap...
[ "public", "static", "function", "create", "(", "$", "adapter", ",", "array", "$", "config", "=", "[", "]", ")", ":", "self", "{", "if", "(", "!", "isset", "(", "self", "::", "$", "adapterMap", "[", "$", "adapter", "]", ")", ")", "{", "throw", "ne...
Creates a new Ldap instance. @param string $adapter The adapter name @param array $config The adapter's configuration @return static
[ "Creates", "a", "new", "Ldap", "instance", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Ldap/Ldap.php#L73-L86
207,074
symfony/symfony
src/Symfony/Component/Process/Pipes/AbstractPipes.php
AbstractPipes.hasSystemCallBeenInterrupted
protected function hasSystemCallBeenInterrupted() { $lastError = $this->lastError; $this->lastError = null; // stream_select returns false when the `select` system call is interrupted by an incoming signal return null !== $lastError && false !== stripos($lastError, 'interrupted syst...
php
protected function hasSystemCallBeenInterrupted() { $lastError = $this->lastError; $this->lastError = null; // stream_select returns false when the `select` system call is interrupted by an incoming signal return null !== $lastError && false !== stripos($lastError, 'interrupted syst...
[ "protected", "function", "hasSystemCallBeenInterrupted", "(", ")", "{", "$", "lastError", "=", "$", "this", "->", "lastError", ";", "$", "this", "->", "lastError", "=", "null", ";", "// stream_select returns false when the `select` system call is interrupted by an incoming ...
Returns true if a system call has been interrupted. @return bool
[ "Returns", "true", "if", "a", "system", "call", "has", "been", "interrupted", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Process/Pipes/AbstractPipes.php#L60-L67
207,075
symfony/symfony
src/Symfony/Component/Routing/Loader/AnnotationClassLoader.php
AnnotationClassLoader.load
public function load($class, $type = null) { if (!class_exists($class)) { throw new \InvalidArgumentException(sprintf('Class "%s" does not exist.', $class)); } $class = new \ReflectionClass($class); if ($class->isAbstract()) { throw new \InvalidArgumentExcept...
php
public function load($class, $type = null) { if (!class_exists($class)) { throw new \InvalidArgumentException(sprintf('Class "%s" does not exist.', $class)); } $class = new \ReflectionClass($class); if ($class->isAbstract()) { throw new \InvalidArgumentExcept...
[ "public", "function", "load", "(", "$", "class", ",", "$", "type", "=", "null", ")", "{", "if", "(", "!", "class_exists", "(", "$", "class", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "sprintf", "(", "'Class \"%s\" does not exist...
Loads from annotations from a class. @param string $class A class name @param string|null $type The resource type @return RouteCollection A RouteCollection instance @throws \InvalidArgumentException When route can't be parsed
[ "Loads", "from", "annotations", "from", "a", "class", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Routing/Loader/AnnotationClassLoader.php#L97-L132
207,076
symfony/symfony
src/Symfony/Component/Routing/Loader/AnnotationClassLoader.php
AnnotationClassLoader.getDefaultRouteName
protected function getDefaultRouteName(\ReflectionClass $class, \ReflectionMethod $method) { $name = strtolower(str_replace('\\', '_', $class->name).'_'.$method->name); if ($this->defaultRouteIndex > 0) { $name .= '_'.$this->defaultRouteIndex; } ++$this->defaultRouteIndex...
php
protected function getDefaultRouteName(\ReflectionClass $class, \ReflectionMethod $method) { $name = strtolower(str_replace('\\', '_', $class->name).'_'.$method->name); if ($this->defaultRouteIndex > 0) { $name .= '_'.$this->defaultRouteIndex; } ++$this->defaultRouteIndex...
[ "protected", "function", "getDefaultRouteName", "(", "\\", "ReflectionClass", "$", "class", ",", "\\", "ReflectionMethod", "$", "method", ")", "{", "$", "name", "=", "strtolower", "(", "str_replace", "(", "'\\\\'", ",", "'_'", ",", "$", "class", "->", "name"...
Gets the default route name for a class method. @param \ReflectionClass $class @param \ReflectionMethod $method @return string
[ "Gets", "the", "default", "route", "name", "for", "a", "class", "method", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Routing/Loader/AnnotationClassLoader.php#L249-L258
207,077
symfony/symfony
src/Symfony/Component/VarDumper/Cloner/Data.php
Data.dump
public function dump(DumperInterface $dumper) { $refs = [0]; $this->dumpItem($dumper, new Cursor(), $refs, $this->data[$this->position][$this->key]); }
php
public function dump(DumperInterface $dumper) { $refs = [0]; $this->dumpItem($dumper, new Cursor(), $refs, $this->data[$this->position][$this->key]); }
[ "public", "function", "dump", "(", "DumperInterface", "$", "dumper", ")", "{", "$", "refs", "=", "[", "0", "]", ";", "$", "this", "->", "dumpItem", "(", "$", "dumper", ",", "new", "Cursor", "(", ")", ",", "$", "refs", ",", "$", "this", "->", "dat...
Dumps data with a DumperInterface dumper.
[ "Dumps", "data", "with", "a", "DumperInterface", "dumper", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/VarDumper/Cloner/Data.php#L262-L266
207,078
symfony/symfony
src/Symfony/Component/VarDumper/Cloner/Data.php
Data.dumpChildren
private function dumpChildren($dumper, $parentCursor, &$refs, $children, $hashCut, $hashType, $dumpKeys) { $cursor = clone $parentCursor; ++$cursor->depth; $cursor->hashType = $hashType; $cursor->hashIndex = 0; $cursor->hashLength = \count($children); $cursor->hashCut...
php
private function dumpChildren($dumper, $parentCursor, &$refs, $children, $hashCut, $hashType, $dumpKeys) { $cursor = clone $parentCursor; ++$cursor->depth; $cursor->hashType = $hashType; $cursor->hashIndex = 0; $cursor->hashLength = \count($children); $cursor->hashCut...
[ "private", "function", "dumpChildren", "(", "$", "dumper", ",", "$", "parentCursor", ",", "&", "$", "refs", ",", "$", "children", ",", "$", "hashCut", ",", "$", "hashType", ",", "$", "dumpKeys", ")", "{", "$", "cursor", "=", "clone", "$", "parentCursor...
Dumps children of hash structures. @param DumperInterface $dumper @param Cursor $parentCursor The cursor of the parent hash @param array &$refs A map of all references discovered while dumping @param array $children The children to dump @param int $hashCut The n...
[ "Dumps", "children", "of", "hash", "structures", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/VarDumper/Cloner/Data.php#L384-L404
207,079
symfony/symfony
src/Symfony/Component/DependencyInjection/Definition.php
Definition.removeMethodCall
public function removeMethodCall($method) { foreach ($this->calls as $i => $call) { if ($call[0] === $method) { unset($this->calls[$i]); break; } } return $this; }
php
public function removeMethodCall($method) { foreach ($this->calls as $i => $call) { if ($call[0] === $method) { unset($this->calls[$i]); break; } } return $this; }
[ "public", "function", "removeMethodCall", "(", "$", "method", ")", "{", "foreach", "(", "$", "this", "->", "calls", "as", "$", "i", "=>", "$", "call", ")", "{", "if", "(", "$", "call", "[", "0", "]", "===", "$", "method", ")", "{", "unset", "(", ...
Removes a method to call after service initialization. @param string $method The method name to remove @return $this
[ "Removes", "a", "method", "to", "call", "after", "service", "initialization", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/Definition.php#L369-L379
207,080
symfony/symfony
src/Symfony/Component/DependencyInjection/Definition.php
Definition.hasMethodCall
public function hasMethodCall($method) { foreach ($this->calls as $call) { if ($call[0] === $method) { return true; } } return false; }
php
public function hasMethodCall($method) { foreach ($this->calls as $call) { if ($call[0] === $method) { return true; } } return false; }
[ "public", "function", "hasMethodCall", "(", "$", "method", ")", "{", "foreach", "(", "$", "this", "->", "calls", "as", "$", "call", ")", "{", "if", "(", "$", "call", "[", "0", "]", "===", "$", "method", ")", "{", "return", "true", ";", "}", "}", ...
Check if the current definition has a given method to call after service initialization. @param string $method The method name to search for @return bool
[ "Check", "if", "the", "current", "definition", "has", "a", "given", "method", "to", "call", "after", "service", "initialization", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/Definition.php#L388-L397
207,081
symfony/symfony
src/Symfony/Component/DependencyInjection/Definition.php
Definition.setShared
public function setShared($shared) { $this->changes['shared'] = true; $this->shared = (bool) $shared; return $this; }
php
public function setShared($shared) { $this->changes['shared'] = true; $this->shared = (bool) $shared; return $this; }
[ "public", "function", "setShared", "(", "$", "shared", ")", "{", "$", "this", "->", "changes", "[", "'shared'", "]", "=", "true", ";", "$", "this", "->", "shared", "=", "(", "bool", ")", "$", "shared", ";", "return", "$", "this", ";", "}" ]
Sets if the service must be shared or not. @param bool $shared Whether the service must be shared or not @return $this
[ "Sets", "if", "the", "service", "must", "be", "shared", "or", "not", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/Definition.php#L577-L584
207,082
symfony/symfony
src/Symfony/Component/DependencyInjection/Definition.php
Definition.setPublic
public function setPublic($boolean) { $this->changes['public'] = true; $this->public = (bool) $boolean; $this->private = false; return $this; }
php
public function setPublic($boolean) { $this->changes['public'] = true; $this->public = (bool) $boolean; $this->private = false; return $this; }
[ "public", "function", "setPublic", "(", "$", "boolean", ")", "{", "$", "this", "->", "changes", "[", "'public'", "]", "=", "true", ";", "$", "this", "->", "public", "=", "(", "bool", ")", "$", "boolean", ";", "$", "this", "->", "private", "=", "fal...
Sets the visibility of this service. @param bool $boolean @return $this
[ "Sets", "the", "visibility", "of", "this", "service", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/Definition.php#L603-L611
207,083
symfony/symfony
src/Symfony/Component/DependencyInjection/Definition.php
Definition.setDeprecated
public function setDeprecated($status = true, $template = null) { if (null !== $template) { if (preg_match('#[\r\n]|\*/#', $template)) { throw new InvalidArgumentException('Invalid characters found in deprecation template.'); } if (false === strpos($templ...
php
public function setDeprecated($status = true, $template = null) { if (null !== $template) { if (preg_match('#[\r\n]|\*/#', $template)) { throw new InvalidArgumentException('Invalid characters found in deprecation template.'); } if (false === strpos($templ...
[ "public", "function", "setDeprecated", "(", "$", "status", "=", "true", ",", "$", "template", "=", "null", ")", "{", "if", "(", "null", "!==", "$", "template", ")", "{", "if", "(", "preg_match", "(", "'#[\\r\\n]|\\*/#'", ",", "$", "template", ")", ")",...
Whether this definition is deprecated, that means it should not be called anymore. @param bool $status @param string $template Template message to use if the definition is deprecated @return $this @throws InvalidArgumentException when the message template is invalid
[ "Whether", "this", "definition", "is", "deprecated", "that", "means", "it", "should", "not", "be", "called", "anymore", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/Definition.php#L741-L760
207,084
symfony/symfony
src/Symfony/Component/DependencyInjection/Definition.php
Definition.addError
public function addError($error) { if ($error instanceof self) { $this->errors = array_merge($this->errors, $error->errors); } else { $this->errors[] = $error; } return $this; }
php
public function addError($error) { if ($error instanceof self) { $this->errors = array_merge($this->errors, $error->errors); } else { $this->errors[] = $error; } return $this; }
[ "public", "function", "addError", "(", "$", "error", ")", "{", "if", "(", "$", "error", "instanceof", "self", ")", "{", "$", "this", "->", "errors", "=", "array_merge", "(", "$", "this", "->", "errors", ",", "$", "error", "->", "errors", ")", ";", ...
Add an error that occurred when building this Definition. @param string|\Closure|self $error @return $this
[ "Add", "an", "error", "that", "occurred", "when", "building", "this", "Definition", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/Definition.php#L888-L897
207,085
symfony/symfony
src/Symfony/Component/DependencyInjection/Definition.php
Definition.getErrors
public function getErrors() { foreach ($this->errors as $i => $error) { if ($error instanceof \Closure) { $this->errors[$i] = (string) $error(); } elseif (!\is_string($error)) { $this->errors[$i] = (string) $error; } } retu...
php
public function getErrors() { foreach ($this->errors as $i => $error) { if ($error instanceof \Closure) { $this->errors[$i] = (string) $error(); } elseif (!\is_string($error)) { $this->errors[$i] = (string) $error; } } retu...
[ "public", "function", "getErrors", "(", ")", "{", "foreach", "(", "$", "this", "->", "errors", "as", "$", "i", "=>", "$", "error", ")", "{", "if", "(", "$", "error", "instanceof", "\\", "Closure", ")", "{", "$", "this", "->", "errors", "[", "$", ...
Returns any errors that occurred while building this Definition. @return array
[ "Returns", "any", "errors", "that", "occurred", "while", "building", "this", "Definition", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/Definition.php#L904-L915
207,086
symfony/symfony
src/Symfony/Bundle/WebProfilerBundle/Controller/RouterController.php
RouterController.getTraces
private function getTraces(RequestDataCollector $request, string $method): array { $traceRequest = Request::create( $request->getPathInfo(), $request->getRequestServer(true)->get('REQUEST_METHOD'), [], $request->getRequestCookies(true)->all(), [], ...
php
private function getTraces(RequestDataCollector $request, string $method): array { $traceRequest = Request::create( $request->getPathInfo(), $request->getRequestServer(true)->get('REQUEST_METHOD'), [], $request->getRequestCookies(true)->all(), [], ...
[ "private", "function", "getTraces", "(", "RequestDataCollector", "$", "request", ",", "string", "$", "method", ")", ":", "array", "{", "$", "traceRequest", "=", "Request", "::", "create", "(", "$", "request", "->", "getPathInfo", "(", ")", ",", "$", "reque...
Returns the routing traces associated to the given request.
[ "Returns", "the", "routing", "traces", "associated", "to", "the", "given", "request", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/WebProfilerBundle/Controller/RouterController.php#L81-L97
207,087
symfony/symfony
src/Symfony/Component/Translation/Loader/IcuResFileLoader.php
IcuResFileLoader.flatten
protected function flatten(\ResourceBundle $rb, array &$messages = [], $path = null) { foreach ($rb as $key => $value) { $nodePath = $path ? $path.'.'.$key : $key; if ($value instanceof \ResourceBundle) { $this->flatten($value, $messages, $nodePath); } els...
php
protected function flatten(\ResourceBundle $rb, array &$messages = [], $path = null) { foreach ($rb as $key => $value) { $nodePath = $path ? $path.'.'.$key : $key; if ($value instanceof \ResourceBundle) { $this->flatten($value, $messages, $nodePath); } els...
[ "protected", "function", "flatten", "(", "\\", "ResourceBundle", "$", "rb", ",", "array", "&", "$", "messages", "=", "[", "]", ",", "$", "path", "=", "null", ")", "{", "foreach", "(", "$", "rb", "as", "$", "key", "=>", "$", "value", ")", "{", "$"...
Flattens an ResourceBundle. The scheme used is: key { key2 { key3 { "value" } } } Becomes: 'key.key2.key3' => 'value' This function takes an array by reference and will modify it @param \ResourceBundle $rb The ResourceBundle that will be flattened @param array $messages Used internally for recursive ...
[ "Flattens", "an", "ResourceBundle", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Translation/Loader/IcuResFileLoader.php#L78-L90
207,088
symfony/symfony
src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToTimestampTransformer.php
DateTimeToTimestampTransformer.reverseTransform
public function reverseTransform($value) { if (null === $value) { return; } if (!is_numeric($value)) { throw new TransformationFailedException('Expected a numeric.'); } try { $dateTime = new \DateTime(); $dateTime->setTimezone...
php
public function reverseTransform($value) { if (null === $value) { return; } if (!is_numeric($value)) { throw new TransformationFailedException('Expected a numeric.'); } try { $dateTime = new \DateTime(); $dateTime->setTimezone...
[ "public", "function", "reverseTransform", "(", "$", "value", ")", "{", "if", "(", "null", "===", "$", "value", ")", "{", "return", ";", "}", "if", "(", "!", "is_numeric", "(", "$", "value", ")", ")", "{", "throw", "new", "TransformationFailedException", ...
Transforms a timestamp in the configured timezone into a DateTime object. @param string $value A timestamp @return \DateTime A \DateTime object @throws TransformationFailedException If the given value is not a timestamp or if the given timestamp is invalid
[ "Transforms", "a", "timestamp", "in", "the", "configured", "timezone", "into", "a", "DateTime", "object", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToTimestampTransformer.php#L56-L79
207,089
symfony/symfony
src/Symfony/Component/Intl/Globals/IntlGlobals.php
IntlGlobals.setError
public static function setError($code, $message = '') { if (!isset(self::$errorCodes[$code])) { throw new \InvalidArgumentException(sprintf('No such error code: "%s"', $code)); } self::$errorMessage = $message ? sprintf('%s: %s', $message, self::$errorCodes[$code]) : self::$erro...
php
public static function setError($code, $message = '') { if (!isset(self::$errorCodes[$code])) { throw new \InvalidArgumentException(sprintf('No such error code: "%s"', $code)); } self::$errorMessage = $message ? sprintf('%s: %s', $message, self::$errorCodes[$code]) : self::$erro...
[ "public", "static", "function", "setError", "(", "$", "code", ",", "$", "message", "=", "''", ")", "{", "if", "(", "!", "isset", "(", "self", "::", "$", "errorCodes", "[", "$", "code", "]", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentExcepti...
Sets the current error. @param int $code One of the error constants in this class @param string $message The ICU class error message @throws \InvalidArgumentException If the code is not one of the error constants in this class
[ "Sets", "the", "current", "error", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Intl/Globals/IntlGlobals.php#L114-L122
207,090
symfony/symfony
src/Symfony/Component/Security/Core/Authorization/TraceableAccessDecisionManager.php
TraceableAccessDecisionManager.addVoterVote
public function addVoterVote(VoterInterface $voter, array $attributes, int $vote) { $currentLogIndex = \count($this->currentLog) - 1; $this->currentLog[$currentLogIndex]['voterDetails'][] = [ 'voter' => $voter, 'attributes' => $attributes, 'vote' => $vote, ...
php
public function addVoterVote(VoterInterface $voter, array $attributes, int $vote) { $currentLogIndex = \count($this->currentLog) - 1; $this->currentLog[$currentLogIndex]['voterDetails'][] = [ 'voter' => $voter, 'attributes' => $attributes, 'vote' => $vote, ...
[ "public", "function", "addVoterVote", "(", "VoterInterface", "$", "voter", ",", "array", "$", "attributes", ",", "int", "$", "vote", ")", "{", "$", "currentLogIndex", "=", "\\", "count", "(", "$", "this", "->", "currentLog", ")", "-", "1", ";", "$", "t...
Adds voter vote and class to the voter details. @param VoterInterface $voter voter @param array $attributes attributes used for the vote @param int $vote vote of the voter
[ "Adds", "voter", "vote", "and", "class", "to", "the", "voter", "details", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Security/Core/Authorization/TraceableAccessDecisionManager.php#L77-L85
207,091
symfony/symfony
src/Symfony/Component/Translation/Loader/MoFileLoader.php
MoFileLoader.readLong
private function readLong($stream, bool $isBigEndian): int { $result = unpack($isBigEndian ? 'N1' : 'V1', fread($stream, 4)); $result = current($result); return (int) substr($result, -8); }
php
private function readLong($stream, bool $isBigEndian): int { $result = unpack($isBigEndian ? 'N1' : 'V1', fread($stream, 4)); $result = current($result); return (int) substr($result, -8); }
[ "private", "function", "readLong", "(", "$", "stream", ",", "bool", "$", "isBigEndian", ")", ":", "int", "{", "$", "result", "=", "unpack", "(", "$", "isBigEndian", "?", "'N1'", ":", "'V1'", ",", "fread", "(", "$", "stream", ",", "4", ")", ")", ";"...
Reads an unsigned long from stream respecting endianness. @param resource $stream
[ "Reads", "an", "unsigned", "long", "from", "stream", "respecting", "endianness", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Translation/Loader/MoFileLoader.php#L138-L144
207,092
symfony/symfony
src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php
SwitchUserListener.attemptSwitchUser
private function attemptSwitchUser(Request $request, $username) { $token = $this->tokenStorage->getToken(); $originalToken = $this->getOriginalToken($token); if (null !== $originalToken) { if ($token->getUsername() === $username) { return $token; } ...
php
private function attemptSwitchUser(Request $request, $username) { $token = $this->tokenStorage->getToken(); $originalToken = $this->getOriginalToken($token); if (null !== $originalToken) { if ($token->getUsername() === $username) { return $token; } ...
[ "private", "function", "attemptSwitchUser", "(", "Request", "$", "request", ",", "$", "username", ")", "{", "$", "token", "=", "$", "this", "->", "tokenStorage", "->", "getToken", "(", ")", ";", "$", "originalToken", "=", "$", "this", "->", "getOriginalTok...
Attempts to switch to another user. @param Request $request A Request instance @param string $username @return TokenInterface|null The new TokenInterface if successfully switched, null otherwise @throws \LogicException @throws AccessDeniedException
[ "Attempts", "to", "switch", "to", "another", "user", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php#L125-L166
207,093
symfony/symfony
src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php
SwitchUserListener.attemptExitUser
private function attemptExitUser(Request $request) { if (null === ($currentToken = $this->tokenStorage->getToken()) || null === $original = $this->getOriginalToken($currentToken)) { throw new AuthenticationCredentialsNotFoundException('Could not find original Token object.'); } ...
php
private function attemptExitUser(Request $request) { if (null === ($currentToken = $this->tokenStorage->getToken()) || null === $original = $this->getOriginalToken($currentToken)) { throw new AuthenticationCredentialsNotFoundException('Could not find original Token object.'); } ...
[ "private", "function", "attemptExitUser", "(", "Request", "$", "request", ")", "{", "if", "(", "null", "===", "(", "$", "currentToken", "=", "$", "this", "->", "tokenStorage", "->", "getToken", "(", ")", ")", "||", "null", "===", "$", "original", "=", ...
Attempts to exit from an already switched user. @return TokenInterface The original TokenInterface instance @throws AuthenticationCredentialsNotFoundException
[ "Attempts", "to", "exit", "from", "an", "already", "switched", "user", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php#L175-L189
207,094
symfony/symfony
src/Symfony/Component/Routing/RouteCollectionBuilder.php
RouteCollectionBuilder.import
public function import($resource, $prefix = '/', $type = null) { /** @var RouteCollection[] $collections */ $collections = $this->load($resource, $type); // create a builder from the RouteCollection $builder = $this->createBuilder(); foreach ($collections as $collection) { ...
php
public function import($resource, $prefix = '/', $type = null) { /** @var RouteCollection[] $collections */ $collections = $this->load($resource, $type); // create a builder from the RouteCollection $builder = $this->createBuilder(); foreach ($collections as $collection) { ...
[ "public", "function", "import", "(", "$", "resource", ",", "$", "prefix", "=", "'/'", ",", "$", "type", "=", "null", ")", "{", "/** @var RouteCollection[] $collections */", "$", "collections", "=", "$", "this", "->", "load", "(", "$", "resource", ",", "$",...
Import an external routing resource and returns the RouteCollectionBuilder. $routes->import('blog.yml', '/blog'); @param mixed $resource @param string|null $prefix @param string $type @return self @throws LoaderLoadException
[ "Import", "an", "external", "routing", "resource", "and", "returns", "the", "RouteCollectionBuilder", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Routing/RouteCollectionBuilder.php#L59-L85
207,095
symfony/symfony
src/Symfony/Component/Routing/RouteCollectionBuilder.php
RouteCollectionBuilder.add
public function add($path, $controller, $name = null) { $route = new Route($path); $route->setDefault('_controller', $controller); $this->addRoute($route, $name); return $route; }
php
public function add($path, $controller, $name = null) { $route = new Route($path); $route->setDefault('_controller', $controller); $this->addRoute($route, $name); return $route; }
[ "public", "function", "add", "(", "$", "path", ",", "$", "controller", ",", "$", "name", "=", "null", ")", "{", "$", "route", "=", "new", "Route", "(", "$", "path", ")", ";", "$", "route", "->", "setDefault", "(", "'_controller'", ",", "$", "contro...
Adds a route and returns it for future modification. @param string $path The route path @param string $controller The route's controller @param string|null $name The name to give this route @return Route
[ "Adds", "a", "route", "and", "returns", "it", "for", "future", "modification", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Routing/RouteCollectionBuilder.php#L96-L103
207,096
symfony/symfony
src/Symfony/Component/Routing/RouteCollectionBuilder.php
RouteCollectionBuilder.mount
public function mount($prefix, self $builder) { $builder->prefix = trim(trim($prefix), '/'); $this->routes[] = $builder; }
php
public function mount($prefix, self $builder) { $builder->prefix = trim(trim($prefix), '/'); $this->routes[] = $builder; }
[ "public", "function", "mount", "(", "$", "prefix", ",", "self", "$", "builder", ")", "{", "$", "builder", "->", "prefix", "=", "trim", "(", "trim", "(", "$", "prefix", ")", ",", "'/'", ")", ";", "$", "this", "->", "routes", "[", "]", "=", "$", ...
Add a RouteCollectionBuilder. @param string $prefix @param RouteCollectionBuilder $builder
[ "Add", "a", "RouteCollectionBuilder", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Routing/RouteCollectionBuilder.php#L121-L125
207,097
symfony/symfony
src/Symfony/Component/Routing/RouteCollectionBuilder.php
RouteCollectionBuilder.addRoute
public function addRoute(Route $route, $name = null) { if (null === $name) { // used as a flag to know which routes will need a name later $name = '_unnamed_route_'.spl_object_hash($route); } $this->routes[$name] = $route; return $this; }
php
public function addRoute(Route $route, $name = null) { if (null === $name) { // used as a flag to know which routes will need a name later $name = '_unnamed_route_'.spl_object_hash($route); } $this->routes[$name] = $route; return $this; }
[ "public", "function", "addRoute", "(", "Route", "$", "route", ",", "$", "name", "=", "null", ")", "{", "if", "(", "null", "===", "$", "name", ")", "{", "// used as a flag to know which routes will need a name later", "$", "name", "=", "'_unnamed_route_'", ".", ...
Adds a Route object to the builder. @param Route $route @param string|null $name @return $this
[ "Adds", "a", "Route", "object", "to", "the", "builder", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Routing/RouteCollectionBuilder.php#L135-L145
207,098
symfony/symfony
src/Symfony/Component/Routing/RouteCollectionBuilder.php
RouteCollectionBuilder.build
public function build() { $routeCollection = new RouteCollection(); foreach ($this->routes as $name => $route) { if ($route instanceof Route) { $route->setDefaults(array_merge($this->defaults, $route->getDefaults())); $route->setOptions(array_merge($this-...
php
public function build() { $routeCollection = new RouteCollection(); foreach ($this->routes as $name => $route) { if ($route instanceof Route) { $route->setDefaults(array_merge($this->defaults, $route->getDefaults())); $route->setOptions(array_merge($this-...
[ "public", "function", "build", "(", ")", "{", "$", "routeCollection", "=", "new", "RouteCollection", "(", ")", ";", "foreach", "(", "$", "this", "->", "routes", "as", "$", "name", "=>", "$", "route", ")", "{", "if", "(", "$", "route", "instanceof", "...
Creates the final RouteCollection and returns it. @return RouteCollection
[ "Creates", "the", "final", "RouteCollection", "and", "returns", "it", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Routing/RouteCollectionBuilder.php#L268-L323
207,099
symfony/symfony
src/Symfony/Component/Routing/RouteCollectionBuilder.php
RouteCollectionBuilder.generateRouteName
private function generateRouteName(Route $route): string { $methods = implode('_', $route->getMethods()).'_'; $routeName = $methods.$route->getPath(); $routeName = str_replace(['/', ':', '|', '-'], '_', $routeName); $routeName = preg_replace('/[^a-z0-9A-Z_.]+/', '', $routeName); ...
php
private function generateRouteName(Route $route): string { $methods = implode('_', $route->getMethods()).'_'; $routeName = $methods.$route->getPath(); $routeName = str_replace(['/', ':', '|', '-'], '_', $routeName); $routeName = preg_replace('/[^a-z0-9A-Z_.]+/', '', $routeName); ...
[ "private", "function", "generateRouteName", "(", "Route", "$", "route", ")", ":", "string", "{", "$", "methods", "=", "implode", "(", "'_'", ",", "$", "route", "->", "getMethods", "(", ")", ")", ".", "'_'", ";", "$", "routeName", "=", "$", "methods", ...
Generates a route name based on details of this route.
[ "Generates", "a", "route", "name", "based", "on", "details", "of", "this", "route", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Routing/RouteCollectionBuilder.php#L328-L340