repo
stringclasses
21 values
path
stringlengths
10
105
func_name
stringlengths
6
64
original_string
stringlengths
105
15.6k
language
stringclasses
1 value
code
stringlengths
105
15.6k
code_tokens
listlengths
29
2.15k
docstring
stringlengths
11
2.85k
docstring_tokens
listlengths
1
290
sha
stringclasses
21 values
url
stringlengths
100
194
partition
stringclasses
1 value
summary
stringlengths
8
319
input_ids
listlengths
502
502
token_type_ids
listlengths
502
502
attention_mask
listlengths
502
502
labels
listlengths
502
502
symfony/symfony
src/Symfony/Component/Security/Core/User/InMemoryUserProvider.php
InMemoryUserProvider.refreshUser
public function refreshUser(UserInterface $user) { if (!$user instanceof User) { throw new UnsupportedUserException(sprintf('Instances of "%s" are not supported.', \get_class($user))); } $storedUser = $this->getUser($user->getUsername()); return new User($storedUser->ge...
php
public function refreshUser(UserInterface $user) { if (!$user instanceof User) { throw new UnsupportedUserException(sprintf('Instances of "%s" are not supported.', \get_class($user))); } $storedUser = $this->getUser($user->getUsername()); return new User($storedUser->ge...
[ "public", "function", "refreshUser", "(", "UserInterface", "$", "user", ")", "{", "if", "(", "!", "$", "user", "instanceof", "User", ")", "{", "throw", "new", "UnsupportedUserException", "(", "sprintf", "(", "'Instances of \"%s\" are not supported.'", ",", "\\", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Security/Core/User/InMemoryUserProvider.php#L74-L83
train
Refreshes a user
[ 30522, 2270, 3853, 25416, 21898, 20330, 1006, 5310, 18447, 2121, 12172, 1002, 5310, 1007, 1063, 2065, 1006, 999, 1002, 5310, 6013, 11253, 5310, 1007, 1063, 5466, 2047, 4895, 6342, 9397, 15613, 20330, 10288, 24422, 1006, 9043, 2546, 1006, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpClient/Response/MockResponse.php
MockResponse.perform
protected static function perform(ClientState $multi, array &$responses): void { foreach ($responses as $response) { $id = $response->id; if (!$response->body) { // Last chunk $multi->handlesActivity[$id][] = null; $multi->handlesActiv...
php
protected static function perform(ClientState $multi, array &$responses): void { foreach ($responses as $response) { $id = $response->id; if (!$response->body) { // Last chunk $multi->handlesActivity[$id][] = null; $multi->handlesActiv...
[ "protected", "static", "function", "perform", "(", "ClientState", "$", "multi", ",", "array", "&", "$", "responses", ")", ":", "void", "{", "foreach", "(", "$", "responses", "as", "$", "response", ")", "{", "$", "id", "=", "$", "response", "->", "id", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpClient/Response/MockResponse.php#L146-L181
train
Perform processing of activity responses
[ 30522, 5123, 10763, 3853, 4685, 1006, 7846, 12259, 1002, 4800, 1010, 9140, 1004, 1002, 10960, 1007, 1024, 11675, 1063, 18921, 6776, 1006, 1002, 10960, 2004, 1002, 3433, 1007, 1063, 1002, 8909, 1027, 1002, 3433, 1011, 1028, 8909, 1025, 2065,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Uri.php
Uri.post
public function post($element = null, $filter_type = null) { if (!$this->post) { $content_type = $this->getContentType(); if ($content_type === 'application/json') { $json = file_get_contents('php://input'); $this->post = json_decode($json, true); ...
php
public function post($element = null, $filter_type = null) { if (!$this->post) { $content_type = $this->getContentType(); if ($content_type === 'application/json') { $json = file_get_contents('php://input'); $this->post = json_decode($json, true); ...
[ "public", "function", "post", "(", "$", "element", "=", "null", ",", "$", "filter_type", "=", "null", ")", "{", "if", "(", "!", "$", "this", "->", "post", ")", "{", "$", "content_type", "=", "$", "this", "->", "getContentType", "(", ")", ";", "if",...
Get's post from either $_POST or JSON response object By default returns all data, or can return a single item @param string $element @param string $filter_type @return array|mixed|null
[ "Get", "s", "post", "from", "either", "$_POST", "or", "JSON", "response", "object", "By", "default", "returns", "all", "data", "or", "can", "return", "a", "single", "item" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Uri.php#L1296-L1320
train
POST - Method
[ 30522, 2270, 3853, 2695, 1006, 1002, 5783, 1027, 19701, 1010, 1002, 11307, 1035, 2828, 1027, 19701, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 2695, 1007, 1063, 1002, 4180, 1035, 2828, 1027, 1002, 2023, 1011, 1028, 2131, 8663, 6...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Foundation/Console/AppNameCommand.php
AppNameCommand.setBootstrapNamespaces
protected function setBootstrapNamespaces() { $search = [ $this->currentRoot.'\\Http', $this->currentRoot.'\\Console', $this->currentRoot.'\\Exceptions', ]; $replace = [ $this->argument('name').'\\Http', $this->argument('name').'\\...
php
protected function setBootstrapNamespaces() { $search = [ $this->currentRoot.'\\Http', $this->currentRoot.'\\Console', $this->currentRoot.'\\Exceptions', ]; $replace = [ $this->argument('name').'\\Http', $this->argument('name').'\\...
[ "protected", "function", "setBootstrapNamespaces", "(", ")", "{", "$", "search", "=", "[", "$", "this", "->", "currentRoot", ".", "'\\\\Http'", ",", "$", "this", "->", "currentRoot", ".", "'\\\\Console'", ",", "$", "this", "->", "currentRoot", ".", "'\\\\Exc...
Set the bootstrap namespaces. @return void
[ "Set", "the", "bootstrap", "namespaces", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Console/AppNameCommand.php#L128-L143
train
Set the namespaces in the bootstrap file.
[ 30522, 5123, 3853, 2275, 27927, 20528, 2361, 18442, 23058, 2015, 1006, 1007, 1063, 1002, 3945, 1027, 1031, 1002, 2023, 1011, 1028, 2783, 3217, 4140, 1012, 1005, 1032, 1032, 8299, 1005, 1010, 1002, 2023, 1011, 1028, 2783, 3217, 4140, 1012, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Cache/Simple/PhpArrayCache.php
PhpArrayCache.getMultiple
public function getMultiple($keys, $default = null) { if ($keys instanceof \Traversable) { $keys = iterator_to_array($keys, false); } elseif (!\is_array($keys)) { throw new InvalidArgumentException(sprintf('Cache keys must be array or Traversable, "%s" given', \is_object($key...
php
public function getMultiple($keys, $default = null) { if ($keys instanceof \Traversable) { $keys = iterator_to_array($keys, false); } elseif (!\is_array($keys)) { throw new InvalidArgumentException(sprintf('Cache keys must be array or Traversable, "%s" given', \is_object($key...
[ "public", "function", "getMultiple", "(", "$", "keys", ",", "$", "default", "=", "null", ")", "{", "if", "(", "$", "keys", "instanceof", "\\", "Traversable", ")", "{", "$", "keys", "=", "iterator_to_array", "(", "$", "keys", ",", "false", ")", ";", "...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Cache/Simple/PhpArrayCache.php#L91-L108
train
Get multiple items from cache
[ 30522, 2270, 3853, 2131, 12274, 7096, 11514, 2571, 1006, 1002, 6309, 1010, 1002, 12398, 1027, 19701, 1007, 1063, 2065, 1006, 1002, 6309, 6013, 11253, 1032, 29053, 3085, 1007, 1063, 1002, 6309, 1027, 30524, 1035, 9140, 1006, 1002, 6309, 1007...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Intl/Data/Provider/CurrencyDataProvider.php
CurrencyDataProvider.getFractionDigits
public function getFractionDigits($currency) { try { return $this->reader->readEntry($this->path, 'meta', ['Meta', $currency, static::INDEX_FRACTION_DIGITS]); } catch (MissingResourceException $e) { return $this->reader->readEntry($this->path, 'meta', ['Meta', 'DEFAULT', stat...
php
public function getFractionDigits($currency) { try { return $this->reader->readEntry($this->path, 'meta', ['Meta', $currency, static::INDEX_FRACTION_DIGITS]); } catch (MissingResourceException $e) { return $this->reader->readEntry($this->path, 'meta', ['Meta', 'DEFAULT', stat...
[ "public", "function", "getFractionDigits", "(", "$", "currency", ")", "{", "try", "{", "return", "$", "this", "->", "reader", "->", "readEntry", "(", "$", "this", "->", "path", ",", "'meta'", ",", "[", "'Meta'", ",", "$", "currency", ",", "static", "::...
Data provider for {@link \Symfony\Component\Intl\Currency::getFractionDigits()}.
[ "Data", "provider", "for", "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Intl/Data/Provider/CurrencyDataProvider.php#L106-L113
train
Get Number of Currency Fractions
[ 30522, 2270, 3853, 2131, 27843, 7542, 4305, 23806, 2015, 1006, 1002, 9598, 1007, 1063, 3046, 1063, 2709, 1002, 2023, 1011, 1028, 8068, 1011, 1028, 3191, 4765, 2854, 1006, 1002, 2023, 1011, 1028, 4130, 1010, 1005, 18804, 1005, 1010, 1031, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Serializer/Mapping/ClassMetadata.php
ClassMetadata.merge
public function merge(ClassMetadataInterface $classMetadata) { foreach ($classMetadata->getAttributesMetadata() as $attributeMetadata) { if (isset($this->attributesMetadata[$attributeMetadata->getName()])) { $this->attributesMetadata[$attributeMetadata->getName()]->merge($attribu...
php
public function merge(ClassMetadataInterface $classMetadata) { foreach ($classMetadata->getAttributesMetadata() as $attributeMetadata) { if (isset($this->attributesMetadata[$attributeMetadata->getName()])) { $this->attributesMetadata[$attributeMetadata->getName()]->merge($attribu...
[ "public", "function", "merge", "(", "ClassMetadataInterface", "$", "classMetadata", ")", "{", "foreach", "(", "$", "classMetadata", "->", "getAttributesMetadata", "(", ")", "as", "$", "attributeMetadata", ")", "{", "if", "(", "isset", "(", "$", "this", "->", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Serializer/Mapping/ClassMetadata.php#L90-L99
train
Merge the attributes of the passed class metadata into this one.
[ 30522, 2270, 3853, 13590, 1006, 2465, 11368, 8447, 18249, 3334, 12172, 1002, 2465, 11368, 8447, 2696, 1007, 1063, 18921, 6776, 1006, 1002, 2465, 11368, 8447, 2696, 1011, 1028, 2131, 19321, 3089, 8569, 4570, 11368, 8447, 2696, 1006, 1007, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Intl/Data/Util/LocaleScanner.php
LocaleScanner.scanAliases
public function scanAliases($sourceDir) { $locales = $this->scanLocales($sourceDir); $aliases = []; // Delete locales that are no aliases foreach ($locales as $locale) { $content = file_get_contents($sourceDir.'/'.$locale.'.txt'); // Aliases contain the text...
php
public function scanAliases($sourceDir) { $locales = $this->scanLocales($sourceDir); $aliases = []; // Delete locales that are no aliases foreach ($locales as $locale) { $content = file_get_contents($sourceDir.'/'.$locale.'.txt'); // Aliases contain the text...
[ "public", "function", "scanAliases", "(", "$", "sourceDir", ")", "{", "$", "locales", "=", "$", "this", "->", "scanLocales", "(", "$", "sourceDir", ")", ";", "$", "aliases", "=", "[", "]", ";", "// Delete locales that are no aliases", "foreach", "(", "$", ...
Returns all locale aliases found in the given directory. @param string $sourceDir The directory with ICU files @return array An array with the locale aliases as keys and the aliased locales as values
[ "Returns", "all", "locale", "aliases", "found", "in", "the", "given", "directory", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Intl/Data/Util/LocaleScanner.php#L68-L84
train
Scan aliases in the source directory
[ 30522, 2270, 3853, 13594, 22786, 8583, 1006, 1002, 23184, 4313, 1007, 1063, 1002, 2334, 2229, 1027, 1002, 2023, 1011, 1028, 13594, 4135, 9289, 2229, 1006, 1002, 23184, 4313, 1007, 1025, 1002, 14593, 2229, 1027, 1031, 1033, 1025, 1013, 1013,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Form/Form.php
Form.isValid
public function isValid() { if (!$this->submitted) { throw new LogicException('Cannot check if an unsubmitted form is valid. Call Form::isSubmitted() before Form::isValid().'); } if ($this->isDisabled()) { return true; } return 0 === \count($this->ge...
php
public function isValid() { if (!$this->submitted) { throw new LogicException('Cannot check if an unsubmitted form is valid. Call Form::isSubmitted() before Form::isValid().'); } if ($this->isDisabled()) { return true; } return 0 === \count($this->ge...
[ "public", "function", "isValid", "(", ")", "{", "if", "(", "!", "$", "this", "->", "submitted", ")", "{", "throw", "new", "LogicException", "(", "'Cannot check if an unsubmitted form is valid. Call Form::isSubmitted() before Form::isValid().'", ")", ";", "}", "if", "(...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/Form.php#L740-L751
train
Returns true if the form is valid.
[ 30522, 2270, 3853, 2003, 10175, 3593, 1006, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 7864, 1007, 1063, 5466, 2047, 7961, 10288, 24422, 1006, 1005, 3685, 4638, 2065, 2019, 4895, 6342, 25526, 27100, 2094, 2433, 2003, 9398, 1012, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Settings/Measurable/MeasurableSettings.php
MeasurableSettings.makeSetting
protected function makeSetting($name, $defaultValue, $type, $fieldConfigCallback) { $setting = new MeasurableSetting($name, $defaultValue, $type, $this->pluginName, $this->idSite); $setting->setConfigureCallback($fieldConfigCallback); $this->addSetting($setting); return $setting; ...
php
protected function makeSetting($name, $defaultValue, $type, $fieldConfigCallback) { $setting = new MeasurableSetting($name, $defaultValue, $type, $this->pluginName, $this->idSite); $setting->setConfigureCallback($fieldConfigCallback); $this->addSetting($setting); return $setting; ...
[ "protected", "function", "makeSetting", "(", "$", "name", ",", "$", "defaultValue", ",", "$", "type", ",", "$", "fieldConfigCallback", ")", "{", "$", "setting", "=", "new", "MeasurableSetting", "(", "$", "name", ",", "$", "defaultValue", ",", "$", "type", ...
Creates a new measurable setting. Settings will be displayed in the UI depending on the order of `makeSetting` calls. This means you can define the order of the displayed settings by calling makeSetting first for more important settings. @param string $name The name of the setting that shall be created @param...
[ "Creates", "a", "new", "measurable", "setting", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Settings/Measurable/MeasurableSettings.php#L89-L97
train
Create and add a new measurable setting
[ 30522, 5123, 3853, 3084, 18319, 3070, 1006, 1002, 2171, 1010, 1002, 12398, 10175, 5657, 1010, 1002, 2828, 1010, 1002, 2492, 8663, 8873, 18195, 8095, 5963, 1007, 1063, 1002, 4292, 1027, 2047, 2033, 28329, 21678, 2075, 1006, 1002, 2171, 1010,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Mime/Message.php
Zend_Mime_Message.getPartContent
public function getPartContent($partnum, $EOL = Zend_Mime::LINEEND) { return $this->_parts[$partnum]->getContent($EOL); }
php
public function getPartContent($partnum, $EOL = Zend_Mime::LINEEND) { return $this->_parts[$partnum]->getContent($EOL); }
[ "public", "function", "getPartContent", "(", "$", "partnum", ",", "$", "EOL", "=", "Zend_Mime", "::", "LINEEND", ")", "{", "return", "$", "this", "->", "_parts", "[", "$", "partnum", "]", "->", "getContent", "(", "$", "EOL", ")", ";", "}" ]
Get the (encoded) content of a given part as a string @param int $partnum @return string
[ "Get", "the", "(", "encoded", ")", "content", "of", "a", "given", "part", "as", "a", "string" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mime/Message.php#L188-L191
train
Returns the content of a part
[ 30522, 2270, 3853, 2131, 19362, 13535, 28040, 3372, 1006, 1002, 2112, 19172, 1010, 1002, 1041, 4747, 1027, 16729, 2094, 1035, 2771, 4168, 1024, 1024, 2240, 10497, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 1035, 3033, 1031, 1002, 2112, 19172...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Notifications/Channels/DatabaseChannel.php
DatabaseChannel.send
public function send($notifiable, Notification $notification) { return $notifiable->routeNotificationFor('database', $notification)->create( $this->buildPayload($notifiable, $notification) ); }
php
public function send($notifiable, Notification $notification) { return $notifiable->routeNotificationFor('database', $notification)->create( $this->buildPayload($notifiable, $notification) ); }
[ "public", "function", "send", "(", "$", "notifiable", ",", "Notification", "$", "notification", ")", "{", "return", "$", "notifiable", "->", "routeNotificationFor", "(", "'database'", ",", "$", "notification", ")", "->", "create", "(", "$", "this", "->", "bu...
Send the given notification. @param mixed $notifiable @param \Illuminate\Notifications\Notification $notification @return \Illuminate\Database\Eloquent\Model
[ "Send", "the", "given", "notification", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Notifications/Channels/DatabaseChannel.php#L17-L22
train
Send a notification to the database
[ 30522, 2270, 3853, 4604, 1006, 1002, 2025, 10128, 19210, 1010, 26828, 1002, 26828, 1007, 1063, 2709, 1002, 2025, 10128, 19210, 1011, 1028, 2799, 17048, 9031, 29278, 1006, 1005, 7809, 1005, 1010, 1002, 26828, 1007, 1011, 1028, 3443, 1006, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Console/ConsoleTrait.php
ConsoleTrait.setupConsole
public function setupConsole(InputInterface $input, OutputInterface $output) { // Initialize cache with CLI compatibility Grav::instance()['config']->set('system.cache.cli_compatibility', true); Grav::instance()['cache']; $this->argv = $_SERVER['argv'][0]; $this->input = $i...
php
public function setupConsole(InputInterface $input, OutputInterface $output) { // Initialize cache with CLI compatibility Grav::instance()['config']->set('system.cache.cli_compatibility', true); Grav::instance()['cache']; $this->argv = $_SERVER['argv'][0]; $this->input = $i...
[ "public", "function", "setupConsole", "(", "InputInterface", "$", "input", ",", "OutputInterface", "$", "output", ")", "{", "// Initialize cache with CLI compatibility", "Grav", "::", "instance", "(", ")", "[", "'config'", "]", "->", "set", "(", "'system.cache.cli_c...
Set colors style definition for the formatter. @param InputInterface $input @param OutputInterface $output
[ "Set", "colors", "style", "definition", "for", "the", "formatter", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Console/ConsoleTrait.php#L42-L59
train
Setup the console
[ 30522, 2270, 3853, 16437, 8663, 19454, 2063, 1006, 7953, 18447, 2121, 12172, 1002, 7953, 1010, 6434, 18447, 2121, 12172, 1002, 6434, 1007, 1063, 1013, 1013, 3988, 4697, 17053, 2007, 18856, 2072, 21778, 24665, 11431, 1024, 1024, 6013, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Cache/Simple/ArrayCache.php
ArrayCache.setMultiple
public function setMultiple($values, $ttl = null) { if (!\is_array($values) && !$values instanceof \Traversable) { throw new InvalidArgumentException(sprintf('Cache values must be array or Traversable, "%s" given', \is_object($values) ? \get_class($values) : \gettype($values))); } ...
php
public function setMultiple($values, $ttl = null) { if (!\is_array($values) && !$values instanceof \Traversable) { throw new InvalidArgumentException(sprintf('Cache values must be array or Traversable, "%s" given', \is_object($values) ? \get_class($values) : \gettype($values))); } ...
[ "public", "function", "setMultiple", "(", "$", "values", ",", "$", "ttl", "=", "null", ")", "{", "if", "(", "!", "\\", "is_array", "(", "$", "values", ")", "&&", "!", "$", "values", "instanceof", "\\", "Traversable", ")", "{", "throw", "new", "Invali...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Cache/Simple/ArrayCache.php#L117-L144
train
Set multiple cache items
[ 30522, 2270, 3853, 2275, 12274, 7096, 11514, 2571, 1006, 1002, 5300, 1010, 1002, 23746, 2140, 1027, 19701, 1007, 1063, 2065, 1006, 999, 1032, 2003, 1035, 9140, 1006, 1002, 5300, 1007, 1004, 1004, 999, 1002, 5300, 6013, 11253, 1032, 29053, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/system/classes/CombineAssets.php
CombineAssets.combineToFile
public function combineToFile($assets = [], $destination, $localPath = null) { // Disable cache always $this->storagePath = null; // Prefix all assets if ($localPath) { if (substr($localPath, -1) !== '/') { $localPath = $localPath.'/'; } ...
php
public function combineToFile($assets = [], $destination, $localPath = null) { // Disable cache always $this->storagePath = null; // Prefix all assets if ($localPath) { if (substr($localPath, -1) !== '/') { $localPath = $localPath.'/'; } ...
[ "public", "function", "combineToFile", "(", "$", "assets", "=", "[", "]", ",", "$", "destination", ",", "$", "localPath", "=", "null", ")", "{", "// Disable cache always", "$", "this", "->", "storagePath", "=", "null", ";", "// Prefix all assets", "if", "(",...
Combines a collection of assets files to a destination file $assets = [ 'assets/less/header.less', 'assets/less/footer.less', ]; CombineAssets::combineToFile( $assets, base_path('themes/website/assets/theme.less'), base_path('themes/website') ); @param array $assets Collection of assets @param string $destination Wr...
[ "Combines", "a", "collection", "of", "assets", "files", "to", "a", "destination", "file" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/classes/CombineAssets.php#L205-L228
train
Combine assets to a file
[ 30522, 2270, 3853, 11506, 3406, 8873, 2571, 1006, 1002, 7045, 1027, 1031, 1033, 1010, 1002, 7688, 1010, 1002, 2334, 15069, 1027, 19701, 1007, 1063, 1013, 1013, 4487, 19150, 17053, 2467, 1002, 2023, 1011, 1028, 5527, 15069, 1027, 19701, 3052...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dompdf/dompdf
src/Cellmap.php
Cellmap.remove_row
public function remove_row(Frame $row) { $key = $row->get_id(); if (!isset($this->_frames[$key])) { return; // Presumably this row has alredy been removed } $this->__row = $this->_num_rows--; $rows = $this->_frames[$key]["rows"]; $columns = $this->_frame...
php
public function remove_row(Frame $row) { $key = $row->get_id(); if (!isset($this->_frames[$key])) { return; // Presumably this row has alredy been removed } $this->__row = $this->_num_rows--; $rows = $this->_frames[$key]["rows"]; $columns = $this->_frame...
[ "public", "function", "remove_row", "(", "Frame", "$", "row", ")", "{", "$", "key", "=", "$", "row", "->", "get_id", "(", ")", ";", "if", "(", "!", "isset", "(", "$", "this", "->", "_frames", "[", "$", "key", "]", ")", ")", "{", "return", ";", ...
Remove a row from the cellmap. @param Frame
[ "Remove", "a", "row", "from", "the", "cellmap", "." ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/Cellmap.php#L726-L767
train
Remove a row from the table
[ 30522, 2270, 3853, 6366, 1035, 5216, 1006, 4853, 1002, 5216, 1007, 1063, 1002, 3145, 1027, 1002, 5216, 1011, 1028, 2131, 1035, 30524, 1006, 999, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 1035, 11048, 1031, 1002, 3145, 1033, 1007, 1007, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/Referrers/Columns/Base.php
Base.detectReferrerDirectEntry
protected function detectReferrerDirectEntry() { if (empty($this->referrerHost)) { return false; } $urlsByHost = $this->getCachedUrlsByHostAndIdSite(); $directEntry = new SiteUrls(); $matchingSites = $directEntry->getIdSitesMatchingUrl($this->referrerUrlParse,...
php
protected function detectReferrerDirectEntry() { if (empty($this->referrerHost)) { return false; } $urlsByHost = $this->getCachedUrlsByHostAndIdSite(); $directEntry = new SiteUrls(); $matchingSites = $directEntry->getIdSitesMatchingUrl($this->referrerUrlParse,...
[ "protected", "function", "detectReferrerDirectEntry", "(", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "referrerHost", ")", ")", "{", "return", "false", ";", "}", "$", "urlsByHost", "=", "$", "this", "->", "getCachedUrlsByHostAndIdSite", "(", ")", ...
We have previously tried to detect the campaign variables in the URL so at this stage, if the referrer host is the current host, or if the referrer host is any of the registered URL for this website, it is considered a direct entry @return bool
[ "We", "have", "previously", "tried", "to", "detect", "the", "campaign", "variables", "in", "the", "URL", "so", "at", "this", "stage", "if", "the", "referrer", "host", "is", "the", "current", "host", "or", "if", "the", "referrer", "host", "is", "any", "of...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Referrers/Columns/Base.php#L340-L372
train
Detects whether the referrer domain is from any of the site s IDs
[ 30522, 5123, 3853, 11487, 2890, 7512, 14544, 4305, 2890, 6593, 4765, 2854, 1006, 1007, 1063, 2065, 1006, 4064, 1006, 1002, 2023, 1011, 1028, 6523, 14544, 15006, 2102, 1007, 1007, 1063, 2709, 6270, 1025, 1065, 1002, 24471, 4877, 3762, 15006,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php
NativeSessionStorage.setSaveHandler
public function setSaveHandler($saveHandler = null) { if (!$saveHandler instanceof AbstractProxy && !$saveHandler instanceof \SessionHandlerInterface && null !== $saveHandler) { throw new \InvalidArgumentException('Must be instance of AbstractProxy; implement \SessionHand...
php
public function setSaveHandler($saveHandler = null) { if (!$saveHandler instanceof AbstractProxy && !$saveHandler instanceof \SessionHandlerInterface && null !== $saveHandler) { throw new \InvalidArgumentException('Must be instance of AbstractProxy; implement \SessionHand...
[ "public", "function", "setSaveHandler", "(", "$", "saveHandler", "=", "null", ")", "{", "if", "(", "!", "$", "saveHandler", "instanceof", "AbstractProxy", "&&", "!", "$", "saveHandler", "instanceof", "\\", "SessionHandlerInterface", "&&", "null", "!==", "$", "...
Registers session save handler as a PHP session handler. To use internal PHP session save handlers, override this method using ini_set with session.save_handler and session.save_path e.g. ini_set('session.save_handler', 'files'); ini_set('session.save_path', '/tmp'); or pass in a \SessionHandler instance which confi...
[ "Registers", "session", "save", "handler", "as", "a", "PHP", "session", "handler", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php#L409-L432
train
Set save handler
[ 30522, 2270, 3853, 4520, 10696, 11774, 3917, 1006, 1002, 3828, 11774, 3917, 1027, 19701, 1007, 1063, 2065, 1006, 999, 1002, 3828, 11774, 3917, 6013, 11253, 10061, 21572, 18037, 1004, 1004, 999, 1002, 3828, 11774, 3917, 6013, 11253, 1032, 52...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
walkor/Workerman
Protocols/Http.php
Http.tryGcSessions
public static function tryGcSessions() { if (HttpCache::$sessionGcProbability <= 0 || HttpCache::$sessionGcDivisor <= 0 || rand(1, HttpCache::$sessionGcDivisor) > HttpCache::$sessionGcProbability) { return; } $time_now = time(); foreach(glob(H...
php
public static function tryGcSessions() { if (HttpCache::$sessionGcProbability <= 0 || HttpCache::$sessionGcDivisor <= 0 || rand(1, HttpCache::$sessionGcDivisor) > HttpCache::$sessionGcProbability) { return; } $time_now = time(); foreach(glob(H...
[ "public", "static", "function", "tryGcSessions", "(", ")", "{", "if", "(", "HttpCache", "::", "$", "sessionGcProbability", "<=", "0", "||", "HttpCache", "::", "$", "sessionGcDivisor", "<=", "0", "||", "rand", "(", "1", ",", "HttpCache", "::", "$", "session...
Try GC sessions. @return void
[ "Try", "GC", "sessions", "." ]
13649907f05014fcfffcfccaef01e63ad3339351
https://github.com/walkor/Workerman/blob/13649907f05014fcfffcfccaef01e63ad3339351/Protocols/Http.php#L591-L605
train
Try Gc sessions
[ 30522, 2270, 10763, 3853, 3046, 18195, 8583, 27466, 1006, 1007, 1063, 2065, 1006, 8299, 3540, 5403, 1024, 1024, 1002, 5219, 18195, 21572, 3676, 8553, 1026, 1027, 1014, 1064, 1064, 8299, 3540, 5403, 1024, 1024, 1002, 5219, 18195, 4305, 11365...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Config/Definition/ArrayNode.php
ArrayNode.normalizeValue
protected function normalizeValue($value) { if (false === $value) { return $value; } $value = $this->remapXml($value); $normalized = []; foreach ($value as $name => $val) { if (isset($this->children[$name])) { try { ...
php
protected function normalizeValue($value) { if (false === $value) { return $value; } $value = $this->remapXml($value); $normalized = []; foreach ($value as $name => $val) { if (isset($this->children[$name])) { try { ...
[ "protected", "function", "normalizeValue", "(", "$", "value", ")", "{", "if", "(", "false", "===", "$", "value", ")", "{", "return", "$", "value", ";", "}", "$", "value", "=", "$", "this", "->", "remapXml", "(", "$", "value", ")", ";", "$", "normal...
Normalizes the value. @param mixed $value The value to normalize @return mixed The normalized value @throws InvalidConfigurationException
[ "Normalizes", "the", "value", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Config/Definition/ArrayNode.php#L284-L338
train
Normalize the value of the option
[ 30522, 5123, 3853, 3671, 4697, 10175, 5657, 1006, 1002, 3643, 1007, 1063, 2065, 1006, 6270, 1027, 1027, 1027, 1002, 3643, 1007, 1063, 2709, 1002, 3643, 1025, 1065, 1002, 3643, 1027, 1002, 2023, 1011, 1028, 2128, 2863, 2361, 2595, 19968, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/backend/helpers/Backend.php
Backend.baseUrl
public function baseUrl($path = null) { $backendUri = $this->uri(); $baseUrl = Request::getBaseUrl(); if ($path === null) { return $baseUrl . '/' . $backendUri; } $path = RouterHelper::normalizeUrl($path); return $baseUrl . '/' . $backendUri . $path; ...
php
public function baseUrl($path = null) { $backendUri = $this->uri(); $baseUrl = Request::getBaseUrl(); if ($path === null) { return $baseUrl . '/' . $backendUri; } $path = RouterHelper::normalizeUrl($path); return $baseUrl . '/' . $backendUri . $path; ...
[ "public", "function", "baseUrl", "(", "$", "path", "=", "null", ")", "{", "$", "backendUri", "=", "$", "this", "->", "uri", "(", ")", ";", "$", "baseUrl", "=", "Request", "::", "getBaseUrl", "(", ")", ";", "if", "(", "$", "path", "===", "null", "...
Returns the base backend URL
[ "Returns", "the", "base", "backend", "URL" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/helpers/Backend.php#L40-L51
train
Get Base Url
[ 30522, 2270, 3853, 2918, 3126, 2140, 1006, 1002, 4130, 1027, 19701, 1007, 1063, 1002, 2067, 10497, 9496, 1027, 1002, 2023, 1011, 1028, 24471, 2072, 1006, 1007, 1025, 1002, 2918, 3126, 2140, 1027, 5227, 1024, 1024, 2131, 15058, 3126, 2140, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
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
train
if true - > true
[ 30522, 2270, 3853, 2065, 16344, 5657, 1006, 1032, 8503, 1002, 8503, 1027, 19701, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 1027, 1002, 8503, 1007, 1063, 1002, 8503, 1027, 3853, 1006, 1002, 1058, 1007, 1063, 2709, 2995, 1027, 1027, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Connection.php
Connection.getReadPdo
public function getReadPdo() { if ($this->transactions > 0) { return $this->getPdo(); } if ($this->recordsModified && $this->getConfig('sticky')) { return $this->getPdo(); } if ($this->readPdo instanceof Closure) { return $this->readPdo =...
php
public function getReadPdo() { if ($this->transactions > 0) { return $this->getPdo(); } if ($this->recordsModified && $this->getConfig('sticky')) { return $this->getPdo(); } if ($this->readPdo instanceof Closure) { return $this->readPdo =...
[ "public", "function", "getReadPdo", "(", ")", "{", "if", "(", "$", "this", "->", "transactions", ">", "0", ")", "{", "return", "$", "this", "->", "getPdo", "(", ")", ";", "}", "if", "(", "$", "this", "->", "recordsModified", "&&", "$", "this", "->"...
Get the current PDO connection used for reading. @return \PDO
[ "Get", "the", "current", "PDO", "connection", "used", "for", "reading", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Connection.php#L929-L944
train
Get the read pdo
[ 30522, 2270, 3853, 2131, 16416, 18927, 3527, 1006, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 11817, 1028, 1014, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 2131, 17299, 2080, 1006, 1007, 1025, 1065, 2065, 1006, 1002, 2023, 1011, 1028, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Db/Adapter/Oracle.php
Zend_Db_Adapter_Oracle.limit
public function limit($sql, $count, $offset = 0) { $count = intval($count); if ($count <= 0) { /** * @see Zend_Db_Adapter_Oracle_Exception */ // require_once 'Zend/Db/Adapter/Oracle/Exception.php'; throw new Zend_Db_Adapter_Oracle_Excepti...
php
public function limit($sql, $count, $offset = 0) { $count = intval($count); if ($count <= 0) { /** * @see Zend_Db_Adapter_Oracle_Exception */ // require_once 'Zend/Db/Adapter/Oracle/Exception.php'; throw new Zend_Db_Adapter_Oracle_Excepti...
[ "public", "function", "limit", "(", "$", "sql", ",", "$", "count", ",", "$", "offset", "=", "0", ")", "{", "$", "count", "=", "intval", "(", "$", "count", ")", ";", "if", "(", "$", "count", "<=", "0", ")", "{", "/**\n * @see Zend_Db_Adapt...
Adds an adapter-specific LIMIT clause to the SELECT statement. @param string $sql @param integer $count @param integer $offset OPTIONAL @return string @throws Zend_Db_Adapter_Oracle_Exception
[ "Adds", "an", "adapter", "-", "specific", "LIMIT", "clause", "to", "the", "SELECT", "statement", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Adapter/Oracle.php#L539-L574
train
Return the limit statement
[ 30522, 2270, 3853, 5787, 1006, 1002, 29296, 1010, 1002, 4175, 1010, 1002, 16396, 1027, 1014, 1007, 1063, 1002, 4175, 1027, 20014, 10175, 1006, 1002, 4175, 1007, 1025, 2065, 1006, 1002, 4175, 1026, 1027, 1014, 1007, 1063, 1013, 1008, 1008, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Mail/Message.php
Message.cc
public function cc($address, $name = null, $override = false) { if ($override) { $this->swift->setCc($address, $name); return $this; } return $this->addAddresses($address, $name, 'Cc'); }
php
public function cc($address, $name = null, $override = false) { if ($override) { $this->swift->setCc($address, $name); return $this; } return $this->addAddresses($address, $name, 'Cc'); }
[ "public", "function", "cc", "(", "$", "address", ",", "$", "name", "=", "null", ",", "$", "override", "=", "false", ")", "{", "if", "(", "$", "override", ")", "{", "$", "this", "->", "swift", "->", "setCc", "(", "$", "address", ",", "$", "name", ...
Add a carbon copy to the message. @param string|array $address @param string|null $name @param bool $override @return $this
[ "Add", "a", "carbon", "copy", "to", "the", "message", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Mail/Message.php#L109-L118
train
Add a cc address to the message
[ 30522, 2270, 3853, 10507, 1006, 1002, 4769, 1010, 1002, 2171, 1027, 19701, 1010, 1002, 2058, 15637, 1027, 6270, 1007, 1063, 2065, 1006, 1002, 2058, 15637, 1007, 1063, 1002, 2023, 1011, 1028, 9170, 1011, 30524, 4769, 1010, 1002, 2171, 1010, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Security/Csrf/TokenStorage/SessionTokenStorage.php
SessionTokenStorage.hasToken
public function hasToken($tokenId) { if (!$this->session->isStarted()) { $this->session->start(); } return $this->session->has($this->namespace.'/'.$tokenId); }
php
public function hasToken($tokenId) { if (!$this->session->isStarted()) { $this->session->start(); } return $this->session->has($this->namespace.'/'.$tokenId); }
[ "public", "function", "hasToken", "(", "$", "tokenId", ")", "{", "if", "(", "!", "$", "this", "->", "session", "->", "isStarted", "(", ")", ")", "{", "$", "this", "->", "session", "->", "start", "(", ")", ";", "}", "return", "$", "this", "->", "s...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Security/Csrf/TokenStorage/SessionTokenStorage.php#L75-L82
train
Has Token?
[ 30522, 2270, 3853, 2038, 18715, 2368, 1006, 1002, 19204, 3593, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 5219, 1011, 1028, 26354, 7559, 3064, 1006, 1007, 1007, 1063, 1002, 2023, 1011, 1028, 5219, 1011, 1028, 2707, 1006, 1007, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/CoreVisualizations/Visualizations/Sparklines/Config.php
Config.getUrlSparkline
private function getUrlSparkline($customParameters = array()) { $customParameters['viewDataTable'] = 'sparkline'; $params = $this->getGraphParamsModified($customParameters); // convert array values to comma separated foreach ($params as &$value) { if (is_array($value)) ...
php
private function getUrlSparkline($customParameters = array()) { $customParameters['viewDataTable'] = 'sparkline'; $params = $this->getGraphParamsModified($customParameters); // convert array values to comma separated foreach ($params as &$value) { if (is_array($value)) ...
[ "private", "function", "getUrlSparkline", "(", "$", "customParameters", "=", "array", "(", ")", ")", "{", "$", "customParameters", "[", "'viewDataTable'", "]", "=", "'sparkline'", ";", "$", "params", "=", "$", "this", "->", "getGraphParamsModified", "(", "$", ...
Returns a URL to a sparkline image for a report served by the current plugin. The result of this URL should be used with the [sparkline()](/api-reference/Piwik/View#twig) twig function. The current site ID and period will be used. @param array $customParameters The array of query parameter name/value pairs that shou...
[ "Returns", "a", "URL", "to", "a", "sparkline", "image", "for", "a", "report", "served", "by", "the", "current", "plugin", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/CoreVisualizations/Visualizations/Sparklines/Config.php#L327-L341
train
Returns the url to the sparkline view
[ 30522, 2797, 3853, 2131, 3126, 4877, 14432, 4179, 1006, 1002, 7661, 28689, 22828, 2015, 1027, 9140, 1006, 1007, 1007, 1063, 1002, 7661, 28689, 22828, 2015, 1031, 1005, 3193, 2850, 29336, 3085, 1005, 1033, 1027, 1005, 12125, 4179, 1005, 1025...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
overtrue/wechat
src/OfficialAccount/TemplateMessage/Client.php
Client.formatData
protected function formatData(array $data) { $formatted = []; foreach ($data as $key => $value) { if (is_array($value)) { if (isset($value['value'])) { $formatted[$key] = $value; continue; } if (co...
php
protected function formatData(array $data) { $formatted = []; foreach ($data as $key => $value) { if (is_array($value)) { if (isset($value['value'])) { $formatted[$key] = $value; continue; } if (co...
[ "protected", "function", "formatData", "(", "array", "$", "data", ")", "{", "$", "formatted", "=", "[", "]", ";", "foreach", "(", "$", "data", "as", "$", "key", "=>", "$", "value", ")", "{", "if", "(", "is_array", "(", "$", "value", ")", ")", "{"...
@param array $data @return array
[ "@param", "array", "$data" ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/TemplateMessage/Client.php#L178-L206
train
Formats the data into a formatable array
[ 30522, 5123, 3853, 4289, 30524, 3145, 1027, 1028, 1002, 3643, 1007, 1063, 2065, 1006, 2003, 1035, 9140, 1006, 1002, 3643, 1007, 1007, 1063, 2065, 1006, 26354, 3388, 1006, 1002, 3643, 1031, 1005, 3643, 1005, 1033, 1007, 1007, 1063, 1002, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpClient/Chunk/ErrorChunk.php
ErrorChunk.isTimeout
public function isTimeout(): bool { $this->didThrow = true; if (null !== $this->error) { throw new TransportException($this->errorMessage, 0, $this->error); } return true; }
php
public function isTimeout(): bool { $this->didThrow = true; if (null !== $this->error) { throw new TransportException($this->errorMessage, 0, $this->error); } return true; }
[ "public", "function", "isTimeout", "(", ")", ":", "bool", "{", "$", "this", "->", "didThrow", "=", "true", ";", "if", "(", "null", "!==", "$", "this", "->", "error", ")", "{", "throw", "new", "TransportException", "(", "$", "this", "->", "errorMessage"...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpClient/Chunk/ErrorChunk.php#L39-L48
train
Is this the timeout?
[ 30522, 2270, 3853, 21541, 14428, 5833, 1006, 1007, 1024, 22017, 2140, 1063, 1002, 2023, 1011, 1028, 2106, 2705, 10524, 1027, 2995, 1025, 2065, 1006, 19701, 999, 1027, 1027, 1002, 2023, 1011, 1028, 7561, 1007, 1063, 5466, 2047, 3665, 10288, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Foundation/Console/Kernel.php
Kernel.bootstrap
public function bootstrap() { if (! $this->app->hasBeenBootstrapped()) { $this->app->bootstrapWith($this->bootstrappers()); } $this->app->loadDeferredProviders(); if (! $this->commandsLoaded) { $this->commands(); $this->commandsLoaded = true; ...
php
public function bootstrap() { if (! $this->app->hasBeenBootstrapped()) { $this->app->bootstrapWith($this->bootstrappers()); } $this->app->loadDeferredProviders(); if (! $this->commandsLoaded) { $this->commands(); $this->commandsLoaded = true; ...
[ "public", "function", "bootstrap", "(", ")", "{", "if", "(", "!", "$", "this", "->", "app", "->", "hasBeenBootstrapped", "(", ")", ")", "{", "$", "this", "->", "app", "->", "bootstrapWith", "(", "$", "this", "->", "bootstrappers", "(", ")", ")", ";",...
Bootstrap the application for artisan commands. @return void
[ "Bootstrap", "the", "application", "for", "artisan", "commands", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Console/Kernel.php#L308-L321
train
Bootstraps the application and loads the deferred providers.
[ 30522, 2270, 3853, 6879, 6494, 2361, 1006, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 10439, 1011, 1028, 2038, 11306, 27698, 17206, 20528, 11469, 1006, 1007, 1007, 1063, 1002, 2023, 1011, 1028, 10439, 1011, 1028, 6879, 6494, 28400...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php
ParameterBag.resolve
public function resolve() { if ($this->resolved) { return; } $parameters = []; foreach ($this->parameters as $key => $value) { try { $value = $this->resolveValue($value); $parameters[$key] = $this->unescapeValue($value); ...
php
public function resolve() { if ($this->resolved) { return; } $parameters = []; foreach ($this->parameters as $key => $value) { try { $value = $this->resolveValue($value); $parameters[$key] = $this->unescapeValue($value); ...
[ "public", "function", "resolve", "(", ")", "{", "if", "(", "$", "this", "->", "resolved", ")", "{", "return", ";", "}", "$", "parameters", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "parameters", "as", "$", "key", "=>", "$", "value", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php#L138-L158
train
Resolves parameters and returns the result.
[ 30522, 2270, 3853, 10663, 1006, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 10395, 1007, 1063, 2709, 1025, 1065, 1002, 11709, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 11709, 2004, 1002, 3145, 1027, 1028, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Cache/FileStore.php
FileStore.flush
public function flush() { if (! $this->files->isDirectory($this->directory)) { return false; } foreach ($this->files->directories($this->directory) as $directory) { if (! $this->files->deleteDirectory($directory)) { return false; } ...
php
public function flush() { if (! $this->files->isDirectory($this->directory)) { return false; } foreach ($this->files->directories($this->directory) as $directory) { if (! $this->files->deleteDirectory($directory)) { return false; } ...
[ "public", "function", "flush", "(", ")", "{", "if", "(", "!", "$", "this", "->", "files", "->", "isDirectory", "(", "$", "this", "->", "directory", ")", ")", "{", "return", "false", ";", "}", "foreach", "(", "$", "this", "->", "files", "->", "direc...
Remove all items from the cache. @return bool
[ "Remove", "all", "items", "from", "the", "cache", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Cache/FileStore.php#L144-L157
train
Flushes the cache
[ 30522, 2270, 3853, 13862, 1006, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 6764, 1011, 1028, 2003, 4305, 2890, 16761, 2100, 1006, 1002, 2023, 1011, 1028, 14176, 1007, 1007, 1063, 2709, 6270, 1025, 1065, 18921, 6776, 1006, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/cms/classes/CmsObjectCollection.php
CmsObjectCollection.whereComponent
public function whereComponent($components, $property, $value, $strict = false) { return $this->filter(function ($object) use ($components, $property, $value, $strict) { $hasComponent = false; foreach ((array) $components as $componentName) { if (!$componentAlias =...
php
public function whereComponent($components, $property, $value, $strict = false) { return $this->filter(function ($object) use ($components, $property, $value, $strict) { $hasComponent = false; foreach ((array) $components as $componentName) { if (!$componentAlias =...
[ "public", "function", "whereComponent", "(", "$", "components", ",", "$", "property", ",", "$", "value", ",", "$", "strict", "=", "false", ")", "{", "return", "$", "this", "->", "filter", "(", "function", "(", "$", "object", ")", "use", "(", "$", "co...
Returns objects whose component properties match the supplied value. @param mixed $components @param string $property @param string $value @param bool $strict @return static
[ "Returns", "objects", "whose", "component", "properties", "match", "the", "supplied", "value", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/classes/CmsObjectCollection.php#L69-L103
train
Filter the result by a component property
[ 30522, 2270, 3853, 2073, 9006, 29513, 3372, 1006, 1002, 6177, 1010, 1002, 3200, 1010, 1002, 3643, 1010, 1002, 9384, 1027, 6270, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 11307, 1006, 3853, 1006, 1002, 4874, 1007, 2224, 1006, 1002, 6177, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Config/Definition/Builder/VariableNodeDefinition.php
VariableNodeDefinition.createNode
protected function createNode() { $node = $this->instantiateNode(); if (null !== $this->normalization) { $node->setNormalizationClosures($this->normalization->before); } if (null !== $this->merge) { $node->setAllowOverwrite($this->merge->allowOverwrite); ...
php
protected function createNode() { $node = $this->instantiateNode(); if (null !== $this->normalization) { $node->setNormalizationClosures($this->normalization->before); } if (null !== $this->merge) { $node->setAllowOverwrite($this->merge->allowOverwrite); ...
[ "protected", "function", "createNode", "(", ")", "{", "$", "node", "=", "$", "this", "->", "instantiateNode", "(", ")", ";", "if", "(", "null", "!==", "$", "this", "->", "normalization", ")", "{", "$", "node", "->", "setNormalizationClosures", "(", "$", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Config/Definition/Builder/VariableNodeDefinition.php#L36-L64
train
Creates a new node and sets all the necessary information
[ 30522, 5123, 3853, 3443, 3630, 3207, 1006, 1007, 1063, 1002, 13045, 1027, 1002, 2023, 1011, 1028, 7107, 13143, 3630, 3207, 1006, 1007, 1025, 2065, 1006, 19701, 999, 1027, 1027, 1002, 2023, 1011, 1028, 3671, 3989, 1007, 1063, 1002, 13045, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/backend/classes/BackendController.php
BackendController.run
public function run($url = null) { $params = RouterHelper::segmentizeUrl($url); /* * Database check */ if (!App::hasDatabase()) { return Config::get('app.debug', false) ? Response::make(View::make('backend::no_database'), 200) : ...
php
public function run($url = null) { $params = RouterHelper::segmentizeUrl($url); /* * Database check */ if (!App::hasDatabase()) { return Config::get('app.debug', false) ? Response::make(View::make('backend::no_database'), 200) : ...
[ "public", "function", "run", "(", "$", "url", "=", "null", ")", "{", "$", "params", "=", "RouterHelper", "::", "segmentizeUrl", "(", "$", "url", ")", ";", "/*\n * Database check\n */", "if", "(", "!", "App", "::", "hasDatabase", "(", ")", "...
Finds and serves the requested backend controller. If the controller cannot be found, returns the Cms page with the URL /404. If the /404 page doesn't exist, returns the system 404 page. @param string $url Specifies the requested page URL. If the parameter is omitted, the current URL used. @return string Returns the pr...
[ "Finds", "and", "serves", "the", "requested", "backend", "controller", ".", "If", "the", "controller", "cannot", "be", "found", "returns", "the", "Cms", "page", "with", "the", "URL", "/", "404", ".", "If", "the", "/", "404", "page", "doesn", "t", "exist"...
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/classes/BackendController.php#L86-L143
train
Runs the action on the given URL
[ 30522, 2270, 3853, 2448, 1006, 1002, 24471, 2140, 1027, 19701, 1007, 1063, 1002, 11498, 5244, 1027, 2799, 25032, 2884, 4842, 1024, 1024, 6903, 4697, 3126, 2140, 1006, 1002, 24471, 2140, 1007, 1025, 1013, 1008, 1008, 7809, 4638, 1008, 1013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Cache/DatabaseStore.php
DatabaseStore.unserialize
protected function unserialize($value) { if ($this->connection instanceof PostgresConnection && ! Str::contains($value, [':', ';'])) { $value = base64_decode($value); } return unserialize($value); }
php
protected function unserialize($value) { if ($this->connection instanceof PostgresConnection && ! Str::contains($value, [':', ';'])) { $value = base64_decode($value); } return unserialize($value); }
[ "protected", "function", "unserialize", "(", "$", "value", ")", "{", "if", "(", "$", "this", "->", "connection", "instanceof", "PostgresConnection", "&&", "!", "Str", "::", "contains", "(", "$", "value", ",", "[", "':'", ",", "';'", "]", ")", ")", "{",...
Unserialize the given value. @param string $value @return mixed
[ "Unserialize", "the", "given", "value", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Cache/DatabaseStore.php#L286-L293
train
Unserialize the value
[ 30522, 5123, 3853, 4895, 8043, 4818, 4697, 1006, 1002, 3643, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 4434, 6013, 11253, 2695, 17603, 9363, 10087, 7542, 1004, 1004, 999, 2358, 2099, 1024, 1024, 3397, 1006, 1002, 3643, 1010, 1031, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Utils.php
Utils.setDotNotation
public static function setDotNotation(&$array, $key, $value, $merge = false) { if (null === $key) { return $array = $value; } $keys = explode('.', $key); while (count($keys) > 1) { $key = array_shift($keys); if ( ! isset($array[$key]) || ! is_ar...
php
public static function setDotNotation(&$array, $key, $value, $merge = false) { if (null === $key) { return $array = $value; } $keys = explode('.', $key); while (count($keys) > 1) { $key = array_shift($keys); if ( ! isset($array[$key]) || ! is_ar...
[ "public", "static", "function", "setDotNotation", "(", "&", "$", "array", ",", "$", "key", ",", "$", "value", ",", "$", "merge", "=", "false", ")", "{", "if", "(", "null", "===", "$", "key", ")", "{", "return", "$", "array", "=", "$", "value", ";...
Set portion of array (passed by reference) for a dot-notation key and set the value @param array $array @param string|int $key @param mixed $value @param bool $merge @return mixed
[ "Set", "portion", "of", "array", "(", "passed", "by", "reference", ")", "for", "a", "dot", "-", "notation", "key", "and", "set", "the", "value" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Utils.php#L1195-L1223
train
Set the value of a key using dot notation
[ 30522, 2270, 10763, 3853, 2275, 27364, 17048, 3370, 1006, 1004, 1002, 9140, 1010, 1002, 3145, 1010, 1002, 3643, 1010, 1002, 13590, 1027, 6270, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 1027, 1002, 3145, 1007, 1063, 2709, 1002, 9140, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Data/Validation.php
Validation.typeNumber
public static function typeNumber($value, array $params, array $field) { if (!is_numeric($value)) { return false; } if (isset($params['min']) && $value < $params['min']) { return false; } if (isset($params['max']) && $value > $params['max']) { ...
php
public static function typeNumber($value, array $params, array $field) { if (!is_numeric($value)) { return false; } if (isset($params['min']) && $value < $params['min']) { return false; } if (isset($params['max']) && $value > $params['max']) { ...
[ "public", "static", "function", "typeNumber", "(", "$", "value", ",", "array", "$", "params", ",", "array", "$", "field", ")", "{", "if", "(", "!", "is_numeric", "(", "$", "value", ")", ")", "{", "return", "false", ";", "}", "if", "(", "isset", "("...
HTML5 input: number @param mixed $value Value to be validated. @param array $params Validation parameters. @param array $field Blueprint for the field. @return bool True if validation succeeded.
[ "HTML5", "input", ":", "number" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Data/Validation.php#L338-L355
train
Type number.
[ 30522, 2270, 10763, 3853, 2828, 19172, 5677, 1006, 1002, 3643, 1010, 9140, 1002, 11498, 5244, 1010, 9140, 1002, 2492, 1007, 1063, 2065, 1006, 999, 2003, 1035, 16371, 25531, 1006, 1002, 3643, 1007, 1007, 1063, 2709, 6270, 1025, 1065, 2065, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Console/Gpm/InstallCommand.php
InstallCommand.downloadPackage
private function downloadPackage($package, $license = null) { $tmp_dir = Grav::instance()['locator']->findResource('tmp://', true, true); $this->tmp = $tmp_dir . '/Grav-' . uniqid(); $filename = $package->slug . basename($package->zipball_url); $filename = preg_replace('/[\\\\\/:"*?&...
php
private function downloadPackage($package, $license = null) { $tmp_dir = Grav::instance()['locator']->findResource('tmp://', true, true); $this->tmp = $tmp_dir . '/Grav-' . uniqid(); $filename = $package->slug . basename($package->zipball_url); $filename = preg_replace('/[\\\\\/:"*?&...
[ "private", "function", "downloadPackage", "(", "$", "package", ",", "$", "license", "=", "null", ")", "{", "$", "tmp_dir", "=", "Grav", "::", "instance", "(", ")", "[", "'locator'", "]", "->", "findResource", "(", "'tmp://'", ",", "true", ",", "true", ...
@param Package $package @param string $license @return string
[ "@param", "Package", "$package" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Console/Gpm/InstallCommand.php#L559-L601
train
Download package from remote
[ 30522, 2797, 3853, 8816, 23947, 4270, 1006, 1002, 7427, 1010, 1002, 6105, 1027, 19701, 1007, 1063, 1002, 1056, 8737, 1035, 16101, 1027, 24665, 11431, 1024, 1024, 6013, 1006, 1007, 1031, 1005, 8840, 11266, 2953, 1005, 1033, 1011, 1028, 2424,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Redis/Connections/PhpRedisConnection.php
PhpRedisConnection.pipeline
public function pipeline(callable $callback = null) { $pipeline = $this->client()->pipeline(); return is_null($callback) ? $pipeline : tap($pipeline, $callback)->exec(); }
php
public function pipeline(callable $callback = null) { $pipeline = $this->client()->pipeline(); return is_null($callback) ? $pipeline : tap($pipeline, $callback)->exec(); }
[ "public", "function", "pipeline", "(", "callable", "$", "callback", "=", "null", ")", "{", "$", "pipeline", "=", "$", "this", "->", "client", "(", ")", "->", "pipeline", "(", ")", ";", "return", "is_null", "(", "$", "callback", ")", "?", "$", "pipeli...
Execute commands in a pipeline. @param callable|null $callback @return \Redis|array
[ "Execute", "commands", "in", "a", "pipeline", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Redis/Connections/PhpRedisConnection.php#L298-L305
train
Pipeline the results of the query.
[ 30522, 2270, 3853, 13117, 1006, 2655, 3085, 1002, 2655, 5963, 1027, 19701, 1007, 1063, 1002, 13117, 1027, 1002, 2023, 1011, 1028, 7396, 1006, 1007, 1011, 1028, 13117, 1006, 1007, 1025, 2709, 2003, 1035, 19701, 1006, 1002, 2655, 5963, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Plugin/Visualization.php
Visualization.getClientSideParametersToSet
protected function getClientSideParametersToSet() { // build javascript variables to set $javascriptVariablesToSet = array(); foreach ($this->config->custom_parameters as $name => $value) { $javascriptVariablesToSet[$name] = $value; } foreach ($_GET as $name => ...
php
protected function getClientSideParametersToSet() { // build javascript variables to set $javascriptVariablesToSet = array(); foreach ($this->config->custom_parameters as $name => $value) { $javascriptVariablesToSet[$name] = $value; } foreach ($_GET as $name => ...
[ "protected", "function", "getClientSideParametersToSet", "(", ")", "{", "// build javascript variables to set", "$", "javascriptVariablesToSet", "=", "array", "(", ")", ";", "foreach", "(", "$", "this", "->", "config", "->", "custom_parameters", "as", "$", "name", "...
This functions reads the customization values for the DataTable and returns an array (name,value) to be printed in Javascript. This array defines things such as: - name of the module & action to call to request data for this table - optional filters information, eg. filter_limit and filter_offset - etc. The values are...
[ "This", "functions", "reads", "the", "customization", "values", "for", "the", "DataTable", "and", "returns", "an", "array", "(", "name", "value", ")", "to", "be", "printed", "in", "Javascript", ".", "This", "array", "defines", "things", "such", "as", ":", ...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Plugin/Visualization.php#L580-L648
train
Returns the client side parameters to set
[ 30522, 5123, 3853, 2131, 20464, 11638, 7363, 28689, 22828, 16033, 13462, 1006, 1007, 1063, 1013, 1013, 3857, 9262, 22483, 10857, 2000, 2275, 1002, 9262, 22483, 10755, 19210, 16033, 13462, 1027, 9140, 1006, 1007, 1025, 18921, 6776, 1006, 1002,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/Transitions/API.php
API.addInternalReferrers
private function addInternalReferrers($logAggregator, &$report, $idaction, $actionType, $limitBeforeGrouping) { $data = $this->queryInternalReferrers($idaction, $actionType, $logAggregator, $limitBeforeGrouping); if ($data['pageviews'] == 0) { throw new Exception('NoDataForAction'); ...
php
private function addInternalReferrers($logAggregator, &$report, $idaction, $actionType, $limitBeforeGrouping) { $data = $this->queryInternalReferrers($idaction, $actionType, $logAggregator, $limitBeforeGrouping); if ($data['pageviews'] == 0) { throw new Exception('NoDataForAction'); ...
[ "private", "function", "addInternalReferrers", "(", "$", "logAggregator", ",", "&", "$", "report", ",", "$", "idaction", ",", "$", "actionType", ",", "$", "limitBeforeGrouping", ")", "{", "$", "data", "=", "$", "this", "->", "queryInternalReferrers", "(", "$...
Add the internal referrers to the report: previous pages and previous site searches @param LogAggregator $logAggregator @param $report @param $idaction @param string $actionType @param $limitBeforeGrouping @throws Exception
[ "Add", "the", "internal", "referrers", "to", "the", "report", ":", "previous", "pages", "and", "previous", "site", "searches" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Transitions/API.php#L172-L184
train
Add internal referrers to the report
[ 30522, 2797, 3853, 5587, 18447, 11795, 2389, 2890, 7512, 14544, 2015, 1006, 1002, 8833, 8490, 17603, 20697, 2953, 1010, 1004, 1002, 3189, 1010, 1002, 16096, 7542, 1010, 1002, 2895, 13874, 1010, 1002, 5787, 4783, 29278, 13910, 22107, 2075, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/UserId/Archiver.php
Archiver.setVisitorIds
private function setVisitorIds(DataTable $dataTable) { foreach ($dataTable->getRows() as $row) { $userId = $row->getColumn('label'); if (isset($this->visitorIdsUserIdsMap[$userId])) { $row->setMetadata(self::VISITOR_ID_FIELD, $this->visitorIdsUserIdsMap[$userId]); ...
php
private function setVisitorIds(DataTable $dataTable) { foreach ($dataTable->getRows() as $row) { $userId = $row->getColumn('label'); if (isset($this->visitorIdsUserIdsMap[$userId])) { $row->setMetadata(self::VISITOR_ID_FIELD, $this->visitorIdsUserIdsMap[$userId]); ...
[ "private", "function", "setVisitorIds", "(", "DataTable", "$", "dataTable", ")", "{", "foreach", "(", "$", "dataTable", "->", "getRows", "(", ")", "as", "$", "row", ")", "{", "$", "userId", "=", "$", "row", "->", "getColumn", "(", "'label'", ")", ";", ...
Fill visitor ID as metadata before actual inserting rows to DB. @param DataTable $dataTable
[ "Fill", "visitor", "ID", "as", "metadata", "before", "actual", "inserting", "rows", "to", "DB", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/UserId/Archiver.php#L130-L138
train
Set visitor id metadata for each row
[ 30522, 2797, 3853, 2275, 11365, 15660, 9821, 1006, 2951, 10880, 1002, 2951, 10880, 1007, 1063, 18921, 6776, 1006, 1002, 2951, 10880, 1011, 1028, 2131, 10524, 2015, 1006, 1007, 2004, 1002, 5216, 1007, 1063, 1002, 5310, 3593, 1027, 1002, 5216...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Form/AbstractExtension.php
AbstractExtension.initTypeExtensions
private function initTypeExtensions() { $this->typeExtensions = []; foreach ($this->loadTypeExtensions() as $extension) { if (!$extension instanceof FormTypeExtensionInterface) { throw new UnexpectedTypeException($extension, 'Symfony\Component\Form\FormTypeExtensionInter...
php
private function initTypeExtensions() { $this->typeExtensions = []; foreach ($this->loadTypeExtensions() as $extension) { if (!$extension instanceof FormTypeExtensionInterface) { throw new UnexpectedTypeException($extension, 'Symfony\Component\Form\FormTypeExtensionInter...
[ "private", "function", "initTypeExtensions", "(", ")", "{", "$", "this", "->", "typeExtensions", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "loadTypeExtensions", "(", ")", "as", "$", "extension", ")", "{", "if", "(", "!", "$", "extension", ...
Initializes the type extensions. @throws UnexpectedTypeException if any registered type extension is not an instance of FormTypeExtensionInterface
[ "Initializes", "the", "type", "extensions", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/AbstractExtension.php#L169-L194
train
Initializes the type extensions
[ 30522, 2797, 3853, 1999, 12474, 18863, 10288, 29048, 2015, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 2828, 10288, 29048, 2015, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 7170, 13874, 10288, 29048, 2015, 1006, 1007, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/DomCrawler/Crawler.php
Crawler.convertToHtmlEntities
private function convertToHtmlEntities(string $htmlContent, string $charset = 'UTF-8'): string { set_error_handler(function () { throw new \Exception(); }); try { return mb_convert_encoding($htmlContent, 'HTML-ENTITIES', $charset); } catch (\Exception $e) { try { ...
php
private function convertToHtmlEntities(string $htmlContent, string $charset = 'UTF-8'): string { set_error_handler(function () { throw new \Exception(); }); try { return mb_convert_encoding($htmlContent, 'HTML-ENTITIES', $charset); } catch (\Exception $e) { try { ...
[ "private", "function", "convertToHtmlEntities", "(", "string", "$", "htmlContent", ",", "string", "$", "charset", "=", "'UTF-8'", ")", ":", "string", "{", "set_error_handler", "(", "function", "(", ")", "{", "throw", "new", "\\", "Exception", "(", ")", ";", ...
Converts charset to HTML-entities to ensure valid parsing.
[ "Converts", "charset", "to", "HTML", "-", "entities", "to", "ensure", "valid", "parsing", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DomCrawler/Crawler.php#L1143-L1160
train
Convert HTML - Entities to UTF - 8
[ 30522, 2797, 3853, 10463, 3406, 11039, 19968, 4765, 6447, 1006, 5164, 1002, 16129, 8663, 6528, 2102, 1010, 5164, 1002, 25869, 13462, 1027, 1005, 21183, 2546, 1011, 1022, 1005, 1007, 1024, 5164, 1063, 2275, 1035, 7561, 1035, 28213, 1006, 385...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
slimphp/Slim
Slim/DefaultServicesProvider.php
DefaultServicesProvider.register
public function register($container) { if (!isset($container['environment'])) { /** * This service MUST return a shared instance of \Slim\Http\Environment. * * @return Environment */ $container['environment'] = function () { ...
php
public function register($container) { if (!isset($container['environment'])) { /** * This service MUST return a shared instance of \Slim\Http\Environment. * * @return Environment */ $container['environment'] = function () { ...
[ "public", "function", "register", "(", "$", "container", ")", "{", "if", "(", "!", "isset", "(", "$", "container", "[", "'environment'", "]", ")", ")", "{", "/**\n * This service MUST return a shared instance of \\Slim\\Http\\Environment.\n *\n ...
Register Slim's default services. @param Container $container A DI container implementing ArrayAccess and container-interop.
[ "Register", "Slim", "s", "default", "services", "." ]
ccef5f7d8bcd469d59cbe64f6210d83764f91543
https://github.com/slimphp/Slim/blob/ccef5f7d8bcd469d59cbe64f6210d83764f91543/Slim/DefaultServicesProvider.php#L32-L193
train
Registers the container
[ 30522, 2270, 3853, 4236, 1006, 1002, 11661, 1007, 1063, 2065, 1006, 999, 26354, 3388, 1006, 1002, 11661, 1031, 1005, 4044, 1005, 1033, 1007, 1007, 1063, 1013, 1008, 1008, 1008, 2023, 2326, 2442, 2709, 1037, 4207, 6013, 1997, 1032, 11754, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/PrivacyManager/DoNotTrackHeaderChecker.php
DoNotTrackHeaderChecker.checkHeaderInTracker
public function checkHeaderInTracker(&$exclude) { if ($exclude) { Common::printDebug("Visit is already excluded, no need to check DoNotTrack support."); return; } $exclude = $this->isDoNotTrackFound(); if($exclude) { IgnoreCookie::deleteThirdPar...
php
public function checkHeaderInTracker(&$exclude) { if ($exclude) { Common::printDebug("Visit is already excluded, no need to check DoNotTrack support."); return; } $exclude = $this->isDoNotTrackFound(); if($exclude) { IgnoreCookie::deleteThirdPar...
[ "public", "function", "checkHeaderInTracker", "(", "&", "$", "exclude", ")", "{", "if", "(", "$", "exclude", ")", "{", "Common", "::", "printDebug", "(", "\"Visit is already excluded, no need to check DoNotTrack support.\"", ")", ";", "return", ";", "}", "$", "exc...
Checks for DoNotTrack headers and if found, sets `$exclude` to `true`.
[ "Checks", "for", "DoNotTrack", "headers", "and", "if", "found", "sets", "$exclude", "to", "true", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/PrivacyManager/DoNotTrackHeaderChecker.php#L35-L55
train
Check header in Tracking Status
[ 30522, 2270, 3853, 4638, 4974, 23282, 6494, 9102, 1006, 1004, 1002, 30524, 2003, 2525, 12421, 1010, 2053, 2342, 2000, 4638, 2123, 14517, 22648, 2243, 2490, 1012, 1000, 1007, 1025, 2709, 1025, 1065, 1002, 23329, 1027, 1002, 2023, 1011, 1028,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Validation/Concerns/ValidatesAttributes.php
ValidatesAttributes.validateUrl
public function validateUrl($attribute, $value) { if (! is_string($value)) { return false; } /* * This pattern is derived from Symfony\Component\Validator\Constraints\UrlValidator (2.7.4). * * (c) Fabien Potencier <fabien@symfony.com> http://symfony.co...
php
public function validateUrl($attribute, $value) { if (! is_string($value)) { return false; } /* * This pattern is derived from Symfony\Component\Validator\Constraints\UrlValidator (2.7.4). * * (c) Fabien Potencier <fabien@symfony.com> http://symfony.co...
[ "public", "function", "validateUrl", "(", "$", "attribute", ",", "$", "value", ")", "{", "if", "(", "!", "is_string", "(", "$", "value", ")", ")", "{", "return", "false", ";", "}", "/*\n * This pattern is derived from Symfony\\Component\\Validator\\Constrain...
Validate that an attribute is a valid URL. @param string $attribute @param mixed $value @return bool
[ "Validate", "that", "an", "attribute", "is", "a", "valid", "URL", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php#L1582-L1610
train
Validate the url
[ 30522, 2270, 3853, 9398, 3686, 3126, 2140, 1006, 1002, 17961, 1010, 1002, 3643, 1007, 1063, 2065, 1006, 999, 2003, 1035, 5164, 1006, 1002, 3643, 1007, 1007, 1063, 2709, 6270, 1025, 1065, 1013, 1008, 1008, 2023, 5418, 2003, 5173, 2013, 253...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Cookie.php
Cookie.get
public function get($name) { $name = self::escapeValue($name); if (false === $this->keyStore) { if (isset($this->value[$name])) { return self::escapeValue($this->value[$name]); } return false; } if (isset($this->value[$this->keySt...
php
public function get($name) { $name = self::escapeValue($name); if (false === $this->keyStore) { if (isset($this->value[$name])) { return self::escapeValue($this->value[$name]); } return false; } if (isset($this->value[$this->keySt...
[ "public", "function", "get", "(", "$", "name", ")", "{", "$", "name", "=", "self", "::", "escapeValue", "(", "$", "name", ")", ";", "if", "(", "false", "===", "$", "this", "->", "keyStore", ")", "{", "if", "(", "isset", "(", "$", "this", "->", ...
Returns the value defined by $name from the cookie. @param string|integer Index name of the value to return @return mixed The value if found, false if the value is not found
[ "Returns", "the", "value", "defined", "by", "$name", "from", "the", "cookie", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Cookie.php#L354-L370
train
Get the value of a key
[ 30522, 2270, 3853, 2131, 1006, 1002, 2171, 1007, 1063, 1002, 2171, 1027, 2969, 1024, 1024, 4019, 10175, 5657, 1006, 1002, 2171, 1007, 1025, 2065, 1006, 6270, 1027, 1027, 1027, 1002, 2023, 1011, 1028, 6309, 19277, 1007, 1063, 2065, 1006, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/ExampleCommand/Commands/HelloWorld.php
HelloWorld.execute
protected function execute(InputInterface $input, OutputInterface $output) { $name = $input->getOption('name'); $message = sprintf('<info>HelloWorld: %s</info>', $name); $output->writeln($message); }
php
protected function execute(InputInterface $input, OutputInterface $output) { $name = $input->getOption('name'); $message = sprintf('<info>HelloWorld: %s</info>', $name); $output->writeln($message); }
[ "protected", "function", "execute", "(", "InputInterface", "$", "input", ",", "OutputInterface", "$", "output", ")", "{", "$", "name", "=", "$", "input", "->", "getOption", "(", "'name'", ")", ";", "$", "message", "=", "sprintf", "(", "'<info>HelloWorld: %s<...
The actual task is defined in this method. Here you can access any option or argument that was defined on the command line via $input and write anything to the console via $output argument. In case anything went wrong during the execution you should throw an exception to make sure the user will get a useful error messa...
[ "The", "actual", "task", "is", "defined", "in", "this", "method", ".", "Here", "you", "can", "access", "any", "option", "or", "argument", "that", "was", "defined", "on", "the", "command", "line", "via", "$input", "and", "write", "anything", "to", "the", ...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/ExampleCommand/Commands/HelloWorld.php#L47-L54
train
Display the message of the user
[ 30522, 5123, 3853, 15389, 1006, 7953, 18447, 2121, 12172, 1002, 7953, 1010, 6434, 18447, 2121, 12172, 1002, 6434, 1007, 1063, 1002, 2171, 1027, 1002, 7953, 1011, 1028, 2131, 7361, 3508, 1006, 1005, 2171, 1005, 1007, 1025, 1002, 4471, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Mime/Decode.php
Zend_Mime_Decode.splitMessageStruct
public static function splitMessageStruct($message, $boundary, $EOL = Zend_Mime::LINEEND) { $parts = self::splitMime($message, $boundary); if (count($parts) <= 0) { return null; } $result = array(); foreach ($parts as $part) { self::splitMessage($part,...
php
public static function splitMessageStruct($message, $boundary, $EOL = Zend_Mime::LINEEND) { $parts = self::splitMime($message, $boundary); if (count($parts) <= 0) { return null; } $result = array(); foreach ($parts as $part) { self::splitMessage($part,...
[ "public", "static", "function", "splitMessageStruct", "(", "$", "message", ",", "$", "boundary", ",", "$", "EOL", "=", "Zend_Mime", "::", "LINEEND", ")", "{", "$", "parts", "=", "self", "::", "splitMime", "(", "$", "message", ",", "$", "boundary", ")", ...
decodes a mime encoded String and returns a struct of parts with header and body @param string $message raw message content @param string $boundary boundary as found in content-type @param string $EOL EOL string; defaults to {@link Zend_Mime::LINEEND} @return array|null parts as array('header' => array(name => val...
[ "decodes", "a", "mime", "encoded", "String", "and", "returns", "a", "struct", "of", "parts", "with", "header", "and", "body" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mime/Decode.php#L90-L103
train
Split message into parts
[ 30522, 2270, 10763, 3853, 3975, 7834, 3736, 8449, 18300, 1006, 1002, 4471, 1010, 1002, 6192, 1010, 1002, 1041, 4747, 1027, 16729, 2094, 1035, 2771, 4168, 1024, 1024, 2240, 10497, 1007, 1063, 1002, 3033, 1027, 2969, 1024, 1024, 3975, 4328, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Mail/Message.php
Message.embed
public function embed($file) { if (isset($this->embeddedFiles[$file])) { return $this->embeddedFiles[$file]; } return $this->embeddedFiles[$file] = $this->swift->embed( Swift_Image::fromPath($file) ); }
php
public function embed($file) { if (isset($this->embeddedFiles[$file])) { return $this->embeddedFiles[$file]; } return $this->embeddedFiles[$file] = $this->swift->embed( Swift_Image::fromPath($file) ); }
[ "public", "function", "embed", "(", "$", "file", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "embeddedFiles", "[", "$", "file", "]", ")", ")", "{", "return", "$", "this", "->", "embeddedFiles", "[", "$", "file", "]", ";", "}", "return", ...
Embed a file in the message and get the CID. @param string $file @return string
[ "Embed", "a", "file", "in", "the", "message", "and", "get", "the", "CID", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Mail/Message.php#L254-L263
train
Embed an image into the stack.
[ 30522, 2270, 3853, 7861, 8270, 1006, 1002, 5371, 1007, 1063, 2065, 1006, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 11157, 8873, 4244, 1031, 1002, 5371, 1033, 1007, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 11157, 8873, 4244, 1031, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Foundation/Auth/Access/AuthorizesRequests.php
AuthorizesRequests.authorize
public function authorize($ability, $arguments = []) { [$ability, $arguments] = $this->parseAbilityAndArguments($ability, $arguments); return app(Gate::class)->authorize($ability, $arguments); }
php
public function authorize($ability, $arguments = []) { [$ability, $arguments] = $this->parseAbilityAndArguments($ability, $arguments); return app(Gate::class)->authorize($ability, $arguments); }
[ "public", "function", "authorize", "(", "$", "ability", ",", "$", "arguments", "=", "[", "]", ")", "{", "[", "$", "ability", ",", "$", "arguments", "]", "=", "$", "this", "->", "parseAbilityAndArguments", "(", "$", "ability", ",", "$", "arguments", ")"...
Authorize a given action for the current user. @param mixed $ability @param mixed|array $arguments @return \Illuminate\Auth\Access\Response @throws \Illuminate\Auth\Access\AuthorizationException
[ "Authorize", "a", "given", "action", "for", "the", "current", "user", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Auth/Access/AuthorizesRequests.php#L19-L24
train
Authorize the user with the given ability and arguments.
[ 30522, 2270, 3853, 3166, 4697, 1006, 1002, 3754, 1010, 1002, 9918, 1027, 1031, 1033, 1007, 1063, 1031, 1002, 3754, 1010, 1002, 9918, 1033, 1027, 1002, 2023, 1011, 1028, 11968, 17310, 8553, 13832, 10623, 27417, 3215, 1006, 1002, 3754, 1010, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Tracker/Db/Mysqli.php
Mysqli.fetchAll
public function fetchAll($query, $parameters = array()) { try { if (self::$profiling) { $timer = $this->initProfiler(); } $rows = array(); $query = $this->prepare($query, $parameters); $rs = mysqli_query($this->connection, $query);...
php
public function fetchAll($query, $parameters = array()) { try { if (self::$profiling) { $timer = $this->initProfiler(); } $rows = array(); $query = $this->prepare($query, $parameters); $rs = mysqli_query($this->connection, $query);...
[ "public", "function", "fetchAll", "(", "$", "query", ",", "$", "parameters", "=", "array", "(", ")", ")", "{", "try", "{", "if", "(", "self", "::", "$", "profiling", ")", "{", "$", "timer", "=", "$", "this", "->", "initProfiler", "(", ")", ";", "...
Returns an array containing all the rows of a query result, using optional bound parameters. @see query() @param string $query Query @param array $parameters Parameters to bind @return array @throws Exception|DbException if an exception occurred
[ "Returns", "an", "array", "containing", "all", "the", "rows", "of", "a", "query", "result", "using", "optional", "bound", "parameters", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Tracker/Db/Mysqli.php#L161-L187
train
Fetches all rows from the result set of a query
[ 30522, 2270, 3853, 18584, 8095, 1006, 1002, 23032, 1010, 1002, 11709, 1027, 9140, 1006, 1007, 1007, 1063, 3046, 1063, 2065, 1006, 2969, 1024, 1024, 1002, 11268, 16281, 1007, 1063, 1002, 25309, 1027, 1002, 2023, 1011, 1028, 1999, 4183, 21572...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Form/FormRenderer.php
FormRenderer.searchAndRenderBlock
public function searchAndRenderBlock(FormView $view, $blockNameSuffix, array $variables = []) { $renderOnlyOnce = 'row' === $blockNameSuffix || 'widget' === $blockNameSuffix; if ($renderOnlyOnce && $view->isRendered()) { // This is not allowed, because it would result in rendering same ...
php
public function searchAndRenderBlock(FormView $view, $blockNameSuffix, array $variables = []) { $renderOnlyOnce = 'row' === $blockNameSuffix || 'widget' === $blockNameSuffix; if ($renderOnlyOnce && $view->isRendered()) { // This is not allowed, because it would result in rendering same ...
[ "public", "function", "searchAndRenderBlock", "(", "FormView", "$", "view", ",", "$", "blockNameSuffix", ",", "array", "$", "variables", "=", "[", "]", ")", "{", "$", "renderOnlyOnce", "=", "'row'", "===", "$", "blockNameSuffix", "||", "'widget'", "===", "$"...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/FormRenderer.php#L130-L280
train
Returns the HTML code for the given block name suffix.
[ 30522, 2270, 3853, 3945, 5685, 7389, 4063, 23467, 1006, 2433, 8584, 1002, 3193, 1010, 1002, 3796, 18442, 6342, 26989, 2595, 1010, 9140, 1002, 10857, 1027, 1031, 1033, 1007, 1063, 1002, 17552, 2239, 2135, 2239, 3401, 1027, 1005, 5216, 1005, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Scheduler/Scheduler.php
Scheduler.isCrontabSetup
public function isCrontabSetup() { $process = new Process('crontab -l'); $process->run(); if ($process->isSuccessful()) { $output = $process->getOutput(); return preg_match('$bin\/grav schedule$', $output) ? 1 : 0; } $error = $process->getErrorOutpu...
php
public function isCrontabSetup() { $process = new Process('crontab -l'); $process->run(); if ($process->isSuccessful()) { $output = $process->getOutput(); return preg_match('$bin\/grav schedule$', $output) ? 1 : 0; } $error = $process->getErrorOutpu...
[ "public", "function", "isCrontabSetup", "(", ")", "{", "$", "process", "=", "new", "Process", "(", "'crontab -l'", ")", ";", "$", "process", "->", "run", "(", ")", ";", "if", "(", "$", "process", "->", "isSuccessful", "(", ")", ")", "{", "$", "output...
Helper to determine if cron job is setup @return int
[ "Helper", "to", "determine", "if", "cron", "job", "is", "setup" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Scheduler/Scheduler.php#L247-L261
train
Check if crontab is setup
[ 30522, 2270, 3853, 2003, 26775, 12162, 7875, 13462, 6279, 1006, 1007, 1063, 1002, 2832, 1027, 2047, 2832, 1006, 1005, 13675, 12162, 7875, 1011, 1048, 1005, 1007, 1025, 1002, 2832, 1011, 1028, 2448, 1006, 1007, 1025, 2065, 1006, 1002, 2832, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Tracker/VisitExcluded.php
VisitExcluded.isUrlExcluded
protected function isUrlExcluded() { $excludedUrls = $this->getAttributes('exclude_unknown_urls', null); $siteUrls = $this->getAttributes('urls', null); if (!empty($excludedUrls) && !empty($siteUrls)) { $url = $this->request->getParam('url'); $parsedUrl = parse_url($...
php
protected function isUrlExcluded() { $excludedUrls = $this->getAttributes('exclude_unknown_urls', null); $siteUrls = $this->getAttributes('urls', null); if (!empty($excludedUrls) && !empty($siteUrls)) { $url = $this->request->getParam('url'); $parsedUrl = parse_url($...
[ "protected", "function", "isUrlExcluded", "(", ")", "{", "$", "excludedUrls", "=", "$", "this", "->", "getAttributes", "(", "'exclude_unknown_urls'", ",", "null", ")", ";", "$", "siteUrls", "=", "$", "this", "->", "getAttributes", "(", "'urls'", ",", "null",...
Checks if request URL is excluded @return bool
[ "Checks", "if", "request", "URL", "is", "excluded" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Tracker/VisitExcluded.php#L312-L331
train
Is url excluded?
[ 30522, 5123, 3853, 2003, 3126, 2571, 2595, 20464, 13936, 1006, 1007, 1063, 1002, 12421, 3126, 4877, 1027, 1002, 2023, 1011, 1028, 2131, 19321, 3089, 8569, 4570, 1006, 1005, 23329, 1035, 4242, 1035, 24471, 4877, 1005, 1010, 19701, 1007, 1025...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Db/Adapter.php
Adapter.getAdapterClassName
private static function getAdapterClassName($adapterName) { $className = 'Piwik\Db\Adapter\\' . str_replace(' ', '\\', ucwords(str_replace(array('_', '\\'), ' ', strtolower($adapterName)))); if (!class_exists($className)) { throw new \Exception(sprintf("Adapter '%s' is not valid. Maybe c...
php
private static function getAdapterClassName($adapterName) { $className = 'Piwik\Db\Adapter\\' . str_replace(' ', '\\', ucwords(str_replace(array('_', '\\'), ' ', strtolower($adapterName)))); if (!class_exists($className)) { throw new \Exception(sprintf("Adapter '%s' is not valid. Maybe c...
[ "private", "static", "function", "getAdapterClassName", "(", "$", "adapterName", ")", "{", "$", "className", "=", "'Piwik\\Db\\Adapter\\\\'", ".", "str_replace", "(", "' '", ",", "'\\\\'", ",", "ucwords", "(", "str_replace", "(", "array", "(", "'_'", ",", "'\\...
Get adapter class name @param string $adapterName @return string @throws \Exception
[ "Get", "adapter", "class", "name" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Db/Adapter.php#L68-L75
train
Get adapter class name
[ 30522, 2797, 10763, 3853, 2131, 8447, 13876, 2121, 26266, 18442, 1006, 1002, 15581, 11795, 14074, 1007, 1063, 1002, 2465, 18442, 1027, 1005, 14255, 9148, 2243, 1032, 16962, 1032, 15581, 2121, 1032, 1032, 1005, 1012, 2358, 2099, 1035, 5672, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Plugin/Manager.php
Manager.getThemeEnabled
public function getThemeEnabled() { $plugins = $this->getLoadedPlugins(); $theme = false; foreach ($plugins as $plugin) { /* @var $plugin Plugin */ if ($plugin->isTheme() && $this->isPluginActivated($plugin->getPluginName()) ) { ...
php
public function getThemeEnabled() { $plugins = $this->getLoadedPlugins(); $theme = false; foreach ($plugins as $plugin) { /* @var $plugin Plugin */ if ($plugin->isTheme() && $this->isPluginActivated($plugin->getPluginName()) ) { ...
[ "public", "function", "getThemeEnabled", "(", ")", "{", "$", "plugins", "=", "$", "this", "->", "getLoadedPlugins", "(", ")", ";", "$", "theme", "=", "false", ";", "foreach", "(", "$", "plugins", "as", "$", "plugin", ")", "{", "/* @var $plugin Plugin */", ...
Returns the currently enabled theme. If no theme is enabled, the **Morpheus** plugin is returned (this is the base and default theme). @return Plugin @api
[ "Returns", "the", "currently", "enabled", "theme", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Plugin/Manager.php#L689-L706
train
Get the enabled theme
[ 30522, 2270, 3853, 2131, 10760, 4168, 8189, 23242, 1006, 1007, 1063, 1002, 13354, 7076, 1027, 1002, 2023, 1011, 1028, 2131, 17468, 24759, 15916, 7076, 1006, 1007, 1025, 1002, 4323, 1027, 6270, 1025, 18921, 6776, 1006, 1002, 13354, 7076, 200...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Form/Form.php
Form.getNormData
public function getNormData() { if ($this->inheritData) { if (!$this->parent) { throw new RuntimeException('The form is configured to inherit its parent\'s data, but does not have a parent.'); } return $this->parent->getNormData(); } if (...
php
public function getNormData() { if ($this->inheritData) { if (!$this->parent) { throw new RuntimeException('The form is configured to inherit its parent\'s data, but does not have a parent.'); } return $this->parent->getNormData(); } if (...
[ "public", "function", "getNormData", "(", ")", "{", "if", "(", "$", "this", "->", "inheritData", ")", "{", "if", "(", "!", "$", "this", "->", "parent", ")", "{", "throw", "new", "RuntimeException", "(", "'The form is configured to inherit its parent\\'s data, bu...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/Form.php#L416-L435
train
Returns the form data
[ 30522, 2270, 3853, 2131, 12131, 26876, 6790, 1006, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 22490, 2850, 2696, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 6687, 1007, 1063, 5466, 2047, 2448, 7292, 10288, 24422, 1006, 1005, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select.having
public function having($cond, $value = null, $type = null) { if ($value !== null) { $cond = $this->_adapter->quoteInto($cond, $value, $type); } if ($this->_parts[self::HAVING]) { $this->_parts[self::HAVING][] = self::SQL_AND . " ($cond)"; } else { ...
php
public function having($cond, $value = null, $type = null) { if ($value !== null) { $cond = $this->_adapter->quoteInto($cond, $value, $type); } if ($this->_parts[self::HAVING]) { $this->_parts[self::HAVING][] = self::SQL_AND . " ($cond)"; } else { ...
[ "public", "function", "having", "(", "$", "cond", ",", "$", "value", "=", "null", ",", "$", "type", "=", "null", ")", "{", "if", "(", "$", "value", "!==", "null", ")", "{", "$", "cond", "=", "$", "this", "->", "_adapter", "->", "quoteInto", "(", ...
Adds a HAVING condition to the query by AND. If a value is passed as the second param, it will be quoted and replaced into the condition wherever a question-mark appears. See {@link where()} for an example @param string $cond The HAVING condition. @param mixed $value OPTIONAL The value to quote into the condition....
[ "Adds", "a", "HAVING", "condition", "to", "the", "query", "by", "AND", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L533-L546
train
Add having clause
[ 30522, 2270, 3853, 2383, 1006, 1002, 9530, 2094, 1010, 1002, 3643, 1027, 19701, 1010, 1002, 2828, 1027, 19701, 1007, 1063, 2065, 1006, 1002, 3643, 999, 1027, 1027, 19701, 1007, 1063, 1002, 9530, 2094, 1027, 1002, 2023, 1011, 1028, 1035, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Validation/ValidationData.php
ValidationData.extractValuesForWildcards
protected static function extractValuesForWildcards($masterData, $data, $attribute) { $keys = []; $pattern = str_replace('\*', '[^\.]+', preg_quote($attribute)); foreach ($data as $key => $value) { if ((bool) preg_match('/^'.$pattern.'/', $key, $matches)) { $key...
php
protected static function extractValuesForWildcards($masterData, $data, $attribute) { $keys = []; $pattern = str_replace('\*', '[^\.]+', preg_quote($attribute)); foreach ($data as $key => $value) { if ((bool) preg_match('/^'.$pattern.'/', $key, $matches)) { $key...
[ "protected", "static", "function", "extractValuesForWildcards", "(", "$", "masterData", ",", "$", "data", ",", "$", "attribute", ")", "{", "$", "keys", "=", "[", "]", ";", "$", "pattern", "=", "str_replace", "(", "'\\*'", ",", "'[^\\.]+'", ",", "preg_quote...
Get all of the exact attribute values for a given wildcard attribute. @param array $masterData @param array $data @param string $attribute @return array
[ "Get", "all", "of", "the", "exact", "attribute", "values", "for", "a", "given", "wildcard", "attribute", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/ValidationData.php#L54-L75
train
Extract values for wildcards
[ 30522, 5123, 10763, 3853, 14817, 10175, 15808, 29278, 29602, 16409, 18117, 1006, 1002, 3040, 2850, 2696, 1010, 1002, 2951, 1010, 1002, 17961, 1007, 1063, 1002, 6309, 1027, 1031, 1033, 1025, 1002, 5418, 1027, 2358, 2099, 1035, 5672, 1006, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/cms/twig/Loader.php
Loader.getCacheKey
public function getCacheKey($name) { if (!$this->validateCmsObject($name)) { return parent::getCacheKey($name); } return $this->obj->getTwigCacheKey(); }
php
public function getCacheKey($name) { if (!$this->validateCmsObject($name)) { return parent::getCacheKey($name); } return $this->obj->getTwigCacheKey(); }
[ "public", "function", "getCacheKey", "(", "$", "name", ")", "{", "if", "(", "!", "$", "this", "->", "validateCmsObject", "(", "$", "name", ")", ")", "{", "return", "parent", "::", "getCacheKey", "(", "$", "name", ")", ";", "}", "return", "$", "this",...
Returns the Twig cache key.
[ "Returns", "the", "Twig", "cache", "key", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/twig/Loader.php#L69-L76
train
Returns the cache key for the given CMS object.
[ 30522, 2270, 3853, 2131, 3540, 5403, 14839, 1006, 1002, 2171, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 9398, 3686, 27487, 6499, 2497, 20614, 1006, 1002, 2171, 1007, 1007, 1063, 2709, 6687, 1024, 1024, 2131, 3540, 5403, 14839, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Routing/Router.php
Router.getBindingCallback
public function getBindingCallback($key) { if (isset($this->binders[$key = str_replace('-', '_', $key)])) { return $this->binders[$key]; } }
php
public function getBindingCallback($key) { if (isset($this->binders[$key = str_replace('-', '_', $key)])) { return $this->binders[$key]; } }
[ "public", "function", "getBindingCallback", "(", "$", "key", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "binders", "[", "$", "key", "=", "str_replace", "(", "'-'", ",", "'_'", ",", "$", "key", ")", "]", ")", ")", "{", "return", "$", "t...
Get the binding callback for a given binding. @param string $key @return \Closure|null
[ "Get", "the", "binding", "callback", "for", "a", "given", "binding", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/Router.php#L948-L953
train
Get the binding callback for a given key
[ 30522, 2270, 3853, 2131, 8428, 4667, 9289, 20850, 8684, 1006, 1002, 3145, 1007, 1063, 2065, 1006, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 14187, 2545, 1031, 1002, 3145, 1027, 2358, 2099, 1035, 5672, 1006, 1005, 1011, 1005, 1010, 1005, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select.limitPage
public function limitPage($page, $rowCount) { $page = ($page > 0) ? $page : 1; $rowCount = ($rowCount > 0) ? $rowCount : 1; $this->_parts[self::LIMIT_COUNT] = (int) $rowCount; $this->_parts[self::LIMIT_OFFSET] = (int) $rowCount * ($page - 1); return $this; }
php
public function limitPage($page, $rowCount) { $page = ($page > 0) ? $page : 1; $rowCount = ($rowCount > 0) ? $rowCount : 1; $this->_parts[self::LIMIT_COUNT] = (int) $rowCount; $this->_parts[self::LIMIT_OFFSET] = (int) $rowCount * ($page - 1); return $this; }
[ "public", "function", "limitPage", "(", "$", "page", ",", "$", "rowCount", ")", "{", "$", "page", "=", "(", "$", "page", ">", "0", ")", "?", "$", "page", ":", "1", ";", "$", "rowCount", "=", "(", "$", "rowCount", ">", "0", ")", "?", "$", "row...
Sets the limit and count by page number. @param int $page Limit results to this page number. @param int $rowCount Use this many rows per page. @return Zend_Db_Select This Zend_Db_Select object.
[ "Sets", "the", "limit", "and", "count", "by", "page", "number", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L635-L642
train
Limit the number of rows to a certain page
[ 30522, 2270, 3853, 5787, 13704, 1006, 1002, 3931, 1010, 1002, 5216, 3597, 16671, 1007, 1063, 1002, 3931, 1027, 1006, 1002, 3931, 1028, 1014, 1007, 1029, 1002, 3931, 1024, 1015, 1025, 1002, 5216, 3597, 16671, 1027, 1006, 1002, 5216, 3597, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php
ArrayNodeDefinition.validateConcreteNode
protected function validateConcreteNode(ArrayNode $node) { $path = $node->getPath(); if (null !== $this->key) { throw new InvalidDefinitionException(sprintf('->useAttributeAsKey() is not applicable to concrete nodes at path "%s"', $path)); } if (false === $this->allowEm...
php
protected function validateConcreteNode(ArrayNode $node) { $path = $node->getPath(); if (null !== $this->key) { throw new InvalidDefinitionException(sprintf('->useAttributeAsKey() is not applicable to concrete nodes at path "%s"', $path)); } if (false === $this->allowEm...
[ "protected", "function", "validateConcreteNode", "(", "ArrayNode", "$", "node", ")", "{", "$", "path", "=", "$", "node", "->", "getPath", "(", ")", ";", "if", "(", "null", "!==", "$", "this", "->", "key", ")", "{", "throw", "new", "InvalidDefinitionExcep...
Validate the configuration of a concrete node. @throws InvalidDefinitionException
[ "Validate", "the", "configuration", "of", "a", "concrete", "node", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php#L466-L489
train
Validate concrete node
[ 30522, 5123, 3853, 9398, 3686, 8663, 16748, 6528, 10244, 1006, 9140, 3630, 3207, 1002, 13045, 1007, 1063, 1002, 4130, 1027, 1002, 13045, 1011, 1028, 2131, 15069, 1006, 1007, 1025, 2065, 1006, 19701, 999, 1027, 1027, 1002, 2023, 1011, 1028, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Filechecks.php
Filechecks.getErrorMessageMissingPermissions
public static function getErrorMessageMissingPermissions($path) { $message = "Please check that the web server has enough permission to write to these files/directories:<br />"; if (SettingsServer::isWindows()) { $message .= "On Windows, check that the folder is not read only and is wri...
php
public static function getErrorMessageMissingPermissions($path) { $message = "Please check that the web server has enough permission to write to these files/directories:<br />"; if (SettingsServer::isWindows()) { $message .= "On Windows, check that the folder is not read only and is wri...
[ "public", "static", "function", "getErrorMessageMissingPermissions", "(", "$", "path", ")", "{", "$", "message", "=", "\"Please check that the web server has enough permission to write to these files/directories:<br />\"", ";", "if", "(", "SettingsServer", "::", "isWindows", "(...
Returns friendly error message explaining how to fix permissions @param string $path to the directory missing permissions @return string Error message
[ "Returns", "friendly", "error", "message", "explaining", "how", "to", "fix", "permissions" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Filechecks.php#L126-L143
train
Get the error message for missing permissions
[ 30522, 2270, 10763, 3853, 2131, 2121, 29165, 7834, 3736, 3351, 15630, 7741, 4842, 25481, 2015, 1006, 1002, 4130, 1007, 1063, 1002, 4471, 1027, 1000, 3531, 4638, 2008, 1996, 4773, 8241, 2038, 2438, 6656, 2000, 4339, 2000, 2122, 6764, 1013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/backend/classes/ListColumn.php
ListColumn.getId
public function getId($suffix = null) { $id = 'column'; $id .= '-'.$this->columnName; if ($suffix) { $id .= '-'.$suffix; } return HtmlHelper::nameToId($id); }
php
public function getId($suffix = null) { $id = 'column'; $id .= '-'.$this->columnName; if ($suffix) { $id .= '-'.$suffix; } return HtmlHelper::nameToId($id); }
[ "public", "function", "getId", "(", "$", "suffix", "=", "null", ")", "{", "$", "id", "=", "'column'", ";", "$", "id", ".=", "'-'", ".", "$", "this", "->", "columnName", ";", "if", "(", "$", "suffix", ")", "{", "$", "id", ".=", "'-'", ".", "$", ...
Returns a value suitable for the column id property. @param string $suffix Specify a suffix string @return string
[ "Returns", "a", "value", "suitable", "for", "the", "column", "id", "property", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/classes/ListColumn.php#L192-L203
train
Returns the column id
[ 30522, 2270, 3853, 2131, 3593, 1006, 1002, 16809, 1027, 19701, 1007, 1063, 1002, 8909, 1027, 1005, 5930, 1005, 1025, 1002, 8909, 1012, 1027, 1005, 1011, 1005, 1012, 1002, 2023, 1011, 1028, 5930, 18442, 1025, 2065, 1006, 1002, 16809, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/DependencyInjection/EnvVarProcessor.php
EnvVarProcessor.getEnv
public function getEnv($prefix, $name, \Closure $getEnv) { $i = strpos($name, ':'); if ('key' === $prefix) { if (false === $i) { throw new RuntimeException(sprintf('Invalid env "key:%s": a key specifier should be provided.', $name)); } $next = su...
php
public function getEnv($prefix, $name, \Closure $getEnv) { $i = strpos($name, ':'); if ('key' === $prefix) { if (false === $i) { throw new RuntimeException(sprintf('Invalid env "key:%s": a key specifier should be provided.', $name)); } $next = su...
[ "public", "function", "getEnv", "(", "$", "prefix", ",", "$", "name", ",", "\\", "Closure", "$", "getEnv", ")", "{", "$", "i", "=", "strpos", "(", "$", "name", ",", "':'", ")", ";", "if", "(", "'key'", "===", "$", "prefix", ")", "{", "if", "(",...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/EnvVarProcessor.php#L57-L247
train
Get the value of an environment variable.
[ 30522, 2270, 3853, 2131, 2368, 2615, 1006, 1002, 17576, 1010, 1002, 2171, 1010, 1032, 8503, 1002, 2131, 2368, 2615, 1007, 1063, 1002, 1045, 1027, 2358, 14536, 2891, 1006, 1002, 2171, 1010, 1005, 1024, 1005, 1007, 1025, 2065, 1006, 1005, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Page/Page.php
Page.eTag
public function eTag($var = null) { if ($var !== null) { $this->etag = $var; } if (!isset($this->etag)) { $this->etag = (bool)Grav::instance()['config']->get('system.pages.etag'); } return $this->etag; }
php
public function eTag($var = null) { if ($var !== null) { $this->etag = $var; } if (!isset($this->etag)) { $this->etag = (bool)Grav::instance()['config']->get('system.pages.etag'); } return $this->etag; }
[ "public", "function", "eTag", "(", "$", "var", "=", "null", ")", "{", "if", "(", "$", "var", "!==", "null", ")", "{", "$", "this", "->", "etag", "=", "$", "var", ";", "}", "if", "(", "!", "isset", "(", "$", "this", "->", "etag", ")", ")", "...
Gets and sets the option to show the etag header for the page. @param bool $var show etag header @return bool show etag header
[ "Gets", "and", "sets", "the", "option", "to", "show", "the", "etag", "header", "for", "the", "page", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Page/Page.php#L2053-L2063
train
Get the tag flag
[ 30522, 2270, 3853, 27859, 2290, 1006, 1002, 13075, 1027, 19701, 1007, 1063, 2065, 1006, 1002, 13075, 999, 30524, 999, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 27859, 2290, 1007, 1007, 1063, 1002, 2023, 1011, 1028, 27859, 2290, 1027, 1006,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/cms/classes/CodeParser.php
CodeParser.extractClassFromFile
protected function extractClassFromFile($path) { $fileContent = file_get_contents($path); $matches = []; $pattern = '/Cms\S+_\S+Class/'; preg_match($pattern, $fileContent, $matches); if (!empty($matches[0])) { return $matches[0]; } return null; ...
php
protected function extractClassFromFile($path) { $fileContent = file_get_contents($path); $matches = []; $pattern = '/Cms\S+_\S+Class/'; preg_match($pattern, $fileContent, $matches); if (!empty($matches[0])) { return $matches[0]; } return null; ...
[ "protected", "function", "extractClassFromFile", "(", "$", "path", ")", "{", "$", "fileContent", "=", "file_get_contents", "(", "$", "path", ")", ";", "$", "matches", "=", "[", "]", ";", "$", "pattern", "=", "'/Cms\\S+_\\S+Class/'", ";", "preg_match", "(", ...
Extracts the class name from a cache file @return string
[ "Extracts", "the", "class", "name", "from", "a", "cache", "file" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/classes/CodeParser.php#L296-L308
train
Extracts the class from a file
[ 30522, 5123, 3853, 14817, 26266, 19699, 5358, 8873, 2571, 1006, 1002, 4130, 1007, 1063, 1002, 5371, 8663, 6528, 2102, 1027, 5371, 1035, 2131, 1035, 8417, 1006, 1002, 4130, 1007, 1025, 1002, 3503, 1027, 1031, 1033, 1025, 1002, 5418, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
overtrue/wechat
src/OfficialAccount/Card/CodeClient.php
CodeClient.disable
public function disable(string $code, string $cardId = '') { $params = [ 'code' => $code, 'card_id' => $cardId, ]; return $this->httpPostJson('card/code/unavailable', $params); }
php
public function disable(string $code, string $cardId = '') { $params = [ 'code' => $code, 'card_id' => $cardId, ]; return $this->httpPostJson('card/code/unavailable', $params); }
[ "public", "function", "disable", "(", "string", "$", "code", ",", "string", "$", "cardId", "=", "''", ")", "{", "$", "params", "=", "[", "'code'", "=>", "$", "code", ",", "'card_id'", "=>", "$", "cardId", ",", "]", ";", "return", "$", "this", "->",...
设置卡券失效. @param string $code @param string $cardId @return mixed
[ "设置卡券失效", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/Card/CodeClient.php#L123-L131
train
Disable a card code
[ 30522, 2270, 3853, 4487, 19150, 1006, 5164, 1002, 3642, 1010, 5164, 1002, 4003, 3593, 1027, 1005, 1005, 1007, 1063, 1002, 11498, 5244, 1027, 1031, 1005, 3642, 1005, 1027, 1028, 1002, 3642, 1010, 1005, 4003, 1035, 8909, 1005, 1027, 1028, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/DatabaseServiceProvider.php
DatabaseServiceProvider.registerConnectionServices
protected function registerConnectionServices() { // The connection factory is used to create the actual connection instances on // the database. We will inject the factory into the manager so that it may // make the connections while they are actually needed and not of before. $this...
php
protected function registerConnectionServices() { // The connection factory is used to create the actual connection instances on // the database. We will inject the factory into the manager so that it may // make the connections while they are actually needed and not of before. $this...
[ "protected", "function", "registerConnectionServices", "(", ")", "{", "// The connection factory is used to create the actual connection instances on", "// the database. We will inject the factory into the manager so that it may", "// make the connections while they are actually needed and not of be...
Register the primary database bindings. @return void
[ "Register", "the", "primary", "database", "bindings", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/DatabaseServiceProvider.php#L49-L68
train
Registers connection services
[ 30522, 5123, 3853, 4236, 8663, 2638, 22014, 2121, 7903, 2229, 1006, 1007, 1063, 1013, 1013, 1996, 4434, 4713, 2003, 2109, 2000, 3443, 1996, 5025, 4434, 12107, 2006, 1013, 1013, 1996, 7809, 1012, 2057, 2097, 1999, 20614, 1996, 4713, 2046, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Eloquent/Builder.php
Builder.isNestedUnder
protected function isNestedUnder($relation, $name) { return Str::contains($name, '.') && Str::startsWith($name, $relation.'.'); }
php
protected function isNestedUnder($relation, $name) { return Str::contains($name, '.') && Str::startsWith($name, $relation.'.'); }
[ "protected", "function", "isNestedUnder", "(", "$", "relation", ",", "$", "name", ")", "{", "return", "Str", "::", "contains", "(", "$", "name", ",", "'.'", ")", "&&", "Str", "::", "startsWith", "(", "$", "name", ",", "$", "relation", ".", "'.'", ")"...
Determine if the relationship is nested. @param string $relation @param string $name @return bool
[ "Determine", "if", "the", "relationship", "is", "nested", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Builder.php#L631-L634
train
Checks if the name of the relation is nested under the relation name
[ 30522, 5123, 3853, 3475, 17944, 20824, 1006, 1002, 7189, 1010, 1002, 2171, 1007, 1063, 2709, 2358, 2099, 1024, 1024, 3397, 1006, 1002, 2171, 1010, 1005, 1012, 1005, 1007, 1004, 1004, 2358, 2099, 1024, 1024, 4627, 24415, 1006, 1002, 2171, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Cache/Manager.php
Zend_Cache_Manager._mergeOptions
protected function _mergeOptions(array $current, array $options) { if (isset($options['frontend']['name'])) { $current['frontend']['name'] = $options['frontend']['name']; } if (isset($options['backend']['name'])) { $current['backend']['name'] = $options['backend']['na...
php
protected function _mergeOptions(array $current, array $options) { if (isset($options['frontend']['name'])) { $current['frontend']['name'] = $options['frontend']['name']; } if (isset($options['backend']['name'])) { $current['backend']['name'] = $options['backend']['na...
[ "protected", "function", "_mergeOptions", "(", "array", "$", "current", ",", "array", "$", "options", ")", "{", "if", "(", "isset", "(", "$", "options", "[", "'frontend'", "]", "[", "'name'", "]", ")", ")", "{", "$", "current", "[", "'frontend'", "]", ...
Simple method to merge two configuration arrays @param array $current @param array $options @return array
[ "Simple", "method", "to", "merge", "two", "configuration", "arrays" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Cache/Manager.php#L278-L297
train
Merge options from frontend and backend
[ 30522, 5123, 3853, 1035, 13590, 7361, 9285, 1006, 9140, 1002, 2783, 1010, 9140, 1002, 7047, 1007, 1063, 2065, 1006, 26354, 3388, 1006, 1002, 7047, 1031, 1005, 2392, 10497, 1005, 1033, 1031, 1005, 2171, 1005, 1033, 1007, 1007, 1063, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/HTML/QuickForm2/Factory.php
HTML_QuickForm2_Factory.createElement
public static function createElement($type, $name = null, $attributes = null, array $data = array()) { $type = strtolower($type); if (!isset(self::$elementTypes[$type])) { throw new HTML_QuickForm2_InvalidArgumentException("Element type '$type' is...
php
public static function createElement($type, $name = null, $attributes = null, array $data = array()) { $type = strtolower($type); if (!isset(self::$elementTypes[$type])) { throw new HTML_QuickForm2_InvalidArgumentException("Element type '$type' is...
[ "public", "static", "function", "createElement", "(", "$", "type", ",", "$", "name", "=", "null", ",", "$", "attributes", "=", "null", ",", "array", "$", "data", "=", "array", "(", ")", ")", "{", "$", "type", "=", "strtolower", "(", "$", "type", ")...
Creates a new element object of the given type @param string Type name (treated case-insensitively) @param mixed Element name (passed to element's constructor) @param mixed Element attributes (passed to element's constructor) @param array Element-specific data (passed to element's constructor) @retu...
[ "Creates", "a", "new", "element", "object", "of", "the", "given", "type" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Factory.php#L161-L173
train
Creates an element of the given type
[ 30522, 2270, 10763, 3853, 3443, 12260, 3672, 1006, 1002, 2828, 1010, 1002, 2171, 1027, 19701, 1010, 1002, 12332, 1027, 19701, 1010, 9140, 1002, 2951, 1027, 9140, 1006, 1007, 1007, 1063, 1002, 2828, 1027, 2358, 5339, 12898, 13777, 1006, 1002...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Db.php
Db.segmentedQuery
public static function segmentedQuery($sql, $first, $last, $step, $params = array()) { if ($step > 0) { for ($i = $first; $i <= $last; $i += $step) { $currentParams = array_merge($params, array($i, $i + $step)); self::query($sql, $currentParams); } ...
php
public static function segmentedQuery($sql, $first, $last, $step, $params = array()) { if ($step > 0) { for ($i = $first; $i <= $last; $i += $step) { $currentParams = array_merge($params, array($i, $i + $step)); self::query($sql, $currentParams); } ...
[ "public", "static", "function", "segmentedQuery", "(", "$", "sql", ",", "$", "first", ",", "$", "last", ",", "$", "step", ",", "$", "params", "=", "array", "(", ")", ")", "{", "if", "(", "$", "step", ">", "0", ")", "{", "for", "(", "$", "i", ...
Performs a `UPDATE` or `DELETE` statement on a table one chunk at a time. This function will break up a query into several smaller queries by using only a limited number of rows at a time. This function should be used when executing a non-query statement will take a long time to finish. Using several smaller queries ...
[ "Performs", "a", "UPDATE", "or", "DELETE", "statement", "on", "a", "table", "one", "chunk", "at", "a", "time", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Db.php#L627-L640
train
Segmented query.
[ 30522, 2270, 10763, 3853, 6903, 2098, 4226, 2854, 1006, 1002, 29296, 1010, 1002, 2034, 1010, 1002, 2197, 1010, 1002, 3357, 1010, 1002, 11498, 5244, 1027, 9140, 1006, 1007, 1007, 1063, 2065, 1006, 1002, 3357, 1028, 1014, 1007, 1063, 2005, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/CoreAdminHome/Model/DuplicateActionRemover.php
DuplicateActionRemover.fixDuplicateActionsInTable
public function fixDuplicateActionsInTable($table, $realIdAction, $duplicateIdActions) { $idactionColumns = $this->getIdActionTableColumnsFromMetadata(); $idactionColumns = array_values($idactionColumns[$table]); $table = Common::prefixTable($table); $inFromIdsExpression = $this->ge...
php
public function fixDuplicateActionsInTable($table, $realIdAction, $duplicateIdActions) { $idactionColumns = $this->getIdActionTableColumnsFromMetadata(); $idactionColumns = array_values($idactionColumns[$table]); $table = Common::prefixTable($table); $inFromIdsExpression = $this->ge...
[ "public", "function", "fixDuplicateActionsInTable", "(", "$", "table", ",", "$", "realIdAction", ",", "$", "duplicateIdActions", ")", "{", "$", "idactionColumns", "=", "$", "this", "->", "getIdActionTableColumnsFromMetadata", "(", ")", ";", "$", "idactionColumns", ...
Executes one SQL statement that sets all idaction columns in a table to a single value, if the values of those columns are in the specified set (`$duplicateIdActions`). Notes: The SQL will look like: UPDATE $table SET col1 = IF((col1 IN ($duplicateIdActions)), $realIdAction, col1), col2 = IF((col2 IN ($duplicateIdAc...
[ "Executes", "one", "SQL", "statement", "that", "sets", "all", "idaction", "columns", "in", "a", "table", "to", "a", "single", "value", "if", "the", "values", "of", "those", "columns", "are", "in", "the", "specified", "set", "(", "$duplicateIdActions", ")", ...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/CoreAdminHome/Model/DuplicateActionRemover.php#L112-L131
train
Fix duplicate actions in a table
[ 30522, 2270, 3853, 8081, 8566, 24759, 24695, 18908, 8496, 18447, 3085, 1006, 1002, 2795, 1010, 1002, 2613, 8524, 7542, 1010, 1002, 24473, 8524, 22014, 1007, 1063, 1002, 16096, 7542, 25778, 2819, 3619, 1027, 1002, 2023, 1011, 1028, 2131, 852...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Form/FormErrorIterator.php
FormErrorIterator.seek
public function seek($position) { if (!isset($this->errors[$position])) { throw new OutOfBoundsException('The offset '.$position.' does not exist.'); } reset($this->errors); while ($position !== key($this->errors)) { next($this->errors); } }
php
public function seek($position) { if (!isset($this->errors[$position])) { throw new OutOfBoundsException('The offset '.$position.' does not exist.'); } reset($this->errors); while ($position !== key($this->errors)) { next($this->errors); } }
[ "public", "function", "seek", "(", "$", "position", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "errors", "[", "$", "position", "]", ")", ")", "{", "throw", "new", "OutOfBoundsException", "(", "'The offset '", ".", "$", "position", ".", ...
Sets the position of the iterator. @param int $position The new position @throws OutOfBoundsException If the position is invalid
[ "Sets", "the", "position", "of", "the", "iterator", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/FormErrorIterator.php#L239-L250
train
Seeks to the next error in the error array.
[ 30522, 2270, 3853, 6148, 1006, 1002, 30524, 2047, 2041, 11253, 15494, 3366, 2595, 24422, 1006, 1005, 1996, 16396, 1005, 1012, 1002, 2597, 1012, 1005, 2515, 2025, 4839, 1012, 1005, 1007, 1025, 1065, 25141, 1006, 1002, 2023, 1011, 1028, 10697...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
z-song/laravel-admin
src/Extension.php
Extension.createMenu
protected static function createMenu($title, $uri, $icon = 'fa-bars', $parentId = 0) { $menuModel = config('admin.database.menu_model'); $lastOrder = $menuModel::max('order'); $menuModel::create([ 'parent_id' => $parentId, 'order' => $lastOrder + 1, ...
php
protected static function createMenu($title, $uri, $icon = 'fa-bars', $parentId = 0) { $menuModel = config('admin.database.menu_model'); $lastOrder = $menuModel::max('order'); $menuModel::create([ 'parent_id' => $parentId, 'order' => $lastOrder + 1, ...
[ "protected", "static", "function", "createMenu", "(", "$", "title", ",", "$", "uri", ",", "$", "icon", "=", "'fa-bars'", ",", "$", "parentId", "=", "0", ")", "{", "$", "menuModel", "=", "config", "(", "'admin.database.menu_model'", ")", ";", "$", "lastOr...
Create a item in laravel-admin left side menu. @param string $title @param string $uri @param string $icon @param int $parentId
[ "Create", "a", "item", "in", "laravel", "-", "admin", "left", "side", "menu", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Extension.php#L303-L316
train
Create menu item
[ 30522, 5123, 10763, 3853, 3443, 3549, 2226, 1006, 1002, 2516, 1010, 1002, 24471, 2072, 1010, 1002, 12696, 1027, 1005, 6904, 1011, 6963, 1005, 1010, 30524, 9247, 1024, 1024, 3443, 1006, 1031, 1005, 6687, 1035, 8909, 1005, 1027, 1028, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Mail/Storage/Folder/Mbox.php
Zend_Mail_Storage_Folder_Mbox.getFolders
public function getFolders($rootFolder = null) { if (!$rootFolder) { return $this->_rootFolder; } $currentFolder = $this->_rootFolder; $subname = trim($rootFolder, DIRECTORY_SEPARATOR); while ($currentFolder) { @list($entry, $subname) = @explode(DIREC...
php
public function getFolders($rootFolder = null) { if (!$rootFolder) { return $this->_rootFolder; } $currentFolder = $this->_rootFolder; $subname = trim($rootFolder, DIRECTORY_SEPARATOR); while ($currentFolder) { @list($entry, $subname) = @explode(DIREC...
[ "public", "function", "getFolders", "(", "$", "rootFolder", "=", "null", ")", "{", "if", "(", "!", "$", "rootFolder", ")", "{", "return", "$", "this", "->", "_rootFolder", ";", "}", "$", "currentFolder", "=", "$", "this", "->", "_rootFolder", ";", "$",...
get root folder or given folder @param string $rootFolder get folder structure for given folder, else root @return Zend_Mail_Storage_Folder root or wanted folder @throws Zend_Mail_Storage_Exception
[ "get", "root", "folder", "or", "given", "folder" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail/Storage/Folder/Mbox.php#L165-L189
train
get all folders
[ 30522, 2270, 3853, 2131, 10371, 2545, 1006, 1002, 7117, 10371, 2121, 1027, 19701, 1007, 1063, 2065, 1006, 999, 1002, 7117, 10371, 2121, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 1035, 7117, 10371, 2121, 1025, 1065, 1002, 2783, 10371, 2121, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
z-song/laravel-admin
src/Grid/Tools/PerPageSelector.php
PerPageSelector.render
public function render() { Admin::script($this->script()); $options = $this->getOptions()->map(function ($option) { $selected = ($option == $this->perPage) ? 'selected' : ''; $url = app('request')->fullUrlWithQuery([$this->perPageName => $option]); return "<opti...
php
public function render() { Admin::script($this->script()); $options = $this->getOptions()->map(function ($option) { $selected = ($option == $this->perPage) ? 'selected' : ''; $url = app('request')->fullUrlWithQuery([$this->perPageName => $option]); return "<opti...
[ "public", "function", "render", "(", ")", "{", "Admin", "::", "script", "(", "$", "this", "->", "script", "(", ")", ")", ";", "$", "options", "=", "$", "this", "->", "getOptions", "(", ")", "->", "map", "(", "function", "(", "$", "option", ")", "...
Render PerPageSelector。 @return string
[ "Render", "PerPageSelector。" ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Grid/Tools/PerPageSelector.php#L66-L94
train
Render the page options
[ 30522, 2270, 3853, 17552, 1006, 1007, 1063, 4748, 10020, 1024, 1024, 5896, 1006, 1002, 2023, 1011, 1028, 5896, 1006, 1007, 1007, 1025, 1002, 7047, 1027, 1002, 2023, 1011, 1028, 2131, 7361, 9285, 1006, 1007, 1011, 1028, 4949, 1006, 3853, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Routing/Loader/PhpFileLoader.php
PhpFileLoader.load
public function load($file, $type = null) { $path = $this->locator->locate($file); $this->setCurrentDir(\dirname($path)); // the closure forbids access to the private scope in the included file $loader = $this; $load = \Closure::bind(function ($file) use ($loader) { ...
php
public function load($file, $type = null) { $path = $this->locator->locate($file); $this->setCurrentDir(\dirname($path)); // the closure forbids access to the private scope in the included file $loader = $this; $load = \Closure::bind(function ($file) use ($loader) { ...
[ "public", "function", "load", "(", "$", "file", ",", "$", "type", "=", "null", ")", "{", "$", "path", "=", "$", "this", "->", "locator", "->", "locate", "(", "$", "file", ")", ";", "$", "this", "->", "setCurrentDir", "(", "\\", "dirname", "(", "$...
Loads a PHP file. @param string $file A PHP file path @param string|null $type The resource type @return RouteCollection A RouteCollection instance
[ "Loads", "a", "PHP", "file", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Routing/Loader/PhpFileLoader.php#L36-L59
train
Load a file and return the RouteCollection
[ 30522, 2270, 3853, 7170, 1006, 1002, 5371, 1010, 1002, 2828, 1027, 19701, 1007, 1063, 1002, 4130, 1027, 1002, 2023, 1011, 1028, 8840, 11266, 2953, 1011, 1028, 12453, 1006, 1002, 5371, 1007, 1025, 1002, 2023, 1011, 1028, 2275, 10841, 14343, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Support/Str.php
Str.is
public static function is($pattern, $value) { $patterns = Arr::wrap($pattern); if (empty($patterns)) { return false; } foreach ($patterns as $pattern) { // If the given value is an exact match we can of course return true right // from the beginn...
php
public static function is($pattern, $value) { $patterns = Arr::wrap($pattern); if (empty($patterns)) { return false; } foreach ($patterns as $pattern) { // If the given value is an exact match we can of course return true right // from the beginn...
[ "public", "static", "function", "is", "(", "$", "pattern", ",", "$", "value", ")", "{", "$", "patterns", "=", "Arr", "::", "wrap", "(", "$", "pattern", ")", ";", "if", "(", "empty", "(", "$", "patterns", ")", ")", "{", "return", "false", ";", "}"...
Determine if a given string matches a given pattern. @param string|array $pattern @param string $value @return bool
[ "Determine", "if", "a", "given", "string", "matches", "a", "given", "pattern", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Support/Str.php#L154-L183
train
Check if the given value matches the given pattern
[ 30522, 2270, 10763, 3853, 2003, 1006, 1002, 5418, 1010, 30524, 1024, 1024, 10236, 1006, 1002, 5418, 1007, 1025, 2065, 1006, 4064, 1006, 1002, 7060, 1007, 1007, 1063, 2709, 6270, 1025, 1065, 18921, 6776, 1006, 1002, 7060, 2004, 1002, 5418, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Segment.php
Segment.willBeArchived
public function willBeArchived() { if ($this->isEmpty()) { return true; } $idSites = $this->idSites; if (!is_array($idSites)) { $idSites = array($this->idSites); } return Rules::isRequestAuthorizedToArchive() || Rules::isBrowserAr...
php
public function willBeArchived() { if ($this->isEmpty()) { return true; } $idSites = $this->idSites; if (!is_array($idSites)) { $idSites = array($this->idSites); } return Rules::isRequestAuthorizedToArchive() || Rules::isBrowserAr...
[ "public", "function", "willBeArchived", "(", ")", "{", "if", "(", "$", "this", "->", "isEmpty", "(", ")", ")", "{", "return", "true", ";", "}", "$", "idSites", "=", "$", "this", "->", "idSites", ";", "if", "(", "!", "is_array", "(", "$", "idSites",...
Detects whether the Piwik instance is configured to be able to archive this segment. It checks whether the segment will be either archived via browser or cli archiving. It does not check if the segment has been archived. If you want to know whether the segment has been archived, the actual report data needs to be reque...
[ "Detects", "whether", "the", "Piwik", "instance", "is", "configured", "to", "be", "able", "to", "archive", "this", "segment", ".", "It", "checks", "whether", "the", "segment", "will", "be", "either", "archived", "via", "browser", "or", "cli", "archiving", "....
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Segment.php#L235-L249
train
Returns true if the request is authorized to archive for the website
[ 30522, 2270, 3853, 2097, 4783, 2906, 5428, 7178, 1006, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 2003, 6633, 13876, 2100, 1006, 1007, 1007, 1063, 2709, 2995, 1025, 1065, 1002, 8909, 28032, 2229, 1027, 1002, 2023, 1011, 1028, 8909, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
z-song/laravel-admin
src/Form/Field/HasMany.php
HasMany.resetInputKey
protected function resetInputKey(array &$input, array $column) { /** * flip the column name array set. * * for example, for the DateRange, the column like as below * * ["start" => "created_at", "end" => "updated_at"] * * to: * ...
php
protected function resetInputKey(array &$input, array $column) { /** * flip the column name array set. * * for example, for the DateRange, the column like as below * * ["start" => "created_at", "end" => "updated_at"] * * to: * ...
[ "protected", "function", "resetInputKey", "(", "array", "&", "$", "input", ",", "array", "$", "column", ")", "{", "/**\n * flip the column name array set.\n *\n * for example, for the DateRange, the column like as below\n *\n * [\"start\" => \"crea...
Reset input key for validation. @param array $input @param array $column $column is the column name array set @return void.
[ "Reset", "input", "key", "for", "validation", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Form/Field/HasMany.php#L208-L262
train
Reset input key
[ 30522, 5123, 3853, 25141, 2378, 18780, 14839, 1006, 9140, 1004, 1002, 7953, 1010, 9140, 1002, 5930, 1007, 1063, 1013, 1008, 1008, 1008, 11238, 1996, 5930, 2171, 9140, 2275, 1012, 1008, 1008, 2005, 2742, 1010, 2005, 1996, 3058, 24388, 2063, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Utils.php
Utils.getNonce
public static function getNonce($action, $previousTick = false) { // Don't regenerate this again if not needed if (isset(static::$nonces[$action][$previousTick])) { return static::$nonces[$action][$previousTick]; } $nonce = md5(self::generateNonceString($action, $previous...
php
public static function getNonce($action, $previousTick = false) { // Don't regenerate this again if not needed if (isset(static::$nonces[$action][$previousTick])) { return static::$nonces[$action][$previousTick]; } $nonce = md5(self::generateNonceString($action, $previous...
[ "public", "static", "function", "getNonce", "(", "$", "action", ",", "$", "previousTick", "=", "false", ")", "{", "// Don't regenerate this again if not needed", "if", "(", "isset", "(", "static", "::", "$", "nonces", "[", "$", "action", "]", "[", "$", "prev...
Creates a hashed nonce tied to the passed action. Tied to the current user and time. The nonce for a given action is the same for 12 hours. @param string $action the action the nonce is tied to (e.g. save-user-admin or move-page-homepage) @param bool $previousTick if true, generates the token for the previous t...
[ "Creates", "a", "hashed", "nonce", "tied", "to", "the", "passed", "action", ".", "Tied", "to", "the", "current", "user", "and", "time", ".", "The", "nonce", "for", "a", "given", "action", "is", "the", "same", "for", "12", "hours", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Utils.php#L1103-L1113
train
Get a nonce for an action
[ 30522, 2270, 10763, 3853, 2131, 8540, 3401, 1006, 1002, 2895, 1010, 1002, 3025, 26348, 1027, 6270, 1007, 1063, 1013, 1013, 2123, 1005, 1056, 19723, 24454, 3686, 2023, 2153, 2065, 2025, 2734, 2065, 1006, 26354, 3388, 1006, 10763, 1024, 1024,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
slimphp/Slim
Slim/MiddlewareAwareTrait.php
MiddlewareAwareTrait.callMiddlewareStack
public function callMiddlewareStack(ServerRequestInterface $request, ResponseInterface $response) { if (is_null($this->tip)) { $this->seedMiddlewareStack(); } /** @var callable $start */ $start = $this->tip; $this->middlewareLock = true; $response = $start...
php
public function callMiddlewareStack(ServerRequestInterface $request, ResponseInterface $response) { if (is_null($this->tip)) { $this->seedMiddlewareStack(); } /** @var callable $start */ $start = $this->tip; $this->middlewareLock = true; $response = $start...
[ "public", "function", "callMiddlewareStack", "(", "ServerRequestInterface", "$", "request", ",", "ResponseInterface", "$", "response", ")", "{", "if", "(", "is_null", "(", "$", "this", "->", "tip", ")", ")", "{", "$", "this", "->", "seedMiddlewareStack", "(", ...
Call middleware stack @param ServerRequestInterface $request A request object @param ResponseInterface $response A response object @return ResponseInterface
[ "Call", "middleware", "stack" ]
ccef5f7d8bcd469d59cbe64f6210d83764f91543
https://github.com/slimphp/Slim/blob/ccef5f7d8bcd469d59cbe64f6210d83764f91543/Slim/MiddlewareAwareTrait.php#L109-L120
train
Call the middleware stack
[ 30522, 2270, 3853, 2655, 4328, 20338, 8059, 9153, 3600, 1006, 8241, 2890, 15500, 18447, 2121, 12172, 1002, 5227, 1010, 3433, 18447, 2121, 12172, 1002, 3433, 1007, 1063, 2065, 1006, 2003, 1035, 19701, 1006, 1002, 2023, 1011, 1028, 5955, 1007...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php
SqlServerGrammar.compileFrom
protected function compileFrom(Builder $query, $table) { $from = parent::compileFrom($query, $table); if (is_string($query->lock)) { return $from.' '.$query->lock; } if (! is_null($query->lock)) { return $from.' with(rowlock,'.($query->lock ? 'updlock,' : ''...
php
protected function compileFrom(Builder $query, $table) { $from = parent::compileFrom($query, $table); if (is_string($query->lock)) { return $from.' '.$query->lock; } if (! is_null($query->lock)) { return $from.' with(rowlock,'.($query->lock ? 'updlock,' : ''...
[ "protected", "function", "compileFrom", "(", "Builder", "$", "query", ",", "$", "table", ")", "{", "$", "from", "=", "parent", "::", "compileFrom", "(", "$", "query", ",", "$", "table", ")", ";", "if", "(", "is_string", "(", "$", "query", "->", "lock...
Compile the "from" portion of the query. @param \Illuminate\Database\Query\Builder $query @param string $table @return string
[ "Compile", "the", "from", "portion", "of", "the", "query", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php#L77-L90
train
Compiles a query into a string
[ 30522, 5123, 3853, 4012, 22090, 19699, 5358, 1006, 12508, 1002, 23032, 1010, 1002, 2795, 1007, 1063, 1002, 2013, 1027, 6687, 1024, 1024, 4012, 22090, 19699, 5358, 1006, 1002, 23032, 1010, 1002, 2795, 1007, 1025, 2065, 1006, 2003, 1035, 5164...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Security/Core/Validator/Constraints/UserPasswordValidator.php
UserPasswordValidator.validate
public function validate($password, Constraint $constraint) { if (!$constraint instanceof UserPassword) { throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\UserPassword'); } if (null === $password || '' === $password) { $this->context->addViolation($cons...
php
public function validate($password, Constraint $constraint) { if (!$constraint instanceof UserPassword) { throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\UserPassword'); } if (null === $password || '' === $password) { $this->context->addViolation($cons...
[ "public", "function", "validate", "(", "$", "password", ",", "Constraint", "$", "constraint", ")", "{", "if", "(", "!", "$", "constraint", "instanceof", "UserPassword", ")", "{", "throw", "new", "UnexpectedTypeException", "(", "$", "constraint", ",", "__NAMESP...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Security/Core/Validator/Constraints/UserPasswordValidator.php#L36-L59
train
Validate the password
[ 30522, 2270, 3853, 9398, 3686, 1006, 1002, 20786, 1010, 27142, 1002, 27142, 1007, 1063, 2065, 1006, 999, 1002, 27142, 6013, 11253, 5310, 15194, 18351, 1007, 1063, 5466, 2047, 9223, 13874, 10288, 24422, 1006, 1002, 27142, 1010, 1035, 1035, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
z-song/laravel-admin
src/Middleware/Pjax.php
Pjax.handleErrorResponse
protected function handleErrorResponse(Response $response) { $exception = $response->exception; $error = new MessageBag([ 'type' => get_class($exception), 'message' => $exception->getMessage(), 'file' => $exception->getFile(), 'line' => $exce...
php
protected function handleErrorResponse(Response $response) { $exception = $response->exception; $error = new MessageBag([ 'type' => get_class($exception), 'message' => $exception->getMessage(), 'file' => $exception->getFile(), 'line' => $exce...
[ "protected", "function", "handleErrorResponse", "(", "Response", "$", "response", ")", "{", "$", "exception", "=", "$", "response", "->", "exception", ";", "$", "error", "=", "new", "MessageBag", "(", "[", "'type'", "=>", "get_class", "(", "$", "exception", ...
Handle Response with exceptions. @param Response $response @return \Illuminate\Http\RedirectResponse
[ "Handle", "Response", "with", "exceptions", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Middleware/Pjax.php#L66-L78
train
Handle error response
[ 30522, 5123, 3853, 5047, 2121, 29165, 6072, 26029, 3366, 1006, 3433, 1002, 3433, 1007, 1063, 1002, 6453, 1027, 1002, 3433, 1011, 1028, 6453, 1025, 1002, 7561, 1027, 2047, 4471, 16078, 1006, 1031, 1005, 2828, 1005, 1027, 1028, 2131, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/EventDispatcher/ImmutableEventDispatcher.php
ImmutableEventDispatcher.dispatch
public function dispatch($event/*, string $eventName = null*/) { $eventName = 1 < \func_num_args() ? \func_get_arg(1) : null; if (\is_scalar($event)) { // deprecated $swap = $event; $event = $eventName ?? new Event(); $eventName = $swap; } ...
php
public function dispatch($event/*, string $eventName = null*/) { $eventName = 1 < \func_num_args() ? \func_get_arg(1) : null; if (\is_scalar($event)) { // deprecated $swap = $event; $event = $eventName ?? new Event(); $eventName = $swap; } ...
[ "public", "function", "dispatch", "(", "$", "event", "/*, string $eventName = null*/", ")", "{", "$", "eventName", "=", "1", "<", "\\", "func_num_args", "(", ")", "?", "\\", "func_get_arg", "(", "1", ")", ":", "null", ";", "if", "(", "\\", "is_scalar", "...
{@inheritdoc} @param string|null $eventName
[ "{", "@inheritdoc", "}" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/EventDispatcher/ImmutableEventDispatcher.php#L33-L45
train
Dispatches an event to the registered handlers
[ 30522, 2270, 3853, 18365, 1006, 1002, 2724, 1013, 1008, 1010, 5164, 1002, 2724, 18442, 1027, 30524, 2213, 1035, 12098, 5620, 1006, 1007, 1029, 1032, 4569, 2278, 1035, 2131, 1035, 12098, 2290, 1006, 1015, 1007, 1024, 19701, 1025, 2065, 1006,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dompdf/dompdf
src/Adapter/PDFLib.php
PDFLib.set_opacity
public function set_opacity($opacity, $mode = "Normal") { if ($mode === "Normal" && is_null($opacity) === false) { $this->_set_gstate("opacityfill=$opacity opacitystroke=$opacity"); $this->_current_opacity = $opacity; } }
php
public function set_opacity($opacity, $mode = "Normal") { if ($mode === "Normal" && is_null($opacity) === false) { $this->_set_gstate("opacityfill=$opacity opacitystroke=$opacity"); $this->_current_opacity = $opacity; } }
[ "public", "function", "set_opacity", "(", "$", "opacity", ",", "$", "mode", "=", "\"Normal\"", ")", "{", "if", "(", "$", "mode", "===", "\"Normal\"", "&&", "is_null", "(", "$", "opacity", ")", "===", "false", ")", "{", "$", "this", "->", "_set_gstate",...
Sets the opacity @param $opacity @param $mode
[ "Sets", "the", "opacity" ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/Adapter/PDFLib.php#L693-L699
train
Set the current opacity
[ 30522, 2270, 3853, 2275, 1035, 6728, 6305, 3012, 1006, 1002, 6728, 6305, 3012, 1010, 1002, 5549, 1027, 1000, 3671, 1000, 1007, 1063, 2065, 1006, 1002, 5549, 1027, 1027, 1027, 1000, 3671, 1000, 1004, 1004, 2003, 1035, 19701, 1006, 1002, 67...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
z-song/laravel-admin
src/Show/Relation.php
Relation.render
public function render() { $relation = $this->model->{$this->name}(); $renderable = $this->getNullRenderable(); if ($relation instanceof HasOne || $relation instanceof BelongsTo || $relation instanceof MorphOne ) { $model = $this->model->{$thi...
php
public function render() { $relation = $this->model->{$this->name}(); $renderable = $this->getNullRenderable(); if ($relation instanceof HasOne || $relation instanceof BelongsTo || $relation instanceof MorphOne ) { $model = $this->model->{$thi...
[ "public", "function", "render", "(", ")", "{", "$", "relation", "=", "$", "this", "->", "model", "->", "{", "$", "this", "->", "name", "}", "(", ")", ";", "$", "renderable", "=", "$", "this", "->", "getNullRenderable", "(", ")", ";", "if", "(", "...
Render this relation panel. @return string
[ "Render", "this", "relation", "panel", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Show/Relation.php#L94-L128
train
Render the related model
[ 30522, 2270, 3853, 17552, 1006, 1007, 1063, 1002, 7189, 1027, 1002, 2023, 1011, 1028, 2944, 1011, 1028, 1063, 1002, 2023, 1011, 1028, 2171, 1065, 1006, 1007, 1025, 1002, 17552, 3085, 1027, 1002, 2023, 1011, 1028, 2131, 11231, 3363, 7389, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/Referrers/SearchEngine.php
SearchEngine.getBackLinkFromUrlAndKeyword
public function getBackLinkFromUrlAndKeyword($url, $keyword) { if ($keyword === API::LABEL_KEYWORD_NOT_DEFINED) { return 'https://matomo.org/faq/general/#faq_144'; } $keyword = urlencode($keyword); $keyword = str_replace(urlencode('+'), urlencode(' '), $keyword); ...
php
public function getBackLinkFromUrlAndKeyword($url, $keyword) { if ($keyword === API::LABEL_KEYWORD_NOT_DEFINED) { return 'https://matomo.org/faq/general/#faq_144'; } $keyword = urlencode($keyword); $keyword = str_replace(urlencode('+'), urlencode(' '), $keyword); ...
[ "public", "function", "getBackLinkFromUrlAndKeyword", "(", "$", "url", ",", "$", "keyword", ")", "{", "if", "(", "$", "keyword", "===", "API", "::", "LABEL_KEYWORD_NOT_DEFINED", ")", "{", "return", "'https://matomo.org/faq/general/#faq_144'", ";", "}", "$", "keywo...
Return search engine URL for URL and keyword @see core/DataFiles/SearchEnginges.php @param string $url Domain name, e.g., search.piwik.org @param string $keyword Keyword, e.g., web+analytics @return string URL, e.g., http://search.piwik.org/q=web+analytics
[ "Return", "search", "engine", "URL", "for", "URL", "and", "keyword" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Referrers/SearchEngine.php#L485-L499
train
Get the back link for a given URL and keyword
[ 30522, 2270, 3853, 2131, 5963, 13767, 19699, 5358, 3126, 3122, 14839, 18351, 1006, 1002, 24471, 2140, 1010, 1002, 3145, 18351, 1007, 1063, 2065, 1006, 1002, 3145, 18351, 1027, 1027, 1027, 17928, 1024, 1024, 3830, 1035, 3145, 18351, 1035, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php
RecursiveContextualValidator.validateObject
private function validateObject($object, $propertyPath, array $groups, $traversalStrategy, ExecutionContextInterface $context) { try { $classMetadata = $this->metadataFactory->getMetadataFor($object); if (!$classMetadata instanceof ClassMetadataInterface) { throw new...
php
private function validateObject($object, $propertyPath, array $groups, $traversalStrategy, ExecutionContextInterface $context) { try { $classMetadata = $this->metadataFactory->getMetadataFor($object); if (!$classMetadata instanceof ClassMetadataInterface) { throw new...
[ "private", "function", "validateObject", "(", "$", "object", ",", "$", "propertyPath", ",", "array", "$", "groups", ",", "$", "traversalStrategy", ",", "ExecutionContextInterface", "$", "context", ")", "{", "try", "{", "$", "classMetadata", "=", "$", "this", ...
Validates an object against the constraints defined for its class. If no metadata is available for the class, but the class is an instance of {@link \Traversable} and the selected traversal strategy allows traversal, the object will be iterated and each nested object will be validated instead. @param object ...
[ "Validates", "an", "object", "against", "the", "constraints", "defined", "for", "its", "class", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php#L313-L350
train
Validate each object in the chain
[ 30522, 2797, 3853, 9398, 3686, 16429, 20614, 1006, 1002, 4874, 1010, 1002, 3200, 15069, 1010, 9140, 1002, 2967, 1010, 1002, 29053, 9777, 6494, 2618, 6292, 1010, 7781, 8663, 18209, 18447, 2121, 12172, 1002, 6123, 1007, 1063, 3046, 1063, 1002...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Validator/Constraints/AllValidator.php
AllValidator.validate
public function validate($value, Constraint $constraint) { if (!$constraint instanceof All) { throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\All'); } if (null === $value) { return; } if (!\is_array($value) && !$value instanceof \Trave...
php
public function validate($value, Constraint $constraint) { if (!$constraint instanceof All) { throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\All'); } if (null === $value) { return; } if (!\is_array($value) && !$value instanceof \Trave...
[ "public", "function", "validate", "(", "$", "value", ",", "Constraint", "$", "constraint", ")", "{", "if", "(", "!", "$", "constraint", "instanceof", "All", ")", "{", "throw", "new", "UnexpectedTypeException", "(", "$", "constraint", ",", "__NAMESPACE__", "....
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Validator/Constraints/AllValidator.php#L27-L48
train
Validate a value against all validators
[ 30522, 2270, 3853, 9398, 3686, 1006, 1002, 3643, 1010, 27142, 1002, 27142, 1007, 1063, 2065, 1006, 999, 1002, 27142, 6013, 11253, 2035, 1007, 1063, 5466, 2047, 9223, 13874, 10288, 24422, 1006, 1002, 27142, 1010, 1035, 1035, 3415, 15327, 103...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Mail/Transport/SesTransport.php
SesTransport.send
public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null) { $this->beforeSendPerformed($message); $result = $this->ses->sendRawEmail( array_merge( $this->options, [ 'Source' => key($message->getSender() ?: $message->getFrom())...
php
public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null) { $this->beforeSendPerformed($message); $result = $this->ses->sendRawEmail( array_merge( $this->options, [ 'Source' => key($message->getSender() ?: $message->getFrom())...
[ "public", "function", "send", "(", "Swift_Mime_SimpleMessage", "$", "message", ",", "&", "$", "failedRecipients", "=", "null", ")", "{", "$", "this", "->", "beforeSendPerformed", "(", "$", "message", ")", ";", "$", "result", "=", "$", "this", "->", "ses", ...
{@inheritdoc}
[ "{" ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Mail/Transport/SesTransport.php#L40-L60
train
Sends a Swift_Mime_SimpleMessage to the Sms system
[ 30522, 2270, 3853, 4604, 1006, 9170, 1035, 2771, 4168, 1035, 3722, 7834, 3736, 3351, 1002, 4471, 1010, 1004, 1002, 3478, 2890, 6895, 14756, 7666, 1027, 19701, 1007, 1063, 1002, 2023, 1011, 1028, 2077, 5054, 18927, 2121, 29021, 1006, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/Actions/API.php
API.get
public function get($idSite, $period, $date, $segment = false, $columns = false) { Piwik::checkUserHasViewAccess($idSite); $report = ReportsProvider::factory("Actions", "get"); $archive = Archive::build($idSite, $period, $date, $segment); $requestedColumns = Piwik::getArrayFromApiP...
php
public function get($idSite, $period, $date, $segment = false, $columns = false) { Piwik::checkUserHasViewAccess($idSite); $report = ReportsProvider::factory("Actions", "get"); $archive = Archive::build($idSite, $period, $date, $segment); $requestedColumns = Piwik::getArrayFromApiP...
[ "public", "function", "get", "(", "$", "idSite", ",", "$", "period", ",", "$", "date", ",", "$", "segment", "=", "false", ",", "$", "columns", "=", "false", ")", "{", "Piwik", "::", "checkUserHasViewAccess", "(", "$", "idSite", ")", ";", "$", "report...
Returns the list of metrics (pages, downloads, outlinks) @param int $idSite @param string $period @param string $date @param bool|string $segment @param bool|array $columns @return DataTable
[ "Returns", "the", "list", "of", "metrics", "(", "pages", "downloads", "outlinks", ")" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Actions/API.php#L55-L77
train
Get the datatable for the given site period date and segment
[ 30522, 2270, 3853, 2131, 1006, 1002, 8909, 28032, 2063, 1010, 1002, 2558, 1010, 1002, 3058, 1010, 1002, 6903, 1027, 6270, 1010, 1002, 7753, 1027, 6270, 1007, 1063, 14255, 9148, 2243, 1024, 1024, 4638, 20330, 14949, 8584, 6305, 9623, 2015, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/cms/twig/Extension.php
Extension.pageFilter
public function pageFilter($name, $parameters = [], $routePersistence = true) { return $this->controller->pageUrl($name, $parameters, $routePersistence); }
php
public function pageFilter($name, $parameters = [], $routePersistence = true) { return $this->controller->pageUrl($name, $parameters, $routePersistence); }
[ "public", "function", "pageFilter", "(", "$", "name", ",", "$", "parameters", "=", "[", "]", ",", "$", "routePersistence", "=", "true", ")", "{", "return", "$", "this", "->", "controller", "->", "pageUrl", "(", "$", "name", ",", "$", "parameters", ",",...
Looks up the URL for a supplied page and returns it relative to the website root. @param mixed $name Specifies the Cms Page file name. @param array $parameters Route parameters to consider in the URL. @param bool $routePersistence By default the existing routing parameters will be included when creating the URL, set to...
[ "Looks", "up", "the", "URL", "for", "a", "supplied", "page", "and", "returns", "it", "relative", "to", "the", "website", "root", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/twig/Extension.php#L159-L162
train
Page Url Filter
[ 30522, 2270, 3853, 3931, 8873, 21928, 1006, 1002, 2171, 1010, 1002, 11709, 1027, 1031, 1033, 1010, 1002, 2799, 7347, 27870, 5897, 1027, 2995, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 11486, 1011, 1028, 3931, 3126, 2140, 1006, 1002, 2171, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...