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
matomo-org/matomo
core/Updater.php
Updater.executeMigrations
public function executeMigrations($file, $migrations) { foreach ($migrations as $index => $migration) { $migration = $this->keepBcForOldMigrationQueryFormat($index, $migration); $this->executeMigration($file, $migration); } }
php
public function executeMigrations($file, $migrations) { foreach ($migrations as $index => $migration) { $migration = $this->keepBcForOldMigrationQueryFormat($index, $migration); $this->executeMigration($file, $migration); } }
[ "public", "function", "executeMigrations", "(", "$", "file", ",", "$", "migrations", ")", "{", "foreach", "(", "$", "migrations", "as", "$", "index", "=>", "$", "migration", ")", "{", "$", "migration", "=", "$", "this", "->", "keepBcForOldMigrationQueryForma...
Execute multiple migration queries from a single Update file. @param string $file The path to the Updates file. @param Migration[] $migrations An array of migrations @api
[ "Execute", "multiple", "migration", "queries", "from", "a", "single", "Update", "file", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Updater.php#L562-L568
train
Execute migrations in the order they were defined in the config file
[ 30522, 2270, 3853, 15389, 4328, 29397, 2015, 1006, 1002, 5371, 1010, 1002, 9230, 2015, 1007, 1063, 18921, 6776, 1006, 1002, 9230, 2015, 2004, 1002, 5950, 1027, 1028, 1002, 9230, 1007, 1063, 1002, 9230, 1027, 1002, 2023, 1011, 1028, 2562, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Model.php
Model.with
public function with($relations) { if (is_array($relations)) { if (Arr::isAssoc($relations)) { $relations = array_keys($relations); } $this->eagerLoads = array_merge($this->eagerLoads, $relations); } if (is_string($relations)) { ...
php
public function with($relations) { if (is_array($relations)) { if (Arr::isAssoc($relations)) { $relations = array_keys($relations); } $this->eagerLoads = array_merge($this->eagerLoads, $relations); } if (is_string($relations)) { ...
[ "public", "function", "with", "(", "$", "relations", ")", "{", "if", "(", "is_array", "(", "$", "relations", ")", ")", "{", "if", "(", "Arr", "::", "isAssoc", "(", "$", "relations", ")", ")", "{", "$", "relations", "=", "array_keys", "(", "$", "rel...
Set the relationships that should be eager loaded. @param mixed $relations @return $this|Model
[ "Set", "the", "relationships", "that", "should", "be", "eager", "loaded", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Grid/Model.php#L656-L683
train
Add eager load to the list of eager loads
[ 30522, 2270, 3853, 2007, 1006, 1002, 4262, 1007, 1063, 2065, 1006, 2003, 1035, 9140, 1006, 1002, 4262, 1007, 1007, 1063, 2065, 1006, 12098, 2099, 1024, 1024, 18061, 24137, 2278, 1006, 1002, 4262, 1007, 1007, 1063, 1002, 4262, 1027, 9140, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Kernel/Support/File.php
File.getExtBySignature
public static function getExtBySignature($stream) { $prefix = strval(bin2hex(mb_strcut($stream, 0, 10))); foreach (self::$signatures as $signature => $extension) { if (0 === strpos($prefix, strval($signature))) { return $extension; } } return...
php
public static function getExtBySignature($stream) { $prefix = strval(bin2hex(mb_strcut($stream, 0, 10))); foreach (self::$signatures as $signature => $extension) { if (0 === strpos($prefix, strval($signature))) { return $extension; } } return...
[ "public", "static", "function", "getExtBySignature", "(", "$", "stream", ")", "{", "$", "prefix", "=", "strval", "(", "bin2hex", "(", "mb_strcut", "(", "$", "stream", ",", "0", ",", "10", ")", ")", ")", ";", "foreach", "(", "self", "::", "$", "signat...
Get file extension by file header signature. @param string $stream @return string
[ "Get", "file", "extension", "by", "file", "header", "signature", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Kernel/Support/File.php#L121-L132
train
Get the extension by signature
[ 30522, 2270, 10763, 3853, 2131, 10288, 2102, 3762, 5332, 16989, 11244, 1006, 1002, 5460, 1007, 1063, 1002, 17576, 1027, 2358, 26585, 1006, 8026, 2475, 5369, 2595, 1006, 16914, 1035, 2358, 11890, 4904, 1006, 1002, 5460, 1010, 1014, 1010, 218...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/FormatsMessages.php
FormatsMessages.getCustomMessageFromTranslator
protected function getCustomMessageFromTranslator($key) { if (($message = $this->translator->trans($key)) !== $key) { return $message; } // If an exact match was not found for the key, we will collapse all of these // messages and loop through them and try to find a wild...
php
protected function getCustomMessageFromTranslator($key) { if (($message = $this->translator->trans($key)) !== $key) { return $message; } // If an exact match was not found for the key, we will collapse all of these // messages and loop through them and try to find a wild...
[ "protected", "function", "getCustomMessageFromTranslator", "(", "$", "key", ")", "{", "if", "(", "(", "$", "message", "=", "$", "this", "->", "translator", "->", "trans", "(", "$", "key", ")", ")", "!==", "$", "key", ")", "{", "return", "$", "message",...
Get the custom error message from translator. @param string $key @return string
[ "Get", "the", "custom", "error", "message", "from", "translator", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/FormatsMessages.php#L114-L130
train
Get the custom message from the translator
[ 30522, 5123, 3853, 2131, 7874, 20389, 7834, 3736, 3351, 19699, 5358, 6494, 3619, 20051, 2953, 1006, 1002, 3145, 1007, 1063, 2065, 1006, 1006, 1002, 4471, 1027, 1002, 2023, 1011, 1028, 11403, 1011, 1028, 9099, 1006, 1002, 3145, 1007, 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
plugins/UserCountry/Controller.php
Controller.getLocationUsingProvider
public function getLocationUsingProvider() { $providerId = Common::getRequestVar('id'); $provider = LocationProvider::getProviderById($providerId); if (empty($provider)) { throw new Exception("Invalid provider ID: '$providerId'."); } $location = $provider->getLoc...
php
public function getLocationUsingProvider() { $providerId = Common::getRequestVar('id'); $provider = LocationProvider::getProviderById($providerId); if (empty($provider)) { throw new Exception("Invalid provider ID: '$providerId'."); } $location = $provider->getLoc...
[ "public", "function", "getLocationUsingProvider", "(", ")", "{", "$", "providerId", "=", "Common", "::", "getRequestVar", "(", "'id'", ")", ";", "$", "provider", "=", "LocationProvider", "::", "getProviderById", "(", "$", "providerId", ")", ";", "if", "(", "...
Echo's a pretty formatted location using a specific LocationProvider. Input: The 'id' query parameter must be set to the ID of the LocationProvider to use. Output: The pretty formatted location that was obtained. Will be HTML.
[ "Echo", "s", "a", "pretty", "formatted", "location", "using", "a", "specific", "LocationProvider", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/UserCountry/Controller.php#L395-L410
train
Returns the location using the provider
[ 30522, 2270, 3853, 2131, 4135, 10719, 18161, 21572, 17258, 2121, 1006, 1007, 1063, 1002, 10802, 3593, 1027, 2691, 1024, 1024, 2131, 2890, 15500, 10755, 1006, 1005, 8909, 1005, 1007, 1025, 1002, 10802, 1027, 3295, 21572, 17258, 2121, 1024, 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/Cache/Traits/PhpFilesTrait.php
PhpFilesTrait.doSave
protected function doSave(array $values, $lifetime) { $ok = true; $expiry = $lifetime ? time() + $lifetime : 'PHP_INT_MAX'; $allowCompile = self::isSupported(); foreach ($values as $key => $value) { unset($this->values[$key]); $isStaticValue = true; ...
php
protected function doSave(array $values, $lifetime) { $ok = true; $expiry = $lifetime ? time() + $lifetime : 'PHP_INT_MAX'; $allowCompile = self::isSupported(); foreach ($values as $key => $value) { unset($this->values[$key]); $isStaticValue = true; ...
[ "protected", "function", "doSave", "(", "array", "$", "values", ",", "$", "lifetime", ")", "{", "$", "ok", "=", "true", ";", "$", "expiry", "=", "$", "lifetime", "?", "time", "(", ")", "+", "$", "lifetime", ":", "'PHP_INT_MAX'", ";", "$", "allowCompi...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Cache/Traits/PhpFilesTrait.php#L162-L211
train
Save cache data
[ 30522, 5123, 3853, 9998, 10696, 1006, 9140, 1002, 5300, 1010, 1002, 6480, 1007, 1063, 1002, 7929, 1027, 2995, 1025, 1002, 4654, 8197, 2854, 1027, 1002, 6480, 1029, 2051, 1006, 1007, 1009, 1002, 6480, 1024, 1005, 25718, 1035, 20014, 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...
getgrav/grav
system/src/Grav/Common/GPM/GPM.php
GPM.calculateMergedDependenciesOfPackages
public function calculateMergedDependenciesOfPackages($packages) { $dependencies = []; foreach ($packages as $package) { $dependencies = $this->calculateMergedDependenciesOfPackage($package, $dependencies); } return $dependencies; }
php
public function calculateMergedDependenciesOfPackages($packages) { $dependencies = []; foreach ($packages as $package) { $dependencies = $this->calculateMergedDependenciesOfPackage($package, $dependencies); } return $dependencies; }
[ "public", "function", "calculateMergedDependenciesOfPackages", "(", "$", "packages", ")", "{", "$", "dependencies", "=", "[", "]", ";", "foreach", "(", "$", "packages", "as", "$", "package", ")", "{", "$", "dependencies", "=", "$", "this", "->", "calculateMe...
Calculates and merges the dependencies of the passed packages @param array $packages @return mixed @throws \Exception
[ "Calculates", "and", "merges", "the", "dependencies", "of", "the", "passed", "packages" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/GPM/GPM.php#L1057-L1066
train
Calculates the merged dependencies of all packages.
[ 30522, 2270, 3853, 18422, 5017, 5999, 3207, 11837, 4181, 9243, 11253, 23947, 13923, 1006, 1002, 14555, 1007, 1063, 1002, 12530, 15266, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1002, 14555, 2004, 1002, 7427, 1007, 1063, 1002, 12530, 15266, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Connectors/ConnectionFactory.php
ConnectionFactory.getReadWriteConfig
protected function getReadWriteConfig(array $config, $type) { return isset($config[$type][0]) ? Arr::random($config[$type]) : $config[$type]; }
php
protected function getReadWriteConfig(array $config, $type) { return isset($config[$type][0]) ? Arr::random($config[$type]) : $config[$type]; }
[ "protected", "function", "getReadWriteConfig", "(", "array", "$", "config", ",", "$", "type", ")", "{", "return", "isset", "(", "$", "config", "[", "$", "type", "]", "[", "0", "]", ")", "?", "Arr", "::", "random", "(", "$", "config", "[", "$", "typ...
Get a read / write level configuration. @param array $config @param string $type @return array
[ "Get", "a", "read", "/", "write", "level", "configuration", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Connectors/ConnectionFactory.php#L137-L142
train
Get read write config
[ 30522, 5123, 3853, 2131, 16416, 2094, 26373, 8663, 8873, 2290, 1006, 9140, 1002, 9530, 8873, 2290, 1010, 1002, 2828, 1007, 1063, 2709, 26354, 3388, 1006, 1002, 9530, 8873, 2290, 1031, 1002, 2828, 1033, 1031, 1014, 1033, 1007, 1029, 12098, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Queue/Worker.php
Worker.handleJobException
protected function handleJobException($connectionName, $job, WorkerOptions $options, $e) { try { // First, we will go ahead and mark the job as failed if it will exceed the maximum // attempts it is allowed to run the next time we process it. If so we will just // go ahea...
php
protected function handleJobException($connectionName, $job, WorkerOptions $options, $e) { try { // First, we will go ahead and mark the job as failed if it will exceed the maximum // attempts it is allowed to run the next time we process it. If so we will just // go ahea...
[ "protected", "function", "handleJobException", "(", "$", "connectionName", ",", "$", "job", ",", "WorkerOptions", "$", "options", ",", "$", "e", ")", "{", "try", "{", "// First, we will go ahead and mark the job as failed if it will exceed the maximum", "// attempts it is a...
Handle an exception that occurred while the job was running. @param string $connectionName @param \Illuminate\Contracts\Queue\Job $job @param \Illuminate\Queue\WorkerOptions $options @param \Exception $e @return void @throws \Exception
[ "Handle", "an", "exception", "that", "occurred", "while", "the", "job", "was", "running", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Queue/Worker.php#L350-L379
train
Handle exception thrown by the worker
[ 30522, 5123, 3853, 5047, 5558, 4783, 2595, 24422, 1006, 1002, 4434, 18442, 1010, 1002, 3105, 1010, 7309, 7361, 9285, 1002, 7047, 1010, 1002, 1041, 1007, 1063, 3046, 1063, 1013, 1013, 2034, 1010, 2057, 2097, 2175, 3805, 1998, 2928, 1996, 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...
symfony/symfony
src/Symfony/Component/Messenger/Transport/Doctrine/DoctrineReceiver.php
DoctrineReceiver.ack
public function ack(Envelope $envelope): void { try { $this->connection->ack($this->findDoctrineReceivedStamp($envelope)->getId()); } catch (DBALException $exception) { throw new TransportException($exception->getMessage(), 0, $exception); } }
php
public function ack(Envelope $envelope): void { try { $this->connection->ack($this->findDoctrineReceivedStamp($envelope)->getId()); } catch (DBALException $exception) { throw new TransportException($exception->getMessage(), 0, $exception); } }
[ "public", "function", "ack", "(", "Envelope", "$", "envelope", ")", ":", "void", "{", "try", "{", "$", "this", "->", "connection", "->", "ack", "(", "$", "this", "->", "findDoctrineReceivedStamp", "(", "$", "envelope", ")", "->", "getId", "(", ")", ")"...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Messenger/Transport/Doctrine/DoctrineReceiver.php#L63-L70
train
Acknowledge a message
[ 30522, 2270, 3853, 9353, 2243, 1006, 11255, 1002, 11255, 1007, 1024, 11675, 1063, 3046, 1063, 1002, 2023, 1011, 1028, 4434, 1011, 1028, 9353, 2243, 1006, 1002, 2023, 1011, 1028, 2424, 3527, 6593, 11467, 2890, 3401, 3512, 5104, 15464, 2361, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Templating/PhpEngine.php
PhpEngine.get
public function get($name) { if (!isset($this->helpers[$name])) { throw new \InvalidArgumentException(sprintf('The helper "%s" is not defined.', $name)); } return $this->helpers[$name]; }
php
public function get($name) { if (!isset($this->helpers[$name])) { throw new \InvalidArgumentException(sprintf('The helper "%s" is not defined.', $name)); } return $this->helpers[$name]; }
[ "public", "function", "get", "(", "$", "name", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "helpers", "[", "$", "name", "]", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "sprintf", "(", "'The helper \"%s\" is not d...
Gets a helper value. @param string $name The helper name @return HelperInterface The helper instance @throws \InvalidArgumentException if the helper is not defined
[ "Gets", "a", "helper", "value", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Templating/PhpEngine.php#L279-L286
train
Get the helper
[ 30522, 2270, 3853, 2131, 1006, 1002, 2171, 1007, 1063, 2065, 1006, 999, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 2393, 2545, 1031, 1002, 2171, 1033, 1007, 1007, 1063, 5466, 2047, 1032, 19528, 2906, 22850, 15781, 2595, 24422, 1006, 9043, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/MailMakeCommand.php
MailMakeCommand.buildClass
protected function buildClass($name) { $class = parent::buildClass($name); if ($this->option('markdown')) { $class = str_replace('DummyView', $this->option('markdown'), $class); } return $class; }
php
protected function buildClass($name) { $class = parent::buildClass($name); if ($this->option('markdown')) { $class = str_replace('DummyView', $this->option('markdown'), $class); } return $class; }
[ "protected", "function", "buildClass", "(", "$", "name", ")", "{", "$", "class", "=", "parent", "::", "buildClass", "(", "$", "name", ")", ";", "if", "(", "$", "this", "->", "option", "(", "'markdown'", ")", ")", "{", "$", "class", "=", "str_replace"...
Build the class with the given name. @param string $name @return string
[ "Build", "the", "class", "with", "the", "given", "name", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Console/MailMakeCommand.php#L69-L78
train
Build the class name
[ 30522, 5123, 3853, 3857, 26266, 1006, 1002, 2171, 1007, 1063, 1002, 2465, 30524, 5672, 1006, 1005, 24369, 8584, 1005, 1010, 1002, 2023, 1011, 1028, 5724, 1006, 1005, 2928, 7698, 1005, 1007, 1010, 1002, 2465, 1007, 1025, 1065, 2709, 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/Form/FormFactoryBuilder.php
FormFactoryBuilder.getFormFactory
public function getFormFactory() { $extensions = $this->extensions; if ($this->forceCoreExtension) { $hasCoreExtension = false; foreach ($extensions as $extension) { if ($extension instanceof CoreExtension) { $hasCoreExtension = true; ...
php
public function getFormFactory() { $extensions = $this->extensions; if ($this->forceCoreExtension) { $hasCoreExtension = false; foreach ($extensions as $extension) { if ($extension instanceof CoreExtension) { $hasCoreExtension = true; ...
[ "public", "function", "getFormFactory", "(", ")", "{", "$", "extensions", "=", "$", "this", "->", "extensions", ";", "if", "(", "$", "this", "->", "forceCoreExtension", ")", "{", "$", "hasCoreExtension", "=", "false", ";", "foreach", "(", "$", "extensions"...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/FormFactoryBuilder.php#L161-L193
train
Returns FormFactory instance
[ 30522, 2270, 3853, 2131, 14192, 21450, 1006, 1007, 1063, 1002, 14305, 1027, 1002, 2023, 1011, 1028, 14305, 1025, 2065, 1006, 1002, 2023, 1011, 1028, 2486, 17345, 10288, 29048, 1007, 1063, 1002, 2038, 17345, 10288, 29048, 1027, 6270, 1025, 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/widgets/Form.php
Form.showFieldLabels
protected function showFieldLabels($field) { if (in_array($field->type, ['checkbox', 'switch', 'section'])) { return false; } if ($field->type === 'widget') { return $this->makeFormFieldWidget($field)->showLabels; } return true; }
php
protected function showFieldLabels($field) { if (in_array($field->type, ['checkbox', 'switch', 'section'])) { return false; } if ($field->type === 'widget') { return $this->makeFormFieldWidget($field)->showLabels; } return true; }
[ "protected", "function", "showFieldLabels", "(", "$", "field", ")", "{", "if", "(", "in_array", "(", "$", "field", "->", "type", ",", "[", "'checkbox'", ",", "'switch'", ",", "'section'", "]", ")", ")", "{", "return", "false", ";", "}", "if", "(", "$...
Helper method to determine if field should be rendered with label and comments. @param \Backend\Classes\FormField $field @return boolean
[ "Helper", "method", "to", "determine", "if", "field", "should", "be", "rendered", "with", "label", "and", "comments", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/widgets/Form.php#L1107-L1118
train
Returns true if field should be displayed in labels
[ 30522, 5123, 3853, 2265, 3790, 20470, 9050, 1006, 1002, 2492, 1007, 1063, 2065, 1006, 1999, 1035, 9140, 1006, 1002, 2492, 1011, 1028, 2828, 1010, 1031, 1005, 4638, 8758, 1005, 1010, 1005, 6942, 1005, 1010, 1005, 2930, 1005, 1033, 1007, 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...
laravel/framework
src/Illuminate/Queue/Connectors/DatabaseConnector.php
DatabaseConnector.connect
public function connect(array $config) { return new DatabaseQueue( $this->connections->connection($config['connection'] ?? null), $config['table'], $config['queue'], $config['retry_after'] ?? 60 ); }
php
public function connect(array $config) { return new DatabaseQueue( $this->connections->connection($config['connection'] ?? null), $config['table'], $config['queue'], $config['retry_after'] ?? 60 ); }
[ "public", "function", "connect", "(", "array", "$", "config", ")", "{", "return", "new", "DatabaseQueue", "(", "$", "this", "->", "connections", "->", "connection", "(", "$", "config", "[", "'connection'", "]", "??", "null", ")", ",", "$", "config", "[",...
Establish a queue connection. @param array $config @return \Illuminate\Contracts\Queue\Queue
[ "Establish", "a", "queue", "connection", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Queue/Connectors/DatabaseConnector.php#L34-L42
train
Connect to database and return a queue
[ 30522, 2270, 3853, 7532, 1006, 9140, 1002, 9530, 8873, 2290, 1007, 1063, 2709, 2047, 7809, 4226, 5657, 1006, 1002, 2023, 1011, 1028, 7264, 1011, 1028, 4434, 1006, 1002, 9530, 8873, 2290, 1031, 1005, 4434, 1005, 1033, 1029, 1029, 19701, 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...
php-ai/php-ml
src/Association/Apriori.php
Apriori.generateRules
private function generateRules(array $frequent): void { foreach ($this->antecedents($frequent) as $antecedent) { $confidence = $this->confidence($frequent, $antecedent); if ($this->confidence <= $confidence) { $consequent = array_values(array_diff($frequent, $antecede...
php
private function generateRules(array $frequent): void { foreach ($this->antecedents($frequent) as $antecedent) { $confidence = $this->confidence($frequent, $antecedent); if ($this->confidence <= $confidence) { $consequent = array_values(array_diff($frequent, $antecede...
[ "private", "function", "generateRules", "(", "array", "$", "frequent", ")", ":", "void", "{", "foreach", "(", "$", "this", "->", "antecedents", "(", "$", "frequent", ")", "as", "$", "antecedent", ")", "{", "$", "confidence", "=", "$", "this", "->", "co...
Generate confident rules for frequent item set. @param mixed[] $frequent
[ "Generate", "confident", "rules", "for", "frequent", "item", "set", "." ]
f6aa1a59b0525b8fca3d2786d661ab3e70904016
https://github.com/php-ai/php-ml/blob/f6aa1a59b0525b8fca3d2786d661ab3e70904016/src/Association/Apriori.php#L133-L147
train
Generate rules for the given frequency
[ 30522, 2797, 3853, 9699, 6820, 4244, 1006, 9140, 1002, 6976, 1007, 1024, 11675, 1063, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 14405, 26005, 28986, 1006, 1002, 6976, 1007, 2004, 1002, 14405, 26005, 16454, 1007, 1063, 1002, 7023, 1027, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
php-ai/php-ml
src/Regression/LeastSquares.php
LeastSquares.getSamplesMatrix
private function getSamplesMatrix(): Matrix { $samples = []; foreach ($this->samples as $sample) { array_unshift($sample, 1); $samples[] = $sample; } return new Matrix($samples); }
php
private function getSamplesMatrix(): Matrix { $samples = []; foreach ($this->samples as $sample) { array_unshift($sample, 1); $samples[] = $sample; } return new Matrix($samples); }
[ "private", "function", "getSamplesMatrix", "(", ")", ":", "Matrix", "{", "$", "samples", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "samples", "as", "$", "sample", ")", "{", "array_unshift", "(", "$", "sample", ",", "1", ")", ";", "$", ...
Add one dimension for intercept calculation.
[ "Add", "one", "dimension", "for", "intercept", "calculation", "." ]
f6aa1a59b0525b8fca3d2786d661ab3e70904016
https://github.com/php-ai/php-ml/blob/f6aa1a59b0525b8fca3d2786d661ab3e70904016/src/Regression/LeastSquares.php#L83-L92
train
Returns the samples matrix
[ 30522, 2797, 3853, 4152, 16613, 4244, 18900, 17682, 1006, 1007, 1024, 8185, 1063, 1002, 8168, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 8168, 2004, 1002, 7099, 1007, 1063, 9140, 1035, 4895, 6182, 6199, 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/UsersManager/Model.php
Model.getUsers
public function getUsers(array $userLogins) { $where = ''; $bind = array(); if (!empty($userLogins)) { $where = 'WHERE login IN (' . Common::getSqlStringFieldsArray($userLogins) . ')'; $bind = $userLogins; } $db = $this->getDb(); $users = $...
php
public function getUsers(array $userLogins) { $where = ''; $bind = array(); if (!empty($userLogins)) { $where = 'WHERE login IN (' . Common::getSqlStringFieldsArray($userLogins) . ')'; $bind = $userLogins; } $db = $this->getDb(); $users = $...
[ "public", "function", "getUsers", "(", "array", "$", "userLogins", ")", "{", "$", "where", "=", "''", ";", "$", "bind", "=", "array", "(", ")", ";", "if", "(", "!", "empty", "(", "$", "userLogins", ")", ")", "{", "$", "where", "=", "'WHERE login IN...
Returns the list of all the users @param string[] $userLogins List of users to select. If empty, will return all users @return array the list of all the users
[ "Returns", "the", "list", "of", "all", "the", "users" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/UsersManager/Model.php#L54-L70
train
Get users by login
[ 30522, 2270, 3853, 2131, 20330, 2015, 1006, 9140, 1002, 5310, 21197, 7076, 1007, 1063, 1002, 2073, 1027, 1005, 1005, 1025, 1002, 14187, 1027, 9140, 1006, 1007, 1025, 2065, 1006, 999, 4064, 1006, 1002, 5310, 21197, 7076, 1007, 1007, 1063, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/NamespacedItemResolver.php
NamespacedItemResolver.parseNamespacedSegments
protected function parseNamespacedSegments($key) { [$namespace, $item] = explode('::', $key); // First we'll just explode the first segment to get the namespace and group // since the item should be in the remaining segments. Once we have these // two pieces of data we can proceed w...
php
protected function parseNamespacedSegments($key) { [$namespace, $item] = explode('::', $key); // First we'll just explode the first segment to get the namespace and group // since the item should be in the remaining segments. Once we have these // two pieces of data we can proceed w...
[ "protected", "function", "parseNamespacedSegments", "(", "$", "key", ")", "{", "[", "$", "namespace", ",", "$", "item", "]", "=", "explode", "(", "'::'", ",", "$", "key", ")", ";", "// First we'll just explode the first segment to get the namespace and group", "// s...
Parse an array of namespaced segments. @param string $key @return array
[ "Parse", "an", "array", "of", "namespaced", "segments", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Support/NamespacedItemResolver.php#L75-L89
train
Parse the namespace segments and return the namespace and item s value.
[ 30522, 5123, 3853, 11968, 5054, 14074, 23058, 5104, 13910, 8163, 1006, 1002, 30524, 2074, 15044, 1996, 2034, 6903, 2000, 2131, 1996, 3415, 15327, 1998, 2177, 1013, 1013, 2144, 1996, 8875, 2323, 2022, 1999, 1996, 3588, 9214, 1012, 2320, 2057...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/ExpressionValidator.php
ExpressionValidator.validate
public function validate($value, Constraint $constraint) { if (!$constraint instanceof Expression) { throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Expression'); } $variables = $constraint->values; $variables['value'] = $value; $variables['this'] ...
php
public function validate($value, Constraint $constraint) { if (!$constraint instanceof Expression) { throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Expression'); } $variables = $constraint->values; $variables['value'] = $value; $variables['this'] ...
[ "public", "function", "validate", "(", "$", "value", ",", "Constraint", "$", "constraint", ")", "{", "if", "(", "!", "$", "constraint", "instanceof", "Expression", ")", "{", "throw", "new", "UnexpectedTypeException", "(", "$", "constraint", ",", "__NAMESPACE__...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Validator/Constraints/ExpressionValidator.php#L36-L52
train
Validate the value against the expression
[ 30522, 2270, 3853, 9398, 3686, 1006, 1002, 3643, 1010, 27142, 1002, 27142, 1007, 1063, 2065, 1006, 999, 1002, 27142, 6013, 11253, 3670, 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...
symfony/symfony
src/Symfony/Component/Lock/Store/MemcachedStore.php
MemcachedStore.save
public function save(Key $key) { $token = $this->getUniqueToken($key); $key->reduceLifetime($this->initialTtl); if (!$this->memcached->add((string) $key, $token, (int) ceil($this->initialTtl))) { // the lock is already acquired. It could be us. Let's try to put off. $...
php
public function save(Key $key) { $token = $this->getUniqueToken($key); $key->reduceLifetime($this->initialTtl); if (!$this->memcached->add((string) $key, $token, (int) ceil($this->initialTtl))) { // the lock is already acquired. It could be us. Let's try to put off. $...
[ "public", "function", "save", "(", "Key", "$", "key", ")", "{", "$", "token", "=", "$", "this", "->", "getUniqueToken", "(", "$", "key", ")", ";", "$", "key", "->", "reduceLifetime", "(", "$", "this", "->", "initialTtl", ")", ";", "if", "(", "!", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Lock/Store/MemcachedStore.php#L58-L70
train
Save the lock
[ 30522, 2270, 3853, 3828, 1006, 3145, 1002, 3145, 1007, 1063, 1002, 19204, 1027, 1002, 2023, 1011, 1028, 2131, 19496, 12647, 11045, 2078, 1006, 1002, 3145, 1007, 1025, 1002, 3145, 1011, 1028, 5547, 15509, 7292, 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...
laravel/framework
src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php
VerifyCsrfToken.handle
public function handle($request, Closure $next) { if ( $this->isReading($request) || $this->runningUnitTests() || $this->inExceptArray($request) || $this->tokensMatch($request) ) { return tap($next($request), function ($response) use ($requ...
php
public function handle($request, Closure $next) { if ( $this->isReading($request) || $this->runningUnitTests() || $this->inExceptArray($request) || $this->tokensMatch($request) ) { return tap($next($request), function ($response) use ($requ...
[ "public", "function", "handle", "(", "$", "request", ",", "Closure", "$", "next", ")", "{", "if", "(", "$", "this", "->", "isReading", "(", "$", "request", ")", "||", "$", "this", "->", "runningUnitTests", "(", ")", "||", "$", "this", "->", "inExcept...
Handle an incoming request. @param \Illuminate\Http\Request $request @param \Closure $next @return mixed @throws \Illuminate\Session\TokenMismatchException
[ "Handle", "an", "incoming", "request", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php#L67-L83
train
Handle the request and return the response.
[ 30522, 2270, 3853, 5047, 1006, 1002, 5227, 1010, 8503, 1002, 2279, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 2003, 16416, 4667, 1006, 1002, 5227, 1007, 1064, 1064, 1002, 2023, 1011, 1028, 2770, 19496, 14581, 3215, 1006, 1007, 1064, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Kernel/Traits/Observable.php
Observable.notify
public function notify($event, $payload) { $result = null; foreach ($this->handlers as $condition => $handlers) { if ('*' === $condition || ($condition & $event) === $event) { foreach ($handlers as $handler) { if ($clause = $this->clauses[spl_object_h...
php
public function notify($event, $payload) { $result = null; foreach ($this->handlers as $condition => $handlers) { if ('*' === $condition || ($condition & $event) === $event) { foreach ($handlers as $handler) { if ($clause = $this->clauses[spl_object_h...
[ "public", "function", "notify", "(", "$", "event", ",", "$", "payload", ")", "{", "$", "result", "=", "null", ";", "foreach", "(", "$", "this", "->", "handlers", "as", "$", "condition", "=>", "$", "handlers", ")", "{", "if", "(", "'*'", "===", "$",...
@param string|int $event @param mixed ...$payload @return mixed|null
[ "@param", "string|int", "$event", "@param", "mixed", "...", "$payload" ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Kernel/Traits/Observable.php#L125-L154
train
Call all handlers that are interested in the given event
[ 30522, 2270, 3853, 2025, 8757, 1006, 1002, 2724, 1010, 1002, 18093, 1007, 1063, 1002, 2765, 1027, 19701, 1025, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 28213, 2015, 2004, 1002, 4650, 1027, 1028, 1002, 28213, 2015, 1007, 1063, 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...
walkor/Workerman
Worker.php
Worker.saveMasterPid
protected static function saveMasterPid() { if (static::$_OS !== OS_TYPE_LINUX) { return; } static::$_masterPid = posix_getpid(); if (false === file_put_contents(static::$pidFile, static::$_masterPid)) { throw new Exception('can not save pid to ' . static::$p...
php
protected static function saveMasterPid() { if (static::$_OS !== OS_TYPE_LINUX) { return; } static::$_masterPid = posix_getpid(); if (false === file_put_contents(static::$pidFile, static::$_masterPid)) { throw new Exception('can not save pid to ' . static::$p...
[ "protected", "static", "function", "saveMasterPid", "(", ")", "{", "if", "(", "static", "::", "$", "_OS", "!==", "OS_TYPE_LINUX", ")", "{", "return", ";", "}", "static", "::", "$", "_masterPid", "=", "posix_getpid", "(", ")", ";", "if", "(", "false", "...
Save pid. @throws Exception
[ "Save", "pid", "." ]
13649907f05014fcfffcfccaef01e63ad3339351
https://github.com/walkor/Workerman/blob/13649907f05014fcfffcfccaef01e63ad3339351/Worker.php#L1211-L1221
train
Save master pid to pid file
[ 30522, 5123, 10763, 3853, 3828, 8706, 23267, 1006, 1007, 1063, 2065, 1006, 10763, 1024, 1024, 1002, 1035, 9808, 999, 1027, 1027, 9808, 1035, 2828, 1035, 11603, 1007, 1063, 2709, 1025, 1065, 10763, 1024, 1024, 1002, 1035, 3040, 23267, 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...
octobercms/october
modules/backend/widgets/Lists.php
Lists.evalDatetimeTypeValue
protected function evalDatetimeTypeValue($record, $column, $value) { if ($value === null) { return null; } $dateTime = $this->validateDateTimeValue($value, $column); if ($column->format !== null) { $value = $dateTime->format($column->format); } ...
php
protected function evalDatetimeTypeValue($record, $column, $value) { if ($value === null) { return null; } $dateTime = $this->validateDateTimeValue($value, $column); if ($column->format !== null) { $value = $dateTime->format($column->format); } ...
[ "protected", "function", "evalDatetimeTypeValue", "(", "$", "record", ",", "$", "column", ",", "$", "value", ")", "{", "if", "(", "$", "value", "===", "null", ")", "{", "return", "null", ";", "}", "$", "dateTime", "=", "$", "this", "->", "validateDateT...
Process as a datetime value
[ "Process", "as", "a", "datetime", "value" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/widgets/Lists.php#L1213-L1239
train
Evaluate a datetime type value
[ 30522, 5123, 3853, 9345, 15150, 22513, 14428, 13874, 10175, 5657, 1006, 1002, 2501, 1010, 1002, 5930, 1010, 1002, 3643, 1007, 1063, 2065, 1006, 1002, 3643, 1027, 1027, 1027, 19701, 1007, 1063, 2709, 19701, 1025, 1065, 1002, 3058, 7292, 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/Cache/Repository.php
Repository.putManyForever
protected function putManyForever(array $values) { $result = true; foreach ($values as $key => $value) { if (! $this->forever($key, $value)) { $result = false; } } return $result; }
php
protected function putManyForever(array $values) { $result = true; foreach ($values as $key => $value) { if (! $this->forever($key, $value)) { $result = false; } } return $result; }
[ "protected", "function", "putManyForever", "(", "array", "$", "values", ")", "{", "$", "result", "=", "true", ";", "foreach", "(", "$", "values", "as", "$", "key", "=>", "$", "value", ")", "{", "if", "(", "!", "$", "this", "->", "forever", "(", "$"...
Store multiple items in the cache indefinitely. @param array $values @return bool
[ "Store", "multiple", "items", "in", "the", "cache", "indefinitely", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Cache/Repository.php#L268-L279
train
Put many values for every key
[ 30522, 5123, 3853, 2404, 2386, 2100, 29278, 22507, 1006, 9140, 1002, 5300, 1007, 1063, 1002, 2765, 1027, 2995, 1025, 18921, 6776, 1006, 1002, 5300, 2004, 1002, 3145, 1027, 1028, 1002, 3643, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 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
libs/Zend/Config.php
Zend_Config.next
public function next() { if ($this->_skipNextIteration) { $this->_skipNextIteration = false; return; } next($this->_data); $this->_index++; }
php
public function next() { if ($this->_skipNextIteration) { $this->_skipNextIteration = false; return; } next($this->_data); $this->_index++; }
[ "public", "function", "next", "(", ")", "{", "if", "(", "$", "this", "->", "_skipNextIteration", ")", "{", "$", "this", "->", "_skipNextIteration", "=", "false", ";", "return", ";", "}", "next", "(", "$", "this", "->", "_data", ")", ";", "$", "this",...
Defined by Iterator interface
[ "Defined", "by", "Iterator", "interface" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Config.php#L278-L286
train
Returns the next term in the iterator
[ 30522, 2270, 3853, 2279, 1006, 30524, 1009, 1025, 1065, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Field/ChoiceFormField.php
ChoiceFormField.containsOption
public function containsOption($optionValue, $options) { if ($this->validationDisabled) { return true; } foreach ($options as $option) { if ($option['value'] == $optionValue) { return true; } } return false; }
php
public function containsOption($optionValue, $options) { if ($this->validationDisabled) { return true; } foreach ($options as $option) { if ($option['value'] == $optionValue) { return true; } } return false; }
[ "public", "function", "containsOption", "(", "$", "optionValue", ",", "$", "options", ")", "{", "if", "(", "$", "this", "->", "validationDisabled", ")", "{", "return", "true", ";", "}", "foreach", "(", "$", "options", "as", "$", "option", ")", "{", "if...
Checks whether given value is in the existing options. @param string $optionValue @param array $options @return bool
[ "Checks", "whether", "given", "value", "is", "in", "the", "existing", "options", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DomCrawler/Field/ChoiceFormField.php#L278-L291
train
Returns true if the options array contains the option value
[ 30522, 2270, 3853, 3397, 7361, 3508, 1006, 1002, 5724, 10175, 5657, 1010, 1002, 7047, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 27354, 10521, 3085, 2094, 1007, 1063, 2709, 2995, 1025, 1065, 18921, 6776, 1006, 1002, 7047, 2004, 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/SitesManager/API.php
API.getTimezonesList
public function getTimezonesList() { if (!SettingsServer::isTimezoneSupportEnabled()) { return array('UTC' => $this->getTimezonesListUTCOffsets()); } $countries = StaticContainer::get('Piwik\Intl\Data\Provider\RegionDataProvider')->getCountryList(); $return = array(); ...
php
public function getTimezonesList() { if (!SettingsServer::isTimezoneSupportEnabled()) { return array('UTC' => $this->getTimezonesListUTCOffsets()); } $countries = StaticContainer::get('Piwik\Intl\Data\Provider\RegionDataProvider')->getCountryList(); $return = array(); ...
[ "public", "function", "getTimezonesList", "(", ")", "{", "if", "(", "!", "SettingsServer", "::", "isTimezoneSupportEnabled", "(", ")", ")", "{", "return", "array", "(", "'UTC'", "=>", "$", "this", "->", "getTimezonesListUTCOffsets", "(", ")", ")", ";", "}", ...
Returns the list of timezones supported. Used for addSite and updateSite @return array of timezone strings
[ "Returns", "the", "list", "of", "timezones", "supported", ".", "Used", "for", "addSite", "and", "updateSite" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/SitesManager/API.php#L1421-L1452
train
Returns a list of timezones in the system
[ 30522, 2270, 3853, 2131, 7292, 15975, 14540, 2923, 1006, 1007, 1063, 2065, 1006, 999, 10906, 8043, 6299, 1024, 1024, 21541, 14428, 15975, 6342, 9397, 11589, 8189, 23242, 1006, 1007, 1007, 1063, 2709, 9140, 1006, 1005, 11396, 1005, 1027, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/CoreHome/Controller.php
Controller.checkForUpdates
public function checkForUpdates() { Piwik::checkUserHasSomeAdminAccess(); $this->checkTokenInUrl(); // perform check (but only once every 10s) UpdateCheck::check($force = false, UpdateCheck::UI_CLICK_CHECK_INTERVAL); $view = new View('@CoreHome/checkForUpdates'); $t...
php
public function checkForUpdates() { Piwik::checkUserHasSomeAdminAccess(); $this->checkTokenInUrl(); // perform check (but only once every 10s) UpdateCheck::check($force = false, UpdateCheck::UI_CLICK_CHECK_INTERVAL); $view = new View('@CoreHome/checkForUpdates'); $t...
[ "public", "function", "checkForUpdates", "(", ")", "{", "Piwik", "::", "checkUserHasSomeAdminAccess", "(", ")", ";", "$", "this", "->", "checkTokenInUrl", "(", ")", ";", "// perform check (but only once every 10s)", "UpdateCheck", "::", "check", "(", "$", "force", ...
Forces a check for updates and re-renders the header message. This will check piwik.org at most once per 10s.
[ "Forces", "a", "check", "for", "updates", "and", "re", "-", "renders", "the", "header", "message", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/CoreHome/Controller.php#L253-L264
train
Check for updates
[ 30522, 2270, 3853, 4638, 29278, 6279, 27122, 1006, 1007, 1063, 14255, 9148, 2243, 1024, 1024, 4638, 20330, 14949, 14045, 4215, 22311, 9468, 7971, 1006, 1007, 1025, 1002, 2023, 1011, 1028, 4638, 18715, 18595, 11231, 12190, 1006, 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...
laravel/framework
src/Illuminate/Database/Eloquent/Builder.php
Builder.scopes
public function scopes(array $scopes) { $builder = $this; foreach ($scopes as $scope => $parameters) { // If the scope key is an integer, then the scope was passed as the value and // the parameter list is empty, so we will format the scope name and these // para...
php
public function scopes(array $scopes) { $builder = $this; foreach ($scopes as $scope => $parameters) { // If the scope key is an integer, then the scope was passed as the value and // the parameter list is empty, so we will format the scope name and these // para...
[ "public", "function", "scopes", "(", "array", "$", "scopes", ")", "{", "$", "builder", "=", "$", "this", ";", "foreach", "(", "$", "scopes", "as", "$", "scope", "=>", "$", "parameters", ")", "{", "// If the scope key is an integer, then the scope was passed as t...
Call the given local model scopes. @param array $scopes @return static|mixed
[ "Call", "the", "given", "local", "model", "scopes", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Builder.php#L921-L943
train
This method will return the builder with the scopes passed in the array
[ 30522, 2270, 3853, 9531, 2015, 1006, 9140, 1002, 9531, 2015, 1007, 1063, 1002, 12508, 1027, 1002, 2023, 1025, 18921, 6776, 1006, 1002, 9531, 2015, 2004, 1002, 9531, 1027, 1028, 1002, 11709, 1007, 1063, 1013, 1013, 2065, 1996, 9531, 3145, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php
Deprecation.isIndirect
public function isIndirect() { $erroringFile = $erroringPackage = null; foreach ($this->trace as $line) { if (\in_array($line['function'], ['require', 'require_once', 'include', 'include_once'], true)) { continue; } if (!isset($line['file'])) { ...
php
public function isIndirect() { $erroringFile = $erroringPackage = null; foreach ($this->trace as $line) { if (\in_array($line['function'], ['require', 'require_once', 'include', 'include_once'], true)) { continue; } if (!isset($line['file'])) { ...
[ "public", "function", "isIndirect", "(", ")", "{", "$", "erroringFile", "=", "$", "erroringPackage", "=", "null", ";", "foreach", "(", "$", "this", "->", "trace", "as", "$", "line", ")", "{", "if", "(", "\\", "in_array", "(", "$", "line", "[", "'func...
Tells whether both the calling package and the called package are vendor packages. @return bool
[ "Tells", "whether", "both", "the", "calling", "package", "and", "the", "called", "package", "are", "vendor", "packages", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php#L165-L194
train
Returns true if the error message is an indirect error message.
[ 30522, 2270, 3853, 2003, 22254, 7442, 6593, 1006, 1007, 1063, 1002, 7561, 2075, 8873, 2571, 1027, 1002, 7561, 2075, 23947, 4270, 1027, 19701, 1025, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 7637, 2004, 1002, 2240, 1007, 1063, 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...
matomo-org/matomo
libs/Zend/Db/Statement/Db2.php
Zend_Db_Statement_Db2._bindParam
public function _bindParam($parameter, &$variable, $type = null, $length = null, $options = null) { if ($type === null) { $type = DB2_PARAM_IN; } if (isset($options['data-type'])) { $datatype = $options['data-type']; } else { $datatype = DB2_CHAR;...
php
public function _bindParam($parameter, &$variable, $type = null, $length = null, $options = null) { if ($type === null) { $type = DB2_PARAM_IN; } if (isset($options['data-type'])) { $datatype = $options['data-type']; } else { $datatype = DB2_CHAR;...
[ "public", "function", "_bindParam", "(", "$", "parameter", ",", "&", "$", "variable", ",", "$", "type", "=", "null", ",", "$", "length", "=", "null", ",", "$", "options", "=", "null", ")", "{", "if", "(", "$", "type", "===", "null", ")", "{", "$"...
Binds a parameter to the specified variable name. @param mixed $parameter Name the parameter, either integer or string. @param mixed $variable Reference to PHP variable containing the value. @param mixed $type OPTIONAL Datatype of SQL parameter. @param mixed $length OPTIONAL Length of SQL parameter. @param mi...
[ "Binds", "a", "parameter", "to", "the", "specified", "variable", "name", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Statement/Db2.php#L87-L111
train
Binds a parameter to a variable in the statement
[ 30522, 2270, 3853, 1035, 14187, 28689, 2213, 1006, 1002, 16381, 1010, 1004, 1002, 8023, 1010, 1002, 2828, 1027, 19701, 1010, 1002, 3091, 1027, 19701, 1010, 1002, 7047, 1027, 19701, 1007, 1063, 2065, 1006, 1002, 2828, 1027, 1027, 1027, 19701...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/LogDeleter.php
LogDeleter.deleteVisits
public function deleteVisits($visitIds) { $numDeletedVisits = 0; foreach ($this->logTablesProvider->getAllLogTables() as $logTable) { if ($logTable->getColumnToJoinOnIdVisit()) { $numVisits = $this->rawLogDao->deleteFromLogTable($logTable->getName(), $visitIds); ...
php
public function deleteVisits($visitIds) { $numDeletedVisits = 0; foreach ($this->logTablesProvider->getAllLogTables() as $logTable) { if ($logTable->getColumnToJoinOnIdVisit()) { $numVisits = $this->rawLogDao->deleteFromLogTable($logTable->getName(), $visitIds); ...
[ "public", "function", "deleteVisits", "(", "$", "visitIds", ")", "{", "$", "numDeletedVisits", "=", "0", ";", "foreach", "(", "$", "this", "->", "logTablesProvider", "->", "getAllLogTables", "(", ")", "as", "$", "logTable", ")", "{", "if", "(", "$", "log...
Deletes visits by ID. This method cascades, so conversions, conversion items and visit actions for the visits are also deleted. @param int[] $visitIds @return int The number of deleted visits.
[ "Deletes", "visits", "by", "ID", ".", "This", "method", "cascades", "so", "conversions", "conversion", "items", "and", "visit", "actions", "for", "the", "visits", "are", "also", "deleted", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/LogDeleter.php#L43-L57
train
Delete visits from all log tables
[ 30522, 2270, 3853, 3972, 12870, 11365, 12762, 1006, 1002, 3942, 9821, 1007, 1063, 1002, 16371, 26876, 12260, 3064, 11365, 12762, 1027, 1014, 1025, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 8833, 10880, 13102, 12298, 18688, 1011, 1028, 2131, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.checkDestination
private function checkDestination($package) { $question_helper = $this->getHelper('question'); Installer::isValidDestination($this->destination . DS . $package->install_path); if (Installer::lastErrorCode() == Installer::IS_LINK) { $this->output->write("\x0D"); $thi...
php
private function checkDestination($package) { $question_helper = $this->getHelper('question'); Installer::isValidDestination($this->destination . DS . $package->install_path); if (Installer::lastErrorCode() == Installer::IS_LINK) { $this->output->write("\x0D"); $thi...
[ "private", "function", "checkDestination", "(", "$", "package", ")", "{", "$", "question_helper", "=", "$", "this", "->", "getHelper", "(", "'question'", ")", ";", "Installer", "::", "isValidDestination", "(", "$", "this", "->", "destination", ".", "DS", "."...
@param Package $package @return bool
[ "@param", "Package", "$package" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Console/Gpm/InstallCommand.php#L608-L641
train
Checks if the package is a symlink and deletes the symlink
[ 30522, 2797, 3853, 4638, 6155, 13770, 3508, 1006, 1002, 7427, 1007, 1063, 1002, 3160, 1035, 2393, 2121, 1027, 1002, 2023, 1011, 1028, 2131, 16001, 4842, 1006, 1005, 3160, 1005, 1007, 1025, 16500, 2121, 1024, 1024, 2003, 10175, 3593, 6155, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
barryvdh/laravel-debugbar
src/DataCollector/QueryCollector.php
QueryCollector.findMiddlewareFromFile
protected function findMiddlewareFromFile($file) { $filename = pathinfo($file, PATHINFO_FILENAME); foreach ($this->middleware as $alias => $class) { if (strpos($class, $filename) !== false) { return $alias; } } }
php
protected function findMiddlewareFromFile($file) { $filename = pathinfo($file, PATHINFO_FILENAME); foreach ($this->middleware as $alias => $class) { if (strpos($class, $filename) !== false) { return $alias; } } }
[ "protected", "function", "findMiddlewareFromFile", "(", "$", "file", ")", "{", "$", "filename", "=", "pathinfo", "(", "$", "file", ",", "PATHINFO_FILENAME", ")", ";", "foreach", "(", "$", "this", "->", "middleware", "as", "$", "alias", "=>", "$", "class", ...
Find the middleware alias from the file. @param string $file @return string|null
[ "Find", "the", "middleware", "alias", "from", "the", "file", "." ]
2d195779ea4f809f69764a795e2ec371dbb76a96
https://github.com/barryvdh/laravel-debugbar/blob/2d195779ea4f809f69764a795e2ec371dbb76a96/src/DataCollector/QueryCollector.php#L298-L307
train
Find the middleware from the file
[ 30522, 5123, 3853, 2424, 4328, 20338, 8059, 19699, 5358, 8873, 2571, 1006, 1002, 5371, 1007, 1063, 1002, 5371, 18442, 1027, 4130, 2378, 14876, 1006, 1002, 5371, 1010, 4130, 2378, 14876, 1035, 5371, 18442, 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...
symfony/symfony
src/Symfony/Component/DependencyInjection/Argument/ServiceLocator.php
ServiceLocator.get
public function get($id) { return isset($this->serviceMap[$id]) ? ($this->factory)(...$this->serviceMap[$id]) : parent::get($id); }
php
public function get($id) { return isset($this->serviceMap[$id]) ? ($this->factory)(...$this->serviceMap[$id]) : parent::get($id); }
[ "public", "function", "get", "(", "$", "id", ")", "{", "return", "isset", "(", "$", "this", "->", "serviceMap", "[", "$", "id", "]", ")", "?", "(", "$", "this", "->", "factory", ")", "(", "...", "$", "this", "->", "serviceMap", "[", "$", "id", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/Argument/ServiceLocator.php#L38-L41
train
Get a service by ID
[ 30522, 2270, 3853, 2131, 1006, 1002, 8909, 1007, 1063, 2709, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 2326, 2863, 2361, 1031, 1002, 8909, 1033, 1007, 1029, 1006, 1002, 2023, 1011, 1028, 4713, 1007, 1006, 1012, 1012, 1012, 1002, 2023, 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...
slimphp/Slim
Slim/Http/Stream.php
Stream.attach
protected function attach($newStream) { if (is_resource($newStream) === false) { throw new InvalidArgumentException(__METHOD__ . ' argument must be a valid PHP resource'); } if ($this->isAttached() === true) { $this->detach(); } $this->stream = $newS...
php
protected function attach($newStream) { if (is_resource($newStream) === false) { throw new InvalidArgumentException(__METHOD__ . ' argument must be a valid PHP resource'); } if ($this->isAttached() === true) { $this->detach(); } $this->stream = $newS...
[ "protected", "function", "attach", "(", "$", "newStream", ")", "{", "if", "(", "is_resource", "(", "$", "newStream", ")", "===", "false", ")", "{", "throw", "new", "InvalidArgumentException", "(", "__METHOD__", ".", "' argument must be a valid PHP resource'", ")",...
Attach new resource to this object. Note: This method is not part of the PSR-7 standard. @param resource $newStream A PHP resource handle. @throws InvalidArgumentException If argument is not a valid PHP resource.
[ "Attach", "new", "resource", "to", "this", "object", "." ]
ccef5f7d8bcd469d59cbe64f6210d83764f91543
https://github.com/slimphp/Slim/blob/ccef5f7d8bcd469d59cbe64f6210d83764f91543/Slim/Http/Stream.php#L142-L153
train
Attaches the stream to the current object
[ 30522, 5123, 3853, 22476, 1006, 1002, 2739, 25379, 1007, 1063, 2065, 1006, 2003, 1035, 7692, 1006, 1002, 2739, 25379, 1007, 1027, 1027, 1027, 6270, 1007, 1063, 5466, 2047, 19528, 2906, 22850, 15781, 2595, 24422, 1006, 1035, 1035, 4118, 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...
getgrav/grav
system/src/Grav/Common/Helpers/Excerpts.php
Excerpts.processImageExcerpt
public static function processImageExcerpt(array $excerpt, PageInterface $page) { $url = htmlspecialchars_decode(urldecode($excerpt['element']['attributes']['src'])); $url_parts = static::parseUrl($url); $media = null; $filename = null; if (!empty($url_parts['stream'])) { ...
php
public static function processImageExcerpt(array $excerpt, PageInterface $page) { $url = htmlspecialchars_decode(urldecode($excerpt['element']['attributes']['src'])); $url_parts = static::parseUrl($url); $media = null; $filename = null; if (!empty($url_parts['stream'])) { ...
[ "public", "static", "function", "processImageExcerpt", "(", "array", "$", "excerpt", ",", "PageInterface", "$", "page", ")", "{", "$", "url", "=", "htmlspecialchars_decode", "(", "urldecode", "(", "$", "excerpt", "[", "'element'", "]", "[", "'attributes'", "]"...
Process an image excerpt @param array $excerpt @param PageInterface $page @return array
[ "Process", "an", "image", "excerpt" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Helpers/Excerpts.php#L198-L266
train
Process image excerpt
[ 30522, 2270, 10763, 3853, 2832, 9581, 18372, 2595, 17119, 13876, 1006, 9140, 1002, 28142, 1010, 3931, 18447, 2121, 12172, 1002, 3931, 1007, 1063, 1002, 24471, 2140, 1027, 16129, 13102, 8586, 4818, 7507, 2869, 1035, 21933, 3207, 1006, 24471, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Framework/Uri/UriPartsFilter.php
UriPartsFilter.filterPort
public static function filterPort($port = null) { if (null === $port || (\is_int($port) && ($port >= 1 && $port <= 65535))) { return $port; } throw new \InvalidArgumentException('Uri port must be null or an integer between 1 and 65535'); }
php
public static function filterPort($port = null) { if (null === $port || (\is_int($port) && ($port >= 1 && $port <= 65535))) { return $port; } throw new \InvalidArgumentException('Uri port must be null or an integer between 1 and 65535'); }
[ "public", "static", "function", "filterPort", "(", "$", "port", "=", "null", ")", "{", "if", "(", "null", "===", "$", "port", "||", "(", "\\", "is_int", "(", "$", "port", ")", "&&", "(", "$", "port", ">=", "1", "&&", "$", "port", "<=", "65535", ...
Filter Uri port. This method @param int|null $port @return int|null @throws \InvalidArgumentException If the port is invalid.
[ "Filter", "Uri", "port", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Framework/Uri/UriPartsFilter.php#L85-L92
train
Filter the port
[ 30522, 2270, 10763, 3853, 11307, 6442, 1006, 1002, 3417, 1027, 19701, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 1027, 1002, 3417, 1064, 1064, 1006, 1032, 2003, 1035, 20014, 1006, 1002, 3417, 1007, 1004, 1004, 1006, 1002, 3417, 1028, 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/Http/Request.php
Request.is
public function is(...$patterns) { $path = $this->decodedPath(); foreach ($patterns as $pattern) { if (Str::is($pattern, $path)) { return true; } } return false; }
php
public function is(...$patterns) { $path = $this->decodedPath(); foreach ($patterns as $pattern) { if (Str::is($pattern, $path)) { return true; } } return false; }
[ "public", "function", "is", "(", "...", "$", "patterns", ")", "{", "$", "path", "=", "$", "this", "->", "decodedPath", "(", ")", ";", "foreach", "(", "$", "patterns", "as", "$", "pattern", ")", "{", "if", "(", "Str", "::", "is", "(", "$", "patter...
Determine if the current request URI matches a pattern. @param mixed ...$patterns @return bool
[ "Determine", "if", "the", "current", "request", "URI", "matches", "a", "pattern", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Http/Request.php#L185-L196
train
Checks if the path matches one of the patterns
[ 30522, 2270, 3853, 2003, 1006, 1012, 1012, 1012, 1002, 7060, 1007, 1063, 1002, 4130, 1027, 1002, 2023, 1011, 1028, 21933, 5732, 15069, 1006, 1007, 1025, 18921, 6776, 1006, 1002, 7060, 2004, 1002, 5418, 1007, 1063, 2065, 1006, 2358, 2099, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Console/Scheduling/CallbackEvent.php
CallbackEvent.run
public function run(Container $container) { if ($this->description && $this->withoutOverlapping && ! $this->mutex->create($this)) { return; } $pid = getmypid(); register_shutdown_function(function () use ($pid) { if ($pid === getmypid()) { ...
php
public function run(Container $container) { if ($this->description && $this->withoutOverlapping && ! $this->mutex->create($this)) { return; } $pid = getmypid(); register_shutdown_function(function () use ($pid) { if ($pid === getmypid()) { ...
[ "public", "function", "run", "(", "Container", "$", "container", ")", "{", "if", "(", "$", "this", "->", "description", "&&", "$", "this", "->", "withoutOverlapping", "&&", "!", "$", "this", "->", "mutex", "->", "create", "(", "$", "this", ")", ")", ...
Run the given event. @param \Illuminate\Contracts\Container\Container $container @return mixed @throws \Exception
[ "Run", "the", "given", "event", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Console/Scheduling/CallbackEvent.php#L56-L84
train
Runs the callback
[ 30522, 2270, 3853, 2448, 1006, 11661, 1002, 11661, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 6412, 1004, 1004, 1002, 2023, 1011, 1028, 2302, 7840, 2721, 14853, 1004, 1004, 999, 1002, 2023, 1011, 1028, 20101, 2595, 1011, 1028, 3443, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Grav.php
Grav.setup
public function setup(string $environment = null) { if (isset($this->initialized['setup'])) { return $this; } $this->initialized['setup'] = true; $this->measureTime('_setup', 'Site Setup', function () use ($environment) { // Force environment if passed to th...
php
public function setup(string $environment = null) { if (isset($this->initialized['setup'])) { return $this; } $this->initialized['setup'] = true; $this->measureTime('_setup', 'Site Setup', function () use ($environment) { // Force environment if passed to th...
[ "public", "function", "setup", "(", "string", "$", "environment", "=", "null", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "initialized", "[", "'setup'", "]", ")", ")", "{", "return", "$", "this", ";", "}", "$", "this", "->", "initialized",...
Setup Grav instance using specific environment. Initializes Grav streams by @param string|null $environment @return $this
[ "Setup", "Grav", "instance", "using", "specific", "environment", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Grav.php#L152-L171
train
Setup method.
[ 30522, 2270, 3853, 16437, 1006, 5164, 1002, 4044, 1027, 19701, 1007, 1063, 2065, 1006, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 3988, 3550, 1031, 1005, 16437, 1005, 1033, 1007, 1007, 1063, 2709, 1002, 2023, 1025, 1065, 1002, 2023, 1011, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.truncate
public static function truncate($string, $limit = 150, $up_to_break = false, $break = ' ', $pad = '&hellip;') { // return with no change if string is shorter than $limit if (mb_strlen($string) <= $limit) { return $string; } // is $break present between $limit and the end...
php
public static function truncate($string, $limit = 150, $up_to_break = false, $break = ' ', $pad = '&hellip;') { // return with no change if string is shorter than $limit if (mb_strlen($string) <= $limit) { return $string; } // is $break present between $limit and the end...
[ "public", "static", "function", "truncate", "(", "$", "string", ",", "$", "limit", "=", "150", ",", "$", "up_to_break", "=", "false", ",", "$", "break", "=", "' '", ",", "$", "pad", "=", "'&hellip;'", ")", "{", "// return with no change if string is shorter ...
Truncate text by number of characters but can cut off words. @param string $string @param int $limit Max number of characters. @param bool $up_to_break truncate up to breakpoint after char count @param string $break Break point. @param string $pad Appended padding to the end of the string...
[ "Truncate", "text", "by", "number", "of", "characters", "but", "can", "cut", "off", "words", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Utils.php#L413-L430
train
Truncates string to specified length
[ 30522, 2270, 10763, 3853, 19817, 4609, 16280, 1006, 1002, 5164, 1010, 1002, 5787, 1027, 5018, 1010, 1002, 2039, 1035, 2000, 1035, 3338, 1027, 6270, 1010, 1002, 3338, 1027, 1005, 1005, 1010, 1002, 11687, 1027, 1005, 1004, 3109, 11514, 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...
symfony/symfony
src/Symfony/Component/HttpFoundation/Session/Session.php
Session.registerBag
public function registerBag(SessionBagInterface $bag) { $this->storage->registerBag(new SessionBagProxy($bag, $this->data, $this->usageIndex)); }
php
public function registerBag(SessionBagInterface $bag) { $this->storage->registerBag(new SessionBagProxy($bag, $this->data, $this->usageIndex)); }
[ "public", "function", "registerBag", "(", "SessionBagInterface", "$", "bag", ")", "{", "$", "this", "->", "storage", "->", "registerBag", "(", "new", "SessionBagProxy", "(", "$", "bag", ",", "$", "this", "->", "data", ",", "$", "this", "->", "usageIndex", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/Session/Session.php#L246-L249
train
Register a session bag
[ 30522, 2270, 3853, 4236, 16078, 1006, 5219, 16078, 18447, 2121, 12172, 1002, 4524, 1007, 1063, 1002, 2023, 1011, 1028, 5527, 1011, 1028, 4236, 30524, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Bundle/WebProfilerBundle/Csp/ContentSecurityPolicyHandler.php
ContentSecurityPolicyHandler.generateCspHeader
private function generateCspHeader(array $directives) { return array_reduce(array_keys($directives), function ($res, $name) use ($directives) { return ('' !== $res ? $res.'; ' : '').sprintf('%s %s', $name, implode(' ', $directives[$name])); }, ''); }
php
private function generateCspHeader(array $directives) { return array_reduce(array_keys($directives), function ($res, $name) use ($directives) { return ('' !== $res ? $res.'; ' : '').sprintf('%s %s', $name, implode(' ', $directives[$name])); }, ''); }
[ "private", "function", "generateCspHeader", "(", "array", "$", "directives", ")", "{", "return", "array_reduce", "(", "array_keys", "(", "$", "directives", ")", ",", "function", "(", "$", "res", ",", "$", "name", ")", "use", "(", "$", "directives", ")", ...
Converts a directive set array into Content-Security-Policy header. @param array $directives The directive set @return string The Content-Security-Policy header
[ "Converts", "a", "directive", "set", "array", "into", "Content", "-", "Security", "-", "Policy", "header", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/WebProfilerBundle/Csp/ContentSecurityPolicyHandler.php#L179-L184
train
Generate the CSP header
[ 30522, 2797, 3853, 9699, 6169, 8458, 13775, 2121, 1006, 9140, 1002, 16449, 2015, 1007, 1063, 2709, 9140, 1035, 5547, 1006, 9140, 1035, 6309, 1006, 1002, 16449, 2015, 1007, 1010, 3853, 1006, 1002, 24501, 1010, 1002, 2171, 1007, 2224, 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/system/classes/MediaLibrary.php
MediaLibrary.getMediaRelativePath
protected function getMediaRelativePath($path) { $path = self::validatePath($path, true); if (substr($path, 0, $this->storageFolderNameLength) == $this->storageFolder) { return substr($path, $this->storageFolderNameLength); } throw new SystemException(sprintf('Cannot co...
php
protected function getMediaRelativePath($path) { $path = self::validatePath($path, true); if (substr($path, 0, $this->storageFolderNameLength) == $this->storageFolder) { return substr($path, $this->storageFolderNameLength); } throw new SystemException(sprintf('Cannot co...
[ "protected", "function", "getMediaRelativePath", "(", "$", "path", ")", "{", "$", "path", "=", "self", "::", "validatePath", "(", "$", "path", ",", "true", ")", ";", "if", "(", "substr", "(", "$", "path", ",", "0", ",", "$", "this", "->", "storageFol...
Returns path relative to the Library root folder. @param string $path Specifies a path relative to the Library disk root. @return string Returns the updated path.
[ "Returns", "path", "relative", "to", "the", "Library", "root", "folder", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/classes/MediaLibrary.php#L558-L567
train
Returns the relative path to the media library folder
[ 30522, 5123, 3853, 2131, 16969, 16570, 8082, 15069, 1006, 1002, 30524, 1002, 2023, 1011, 1028, 5527, 10371, 11795, 14074, 7770, 13512, 2232, 1007, 1027, 1027, 1002, 2023, 1011, 1028, 5527, 10371, 2121, 1007, 1063, 2709, 4942, 3367, 2099, 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...
matomo-org/matomo
core/Translation/Translator.php
Translator.getJavascriptTranslations
public function getJavascriptTranslations() { $clientSideTranslations = array(); foreach ($this->getClientSideTranslationKeys() as $id) { list($plugin, $key) = explode('_', $id, 2); $clientSideTranslations[$id] = $this->getTranslation($id, $this->currentLanguage, $plugin, $ke...
php
public function getJavascriptTranslations() { $clientSideTranslations = array(); foreach ($this->getClientSideTranslationKeys() as $id) { list($plugin, $key) = explode('_', $id, 2); $clientSideTranslations[$id] = $this->getTranslation($id, $this->currentLanguage, $plugin, $ke...
[ "public", "function", "getJavascriptTranslations", "(", ")", "{", "$", "clientSideTranslations", "=", "array", "(", ")", ";", "foreach", "(", "$", "this", "->", "getClientSideTranslationKeys", "(", ")", "as", "$", "id", ")", "{", "list", "(", "$", "plugin", ...
Generate javascript translations array
[ "Generate", "javascript", "translations", "array" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Translation/Translator.php#L127-L139
train
Returns javascript translations
[ 30522, 2270, 3853, 2131, 3900, 12044, 23235, 6494, 3619, 13490, 2015, 1006, 1007, 1063, 1002, 7846, 5178, 6494, 3619, 13490, 2015, 1027, 9140, 1006, 1007, 1025, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 2131, 20464, 11638, 7363, 6494, 3619...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Abstract.php
Zend_Db_Adapter_Abstract.insert
public function insert($table, array $bind) { // extract and quote col names from the array keys $cols = array(); $vals = array(); $i = 0; foreach ($bind as $col => $val) { $cols[] = $this->quoteIdentifier($col, true); if ($val instanceof Zend_Db_Expr)...
php
public function insert($table, array $bind) { // extract and quote col names from the array keys $cols = array(); $vals = array(); $i = 0; foreach ($bind as $col => $val) { $cols[] = $this->quoteIdentifier($col, true); if ($val instanceof Zend_Db_Expr)...
[ "public", "function", "insert", "(", "$", "table", ",", "array", "$", "bind", ")", "{", "// extract and quote col names from the array keys", "$", "cols", "=", "array", "(", ")", ";", "$", "vals", "=", "array", "(", ")", ";", "$", "i", "=", "0", ";", "...
Inserts a table row with specified data. @param mixed $table The table to insert data into. @param array $bind Column-value pairs. @return int The number of affected rows. @throws Zend_Db_Adapter_Exception
[ "Inserts", "a", "table", "row", "with", "specified", "data", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Adapter/Abstract.php#L536-L578
train
Insert a row into a table
[ 30522, 2270, 3853, 19274, 1006, 1002, 2795, 1010, 9140, 1002, 14187, 1007, 1063, 1013, 1013, 14817, 1998, 14686, 8902, 3415, 2013, 1996, 9140, 6309, 1002, 8902, 2015, 1027, 9140, 1006, 1007, 1025, 1002, 11748, 2015, 1027, 9140, 1006, 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...
z-song/laravel-admin
src/Form/Field/Embeds.php
Embeds.prepare
public function prepare($input) { $form = $this->buildEmbeddedForm(); return $form->setOriginal($this->original)->prepare($input); }
php
public function prepare($input) { $form = $this->buildEmbeddedForm(); return $form->setOriginal($this->original)->prepare($input); }
[ "public", "function", "prepare", "(", "$", "input", ")", "{", "$", "form", "=", "$", "this", "->", "buildEmbeddedForm", "(", ")", ";", "return", "$", "form", "->", "setOriginal", "(", "$", "this", "->", "original", ")", "->", "prepare", "(", "$", "in...
Prepare input data for insert or update. @param array $input @return array
[ "Prepare", "input", "data", "for", "insert", "or", "update", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Form/Field/Embeds.php#L45-L50
train
Prepare the input for the embedded form
[ 30522, 2270, 3853, 7374, 1006, 1002, 7953, 1007, 1063, 1002, 2433, 1027, 1002, 2023, 1011, 1028, 3857, 6633, 8270, 5732, 14192, 1006, 1007, 1025, 2709, 1002, 2433, 1011, 1028, 2275, 10050, 24965, 1006, 1002, 2023, 1011, 1028, 2434, 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
plugins/Marketplace/UpdateCommunication.php
UpdateCommunication.sendNotificationIfUpdatesAvailable
public function sendNotificationIfUpdatesAvailable() { $pluginsHavingUpdate = $this->getPluginsHavingUpdate(); if (empty($pluginsHavingUpdate)) { return; } $pluginsToBeNotified = array(); foreach ($pluginsHavingUpdate as $plugin) { if ($this->hasNot...
php
public function sendNotificationIfUpdatesAvailable() { $pluginsHavingUpdate = $this->getPluginsHavingUpdate(); if (empty($pluginsHavingUpdate)) { return; } $pluginsToBeNotified = array(); foreach ($pluginsHavingUpdate as $plugin) { if ($this->hasNot...
[ "public", "function", "sendNotificationIfUpdatesAvailable", "(", ")", "{", "$", "pluginsHavingUpdate", "=", "$", "this", "->", "getPluginsHavingUpdate", "(", ")", ";", "if", "(", "empty", "(", "$", "pluginsHavingUpdate", ")", ")", "{", "return", ";", "}", "$",...
Sends an email to all super users if there is an update available for any plugins from the Marketplace. For each update we send an email only once. @return bool
[ "Sends", "an", "email", "to", "all", "super", "users", "if", "there", "is", "an", "update", "available", "for", "any", "plugins", "from", "the", "Marketplace", ".", "For", "each", "update", "we", "send", "an", "email", "only", "once", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Marketplace/UpdateCommunication.php#L73-L96
train
Sends notifications if updates are available
[ 30522, 2270, 3853, 4604, 17048, 9031, 10128, 6279, 27122, 12462, 11733, 3468, 1006, 1007, 1063, 1002, 13354, 7076, 3270, 6455, 6279, 13701, 1027, 1002, 2023, 1011, 1028, 2131, 24759, 15916, 7076, 3270, 6455, 6279, 13701, 1006, 1007, 1025, 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/Grid/Filter/Gt.php
Gt.condition
public function condition($inputs) { $value = Arr::get($inputs, $this->column); if (is_null($value)) { return; } $this->value = $value; return $this->buildCondition($this->column, '>=', $this->value); }
php
public function condition($inputs) { $value = Arr::get($inputs, $this->column); if (is_null($value)) { return; } $this->value = $value; return $this->buildCondition($this->column, '>=', $this->value); }
[ "public", "function", "condition", "(", "$", "inputs", ")", "{", "$", "value", "=", "Arr", "::", "get", "(", "$", "inputs", ",", "$", "this", "->", "column", ")", ";", "if", "(", "is_null", "(", "$", "value", ")", ")", "{", "return", ";", "}", ...
Get condition of this filter. @param array $inputs @return array|mixed|void
[ "Get", "condition", "of", "this", "filter", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Grid/Filter/Gt.php#L21-L32
train
Return the condition for the current query.
[ 30522, 2270, 3853, 4650, 1006, 1002, 20407, 1007, 1063, 1002, 3643, 1027, 12098, 2099, 1024, 1024, 2131, 1006, 1002, 20407, 1010, 1002, 2023, 1011, 1028, 5930, 1007, 1025, 2065, 1006, 2003, 1035, 19701, 1006, 1002, 3643, 1007, 1007, 1063, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/GeoIp2/LocationProvider/GeoIp2/ServerModule.php
ServerModule.getGeoIpServerVars
protected static function getGeoIpServerVars($type = null) { $storedSettings = self::getSystemSettingsValues(); if ($type === null) { return $storedSettings; } if (array_key_exists($type, $storedSettings)) { return $storedSettings[$type]; } ...
php
protected static function getGeoIpServerVars($type = null) { $storedSettings = self::getSystemSettingsValues(); if ($type === null) { return $storedSettings; } if (array_key_exists($type, $storedSettings)) { return $storedSettings[$type]; } ...
[ "protected", "static", "function", "getGeoIpServerVars", "(", "$", "type", "=", "null", ")", "{", "$", "storedSettings", "=", "self", "::", "getSystemSettingsValues", "(", ")", ";", "if", "(", "$", "type", "===", "null", ")", "{", "return", "$", "storedSet...
Returns currently configured server variable name for given type @param string|null $type @return mixed|string
[ "Returns", "currently", "configured", "server", "variable", "name", "for", "given", "type" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/GeoIp2/LocationProvider/GeoIp2/ServerModule.php#L302-L315
train
Get the GeoIP Server vars
[ 30522, 5123, 10763, 3853, 2131, 3351, 10448, 29251, 2099, 6299, 10755, 2015, 1006, 1002, 2828, 1027, 19701, 1007, 1063, 1002, 8250, 21678, 8613, 1027, 2969, 1024, 1024, 4152, 27268, 6633, 21678, 8613, 10175, 15808, 1006, 1007, 1025, 2065, 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/Foundation/Console/ConfigCacheCommand.php
ConfigCacheCommand.getFreshConfiguration
protected function getFreshConfiguration() { $app = require $this->laravel->bootstrapPath().'/app.php'; $app->useStoragePath($this->laravel->storagePath()); $app->make(ConsoleKernelContract::class)->bootstrap(); return $app['config']->all(); }
php
protected function getFreshConfiguration() { $app = require $this->laravel->bootstrapPath().'/app.php'; $app->useStoragePath($this->laravel->storagePath()); $app->make(ConsoleKernelContract::class)->bootstrap(); return $app['config']->all(); }
[ "protected", "function", "getFreshConfiguration", "(", ")", "{", "$", "app", "=", "require", "$", "this", "->", "laravel", "->", "bootstrapPath", "(", ")", ".", "'/app.php'", ";", "$", "app", "->", "useStoragePath", "(", "$", "this", "->", "laravel", "->",...
Boot a fresh copy of the application configuration. @return array
[ "Boot", "a", "fresh", "copy", "of", "the", "application", "configuration", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Console/ConfigCacheCommand.php#L82-L91
train
Get fresh configuration
[ 30522, 5123, 3853, 2131, 19699, 9953, 8663, 8873, 27390, 3370, 1006, 1007, 1063, 1002, 10439, 1027, 5478, 1002, 2023, 1011, 1028, 13679, 15985, 1011, 1028, 6879, 6494, 13944, 2705, 1006, 1007, 1012, 1005, 1013, 10439, 1012, 25718, 1005, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/DataTable/Renderer/Html.php
Html.render
public function render() { $this->tableStructure = array(); $this->allColumns = array(); $this->i = 0; return $this->renderTable($this->table); }
php
public function render() { $this->tableStructure = array(); $this->allColumns = array(); $this->i = 0; return $this->renderTable($this->table); }
[ "public", "function", "render", "(", ")", "{", "$", "this", "->", "tableStructure", "=", "array", "(", ")", ";", "$", "this", "->", "allColumns", "=", "array", "(", ")", ";", "$", "this", "->", "i", "=", "0", ";", "return", "$", "this", "->", "re...
Computes the dataTable output and returns the string/binary @return string
[ "Computes", "the", "dataTable", "output", "and", "returns", "the", "string", "/", "binary" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataTable/Renderer/Html.php#L42-L49
train
Render the table
[ 30522, 2270, 3853, 17552, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 7251, 18300, 5397, 1027, 9140, 1006, 1007, 1025, 1002, 2023, 1011, 1028, 2035, 25778, 2819, 3619, 1027, 9140, 1006, 1007, 1025, 1002, 2023, 1011, 1028, 1045, 1027, 1014, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/ArchiveProcessor.php
ArchiveProcessor.aggregateDataTableRecords
public function aggregateDataTableRecords($recordNames, $maximumRowsInDataTableLevelZero = null, $maximumRowsInSubDataTable = null, $columnToSortByBeforeTruncation = null, ...
php
public function aggregateDataTableRecords($recordNames, $maximumRowsInDataTableLevelZero = null, $maximumRowsInSubDataTable = null, $columnToSortByBeforeTruncation = null, ...
[ "public", "function", "aggregateDataTableRecords", "(", "$", "recordNames", ",", "$", "maximumRowsInDataTableLevelZero", "=", "null", ",", "$", "maximumRowsInSubDataTable", "=", "null", ",", "$", "columnToSortByBeforeTruncation", "=", "null", ",", "&", "$", "columnsAg...
Sums records for every subperiod of the current period and inserts the result as the record for this period. DataTables are summed recursively so subtables will be summed as well. @param string|array $recordNames Name(s) of the report we are aggregating, eg, `'Referrers_type'`. @param int $maximumRowsInDataTableLevel...
[ "Sums", "records", "for", "every", "subperiod", "of", "the", "current", "period", "and", "inserts", "the", "result", "as", "the", "record", "for", "this", "period", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/ArchiveProcessor.php#L203-L235
train
Aggregate a list of records into one array
[ 30522, 2270, 3853, 9572, 2850, 29336, 3085, 2890, 27108, 5104, 1006, 1002, 2501, 18442, 2015, 1010, 1002, 4555, 10524, 11493, 2850, 29336, 3085, 20414, 2884, 6290, 2080, 1027, 19701, 1010, 1002, 4555, 10524, 11493, 6342, 2497, 2850, 29336, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Filter/AbstractFilter.php
AbstractFilter.buildRelationQuery
protected function buildRelationQuery() { $args = func_get_args(); list($relation, $args[0]) = explode('.', $this->column); return ['whereHas' => [$relation, function ($relation) use ($args) { call_user_func_array([$relation, $this->query], $args); }]]; }
php
protected function buildRelationQuery() { $args = func_get_args(); list($relation, $args[0]) = explode('.', $this->column); return ['whereHas' => [$relation, function ($relation) use ($args) { call_user_func_array([$relation, $this->query], $args); }]]; }
[ "protected", "function", "buildRelationQuery", "(", ")", "{", "$", "args", "=", "func_get_args", "(", ")", ";", "list", "(", "$", "relation", ",", "$", "args", "[", "0", "]", ")", "=", "explode", "(", "'.'", ",", "$", "this", "->", "column", ")", "...
Build query condition of model relation. @return array
[ "Build", "query", "condition", "of", "model", "relation", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Grid/Filter/AbstractFilter.php#L450-L459
train
Build the query for the relation
[ 30522, 5123, 3853, 3857, 16570, 3370, 4226, 2854, 1006, 1007, 1063, 1002, 12098, 5620, 1027, 4569, 2278, 1035, 2131, 1035, 12098, 5620, 1006, 1007, 1025, 2862, 1006, 1002, 7189, 1010, 1002, 12098, 5620, 1031, 1014, 1033, 1007, 1027, 15044, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Filesystem/FilesystemAdapter.php
FilesystemAdapter.readStream
public function readStream($path) { try { $resource = $this->driver->readStream($path); return $resource ? $resource : null; } catch (FileNotFoundException $e) { throw new ContractFileNotFoundException($e->getMessage(), $e->getCode(), $e); } }
php
public function readStream($path) { try { $resource = $this->driver->readStream($path); return $resource ? $resource : null; } catch (FileNotFoundException $e) { throw new ContractFileNotFoundException($e->getMessage(), $e->getCode(), $e); } }
[ "public", "function", "readStream", "(", "$", "path", ")", "{", "try", "{", "$", "resource", "=", "$", "this", "->", "driver", "->", "readStream", "(", "$", "path", ")", ";", "return", "$", "resource", "?", "$", "resource", ":", "null", ";", "}", "...
{@inheritdoc}
[ "{" ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Filesystem/FilesystemAdapter.php#L415-L424
train
Reads a stream of file
[ 30522, 2270, 3853, 9631, 25379, 1006, 1002, 4130, 1007, 1063, 3046, 1063, 1002, 7692, 1027, 1002, 2023, 1011, 1028, 4062, 1011, 1028, 9631, 25379, 1006, 1002, 4130, 1007, 1025, 2709, 1002, 7692, 1029, 1002, 7692, 1024, 19701, 1025, 1065, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Statement/Sqlsrv.php
Zend_Db_Statement_Sqlsrv.closeCursor
public function closeCursor() { if (!$this->_stmt) { return false; } sqlsrv_free_stmt($this->_stmt); $this->_stmt = false; return true; }
php
public function closeCursor() { if (!$this->_stmt) { return false; } sqlsrv_free_stmt($this->_stmt); $this->_stmt = false; return true; }
[ "public", "function", "closeCursor", "(", ")", "{", "if", "(", "!", "$", "this", "->", "_stmt", ")", "{", "return", "false", ";", "}", "sqlsrv_free_stmt", "(", "$", "this", "->", "_stmt", ")", ";", "$", "this", "->", "_stmt", "=", "false", ";", "re...
Closes the cursor, allowing the statement to be executed again. @return bool
[ "Closes", "the", "cursor", "allowing", "the", "statement", "to", "be", "executed", "again", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Statement/Sqlsrv.php#L98-L107
train
Closes the cursor and frees the statement
[ 30522, 2270, 3853, 2485, 10841, 25301, 2099, 1006, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 1035, 2358, 30524, 1035, 2489, 1035, 2358, 20492, 1006, 1002, 2023, 1011, 1028, 1035, 2358, 20492, 1007, 1025, 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...
symfony/symfony
src/Symfony/Component/OptionsResolver/OptionsResolver.php
OptionsResolver.remove
public function remove($optionNames) { if ($this->locked) { throw new AccessException('Options cannot be removed from a lazy option or normalizer.'); } foreach ((array) $optionNames as $option) { unset($this->defined[$option], $this->defaults[$option], $this->require...
php
public function remove($optionNames) { if ($this->locked) { throw new AccessException('Options cannot be removed from a lazy option or normalizer.'); } foreach ((array) $optionNames as $option) { unset($this->defined[$option], $this->defaults[$option], $this->require...
[ "public", "function", "remove", "(", "$", "optionNames", ")", "{", "if", "(", "$", "this", "->", "locked", ")", "{", "throw", "new", "AccessException", "(", "'Options cannot be removed from a lazy option or normalizer.'", ")", ";", "}", "foreach", "(", "(", "arr...
Removes the option with the given name. Undefined options are ignored. @param string|string[] $optionNames One or more option names @return $this @throws AccessException If called from a lazy option or normalizer
[ "Removes", "the", "option", "with", "the", "given", "name", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/OptionsResolver/OptionsResolver.php#L715-L727
train
Removes all options from the options array.
[ 30522, 2270, 3853, 6366, 1006, 1002, 5724, 18442, 2015, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 5299, 1007, 1063, 5466, 2047, 3229, 10288, 24422, 1006, 1005, 7047, 3685, 2022, 3718, 2013, 1037, 13971, 5724, 2030, 3671, 17629, 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...
laravel/framework
src/Illuminate/Auth/AuthManager.php
AuthManager.viaRequest
public function viaRequest($driver, callable $callback) { return $this->extend($driver, function () use ($callback) { $guard = new RequestGuard($callback, $this->app['request'], $this->createUserProvider()); $this->app->refresh('request', $guard, 'setRequest'); return $...
php
public function viaRequest($driver, callable $callback) { return $this->extend($driver, function () use ($callback) { $guard = new RequestGuard($callback, $this->app['request'], $this->createUserProvider()); $this->app->refresh('request', $guard, 'setRequest'); return $...
[ "public", "function", "viaRequest", "(", "$", "driver", ",", "callable", "$", "callback", ")", "{", "return", "$", "this", "->", "extend", "(", "$", "driver", ",", "function", "(", ")", "use", "(", "$", "callback", ")", "{", "$", "guard", "=", "new",...
Register a new callback based request guard. @param string $driver @param callable $callback @return $this
[ "Register", "a", "new", "callback", "based", "request", "guard", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/AuthManager.php#L226-L235
train
Extend the current request guard with a new instance.
[ 30522, 2270, 3853, 3081, 2890, 15500, 1006, 1002, 4062, 1010, 2655, 3085, 1002, 2655, 5963, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 7949, 1006, 1002, 4062, 1010, 3853, 1006, 1007, 2224, 1006, 1002, 2655, 5963, 1007, 30524, 2121, 1006, 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/DependencyInjection/Definition.php
Definition.getErrors
public function getErrors() { foreach ($this->errors as $i => $error) { if ($error instanceof \Closure) { $this->errors[$i] = (string) $error(); } elseif (!\is_string($error)) { $this->errors[$i] = (string) $error; } } retu...
php
public function getErrors() { foreach ($this->errors as $i => $error) { if ($error instanceof \Closure) { $this->errors[$i] = (string) $error(); } elseif (!\is_string($error)) { $this->errors[$i] = (string) $error; } } retu...
[ "public", "function", "getErrors", "(", ")", "{", "foreach", "(", "$", "this", "->", "errors", "as", "$", "i", "=>", "$", "error", ")", "{", "if", "(", "$", "error", "instanceof", "\\", "Closure", ")", "{", "$", "this", "->", "errors", "[", "$", ...
Returns any errors that occurred while building this Definition. @return array
[ "Returns", "any", "errors", "that", "occurred", "while", "building", "this", "Definition", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/Definition.php#L904-L915
train
Get all errors
[ 30522, 2270, 3853, 2131, 2121, 29165, 2015, 1006, 1007, 1063, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 10697, 2004, 1002, 1045, 1027, 1028, 1002, 7561, 1007, 1063, 2065, 1006, 1002, 7561, 6013, 11253, 1032, 8503, 1007, 1063, 1002, 2023, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
barryvdh/laravel-debugbar
src/DataCollector/QueryCollector.php
QueryCollector.findViewFromHash
protected function findViewFromHash($hash) { $finder = app('view')->getFinder(); if (isset($this->reflection['viewfinderViews'])) { $property = $this->reflection['viewfinderViews']; } else { $reflection = new \ReflectionClass($finder); $property = $reflec...
php
protected function findViewFromHash($hash) { $finder = app('view')->getFinder(); if (isset($this->reflection['viewfinderViews'])) { $property = $this->reflection['viewfinderViews']; } else { $reflection = new \ReflectionClass($finder); $property = $reflec...
[ "protected", "function", "findViewFromHash", "(", "$", "hash", ")", "{", "$", "finder", "=", "app", "(", "'view'", ")", "->", "getFinder", "(", ")", ";", "if", "(", "isset", "(", "$", "this", "->", "reflection", "[", "'viewfinderViews'", "]", ")", ")",...
Find the template name from the hash. @param string $hash @return null|string
[ "Find", "the", "template", "name", "from", "the", "hash", "." ]
2d195779ea4f809f69764a795e2ec371dbb76a96
https://github.com/barryvdh/laravel-debugbar/blob/2d195779ea4f809f69764a795e2ec371dbb76a96/src/DataCollector/QueryCollector.php#L315-L333
train
Finds the view from the finder views property
[ 30522, 5123, 3853, 2424, 8584, 19699, 5358, 14949, 2232, 1006, 1002, 23325, 1007, 1063, 1002, 2424, 2121, 1027, 10439, 1006, 1005, 3193, 1005, 1007, 1011, 1028, 2131, 23695, 1006, 1007, 1025, 2065, 1006, 26354, 3388, 1006, 1002, 2023, 1011,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/formwidgets/MarkdownEditor.php
MarkdownEditor.prepareVars
public function prepareVars() { $this->vars['mode'] = $this->mode; $this->vars['stretch'] = $this->formField->stretch; $this->vars['size'] = $this->formField->size; $this->vars['name'] = $this->getFieldName(); $this->vars['value'] = $this->getLoadValue(); }
php
public function prepareVars() { $this->vars['mode'] = $this->mode; $this->vars['stretch'] = $this->formField->stretch; $this->vars['size'] = $this->formField->size; $this->vars['name'] = $this->getFieldName(); $this->vars['value'] = $this->getLoadValue(); }
[ "public", "function", "prepareVars", "(", ")", "{", "$", "this", "->", "vars", "[", "'mode'", "]", "=", "$", "this", "->", "mode", ";", "$", "this", "->", "vars", "[", "'stretch'", "]", "=", "$", "this", "->", "formField", "->", "stretch", ";", "$"...
Prepares the widget data
[ "Prepares", "the", "widget", "data" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/formwidgets/MarkdownEditor.php#L61-L68
train
Prepare form field variables
[ 30522, 2270, 3853, 7374, 10755, 2015, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 13075, 2015, 1031, 1005, 5549, 1005, 1033, 1027, 1002, 2023, 1011, 1028, 5549, 1025, 1002, 2023, 1011, 1028, 13075, 2015, 1031, 1005, 7683, 1005, 1033, 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...
octobercms/october
modules/backend/classes/NavigationManager.php
NavigationManager.addMainMenuItems
public function addMainMenuItems($owner, array $definitions) { foreach ($definitions as $code => $definition) { $this->addMainMenuItem($owner, $code, $definition); } }
php
public function addMainMenuItems($owner, array $definitions) { foreach ($definitions as $code => $definition) { $this->addMainMenuItem($owner, $code, $definition); } }
[ "public", "function", "addMainMenuItems", "(", "$", "owner", ",", "array", "$", "definitions", ")", "{", "foreach", "(", "$", "definitions", "as", "$", "code", "=>", "$", "definition", ")", "{", "$", "this", "->", "addMainMenuItem", "(", "$", "owner", ",...
Dynamically add an array of main menu items @param string $owner @param array $definitions
[ "Dynamically", "add", "an", "array", "of", "main", "menu", "items" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/classes/NavigationManager.php#L199-L204
train
Adds main menu items to the main menu
[ 30522, 2270, 3853, 5587, 24238, 3549, 14663, 6633, 2015, 1006, 1002, 3954, 1010, 9140, 1002, 15182, 1007, 1063, 18921, 6776, 1006, 1002, 15182, 2004, 1002, 3642, 1027, 1028, 1002, 6210, 1007, 1063, 1002, 2023, 1011, 1028, 5587, 24238, 3549,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Button.php
Button.submit
public function submit($submittedData, $clearMissing = true) { if ($this->submitted) { throw new AlreadySubmittedException('A form can only be submitted once'); } $this->submitted = true; return $this; }
php
public function submit($submittedData, $clearMissing = true) { if ($this->submitted) { throw new AlreadySubmittedException('A form can only be submitted once'); } $this->submitted = true; return $this; }
[ "public", "function", "submit", "(", "$", "submittedData", ",", "$", "clearMissing", "=", "true", ")", "{", "if", "(", "$", "this", "->", "submitted", ")", "{", "throw", "new", "AlreadySubmittedException", "(", "'A form can only be submitted once'", ")", ";", ...
Submits data to the button. @param string|null $submittedData Not used @param bool $clearMissing Not used @return $this @throws Exception\AlreadySubmittedException if the button has already been submitted
[ "Submits", "data", "to", "the", "button", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/Button.php#L387-L396
train
Submits the form
[ 30522, 2270, 3853, 12040, 1006, 1002, 7864, 2850, 2696, 1010, 1002, 3154, 15630, 7741, 1027, 2995, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 7864, 1007, 1063, 5466, 2047, 2525, 6342, 25526, 27100, 3207, 2595, 24422, 1006, 1005, 1037, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Http/Request.php
Request.getMethod
public function getMethod() { if ($this->method === null) { $this->method = $this->originalMethod; $customMethod = $this->getHeaderLine('X-Http-Method-Override'); if ($customMethod) { $this->method = $this->filterMethod($customMethod); } elsei...
php
public function getMethod() { if ($this->method === null) { $this->method = $this->originalMethod; $customMethod = $this->getHeaderLine('X-Http-Method-Override'); if ($customMethod) { $this->method = $this->filterMethod($customMethod); } elsei...
[ "public", "function", "getMethod", "(", ")", "{", "if", "(", "$", "this", "->", "method", "===", "null", ")", "{", "$", "this", "->", "method", "=", "$", "this", "->", "originalMethod", ";", "$", "customMethod", "=", "$", "this", "->", "getHeaderLine",...
Retrieves the HTTP method of the request. @return string
[ "Retrieves", "the", "HTTP", "method", "of", "the", "request", "." ]
ccef5f7d8bcd469d59cbe64f6210d83764f91543
https://github.com/slimphp/Slim/blob/ccef5f7d8bcd469d59cbe64f6210d83764f91543/Slim/Http/Request.php#L260-L281
train
Get HTTP method
[ 30522, 2270, 3853, 2131, 11368, 6806, 2094, 1006, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 4118, 1027, 1027, 1027, 19701, 1007, 1063, 1002, 2023, 1011, 1028, 4118, 1027, 1002, 2023, 1011, 1028, 2434, 11368, 6806, 2094, 1025, 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/system/classes/UpdateManager.php
UpdateManager.seedModule
public function seedModule($module) { $className = '\\'.$module.'\Database\Seeds\DatabaseSeeder'; if (!class_exists($className)) { return; } $seeder = App::make($className); $seeder->run(); $this->note(sprintf('<info>Seeded %s</info> ', $module)); ...
php
public function seedModule($module) { $className = '\\'.$module.'\Database\Seeds\DatabaseSeeder'; if (!class_exists($className)) { return; } $seeder = App::make($className); $seeder->run(); $this->note(sprintf('<info>Seeded %s</info> ', $module)); ...
[ "public", "function", "seedModule", "(", "$", "module", ")", "{", "$", "className", "=", "'\\\\'", ".", "$", "module", ".", "'\\Database\\Seeds\\DatabaseSeeder'", ";", "if", "(", "!", "class_exists", "(", "$", "className", ")", ")", "{", "return", ";", "}"...
Run seeds on a module @param string $module Module name @return self
[ "Run", "seeds", "on", "a", "module" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/classes/UpdateManager.php#L424-L436
train
Seed a module
[ 30522, 2270, 3853, 6534, 5302, 8566, 2571, 1006, 1002, 11336, 1007, 1063, 1002, 2465, 18442, 1027, 1005, 1032, 1032, 1005, 1012, 1002, 11336, 1012, 1005, 1032, 7809, 1032, 8079, 1032, 17881, 13089, 2121, 1005, 1025, 2065, 1006, 999, 2465, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Common.php
Common.sanitizeInputValues
public static function sanitizeInputValues($value, $alreadyStripslashed = false) { if (is_numeric($value)) { return $value; } elseif (is_string($value)) { $value = self::sanitizeString($value); } elseif (is_array($value)) { foreach (array_keys($value) as $...
php
public static function sanitizeInputValues($value, $alreadyStripslashed = false) { if (is_numeric($value)) { return $value; } elseif (is_string($value)) { $value = self::sanitizeString($value); } elseif (is_array($value)) { foreach (array_keys($value) as $...
[ "public", "static", "function", "sanitizeInputValues", "(", "$", "value", ",", "$", "alreadyStripslashed", "=", "false", ")", "{", "if", "(", "is_numeric", "(", "$", "value", ")", ")", "{", "return", "$", "value", ";", "}", "elseif", "(", "is_string", "(...
Sanitizes a string to help avoid XSS vulnerabilities. This function is automatically called when {@link getRequestVar()} is called, so you should not normally have to use it. This function should be used when outputting data that isn't escaped and was obtained from the user (for example when using the `|raw` twig fil...
[ "Sanitizes", "a", "string", "to", "help", "avoid", "XSS", "vulnerabilities", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Common.php#L322-L345
train
Sanitize input values
[ 30522, 2270, 10763, 3853, 2624, 25090, 4371, 2378, 18780, 10175, 15808, 1006, 1002, 3643, 1010, 1002, 2525, 3367, 29443, 14540, 11823, 2098, 1027, 6270, 1007, 1063, 2065, 1006, 2003, 1035, 16371, 25531, 1006, 1002, 3643, 1007, 1007, 1063, 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
core/Twig.php
Twig.getCustomThemeLoader
protected function getCustomThemeLoader(Plugin $theme) { $pluginsDir = Manager::getPluginDirectory($theme->getPluginName()); $themeDir = $pluginsDir . '/templates/'; if (!file_exists($themeDir)) { return false; } $themeLoader = new Twig_Loader_Filesystem(array($t...
php
protected function getCustomThemeLoader(Plugin $theme) { $pluginsDir = Manager::getPluginDirectory($theme->getPluginName()); $themeDir = $pluginsDir . '/templates/'; if (!file_exists($themeDir)) { return false; } $themeLoader = new Twig_Loader_Filesystem(array($t...
[ "protected", "function", "getCustomThemeLoader", "(", "Plugin", "$", "theme", ")", "{", "$", "pluginsDir", "=", "Manager", "::", "getPluginDirectory", "(", "$", "theme", "->", "getPluginName", "(", ")", ")", ";", "$", "themeDir", "=", "$", "pluginsDir", ".",...
create template loader for a custom theme @param \Piwik\Plugin $theme @return \Twig_Loader_Filesystem
[ "create", "template", "loader", "for", "a", "custom", "theme" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Twig.php#L327-L338
train
Get the Twig loader for a custom theme
[ 30522, 5123, 3853, 2131, 7874, 20389, 10760, 10199, 10441, 4063, 1006, 13354, 2378, 1002, 4323, 1007, 1063, 1002, 13354, 7076, 4305, 2099, 1027, 3208, 1024, 1024, 2131, 24759, 15916, 22254, 7442, 16761, 2100, 1006, 1002, 4323, 1011, 1028, 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...
laravel/framework
src/Illuminate/View/Factory.php
Factory.renderWhen
public function renderWhen($condition, $view, $data = [], $mergeData = []) { if (! $condition) { return ''; } return $this->make($view, $this->parseData($data), $mergeData)->render(); }
php
public function renderWhen($condition, $view, $data = [], $mergeData = []) { if (! $condition) { return ''; } return $this->make($view, $this->parseData($data), $mergeData)->render(); }
[ "public", "function", "renderWhen", "(", "$", "condition", ",", "$", "view", ",", "$", "data", "=", "[", "]", ",", "$", "mergeData", "=", "[", "]", ")", "{", "if", "(", "!", "$", "condition", ")", "{", "return", "''", ";", "}", "return", "$", "...
Get the rendered content of the view based on a given condition. @param bool $condition @param string $view @param \Illuminate\Contracts\Support\Arrayable|array $data @param array $mergeData @return string
[ "Get", "the", "rendered", "content", "of", "the", "view", "based", "on", "a", "given", "condition", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/View/Factory.php#L175-L182
train
Render when condition is met
[ 30522, 2270, 3853, 17552, 2860, 10222, 1006, 1002, 4650, 1010, 1002, 3193, 1010, 1002, 2951, 1027, 1031, 1033, 1010, 1002, 5314, 6790, 1027, 1031, 1033, 1007, 1063, 2065, 1006, 999, 1002, 4650, 1007, 1063, 2709, 1005, 1005, 1025, 1065, 27...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Console/Helper/Table.php
Table.appendRow
public function appendRow($row): self { if (!$this->output instanceof ConsoleSectionOutput) { throw new RuntimeException(sprintf('Output should be an instance of "%s" when calling "%s".', ConsoleSectionOutput::class, __METHOD__)); } if ($this->rendered) { $this->outp...
php
public function appendRow($row): self { if (!$this->output instanceof ConsoleSectionOutput) { throw new RuntimeException(sprintf('Output should be an instance of "%s" when calling "%s".', ConsoleSectionOutput::class, __METHOD__)); } if ($this->rendered) { $this->outp...
[ "public", "function", "appendRow", "(", "$", "row", ")", ":", "self", "{", "if", "(", "!", "$", "this", "->", "output", "instanceof", "ConsoleSectionOutput", ")", "{", "throw", "new", "RuntimeException", "(", "sprintf", "(", "'Output should be an instance of \"%...
Adds a row to the table, and re-renders the table.
[ "Adds", "a", "row", "to", "the", "table", "and", "re", "-", "renders", "the", "table", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Console/Helper/Table.php#L291-L305
train
Append a row to the output buffer
[ 30522, 2270, 3853, 10439, 10497, 10524, 1006, 1002, 5216, 1007, 1024, 2969, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 6434, 6013, 11253, 22659, 18491, 5833, 18780, 1007, 1063, 5466, 2047, 2448, 7292, 10288, 24422, 1006, 9043, 2546, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Config.php
Zend_Config._assertValidExtend
protected function _assertValidExtend($extendingSection, $extendedSection) { // detect circular section inheritance $extendedSectionCurrent = $extendedSection; while (array_key_exists($extendedSectionCurrent, $this->_extends)) { if ($this->_extends[$extendedSectionCurrent] == $ex...
php
protected function _assertValidExtend($extendingSection, $extendedSection) { // detect circular section inheritance $extendedSectionCurrent = $extendedSection; while (array_key_exists($extendedSectionCurrent, $this->_extends)) { if ($this->_extends[$extendedSectionCurrent] == $ex...
[ "protected", "function", "_assertValidExtend", "(", "$", "extendingSection", ",", "$", "extendedSection", ")", "{", "// detect circular section inheritance", "$", "extendedSectionCurrent", "=", "$", "extendedSection", ";", "while", "(", "array_key_exists", "(", "$", "ex...
Throws an exception if $extendingSection may not extend $extendedSection, and tracks the section extension if it is valid. @param string $extendingSection @param string $extendedSection @throws Zend_Config_Exception @return void
[ "Throws", "an", "exception", "if", "$extendingSection", "may", "not", "extend", "$extendedSection", "and", "tracks", "the", "section", "extension", "if", "it", "is", "valid", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Config.php#L423-L437
train
Check if extended section is valid
[ 30522, 5123, 3853, 1035, 20865, 10175, 5178, 18413, 10497, 1006, 1002, 8402, 29015, 1010, 1002, 3668, 29015, 1007, 1063, 1013, 1013, 11487, 8206, 2930, 12839, 1002, 3668, 29015, 10841, 14343, 3372, 1027, 1002, 3668, 29015, 1025, 2096, 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/Intl/ResourceBundle/LanguageBundle.php
LanguageBundle.getLanguageName
public function getLanguageName($language, $region = null, $displayLocale = null) { // Some languages are translated together with their region, // i.e. "en_GB" is translated as "British English" if (null !== $region) { try { return $this->getName($language.'_'.$r...
php
public function getLanguageName($language, $region = null, $displayLocale = null) { // Some languages are translated together with their region, // i.e. "en_GB" is translated as "British English" if (null !== $region) { try { return $this->getName($language.'_'.$r...
[ "public", "function", "getLanguageName", "(", "$", "language", ",", "$", "region", "=", "null", ",", "$", "displayLocale", "=", "null", ")", "{", "// Some languages are translated together with their region,", "// i.e. \"en_GB\" is translated as \"British English\"", "if", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Intl/ResourceBundle/LanguageBundle.php#L43-L59
train
Get language name
[ 30522, 2270, 3853, 2131, 25023, 6692, 6914, 14074, 1006, 1002, 2653, 1010, 1002, 2555, 1027, 19701, 1010, 1002, 4653, 4135, 9289, 2063, 1027, 19701, 1007, 1063, 1013, 1013, 2070, 4155, 2024, 5421, 2362, 2007, 2037, 2555, 1010, 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/Validator/Validator/RecursiveValidator.php
RecursiveValidator.validate
public function validate($value, $constraints = null, $groups = null) { return $this->startContext($value) ->validate($value, $constraints, $groups) ->getViolations(); }
php
public function validate($value, $constraints = null, $groups = null) { return $this->startContext($value) ->validate($value, $constraints, $groups) ->getViolations(); }
[ "public", "function", "validate", "(", "$", "value", ",", "$", "constraints", "=", "null", ",", "$", "groups", "=", "null", ")", "{", "return", "$", "this", "->", "startContext", "(", "$", "value", ")", "->", "validate", "(", "$", "value", ",", "$", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Validator/Validator/RecursiveValidator.php#L97-L102
train
Validate a value against a set of constraints
[ 30522, 2270, 3853, 9398, 3686, 1006, 1002, 3643, 1010, 1002, 14679, 1027, 19701, 1010, 1002, 2967, 1027, 19701, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 2707, 8663, 18209, 1006, 1002, 3643, 1007, 1011, 1028, 9398, 3686, 1006, 1002, 3643, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/traits/AssetMaker.php
AssetMaker.addCss
public function addCss($name, $attributes = []) { if (is_array($name)) { $name = $this->combineAssets($name, $this->getLocalPath($this->assetPath)); } $cssPath = $this->getAssetPath($name); if (isset($this->controller)) { $this->controller->addCss($cssPath, ...
php
public function addCss($name, $attributes = []) { if (is_array($name)) { $name = $this->combineAssets($name, $this->getLocalPath($this->assetPath)); } $cssPath = $this->getAssetPath($name); if (isset($this->controller)) { $this->controller->addCss($cssPath, ...
[ "public", "function", "addCss", "(", "$", "name", ",", "$", "attributes", "=", "[", "]", ")", "{", "if", "(", "is_array", "(", "$", "name", ")", ")", "{", "$", "name", "=", "$", "this", "->", "combineAssets", "(", "$", "name", ",", "$", "this", ...
Adds StyleSheet asset to the asset list. Call $this->makeAssets() in a view to output corresponding markup. @param string $name Specifies a path (URL) to the script. @param array $attributes Adds extra HTML attributes to the asset link. @return void
[ "Adds", "StyleSheet", "asset", "to", "the", "asset", "list", ".", "Call", "$this", "-", ">", "makeAssets", "()", "in", "a", "view", "to", "output", "corresponding", "markup", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/traits/AssetMaker.php#L143-L164
train
Add css to the page
[ 30522, 2270, 3853, 5587, 6169, 2015, 1006, 1002, 2171, 1010, 1002, 12332, 1027, 1031, 1033, 1007, 1063, 2065, 1006, 2003, 1035, 9140, 1006, 1002, 2171, 1007, 1007, 1063, 1002, 2171, 1027, 1002, 2023, 1011, 1028, 11506, 27241, 3215, 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/Bundle/FrameworkBundle/Controller/ControllerTrait.php
ControllerTrait.addFlash
protected function addFlash(string $type, string $message) { if (!$this->container->has('session')) { throw new \LogicException('You can not use the addFlash method if sessions are disabled. Enable them in "config/packages/framework.yaml".'); } $this->container->get('session')->...
php
protected function addFlash(string $type, string $message) { if (!$this->container->has('session')) { throw new \LogicException('You can not use the addFlash method if sessions are disabled. Enable them in "config/packages/framework.yaml".'); } $this->container->get('session')->...
[ "protected", "function", "addFlash", "(", "string", "$", "type", ",", "string", "$", "message", ")", "{", "if", "(", "!", "$", "this", "->", "container", "->", "has", "(", "'session'", ")", ")", "{", "throw", "new", "\\", "LogicException", "(", "'You c...
Adds a flash message to the current session for type. @throws \LogicException @final
[ "Adds", "a", "flash", "message", "to", "the", "current", "session", "for", "type", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php#L157-L164
train
Adds a flash message to the session bag
[ 30522, 5123, 3853, 5587, 10258, 11823, 1006, 5164, 1002, 2828, 1010, 5164, 1002, 4471, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 11661, 1011, 1028, 2038, 1006, 1005, 5219, 1005, 1007, 1007, 1063, 5466, 2047, 1032, 7961, 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/Hashing/ArgonHasher.php
ArgonHasher.check
public function check($value, $hashedValue, array $options = []) { if ($this->verifyAlgorithm && $this->info($hashedValue)['algoName'] !== 'argon2i') { throw new RuntimeException('This password does not use the Argon2i algorithm.'); } return parent::check($value, $hashedValue, $...
php
public function check($value, $hashedValue, array $options = []) { if ($this->verifyAlgorithm && $this->info($hashedValue)['algoName'] !== 'argon2i') { throw new RuntimeException('This password does not use the Argon2i algorithm.'); } return parent::check($value, $hashedValue, $...
[ "public", "function", "check", "(", "$", "value", ",", "$", "hashedValue", ",", "array", "$", "options", "=", "[", "]", ")", "{", "if", "(", "$", "this", "->", "verifyAlgorithm", "&&", "$", "this", "->", "info", "(", "$", "hashedValue", ")", "[", "...
Check the given plain value against a hash. @param string $value @param string $hashedValue @param array $options @return bool
[ "Check", "the", "given", "plain", "value", "against", "a", "hash", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Hashing/ArgonHasher.php#L94-L101
train
Checks if the password is valid for Argon2i
[ 30522, 2270, 3853, 4638, 1006, 1002, 3643, 1010, 1002, 23325, 2098, 10175, 5657, 1010, 9140, 1002, 7047, 1027, 1031, 1033, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 20410, 2389, 20255, 8939, 2213, 1004, 1004, 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/Cache/Backend/Sqlite.php
Zend_Cache_Backend_Sqlite._getConnection
private function _getConnection() { if (is_resource($this->_db)) { return $this->_db; } else { $this->_db = @sqlite_open($this->_options['cache_db_complete_path']); if (!(is_resource($this->_db))) { Zend_Cache::throwException("Impossible to open " ...
php
private function _getConnection() { if (is_resource($this->_db)) { return $this->_db; } else { $this->_db = @sqlite_open($this->_options['cache_db_complete_path']); if (!(is_resource($this->_db))) { Zend_Cache::throwException("Impossible to open " ...
[ "private", "function", "_getConnection", "(", ")", "{", "if", "(", "is_resource", "(", "$", "this", "->", "_db", ")", ")", "{", "return", "$", "this", "->", "_db", ";", "}", "else", "{", "$", "this", "->", "_db", "=", "@", "sqlite_open", "(", "$", ...
Return the connection resource If we are not connected, the connection is made @throws Zend_Cache_Exception @return resource Connection resource
[ "Return", "the", "connection", "resource" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Cache/Backend/Sqlite.php#L489-L500
train
Get the connection to the cache DB
[ 30522, 2797, 3853, 1035, 2131, 8663, 2638, 7542, 1006, 1007, 1063, 2065, 1006, 2003, 1035, 7692, 1006, 1002, 2023, 1011, 1028, 1035, 16962, 1007, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 1035, 16962, 1025, 1065, 2842, 1063, 1002, 2023, 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/Debugger.php
Debugger.enabled
public function enabled($state = null) { if ($state !== null) { $this->enabled = (bool)$state; } return $this->enabled; }
php
public function enabled($state = null) { if ($state !== null) { $this->enabled = (bool)$state; } return $this->enabled; }
[ "public", "function", "enabled", "(", "$", "state", "=", "null", ")", "{", "if", "(", "$", "state", "!==", "null", ")", "{", "$", "this", "->", "enabled", "=", "(", "bool", ")", "$", "state", ";", "}", "return", "$", "this", "->", "enabled", ";",...
Set/get the enabled state of the debugger @param bool $state If null, the method returns the enabled value. If set, the method sets the enabled state @return bool
[ "Set", "/", "get", "the", "enabled", "state", "of", "the", "debugger" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Debugger.php#L129-L136
train
Get or set the enabled flag
[ 30522, 2270, 3853, 9124, 1006, 1002, 2110, 1027, 19701, 1007, 1063, 2065, 1006, 1002, 2110, 999, 1027, 1027, 19701, 1007, 1063, 1002, 2023, 1011, 1028, 9124, 1027, 1006, 22017, 2140, 1007, 1002, 2110, 1025, 1065, 2709, 1002, 2023, 1011, 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/cms/classes/ComponentManager.php
ComponentManager.registerComponent
public function registerComponent($className, $code = null, $plugin = null) { if (!$this->classMap) { $this->classMap = []; } if (!$this->codeMap) { $this->codeMap = []; } if (!$code) { $code = Str::getClassId($className); } ...
php
public function registerComponent($className, $code = null, $plugin = null) { if (!$this->classMap) { $this->classMap = []; } if (!$this->codeMap) { $this->codeMap = []; } if (!$code) { $code = Str::getClassId($className); } ...
[ "public", "function", "registerComponent", "(", "$", "className", ",", "$", "code", "=", "null", ",", "$", "plugin", "=", "null", ")", "{", "if", "(", "!", "$", "this", "->", "classMap", ")", "{", "$", "this", "->", "classMap", "=", "[", "]", ";", ...
Registers a single component.
[ "Registers", "a", "single", "component", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/classes/ComponentManager.php#L93-L120
train
Registers a component
[ 30522, 2270, 3853, 4236, 9006, 29513, 3372, 1006, 1002, 2465, 18442, 1010, 1002, 3642, 1027, 19701, 1010, 1002, 13354, 2378, 1027, 19701, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 2465, 2863, 2361, 1007, 1063, 1002, 2023, 1011, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Storage/Backend/MeasurableSettingsTable.php
MeasurableSettingsTable.save
public function save($values) { $this->initDbIfNeeded(); $table = $this->getTableName(); $this->delete(); foreach ($values as $name => $value) { if (!isset($value)) { continue; } if (is_array($value) || is_object($value)) { ...
php
public function save($values) { $this->initDbIfNeeded(); $table = $this->getTableName(); $this->delete(); foreach ($values as $name => $value) { if (!isset($value)) { continue; } if (is_array($value) || is_object($value)) { ...
[ "public", "function", "save", "(", "$", "values", ")", "{", "$", "this", "->", "initDbIfNeeded", "(", ")", ";", "$", "table", "=", "$", "this", "->", "getTableName", "(", ")", ";", "$", "this", "->", "delete", "(", ")", ";", "foreach", "(", "$", ...
Saves (persists) the current setting values in the database.
[ "Saves", "(", "persists", ")", "the", "current", "setting", "values", "in", "the", "database", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Settings/Storage/Backend/MeasurableSettingsTable.php#L73-L103
train
Save the settings to the database
[ 30522, 2270, 3853, 3828, 1006, 1002, 5300, 1007, 1063, 1002, 2023, 1011, 1028, 1999, 4183, 18939, 10128, 24045, 5732, 1006, 1007, 1025, 1002, 2795, 1027, 1002, 2023, 1011, 1028, 2131, 10880, 18442, 1006, 1007, 1025, 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
plugins/DevicesDetection/API.php
API.getOsVersions
public function getOsVersions($idSite, $period, $date, $segment = false) { $dataTable = $this->getDataTable('DevicesDetection_osVersions', $idSite, $period, $date, $segment); $segments = array('operatingSystemCode', 'operatingSystemVersion'); $dataTable->filter('AddSegmentByLabel', array($s...
php
public function getOsVersions($idSite, $period, $date, $segment = false) { $dataTable = $this->getDataTable('DevicesDetection_osVersions', $idSite, $period, $date, $segment); $segments = array('operatingSystemCode', 'operatingSystemVersion'); $dataTable->filter('AddSegmentByLabel', array($s...
[ "public", "function", "getOsVersions", "(", "$", "idSite", ",", "$", "period", ",", "$", "date", ",", "$", "segment", "=", "false", ")", "{", "$", "dataTable", "=", "$", "this", "->", "getDataTable", "(", "'DevicesDetection_osVersions'", ",", "$", "idSite"...
Gets datatable displaying number of visits by OS version (eg. Android 4.0, Windows 7) @param int $idSite @param string $period @param string $date @param bool|string $segment @return DataTable
[ "Gets", "datatable", "displaying", "number", "of", "visits", "by", "OS", "version", "(", "eg", ".", "Android", "4", ".", "0", "Windows", "7", ")" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/DevicesDetection/API.php#L216-L226
train
Get OS versions
[ 30522, 2270, 3853, 2131, 2891, 27774, 2015, 1006, 1002, 8909, 28032, 2063, 1010, 1002, 2558, 1010, 1002, 3058, 1010, 1002, 6903, 1027, 6270, 1007, 1063, 1002, 2951, 10880, 1027, 1002, 2023, 1011, 1028, 2131, 2850, 29336, 3085, 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...
octobercms/october
modules/backend/widgets/Search.php
Search.setActiveTerm
public function setActiveTerm($term) { if (strlen($term)) { $this->putSession('term', $term); } else { $this->resetSession(); } $this->activeTerm = $term; }
php
public function setActiveTerm($term) { if (strlen($term)) { $this->putSession('term', $term); } else { $this->resetSession(); } $this->activeTerm = $term; }
[ "public", "function", "setActiveTerm", "(", "$", "term", ")", "{", "if", "(", "strlen", "(", "$", "term", ")", ")", "{", "$", "this", "->", "putSession", "(", "'term'", ",", "$", "term", ")", ";", "}", "else", "{", "$", "this", "->", "resetSession"...
Sets an active search term for this widget instance.
[ "Sets", "an", "active", "search", "term", "for", "this", "widget", "instance", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/widgets/Search.php#L148-L157
train
Set active term
[ 30522, 2270, 3853, 2275, 19620, 3334, 2213, 1006, 1002, 2744, 1007, 1063, 2065, 1006, 2358, 20927, 2078, 1006, 1002, 2744, 1007, 1007, 1063, 1002, 2023, 1011, 1028, 8509, 7971, 3258, 1006, 1005, 2744, 1005, 1010, 1002, 2744, 1007, 1025, 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/DomCrawler/Field/ChoiceFormField.php
ChoiceFormField.tick
public function tick() { if ('checkbox' !== $this->type) { throw new \LogicException(sprintf('You cannot tick "%s" as it is not a checkbox (%s).', $this->name, $this->type)); } $this->setValue(true); }
php
public function tick() { if ('checkbox' !== $this->type) { throw new \LogicException(sprintf('You cannot tick "%s" as it is not a checkbox (%s).', $this->name, $this->type)); } $this->setValue(true); }
[ "public", "function", "tick", "(", ")", "{", "if", "(", "'checkbox'", "!==", "$", "this", "->", "type", ")", "{", "throw", "new", "\\", "LogicException", "(", "sprintf", "(", "'You cannot tick \"%s\" as it is not a checkbox (%s).'", ",", "$", "this", "->", "na...
Ticks a checkbox. @throws \LogicException When the type provided is not correct
[ "Ticks", "a", "checkbox", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DomCrawler/Field/ChoiceFormField.php#L90-L97
train
This method is called when the field is a checkbox.
[ 30522, 2270, 3853, 16356, 1006, 1007, 1063, 2065, 1006, 1005, 4638, 8758, 1005, 999, 1027, 1027, 1002, 2023, 1011, 1028, 2828, 1007, 1063, 5466, 2047, 1032, 7961, 10288, 24422, 1006, 9043, 2546, 1006, 1005, 2017, 3685, 16356, 1000, 1003, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Backend/Static.php
Zend_Cache_Backend_Static._createDirectoriesFor
protected function _createDirectoriesFor($path) { if (!is_dir($path)) { $oldUmask = umask(0); if ( !@mkdir($path, $this->_octdec($this->_options['cache_directory_umask']), true)) { $lastErr = error_get_last(); umask($oldUmask); Zend_Cac...
php
protected function _createDirectoriesFor($path) { if (!is_dir($path)) { $oldUmask = umask(0); if ( !@mkdir($path, $this->_octdec($this->_options['cache_directory_umask']), true)) { $lastErr = error_get_last(); umask($oldUmask); Zend_Cac...
[ "protected", "function", "_createDirectoriesFor", "(", "$", "path", ")", "{", "if", "(", "!", "is_dir", "(", "$", "path", ")", ")", "{", "$", "oldUmask", "=", "umask", "(", "0", ")", ";", "if", "(", "!", "@", "mkdir", "(", "$", "path", ",", "$", ...
Recursively create the directories needed to write the static file
[ "Recursively", "create", "the", "directories", "needed", "to", "write", "the", "static", "file" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Cache/Backend/Static.php#L262-L273
train
Create directories for the given path
[ 30522, 5123, 3853, 1035, 2580, 7442, 16761, 3111, 29278, 1006, 1002, 4130, 1007, 1063, 2065, 1006, 999, 2003, 1035, 16101, 1006, 1002, 4130, 1007, 1007, 1063, 1002, 2214, 12248, 6711, 1027, 8529, 19895, 1006, 1014, 1007, 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...
matomo-org/matomo
core/FrontController.php
FrontController.fetchDispatch
public function fetchDispatch($module = null, $actionName = null, $parameters = null) { ob_start(); $output = $this->dispatch($module, $actionName, $parameters); // if nothing returned we try to load something that was printed on the screen if (empty($output)) { $output =...
php
public function fetchDispatch($module = null, $actionName = null, $parameters = null) { ob_start(); $output = $this->dispatch($module, $actionName, $parameters); // if nothing returned we try to load something that was printed on the screen if (empty($output)) { $output =...
[ "public", "function", "fetchDispatch", "(", "$", "module", "=", "null", ",", "$", "actionName", "=", "null", ",", "$", "parameters", "=", "null", ")", "{", "ob_start", "(", ")", ";", "$", "output", "=", "$", "this", "->", "dispatch", "(", "$", "modul...
Executes the requested plugin controller method and returns the data, capturing anything the method `echo`s. _Note: If the plugin controller returns something, the return value is returned instead of whatever is in the output buffer._ @param string $module The name of the plugin whose controller to execute, eg, `'Use...
[ "Executes", "the", "requested", "plugin", "controller", "method", "and", "returns", "the", "data", "capturing", "anything", "the", "method", "echo", "s", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/FrontController.php#L204-L217
train
Fetch the output of the dispatch
[ 30522, 2270, 3853, 18584, 10521, 4502, 10649, 1006, 1002, 11336, 1027, 19701, 1010, 1002, 2895, 18442, 1027, 19701, 1010, 1002, 11709, 1027, 19701, 1007, 1063, 27885, 1035, 2707, 1006, 1007, 1025, 1002, 6434, 1027, 1002, 2023, 1011, 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...
getgrav/grav
system/src/Grav/Common/GPM/GPM.php
GPM.findPackage
public function findPackage($search, $ignore_exception = false) { $search = strtolower($search); $found = $this->getRepositoryTheme($search); if ($found) { return $found; } $found = $this->getRepositoryPlugin($search); if ($found) { return $f...
php
public function findPackage($search, $ignore_exception = false) { $search = strtolower($search); $found = $this->getRepositoryTheme($search); if ($found) { return $found; } $found = $this->getRepositoryPlugin($search); if ($found) { return $f...
[ "public", "function", "findPackage", "(", "$", "search", ",", "$", "ignore_exception", "=", "false", ")", "{", "$", "search", "=", "strtolower", "(", "$", "search", ")", ";", "$", "found", "=", "$", "this", "->", "getRepositoryTheme", "(", "$", "search",...
Searches for a Package in the repository @param string $search Can be either the slug or the name @param bool $ignore_exception True if should not fire an exception (for use in Twig) @return Remote\Package|bool Package if found, FALSE if not
[ "Searches", "for", "a", "Package", "in", "the", "repository" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/GPM/GPM.php#L457-L503
train
Find a package by slug
[ 30522, 2270, 3853, 2424, 23947, 4270, 1006, 1002, 3945, 1010, 1002, 8568, 1035, 6453, 1027, 6270, 1007, 1063, 1002, 3945, 1027, 2358, 5339, 12898, 13777, 1006, 1002, 3945, 1007, 1025, 1002, 2179, 1027, 1002, 2023, 1011, 1028, 2131, 2890, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Statement.php
Zend_Db_Statement.bindColumn
public function bindColumn($column, &$param, $type = null) { $this->_bindColumn[$column] =& $param; return true; }
php
public function bindColumn($column, &$param, $type = null) { $this->_bindColumn[$column] =& $param; return true; }
[ "public", "function", "bindColumn", "(", "$", "column", ",", "&", "$", "param", ",", "$", "type", "=", "null", ")", "{", "$", "this", "->", "_bindColumn", "[", "$", "column", "]", "=", "&", "$", "param", ";", "return", "true", ";", "}" ]
Bind a column of the statement result set to a PHP variable. @param string $column Name the column in the result set, either by position or by name. @param mixed $param Reference to the PHP variable containing the value. @param mixed $type OPTIONAL @return bool
[ "Bind", "a", "column", "of", "the", "statement", "result", "set", "to", "a", "PHP", "variable", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Statement.php#L222-L226
train
Binds a column to a parameter
[ 30522, 2270, 3853, 14187, 25778, 2819, 2078, 1006, 1002, 5930, 1010, 1004, 1002, 11498, 2213, 1010, 1002, 2828, 1027, 19701, 1007, 1063, 1002, 2023, 1011, 1028, 1035, 14187, 25778, 2819, 2078, 1031, 1002, 5930, 1033, 1027, 1004, 1002, 11498...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.loadPlugin
public function loadPlugin($pluginName) { if (isset($this->loadedPlugins[$pluginName])) { return $this->loadedPlugins[$pluginName]; } $newPlugin = $this->makePluginClass($pluginName); $this->addLoadedPlugin($pluginName, $newPlugin); return $newPlugin; }
php
public function loadPlugin($pluginName) { if (isset($this->loadedPlugins[$pluginName])) { return $this->loadedPlugins[$pluginName]; } $newPlugin = $this->makePluginClass($pluginName); $this->addLoadedPlugin($pluginName, $newPlugin); return $newPlugin; }
[ "public", "function", "loadPlugin", "(", "$", "pluginName", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "loadedPlugins", "[", "$", "pluginName", "]", ")", ")", "{", "return", "$", "this", "->", "loadedPlugins", "[", "$", "pluginName", "]", ";...
Loads the plugin filename and instantiates the plugin with the given name, eg. UserCountry. Contrary to loadPlugins() it does not activate the plugin, it only loads it. @param string $pluginName @throws \Exception @return Plugin|null
[ "Loads", "the", "plugin", "filename", "and", "instantiates", "the", "plugin", "with", "the", "given", "name", "eg", ".", "UserCountry", ".", "Contrary", "to", "loadPlugins", "()", "it", "does", "not", "activate", "the", "plugin", "it", "only", "loads", "it",...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Plugin/Manager.php#L1135-L1144
train
Load a plugin
[ 30522, 2270, 3853, 7170, 24759, 15916, 2378, 1006, 1002, 13354, 23111, 14074, 1007, 1063, 2065, 1006, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 8209, 24759, 15916, 7076, 1031, 1002, 13354, 23111, 14074, 1033, 1007, 1007, 1063, 2709, 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/Routing/Route.php
Route.controllerDispatcher
public function controllerDispatcher() { if ($this->container->bound(ControllerDispatcherContract::class)) { return $this->container->make(ControllerDispatcherContract::class); } return new ControllerDispatcher($this->container); }
php
public function controllerDispatcher() { if ($this->container->bound(ControllerDispatcherContract::class)) { return $this->container->make(ControllerDispatcherContract::class); } return new ControllerDispatcher($this->container); }
[ "public", "function", "controllerDispatcher", "(", ")", "{", "if", "(", "$", "this", "->", "container", "->", "bound", "(", "ControllerDispatcherContract", "::", "class", ")", ")", "{", "return", "$", "this", "->", "container", "->", "make", "(", "Controller...
Get the dispatcher for the route's controller. @return \Illuminate\Routing\Contracts\ControllerDispatcher
[ "Get", "the", "dispatcher", "for", "the", "route", "s", "controller", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/Route.php#L842-L849
train
Return the controller dispatcher
[ 30522, 2270, 3853, 11486, 10521, 4502, 10649, 2121, 1006, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 11661, 1011, 1028, 5391, 1006, 11486, 10521, 4502, 10649, 2121, 8663, 6494, 6593, 1024, 1024, 2465, 1007, 1007, 1063, 2709, 1002, 2023...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.typeDatetime
public static function typeDatetime($value, array $params, array $field) { if ($value instanceof \DateTime) { return true; } if (!\is_string($value)) { return false; } if (!isset($params['format'])) { return false !== strtotime($value); ...
php
public static function typeDatetime($value, array $params, array $field) { if ($value instanceof \DateTime) { return true; } if (!\is_string($value)) { return false; } if (!isset($params['format'])) { return false !== strtotime($value); ...
[ "public", "static", "function", "typeDatetime", "(", "$", "value", ",", "array", "$", "params", ",", "array", "$", "field", ")", "{", "if", "(", "$", "value", "instanceof", "\\", "DateTime", ")", "{", "return", "true", ";", "}", "if", "(", "!", "\\",...
HTML5 input: datetime @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", ":", "datetime" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Data/Validation.php#L447-L462
train
Type if value is a \ DateTime
[ 30522, 2270, 10763, 3853, 21189, 3686, 7292, 1006, 1002, 3643, 1010, 9140, 1002, 11498, 5244, 1010, 9140, 1002, 2492, 1007, 1063, 2065, 1006, 1002, 3643, 6013, 11253, 1032, 3058, 7292, 1007, 1063, 2709, 2995, 1025, 1065, 2065, 1006, 999, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Core.php
Zend_Cache_Core.clean
public function clean($mode = 'all', $tags = array()) { if (!$this->_options['caching']) { return true; } if (!in_array($mode, array(Zend_Cache::CLEANING_MODE_ALL, Zend_Cache::CLEANING_MODE_OLD, Zend_Cache::CLE...
php
public function clean($mode = 'all', $tags = array()) { if (!$this->_options['caching']) { return true; } if (!in_array($mode, array(Zend_Cache::CLEANING_MODE_ALL, Zend_Cache::CLEANING_MODE_OLD, Zend_Cache::CLE...
[ "public", "function", "clean", "(", "$", "mode", "=", "'all'", ",", "$", "tags", "=", "array", "(", ")", ")", "{", "if", "(", "!", "$", "this", "->", "_options", "[", "'caching'", "]", ")", "{", "return", "true", ";", "}", "if", "(", "!", "in_a...
Clean cache entries Available modes are : 'all' (default) => remove all cache entries ($tags is not used) 'old' => remove too old cache entries ($tags is not used) 'matchingTag' => remove cache entries matching all given tags ($tags can be an array of strings or a single string) 'notMatchingTag' => remo...
[ "Clean", "cache", "entries" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Cache/Core.php#L450-L465
train
Clean cache entries
[ 30522, 2270, 3853, 4550, 1006, 1002, 5549, 1027, 1005, 2035, 1005, 1010, 1002, 22073, 1027, 9140, 1006, 1007, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 1035, 7047, 1031, 1005, 6187, 8450, 1005, 1033, 1007, 1063, 2709, 2995, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Material/Client.php
Client.uploadVideo
public function uploadVideo(string $path, string $title, string $description) { $params = [ 'description' => json_encode( [ 'title' => $title, 'introduction' => $description, ], JSON_UNESCAPED_UNICODE), ]; r...
php
public function uploadVideo(string $path, string $title, string $description) { $params = [ 'description' => json_encode( [ 'title' => $title, 'introduction' => $description, ], JSON_UNESCAPED_UNICODE), ]; r...
[ "public", "function", "uploadVideo", "(", "string", "$", "path", ",", "string", "$", "title", ",", "string", "$", "description", ")", "{", "$", "params", "=", "[", "'description'", "=>", "json_encode", "(", "[", "'title'", "=>", "$", "title", ",", "'intr...
Upload video. @param string $path @param string $title @param string $description @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException
[ "Upload", "video", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/Material/Client.php#L86-L97
train
Upload video to the browser
[ 30522, 2270, 3853, 2039, 11066, 17258, 8780, 1006, 5164, 1002, 4130, 1010, 5164, 1002, 2516, 1010, 5164, 1002, 6412, 1007, 1063, 1002, 11498, 5244, 1027, 1031, 1005, 6412, 1005, 1027, 1028, 1046, 3385, 1035, 4372, 16044, 1006, 1031, 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...
apache/thrift
lib/php/lib/Serializer/TBinarySerializer.php
TBinarySerializer.serialize
public static function serialize($object) { $transport = new TMemoryBuffer(); $protocol = new TBinaryProtocolAccelerated($transport); if (function_exists('thrift_protocol_write_binary')) { thrift_protocol_write_binary( $protocol, $object->getName()...
php
public static function serialize($object) { $transport = new TMemoryBuffer(); $protocol = new TBinaryProtocolAccelerated($transport); if (function_exists('thrift_protocol_write_binary')) { thrift_protocol_write_binary( $protocol, $object->getName()...
[ "public", "static", "function", "serialize", "(", "$", "object", ")", "{", "$", "transport", "=", "new", "TMemoryBuffer", "(", ")", ";", "$", "protocol", "=", "new", "TBinaryProtocolAccelerated", "(", "$", "transport", ")", ";", "if", "(", "function_exists",...
normal deserialization.
[ "normal", "deserialization", "." ]
acdd4226c210336e9e15eb812e5932a645fcd5ce
https://github.com/apache/thrift/blob/acdd4226c210336e9e15eb812e5932a645fcd5ce/lib/php/lib/Serializer/TBinarySerializer.php#L41-L62
train
serializes an object into a binary string
[ 30522, 2270, 10763, 3853, 7642, 4697, 1006, 1002, 4874, 1007, 1063, 1002, 3665, 1027, 2047, 1056, 4168, 5302, 2854, 8569, 12494, 1006, 1007, 1025, 1002, 8778, 1027, 2047, 26419, 3981, 2854, 21572, 3406, 26289, 9468, 12260, 9250, 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...
symfony/symfony
src/Symfony/Component/Routing/Route.php
Route.getDefault
public function getDefault($name) { return isset($this->defaults[$name]) ? $this->defaults[$name] : null; }
php
public function getDefault($name) { return isset($this->defaults[$name]) ? $this->defaults[$name] : null; }
[ "public", "function", "getDefault", "(", "$", "name", ")", "{", "return", "isset", "(", "$", "this", "->", "defaults", "[", "$", "name", "]", ")", "?", "$", "this", "->", "defaults", "[", "$", "name", "]", ":", "null", ";", "}" ]
Gets a default value. @param string $name A variable name @return mixed The default value or null when not given
[ "Gets", "a", "default", "value", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Routing/Route.php#L394-L397
train
Get a default value
[ 30522, 2270, 3853, 2131, 3207, 7011, 11314, 1006, 1002, 2171, 1007, 1063, 2709, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 12398, 2015, 1031, 1002, 2171, 1033, 1007, 1029, 1002, 2023, 1011, 1028, 12398, 2015, 1031, 1002, 2171, 1033, 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...
z-song/laravel-admin
src/AdminServiceProvider.php
AdminServiceProvider.registerRouteMiddleware
protected function registerRouteMiddleware() { // register route middleware. foreach ($this->routeMiddleware as $key => $middleware) { app('router')->aliasMiddleware($key, $middleware); } // register middleware group. foreach ($this->middlewareGroups as $key => $...
php
protected function registerRouteMiddleware() { // register route middleware. foreach ($this->routeMiddleware as $key => $middleware) { app('router')->aliasMiddleware($key, $middleware); } // register middleware group. foreach ($this->middlewareGroups as $key => $...
[ "protected", "function", "registerRouteMiddleware", "(", ")", "{", "// register route middleware.", "foreach", "(", "$", "this", "->", "routeMiddleware", "as", "$", "key", "=>", "$", "middleware", ")", "{", "app", "(", "'router'", ")", "->", "aliasMiddleware", "...
Register the route middleware. @return void
[ "Register", "the", "route", "middleware", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/AdminServiceProvider.php#L121-L132
train
Register route middleware
[ 30522, 5123, 3853, 4236, 22494, 18532, 3593, 10362, 8059, 1006, 1007, 1063, 1013, 1013, 4236, 2799, 2690, 8059, 1012, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 2799, 4328, 20338, 8059, 2004, 1002, 3145, 1027, 1028, 1002, 2690, 8059, 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/Support/Collection.php
Collection.has
public function has($key) { $keys = is_array($key) ? $key : func_get_args(); foreach ($keys as $value) { if (! $this->offsetExists($value)) { return false; } } return true; }
php
public function has($key) { $keys = is_array($key) ? $key : func_get_args(); foreach ($keys as $value) { if (! $this->offsetExists($value)) { return false; } } return true; }
[ "public", "function", "has", "(", "$", "key", ")", "{", "$", "keys", "=", "is_array", "(", "$", "key", ")", "?", "$", "key", ":", "func_get_args", "(", ")", ";", "foreach", "(", "$", "keys", "as", "$", "value", ")", "{", "if", "(", "!", "$", ...
Determine if an item exists in the collection by key. @param mixed $key @return bool
[ "Determine", "if", "an", "item", "exists", "in", "the", "collection", "by", "key", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Support/Collection.php#L960-L971
train
Has the key
[ 30522, 2270, 3853, 2038, 1006, 1002, 3145, 1007, 1063, 1002, 6309, 1027, 2003, 1035, 9140, 1006, 1002, 3145, 1007, 1029, 1002, 3145, 1024, 4569, 2278, 1035, 2131, 1035, 12098, 5620, 1006, 1007, 1025, 18921, 6776, 1006, 1002, 6309, 2004, 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
core/ProfessionalServices/Advertising.php
Advertising.getCampaignParametersForPromoUrl
private function getCampaignParametersForPromoUrl($campaignName, $campaignMedium, $campaignContent = '') { $campaignName = sprintf('pk_campaign=%s&pk_medium=%s&pk_source=Piwik_App', $campaignName, $campaignMedium); if (!empty($campaignContent)) { $campaignName .= '&pk_content=' . $campa...
php
private function getCampaignParametersForPromoUrl($campaignName, $campaignMedium, $campaignContent = '') { $campaignName = sprintf('pk_campaign=%s&pk_medium=%s&pk_source=Piwik_App', $campaignName, $campaignMedium); if (!empty($campaignContent)) { $campaignName .= '&pk_content=' . $campa...
[ "private", "function", "getCampaignParametersForPromoUrl", "(", "$", "campaignName", ",", "$", "campaignMedium", ",", "$", "campaignContent", "=", "''", ")", "{", "$", "campaignName", "=", "sprintf", "(", "'pk_campaign=%s&pk_medium=%s&pk_source=Piwik_App'", ",", "$", ...
Generates campaign URL parameters that can be used with promoting Professional Support service. @param string $campaignName @param string $campaignMedium @param string $campaignContent Optional @return string URL parameters without a leading ? or &
[ "Generates", "campaign", "URL", "parameters", "that", "can", "be", "used", "with", "promoting", "Professional", "Support", "service", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/ProfessionalServices/Advertising.php#L103-L112
train
Get campaign parameters for promoting promo url
[ 30522, 2797, 3853, 2131, 26468, 4886, 16206, 28689, 22828, 22747, 2953, 21572, 20360, 2140, 1006, 1002, 3049, 18442, 1010, 1002, 3049, 7583, 5007, 1010, 1002, 3049, 8663, 6528, 2102, 1027, 1005, 1005, 1007, 1063, 1002, 3049, 18442, 1027, 90...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/DevicesDetection/API.php
API.getBrowserFamilies
public function getBrowserFamilies($idSite, $period, $date, $segment = false) { $table = $this->getBrowsers($idSite, $period, $date, $segment); // this one will not be sorted automatically by nb_visits since there is no Report class for it. $table->filter('Sort', array(Metrics::INDEX_NB_VISI...
php
public function getBrowserFamilies($idSite, $period, $date, $segment = false) { $table = $this->getBrowsers($idSite, $period, $date, $segment); // this one will not be sorted automatically by nb_visits since there is no Report class for it. $table->filter('Sort', array(Metrics::INDEX_NB_VISI...
[ "public", "function", "getBrowserFamilies", "(", "$", "idSite", ",", "$", "period", ",", "$", "date", ",", "$", "segment", "=", "false", ")", "{", "$", "table", "=", "$", "this", "->", "getBrowsers", "(", "$", "idSite", ",", "$", "period", ",", "$", ...
Gets datatable displaying number of visits by Browser family (eg. Firefox, InternetExplorer) @param int $idSite @param string $period @param string $date @param bool|string $segment @return DataTable @deprecated since 2.9.0 Use {@link getBrowsers} instead.
[ "Gets", "datatable", "displaying", "number", "of", "visits", "by", "Browser", "family", "(", "eg", ".", "Firefox", "InternetExplorer", ")", "@param", "int", "$idSite", "@param", "string", "$period", "@param", "string", "$date", "@param", "bool|string", "$segment",...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/DevicesDetection/API.php#L238-L245
train
Get browsers table
[ 30522, 2270, 3853, 2131, 12618, 9333, 2121, 7011, 4328, 11983, 1006, 1002, 8909, 28032, 2063, 1010, 1002, 2558, 1010, 1002, 3058, 1010, 1002, 6903, 1027, 6270, 1007, 1063, 1002, 2795, 1027, 1002, 2023, 1011, 1028, 2131, 12618, 9333, 2545, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...