repo
stringclasses
21 values
path
stringlengths
10
105
func_name
stringlengths
6
64
original_string
stringlengths
105
15.6k
language
stringclasses
1 value
code
stringlengths
105
15.6k
code_tokens
listlengths
29
2.15k
docstring
stringlengths
11
2.85k
docstring_tokens
listlengths
1
290
sha
stringclasses
21 values
url
stringlengths
100
194
partition
stringclasses
1 value
summary
stringlengths
8
319
input_ids
listlengths
502
502
token_type_ids
listlengths
502
502
attention_mask
listlengths
502
502
labels
listlengths
502
502
symfony/symfony
src/Symfony/Component/Intl/Data/Bundle/Reader/BundleEntryReader.php
BundleEntryReader.readEntry
public function readEntry($path, $locale, array $indices, $fallback = true) { $entry = null; $isMultiValued = false; $readSucceeded = false; $exception = null; $currentLocale = $locale; $testedLocales = []; while (null !== $currentLocale) { // Res...
php
public function readEntry($path, $locale, array $indices, $fallback = true) { $entry = null; $isMultiValued = false; $readSucceeded = false; $exception = null; $currentLocale = $locale; $testedLocales = []; while (null !== $currentLocale) { // Res...
[ "public", "function", "readEntry", "(", "$", "path", ",", "$", "locale", ",", "array", "$", "indices", ",", "$", "fallback", "=", "true", ")", "{", "$", "entry", "=", "null", ";", "$", "isMultiValued", "=", "false", ";", "$", "readSucceeded", "=", "f...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Intl/Data/Bundle/Reader/BundleEntryReader.php#L72-L176
train
Reads the entry from the reader for the given locale and indices
[ 30522, 2270, 3853, 3191, 4765, 2854, 1006, 1002, 4130, 1010, 1002, 2334, 2063, 1010, 9140, 1002, 29299, 1010, 1002, 2991, 5963, 1027, 2995, 1007, 1063, 1002, 4443, 1027, 19701, 1025, 1002, 2003, 12274, 7096, 11444, 7630, 2098, 1027, 6270, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php
MemcachedSessionHandler.updateTimestamp
public function updateTimestamp($sessionId, $data) { $this->memcached->touch($this->prefix.$sessionId, time() + $this->ttl); return true; }
php
public function updateTimestamp($sessionId, $data) { $this->memcached->touch($this->prefix.$sessionId, time() + $this->ttl); return true; }
[ "public", "function", "updateTimestamp", "(", "$", "sessionId", ",", "$", "data", ")", "{", "$", "this", "->", "memcached", "->", "touch", "(", "$", "this", "->", "prefix", ".", "$", "sessionId", ",", "time", "(", ")", "+", "$", "this", "->", "ttl", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php#L79-L84
train
Update the timestamp of a session
[ 30522, 2270, 3853, 10651, 7292, 9153, 8737, 1006, 1002, 5219, 3593, 1010, 1002, 2951, 1007, 1063, 1002, 2023, 1011, 1028, 2033, 12458, 15395, 2094, 1011, 1028, 3543, 1006, 1002, 2023, 1011, 1028, 17576, 1012, 1002, 5219, 3593, 1010, 2051, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Console/ExtendCommand.php
ExtendCommand.handle
public function handle(Filesystem $filesystem) { $this->filesystem = $filesystem; $this->extensionDir = config('admin.extension_dir'); InputExtensionDir: if (empty($this->extensionDir)) { $this->extensionDir = $this->ask('Please input a directory to store your extension...
php
public function handle(Filesystem $filesystem) { $this->filesystem = $filesystem; $this->extensionDir = config('admin.extension_dir'); InputExtensionDir: if (empty($this->extensionDir)) { $this->extensionDir = $this->ask('Please input a directory to store your extension...
[ "public", "function", "handle", "(", "Filesystem", "$", "filesystem", ")", "{", "$", "this", "->", "filesystem", "=", "$", "filesystem", ";", "$", "this", "->", "extensionDir", "=", "config", "(", "'admin.extension_dir'", ")", ";", "InputExtensionDir", ":", ...
Execute the console command. @return void
[ "Execute", "the", "console", "command", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Console/ExtendCommand.php#L72-L100
train
Handle the extension scaffolding
[ 30522, 2270, 3853, 5047, 1006, 6764, 27268, 6633, 1002, 6764, 27268, 6633, 1007, 1063, 1002, 2023, 1011, 1028, 6764, 27268, 6633, 1027, 1002, 6764, 27268, 6633, 1025, 1002, 2023, 1011, 1028, 5331, 4305, 2099, 1027, 9530, 8873, 2290, 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...
barryvdh/laravel-debugbar
src/DataCollector/QueryCollector.php
QueryCollector.performQueryAnalysis
protected function performQueryAnalysis($query) { $hints = []; if (preg_match('/^\\s*SELECT\\s*`?[a-zA-Z0-9]*`?\\.?\\*/i', $query)) { $hints[] = 'Use <code>SELECT *</code> only if you need all columns from table'; } if (preg_match('/ORDER BY RAND()/i', $query)) { ...
php
protected function performQueryAnalysis($query) { $hints = []; if (preg_match('/^\\s*SELECT\\s*`?[a-zA-Z0-9]*`?\\.?\\*/i', $query)) { $hints[] = 'Use <code>SELECT *</code> only if you need all columns from table'; } if (preg_match('/ORDER BY RAND()/i', $query)) { ...
[ "protected", "function", "performQueryAnalysis", "(", "$", "query", ")", "{", "$", "hints", "=", "[", "]", ";", "if", "(", "preg_match", "(", "'/^\\\\s*SELECT\\\\s*`?[a-zA-Z0-9]*`?\\\\.?\\\\*/i'", ",", "$", "query", ")", ")", "{", "$", "hints", "[", "]", "="...
Explainer::performQueryAnalysis() Perform simple regex analysis on the code @package xplain (https://github.com/rap2hpoutre/mysql-xplain-xplain) @author e-doceo @copyright 2014 @version $Id$ @access public @param string $query @return string
[ "Explainer", "::", "performQueryAnalysis", "()" ]
2d195779ea4f809f69764a795e2ec371dbb76a96
https://github.com/barryvdh/laravel-debugbar/blob/2d195779ea4f809f69764a795e2ec371dbb76a96/src/DataCollector/QueryCollector.php#L161-L186
train
Perform the analysis of the query
[ 30522, 5123, 3853, 4685, 4226, 20444, 12032, 20960, 1006, 1002, 23032, 1007, 1063, 1002, 20385, 1027, 1031, 1033, 1025, 2065, 1006, 3653, 2290, 1035, 2674, 1006, 1005, 1013, 1034, 1032, 1032, 1055, 1008, 7276, 1032, 1032, 1055, 1008, 1036, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Tools.php
Tools.disableView
public function disableView(bool $disable = true) { if ($disable) { array_delete($this->tools, 'view'); } elseif (!in_array('view', $this->tools)) { array_push($this->tools, 'view'); } return $this; }
php
public function disableView(bool $disable = true) { if ($disable) { array_delete($this->tools, 'view'); } elseif (!in_array('view', $this->tools)) { array_push($this->tools, 'view'); } return $this; }
[ "public", "function", "disableView", "(", "bool", "$", "disable", "=", "true", ")", "{", "if", "(", "$", "disable", ")", "{", "array_delete", "(", "$", "this", "->", "tools", ",", "'view'", ")", ";", "}", "elseif", "(", "!", "in_array", "(", "'view'"...
Disable `edit` tool. @return $this
[ "Disable", "edit", "tool", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Form/Tools.php#L115-L124
train
Disable view tools
[ 30522, 2270, 3853, 4487, 19150, 8584, 1006, 22017, 2140, 1002, 4487, 19150, 1027, 2995, 1007, 1063, 2065, 1006, 1002, 4487, 19150, 1007, 1063, 9140, 1035, 3972, 12870, 1006, 1002, 2023, 1011, 1028, 5906, 1010, 1005, 3193, 1005, 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...
z-song/laravel-admin
src/Show/Field.php
Field.image
public function image($server = '', $width = 200, $height = 200) { return $this->unescape()->as(function ($images) use ($server, $width, $height) { return collect($images)->map(function ($path) use ($server, $width, $height) { if (empty($path)) { return ''; ...
php
public function image($server = '', $width = 200, $height = 200) { return $this->unescape()->as(function ($images) use ($server, $width, $height) { return collect($images)->map(function ($path) use ($server, $width, $height) { if (empty($path)) { return ''; ...
[ "public", "function", "image", "(", "$", "server", "=", "''", ",", "$", "width", "=", "200", ",", "$", "height", "=", "200", ")", "{", "return", "$", "this", "->", "unescape", "(", ")", "->", "as", "(", "function", "(", "$", "images", ")", "use",...
Show field as a image. @param string $server @param int $width @param int $height @return $this
[ "Show", "field", "as", "a", "image", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Show/Field.php#L211-L236
train
Return an array of images
[ 30522, 2270, 3853, 3746, 1006, 1002, 8241, 1027, 1005, 1005, 1010, 1002, 9381, 1027, 3263, 1010, 1002, 4578, 1027, 3263, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 16655, 15782, 5051, 1006, 1007, 1011, 1028, 2004, 1006, 3853, 1006, 1002, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Utils.php
Utils.verifyNonce
public static function verifyNonce($nonce, $action) { //Safety check for multiple nonces if (is_array($nonce)) { $nonce = array_shift($nonce); } //Nonce generated 0-12 hours ago if ($nonce === self::getNonce($action)) { return true; } ...
php
public static function verifyNonce($nonce, $action) { //Safety check for multiple nonces if (is_array($nonce)) { $nonce = array_shift($nonce); } //Nonce generated 0-12 hours ago if ($nonce === self::getNonce($action)) { return true; } ...
[ "public", "static", "function", "verifyNonce", "(", "$", "nonce", ",", "$", "action", ")", "{", "//Safety check for multiple nonces", "if", "(", "is_array", "(", "$", "nonce", ")", ")", "{", "$", "nonce", "=", "array_shift", "(", "$", "nonce", ")", ";", ...
Verify the passed nonce for the give action @param string|string[] $nonce the nonce to verify @param string $action the action to verify the nonce to @return boolean verified or not
[ "Verify", "the", "passed", "nonce", "for", "the", "give", "action" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Utils.php#L1123-L1139
train
Verify if a nonce is valid for an action
[ 30522, 2270, 10763, 3853, 20410, 8540, 3401, 1006, 1002, 2512, 3401, 1010, 1002, 2895, 1007, 1063, 1013, 1013, 3808, 4638, 2005, 3674, 2512, 9623, 2065, 1006, 2003, 1035, 9140, 1006, 1002, 2512, 3401, 1007, 1007, 1063, 1002, 2512, 3401, 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/Queue/SyncQueue.php
SyncQueue.raiseBeforeJobEvent
protected function raiseBeforeJobEvent(Job $job) { if ($this->container->bound('events')) { $this->container['events']->dispatch(new Events\JobProcessing($this->connectionName, $job)); } }
php
protected function raiseBeforeJobEvent(Job $job) { if ($this->container->bound('events')) { $this->container['events']->dispatch(new Events\JobProcessing($this->connectionName, $job)); } }
[ "protected", "function", "raiseBeforeJobEvent", "(", "Job", "$", "job", ")", "{", "if", "(", "$", "this", "->", "container", "->", "bound", "(", "'events'", ")", ")", "{", "$", "this", "->", "container", "[", "'events'", "]", "->", "dispatch", "(", "ne...
Raise the before queue job event. @param \Illuminate\Contracts\Queue\Job $job @return void
[ "Raise", "the", "before", "queue", "job", "event", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Queue/SyncQueue.php#L72-L77
train
Raise before job event
[ 30522, 5123, 3853, 5333, 4783, 29278, 20518, 20891, 15338, 1006, 3105, 1002, 3105, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 11661, 1011, 1028, 5391, 1006, 1005, 2824, 1005, 1007, 1007, 1063, 1002, 2023, 1011, 1028, 11661, 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...
symfony/symfony
src/Symfony/Component/Config/Resource/DirectoryResource.php
DirectoryResource.isFresh
public function isFresh($timestamp) { if (!is_dir($this->resource)) { return false; } if ($timestamp < filemtime($this->resource)) { return false; } foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->resource), \RecursiveI...
php
public function isFresh($timestamp) { if (!is_dir($this->resource)) { return false; } if ($timestamp < filemtime($this->resource)) { return false; } foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->resource), \RecursiveI...
[ "public", "function", "isFresh", "(", "$", "timestamp", ")", "{", "if", "(", "!", "is_dir", "(", "$", "this", "->", "resource", ")", ")", "{", "return", "false", ";", "}", "if", "(", "$", "timestamp", "<", "filemtime", "(", "$", "this", "->", "reso...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Config/Resource/DirectoryResource.php#L71-L107
train
Returns true if the directory is fresh enough
[ 30522, 2270, 3853, 2003, 19699, 9953, 1006, 1002, 2335, 15464, 2361, 1007, 1063, 2065, 1006, 999, 2003, 1035, 16101, 1006, 1002, 2023, 1011, 1028, 7692, 1007, 1007, 1063, 2709, 6270, 1025, 1065, 2065, 1006, 1002, 2335, 15464, 2361, 1026, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.bindParam
public function bindParam($parameter, &$variable, $type = null, $length = null, $options = null) { if (!is_int($parameter) && !is_string($parameter)) { /** * @see Zend_Db_Statement_Exception */ // require_once 'Zend/Db/Statement/Exception.php'; t...
php
public function bindParam($parameter, &$variable, $type = null, $length = null, $options = null) { if (!is_int($parameter) && !is_string($parameter)) { /** * @see Zend_Db_Statement_Exception */ // require_once 'Zend/Db/Statement/Exception.php'; t...
[ "public", "function", "bindParam", "(", "$", "parameter", ",", "&", "$", "variable", ",", "$", "type", "=", "null", ",", "$", "length", "=", "null", ",", "$", "options", "=", "null", ")", "{", "if", "(", "!", "is_int", "(", "$", "parameter", ")", ...
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.php#L238-L273
train
Bind a parameter to a variable
[ 30522, 2270, 3853, 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, 999, 2003, 1035, 20014, 1006, 1002, 16381...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.removeDuplicates
protected function removeDuplicates() { foreach ($this->assets as $type => &$collection) { $pathCache = []; foreach ($collection as $key => $asset) { if (!$path = array_get($asset, 'path')) { continue; } if (isset...
php
protected function removeDuplicates() { foreach ($this->assets as $type => &$collection) { $pathCache = []; foreach ($collection as $key => $asset) { if (!$path = array_get($asset, 'path')) { continue; } if (isset...
[ "protected", "function", "removeDuplicates", "(", ")", "{", "foreach", "(", "$", "this", "->", "assets", "as", "$", "type", "=>", "&", "$", "collection", ")", "{", "$", "pathCache", "=", "[", "]", ";", "foreach", "(", "$", "collection", "as", "$", "k...
Removes duplicate assets from the entire collection. @return void
[ "Removes", "duplicate", "assets", "from", "the", "entire", "collection", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/traits/AssetMaker.php#L307-L327
train
Remove duplicates from assets
[ 30522, 5123, 3853, 3718, 6279, 19341, 4570, 1006, 1007, 1063, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 7045, 2004, 1002, 2828, 1027, 1028, 1004, 1002, 3074, 1007, 1063, 1002, 4130, 3540, 5403, 1027, 1031, 1033, 1025, 18921, 6776, 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/Security/Core/Encoder/NativePasswordEncoder.php
NativePasswordEncoder.encodePassword
public function encodePassword($raw, $salt) { if (\strlen($raw) > self::MAX_PASSWORD_LENGTH) { throw new BadCredentialsException('Invalid password.'); } // Ignore $salt, the auto-generated one is always the best $encoded = password_hash($raw, $this->algo, $this->options...
php
public function encodePassword($raw, $salt) { if (\strlen($raw) > self::MAX_PASSWORD_LENGTH) { throw new BadCredentialsException('Invalid password.'); } // Ignore $salt, the auto-generated one is always the best $encoded = password_hash($raw, $this->algo, $this->options...
[ "public", "function", "encodePassword", "(", "$", "raw", ",", "$", "salt", ")", "{", "if", "(", "\\", "strlen", "(", "$", "raw", ")", ">", "self", "::", "MAX_PASSWORD_LENGTH", ")", "{", "throw", "new", "BadCredentialsException", "(", "'Invalid password.'", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Security/Core/Encoder/NativePasswordEncoder.php#L60-L76
train
Encode a password using BCrypt
[ 30522, 2270, 3853, 4372, 16044, 15194, 18351, 1006, 1002, 6315, 1010, 1002, 5474, 1007, 1063, 2065, 1006, 1032, 2358, 20927, 2078, 1006, 1002, 6315, 1007, 1028, 2969, 1024, 1024, 4098, 1035, 20786, 1035, 3091, 1007, 1063, 5466, 2047, 2919, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Session/SessionInitializer.php
SessionInitializer.initSession
public function initSession(AuthInterface $auth) { $this->regenerateSessionId(); $authResult = $this->doAuthenticateSession($auth); if (!$authResult->wasAuthenticationSuccessful()) { Piwik::postEvent('Login.authenticate.failed', array($auth->getLogin())); $this->p...
php
public function initSession(AuthInterface $auth) { $this->regenerateSessionId(); $authResult = $this->doAuthenticateSession($auth); if (!$authResult->wasAuthenticationSuccessful()) { Piwik::postEvent('Login.authenticate.failed', array($auth->getLogin())); $this->p...
[ "public", "function", "initSession", "(", "AuthInterface", "$", "auth", ")", "{", "$", "this", "->", "regenerateSessionId", "(", ")", ";", "$", "authResult", "=", "$", "this", "->", "doAuthenticateSession", "(", "$", "auth", ")", ";", "if", "(", "!", "$"...
Authenticates the user and, if successful, initializes an authenticated session. @param \Piwik\Auth $auth The Auth implementation to use. @throws Exception If authentication fails or the user is not allowed to login for some reason.
[ "Authenticates", "the", "user", "and", "if", "successful", "initializes", "an", "authenticated", "session", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Session/SessionInitializer.php#L28-L45
train
Initializes the session and processes the authentication result
[ 30522, 2270, 3853, 1999, 12762, 7971, 3258, 1006, 8740, 15222, 10111, 12881, 10732, 1002, 8740, 2705, 1007, 1063, 1002, 2023, 1011, 1028, 19723, 24454, 8520, 7971, 3258, 3593, 1006, 1007, 1025, 1002, 8740, 2705, 6072, 11314, 1027, 1002, 202...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/Referrers/SearchEngine.php
SearchEngine.extractInformationFromUrl
public function extractInformationFromUrl($referrerUrl) { $referrerParsed = @parse_url($referrerUrl); $referrerHost = ''; if (isset($referrerParsed['host'])) { $referrerHost = $referrerParsed['host']; } if (empty($referrerHost)) { return false; ...
php
public function extractInformationFromUrl($referrerUrl) { $referrerParsed = @parse_url($referrerUrl); $referrerHost = ''; if (isset($referrerParsed['host'])) { $referrerHost = $referrerParsed['host']; } if (empty($referrerHost)) { return false; ...
[ "public", "function", "extractInformationFromUrl", "(", "$", "referrerUrl", ")", "{", "$", "referrerParsed", "=", "@", "parse_url", "(", "$", "referrerUrl", ")", ";", "$", "referrerHost", "=", "''", ";", "if", "(", "isset", "(", "$", "referrerParsed", "[", ...
Extracts a keyword from a raw not encoded URL. Will only extract keyword if a known search engine has been detected. Returns the keyword: - in UTF8: automatically converted from other charsets when applicable - strtolowered: "QUErY test!" will return "query test!" - trimmed: extra spaces before and after are removed T...
[ "Extracts", "a", "keyword", "from", "a", "raw", "not", "encoded", "URL", ".", "Will", "only", "extract", "keyword", "if", "a", "known", "search", "engine", "has", "been", "detected", ".", "Returns", "the", "keyword", ":", "-", "in", "UTF8", ":", "automat...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Referrers/SearchEngine.php#L190-L347
train
Extracts information from a referrers URL
[ 30522, 2270, 3853, 14817, 2378, 14192, 3370, 19699, 5358, 3126, 2140, 1006, 1002, 6523, 14544, 3126, 2140, 1007, 1063, 1002, 6523, 14544, 19362, 6924, 1027, 1030, 11968, 3366, 1035, 24471, 2140, 1006, 1002, 6523, 14544, 3126, 2140, 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...
dompdf/dompdf
src/Image/Cache.php
Cache.resolve_url
static function resolve_url($url, $protocol, $host, $base_path, Dompdf $dompdf) { self::$_dompdf = $dompdf; $protocol = mb_strtolower($protocol); $parsed_url = Helpers::explode_url($url); $message = null; $remote = ($protocol && $protocol !== "file://") || ($parsed_...
php
static function resolve_url($url, $protocol, $host, $base_path, Dompdf $dompdf) { self::$_dompdf = $dompdf; $protocol = mb_strtolower($protocol); $parsed_url = Helpers::explode_url($url); $message = null; $remote = ($protocol && $protocol !== "file://") || ($parsed_...
[ "static", "function", "resolve_url", "(", "$", "url", ",", "$", "protocol", ",", "$", "host", ",", "$", "base_path", ",", "Dompdf", "$", "dompdf", ")", "{", "self", "::", "$", "_dompdf", "=", "$", "dompdf", ";", "$", "protocol", "=", "mb_strtolower", ...
Resolve and fetch an image for use. @param string $url The url of the image @param string $protocol Default protocol if none specified in $url @param string $host Default host if none specified in $url @param string $base_path Default path if none specified in $url @param Dompdf $dompdf The Dompdf insta...
[ "Resolve", "and", "fetch", "an", "image", "for", "use", "." ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/Image/Cache.php#L60-L149
train
Resolve the URL
[ 30522, 10763, 3853, 10663, 1035, 24471, 2140, 1006, 1002, 24471, 2140, 1010, 1002, 8778, 1010, 1002, 3677, 1010, 1002, 2918, 1035, 4130, 1010, 14383, 17299, 2546, 1002, 14383, 17299, 2546, 1007, 1063, 2969, 1024, 1024, 1002, 1035, 14383, 17...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dompdf/dompdf
src/Frame.php
Frame.get_margin_height
public function get_margin_height() { $style = $this->_style; return (float)$style->length_in_pt(array( $style->height, $style->margin_top, $style->margin_bottom, $style->border_top_width, $style->border_bottom_width, $style->p...
php
public function get_margin_height() { $style = $this->_style; return (float)$style->length_in_pt(array( $style->height, $style->margin_top, $style->margin_bottom, $style->border_top_width, $style->border_bottom_width, $style->p...
[ "public", "function", "get_margin_height", "(", ")", "{", "$", "style", "=", "$", "this", "->", "_style", ";", "return", "(", "float", ")", "$", "style", "->", "length_in_pt", "(", "array", "(", "$", "style", "->", "height", ",", "$", "style", "->", ...
Return the height of the margin box of the frame, in pt. Meaningless unless the height has been calculated properly. @return float
[ "Return", "the", "height", "of", "the", "margin", "box", "of", "the", "frame", "in", "pt", ".", "Meaningless", "unless", "the", "height", "has", "been", "calculated", "properly", "." ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/Frame.php#L474-L487
train
Return the height of the margin box
[ 30522, 2270, 3853, 2131, 1035, 7785, 1035, 4578, 1006, 1007, 1063, 1002, 2806, 1027, 1002, 2023, 1011, 1028, 1035, 2806, 1025, 2709, 1006, 14257, 1007, 1002, 2806, 1011, 1028, 3091, 1035, 1999, 1035, 13866, 1006, 9140, 1006, 1002, 2806, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/Monolog/Processor/ClassNameProcessor.php
ClassNameProcessor.getLoggingClassName
private function getLoggingClassName() { $backtrace = $this->getBacktrace(); $name = Plugin::getPluginNameFromBacktrace($backtrace); // if we can't determine the plugin, use the name of the calling class if ($name == false) { $name = $this->getClassNameThatIsLogging($ba...
php
private function getLoggingClassName() { $backtrace = $this->getBacktrace(); $name = Plugin::getPluginNameFromBacktrace($backtrace); // if we can't determine the plugin, use the name of the calling class if ($name == false) { $name = $this->getClassNameThatIsLogging($ba...
[ "private", "function", "getLoggingClassName", "(", ")", "{", "$", "backtrace", "=", "$", "this", "->", "getBacktrace", "(", ")", ";", "$", "name", "=", "Plugin", "::", "getPluginNameFromBacktrace", "(", "$", "backtrace", ")", ";", "// if we can't determine the p...
Returns the name of the plugin/class that triggered the log. @return string
[ "Returns", "the", "name", "of", "the", "plugin", "/", "class", "that", "triggered", "the", "log", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Monolog/Processor/ClassNameProcessor.php#L38-L50
train
Get the name of the class that is logging
[ 30522, 2797, 3853, 2131, 21197, 4726, 26266, 18442, 1006, 1007, 1063, 1002, 2067, 6494, 3401, 1027, 1002, 2023, 1011, 1028, 2131, 5963, 6494, 3401, 1006, 1007, 1025, 1002, 2171, 1027, 13354, 2378, 1024, 1024, 2131, 24759, 15916, 23111, 1407...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
z-song/laravel-admin
src/Show/Field.php
Field.file
public function file($server = '', $download = true) { $field = $this; return $this->unescape()->as(function ($path) use ($server, $download, $field) { $name = basename($path); $field->border = false; $size = $url = ''; if (url()->isValidUrl($path)...
php
public function file($server = '', $download = true) { $field = $this; return $this->unescape()->as(function ($path) use ($server, $download, $field) { $name = basename($path); $field->border = false; $size = $url = ''; if (url()->isValidUrl($path)...
[ "public", "function", "file", "(", "$", "server", "=", "''", ",", "$", "download", "=", "true", ")", "{", "$", "field", "=", "$", "this", ";", "return", "$", "this", "->", "unescape", "(", ")", "->", "as", "(", "function", "(", "$", "path", ")", ...
Show field as a file. @param string $server @param bool $download @return Field
[ "Show", "field", "as", "a", "file", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Show/Field.php#L246-L290
train
Returns the HTML for the file field
[ 30522, 2270, 3853, 5371, 1006, 1002, 8241, 1027, 1005, 1005, 1010, 1002, 8816, 1027, 2995, 1007, 1063, 1002, 2492, 1027, 1002, 2023, 1025, 2709, 1002, 2023, 1011, 1028, 16655, 15782, 5051, 1006, 1007, 1011, 1028, 2004, 1006, 3853, 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...
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.havingBetween
public function havingBetween($column, array $values, $boolean = 'and', $not = false) { $type = 'between'; $this->havings[] = compact('type', 'column', 'values', 'boolean', 'not'); $this->addBinding($this->cleanBindings($values), 'having'); return $this; }
php
public function havingBetween($column, array $values, $boolean = 'and', $not = false) { $type = 'between'; $this->havings[] = compact('type', 'column', 'values', 'boolean', 'not'); $this->addBinding($this->cleanBindings($values), 'having'); return $this; }
[ "public", "function", "havingBetween", "(", "$", "column", ",", "array", "$", "values", ",", "$", "boolean", "=", "'and'", ",", "$", "not", "=", "false", ")", "{", "$", "type", "=", "'between'", ";", "$", "this", "->", "havings", "[", "]", "=", "co...
Add a "having between " clause to the query. @param string $column @param array $values @param string $boolean @param bool $not @return \Illuminate\Database\Query\Builder|static
[ "Add", "a", "having", "between", "clause", "to", "the", "query", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L1750-L1759
train
Adds a having between clause to the query.
[ 30522, 2270, 3853, 2383, 20915, 28394, 2078, 1006, 1002, 5930, 1010, 9140, 1002, 5300, 1010, 1002, 22017, 20898, 1027, 1005, 1998, 1005, 1010, 1002, 2025, 1027, 6270, 1007, 1063, 1002, 2828, 1027, 1005, 2090, 1005, 1025, 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...
symfony/symfony
src/Symfony/Component/Routing/Route.php
Route.getRequirement
public function getRequirement($key) { return isset($this->requirements[$key]) ? $this->requirements[$key] : null; }
php
public function getRequirement($key) { return isset($this->requirements[$key]) ? $this->requirements[$key] : null; }
[ "public", "function", "getRequirement", "(", "$", "key", ")", "{", "return", "isset", "(", "$", "this", "->", "requirements", "[", "$", "key", "]", ")", "?", "$", "this", "->", "requirements", "[", "$", "key", "]", ":", "null", ";", "}" ]
Returns the requirement for the given key. @param string $key The key @return string|null The regex or null when not given
[ "Returns", "the", "requirement", "for", "the", "given", "key", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Routing/Route.php#L479-L482
train
Get a requirement
[ 30522, 2270, 3853, 2131, 2890, 15549, 28578, 4765, 1006, 1002, 3145, 1007, 1063, 2709, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 5918, 1031, 1002, 3145, 1033, 1007, 1029, 1002, 2023, 1011, 1028, 5918, 1031, 1002, 3145, 1033, 1024, 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...
symfony/symfony
src/Symfony/Component/Console/Helper/FormatterHelper.php
FormatterHelper.truncate
public function truncate($message, $length, $suffix = '...') { $computedLength = $length - $this->strlen($suffix); if ($computedLength > $this->strlen($message)) { return $message; } if (false === $encoding = mb_detect_encoding($message, null, true)) { retur...
php
public function truncate($message, $length, $suffix = '...') { $computedLength = $length - $this->strlen($suffix); if ($computedLength > $this->strlen($message)) { return $message; } if (false === $encoding = mb_detect_encoding($message, null, true)) { retur...
[ "public", "function", "truncate", "(", "$", "message", ",", "$", "length", ",", "$", "suffix", "=", "'...'", ")", "{", "$", "computedLength", "=", "$", "length", "-", "$", "this", "->", "strlen", "(", "$", "suffix", ")", ";", "if", "(", "$", "compu...
Truncates a message to the given length. @param string $message @param int $length @param string $suffix @return string
[ "Truncates", "a", "message", "to", "the", "given", "length", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Console/Helper/FormatterHelper.php#L84-L97
train
Truncates a message to a specified length with a suffix
[ 30522, 2270, 3853, 19817, 4609, 16280, 1006, 1002, 4471, 1010, 1002, 3091, 1010, 1002, 16809, 1027, 1005, 1012, 1012, 1012, 1005, 1007, 1063, 1002, 24806, 7770, 13512, 2232, 1027, 1002, 3091, 1011, 1002, 2023, 1011, 1028, 2358, 20927, 2078,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Mail/Protocol/Imap.php
Zend_Mail_Protocol_Imap.search
public function search(array $params) { $response = $this->requestAndResponse('SEARCH', $params); if (!$response) { return $response; } foreach ($response as $ids) { if ($ids[0] == 'SEARCH') { array_shift($ids); return $ids; ...
php
public function search(array $params) { $response = $this->requestAndResponse('SEARCH', $params); if (!$response) { return $response; } foreach ($response as $ids) { if ($ids[0] == 'SEARCH') { array_shift($ids); return $ids; ...
[ "public", "function", "search", "(", "array", "$", "params", ")", "{", "$", "response", "=", "$", "this", "->", "requestAndResponse", "(", "'SEARCH'", ",", "$", "params", ")", ";", "if", "(", "!", "$", "response", ")", "{", "return", "$", "response", ...
do a search request This method is currently marked as internal as the API might change and is not safe if you don't take precautions. @internal @return array message ids
[ "do", "a", "search", "request" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail/Protocol/Imap.php#L822-L836
train
Search for a record
[ 30522, 2270, 3853, 3945, 1006, 9140, 1002, 11498, 5244, 1007, 1063, 1002, 3433, 1027, 1002, 2023, 1011, 1028, 5227, 5685, 6072, 26029, 3366, 1006, 1005, 3945, 1005, 1010, 1002, 11498, 5244, 1007, 1025, 2065, 1006, 999, 1002, 3433, 1007, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/API/DataTableManipulator.php
DataTableManipulator.loadSubtable
protected function loadSubtable($dataTable, $row) { if (!($this->apiModule && $this->apiMethod && count($this->request))) { return null; } $request = $this->request; $idSubTable = $row->getIdSubDataTable(); if ($idSubTable === null) { return null; ...
php
protected function loadSubtable($dataTable, $row) { if (!($this->apiModule && $this->apiMethod && count($this->request))) { return null; } $request = $this->request; $idSubTable = $row->getIdSubDataTable(); if ($idSubTable === null) { return null; ...
[ "protected", "function", "loadSubtable", "(", "$", "dataTable", ",", "$", "row", ")", "{", "if", "(", "!", "(", "$", "this", "->", "apiModule", "&&", "$", "this", "->", "apiMethod", "&&", "count", "(", "$", "this", "->", "request", ")", ")", ")", "...
Load the subtable for a row. Returns null if none is found. @param DataTable $dataTable @param Row $row @return DataTable
[ "Load", "the", "subtable", "for", "a", "row", ".", "Returns", "null", "if", "none", "is", "found", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/API/DataTableManipulator.php#L103-L128
train
Load Subtable and return the result
[ 30522, 5123, 3853, 15665, 12083, 10880, 1006, 1002, 2951, 10880, 1010, 1002, 5216, 1007, 1063, 2065, 1006, 999, 1006, 1002, 2023, 1011, 1028, 17928, 5302, 8566, 2571, 1004, 1004, 1002, 2023, 1011, 1028, 17928, 11368, 6806, 2094, 1004, 1004,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/HttpKernel/HttpCache/Store.php
Store.restoreResponse
private function restoreResponse($headers, $body = null) { $status = $headers['X-Status'][0]; unset($headers['X-Status']); if (null !== $body) { $headers['X-Body-File'] = [$body]; } return new Response($body, $status, $headers); }
php
private function restoreResponse($headers, $body = null) { $status = $headers['X-Status'][0]; unset($headers['X-Status']); if (null !== $body) { $headers['X-Body-File'] = [$body]; } return new Response($body, $status, $headers); }
[ "private", "function", "restoreResponse", "(", "$", "headers", ",", "$", "body", "=", "null", ")", "{", "$", "status", "=", "$", "headers", "[", "'X-Status'", "]", "[", "0", "]", ";", "unset", "(", "$", "headers", "[", "'X-Status'", "]", ")", ";", ...
Restores a Response from the HTTP headers and body. @param array $headers An array of HTTP headers for the Response @param string $body The Response body @return Response
[ "Restores", "a", "Response", "from", "the", "HTTP", "headers", "and", "body", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpKernel/HttpCache/Store.php#L478-L488
train
Restore Response from headers and body
[ 30522, 2797, 3853, 9239, 6072, 26029, 3366, 1006, 1002, 20346, 2015, 1010, 1002, 2303, 1027, 19701, 1007, 1063, 1002, 3570, 1027, 1002, 20346, 2015, 1031, 1005, 1060, 1011, 3570, 1005, 1033, 1031, 1014, 1033, 1025, 4895, 13462, 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...
dompdf/dompdf
src/Dompdf.php
Dompdf.write_log
private function write_log() { $log_output_file = $this->getOptions()->getLogOutputFile(); if (!$log_output_file || !is_writable($log_output_file)) { return; } $frames = Frame::$ID_COUNTER; $memory = memory_get_peak_usage(true) / 1024; $time = (microtime(...
php
private function write_log() { $log_output_file = $this->getOptions()->getLogOutputFile(); if (!$log_output_file || !is_writable($log_output_file)) { return; } $frames = Frame::$ID_COUNTER; $memory = memory_get_peak_usage(true) / 1024; $time = (microtime(...
[ "private", "function", "write_log", "(", ")", "{", "$", "log_output_file", "=", "$", "this", "->", "getOptions", "(", ")", "->", "getLogOutputFile", "(", ")", ";", "if", "(", "!", "$", "log_output_file", "||", "!", "is_writable", "(", "$", "log_output_file...
Writes the output buffer in the log file @return void
[ "Writes", "the", "output", "buffer", "in", "the", "log", "file" ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/Dompdf.php#L890-L913
train
Write the log to the log file
[ 30522, 2797, 3853, 4339, 1035, 8833, 1006, 1007, 1063, 1002, 8833, 1035, 6434, 1035, 5371, 1027, 1002, 2023, 1011, 1028, 2131, 7361, 9285, 1006, 1007, 1011, 1028, 2131, 21197, 5833, 18780, 8873, 2571, 1006, 1007, 1025, 2065, 1006, 999, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Data/Validation.php
Validation.typeTime
public static function typeTime($value, array $params, array $field) { if (!isset($params['format'])) { $params['format'] = 'H:i'; } return self::typeDatetime($value, $params, $field); }
php
public static function typeTime($value, array $params, array $field) { if (!isset($params['format'])) { $params['format'] = 'H:i'; } return self::typeDatetime($value, $params, $field); }
[ "public", "static", "function", "typeTime", "(", "$", "value", ",", "array", "$", "params", ",", "array", "$", "field", ")", "{", "if", "(", "!", "isset", "(", "$", "params", "[", "'format'", "]", ")", ")", "{", "$", "params", "[", "'format'", "]",...
HTML5 input: time @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", ":", "time" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Data/Validation.php#L502-L509
train
TypeDatetime or DateTime
[ 30522, 2270, 10763, 3853, 2828, 7292, 1006, 1002, 3643, 1010, 9140, 1002, 11498, 5244, 1010, 9140, 1002, 2492, 1007, 1063, 2065, 1006, 999, 26354, 3388, 1006, 1002, 11498, 5244, 1031, 1005, 4289, 1005, 1033, 1007, 1007, 1063, 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...
laravel/framework
src/Illuminate/Database/Query/Grammars/PostgresGrammar.php
PostgresGrammar.compileUpdateFrom
protected function compileUpdateFrom(Builder $query) { if (! isset($query->joins)) { return ''; } // When using Postgres, updates with joins list the joined tables in the from // clause, which is different than other systems like MySQL. Here, we will // compile o...
php
protected function compileUpdateFrom(Builder $query) { if (! isset($query->joins)) { return ''; } // When using Postgres, updates with joins list the joined tables in the from // clause, which is different than other systems like MySQL. Here, we will // compile o...
[ "protected", "function", "compileUpdateFrom", "(", "Builder", "$", "query", ")", "{", "if", "(", "!", "isset", "(", "$", "query", "->", "joins", ")", ")", "{", "return", "''", ";", "}", "// When using Postgres, updates with joins list the joined tables in the from",...
Compile the "from" clause for an update with a join. @param \Illuminate\Database\Query\Builder $query @return string|null
[ "Compile", "the", "from", "clause", "for", "an", "update", "with", "a", "join", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Grammars/PostgresGrammar.php#L285-L301
train
Compiles the from clause for update queries
[ 30522, 5123, 3853, 4012, 22090, 6279, 13701, 19699, 5358, 1006, 12508, 1002, 23032, 1007, 1063, 2065, 1006, 999, 26354, 3388, 1006, 1002, 23032, 1011, 1028, 9794, 1007, 1007, 1063, 2709, 1005, 1005, 1025, 1065, 1013, 1013, 2043, 2478, 2695,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/HttpKernel/UriSigner.php
UriSigner.sign
public function sign($uri) { $url = parse_url($uri); if (isset($url['query'])) { parse_str($url['query'], $params); } else { $params = []; } $uri = $this->buildUrl($url, $params); $params[$this->parameter] = $this->computeHash($uri); ...
php
public function sign($uri) { $url = parse_url($uri); if (isset($url['query'])) { parse_str($url['query'], $params); } else { $params = []; } $uri = $this->buildUrl($url, $params); $params[$this->parameter] = $this->computeHash($uri); ...
[ "public", "function", "sign", "(", "$", "uri", ")", "{", "$", "url", "=", "parse_url", "(", "$", "uri", ")", ";", "if", "(", "isset", "(", "$", "url", "[", "'query'", "]", ")", ")", "{", "parse_str", "(", "$", "url", "[", "'query'", "]", ",", ...
Signs a URI. The given URI is signed by adding the query string parameter which value depends on the URI and the secret. @param string $uri A URI to sign @return string The signed URI
[ "Signs", "a", "URI", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpKernel/UriSigner.php#L44-L57
train
Signs a URI and returns the signed URL.
[ 30522, 2270, 3853, 3696, 1006, 1002, 24471, 2072, 1007, 1063, 1002, 24471, 2140, 1027, 11968, 3366, 1035, 24471, 2140, 1006, 1002, 24471, 2072, 1007, 1025, 2065, 1006, 26354, 3388, 1006, 1002, 24471, 2140, 1031, 1005, 23032, 1005, 1033, 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...
overtrue/wechat
src/OfficialAccount/Broadcasting/Client.php
Client.previewImage
public function previewImage(string $mediaId, $reception, $method = self::PREVIEW_BY_OPENID) { return $this->previewMessage(new Image($mediaId), $reception, $method); }
php
public function previewImage(string $mediaId, $reception, $method = self::PREVIEW_BY_OPENID) { return $this->previewMessage(new Image($mediaId), $reception, $method); }
[ "public", "function", "previewImage", "(", "string", "$", "mediaId", ",", "$", "reception", ",", "$", "method", "=", "self", "::", "PREVIEW_BY_OPENID", ")", "{", "return", "$", "this", "->", "previewMessage", "(", "new", "Image", "(", "$", "mediaId", ")", ...
Preview a image message. @param mixed $mediaId message @param string $reception @param string $method @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string @throws \EasyWeChat\Kernel\Exceptions\RuntimeException @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigExce...
[ "Preview", "a", "image", "message", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/Broadcasting/Client.php#L282-L285
train
Preview image message
[ 30522, 2270, 3853, 19236, 9581, 3351, 1006, 5164, 1002, 2865, 3593, 1010, 1002, 7684, 1010, 1002, 4118, 1027, 2969, 1024, 1024, 19236, 1035, 2011, 1035, 2330, 3593, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 19236, 7834, 3736, 3351, 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/Settings/Plugin/SystemSetting.php
SystemSetting.isWritableByCurrentUser
public function isWritableByCurrentUser() { if ($this->hasConfigValue()) { return false; } if (isset($this->hasWritePermission)) { return $this->hasWritePermission; } // performance improvement, do not detect this in __construct otherwise likely rath...
php
public function isWritableByCurrentUser() { if ($this->hasConfigValue()) { return false; } if (isset($this->hasWritePermission)) { return $this->hasWritePermission; } // performance improvement, do not detect this in __construct otherwise likely rath...
[ "public", "function", "isWritableByCurrentUser", "(", ")", "{", "if", "(", "$", "this", "->", "hasConfigValue", "(", ")", ")", "{", "return", "false", ";", "}", "if", "(", "isset", "(", "$", "this", "->", "hasWritePermission", ")", ")", "{", "return", ...
Returns `true` if this setting is writable for the current user, `false` if otherwise. In case it returns writable for the current user it will be visible in the Plugin settings UI. @return bool
[ "Returns", "true", "if", "this", "setting", "is", "writable", "for", "the", "current", "user", "false", "if", "otherwise", ".", "In", "case", "it", "returns", "writable", "for", "the", "current", "user", "it", "will", "be", "visible", "in", "the", "Plugin"...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Settings/Plugin/SystemSetting.php#L50-L64
train
Returns true if the user has write permission for this user.
[ 30522, 2270, 3853, 2003, 13088, 6590, 3468, 3762, 10841, 14343, 3372, 20330, 1006, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 2038, 8663, 8873, 2290, 10175, 5657, 1006, 1007, 1007, 1063, 2709, 6270, 1025, 1065, 2065, 1006, 26354, 3388,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Table/Abstract.php
Zend_Db_Table_Abstract._fetch
protected function _fetch(Zend_Db_Table_Select $select) { $stmt = $this->_db->query($select); $data = $stmt->fetchAll(Zend_Db::FETCH_ASSOC); return $data; }
php
protected function _fetch(Zend_Db_Table_Select $select) { $stmt = $this->_db->query($select); $data = $stmt->fetchAll(Zend_Db::FETCH_ASSOC); return $data; }
[ "protected", "function", "_fetch", "(", "Zend_Db_Table_Select", "$", "select", ")", "{", "$", "stmt", "=", "$", "this", "->", "_db", "->", "query", "(", "$", "select", ")", ";", "$", "data", "=", "$", "stmt", "->", "fetchAll", "(", "Zend_Db", "::", "...
Support method for fetching rows. @param Zend_Db_Table_Select $select query options. @return array An array containing the row results in FETCH_ASSOC mode.
[ "Support", "method", "for", "fetching", "rows", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Table/Abstract.php#L1527-L1532
train
Fetch all records from the database
[ 30522, 5123, 3853, 1035, 18584, 1006, 16729, 2094, 1035, 16962, 1035, 2795, 1035, 7276, 1002, 7276, 1007, 1063, 1002, 2358, 20492, 1027, 1002, 2023, 1011, 1028, 1035, 16962, 1011, 1028, 23032, 1006, 1002, 7276, 1007, 1025, 1002, 2951, 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/cms/classes/Router.php
Router.loadUrlMap
protected function loadUrlMap() { $key = $this->getCacheKey('page-url-map'); $cacheable = Config::get('cms.enableRoutesCache'); if ($cacheable) { $cached = Cache::get($key, false); } else { $cached = false; } if (!$cached || ($unseria...
php
protected function loadUrlMap() { $key = $this->getCacheKey('page-url-map'); $cacheable = Config::get('cms.enableRoutesCache'); if ($cacheable) { $cached = Cache::get($key, false); } else { $cached = false; } if (!$cached || ($unseria...
[ "protected", "function", "loadUrlMap", "(", ")", "{", "$", "key", "=", "$", "this", "->", "getCacheKey", "(", "'page-url-map'", ")", ";", "$", "cacheable", "=", "Config", "::", "get", "(", "'cms.enableRoutesCache'", ")", ";", "if", "(", "$", "cacheable", ...
Loads the URL map - a list of page file names and corresponding URL patterns. The URL map can is cached. The clearUrlMap() method resets the cache. By default the map is updated every time when a page is saved in the back-end, or when the interval defined with the cms.urlCacheTtl expires. @return boolean Returns true i...
[ "Loads", "the", "URL", "map", "-", "a", "list", "of", "page", "file", "names", "and", "corresponding", "URL", "patterns", ".", "The", "URL", "map", "can", "is", "cached", ".", "The", "clearUrlMap", "()", "method", "resets", "the", "cache", ".", "By", "...
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/classes/Router.php#L226-L262
train
Load the url map
[ 30522, 5123, 3853, 7170, 3126, 19145, 2361, 1006, 1007, 1063, 1002, 3145, 1027, 1002, 2023, 1011, 1028, 2131, 3540, 5403, 14839, 1006, 1005, 3931, 1011, 24471, 2140, 1011, 4949, 1005, 1007, 1025, 1002, 17053, 3085, 1027, 9530, 8873, 2290, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Columns/Country.php
Country.getHost
private function getHost($ipStr) { $ip = IP::fromStringIP($ipStr); $host = $ip->getHostname(); $host = ($host === null ? $ipStr : $host); return trim(strtolower($host)); }
php
private function getHost($ipStr) { $ip = IP::fromStringIP($ipStr); $host = $ip->getHostname(); $host = ($host === null ? $ipStr : $host); return trim(strtolower($host)); }
[ "private", "function", "getHost", "(", "$", "ipStr", ")", "{", "$", "ip", "=", "IP", "::", "fromStringIP", "(", "$", "ipStr", ")", ";", "$", "host", "=", "$", "ip", "->", "getHostname", "(", ")", ";", "$", "host", "=", "(", "$", "host", "===", ...
Returns the hostname given the IP address string @param string $ipStr IP Address @return string hostname (or human-readable IP address)
[ "Returns", "the", "hostname", "given", "the", "IP", "address", "string" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/UserCountry/Columns/Country.php#L139-L147
train
Get host name
[ 30522, 2797, 3853, 2131, 15006, 2102, 1006, 1002, 12997, 3367, 2099, 1007, 1063, 1002, 12997, 1027, 12997, 1024, 1024, 2013, 3367, 4892, 11514, 1006, 1002, 12997, 3367, 2099, 1007, 1025, 1002, 3677, 1027, 1002, 12997, 1011, 1028, 2131, 1500...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/traits/FormModelWidget.php
FormModelWidget.resolveModelAttribute
public function resolveModelAttribute($attribute) { try { return $this->formField->resolveModelAttribute($this->model, $attribute); } catch (Exception $ex) { throw new ApplicationException(Lang::get('backend::lang.model.missing_relation', [ 'class' => ...
php
public function resolveModelAttribute($attribute) { try { return $this->formField->resolveModelAttribute($this->model, $attribute); } catch (Exception $ex) { throw new ApplicationException(Lang::get('backend::lang.model.missing_relation', [ 'class' => ...
[ "public", "function", "resolveModelAttribute", "(", "$", "attribute", ")", "{", "try", "{", "return", "$", "this", "->", "formField", "->", "resolveModelAttribute", "(", "$", "this", "->", "model", ",", "$", "attribute", ")", ";", "}", "catch", "(", "Excep...
Returns the final model and attribute name of a nested HTML array attribute. Eg: list($model, $attribute) = $this->resolveModelAttribute($this->valueFrom); @param string $attribute. @return array
[ "Returns", "the", "final", "model", "and", "attribute", "name", "of", "a", "nested", "HTML", "array", "attribute", ".", "Eg", ":", "list", "(", "$model", "$attribute", ")", "=", "$this", "-", ">", "resolveModelAttribute", "(", "$this", "-", ">", "valueFrom...
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/traits/FormModelWidget.php#L26-L37
train
Resolve model attribute
[ 30522, 2270, 3853, 10663, 5302, 9247, 19321, 3089, 8569, 2618, 1006, 1002, 17961, 1007, 1063, 3046, 1063, 2709, 1002, 2023, 1011, 1028, 2433, 3790, 1011, 1028, 10663, 5302, 9247, 19321, 3089, 8569, 2618, 1006, 1002, 2023, 1011, 1028, 2944, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/API/Request.php
Request.process
public function process() { // read the format requested for the output data $outputFormat = strtolower(Common::getRequestVar('format', 'xml', 'string', $this->request)); $disablePostProcessing = $this->shouldDisablePostProcessing(); // create the response $response = new R...
php
public function process() { // read the format requested for the output data $outputFormat = strtolower(Common::getRequestVar('format', 'xml', 'string', $this->request)); $disablePostProcessing = $this->shouldDisablePostProcessing(); // create the response $response = new R...
[ "public", "function", "process", "(", ")", "{", "// read the format requested for the output data", "$", "outputFormat", "=", "strtolower", "(", "Common", "::", "getRequestVar", "(", "'format'", ",", "'xml'", ",", "'string'", ",", "$", "this", "->", "request", ")"...
Dispatches the API request to the appropriate API method and returns the result after post-processing. Post-processing includes: - flattening if **flat** is 0 - running generic filters unless **disable_generic_filters** is set to 1 - URL decoding label column values - running queued filters unless **disable_queued_fi...
[ "Dispatches", "the", "API", "request", "to", "the", "appropriate", "API", "method", "and", "returns", "the", "result", "after", "post", "-", "processing", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/API/Request.php#L216-L289
train
Process the request and return the response
[ 30522, 2270, 3853, 2832, 1006, 1007, 1063, 1013, 1013, 3191, 1996, 4289, 7303, 2005, 1996, 6434, 2951, 1002, 6434, 14192, 4017, 1027, 2358, 5339, 12898, 13777, 1006, 2691, 1024, 1024, 2131, 2890, 15500, 10755, 1006, 1005, 4289, 1005, 1010, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Finder/Gitignore.php
Gitignore.toRegex
public static function toRegex(string $gitignoreFileContent): string { $gitignoreFileContent = preg_replace('/^[^\\\\]*#.*/', '', $gitignoreFileContent); $gitignoreLines = preg_split('/\r\n|\r|\n/', $gitignoreFileContent); $gitignoreLines = array_map('trim', $gitignoreLines); $gitign...
php
public static function toRegex(string $gitignoreFileContent): string { $gitignoreFileContent = preg_replace('/^[^\\\\]*#.*/', '', $gitignoreFileContent); $gitignoreLines = preg_split('/\r\n|\r|\n/', $gitignoreFileContent); $gitignoreLines = array_map('trim', $gitignoreLines); $gitign...
[ "public", "static", "function", "toRegex", "(", "string", "$", "gitignoreFileContent", ")", ":", "string", "{", "$", "gitignoreFileContent", "=", "preg_replace", "(", "'/^[^\\\\\\\\]*#.*/'", ",", "''", ",", "$", "gitignoreFileContent", ")", ";", "$", "gitignoreLin...
Returns a regexp which is the equivalent of the gitignore pattern. @param string $gitignoreFileContent @return string The regexp
[ "Returns", "a", "regexp", "which", "is", "the", "equivalent", "of", "the", "gitignore", "pattern", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Finder/Gitignore.php#L28-L58
train
Converts gitignore lines to regular expression
[ 30522, 2270, 10763, 3853, 9538, 3351, 2595, 1006, 5164, 1002, 21025, 30524, 1008, 1001, 1012, 1008, 1013, 1005, 1010, 1005, 1005, 1010, 1002, 21025, 3775, 26745, 2890, 8873, 2571, 8663, 6528, 2102, 1007, 1025, 1002, 21025, 3775, 26745, 1657...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Process/Process.php
Process.setTty
public function setTty($tty) { if ('\\' === \DIRECTORY_SEPARATOR && $tty) { throw new RuntimeException('TTY mode is not supported on Windows platform.'); } if ($tty && !self::isTtySupported()) { throw new RuntimeException('TTY mode requires /dev/tty to be read/writab...
php
public function setTty($tty) { if ('\\' === \DIRECTORY_SEPARATOR && $tty) { throw new RuntimeException('TTY mode is not supported on Windows platform.'); } if ($tty && !self::isTtySupported()) { throw new RuntimeException('TTY mode requires /dev/tty to be read/writab...
[ "public", "function", "setTty", "(", "$", "tty", ")", "{", "if", "(", "'\\\\'", "===", "\\", "DIRECTORY_SEPARATOR", "&&", "$", "tty", ")", "{", "throw", "new", "RuntimeException", "(", "'TTY mode is not supported on Windows platform.'", ")", ";", "}", "if", "(...
Enables or disables the TTY mode. @param bool $tty True to enabled and false to disable @return self The current Process instance @throws RuntimeException In case the TTY mode is not supported
[ "Enables", "or", "disables", "the", "TTY", "mode", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Process/Process.php#L1055-L1068
train
Set tty mode
[ 30522, 2270, 3853, 2275, 15353, 1006, 1002, 23746, 2100, 1007, 1063, 2065, 1006, 1005, 1032, 1032, 1005, 1027, 1027, 1027, 1032, 14176, 1035, 19802, 25879, 2953, 1004, 1004, 1002, 23746, 2100, 1007, 1063, 5466, 2047, 2448, 7292, 10288, 2442...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
z-song/laravel-admin
src/Show/Tools.php
Tools.getResource
public function getResource() { if (is_null($this->resource)) { $this->resource = $this->panel->getParent()->getResourcePath(); } return $this->resource; }
php
public function getResource() { if (is_null($this->resource)) { $this->resource = $this->panel->getParent()->getResourcePath(); } return $this->resource; }
[ "public", "function", "getResource", "(", ")", "{", "if", "(", "is_null", "(", "$", "this", "->", "resource", ")", ")", "{", "$", "this", "->", "resource", "=", "$", "this", "->", "panel", "->", "getParent", "(", ")", "->", "getResourcePath", "(", ")...
Get resource path. @return string
[ "Get", "resource", "path", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Show/Tools.php#L91-L98
train
Get resource path
[ 30522, 2270, 3853, 2131, 6072, 8162, 3401, 1006, 1007, 1063, 2065, 1006, 2003, 1035, 19701, 1006, 1002, 2023, 1011, 1028, 7692, 1007, 1007, 1063, 1002, 2023, 1011, 1028, 7692, 1027, 1002, 2023, 1011, 1028, 5997, 1011, 1028, 2131, 19362, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php
ResponseCacheStrategy.add
public function add(Response $response) { ++$this->embeddedResponses; foreach (self::$overrideDirectives as $directive) { if ($response->headers->hasCacheControlDirective($directive)) { $this->flagDirectives[$directive] = true; } } foreach (s...
php
public function add(Response $response) { ++$this->embeddedResponses; foreach (self::$overrideDirectives as $directive) { if ($response->headers->hasCacheControlDirective($directive)) { $this->flagDirectives[$directive] = true; } } foreach (s...
[ "public", "function", "add", "(", "Response", "$", "response", ")", "{", "++", "$", "this", "->", "embeddedResponses", ";", "foreach", "(", "self", "::", "$", "overrideDirectives", "as", "$", "directive", ")", "{", "if", "(", "$", "response", "->", "head...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php#L59-L90
train
Add a response to the cache
[ 30522, 2270, 3853, 5587, 1006, 3433, 1002, 3433, 1007, 1063, 1009, 1009, 1002, 2023, 1011, 1028, 11157, 6072, 26029, 8583, 1025, 18921, 6776, 1006, 2969, 1024, 1024, 1002, 2058, 15637, 4305, 2890, 15277, 2015, 2004, 1002, 16449, 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...
getgrav/grav
system/src/Grav/Common/Twig/TwigExtension.php
TwigExtension.xssFunc
public function xssFunc($data) { if (!\is_array($data)) { return Security::detectXss($data); } $results = Security::detectXssFromArray($data); $results_parts = array_map(function($value, $key) { return $key.': \''.$value . '\''; }, array_values($resul...
php
public function xssFunc($data) { if (!\is_array($data)) { return Security::detectXss($data); } $results = Security::detectXssFromArray($data); $results_parts = array_map(function($value, $key) { return $key.': \''.$value . '\''; }, array_values($resul...
[ "public", "function", "xssFunc", "(", "$", "data", ")", "{", "if", "(", "!", "\\", "is_array", "(", "$", "data", ")", ")", "{", "return", "Security", "::", "detectXss", "(", "$", "data", ")", ";", "}", "$", "results", "=", "Security", "::", "detect...
Allow quick check of a string for XSS Vulnerabilities @param string|array $data @return bool|string|array
[ "Allow", "quick", "check", "of", "a", "string", "for", "XSS", "Vulnerabilities" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Twig/TwigExtension.php#L585-L597
train
Return the XSS string
[ 30522, 2270, 3853, 1060, 4757, 11263, 12273, 1006, 1002, 2951, 1007, 1063, 2065, 1006, 30524, 1063, 2709, 3036, 1024, 1024, 11487, 2595, 4757, 1006, 1002, 2951, 1007, 1025, 1065, 1002, 3463, 1027, 3036, 1024, 1024, 11487, 2595, 4757, 19699,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Mail/PendingMail.php
PendingMail.send
public function send(MailableContract $mailable) { if ($mailable instanceof ShouldQueue) { return $this->queue($mailable); } return $this->mailer->send($this->fill($mailable)); }
php
public function send(MailableContract $mailable) { if ($mailable instanceof ShouldQueue) { return $this->queue($mailable); } return $this->mailer->send($this->fill($mailable)); }
[ "public", "function", "send", "(", "MailableContract", "$", "mailable", ")", "{", "if", "(", "$", "mailable", "instanceof", "ShouldQueue", ")", "{", "return", "$", "this", "->", "queue", "(", "$", "mailable", ")", ";", "}", "return", "$", "this", "->", ...
Send a new mailable message instance. @param \Illuminate\Contracts\Mail\Mailable $mailable @return mixed
[ "Send", "a", "new", "mailable", "message", "instance", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Mail/PendingMail.php#L121-L128
train
Sends the given mailable to the mailer.
[ 30522, 2270, 3853, 4604, 1006, 5653, 3085, 8663, 6494, 6593, 1002, 5653, 3085, 1007, 1063, 2065, 1006, 1002, 5653, 3085, 6013, 11253, 2323, 4226, 5657, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 24240, 1006, 1002, 5653, 3085, 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/HttpFoundation/Session/Storage/NativeSessionStorage.php
NativeSessionStorage.regenerate
public function regenerate($destroy = false, $lifetime = null) { // Cannot regenerate the session ID for non-active sessions. if (\PHP_SESSION_ACTIVE !== session_status()) { return false; } if (headers_sent()) { return false; } if (null !== $...
php
public function regenerate($destroy = false, $lifetime = null) { // Cannot regenerate the session ID for non-active sessions. if (\PHP_SESSION_ACTIVE !== session_status()) { return false; } if (headers_sent()) { return false; } if (null !== $...
[ "public", "function", "regenerate", "(", "$", "destroy", "=", "false", ",", "$", "lifetime", "=", "null", ")", "{", "// Cannot regenerate the session ID for non-active sessions.", "if", "(", "\\", "PHP_SESSION_ACTIVE", "!==", "session_status", "(", ")", ")", "{", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php#L200-L233
train
Regenerate the session ID
[ 30522, 2270, 3853, 19723, 24454, 3686, 1006, 1002, 6033, 1027, 6270, 1010, 1002, 6480, 1027, 19701, 1007, 1063, 1013, 1013, 3685, 19723, 24454, 3686, 1996, 5219, 8909, 2005, 2512, 1011, 3161, 6521, 1012, 2065, 30524, 19701, 999, 1027, 1027,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
z-song/laravel-admin
src/Grid.php
Grid.option
public function option($key, $value = null) { if (is_null($value)) { return $this->options[$key]; } $this->options[$key] = $value; return $this; }
php
public function option($key, $value = null) { if (is_null($value)) { return $this->options[$key]; } $this->options[$key] = $value; return $this; }
[ "public", "function", "option", "(", "$", "key", ",", "$", "value", "=", "null", ")", "{", "if", "(", "is_null", "(", "$", "value", ")", ")", "{", "return", "$", "this", "->", "options", "[", "$", "key", "]", ";", "}", "$", "this", "->", "optio...
Get or set option for grid. @param string $key @param mixed $value @return $this|mixed
[ "Get", "or", "set", "option", "for", "grid", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Grid.php#L267-L276
train
Option for the current language
[ 30522, 2270, 3853, 5724, 1006, 1002, 3145, 1010, 1002, 3643, 1027, 19701, 1007, 1063, 2065, 1006, 2003, 1035, 19701, 1006, 1002, 3643, 1007, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 7047, 1031, 1002, 3145, 1033, 1025, 1065, 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...
symfony/symfony
src/Symfony/Component/Translation/Dumper/IniFileDumper.php
IniFileDumper.formatCatalogue
public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = []) { $output = ''; foreach ($messages->all($domain) as $source => $target) { $escapeTarget = str_replace('"', '\"', $target); $output .= $source.'="'.$escapeTarget."\"\n"; } ...
php
public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = []) { $output = ''; foreach ($messages->all($domain) as $source => $target) { $escapeTarget = str_replace('"', '\"', $target); $output .= $source.'="'.$escapeTarget."\"\n"; } ...
[ "public", "function", "formatCatalogue", "(", "MessageCatalogue", "$", "messages", ",", "$", "domain", ",", "array", "$", "options", "=", "[", "]", ")", "{", "$", "output", "=", "''", ";", "foreach", "(", "$", "messages", "->", "all", "(", "$", "domain...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Translation/Dumper/IniFileDumper.php#L26-L36
train
Format the catalogue
[ 30522, 2270, 3853, 4289, 11266, 23067, 9077, 1006, 4471, 11266, 23067, 9077, 1002, 7696, 1010, 1002, 5884, 1010, 9140, 1002, 7047, 1027, 1031, 1033, 1007, 1063, 1002, 6434, 1027, 1005, 1005, 1025, 18921, 6776, 1006, 1002, 7696, 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...
slimphp/Slim
Slim/App.php
App.handlePhpError
protected function handlePhpError(Throwable $e, ServerRequestInterface $request, ResponseInterface $response) { $handler = 'phpErrorHandler'; $params = [$request, $response, $e]; if ($this->container->has($handler)) { $callable = $this->container->get($handler); // C...
php
protected function handlePhpError(Throwable $e, ServerRequestInterface $request, ResponseInterface $response) { $handler = 'phpErrorHandler'; $params = [$request, $response, $e]; if ($this->container->has($handler)) { $callable = $this->container->get($handler); // C...
[ "protected", "function", "handlePhpError", "(", "Throwable", "$", "e", ",", "ServerRequestInterface", "$", "request", ",", "ResponseInterface", "$", "response", ")", "{", "$", "handler", "=", "'phpErrorHandler'", ";", "$", "params", "=", "[", "$", "request", "...
Call relevant handler from the Container if needed. If it doesn't exist, then just re-throw. @param Throwable $e @param ServerRequestInterface $request @param ResponseInterface $response @return ResponseInterface @throws Throwable
[ "Call", "relevant", "handler", "from", "the", "Container", "if", "needed", ".", "If", "it", "doesn", "t", "exist", "then", "just", "re", "-", "throw", "." ]
ccef5f7d8bcd469d59cbe64f6210d83764f91543
https://github.com/slimphp/Slim/blob/ccef5f7d8bcd469d59cbe64f6210d83764f91543/Slim/App.php#L720-L733
train
Handle PHP errors
[ 30522, 5123, 3853, 5047, 8458, 4842, 29165, 1006, 5466, 3085, 1002, 1041, 1010, 8241, 2890, 15500, 18447, 2121, 12172, 1002, 5227, 1010, 3433, 18447, 2121, 12172, 1002, 3433, 1007, 1063, 1002, 28213, 1027, 1005, 25718, 2121, 29165, 11774, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Utils.php
Utils.sortArrayByKey
public static function sortArrayByKey($array, $array_key, $direction = SORT_DESC, $sort_flags = SORT_REGULAR) { $output = []; if (!is_array($array) || !$array) { return $output; } foreach ($array as $key => $row) { $output[$key] = $row[$array_key]; }...
php
public static function sortArrayByKey($array, $array_key, $direction = SORT_DESC, $sort_flags = SORT_REGULAR) { $output = []; if (!is_array($array) || !$array) { return $output; } foreach ($array as $key => $row) { $output[$key] = $row[$array_key]; }...
[ "public", "static", "function", "sortArrayByKey", "(", "$", "array", ",", "$", "array_key", ",", "$", "direction", "=", "SORT_DESC", ",", "$", "sort_flags", "=", "SORT_REGULAR", ")", "{", "$", "output", "=", "[", "]", ";", "if", "(", "!", "is_array", "...
Sort an array by a key value in the array @param mixed $array @param string|int $array_key @param int $direction @param int $sort_flags @return array
[ "Sort", "an", "array", "by", "a", "key", "value", "in", "the", "array" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Utils.php#L1272-L1287
train
Sort array by key
[ 30522, 2270, 10763, 3853, 4066, 2906, 9447, 3762, 14839, 1006, 1002, 9140, 1010, 1002, 9140, 1035, 3145, 1010, 1002, 3257, 1027, 4066, 1035, 4078, 2278, 1010, 1002, 4066, 1035, 9245, 1027, 4066, 1035, 3180, 1007, 1063, 1002, 6434, 1027, 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/Profiler.php
Profiler.aggregateXhprofRuns
public static function aggregateXhprofRuns($runIds, $profilerNamespace, $saveToRunId) { $xhprofRuns = new XHProfRuns_Default(); $aggregatedData = array(); foreach ($runIds as $runId) { $xhprofRunData = $xhprofRuns->get_run($runId, $profilerNamespace, $description); ...
php
public static function aggregateXhprofRuns($runIds, $profilerNamespace, $saveToRunId) { $xhprofRuns = new XHProfRuns_Default(); $aggregatedData = array(); foreach ($runIds as $runId) { $xhprofRunData = $xhprofRuns->get_run($runId, $profilerNamespace, $description); ...
[ "public", "static", "function", "aggregateXhprofRuns", "(", "$", "runIds", ",", "$", "profilerNamespace", ",", "$", "saveToRunId", ")", "{", "$", "xhprofRuns", "=", "new", "XHProfRuns_Default", "(", ")", ";", "$", "aggregatedData", "=", "array", "(", ")", ";...
Aggregates xhprof runs w/o normalizing (xhprof_aggregate_runs will always average data which does not fit Piwik's use case).
[ "Aggregates", "xhprof", "runs", "w", "/", "o", "normalizing", "(", "xhprof_aggregate_runs", "will", "always", "average", "data", "which", "does", "not", "fit", "Piwik", "s", "use", "case", ")", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Profiler.php#L311-L339
train
Aggregate XHProf run metrics to the main run metrics
[ 30522, 2270, 10763, 3853, 9572, 2595, 22269, 3217, 19699, 4609, 2015, 1006, 1002, 2448, 9821, 1010, 1002, 6337, 12789, 7834, 15327, 1010, 1002, 3828, 4263, 19496, 2094, 1007, 1063, 1002, 1060, 22269, 3217, 19699, 4609, 2015, 1027, 2047, 106...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Payment/Sandbox/Client.php
Client.getKey
public function getKey(): string { if ($cache = $this->getCache()->get($this->getCacheKey())) { return $cache; } $response = $this->request('sandboxnew/pay/getsignkey'); if ('SUCCESS' === $response['return_code']) { $this->getCache()->set($this->getCacheKey(...
php
public function getKey(): string { if ($cache = $this->getCache()->get($this->getCacheKey())) { return $cache; } $response = $this->request('sandboxnew/pay/getsignkey'); if ('SUCCESS' === $response['return_code']) { $this->getCache()->set($this->getCacheKey(...
[ "public", "function", "getKey", "(", ")", ":", "string", "{", "if", "(", "$", "cache", "=", "$", "this", "->", "getCache", "(", ")", "->", "get", "(", "$", "this", "->", "getCacheKey", "(", ")", ")", ")", "{", "return", "$", "cache", ";", "}", ...
@return string @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException @throws \EasyWeChat\Payment\Kernel\Exceptions\SandboxException @throws \Psr\SimpleCache\InvalidArgumentException @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException
[ "@return", "string" ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Payment/Sandbox/Client.php#L35-L50
train
Get the sign key
[ 30522, 2270, 3853, 2131, 14839, 1006, 1007, 1024, 5164, 1063, 2065, 1006, 1002, 17053, 1027, 1002, 2023, 1011, 1028, 2131, 3540, 5403, 1006, 1007, 1011, 1028, 2131, 1006, 1002, 2023, 1011, 1028, 2131, 3540, 5403, 14839, 1006, 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
core/Development.php
Development.formatMethodCall
public static function formatMethodCall($classOrObject, $method) { if (is_object($classOrObject)) { $classOrObject = get_class($classOrObject); } return $classOrObject . '::' . $method . '()'; }
php
public static function formatMethodCall($classOrObject, $method) { if (is_object($classOrObject)) { $classOrObject = get_class($classOrObject); } return $classOrObject . '::' . $method . '()'; }
[ "public", "static", "function", "formatMethodCall", "(", "$", "classOrObject", ",", "$", "method", ")", "{", "if", "(", "is_object", "(", "$", "classOrObject", ")", ")", "{", "$", "classOrObject", "=", "get_class", "(", "$", "classOrObject", ")", ";", "}",...
Formats a method call depending on the given class/object and method name. It does not perform any checks whether does actually exists. @param string|object $classOrObject @param string $method @return string Formatted method call. Example: "MyNamespace\MyClassname::methodName()"
[ "Formats", "a", "method", "call", "depending", "on", "the", "given", "class", "/", "object", "and", "method", "name", ".", "It", "does", "not", "perform", "any", "checks", "whether", "does", "actually", "exists", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Development.php#L69-L76
train
Format a method call to a class or object
[ 30522, 2270, 10763, 3853, 4289, 11368, 6806, 16409, 8095, 1006, 1002, 2465, 14604, 2497, 20614, 1010, 1002, 4118, 1007, 1063, 2065, 1006, 2003, 1035, 4874, 1006, 1002, 2465, 14604, 2497, 20614, 1007, 1007, 1063, 1002, 2465, 14604, 2497, 206...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Command/ContainerDebugCommand.php
ContainerDebugCommand.validateInput
protected function validateInput(InputInterface $input) { $options = ['tags', 'tag', 'parameters', 'parameter']; $optionsCount = 0; foreach ($options as $option) { if ($input->getOption($option)) { ++$optionsCount; } } $name = $input-...
php
protected function validateInput(InputInterface $input) { $options = ['tags', 'tag', 'parameters', 'parameter']; $optionsCount = 0; foreach ($options as $option) { if ($input->getOption($option)) { ++$optionsCount; } } $name = $input-...
[ "protected", "function", "validateInput", "(", "InputInterface", "$", "input", ")", "{", "$", "options", "=", "[", "'tags'", ",", "'tag'", ",", "'parameters'", ",", "'parameter'", "]", ";", "$", "optionsCount", "=", "0", ";", "foreach", "(", "$", "options"...
Validates input arguments and options. @throws \InvalidArgumentException
[ "Validates", "input", "arguments", "and", "options", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php#L189-L206
train
Validate input for the language
[ 30522, 5123, 3853, 9398, 3686, 2378, 18780, 1006, 7953, 18447, 2121, 12172, 1002, 7953, 1007, 1063, 1002, 7047, 1027, 1031, 1005, 22073, 1005, 1010, 1005, 6415, 1005, 1010, 1005, 11709, 1005, 1010, 1005, 16381, 1005, 1033, 1025, 1002, 7047,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dompdf/dompdf
lib/Cpdf.php
Cpdf.newPage
function newPage($insert = 0, $id = 0, $pos = 'after') { // if there is a state saved, then go up the stack closing them // then on the new page, re-open them with the right setings if ($this->nStateStack) { for ($i = $this->nStateStack; $i >= 1; $i--) { $this->r...
php
function newPage($insert = 0, $id = 0, $pos = 'after') { // if there is a state saved, then go up the stack closing them // then on the new page, re-open them with the right setings if ($this->nStateStack) { for ($i = $this->nStateStack; $i >= 1; $i--) { $this->r...
[ "function", "newPage", "(", "$", "insert", "=", "0", ",", "$", "id", "=", "0", ",", "$", "pos", "=", "'after'", ")", "{", "// if there is a state saved, then go up the stack closing them", "// then on the new page, re-open them with the right setings", "if", "(", "$", ...
add a new page to the document this also makes the new page the current active object @param int $insert @param int $id @param string $pos @return int
[ "add", "a", "new", "page", "to", "the", "document", "this", "also", "makes", "the", "new", "page", "the", "current", "active", "object" ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/lib/Cpdf.php#L3823-L3869
train
newPage - new page - save the state stack and put the new page on the right setings
[ 30522, 3853, 2047, 13704, 1006, 1002, 19274, 1027, 1014, 1010, 1002, 8909, 1027, 1014, 1010, 1002, 13433, 2015, 1027, 1005, 2044, 1005, 1007, 1063, 1013, 1013, 2065, 2045, 2003, 1037, 2110, 5552, 1010, 2059, 2175, 2039, 1996, 9991, 5494, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/HTML/QuickForm2/Container.php
HTML_QuickForm2_Container.getElementById
public function getElementById($id) { foreach ($this->getRecursiveIterator() as $element) { if ($id == $element->getId()) { return $element; } } return null; }
php
public function getElementById($id) { foreach ($this->getRecursiveIterator() as $element) { if ($id == $element->getId()) { return $element; } } return null; }
[ "public", "function", "getElementById", "(", "$", "id", ")", "{", "foreach", "(", "$", "this", "->", "getRecursiveIterator", "(", ")", "as", "$", "element", ")", "{", "if", "(", "$", "id", "==", "$", "element", "->", "getId", "(", ")", ")", "{", "r...
Returns an element if its id is found @param string Element id to find @return HTML_QuickForm2_Node|null
[ "Returns", "an", "element", "if", "its", "id", "is", "found" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Container.php#L263-L271
train
Get an element by its id
[ 30522, 2270, 3853, 2131, 12260, 3672, 3762, 3593, 1006, 1002, 8909, 1007, 1063, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 2131, 2890, 10841, 2869, 3512, 21646, 8844, 1006, 1007, 2004, 1002, 5783, 1007, 1063, 2065, 1006, 1002, 8909, 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/Controller.php
Controller.verifyForceSecure
protected function verifyForceSecure() { if (Request::secure() || Request::ajax()) { return true; } // @todo if year >= 2018 change default from false to null $forceSecure = Config::get('cms.backendForceSecure', false); if ($forceSecure === null) { $f...
php
protected function verifyForceSecure() { if (Request::secure() || Request::ajax()) { return true; } // @todo if year >= 2018 change default from false to null $forceSecure = Config::get('cms.backendForceSecure', false); if ($forceSecure === null) { $f...
[ "protected", "function", "verifyForceSecure", "(", ")", "{", "if", "(", "Request", "::", "secure", "(", ")", "||", "Request", "::", "ajax", "(", ")", ")", "{", "return", "true", ";", "}", "// @todo if year >= 2018 change default from false to null", "$", "forceS...
Checks if the back-end should force a secure protocol (HTTPS) enabled by config. @return bool
[ "Checks", "if", "the", "back", "-", "end", "should", "force", "a", "secure", "protocol", "(", "HTTPS", ")", "enabled", "by", "config", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/classes/Controller.php#L749-L762
train
Verify force secure
[ 30522, 5123, 3853, 20410, 14821, 3366, 23887, 1006, 1007, 1063, 2065, 1006, 5227, 1024, 1024, 5851, 1006, 1007, 1064, 1064, 5227, 1024, 1024, 18176, 1006, 1007, 1007, 1063, 2709, 2995, 1025, 1065, 1013, 1013, 1030, 28681, 2080, 2065, 2095, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Container/Container.php
Container.resolveDependencies
protected function resolveDependencies(array $dependencies) { $results = []; foreach ($dependencies as $dependency) { // If this dependency has a override for this particular build we will use // that instead as the value. Otherwise, we will continue with this run ...
php
protected function resolveDependencies(array $dependencies) { $results = []; foreach ($dependencies as $dependency) { // If this dependency has a override for this particular build we will use // that instead as the value. Otherwise, we will continue with this run ...
[ "protected", "function", "resolveDependencies", "(", "array", "$", "dependencies", ")", "{", "$", "results", "=", "[", "]", ";", "foreach", "(", "$", "dependencies", "as", "$", "dependency", ")", "{", "// If this dependency has a override for this particular build we ...
Resolve all of the dependencies from the ReflectionParameters. @param array $dependencies @return array @throws \Illuminate\Contracts\Container\BindingResolutionException
[ "Resolve", "all", "of", "the", "dependencies", "from", "the", "ReflectionParameters", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Container/Container.php#L834-L857
train
Resolves the dependencies
[ 30522, 5123, 3853, 10395, 13699, 10497, 15266, 1006, 9140, 1002, 12530, 15266, 1007, 1063, 1002, 3463, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1002, 12530, 15266, 2004, 1002, 24394, 1007, 1063, 1013, 1013, 2065, 2023, 24394, 2038, 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...
z-song/laravel-admin
src/Grid/Column.php
Column.setRelation
public function setRelation($relation, $relationColumn = null) { $this->relation = $relation; $this->relationColumn = $relationColumn; return $this; }
php
public function setRelation($relation, $relationColumn = null) { $this->relation = $relation; $this->relationColumn = $relationColumn; return $this; }
[ "public", "function", "setRelation", "(", "$", "relation", ",", "$", "relationColumn", "=", "null", ")", "{", "$", "this", "->", "relation", "=", "$", "relation", ";", "$", "this", "->", "relationColumn", "=", "$", "relationColumn", ";", "return", "$", "...
Set relation. @param string $relation @param string $relationColumn @return $this
[ "Set", "relation", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Grid/Column.php#L269-L275
train
Set relation column
[ 30522, 2270, 3853, 2275, 16570, 3370, 1006, 1002, 7189, 1010, 1002, 7189, 25778, 2819, 2078, 1027, 19701, 1007, 1063, 1002, 2023, 1011, 1028, 7189, 1027, 1002, 7189, 1025, 1002, 2023, 1011, 1028, 7189, 25778, 2819, 2078, 1027, 1002, 7189, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Loader/ChainLoader.php
ChainLoader.isFresh
public function isFresh(TemplateReferenceInterface $template, $time) { foreach ($this->loaders as $loader) { return $loader->isFresh($template, $time); } return false; }
php
public function isFresh(TemplateReferenceInterface $template, $time) { foreach ($this->loaders as $loader) { return $loader->isFresh($template, $time); } return false; }
[ "public", "function", "isFresh", "(", "TemplateReferenceInterface", "$", "template", ",", "$", "time", ")", "{", "foreach", "(", "$", "this", "->", "loaders", "as", "$", "loader", ")", "{", "return", "$", "loader", "->", "isFresh", "(", "$", "template", ...
Returns true if the template is still fresh. @param TemplateReferenceInterface $template A template @param int $time The last modification time of the cached template (timestamp) @return bool
[ "Returns", "true", "if", "the", "template", "is", "still", "fresh", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Templating/Loader/ChainLoader.php#L68-L75
train
Returns true if the template is fresh.
[ 30522, 2270, 3853, 2003, 19699, 9953, 1006, 23561, 2890, 25523, 18447, 2121, 12172, 1002, 23561, 1010, 1002, 2051, 1007, 1063, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 7170, 2545, 2004, 1002, 7170, 2121, 1007, 1063, 2709, 1002, 7170, 2121...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Console/Input/InputDefinition.php
InputDefinition.getArgument
public function getArgument($name) { if (!$this->hasArgument($name)) { throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name)); } $arguments = \is_int($name) ? array_values($this->arguments) : $this->arguments; return $arguments[$name]; ...
php
public function getArgument($name) { if (!$this->hasArgument($name)) { throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name)); } $arguments = \is_int($name) ? array_values($this->arguments) : $this->arguments; return $arguments[$name]; ...
[ "public", "function", "getArgument", "(", "$", "name", ")", "{", "if", "(", "!", "$", "this", "->", "hasArgument", "(", "$", "name", ")", ")", "{", "throw", "new", "InvalidArgumentException", "(", "sprintf", "(", "'The \"%s\" argument does not exist.'", ",", ...
Returns an InputArgument by name or by position. @param string|int $name The InputArgument name or position @return InputArgument An InputArgument object @throws InvalidArgumentException When argument given doesn't exist
[ "Returns", "an", "InputArgument", "by", "name", "or", "by", "position", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Console/Input/InputDefinition.php#L132-L141
train
Get the value of an argument
[ 30522, 2270, 3853, 2131, 2906, 22850, 4765, 1006, 1002, 2171, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 2038, 2906, 22850, 4765, 1006, 1002, 2171, 1007, 1007, 1063, 5466, 2047, 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/Queue/Console/ForgetFailedCommand.php
ForgetFailedCommand.handle
public function handle() { if ($this->laravel['queue.failer']->forget($this->argument('id'))) { $this->info('Failed job deleted successfully!'); } else { $this->error('No failed job matches the given ID.'); } }
php
public function handle() { if ($this->laravel['queue.failer']->forget($this->argument('id'))) { $this->info('Failed job deleted successfully!'); } else { $this->error('No failed job matches the given ID.'); } }
[ "public", "function", "handle", "(", ")", "{", "if", "(", "$", "this", "->", "laravel", "[", "'queue.failer'", "]", "->", "forget", "(", "$", "this", "->", "argument", "(", "'id'", ")", ")", ")", "{", "$", "this", "->", "info", "(", "'Failed job dele...
Execute the console command. @return void
[ "Execute", "the", "console", "command", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Queue/Console/ForgetFailedCommand.php#L28-L35
train
Handle the failed job deletion
[ 30522, 2270, 3853, 5047, 1006, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 13679, 15985, 1031, 1005, 24240, 1012, 8246, 2121, 1005, 1033, 1011, 1028, 5293, 1006, 1002, 2023, 1011, 1028, 6685, 1006, 1005, 8909, 1005, 1007, 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...
symfony/symfony
src/Symfony/Component/Console/Helper/QuestionHelper.php
QuestionHelper.autocomplete
private function autocomplete(OutputInterface $output, Question $question, $inputStream, callable $autocomplete): string { $ret = ''; $i = 0; $ofs = -1; $matches = $autocomplete($ret); $numMatches = \count($matches); $sttyMode = shell_exec('stty -g'); // Di...
php
private function autocomplete(OutputInterface $output, Question $question, $inputStream, callable $autocomplete): string { $ret = ''; $i = 0; $ofs = -1; $matches = $autocomplete($ret); $numMatches = \count($matches); $sttyMode = shell_exec('stty -g'); // Di...
[ "private", "function", "autocomplete", "(", "OutputInterface", "$", "output", ",", "Question", "$", "question", ",", "$", "inputStream", ",", "callable", "$", "autocomplete", ")", ":", "string", "{", "$", "ret", "=", "''", ";", "$", "i", "=", "0", ";", ...
Autocompletes a question. @param resource $inputStream
[ "Autocompletes", "a", "question", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Console/Helper/QuestionHelper.php#L199-L320
train
Autocomplete the question using the input stream and the question s default value.
[ 30522, 2797, 3853, 8285, 9006, 10814, 2618, 1006, 6434, 18447, 2121, 12172, 1002, 6434, 1010, 3160, 1002, 3160, 1010, 1002, 20407, 25379, 1010, 2655, 3085, 1002, 8285, 9006, 10814, 2618, 1007, 1024, 5164, 1063, 1002, 2128, 2102, 1027, 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...
symfony/symfony
src/Symfony/Component/Translation/Reader/TranslationReader.php
TranslationReader.read
public function read($directory, MessageCatalogue $catalogue) { if (!is_dir($directory)) { return; } foreach ($this->loaders as $format => $loader) { // load any existing translation files $finder = new Finder(); $extension = $catalogue->getLo...
php
public function read($directory, MessageCatalogue $catalogue) { if (!is_dir($directory)) { return; } foreach ($this->loaders as $format => $loader) { // load any existing translation files $finder = new Finder(); $extension = $catalogue->getLo...
[ "public", "function", "read", "(", "$", "directory", ",", "MessageCatalogue", "$", "catalogue", ")", "{", "if", "(", "!", "is_dir", "(", "$", "directory", ")", ")", "{", "return", ";", "}", "foreach", "(", "$", "this", "->", "loaders", "as", "$", "fo...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Translation/Reader/TranslationReader.php#L46-L62
train
Reads translation files from a directory and adds them to the MessageCatalogue
[ 30522, 2270, 3853, 3191, 1006, 1002, 14176, 1010, 4471, 11266, 23067, 9077, 1002, 10161, 1007, 1063, 2065, 1006, 999, 2003, 1035, 16101, 1006, 1002, 14176, 1007, 1007, 1063, 2709, 1025, 1065, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 7170,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Footer.php
Footer.disableViewCheck
public function disableViewCheck(bool $disable = true) { if ($disable) { array_delete($this->checkboxes, 'view'); } elseif (!in_array('view', $this->checkboxes)) { array_push($this->checkboxes, 'view'); } return $this; }
php
public function disableViewCheck(bool $disable = true) { if ($disable) { array_delete($this->checkboxes, 'view'); } elseif (!in_array('view', $this->checkboxes)) { array_push($this->checkboxes, 'view'); } return $this; }
[ "public", "function", "disableViewCheck", "(", "bool", "$", "disable", "=", "true", ")", "{", "if", "(", "$", "disable", ")", "{", "array_delete", "(", "$", "this", "->", "checkboxes", ",", "'view'", ")", ";", "}", "elseif", "(", "!", "in_array", "(", ...
Disable View Checkbox. @return $this
[ "Disable", "View", "Checkbox", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Form/Footer.php#L85-L94
train
Disable view check
[ 30522, 2270, 3853, 4487, 19150, 8584, 5403, 3600, 1006, 22017, 2140, 1002, 4487, 19150, 1027, 2995, 1007, 1063, 2065, 1006, 1002, 4487, 19150, 1007, 1063, 9140, 1035, 3972, 12870, 1006, 1002, 2023, 1011, 1028, 4638, 8758, 2229, 1010, 1005, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Tracker/Request.php
Request.isTimestampValid
protected function isTimestampValid($time, $now = null) { if (empty($now)) { $now = $this->getCurrentTimestamp(); } return $time <= $now && $time > $now - 20 * 365 * 86400; }
php
protected function isTimestampValid($time, $now = null) { if (empty($now)) { $now = $this->getCurrentTimestamp(); } return $time <= $now && $time > $now - 20 * 365 * 86400; }
[ "protected", "function", "isTimestampValid", "(", "$", "time", ",", "$", "now", "=", "null", ")", "{", "if", "(", "empty", "(", "$", "now", ")", ")", "{", "$", "now", "=", "$", "this", "->", "getCurrentTimestamp", "(", ")", ";", "}", "return", "$",...
Returns true if the timestamp is valid ie. timestamp is sometime in the last 10 years and is not in the future. @param $time int Timestamp to test @param $now int Current timestamp @return bool
[ "Returns", "true", "if", "the", "timestamp", "is", "valid", "ie", ".", "timestamp", "is", "sometime", "in", "the", "last", "10", "years", "and", "is", "not", "in", "the", "future", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Tracker/Request.php#L515-L523
train
Check if a timestamp is valid
[ 30522, 5123, 3853, 21541, 14428, 9153, 8737, 10175, 3593, 1006, 1002, 2051, 1010, 1002, 2085, 1027, 19701, 1007, 1063, 2065, 1006, 4064, 1006, 1002, 2085, 1007, 1007, 1063, 1002, 2085, 1027, 1002, 2023, 1011, 1028, 2131, 10841, 14343, 3372,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/ReportRenderer/Pdf.php
Pdf.paintReportTableHeader
private function paintReportTableHeader() { $initPosX = 10; // Get the longest column name $longestColumnName = ''; foreach ($this->reportColumns as $columnName) { if (strlen($columnName) > strlen($longestColumnName)) { $longestColumnName = $columnName; ...
php
private function paintReportTableHeader() { $initPosX = 10; // Get the longest column name $longestColumnName = ''; foreach ($this->reportColumns as $columnName) { if (strlen($columnName) > strlen($longestColumnName)) { $longestColumnName = $columnName; ...
[ "private", "function", "paintReportTableHeader", "(", ")", "{", "$", "initPosX", "=", "10", ";", "// Get the longest column name", "$", "longestColumnName", "=", "''", ";", "foreach", "(", "$", "this", "->", "reportColumns", "as", "$", "columnName", ")", "{", ...
Draw the table header (first row)
[ "Draw", "the", "table", "header", "(", "first", "row", ")" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/ReportRenderer/Pdf.php#L462-L527
train
Paints the table header
[ 30522, 2797, 3853, 6773, 2890, 6442, 10880, 4974, 2121, 1006, 1007, 1063, 1002, 1999, 4183, 6873, 2015, 2595, 1027, 2184, 1025, 1013, 1013, 2131, 1996, 6493, 5930, 2171, 1002, 6493, 25778, 2819, 9516, 4168, 1027, 1005, 1005, 1025, 18921, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Period/Factory.php
Factory.makePeriodFromQueryParams
public static function makePeriodFromQueryParams($timezone, $period, $date) { if (empty($timezone)) { $timezone = 'UTC'; } if ($period == 'range') { self::checkPeriodIsEnabled('range'); $oPeriod = new Range('range', $date, $timezone, Date::factory('today'...
php
public static function makePeriodFromQueryParams($timezone, $period, $date) { if (empty($timezone)) { $timezone = 'UTC'; } if ($period == 'range') { self::checkPeriodIsEnabled('range'); $oPeriod = new Range('range', $date, $timezone, Date::factory('today'...
[ "public", "static", "function", "makePeriodFromQueryParams", "(", "$", "timezone", ",", "$", "period", ",", "$", "date", ")", "{", "if", "(", "empty", "(", "$", "timezone", ")", ")", "{", "$", "timezone", "=", "'UTC'", ";", "}", "if", "(", "$", "peri...
Creates a Period instance using a period, date and timezone. @param string $timezone The timezone of the date. Only used if `$date` is `'now'`, `'today'`, `'yesterday'` or `'yesterdaySameTime'`. @param string $period The period string: `"day"`, `"week"`, `"month"`, `"year"`, `"range"`. @param string $date The date or ...
[ "Creates", "a", "Period", "instance", "using", "a", "period", "date", "and", "timezone", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Period/Factory.php#L143-L164
train
MakePeriodFromQueryParams - Builds Period object from query parameters
[ 30522, 2270, 10763, 3853, 2191, 4842, 3695, 20952, 21716, 4226, 2854, 28689, 5244, 1006, 1002, 2051, 15975, 1010, 1002, 2558, 1010, 1002, 3058, 1007, 1063, 2065, 1006, 4064, 1006, 1002, 2051, 15975, 1007, 1007, 1063, 1002, 2051, 15975, 1027...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/GPM/Response.php
Response.getAuto
private static function getAuto() { if (!ini_get('open_basedir') && self::isFopenAvailable()) { return self::getFopen(func_get_args()); } if (self::isCurlAvailable()) { return self::getCurl(func_get_args()); } return null; }
php
private static function getAuto() { if (!ini_get('open_basedir') && self::isFopenAvailable()) { return self::getFopen(func_get_args()); } if (self::isCurlAvailable()) { return self::getCurl(func_get_args()); } return null; }
[ "private", "static", "function", "getAuto", "(", ")", "{", "if", "(", "!", "ini_get", "(", "'open_basedir'", ")", "&&", "self", "::", "isFopenAvailable", "(", ")", ")", "{", "return", "self", "::", "getFopen", "(", "func_get_args", "(", ")", ")", ";", ...
Automatically picks the preferred method @return string The response of the request
[ "Automatically", "picks", "the", "preferred", "method" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/GPM/Response.php#L256-L267
train
Get Auto - Open File
[ 30522, 2797, 10763, 3853, 2131, 4887, 3406, 1006, 1007, 1063, 2065, 1006, 999, 1999, 2072, 1035, 2131, 1006, 1005, 2330, 1035, 2241, 4313, 1005, 1007, 1004, 1004, 2969, 1024, 1024, 2003, 14876, 11837, 12462, 11733, 3468, 1006, 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
libs/Zend/Db/Table/Row/Abstract.php
Zend_Db_Table_Row_Abstract._prepareReference
protected function _prepareReference(Zend_Db_Table_Abstract $dependentTable, Zend_Db_Table_Abstract $parentTable, $ruleKey) { $parentTableName = (get_class($parentTable) === 'Zend_Db_Table') ? $parentTable->getDefinitionConfigName() : get_class($parentTable); $map = $dependentTable->getReference($pa...
php
protected function _prepareReference(Zend_Db_Table_Abstract $dependentTable, Zend_Db_Table_Abstract $parentTable, $ruleKey) { $parentTableName = (get_class($parentTable) === 'Zend_Db_Table') ? $parentTable->getDefinitionConfigName() : get_class($parentTable); $map = $dependentTable->getReference($pa...
[ "protected", "function", "_prepareReference", "(", "Zend_Db_Table_Abstract", "$", "dependentTable", ",", "Zend_Db_Table_Abstract", "$", "parentTable", ",", "$", "ruleKey", ")", "{", "$", "parentTableName", "=", "(", "get_class", "(", "$", "parentTable", ")", "===", ...
Prepares a table reference for lookup. Ensures all reference keys are set and properly formatted. @param Zend_Db_Table_Abstract $dependentTable @param Zend_Db_Table_Abstract $parentTable @param string $ruleKey @return array
[ "Prepares", "a", "table", "reference", "for", "lookup", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Table/Row/Abstract.php#L842-L856
train
Prepare reference map
[ 30522, 5123, 3853, 1035, 7374, 2890, 25523, 1006, 16729, 2094, 1035, 16962, 1035, 2795, 1035, 10061, 1002, 7790, 10880, 1010, 16729, 2094, 1035, 16962, 1035, 2795, 1035, 10061, 1002, 6687, 10880, 1010, 1002, 3627, 14839, 1007, 1063, 1002, 6...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Stopwatch/Section.php
Section.isEventStarted
public function isEventStarted($name) { return isset($this->events[$name]) && $this->events[$name]->isStarted(); }
php
public function isEventStarted($name) { return isset($this->events[$name]) && $this->events[$name]->isStarted(); }
[ "public", "function", "isEventStarted", "(", "$", "name", ")", "{", "return", "isset", "(", "$", "this", "->", "events", "[", "$", "name", "]", ")", "&&", "$", "this", "->", "events", "[", "$", "name", "]", "->", "isStarted", "(", ")", ";", "}" ]
Checks if the event was started. @param string $name The event name @return bool
[ "Checks", "if", "the", "event", "was", "started", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Stopwatch/Section.php#L134-L137
train
Checks if an event is started
[ 30522, 2270, 3853, 2003, 18697, 7666, 7559, 3064, 1006, 1002, 2171, 1007, 1063, 2709, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 2824, 1031, 1002, 2171, 1033, 1007, 1004, 1004, 1002, 2023, 1011, 1028, 2824, 1031, 1002, 2171, 1033, 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
plugins/Ecommerce/Columns/RevenueDiscount.php
RevenueDiscount.onEcommerceOrderConversion
public function onEcommerceOrderConversion(Request $request, Visitor $visitor, $action, GoalManager $goalManager) { return $this->roundRevenueIfNeeded($request->getParam('ec_dt')); }
php
public function onEcommerceOrderConversion(Request $request, Visitor $visitor, $action, GoalManager $goalManager) { return $this->roundRevenueIfNeeded($request->getParam('ec_dt')); }
[ "public", "function", "onEcommerceOrderConversion", "(", "Request", "$", "request", ",", "Visitor", "$", "visitor", ",", "$", "action", ",", "GoalManager", "$", "goalManager", ")", "{", "return", "$", "this", "->", "roundRevenueIfNeeded", "(", "$", "request", ...
@param Request $request @param Visitor $visitor @param Action|null $action @param GoalManager $goalManager @return mixed|false
[ "@param", "Request", "$request", "@param", "Visitor", "$visitor", "@param", "Action|null", "$action", "@param", "GoalManager", "$goalManager" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Ecommerce/Columns/RevenueDiscount.php#L32-L35
train
This method is triggered when an ecommerce order conversion is triggered.
[ 30522, 2270, 3853, 2028, 9006, 5017, 3401, 8551, 2121, 8663, 27774, 1006, 5227, 1002, 5227, 1010, 10367, 1002, 10367, 1010, 1002, 2895, 1010, 3125, 24805, 4590, 1002, 3125, 24805, 4590, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 2461, 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...
octobercms/october
modules/system/classes/MediaLibrary.php
MediaLibrary.copyFolder
public function copyFolder($originalPath, $newPath) { $disk = $this->getStorageDisk(); $copyDirectory = function ($srcPath, $destPath) use (&$copyDirectory, $disk) { $srcPath = self::validatePath($srcPath); $fullSrcPath = $this->getMediaPath($srcPath); $destPath...
php
public function copyFolder($originalPath, $newPath) { $disk = $this->getStorageDisk(); $copyDirectory = function ($srcPath, $destPath) use (&$copyDirectory, $disk) { $srcPath = self::validatePath($srcPath); $fullSrcPath = $this->getMediaPath($srcPath); $destPath...
[ "public", "function", "copyFolder", "(", "$", "originalPath", ",", "$", "newPath", ")", "{", "$", "disk", "=", "$", "this", "->", "getStorageDisk", "(", ")", ";", "$", "copyDirectory", "=", "function", "(", "$", "srcPath", ",", "$", "destPath", ")", "u...
Copies a folder. @param string $originalPath Specifies the original path of the folder. @param string $newPath Specifies the new path of the folder. @return boolean
[ "Copies", "a", "folder", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/classes/MediaLibrary.php#L352-L387
train
Copy folder to new path
[ 30522, 2270, 3853, 6100, 10371, 2121, 1006, 1002, 2434, 15069, 1010, 1002, 2047, 15069, 1007, 1063, 1002, 9785, 1027, 1002, 2023, 1011, 1028, 4152, 4263, 18655, 20573, 1006, 1007, 1025, 1002, 6100, 4305, 2890, 16761, 2100, 1027, 3853, 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...
getgrav/grav
system/src/Grav/Common/Data/Data.php
Data.file
public function file(FileInterface $storage = null) { if ($storage) { $this->storage = $storage; } return $this->storage; }
php
public function file(FileInterface $storage = null) { if ($storage) { $this->storage = $storage; } return $this->storage; }
[ "public", "function", "file", "(", "FileInterface", "$", "storage", "=", "null", ")", "{", "if", "(", "$", "storage", ")", "{", "$", "this", "->", "storage", "=", "$", "storage", ";", "}", "return", "$", "this", "->", "storage", ";", "}" ]
Set or get the data storage. @param FileInterface $storage Optionally enter a new storage. @return FileInterface
[ "Set", "or", "get", "the", "data", "storage", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Data/Data.php#L286-L293
train
Get the file
[ 30522, 2270, 3853, 5371, 1006, 5371, 18447, 2121, 12172, 1002, 5527, 1027, 19701, 1007, 1063, 2065, 1006, 1002, 5527, 1007, 1063, 1002, 2023, 1011, 1028, 5527, 1027, 1002, 5527, 1025, 1065, 2709, 1002, 2023, 1011, 1028, 5527, 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...
octobercms/october
modules/backend/traits/CollapsableWidget.php
CollapsableWidget.getCollapseStatus
protected function getCollapseStatus($group, $default = true) { $statuses = $this->getCollapseStatuses(); if (array_key_exists($group, $statuses)) { return $statuses[$group]; } return $default; }
php
protected function getCollapseStatus($group, $default = true) { $statuses = $this->getCollapseStatuses(); if (array_key_exists($group, $statuses)) { return $statuses[$group]; } return $default; }
[ "protected", "function", "getCollapseStatus", "(", "$", "group", ",", "$", "default", "=", "true", ")", "{", "$", "statuses", "=", "$", "this", "->", "getCollapseStatuses", "(", ")", ";", "if", "(", "array_key_exists", "(", "$", "group", ",", "$", "statu...
Gets a collapsed state. @param string $group @param bool $default @return bool|string
[ "Gets", "a", "collapsed", "state", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/traits/CollapsableWidget.php#L79-L88
train
Get Collapse Status
[ 30522, 5123, 3853, 2131, 26895, 9331, 8583, 29336, 2271, 1006, 1002, 2177, 1010, 1002, 12398, 1027, 2995, 1007, 1063, 1002, 3570, 2229, 1027, 1002, 2023, 1011, 1028, 2131, 26895, 9331, 8583, 29336, 25581, 1006, 1007, 1025, 2065, 1006, 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...
symfony/symfony
src/Symfony/Component/BrowserKit/CookieJar.php
CookieJar.updateFromResponse
public function updateFromResponse(Response $response, $uri = null) { $this->updateFromSetCookie($response->getHeader('Set-Cookie', false), $uri); }
php
public function updateFromResponse(Response $response, $uri = null) { $this->updateFromSetCookie($response->getHeader('Set-Cookie', false), $uri); }
[ "public", "function", "updateFromResponse", "(", "Response", "$", "response", ",", "$", "uri", "=", "null", ")", "{", "$", "this", "->", "updateFromSetCookie", "(", "$", "response", "->", "getHeader", "(", "'Set-Cookie'", ",", "false", ")", ",", "$", "uri"...
Updates the cookie jar from a Response object. @param Response $response A Response object @param string $uri The base URL
[ "Updates", "the", "cookie", "jar", "from", "a", "Response", "object", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/BrowserKit/CookieJar.php#L146-L149
train
Update the current page from a response.
[ 30522, 2270, 3853, 10651, 19699, 5358, 6072, 26029, 3366, 1006, 3433, 1002, 3433, 1010, 1002, 24471, 2072, 1027, 19701, 1007, 1063, 1002, 2023, 1011, 1028, 10651, 19699, 22225, 3388, 3597, 23212, 2063, 1006, 1002, 3433, 1011, 1028, 2131, 49...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/Referrers/API.php
API.getSocials
public function getSocials($idSite, $period, $date, $segment = false, $expanded = false, $flat = false) { Piwik::checkUserHasViewAccess($idSite); $dataTable = Archive::createDataTableFromArchive(Archiver::SOCIAL_NETWORKS_RECORD_NAME, $idSite, $period, $date, $segment, $expanded, $flat); $d...
php
public function getSocials($idSite, $period, $date, $segment = false, $expanded = false, $flat = false) { Piwik::checkUserHasViewAccess($idSite); $dataTable = Archive::createDataTableFromArchive(Archiver::SOCIAL_NETWORKS_RECORD_NAME, $idSite, $period, $date, $segment, $expanded, $flat); $d...
[ "public", "function", "getSocials", "(", "$", "idSite", ",", "$", "period", ",", "$", "date", ",", "$", "segment", "=", "false", ",", "$", "expanded", "=", "false", ",", "$", "flat", "=", "false", ")", "{", "Piwik", "::", "checkUserHasViewAccess", "(",...
Returns report comparing the number of visits (and other info) for social network referrers. This is a view of the getWebsites report. @param string $idSite @param string $period @param string $date @param string|bool $segment @param bool $expanded @param bool $flat @return DataTable
[ "Returns", "report", "comparing", "the", "number", "of", "visits", "(", "and", "other", "info", ")", "for", "social", "network", "referrers", ".", "This", "is", "a", "view", "of", "the", "getWebsites", "report", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Referrers/API.php#L362-L377
train
Get the list of social networks
[ 30522, 2270, 3853, 4152, 10085, 26340, 1006, 1002, 8909, 28032, 2063, 1010, 1002, 2558, 1010, 1002, 3058, 1010, 1002, 6903, 1027, 6270, 1010, 1002, 4423, 1027, 6270, 1010, 1002, 4257, 1027, 6270, 1007, 1063, 14255, 9148, 2243, 1024, 1024, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/API/Request.php
Request.shouldLoadExpanded
public static function shouldLoadExpanded() { // if filter_column_recursive & filter_pattern_recursive are supplied, and flat isn't supplied // we have to load all the child subtables. return Common::getRequestVar('filter_column_recursive', false) !== false && Common::getRequestV...
php
public static function shouldLoadExpanded() { // if filter_column_recursive & filter_pattern_recursive are supplied, and flat isn't supplied // we have to load all the child subtables. return Common::getRequestVar('filter_column_recursive', false) !== false && Common::getRequestV...
[ "public", "static", "function", "shouldLoadExpanded", "(", ")", "{", "// if filter_column_recursive & filter_pattern_recursive are supplied, and flat isn't supplied", "// we have to load all the child subtables.", "return", "Common", "::", "getRequestVar", "(", "'filter_column_recursive'...
Returns whether the DataTable result will have to be expanded for the current request before rendering. @return bool @ignore
[ "Returns", "whether", "the", "DataTable", "result", "will", "have", "to", "be", "expanded", "for", "the", "current", "request", "before", "rendering", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/API/Request.php#L569-L576
train
Returns true if the expanded tree of subtables should be loaded.
[ 30522, 2270, 10763, 3853, 2323, 11066, 10288, 9739, 5732, 1006, 1007, 1063, 1013, 1013, 2065, 11307, 1035, 5930, 1035, 28667, 9236, 3512, 1004, 11307, 1035, 5418, 1035, 28667, 9236, 3512, 2024, 8127, 1010, 1998, 4257, 3475, 1005, 1056, 8127...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Finder/Finder.php
Finder.depth
public function depth($levels) { foreach ((array) $levels as $level) { $this->depths[] = new Comparator\NumberComparator($level); } return $this; }
php
public function depth($levels) { foreach ((array) $levels as $level) { $this->depths[] = new Comparator\NumberComparator($level); } return $this; }
[ "public", "function", "depth", "(", "$", "levels", ")", "{", "foreach", "(", "(", "array", ")", "$", "levels", "as", "$", "level", ")", "{", "$", "this", "->", "depths", "[", "]", "=", "new", "Comparator", "\\", "NumberComparator", "(", "$", "level",...
Adds tests for the directory depth. Usage: $finder->depth('> 1') // the Finder will start matching at level 1. $finder->depth('< 3') // the Finder will descend at most 3 levels of directories below the starting point. $finder->depth(['>= 1', '< 3']) @param string|int|string[]|int[] $levels The depth level expression...
[ "Adds", "tests", "for", "the", "directory", "depth", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Finder/Finder.php#L122-L129
train
Depth - based search
[ 30522, 2270, 3853, 5995, 1006, 1002, 3798, 1007, 1063, 18921, 6776, 1006, 1006, 9140, 1007, 1002, 3798, 2004, 1002, 2504, 1007, 1063, 1002, 2023, 1011, 1028, 11143, 1031, 1033, 1027, 2047, 4012, 28689, 4263, 1032, 2193, 9006, 28689, 4263, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Server/TSSLServerSocket.php
TSSLServerSocket.listen
public function listen() { $this->listener_ = @stream_socket_server( $this->host_ . ':' . $this->port_, $errno, $errstr, STREAM_SERVER_BIND | STREAM_SERVER_LISTEN, $this->context_ ); }
php
public function listen() { $this->listener_ = @stream_socket_server( $this->host_ . ':' . $this->port_, $errno, $errstr, STREAM_SERVER_BIND | STREAM_SERVER_LISTEN, $this->context_ ); }
[ "public", "function", "listen", "(", ")", "{", "$", "this", "->", "listener_", "=", "@", "stream_socket_server", "(", "$", "this", "->", "host_", ".", "':'", ".", "$", "this", "->", "port_", ",", "$", "errno", ",", "$", "errstr", ",", "STREAM_SERVER_BI...
Opens a new socket server handle @return void
[ "Opens", "a", "new", "socket", "server", "handle" ]
acdd4226c210336e9e15eb812e5932a645fcd5ce
https://github.com/apache/thrift/blob/acdd4226c210336e9e15eb812e5932a645fcd5ce/lib/php/lib/Server/TSSLServerSocket.php#L69-L78
train
Create a stream socket server
[ 30522, 2270, 3853, 4952, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 19373, 1035, 1027, 1030, 5460, 1035, 22278, 1035, 8241, 1006, 1002, 2023, 1011, 1028, 3677, 1035, 1012, 1005, 1024, 1005, 1012, 1002, 2023, 1011, 1028, 3417, 1035, 1010, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/PrivacyManager/LogDataPurger.php
LogDataPurger.getPurgeEstimate
public function getPurgeEstimate($deleteLogsOlderThan) { $result = array(); // deal w/ log tables that will be purged $maxIdVisit = $this->getDeleteIdVisitOffset($deleteLogsOlderThan); if (!empty($maxIdVisit)) { foreach (self::getDeleteTableLogTables() as $table) { ...
php
public function getPurgeEstimate($deleteLogsOlderThan) { $result = array(); // deal w/ log tables that will be purged $maxIdVisit = $this->getDeleteIdVisitOffset($deleteLogsOlderThan); if (!empty($maxIdVisit)) { foreach (self::getDeleteTableLogTables() as $table) { ...
[ "public", "function", "getPurgeEstimate", "(", "$", "deleteLogsOlderThan", ")", "{", "$", "result", "=", "array", "(", ")", ";", "// deal w/ log tables that will be purged", "$", "maxIdVisit", "=", "$", "this", "->", "getDeleteIdVisitOffset", "(", "$", "deleteLogsOl...
Returns an array describing what data would be purged if purging were invoked. This function returns an array that maps table names with the number of rows that will be deleted. @param int $deleteLogsOlderThan The number of days after which log entires are considered old. Visits and related data whose age is greater ...
[ "Returns", "an", "array", "describing", "what", "data", "would", "be", "purged", "if", "purging", "were", "invoked", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/PrivacyManager/LogDataPurger.php#L117-L136
train
Returns an estimate of the number of log tables that will be purged
[ 30522, 2270, 3853, 2131, 5311, 18372, 16643, 8585, 1006, 1002, 3972, 12870, 21197, 19454, 4063, 21604, 1007, 1063, 1002, 2765, 1027, 9140, 1006, 1007, 1025, 1013, 1013, 3066, 1059, 1013, 8833, 7251, 2008, 2097, 2022, 24694, 2094, 1002, 2151...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/SettingsServer.php
SettingsServer.isGdExtensionEnabled
public static function isGdExtensionEnabled() { static $gd = null; if (is_null($gd)) { $gd = false; $extensions = @get_loaded_extensions(); if (is_array($extensions)) { $gd = in_array('gd', $extensions) && function_exists('imageftbbox'); ...
php
public static function isGdExtensionEnabled() { static $gd = null; if (is_null($gd)) { $gd = false; $extensions = @get_loaded_extensions(); if (is_array($extensions)) { $gd = in_array('gd', $extensions) && function_exists('imageftbbox'); ...
[ "public", "static", "function", "isGdExtensionEnabled", "(", ")", "{", "static", "$", "gd", "=", "null", ";", "if", "(", "is_null", "(", "$", "gd", ")", ")", "{", "$", "gd", "=", "false", ";", "$", "extensions", "=", "@", "get_loaded_extensions", "(", ...
Returns `true` if the GD PHP extension is available, `false` if otherwise. _Note: ImageGraph and the sparkline report visualization depend on the GD extension._ @return bool @api
[ "Returns", "true", "if", "the", "GD", "PHP", "extension", "is", "available", "false", "if", "otherwise", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/SettingsServer.php#L112-L125
train
Return true if the GD extension is enabled
[ 30522, 2270, 10763, 3853, 2003, 2290, 3207, 18413, 6132, 3258, 8189, 23242, 1006, 1007, 1063, 10763, 1002, 1043, 2094, 1027, 19701, 1025, 2065, 1006, 2003, 1035, 19701, 1006, 1002, 1043, 2094, 1007, 1007, 1063, 1002, 1043, 2094, 1027, 6270,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/PluginManager.php
PluginManager.deletePlugin
public function deletePlugin($id) { /* * Rollback plugin */ UpdateManager::instance()->rollbackPlugin($id); /* * Delete from file system */ if ($pluginPath = self::instance()->getPluginPath($id)) { File::deleteDirectory($pluginPath); ...
php
public function deletePlugin($id) { /* * Rollback plugin */ UpdateManager::instance()->rollbackPlugin($id); /* * Delete from file system */ if ($pluginPath = self::instance()->getPluginPath($id)) { File::deleteDirectory($pluginPath); ...
[ "public", "function", "deletePlugin", "(", "$", "id", ")", "{", "/*\n * Rollback plugin\n */", "UpdateManager", "::", "instance", "(", ")", "->", "rollbackPlugin", "(", "$", "id", ")", ";", "/*\n * Delete from file system\n */", "if", "("...
Completely roll back and delete a plugin from the system. @param string $id Plugin code/namespace @return void
[ "Completely", "roll", "back", "and", "delete", "a", "plugin", "from", "the", "system", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/classes/PluginManager.php#L763-L776
train
Delete a plugin
[ 30522, 2270, 3853, 3972, 12870, 24759, 15916, 2378, 1006, 1002, 8909, 1007, 1063, 1013, 1008, 1008, 4897, 5963, 13354, 2378, 1008, 1013, 10651, 24805, 4590, 1024, 1024, 6013, 1006, 1007, 1011, 1028, 4897, 5963, 24759, 15916, 2378, 1006, 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...
laravel/framework
src/Illuminate/Queue/Capsule/Manager.php
Manager.push
public static function push($job, $data = '', $queue = null, $connection = null) { return static::$instance->connection($connection)->push($job, $data, $queue); }
php
public static function push($job, $data = '', $queue = null, $connection = null) { return static::$instance->connection($connection)->push($job, $data, $queue); }
[ "public", "static", "function", "push", "(", "$", "job", ",", "$", "data", "=", "''", ",", "$", "queue", "=", "null", ",", "$", "connection", "=", "null", ")", "{", "return", "static", "::", "$", "instance", "->", "connection", "(", "$", "connection"...
Push a new job onto the queue. @param string $job @param mixed $data @param string $queue @param string $connection @return mixed
[ "Push", "a", "new", "job", "onto", "the", "queue", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Queue/Capsule/Manager.php#L97-L100
train
Push a job to the queue
[ 30522, 2270, 10763, 3853, 5245, 1006, 1002, 3105, 1010, 1002, 2951, 1027, 1005, 1005, 1010, 1002, 24240, 1027, 19701, 1010, 1002, 4434, 1027, 19701, 1007, 1063, 2709, 10763, 1024, 1024, 1002, 6013, 1011, 1028, 4434, 1006, 1002, 4434, 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
libs/Zend/Db/Adapter/Pdo/Oci.php
Zend_Db_Adapter_Pdo_Oci.describeTable
public function describeTable($tableName, $schemaName = null) { $version = $this->getServerVersion(); if (($version === null) || version_compare($version, '9.0.0', '>=')) { $sql = "SELECT TC.TABLE_NAME, TC.OWNER, TC.COLUMN_NAME, TC.DATA_TYPE, TC.DATA_DEFAULT, TC.NULLA...
php
public function describeTable($tableName, $schemaName = null) { $version = $this->getServerVersion(); if (($version === null) || version_compare($version, '9.0.0', '>=')) { $sql = "SELECT TC.TABLE_NAME, TC.OWNER, TC.COLUMN_NAME, TC.DATA_TYPE, TC.DATA_DEFAULT, TC.NULLA...
[ "public", "function", "describeTable", "(", "$", "tableName", ",", "$", "schemaName", "=", "null", ")", "{", "$", "version", "=", "$", "this", "->", "getServerVersion", "(", ")", ";", "if", "(", "(", "$", "version", "===", "null", ")", "||", "version_c...
Returns the column descriptions for a table. The return value is an associative array keyed by the column name, as returned by the RDBMS. The value of each array element is an associative array with the following keys: SCHEMA_NAME => string; name of schema TABLE_NAME => string; COLUMN_NAME => string;...
[ "Returns", "the", "column", "descriptions", "for", "a", "table", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Adapter/Pdo/Oci.php#L180-L272
train
Describes a table
[ 30522, 2270, 3853, 6235, 10880, 1006, 1002, 2795, 18442, 1010, 1002, 8040, 28433, 18442, 1027, 19701, 1007, 1063, 1002, 2544, 1027, 1002, 2023, 1011, 1028, 4152, 2121, 6299, 27774, 1006, 1007, 1025, 2065, 1006, 1006, 1002, 2544, 1027, 1027,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Db/Adapter/Abstract.php
Zend_Db_Adapter_Abstract.query
public function query($sql, $bind = array()) { // connect to the database if needed $this->_connect(); // is the $sql a Zend_Db_Select object? if ($sql instanceof Zend_Db_Select) { if (empty($bind)) { $bind = $sql->getBind(); } $s...
php
public function query($sql, $bind = array()) { // connect to the database if needed $this->_connect(); // is the $sql a Zend_Db_Select object? if ($sql instanceof Zend_Db_Select) { if (empty($bind)) { $bind = $sql->getBind(); } $s...
[ "public", "function", "query", "(", "$", "sql", ",", "$", "bind", "=", "array", "(", ")", ")", "{", "// connect to the database if needed", "$", "this", "->", "_connect", "(", ")", ";", "// is the $sql a Zend_Db_Select object?", "if", "(", "$", "sql", "instanc...
Prepares and executes an SQL statement with bound data. @param mixed $sql The SQL statement with placeholders. May be a string or Zend_Db_Select. @param mixed $bind An array of data to bind to the placeholders. @return Zend_Db_Statement_Interface
[ "Prepares", "and", "executes", "an", "SQL", "statement", "with", "bound", "data", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Adapter/Abstract.php#L456-L484
train
Execute a statement with profiling
[ 30522, 2270, 3853, 23032, 1006, 1002, 29296, 1010, 1002, 14187, 1027, 9140, 1006, 1007, 1007, 1063, 1013, 1013, 7532, 2000, 1996, 7809, 2065, 2734, 1002, 2023, 1011, 1028, 1035, 7532, 1006, 1007, 1025, 1013, 1013, 2003, 1996, 1002, 29296, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Installer.php
Installer.install
public static function install($zip, $destination, $options = [], $extracted = null, $keepExtracted = false) { $destination = rtrim($destination, DS); $options = array_merge(self::$options, $options); $install_path = rtrim($destination . DS . ltrim($options['install_path'], DS), DS); ...
php
public static function install($zip, $destination, $options = [], $extracted = null, $keepExtracted = false) { $destination = rtrim($destination, DS); $options = array_merge(self::$options, $options); $install_path = rtrim($destination . DS . ltrim($options['install_path'], DS), DS); ...
[ "public", "static", "function", "install", "(", "$", "zip", ",", "$", "destination", ",", "$", "options", "=", "[", "]", ",", "$", "extracted", "=", "null", ",", "$", "keepExtracted", "=", "false", ")", "{", "$", "destination", "=", "rtrim", "(", "$"...
Installs a given package to a given destination. @param string $zip the local path to ZIP package @param string $destination The local path to the Grav Instance @param array $options Options to use for installing. ie, ['install_path' => 'user/themes/antimatter'] @param string $extracted The local path to the extac...
[ "Installs", "a", "given", "package", "to", "a", "given", "destination", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/GPM/Installer.php#L81-L164
train
Installs a Grav instance
[ 30522, 2270, 10763, 3853, 16500, 1006, 1002, 14101, 1010, 1002, 7688, 1010, 1002, 7047, 1027, 1031, 1033, 1010, 1002, 15901, 1027, 19701, 1010, 1002, 2562, 10288, 24301, 1027, 6270, 1007, 1063, 1002, 7688, 1027, 19387, 20026, 1006, 1002, 76...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Csv.php
Csv.flattenColumnArray
private function flattenColumnArray($columns, &$csvRow = array(), $csvColumnNameTemplate = '%s') { foreach ($columns as $name => $value) { $csvName = sprintf($csvColumnNameTemplate, $this->getCsvColumnName($name)); if (is_array($value)) { // if we're translating colu...
php
private function flattenColumnArray($columns, &$csvRow = array(), $csvColumnNameTemplate = '%s') { foreach ($columns as $name => $value) { $csvName = sprintf($csvColumnNameTemplate, $this->getCsvColumnName($name)); if (is_array($value)) { // if we're translating colu...
[ "private", "function", "flattenColumnArray", "(", "$", "columns", ",", "&", "$", "csvRow", "=", "array", "(", ")", ",", "$", "csvColumnNameTemplate", "=", "'%s'", ")", "{", "foreach", "(", "$", "columns", "as", "$", "name", "=>", "$", "value", ")", "{"...
Flattens an array of column values so they can be outputted as CSV (which does not support nested structures).
[ "Flattens", "an", "array", "of", "column", "values", "so", "they", "can", "be", "outputted", "as", "CSV", "(", "which", "does", "not", "support", "nested", "structures", ")", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataTable/Renderer/Csv.php#L328-L356
train
Flattens the columns array
[ 30522, 2797, 3853, 4257, 6528, 25778, 2819, 11802, 9447, 1006, 1002, 7753, 1010, 1004, 1002, 20116, 19716, 5004, 1027, 9140, 1006, 1007, 1010, 1002, 20116, 25465, 4747, 2819, 9516, 11368, 6633, 15725, 1027, 1005, 1003, 1055, 1005, 1007, 106...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/DynamoDbStore.php
DynamoDbStore.lock
public function lock($name, $seconds = 0, $owner = null) { return new DynamoDbLock($this, $this->prefix.$name, $seconds, $owner); }
php
public function lock($name, $seconds = 0, $owner = null) { return new DynamoDbLock($this, $this->prefix.$name, $seconds, $owner); }
[ "public", "function", "lock", "(", "$", "name", ",", "$", "seconds", "=", "0", ",", "$", "owner", "=", "null", ")", "{", "return", "new", "DynamoDbLock", "(", "$", "this", ",", "$", "this", "->", "prefix", ".", "$", "name", ",", "$", "seconds", "...
Get a lock instance. @param string $name @param int $seconds @param string|null $owner @return \Illuminate\Contracts\Cache\Lock
[ "Get", "a", "lock", "instance", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Cache/DynamoDbStore.php#L404-L407
train
Lock a DynamoDb object
[ 30522, 2270, 3853, 5843, 1006, 1002, 2171, 1010, 1002, 3823, 1027, 1014, 1010, 1002, 3954, 1027, 19701, 1007, 1063, 2709, 2047, 17205, 18939, 7878, 1006, 1002, 2023, 1010, 1002, 2023, 1011, 1028, 17576, 1012, 1002, 2171, 1010, 1002, 3823, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Loader/IniFileLoader.php
IniFileLoader.load
public function load($resource, $type = null) { $path = $this->locator->locate($resource); $this->container->fileExists($path); // first pass to catch parsing errors $result = parse_ini_file($path, true); if (false === $result || [] === $result) { throw new Inva...
php
public function load($resource, $type = null) { $path = $this->locator->locate($resource); $this->container->fileExists($path); // first pass to catch parsing errors $result = parse_ini_file($path, true); if (false === $result || [] === $result) { throw new Inva...
[ "public", "function", "load", "(", "$", "resource", ",", "$", "type", "=", "null", ")", "{", "$", "path", "=", "$", "this", "->", "locator", "->", "locate", "(", "$", "resource", ")", ";", "$", "this", "->", "container", "->", "fileExists", "(", "$...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/Loader/IniFileLoader.php#L27-L47
train
Loads the parameters from a ini file
[ 30522, 2270, 3853, 7170, 1006, 1002, 7692, 1010, 1002, 2828, 1027, 19701, 1007, 1063, 1002, 4130, 1027, 1002, 2023, 1011, 1028, 8840, 11266, 2953, 1011, 1028, 12453, 1006, 1002, 7692, 1007, 1025, 1002, 2023, 1011, 1028, 11661, 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...
z-song/laravel-admin
src/Grid/Filter/Where.php
Where.getQueryHash
public static function getQueryHash(\Closure $closure, $label = '') { $reflection = new \ReflectionFunction($closure); return md5($reflection->getFileName().$reflection->getStartLine().$reflection->getEndLine().$label); }
php
public static function getQueryHash(\Closure $closure, $label = '') { $reflection = new \ReflectionFunction($closure); return md5($reflection->getFileName().$reflection->getStartLine().$reflection->getEndLine().$label); }
[ "public", "static", "function", "getQueryHash", "(", "\\", "Closure", "$", "closure", ",", "$", "label", "=", "''", ")", "{", "$", "reflection", "=", "new", "\\", "ReflectionFunction", "(", "$", "closure", ")", ";", "return", "md5", "(", "$", "reflection...
Get the hash string of query closure. @param \Closure $closure @param string $label @return string
[ "Get", "the", "hash", "string", "of", "query", "closure", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Grid/Filter/Where.php#L49-L54
train
Get Query Hash
[ 30522, 2270, 10763, 3853, 2131, 4226, 2854, 14949, 2232, 1006, 1032, 8503, 1002, 8503, 1010, 1002, 3830, 1027, 1005, 1005, 1007, 1063, 1002, 9185, 1027, 2047, 1032, 9185, 11263, 27989, 1006, 1002, 8503, 1007, 1025, 2709, 9108, 2629, 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...
laravel/framework
src/Illuminate/Auth/Access/Gate.php
Gate.resolvePolicyCallback
protected function resolvePolicyCallback($user, $ability, array $arguments, $policy) { if (! is_callable([$policy, $this->formatAbilityToMethod($ability)])) { return false; } return function () use ($user, $ability, $arguments, $policy) { // This callback will be res...
php
protected function resolvePolicyCallback($user, $ability, array $arguments, $policy) { if (! is_callable([$policy, $this->formatAbilityToMethod($ability)])) { return false; } return function () use ($user, $ability, $arguments, $policy) { // This callback will be res...
[ "protected", "function", "resolvePolicyCallback", "(", "$", "user", ",", "$", "ability", ",", "array", "$", "arguments", ",", "$", "policy", ")", "{", "if", "(", "!", "is_callable", "(", "[", "$", "policy", ",", "$", "this", "->", "formatAbilityToMethod", ...
Resolve the callback for a policy check. @param \Illuminate\Contracts\Auth\Authenticatable $user @param string $ability @param array $arguments @param mixed $policy @return bool|callable
[ "Resolve", "the", "callback", "for", "a", "policy", "check", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/Access/Gate.php#L616-L641
train
Returns a callback for the given policy method.
[ 30522, 5123, 3853, 10663, 18155, 2594, 2100, 9289, 20850, 8684, 1006, 1002, 5310, 1010, 1002, 3754, 1010, 9140, 1002, 9918, 1010, 1002, 3343, 1007, 1063, 2065, 1006, 999, 2003, 1035, 2655, 3085, 1006, 1031, 1002, 3343, 1010, 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...
php-ai/php-ml
src/Classification/Ensemble/Bagging.php
Bagging.setSubsetRatio
public function setSubsetRatio(float $ratio) { if ($ratio < 0.1 || $ratio > 1.0) { throw new InvalidArgumentException('Subset ratio should be between 0.1 and 1.0'); } $this->subsetRatio = $ratio; return $this; }
php
public function setSubsetRatio(float $ratio) { if ($ratio < 0.1 || $ratio > 1.0) { throw new InvalidArgumentException('Subset ratio should be between 0.1 and 1.0'); } $this->subsetRatio = $ratio; return $this; }
[ "public", "function", "setSubsetRatio", "(", "float", "$", "ratio", ")", "{", "if", "(", "$", "ratio", "<", "0.1", "||", "$", "ratio", ">", "1.0", ")", "{", "throw", "new", "InvalidArgumentException", "(", "'Subset ratio should be between 0.1 and 1.0'", ")", "...
This method determines the ratio of samples used to create the 'bootstrap' subset, e.g., random samples drawn from the original dataset with replacement (allow repeats), to train each base classifier. @return $this @throws InvalidArgumentException
[ "This", "method", "determines", "the", "ratio", "of", "samples", "used", "to", "create", "the", "bootstrap", "subset", "e", ".", "g", ".", "random", "samples", "drawn", "from", "the", "original", "dataset", "with", "replacement", "(", "allow", "repeats", ")"...
f6aa1a59b0525b8fca3d2786d661ab3e70904016
https://github.com/php-ai/php-ml/blob/f6aa1a59b0525b8fca3d2786d661ab3e70904016/src/Classification/Ensemble/Bagging.php#L73-L82
train
Set subset ratio
[ 30522, 2270, 3853, 4520, 12083, 13462, 8609, 3695, 1006, 14257, 1002, 6463, 1007, 1063, 2065, 1006, 1002, 6463, 1026, 1014, 1012, 1015, 1064, 1064, 1002, 6463, 1028, 1015, 1012, 1014, 1007, 1063, 5466, 2047, 19528, 2906, 22850, 15781, 2595,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/controllers/Updates.php
Updates.onRemovePlugin
public function onRemovePlugin() { if ($pluginCode = post('code')) { PluginManager::instance()->deletePlugin($pluginCode); Flash::success(Lang::get('system::lang.plugins.remove_success')); } return Redirect::refresh(); }
php
public function onRemovePlugin() { if ($pluginCode = post('code')) { PluginManager::instance()->deletePlugin($pluginCode); Flash::success(Lang::get('system::lang.plugins.remove_success')); } return Redirect::refresh(); }
[ "public", "function", "onRemovePlugin", "(", ")", "{", "if", "(", "$", "pluginCode", "=", "post", "(", "'code'", ")", ")", "{", "PluginManager", "::", "instance", "(", ")", "->", "deletePlugin", "(", "$", "pluginCode", ")", ";", "Flash", "::", "success",...
Rollback and remove a single plugin from the system. @return void
[ "Rollback", "and", "remove", "a", "single", "plugin", "from", "the", "system", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/controllers/Updates.php#L745-L753
train
Remove a plugin
[ 30522, 2270, 3853, 2006, 28578, 21818, 24759, 15916, 2378, 1006, 1007, 1063, 2065, 1006, 1002, 13354, 2378, 16044, 1027, 2695, 1006, 1005, 3642, 1005, 1007, 1007, 1063, 13354, 2378, 24805, 4590, 1024, 1024, 6013, 1006, 1007, 1011, 1028, 397...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Mailer/Transport/Smtp/Stream/SocketStream.php
SocketStream.setEncryption
public function setEncryption(string $encryption): self { $encryption = strtolower($encryption); if ('tls' === $encryption) { $this->protocol = 'tcp'; $this->tls = true; } else { $this->protocol = $encryption; $this->tls = false; } ...
php
public function setEncryption(string $encryption): self { $encryption = strtolower($encryption); if ('tls' === $encryption) { $this->protocol = 'tcp'; $this->tls = true; } else { $this->protocol = $encryption; $this->tls = false; } ...
[ "public", "function", "setEncryption", "(", "string", "$", "encryption", ")", ":", "self", "{", "$", "encryption", "=", "strtolower", "(", "$", "encryption", ")", ";", "if", "(", "'tls'", "===", "$", "encryption", ")", "{", "$", "this", "->", "protocol",...
Sets the encryption type (tls or ssl).
[ "Sets", "the", "encryption", "type", "(", "tls", "or", "ssl", ")", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Mailer/Transport/Smtp/Stream/SocketStream.php#L79-L91
train
Set the encryption protocol
[ 30522, 2270, 3853, 2275, 2368, 26775, 22571, 3508, 1006, 5164, 1002, 21999, 1007, 1024, 2969, 1063, 1002, 21999, 1027, 2358, 5339, 12898, 13777, 1006, 1002, 21999, 1007, 1025, 2065, 1006, 1005, 1056, 4877, 1005, 1027, 1027, 1027, 1002, 2199...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Archive/ArchivePurger.php
ArchivePurger.purgeArchivesWithPeriodRange
public function purgeArchivesWithPeriodRange(Date $date) { $numericTable = ArchiveTableCreator::getNumericTable($date); $blobTable = ArchiveTableCreator::getBlobTable($date); $deletedCount = $this->model->deleteArchivesWithPeriod( $numericTable, $blobTable, Piwik::$idPeriods[...
php
public function purgeArchivesWithPeriodRange(Date $date) { $numericTable = ArchiveTableCreator::getNumericTable($date); $blobTable = ArchiveTableCreator::getBlobTable($date); $deletedCount = $this->model->deleteArchivesWithPeriod( $numericTable, $blobTable, Piwik::$idPeriods[...
[ "public", "function", "purgeArchivesWithPeriodRange", "(", "Date", "$", "date", ")", "{", "$", "numericTable", "=", "ArchiveTableCreator", "::", "getNumericTable", "(", "$", "date", ")", ";", "$", "blobTable", "=", "ArchiveTableCreator", "::", "getBlobTable", "(",...
Deleting "Custom Date Range" reports after 1 day, since they can be re-processed and would take up un-necessary space. @param $date Date @return int The total number of rows deleted from both the numeric & blob table.
[ "Deleting", "Custom", "Date", "Range", "reports", "after", "1", "day", "since", "they", "can", "be", "re", "-", "processed", "and", "would", "take", "up", "un", "-", "necessary", "space", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Archive/ArchivePurger.php#L252-L270
train
Purges all archives with a period range.
[ 30522, 2270, 3853, 24694, 2906, 5428, 6961, 24415, 4842, 3695, 24914, 3351, 1006, 3058, 1002, 3058, 1007, 1063, 1002, 16371, 25531, 10880, 1027, 8756, 10880, 16748, 8844, 1024, 1024, 2131, 19172, 22420, 10880, 1006, 1002, 3058, 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...
slimphp/Slim
Slim/App.php
App.respond
public function respond(ResponseInterface $response) { // Send response if (!headers_sent()) { // Headers foreach ($response->getHeaders() as $name => $values) { $first = stripos($name, 'Set-Cookie') === 0 ? false : true; foreach ($values as $v...
php
public function respond(ResponseInterface $response) { // Send response if (!headers_sent()) { // Headers foreach ($response->getHeaders() as $name => $values) { $first = stripos($name, 'Set-Cookie') === 0 ? false : true; foreach ($values as $v...
[ "public", "function", "respond", "(", "ResponseInterface", "$", "response", ")", "{", "// Send response", "if", "(", "!", "headers_sent", "(", ")", ")", "{", "// Headers", "foreach", "(", "$", "response", "->", "getHeaders", "(", ")", "as", "$", "name", "=...
Send the response to the client @param ResponseInterface $response
[ "Send", "the", "response", "to", "the", "client" ]
ccef5f7d8bcd469d59cbe64f6210d83764f91543
https://github.com/slimphp/Slim/blob/ccef5f7d8bcd469d59cbe64f6210d83764f91543/Slim/App.php#L407-L469
train
Send response to the browser
[ 30522, 2270, 3853, 6869, 1006, 3433, 18447, 2121, 12172, 1002, 3433, 1007, 1063, 1013, 1013, 4604, 3433, 2065, 1006, 999, 20346, 2015, 1035, 2741, 1006, 1007, 1007, 1063, 1013, 1013, 20346, 2015, 18921, 6776, 1006, 1002, 3433, 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/Queue/Console/ListenCommand.php
ListenCommand.setOutputHandler
protected function setOutputHandler(Listener $listener) { $listener->setOutputHandler(function ($type, $line) { $this->output->write($line); }); }
php
protected function setOutputHandler(Listener $listener) { $listener->setOutputHandler(function ($type, $line) { $this->output->write($line); }); }
[ "protected", "function", "setOutputHandler", "(", "Listener", "$", "listener", ")", "{", "$", "listener", "->", "setOutputHandler", "(", "function", "(", "$", "type", ",", "$", "line", ")", "{", "$", "this", "->", "output", "->", "write", "(", "$", "line...
Set the options on the queue listener. @param \Illuminate\Queue\Listener $listener @return void
[ "Set", "the", "options", "on", "the", "queue", "listener", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Queue/Console/ListenCommand.php#L108-L113
train
Set Output Handler
[ 30522, 5123, 3853, 2275, 5833, 18780, 11774, 3917, 1006, 19373, 1002, 19373, 1007, 1063, 1002, 19373, 1011, 1028, 2275, 5833, 18780, 11774, 3917, 1006, 3853, 1006, 1002, 2828, 1010, 1002, 2240, 1007, 1063, 1002, 2023, 1011, 1028, 6434, 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/Updates/3.0.0-b1.php
Updates_3_0_0_b1.getMigrations
public function getMigrations(Updater $updater) { $db = Db::get(); $allGoals = $db->fetchAll(sprintf("SELECT DISTINCT idgoal FROM %s", Common::prefixTable('goal'))); $allDashboards = $db->fetchAll(sprintf("SELECT * FROM %s", Common::prefixTable('user_dashboard'))); $migrations = $th...
php
public function getMigrations(Updater $updater) { $db = Db::get(); $allGoals = $db->fetchAll(sprintf("SELECT DISTINCT idgoal FROM %s", Common::prefixTable('goal'))); $allDashboards = $db->fetchAll(sprintf("SELECT * FROM %s", Common::prefixTable('user_dashboard'))); $migrations = $th...
[ "public", "function", "getMigrations", "(", "Updater", "$", "updater", ")", "{", "$", "db", "=", "Db", "::", "get", "(", ")", ";", "$", "allGoals", "=", "$", "db", "->", "fetchAll", "(", "sprintf", "(", "\"SELECT DISTINCT idgoal FROM %s\"", ",", "Common", ...
Here you can define one or multiple SQL statements that should be executed during the update. @param Updater $updater @return Migration[]
[ "Here", "you", "can", "define", "one", "or", "multiple", "SQL", "statements", "that", "should", "be", "executed", "during", "the", "update", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Updates/3.0.0-b1.php#L46-L58
train
Get all migrations for the given updater
[ 30522, 2270, 3853, 2131, 4328, 29397, 2015, 1006, 10651, 2099, 1002, 10651, 2099, 1007, 1063, 1002, 16962, 1027, 16962, 1024, 1024, 2131, 1006, 1007, 1025, 1002, 2035, 3995, 9777, 1027, 1002, 16962, 1011, 1028, 18584, 8095, 1006, 9043, 2546...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/UserId/API.php
API.getUsers
public function getUsers($idSite, $period, $date, $segment = false) { Piwik::checkUserHasViewAccess($idSite); $archive = Archive::build($idSite, $period, $date, $segment); $dataTable = $archive->getDataTable(Archiver::USERID_ARCHIVE_RECORD); $dataTable->queueFilter('ReplaceColumnNam...
php
public function getUsers($idSite, $period, $date, $segment = false) { Piwik::checkUserHasViewAccess($idSite); $archive = Archive::build($idSite, $period, $date, $segment); $dataTable = $archive->getDataTable(Archiver::USERID_ARCHIVE_RECORD); $dataTable->queueFilter('ReplaceColumnNam...
[ "public", "function", "getUsers", "(", "$", "idSite", ",", "$", "period", ",", "$", "date", ",", "$", "segment", "=", "false", ")", "{", "Piwik", "::", "checkUserHasViewAccess", "(", "$", "idSite", ")", ";", "$", "archive", "=", "Archive", "::", "build...
Get a report of all User Ids. @param int $idSite @param string $period @param int $date @param string|bool $segment @return DataTable
[ "Get", "a", "report", "of", "all", "User", "Ids", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/UserId/API.php#L35-L45
train
Get users in archive
[ 30522, 2270, 3853, 2131, 20330, 2015, 1006, 1002, 8909, 28032, 2063, 1010, 1002, 2558, 1010, 1002, 3058, 1010, 1002, 6903, 1027, 6270, 1007, 1063, 14255, 9148, 2243, 1024, 1024, 4638, 20330, 14949, 8584, 6305, 9623, 2015, 1006, 1002, 8909, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/RouteCollection.php
RouteCollection.refreshActionLookups
public function refreshActionLookups() { $this->actionList = []; foreach ($this->allRoutes as $route) { if (isset($route->getAction()['controller'])) { $this->addToActionList($route->getAction(), $route); } } }
php
public function refreshActionLookups() { $this->actionList = []; foreach ($this->allRoutes as $route) { if (isset($route->getAction()['controller'])) { $this->addToActionList($route->getAction(), $route); } } }
[ "public", "function", "refreshActionLookups", "(", ")", "{", "$", "this", "->", "actionList", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "allRoutes", "as", "$", "route", ")", "{", "if", "(", "isset", "(", "$", "route", "->", "getAction", ...
Refresh the action look-up table. This is done in case any actions are overwritten with new controllers. @return void
[ "Refresh", "the", "action", "look", "-", "up", "table", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/RouteCollection.php#L138-L147
train
Refresh action lookup list
[ 30522, 2270, 3853, 25416, 21898, 18908, 3258, 4135, 21940, 4523, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 2895, 9863, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 2035, 22494, 4570, 2004, 1002, 2799, 1007, 1063, 2065,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Validation/Concerns/ValidatesAttributes.php
ValidatesAttributes.validateDateFormat
public function validateDateFormat($attribute, $value, $parameters) { $this->requireParameterCount(1, $parameters, 'date_format'); if (! is_string($value) && ! is_numeric($value)) { return false; } $format = $parameters[0]; $date = DateTime::createFromFormat('!...
php
public function validateDateFormat($attribute, $value, $parameters) { $this->requireParameterCount(1, $parameters, 'date_format'); if (! is_string($value) && ! is_numeric($value)) { return false; } $format = $parameters[0]; $date = DateTime::createFromFormat('!...
[ "public", "function", "validateDateFormat", "(", "$", "attribute", ",", "$", "value", ",", "$", "parameters", ")", "{", "$", "this", "->", "requireParameterCount", "(", "1", ",", "$", "parameters", ",", "'date_format'", ")", ";", "if", "(", "!", "is_string...
Validate that an attribute matches a date format. @param string $attribute @param mixed $value @param array $parameters @return bool
[ "Validate", "that", "an", "attribute", "matches", "a", "date", "format", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php#L397-L410
train
This method is used to validate the date_format attribute.
[ 30522, 2270, 3853, 9398, 4383, 3686, 14192, 4017, 1006, 1002, 17961, 1010, 1002, 3643, 1010, 1002, 11709, 1007, 1063, 1002, 2023, 1011, 1028, 5478, 28689, 22828, 3597, 16671, 1006, 1015, 1010, 1002, 11709, 1010, 1005, 3058, 1035, 4289, 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...
laravel/framework
src/Illuminate/Notifications/Channels/MailChannel.php
MailChannel.getRecipients
protected function getRecipients($notifiable, $notification, $message) { if (is_string($recipients = $notifiable->routeNotificationFor('mail', $notification))) { $recipients = [$recipients]; } return collect($recipients)->mapWithKeys(function ($recipient, $email) { r...
php
protected function getRecipients($notifiable, $notification, $message) { if (is_string($recipients = $notifiable->routeNotificationFor('mail', $notification))) { $recipients = [$recipients]; } return collect($recipients)->mapWithKeys(function ($recipient, $email) { r...
[ "protected", "function", "getRecipients", "(", "$", "notifiable", ",", "$", "notification", ",", "$", "message", ")", "{", "if", "(", "is_string", "(", "$", "recipients", "=", "$", "notifiable", "->", "routeNotificationFor", "(", "'mail'", ",", "$", "notific...
Get the recipients of the given message. @param mixed $notifiable @param \Illuminate\Notifications\Notification $notification @param \Illuminate\Notifications\Messages\MailMessage $message @return mixed
[ "Get", "the", "recipients", "of", "the", "given", "message", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Notifications/Channels/MailChannel.php#L198-L209
train
Get all recipients
[ 30522, 5123, 3853, 2131, 2890, 6895, 14756, 7666, 1006, 1002, 2025, 10128, 19210, 1010, 1002, 26828, 1010, 1002, 4471, 1007, 1063, 2065, 1006, 2003, 1035, 5164, 1006, 1002, 15991, 1027, 1002, 2025, 10128, 19210, 1011, 1028, 2799, 17048, 903...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Payment/Jssdk/Client.php
Client.shareAddressConfig
public function shareAddressConfig($accessToken, bool $json = true) { if ($accessToken instanceof AccessTokenInterface) { $accessToken = $accessToken->getToken(); } $params = [ 'appId' => $this->app['config']->app_id, 'scope' => 'jsapi_address', ...
php
public function shareAddressConfig($accessToken, bool $json = true) { if ($accessToken instanceof AccessTokenInterface) { $accessToken = $accessToken->getToken(); } $params = [ 'appId' => $this->app['config']->app_id, 'scope' => 'jsapi_address', ...
[ "public", "function", "shareAddressConfig", "(", "$", "accessToken", ",", "bool", "$", "json", "=", "true", ")", "{", "if", "(", "$", "accessToken", "instanceof", "AccessTokenInterface", ")", "{", "$", "accessToken", "=", "$", "accessToken", "->", "getToken", ...
Generate js config for share user address. @param string|\Overtrue\Socialite\AccessTokenInterface $accessToken @param bool $json @return string|array
[ "Generate", "js", "config", "for", "share", "user", "address", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Payment/Jssdk/Client.php#L107-L134
train
Get address config
[ 30522, 2270, 3853, 3745, 4215, 16200, 4757, 8663, 8873, 2290, 1006, 1002, 3229, 18715, 2368, 1010, 22017, 2140, 1002, 1046, 3385, 1027, 2995, 1007, 1063, 2065, 1006, 1002, 3229, 18715, 2368, 6013, 11253, 3229, 18715, 18595, 10111, 12881, 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...