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
z-song/laravel-admin
src/Grid/Filter.php
Filter.render
public function render() { $this->removeIDFilterIfNeeded(); if (empty($this->filters)) { return ''; } return view($this->view)->with([ 'action' => $this->action ?: $this->urlWithoutFilters(), 'layout' => $this->layout, 'filterID' ...
php
public function render() { $this->removeIDFilterIfNeeded(); if (empty($this->filters)) { return ''; } return view($this->view)->with([ 'action' => $this->action ?: $this->urlWithoutFilters(), 'layout' => $this->layout, 'filterID' ...
[ "public", "function", "render", "(", ")", "{", "$", "this", "->", "removeIDFilterIfNeeded", "(", ")", ";", "if", "(", "empty", "(", "$", "this", "->", "filters", ")", ")", "{", "return", "''", ";", "}", "return", "view", "(", "$", "this", "->", "vi...
Get the string contents of the filter view. @return \Illuminate\View\View|string
[ "Get", "the", "string", "contents", "of", "the", "filter", "view", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Grid/Filter.php#L524-L538
train
Render the page
[ 30522, 2270, 3853, 17552, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 6366, 3593, 8873, 21928, 10128, 24045, 5732, 1006, 1007, 1025, 2065, 1006, 4064, 1006, 1002, 2023, 1011, 1028, 17736, 1007, 1007, 1063, 2709, 1005, 1005, 1025, 1065, 2709, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/View/FileViewFinder.php
FileViewFinder.prependNamespace
public function prependNamespace($namespace, $hints) { $hints = (array) $hints; if (isset($this->hints[$namespace])) { $hints = array_merge($hints, $this->hints[$namespace]); } $this->hints[$namespace] = $hints; }
php
public function prependNamespace($namespace, $hints) { $hints = (array) $hints; if (isset($this->hints[$namespace])) { $hints = array_merge($hints, $this->hints[$namespace]); } $this->hints[$namespace] = $hints; }
[ "public", "function", "prependNamespace", "(", "$", "namespace", ",", "$", "hints", ")", "{", "$", "hints", "=", "(", "array", ")", "$", "hints", ";", "if", "(", "isset", "(", "$", "this", "->", "hints", "[", "$", "namespace", "]", ")", ")", "{", ...
Prepend a namespace hint to the finder. @param string $namespace @param string|array $hints @return void
[ "Prepend", "a", "namespace", "hint", "to", "the", "finder", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/View/FileViewFinder.php#L211-L220
train
Prepends namespace to the hints array
[ 30522, 2270, 3853, 17463, 10497, 18442, 23058, 1006, 1002, 3415, 15327, 1010, 1002, 20385, 1007, 1063, 1002, 20385, 1027, 1006, 9140, 1007, 1002, 20385, 1025, 2065, 1006, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 20385, 1031, 1002, 3415, 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...
overtrue/wechat
src/Work/Message/Messenger.php
Messenger.setRecipients
protected function setRecipients($ids, string $key): self { if (is_array($ids)) { $ids = implode('|', $ids); } $this->to = [$key => $ids]; return $this; }
php
protected function setRecipients($ids, string $key): self { if (is_array($ids)) { $ids = implode('|', $ids); } $this->to = [$key => $ids]; return $this; }
[ "protected", "function", "setRecipients", "(", "$", "ids", ",", "string", "$", "key", ")", ":", "self", "{", "if", "(", "is_array", "(", "$", "ids", ")", ")", "{", "$", "ids", "=", "implode", "(", "'|'", ",", "$", "ids", ")", ";", "}", "$", "th...
@param array|string $ids @param string $key @return \EasyWeChat\Work\Message\Messenger
[ "@param", "array|string", "$ids", "@param", "string", "$key" ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Work/Message/Messenger.php#L145-L154
train
Set the recipients
[ 30522, 5123, 3853, 2275, 2890, 6895, 14756, 7666, 1006, 1002, 8909, 2015, 1010, 5164, 1002, 3145, 1007, 1024, 2969, 1063, 2065, 1006, 2003, 1035, 9140, 1006, 1002, 8909, 2015, 1007, 1007, 1063, 1002, 8909, 2015, 1027, 17727, 4135, 3207, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Mail/Protocol/Smtp/Auth/Plain.php
Zend_Mail_Protocol_Smtp_Auth_Plain.auth
public function auth() { // Ensure AUTH has not already been initiated. parent::auth(); $this->_send('AUTH PLAIN'); $this->_expect(334); $this->_send(base64_encode("\0" . $this->_username . "\0" . $this->_password)); $this->_expect(235); $this->_auth = true; ...
php
public function auth() { // Ensure AUTH has not already been initiated. parent::auth(); $this->_send('AUTH PLAIN'); $this->_expect(334); $this->_send(base64_encode("\0" . $this->_username . "\0" . $this->_password)); $this->_expect(235); $this->_auth = true; ...
[ "public", "function", "auth", "(", ")", "{", "// Ensure AUTH has not already been initiated.", "parent", "::", "auth", "(", ")", ";", "$", "this", "->", "_send", "(", "'AUTH PLAIN'", ")", ";", "$", "this", "->", "_expect", "(", "334", ")", ";", "$", "this"...
Perform PLAIN authentication with supplied credentials @return void
[ "Perform", "PLAIN", "authentication", "with", "supplied", "credentials" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail/Protocol/Smtp/Auth/Plain.php#L85-L95
train
Initiate AUTH PLAIN
[ 30522, 2270, 3853, 8740, 2705, 1006, 1007, 1063, 1013, 1013, 5676, 8740, 2705, 2038, 2025, 2525, 2042, 7531, 1012, 6687, 1024, 1024, 8740, 2705, 1006, 1007, 1025, 1002, 2023, 1011, 1028, 1035, 4604, 1006, 1005, 8740, 2705, 5810, 1005, 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/Database/Eloquent/Concerns/HasRelationships.php
HasRelationships.newHasOneThrough
protected function newHasOneThrough(Builder $query, Model $farParent, Model $throughParent, $firstKey, $secondKey, $localKey, $secondLocalKey) { return new HasOneThrough($query, $farParent, $throughParent, $firstKey, $secondKey, $localKey, $secondLocalKey); }
php
protected function newHasOneThrough(Builder $query, Model $farParent, Model $throughParent, $firstKey, $secondKey, $localKey, $secondLocalKey) { return new HasOneThrough($query, $farParent, $throughParent, $firstKey, $secondKey, $localKey, $secondLocalKey); }
[ "protected", "function", "newHasOneThrough", "(", "Builder", "$", "query", ",", "Model", "$", "farParent", ",", "Model", "$", "throughParent", ",", "$", "firstKey", ",", "$", "secondKey", ",", "$", "localKey", ",", "$", "secondLocalKey", ")", "{", "return", ...
Instantiate a new HasOneThrough relationship. @param \Illuminate\Database\Eloquent\Builder $query @param \Illuminate\Database\Eloquent\Model $farParent @param \Illuminate\Database\Eloquent\Model $throughParent @param string $firstKey @param string $secondKey @param string $localKey @param string $secondL...
[ "Instantiate", "a", "new", "HasOneThrough", "relationship", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php#L118-L121
train
Creates a HasOneThrough for a has one through relation
[ 30522, 5123, 3853, 2047, 14949, 5643, 2705, 22494, 5603, 1006, 12508, 1002, 23032, 1010, 2944, 1002, 2521, 19362, 4765, 1010, 2944, 1002, 2083, 19362, 4765, 1010, 1002, 2034, 14839, 1010, 1002, 2117, 14839, 1010, 1002, 2334, 14839, 1010, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Eloquent/Model.php
Model.loadCount
public function loadCount($relations) { $relations = is_string($relations) ? func_get_args() : $relations; $this->newCollection([$this])->loadCount($relations); return $this; }
php
public function loadCount($relations) { $relations = is_string($relations) ? func_get_args() : $relations; $this->newCollection([$this])->loadCount($relations); return $this; }
[ "public", "function", "loadCount", "(", "$", "relations", ")", "{", "$", "relations", "=", "is_string", "(", "$", "relations", ")", "?", "func_get_args", "(", ")", ":", "$", "relations", ";", "$", "this", "->", "newCollection", "(", "[", "$", "this", "...
Eager load relation counts on the model. @param array|string $relations @return $this
[ "Eager", "load", "relation", "counts", "on", "the", "model", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Model.php#L513-L520
train
Load Counts for the current page
[ 30522, 2270, 3853, 7170, 3597, 16671, 1006, 1002, 4262, 1007, 1063, 1002, 4262, 1027, 2003, 1035, 5164, 1006, 1002, 4262, 1007, 1029, 4569, 2278, 1035, 2131, 1035, 12098, 5620, 1006, 1007, 1024, 1002, 4262, 1025, 1002, 2023, 1011, 1028, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Cache/RedisStore.php
RedisStore.get
public function get($key) { $value = $this->connection()->get($this->prefix.$key); return ! is_null($value) ? $this->unserialize($value) : null; }
php
public function get($key) { $value = $this->connection()->get($this->prefix.$key); return ! is_null($value) ? $this->unserialize($value) : null; }
[ "public", "function", "get", "(", "$", "key", ")", "{", "$", "value", "=", "$", "this", "->", "connection", "(", ")", "->", "get", "(", "$", "this", "->", "prefix", ".", "$", "key", ")", ";", "return", "!", "is_null", "(", "$", "value", ")", "?...
Retrieve an item from the cache by key. @param string|array $key @return mixed
[ "Retrieve", "an", "item", "from", "the", "cache", "by", "key", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Cache/RedisStore.php#L52-L57
train
Get the value of a key from the cache
[ 30522, 2270, 3853, 2131, 1006, 1002, 3145, 1007, 1063, 1002, 3643, 1027, 1002, 2023, 1011, 1028, 4434, 1006, 1007, 1011, 1028, 2131, 1006, 1002, 2023, 1011, 1028, 17576, 1012, 1002, 3145, 1007, 1025, 2709, 999, 2003, 1035, 19701, 1006, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Url.php
Url.getHost
public static function getHost($checkIfTrusted = true) { // HTTP/1.1 request if (isset($_SERVER['HTTP_HOST']) && strlen($host = $_SERVER['HTTP_HOST']) && (!$checkIfTrusted || self::isValidHost($host)) ) { return $host; } //...
php
public static function getHost($checkIfTrusted = true) { // HTTP/1.1 request if (isset($_SERVER['HTTP_HOST']) && strlen($host = $_SERVER['HTTP_HOST']) && (!$checkIfTrusted || self::isValidHost($host)) ) { return $host; } //...
[ "public", "static", "function", "getHost", "(", "$", "checkIfTrusted", "=", "true", ")", "{", "// HTTP/1.1 request", "if", "(", "isset", "(", "$", "_SERVER", "[", "'HTTP_HOST'", "]", ")", "&&", "strlen", "(", "$", "host", "=", "$", "_SERVER", "[", "'HTTP...
Returns the current host. @param bool $checkIfTrusted Whether to do trusted host check. Should ALWAYS be true, except in Controller. @return string|bool eg, `"demo.piwik.org"` or false if no host found.
[ "Returns", "the", "current", "host", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Url.php#L299-L316
train
Get Host Name
[ 30522, 2270, 10763, 3853, 2131, 15006, 2102, 1006, 1002, 4638, 10128, 24669, 2098, 1027, 2995, 1007, 1063, 1013, 1013, 8299, 1013, 1015, 1012, 1015, 5227, 2065, 1006, 26354, 3388, 1006, 1002, 1035, 8241, 1031, 1005, 8299, 1035, 3677, 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
plugins/MobileMessaging/SMSProvider.php
SMSProvider.truncate
public static function truncate($string, $maximumNumberOfConcatenatedSMS, $appendedString = 'MobileMessaging_SMS_Content_Too_Long') { $appendedString = Piwik::translate($appendedString); $smsContentContainsUCS2Chars = self::containsUCS2Characters($string); $maxCharsAllowed = self::maxCharsA...
php
public static function truncate($string, $maximumNumberOfConcatenatedSMS, $appendedString = 'MobileMessaging_SMS_Content_Too_Long') { $appendedString = Piwik::translate($appendedString); $smsContentContainsUCS2Chars = self::containsUCS2Characters($string); $maxCharsAllowed = self::maxCharsA...
[ "public", "static", "function", "truncate", "(", "$", "string", ",", "$", "maximumNumberOfConcatenatedSMS", ",", "$", "appendedString", "=", "'MobileMessaging_SMS_Content_Too_Long'", ")", "{", "$", "appendedString", "=", "Piwik", "::", "translate", "(", "$", "append...
Truncate $string and append $appendedString at the end if $string can not fit the the $maximumNumberOfConcatenatedSMS. @param string $string String to truncate @param int $maximumNumberOfConcatenatedSMS @param string $appendedString @return string original $string or truncated $string appended with $appendedString @ig...
[ "Truncate", "$string", "and", "append", "$appendedString", "at", "the", "end", "if", "$string", "can", "not", "fit", "the", "the", "$maximumNumberOfConcatenatedSMS", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/MobileMessaging/SMSProvider.php#L183-L208
train
Truncates a string to a maximum number of characters allowed.
[ 30522, 2270, 10763, 3853, 19817, 4609, 16280, 1006, 1002, 5164, 1010, 1002, 4555, 19172, 5677, 11253, 8663, 16280, 23854, 19230, 1010, 1002, 10439, 21945, 3367, 4892, 1027, 1005, 4684, 7834, 3736, 4726, 1035, 22434, 1035, 4180, 1035, 2205, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.renderDataTable
protected function renderDataTable($table, &$allColumns = array()) { if ($table instanceof Simple) { $row = $table->getFirstRow(); if ($row !== false) { $columnNameToValue = $row->getColumns(); if (count($columnNameToValue) == 1) { ...
php
protected function renderDataTable($table, &$allColumns = array()) { if ($table instanceof Simple) { $row = $table->getFirstRow(); if ($row !== false) { $columnNameToValue = $row->getColumns(); if (count($columnNameToValue) == 1) { ...
[ "protected", "function", "renderDataTable", "(", "$", "table", ",", "&", "$", "allColumns", "=", "array", "(", ")", ")", "{", "if", "(", "$", "table", "instanceof", "Simple", ")", "{", "$", "row", "=", "$", "table", "->", "getFirstRow", "(", ")", ";"...
Converts the output of the given simple data table @param DataTable|Simple $table @param array $allColumns @return string
[ "Converts", "the", "output", "of", "the", "given", "simple", "data", "table" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataTable/Renderer/Csv.php#L176-L206
train
Render the data table
[ 30522, 5123, 3853, 17552, 2850, 29336, 3085, 1006, 1002, 2795, 1010, 1004, 1002, 2035, 25778, 2819, 3619, 1027, 9140, 1006, 1007, 1007, 1063, 2065, 1006, 1002, 2795, 6013, 11253, 3722, 1007, 1063, 1002, 5216, 1027, 1002, 2795, 1011, 1028, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/HTML/QuickForm2/Rule/Length.php
HTML_QuickForm2_Rule_Length.setConfig
public function setConfig($config) { if (is_array($config)) { $config = self::mergeMinMaxLength(array(), $config) + array('min' => 0, 'max' => 0); } if (is_array($config) && ($config['min'] < 0 || $config['max'] < 0) || !is_array($config) && $con...
php
public function setConfig($config) { if (is_array($config)) { $config = self::mergeMinMaxLength(array(), $config) + array('min' => 0, 'max' => 0); } if (is_array($config) && ($config['min'] < 0 || $config['max'] < 0) || !is_array($config) && $con...
[ "public", "function", "setConfig", "(", "$", "config", ")", "{", "if", "(", "is_array", "(", "$", "config", ")", ")", "{", "$", "config", "=", "self", "::", "mergeMinMaxLength", "(", "array", "(", ")", ",", "$", "config", ")", "+", "array", "(", "'...
Sets the allowed length limits $config can be either of the following - integer (rule checks for exact length) - array(minlength, maxlength) - array(['min' => minlength, ]['max' => maxlength]) @param int|array Length limits @return HTML_QuickForm2_Rule @throws HTML_QuickForm2_InvalidArgumentException if bogu...
[ "Sets", "the", "allowed", "length", "limits" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Rule/Length.php#L203-L234
train
Set Length Rule Config
[ 30522, 2270, 3853, 2275, 8663, 8873, 2290, 1006, 1002, 9530, 8873, 2290, 1007, 1063, 2065, 1006, 2003, 1035, 9140, 1006, 1002, 9530, 8873, 2290, 1007, 1007, 1063, 1002, 9530, 8873, 2290, 1027, 2969, 1024, 1024, 13590, 10020, 17848, 7770, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/QueueServiceProvider.php
QueueServiceProvider.registerFailedJobServices
protected function registerFailedJobServices() { $this->app->singleton('queue.failer', function () { $config = $this->app['config']['queue.failed']; return isset($config['table']) ? $this->databaseFailedJobProvider($config) : new NullF...
php
protected function registerFailedJobServices() { $this->app->singleton('queue.failer', function () { $config = $this->app['config']['queue.failed']; return isset($config['table']) ? $this->databaseFailedJobProvider($config) : new NullF...
[ "protected", "function", "registerFailedJobServices", "(", ")", "{", "$", "this", "->", "app", "->", "singleton", "(", "'queue.failer'", ",", "function", "(", ")", "{", "$", "config", "=", "$", "this", "->", "app", "[", "'config'", "]", "[", "'queue.failed...
Register the failed job services. @return void
[ "Register", "the", "failed", "job", "services", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Queue/QueueServiceProvider.php#L187-L196
train
Register failed job services
[ 30522, 5123, 3853, 4236, 7011, 18450, 5558, 5910, 2121, 7903, 2229, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 10439, 1011, 1028, 28159, 1006, 1005, 24240, 1012, 8246, 2121, 1005, 1010, 3853, 1006, 1007, 1063, 1002, 9530, 8873, 2290, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Queue/Console/WorkCommand.php
WorkCommand.handle
public function handle() { if ($this->downForMaintenance() && $this->option('once')) { return $this->worker->sleep($this->option('sleep')); } // We'll listen to the processed and failed events so we can write information // to the console as jobs are processed, which wil...
php
public function handle() { if ($this->downForMaintenance() && $this->option('once')) { return $this->worker->sleep($this->option('sleep')); } // We'll listen to the processed and failed events so we can write information // to the console as jobs are processed, which wil...
[ "public", "function", "handle", "(", ")", "{", "if", "(", "$", "this", "->", "downForMaintenance", "(", ")", "&&", "$", "this", "->", "option", "(", "'once'", ")", ")", "{", "return", "$", "this", "->", "worker", "->", "sleep", "(", "$", "this", "-...
Execute the console command. @return void
[ "Execute", "the", "console", "command", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Queue/Console/WorkCommand.php#L66-L88
train
Handle the job
[ 30522, 2270, 3853, 5047, 1006, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 2091, 14192, 22325, 8189, 5897, 1006, 1007, 1004, 1004, 1002, 2023, 1011, 1028, 5724, 1006, 1005, 2320, 1005, 1007, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 7...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Http/Authentication/AuthenticationUtils.php
AuthenticationUtils.getLastAuthenticationError
public function getLastAuthenticationError($clearSession = true) { $request = $this->getRequest(); $session = $request->getSession(); $authenticationException = null; if ($request->attributes->has(Security::AUTHENTICATION_ERROR)) { $authenticationException = $request->at...
php
public function getLastAuthenticationError($clearSession = true) { $request = $this->getRequest(); $session = $request->getSession(); $authenticationException = null; if ($request->attributes->has(Security::AUTHENTICATION_ERROR)) { $authenticationException = $request->at...
[ "public", "function", "getLastAuthenticationError", "(", "$", "clearSession", "=", "true", ")", "{", "$", "request", "=", "$", "this", "->", "getRequest", "(", ")", ";", "$", "session", "=", "$", "request", "->", "getSession", "(", ")", ";", "$", "authen...
@param bool $clearSession @return AuthenticationException|null
[ "@param", "bool", "$clearSession" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Security/Http/Authentication/AuthenticationUtils.php#L38-L55
train
Get last authentication error
[ 30522, 2270, 3853, 2131, 8523, 2696, 14317, 4765, 21261, 2121, 29165, 1006, 1002, 28837, 7971, 30524, 1028, 2038, 1006, 3036, 1024, 1024, 27280, 1035, 7561, 1007, 1007, 1063, 1002, 27280, 10288, 24422, 1027, 1002, 5227, 1011, 1028, 12332, 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/Broadcasting/Broadcasters/Broadcaster.php
Broadcaster.isImplicitlyBindable
protected function isImplicitlyBindable($key, $parameter) { return $parameter->name === $key && $parameter->getClass() && $parameter->getClass()->isSubclassOf(UrlRoutable::class); }
php
protected function isImplicitlyBindable($key, $parameter) { return $parameter->name === $key && $parameter->getClass() && $parameter->getClass()->isSubclassOf(UrlRoutable::class); }
[ "protected", "function", "isImplicitlyBindable", "(", "$", "key", ",", "$", "parameter", ")", "{", "return", "$", "parameter", "->", "name", "===", "$", "key", "&&", "$", "parameter", "->", "getClass", "(", ")", "&&", "$", "parameter", "->", "getClass", ...
Determine if a given key and parameter is implicitly bindable. @param string $key @param \ReflectionParameter $parameter @return bool
[ "Determine", "if", "a", "given", "key", "and", "parameter", "is", "implicitly", "bindable", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php#L226-L230
train
Check if a parameter is an implicitly bindable
[ 30522, 5123, 3853, 2003, 5714, 24759, 28775, 14626, 8428, 20782, 1006, 1002, 3145, 1010, 1002, 16381, 1007, 1063, 2709, 1002, 16381, 1011, 1028, 2171, 1027, 1027, 1027, 1002, 3145, 1004, 1004, 1002, 16381, 1011, 1028, 2131, 26266, 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...
getgrav/grav
system/src/Grav/Common/Grav.php
Grav.fallbackUrl
public function fallbackUrl($path) { $this->fireEvent('onPageFallBackUrl'); /** @var Uri $uri */ $uri = $this['uri']; /** @var Config $config */ $config = $this['config']; $uri_extension = strtolower($uri->extension()); $fallback_types = $config->get('syste...
php
public function fallbackUrl($path) { $this->fireEvent('onPageFallBackUrl'); /** @var Uri $uri */ $uri = $this['uri']; /** @var Config $config */ $config = $this['config']; $uri_extension = strtolower($uri->extension()); $fallback_types = $config->get('syste...
[ "public", "function", "fallbackUrl", "(", "$", "path", ")", "{", "$", "this", "->", "fireEvent", "(", "'onPageFallBackUrl'", ")", ";", "/** @var Uri $uri */", "$", "uri", "=", "$", "this", "[", "'uri'", "]", ";", "/** @var Config $config */", "$", "config", ...
This attempts to find media, other files, and download them @param string $path
[ "This", "attempts", "to", "find", "media", "other", "files", "and", "download", "them" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Grav.php#L506-L574
train
Fall back to the page
[ 30522, 2270, 3853, 2991, 5963, 3126, 2140, 1006, 1002, 4130, 1007, 1063, 1002, 2023, 1011, 1028, 2543, 18697, 3372, 1006, 1005, 2006, 13704, 13976, 5963, 3126, 2140, 1005, 1007, 1025, 1013, 1008, 1008, 1030, 13075, 24471, 2072, 1002, 24471,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/API/Request.php
Request.getMethodIfApiRequest
public static function getMethodIfApiRequest($request) { $module = Common::getRequestVar('module', '', 'string', $request); $method = Common::getRequestVar('method', '', 'string', $request); $isApi = $module === 'API' && !empty($method) && (count(explode('.', $method)) === 2); retur...
php
public static function getMethodIfApiRequest($request) { $module = Common::getRequestVar('module', '', 'string', $request); $method = Common::getRequestVar('method', '', 'string', $request); $isApi = $module === 'API' && !empty($method) && (count(explode('.', $method)) === 2); retur...
[ "public", "static", "function", "getMethodIfApiRequest", "(", "$", "request", ")", "{", "$", "module", "=", "Common", "::", "getRequestVar", "(", "'module'", ",", "''", ",", "'string'", ",", "$", "request", ")", ";", "$", "method", "=", "Common", "::", "...
Returns the current API method being executed, if the current request is an API request. @param array $request eg array('module' => 'API', 'method' => 'Test.getMethod') @return string|null @throws Exception
[ "Returns", "the", "current", "API", "method", "being", "executed", "if", "the", "current", "request", "is", "an", "API", "request", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/API/Request.php#L389-L396
train
Returns the method if the request is an API request
[ 30522, 2270, 10763, 3853, 2131, 11368, 6806, 4305, 7011, 20781, 15500, 1006, 1002, 5227, 1007, 1063, 1002, 11336, 1027, 2691, 1024, 1024, 2131, 2890, 15500, 10755, 1006, 1005, 11336, 1005, 1010, 1005, 1005, 1010, 1005, 5164, 1005, 1010, 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...
symfony/symfony
src/Symfony/Component/Security/Core/User/LdapUserProvider.php
LdapUserProvider.loadUserByUsername
public function loadUserByUsername($username) { try { $this->ldap->bind($this->searchDn, $this->searchPassword); $username = $this->ldap->escape($username, '', LdapInterface::ESCAPE_FILTER); $query = str_replace('{username}', $username, $this->defaultSearch); ...
php
public function loadUserByUsername($username) { try { $this->ldap->bind($this->searchDn, $this->searchPassword); $username = $this->ldap->escape($username, '', LdapInterface::ESCAPE_FILTER); $query = str_replace('{username}', $username, $this->defaultSearch); ...
[ "public", "function", "loadUserByUsername", "(", "$", "username", ")", "{", "try", "{", "$", "this", "->", "ldap", "->", "bind", "(", "$", "this", "->", "searchDn", ",", "$", "this", "->", "searchPassword", ")", ";", "$", "username", "=", "$", "this", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Security/Core/User/LdapUserProvider.php#L61-L93
train
Load a user from LDAP
[ 30522, 2270, 3853, 7170, 20330, 3762, 20330, 18442, 1006, 1002, 5310, 18442, 1007, 1063, 3046, 1063, 1002, 2023, 1011, 1028, 25510, 9331, 1011, 1028, 14187, 1006, 1002, 2023, 1011, 1028, 3945, 2094, 2078, 1010, 1002, 2023, 1011, 1028, 3945,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
walkor/Workerman
Protocols/Ws.php
Ws.encode
public static function encode($payload, $connection) { if (empty($connection->websocketType)) { $connection->websocketType = self::BINARY_TYPE_BLOB; } $payload = (string)$payload; if (empty($connection->handshakeStep)) { self::sendHandshake($connection); ...
php
public static function encode($payload, $connection) { if (empty($connection->websocketType)) { $connection->websocketType = self::BINARY_TYPE_BLOB; } $payload = (string)$payload; if (empty($connection->handshakeStep)) { self::sendHandshake($connection); ...
[ "public", "static", "function", "encode", "(", "$", "payload", ",", "$", "connection", ")", "{", "if", "(", "empty", "(", "$", "connection", "->", "websocketType", ")", ")", "{", "$", "connection", "->", "websocketType", "=", "self", "::", "BINARY_TYPE_BLO...
Websocket encode. @param string $buffer @param ConnectionInterface $connection @return string
[ "Websocket", "encode", "." ]
13649907f05014fcfffcfccaef01e63ad3339351
https://github.com/walkor/Workerman/blob/13649907f05014fcfffcfccaef01e63ad3339351/Protocols/Ws.php#L230-L294
train
Encode WebSocket frame
[ 30522, 2270, 10763, 3853, 4372, 16044, 1006, 1002, 18093, 1010, 1002, 4434, 1007, 1063, 2065, 1006, 4064, 1006, 1002, 4434, 1011, 1028, 4773, 6499, 19869, 15353, 5051, 1007, 1007, 1063, 1002, 4434, 1011, 1028, 4773, 6499, 19869, 15353, 5051...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/PropertyAccess/PropertyPath.php
PropertyPath.isProperty
public function isProperty($index) { if (!isset($this->isIndex[$index])) { throw new OutOfBoundsException(sprintf('The index %s is not within the property path', $index)); } return !$this->isIndex[$index]; }
php
public function isProperty($index) { if (!isset($this->isIndex[$index])) { throw new OutOfBoundsException(sprintf('The index %s is not within the property path', $index)); } return !$this->isIndex[$index]; }
[ "public", "function", "isProperty", "(", "$", "index", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "isIndex", "[", "$", "index", "]", ")", ")", "{", "throw", "new", "OutOfBoundsException", "(", "sprintf", "(", "'The index %s is not within th...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/PropertyAccess/PropertyPath.php#L185-L192
train
Checks if the index is within the property path
[ 30522, 2270, 3853, 2003, 21572, 4842, 3723, 1006, 1002, 5950, 1007, 1063, 2065, 1006, 999, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 2003, 22254, 10288, 1031, 1002, 5950, 1033, 1007, 1007, 1063, 5466, 2047, 2041, 11253, 15494, 3366, 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...
laravel/framework
src/Illuminate/Queue/Worker.php
Worker.timeoutForJob
protected function timeoutForJob($job, WorkerOptions $options) { return $job && ! is_null($job->timeout()) ? $job->timeout() : $options->timeout; }
php
protected function timeoutForJob($job, WorkerOptions $options) { return $job && ! is_null($job->timeout()) ? $job->timeout() : $options->timeout; }
[ "protected", "function", "timeoutForJob", "(", "$", "job", ",", "WorkerOptions", "$", "options", ")", "{", "return", "$", "job", "&&", "!", "is_null", "(", "$", "job", "->", "timeout", "(", ")", ")", "?", "$", "job", "->", "timeout", "(", ")", ":", ...
Get the appropriate timeout for the given job. @param \Illuminate\Contracts\Queue\Job|null $job @param \Illuminate\Queue\WorkerOptions $options @return int
[ "Get", "the", "appropriate", "timeout", "for", "the", "given", "job", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Queue/Worker.php#L158-L161
train
Returns the timeout value for a job
[ 30522, 5123, 3853, 2051, 5833, 29278, 5558, 2497, 1006, 1002, 3105, 1010, 7309, 7361, 9285, 1002, 7047, 1007, 1063, 2709, 1002, 3105, 1004, 1004, 999, 2003, 1035, 19701, 1006, 1002, 3105, 1011, 1028, 2051, 5833, 1006, 1007, 1007, 1029, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Auth/AuthManager.php
AuthManager.guard
public function guard($name = null) { $name = $name ?: $this->getDefaultDriver(); return $this->guards[$name] ?? $this->guards[$name] = $this->resolve($name); }
php
public function guard($name = null) { $name = $name ?: $this->getDefaultDriver(); return $this->guards[$name] ?? $this->guards[$name] = $this->resolve($name); }
[ "public", "function", "guard", "(", "$", "name", "=", "null", ")", "{", "$", "name", "=", "$", "name", "?", ":", "$", "this", "->", "getDefaultDriver", "(", ")", ";", "return", "$", "this", "->", "guards", "[", "$", "name", "]", "??", "$", "this"...
Attempt to get the guard from the local cache. @param string $name @return \Illuminate\Contracts\Auth\Guard|\Illuminate\Contracts\Auth\StatefulGuard
[ "Attempt", "to", "get", "the", "guard", "from", "the", "local", "cache", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/AuthManager.php#L64-L69
train
Returns the guard for the given name.
[ 30522, 2270, 3853, 3457, 1006, 1002, 2171, 1027, 19701, 1007, 1063, 1002, 2171, 1027, 1002, 2171, 1029, 1024, 1002, 2023, 1011, 1028, 2131, 3207, 7011, 11314, 23663, 2099, 1006, 1007, 1025, 2709, 1002, 2023, 1011, 1028, 4932, 1031, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Mail.php
Zend_Mail.setReturnPath
public function setReturnPath($email) { if ($this->_returnPath === null) { $email = $this->_filterEmail($email); $this->_returnPath = $email; $this->_storeHeader('Return-Path', $email, false); } else { /** * @see Zend_Mail_Exception ...
php
public function setReturnPath($email) { if ($this->_returnPath === null) { $email = $this->_filterEmail($email); $this->_returnPath = $email; $this->_storeHeader('Return-Path', $email, false); } else { /** * @see Zend_Mail_Exception ...
[ "public", "function", "setReturnPath", "(", "$", "email", ")", "{", "if", "(", "$", "this", "->", "_returnPath", "===", "null", ")", "{", "$", "email", "=", "$", "this", "->", "_filterEmail", "(", "$", "email", ")", ";", "$", "this", "->", "_returnPa...
Sets the Return-Path header of the message @param string $email @return Zend_Mail Provides fluent interface @throws Zend_Mail_Exception if set multiple times
[ "Sets", "the", "Return", "-", "Path", "header", "of", "the", "message" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail.php#L870-L884
train
Set Return - Path
[ 30522, 2270, 3853, 2275, 13465, 14287, 15069, 1006, 1002, 10373, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 30524, 1006, 1005, 2709, 1011, 4130, 1005, 1010, 1002, 10373, 1010, 6270, 1007, 1025, 1065, 2842, 1063, 1013, 1008, 1008, 1008,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Utils.php
Utils.processMarkdown
public static function processMarkdown($string, $block = true) { $page = Grav::instance()['page'] ?? null; $defaults = Grav::instance()['config']->get('system.pages.markdown'); // Initialize the preferred variant of Parsedown if ($defaults['extra']) { $parsedown = ne...
php
public static function processMarkdown($string, $block = true) { $page = Grav::instance()['page'] ?? null; $defaults = Grav::instance()['config']->get('system.pages.markdown'); // Initialize the preferred variant of Parsedown if ($defaults['extra']) { $parsedown = ne...
[ "public", "static", "function", "processMarkdown", "(", "$", "string", ",", "$", "block", "=", "true", ")", "{", "$", "page", "=", "Grav", "::", "instance", "(", ")", "[", "'page'", "]", "??", "null", ";", "$", "defaults", "=", "Grav", "::", "instanc...
Process a string as markdown @param string $string @param bool $block Block or Line processing @return string
[ "Process", "a", "string", "as", "markdown" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Utils.php#L1461-L1480
train
Process a Markdown string
[ 30522, 2270, 10763, 3853, 2832, 10665, 7698, 1006, 1002, 5164, 1010, 1002, 3796, 1027, 2995, 1007, 1063, 1002, 3931, 1027, 24665, 11431, 1024, 1024, 6013, 1006, 1007, 1031, 1005, 3931, 1005, 1033, 1029, 1029, 19701, 1025, 1002, 12398, 2015,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Uri.php
Uri.processParams
private function processParams($uri, $delimiter = ':') { if (strpos($uri, $delimiter) !== false) { preg_match_all(static::paramsRegex(), $uri, $matches, PREG_SET_ORDER); foreach ($matches as $match) { $param = explode($delimiter, $match[1]); if (count...
php
private function processParams($uri, $delimiter = ':') { if (strpos($uri, $delimiter) !== false) { preg_match_all(static::paramsRegex(), $uri, $matches, PREG_SET_ORDER); foreach ($matches as $match) { $param = explode($delimiter, $match[1]); if (count...
[ "private", "function", "processParams", "(", "$", "uri", ",", "$", "delimiter", "=", "':'", ")", "{", "if", "(", "strpos", "(", "$", "uri", ",", "$", "delimiter", ")", "!==", "false", ")", "{", "preg_match_all", "(", "static", "::", "paramsRegex", "(",...
Process any params based in this URL, supports any valid delimiter @param string $uri @param string $delimiter @return string
[ "Process", "any", "params", "based", "in", "this", "URL", "supports", "any", "valid", "delimiter" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Uri.php#L1414-L1429
train
Process Params in URI
[ 30522, 2797, 3853, 2832, 28689, 5244, 1006, 1002, 24471, 2072, 1010, 1002, 3972, 27605, 3334, 1027, 1005, 1024, 1005, 1007, 1063, 2065, 1006, 2358, 14536, 2891, 1006, 1002, 24471, 2072, 1010, 1002, 3972, 27605, 3334, 1007, 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...
guzzle/guzzle
src/Exception/RequestException.php
RequestException.wrapException
public static function wrapException(RequestInterface $request, \Exception $e) { return $e instanceof RequestException ? $e : new RequestException($e->getMessage(), $request, null, $e); }
php
public static function wrapException(RequestInterface $request, \Exception $e) { return $e instanceof RequestException ? $e : new RequestException($e->getMessage(), $request, null, $e); }
[ "public", "static", "function", "wrapException", "(", "RequestInterface", "$", "request", ",", "\\", "Exception", "$", "e", ")", "{", "return", "$", "e", "instanceof", "RequestException", "?", "$", "e", ":", "new", "RequestException", "(", "$", "e", "->", ...
Wrap non-RequestExceptions with a RequestException @param RequestInterface $request @param \Exception $e @return RequestException
[ "Wrap", "non", "-", "RequestExceptions", "with", "a", "RequestException" ]
bf595424e4d442a190582e088985dc835a789071
https://github.com/guzzle/guzzle/blob/bf595424e4d442a190582e088985dc835a789071/src/Exception/RequestException.php#L48-L53
train
Wrap exception in RequestException
[ 30522, 2270, 10763, 3853, 10236, 10288, 24422, 1006, 5227, 18447, 2121, 12172, 1002, 5227, 1010, 1032, 6453, 1002, 1041, 1007, 1063, 2709, 1002, 1041, 6013, 11253, 5227, 10288, 24422, 1029, 1002, 1041, 1024, 2047, 5227, 10288, 24422, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/backend/traits/SessionMaker.php
SessionMaker.putSession
protected function putSession($key, $value) { $sessionId = $this->makeSessionId(); $currentStore = $this->getSession(); $currentStore[$key] = $value; Session::put($sessionId, base64_encode(serialize($currentStore))); }
php
protected function putSession($key, $value) { $sessionId = $this->makeSessionId(); $currentStore = $this->getSession(); $currentStore[$key] = $value; Session::put($sessionId, base64_encode(serialize($currentStore))); }
[ "protected", "function", "putSession", "(", "$", "key", ",", "$", "value", ")", "{", "$", "sessionId", "=", "$", "this", "->", "makeSessionId", "(", ")", ";", "$", "currentStore", "=", "$", "this", "->", "getSession", "(", ")", ";", "$", "currentStore"...
Saves a widget related key/value pair in to session data. @param string $key Unique key for the data store. @param string $value The value to store. @return void
[ "Saves", "a", "widget", "related", "key", "/", "value", "pair", "in", "to", "session", "data", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/traits/SessionMaker.php#L23-L32
train
Put a value into the session
[ 30522, 5123, 3853, 8509, 7971, 3258, 1006, 1002, 3145, 1010, 1002, 3643, 1007, 1063, 1002, 5219, 3593, 1027, 1002, 2023, 1011, 1028, 3084, 7971, 3258, 3593, 1006, 1007, 1025, 1002, 14731, 19277, 1027, 1002, 2023, 1011, 1028, 4152, 7971, 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...
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.rightJoinWhere
public function rightJoinWhere($table, $first, $operator, $second) { return $this->joinWhere($table, $first, $operator, $second, 'right'); }
php
public function rightJoinWhere($table, $first, $operator, $second) { return $this->joinWhere($table, $first, $operator, $second, 'right'); }
[ "public", "function", "rightJoinWhere", "(", "$", "table", ",", "$", "first", ",", "$", "operator", ",", "$", "second", ")", "{", "return", "$", "this", "->", "joinWhere", "(", "$", "table", ",", "$", "first", ",", "$", "operator", ",", "$", "second"...
Add a "right join where" clause to the query. @param string $table @param \Closure|string $first @param string $operator @param string $second @return \Illuminate\Database\Query\Builder|static
[ "Add", "a", "right", "join", "where", "clause", "to", "the", "query", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L518-L521
train
Right Join Where
[ 30522, 2270, 3853, 2157, 5558, 2378, 2860, 5886, 2063, 1006, 1002, 2795, 1010, 1002, 2034, 1010, 1002, 6872, 1010, 1002, 2117, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 3693, 2860, 5886, 2063, 1006, 1002, 2795, 1010, 1002, 2034, 1010, 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...
symfony/symfony
src/Symfony/Component/Console/Helper/TableStyle.php
TableStyle.setVerticalBorderChar
public function setVerticalBorderChar($verticalBorderChar) { @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use setVerticalBorderChars() instead.', __METHOD__), E_USER_DEPRECATED); return $this->setVerticalBorderChars($verticalBorderChar, $verticalBorderChar); }
php
public function setVerticalBorderChar($verticalBorderChar) { @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use setVerticalBorderChars() instead.', __METHOD__), E_USER_DEPRECATED); return $this->setVerticalBorderChars($verticalBorderChar, $verticalBorderChar); }
[ "public", "function", "setVerticalBorderChar", "(", "$", "verticalBorderChar", ")", "{", "@", "trigger_error", "(", "sprintf", "(", "'The \"%s()\" method is deprecated since Symfony 4.1, use setVerticalBorderChars() instead.'", ",", "__METHOD__", ")", ",", "E_USER_DEPRECATED", ...
Sets vertical border character. @param string $verticalBorderChar @return $this @deprecated since Symfony 4.1, use {@link setVerticalBorderChars()} instead.
[ "Sets", "vertical", "border", "character", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Console/Helper/TableStyle.php#L169-L174
train
Sets the vertical border character for the page header.
[ 30522, 2270, 3853, 2275, 16874, 7476, 12821, 4063, 7507, 2099, 1006, 1002, 7471, 12821, 4063, 7507, 2099, 1007, 1063, 1030, 9495, 1035, 7561, 1006, 9043, 2546, 1006, 1005, 1996, 1000, 1003, 1055, 1006, 1007, 1000, 4118, 2003, 2139, 28139, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Templating/PhpEngine.php
PhpEngine.setEscaper
public function setEscaper($context, callable $escaper) { $this->escapers[$context] = $escaper; self::$escaperCache[$context] = []; }
php
public function setEscaper($context, callable $escaper) { $this->escapers[$context] = $escaper; self::$escaperCache[$context] = []; }
[ "public", "function", "setEscaper", "(", "$", "context", ",", "callable", "$", "escaper", ")", "{", "$", "this", "->", "escapers", "[", "$", "context", "]", "=", "$", "escaper", ";", "self", "::", "$", "escaperCache", "[", "$", "context", "]", "=", "...
Adds an escaper for the given context. @param string $context The escaper context (html, js, ...) @param callable $escaper A PHP callable
[ "Adds", "an", "escaper", "for", "the", "given", "context", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Templating/PhpEngine.php#L358-L362
train
Sets the escaper for the given context.
[ 30522, 2270, 3853, 2275, 2229, 19464, 2099, 1006, 1002, 6123, 1010, 2655, 3085, 1002, 4019, 2099, 1007, 1063, 1002, 2023, 1011, 1028, 4019, 2869, 1031, 1002, 6123, 1033, 1027, 1002, 4019, 2099, 1025, 2969, 1024, 1024, 1002, 4019, 18992, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Controller/Page.php
HTML_QuickForm2_Controller_Page.storeValues
public function storeValues($validate = true) { $this->populateFormOnce(); $container = $this->getController()->getSessionContainer(); $id = $this->form->getId(); $container->storeValues($id, (array)$this->form->getValue()); if ($validate) { $container->st...
php
public function storeValues($validate = true) { $this->populateFormOnce(); $container = $this->getController()->getSessionContainer(); $id = $this->form->getId(); $container->storeValues($id, (array)$this->form->getValue()); if ($validate) { $container->st...
[ "public", "function", "storeValues", "(", "$", "validate", "=", "true", ")", "{", "$", "this", "->", "populateFormOnce", "(", ")", ";", "$", "container", "=", "$", "this", "->", "getController", "(", ")", "->", "getSessionContainer", "(", ")", ";", "$", ...
Stores the form values (and validation status) is session container @param bool Whether to store validation status
[ "Stores", "the", "form", "values", "(", "and", "validation", "status", ")", "is", "session", "container" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Controller/Page.php#L245-L256
train
Stores the values of the form into the session container
[ 30522, 2270, 3853, 3573, 10175, 15808, 1006, 1002, 9398, 3686, 1027, 2995, 1007, 1063, 1002, 2023, 1011, 1028, 3769, 9869, 14192, 2239, 3401, 1006, 1007, 1025, 1002, 11661, 1027, 1002, 2023, 1011, 1028, 2131, 8663, 13181, 10820, 1006, 1007,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/ViewDataTable/Factory.php
Factory.getDefaultViewTypeForReport
private static function getDefaultViewTypeForReport($report, $apiAction) { if (!empty($report) && $report->isEnabled()) { return $report->getDefaultTypeViewDataTable(); } return false; }
php
private static function getDefaultViewTypeForReport($report, $apiAction) { if (!empty($report) && $report->isEnabled()) { return $report->getDefaultTypeViewDataTable(); } return false; }
[ "private", "static", "function", "getDefaultViewTypeForReport", "(", "$", "report", ",", "$", "apiAction", ")", "{", "if", "(", "!", "empty", "(", "$", "report", ")", "&&", "$", "report", "->", "isEnabled", "(", ")", ")", "{", "return", "$", "report", ...
Returns the default viewDataTable ID to use when determining which visualization to use. @param Report $report @param string $apiAction @return bool|string
[ "Returns", "the", "default", "viewDataTable", "ID", "to", "use", "when", "determining", "which", "visualization", "to", "use", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/ViewDataTable/Factory.php#L194-L201
train
Returns the default view type for the report
[ 30522, 2797, 10763, 3853, 2131, 3207, 7011, 11314, 8584, 13874, 29278, 2890, 6442, 1006, 1002, 3189, 1010, 1002, 17928, 18908, 3258, 1007, 1063, 2065, 1006, 999, 4064, 1006, 1002, 3189, 1007, 1004, 1004, 1002, 3189, 1011, 1028, 2003, 8189, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Config/CompiledBase.php
CompiledBase.loadCompiledFile
protected function loadCompiledFile($filename) { if (!file_exists($filename)) { return false; } $cache = include $filename; if ( !\is_array($cache) || !isset($cache['checksum'], $cache['data'], $cache['@class']) || $cache['@class'] !==...
php
protected function loadCompiledFile($filename) { if (!file_exists($filename)) { return false; } $cache = include $filename; if ( !\is_array($cache) || !isset($cache['checksum'], $cache['data'], $cache['@class']) || $cache['@class'] !==...
[ "protected", "function", "loadCompiledFile", "(", "$", "filename", ")", "{", "if", "(", "!", "file_exists", "(", "$", "filename", ")", ")", "{", "return", "false", ";", "}", "$", "cache", "=", "include", "$", "filename", ";", "if", "(", "!", "\\", "i...
Load compiled file. @param string $filename @return bool @internal
[ "Load", "compiled", "file", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Config/CompiledBase.php#L193-L219
train
Load compiled file
[ 30522, 5123, 3853, 7170, 9006, 22090, 20952, 9463, 1006, 1002, 5371, 18442, 1007, 1063, 2065, 1006, 999, 5371, 1035, 6526, 1006, 1002, 5371, 18442, 1007, 1007, 1063, 2709, 6270, 1025, 1065, 1002, 17053, 1027, 2421, 1002, 5371, 18442, 1025, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Form/Form.php
Form.isDisabled
public function isDisabled() { if (null === $this->parent || !$this->parent->isDisabled()) { return $this->config->getDisabled(); } return true; }
php
public function isDisabled() { if (null === $this->parent || !$this->parent->isDisabled()) { return $this->config->getDisabled(); } return true; }
[ "public", "function", "isDisabled", "(", ")", "{", "if", "(", "null", "===", "$", "this", "->", "parent", "||", "!", "$", "this", "->", "parent", "->", "isDisabled", "(", ")", ")", "{", "return", "$", "this", "->", "config", "->", "getDisabled", "(",...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/Form.php#L254-L261
train
return true if the current page is disabled
[ 30522, 2270, 3853, 2003, 10521, 3085, 2094, 1006, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 1027, 1002, 2023, 1011, 1028, 6687, 1064, 1064, 999, 1002, 2023, 1011, 1028, 6687, 1011, 1028, 2003, 10521, 3085, 2094, 1006, 1007, 1007, 1063, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Routing/RouteCollection.php
RouteCollection.addRequirements
public function addRequirements(array $requirements) { if ($requirements) { foreach ($this->routes as $route) { $route->addRequirements($requirements); } } }
php
public function addRequirements(array $requirements) { if ($requirements) { foreach ($this->routes as $route) { $route->addRequirements($requirements); } } }
[ "public", "function", "addRequirements", "(", "array", "$", "requirements", ")", "{", "if", "(", "$", "requirements", ")", "{", "foreach", "(", "$", "this", "->", "routes", "as", "$", "route", ")", "{", "$", "route", "->", "addRequirements", "(", "$", ...
Adds requirements to all routes. An existing requirement under the same name in a route will be overridden. @param array $requirements An array of requirements
[ "Adds", "requirements", "to", "all", "routes", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Routing/RouteCollection.php#L226-L233
train
Adds requirements to the routes
[ 30522, 2270, 3853, 5587, 2890, 15549, 28578, 11187, 1006, 9140, 1002, 5918, 1007, 1063, 2065, 1006, 1002, 5918, 1007, 1063, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 5847, 2004, 1002, 2799, 1007, 1063, 1002, 2799, 1011, 1028, 5587, 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...
laravel/framework
src/Illuminate/Console/Scheduling/CacheEventMutex.php
CacheEventMutex.exists
public function exists(Event $event) { return $this->cache->store($this->store)->has($event->mutexName()); }
php
public function exists(Event $event) { return $this->cache->store($this->store)->has($event->mutexName()); }
[ "public", "function", "exists", "(", "Event", "$", "event", ")", "{", "return", "$", "this", "->", "cache", "->", "store", "(", "$", "this", "->", "store", ")", "->", "has", "(", "$", "event", "->", "mutexName", "(", ")", ")", ";", "}" ]
Determine if an event mutex exists for the given event. @param \Illuminate\Console\Scheduling\Event $event @return bool
[ "Determine", "if", "an", "event", "mutex", "exists", "for", "the", "given", "event", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Console/Scheduling/CacheEventMutex.php#L53-L56
train
Checks if the event exists in the cache
[ 30522, 2270, 3853, 6526, 1006, 2724, 1002, 2724, 1007, 1063, 2709, 1002, 30524, 1002, 2023, 1011, 1028, 3573, 1007, 1011, 1028, 2038, 1006, 1002, 2724, 1011, 1028, 20101, 2595, 18442, 1006, 1007, 1007, 1025, 1065, 102, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpClient/Response/MockResponse.php
MockResponse.schedule
protected static function schedule(self $response, array &$runningResponses): void { if (!$response->id) { throw new InvalidArgumentException('MockResponse instances must be issued by MockHttpClient before processing.'); } $multi = self::$mainMulti ?? self::$mainMulti = new Clie...
php
protected static function schedule(self $response, array &$runningResponses): void { if (!$response->id) { throw new InvalidArgumentException('MockResponse instances must be issued by MockHttpClient before processing.'); } $multi = self::$mainMulti ?? self::$mainMulti = new Clie...
[ "protected", "static", "function", "schedule", "(", "self", "$", "response", ",", "array", "&", "$", "runningResponses", ")", ":", "void", "{", "if", "(", "!", "$", "response", "->", "id", ")", "{", "throw", "new", "InvalidArgumentException", "(", "'MockRe...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpClient/Response/MockResponse.php#L128-L141
train
Schedule a response for processing
[ 30522, 5123, 10763, 3853, 6134, 1006, 2969, 1002, 3433, 1010, 9140, 1004, 1002, 2770, 6072, 26029, 8583, 1007, 1024, 11675, 1063, 2065, 1006, 999, 1002, 3433, 1011, 1028, 8909, 1007, 1063, 5466, 2047, 19528, 2906, 22850, 15781, 2595, 24422,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Form/Extension/Core/DataTransformer/DateIntervalToStringTransformer.php
DateIntervalToStringTransformer.transform
public function transform($value) { if (null === $value) { return ''; } if (!$value instanceof \DateInterval) { throw new UnexpectedTypeException($value, '\DateInterval'); } return $value->format($this->format); }
php
public function transform($value) { if (null === $value) { return ''; } if (!$value instanceof \DateInterval) { throw new UnexpectedTypeException($value, '\DateInterval'); } return $value->format($this->format); }
[ "public", "function", "transform", "(", "$", "value", ")", "{", "if", "(", "null", "===", "$", "value", ")", "{", "return", "''", ";", "}", "if", "(", "!", "$", "value", "instanceof", "\\", "DateInterval", ")", "{", "throw", "new", "UnexpectedTypeExcep...
Transforms a DateInterval object into a date string with the configured format. @param \DateInterval $value A DateInterval object @return string An ISO 8601 or relative date string like date interval presentation @throws UnexpectedTypeException if the given value is not a \DateInterval instance
[ "Transforms", "a", "DateInterval", "object", "into", "a", "date", "string", "with", "the", "configured", "format", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateIntervalToStringTransformer.php#L48-L58
train
Transform a \ DateInterval object into a date interval string
[ 30522, 2270, 3853, 10938, 1006, 1002, 3643, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 1027, 1002, 3643, 1007, 1063, 2709, 1005, 1005, 1025, 1065, 2065, 1006, 999, 1002, 3643, 6013, 11253, 1032, 3058, 18447, 2121, 10175, 1007, 1063, 5466, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/behaviors/ListController.php
ListController.makeLists
public function makeLists() { foreach ($this->listDefinitions as $definition => $config) { $this->listWidgets[$definition] = $this->makeList($definition); } return $this->listWidgets; }
php
public function makeLists() { foreach ($this->listDefinitions as $definition => $config) { $this->listWidgets[$definition] = $this->makeList($definition); } return $this->listWidgets; }
[ "public", "function", "makeLists", "(", ")", "{", "foreach", "(", "$", "this", "->", "listDefinitions", "as", "$", "definition", "=>", "$", "config", ")", "{", "$", "this", "->", "listWidgets", "[", "$", "definition", "]", "=", "$", "this", "->", "make...
Creates all the list widgets based on the definitions. @return array
[ "Creates", "all", "the", "list", "widgets", "based", "on", "the", "definitions", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/behaviors/ListController.php#L101-L108
train
Make lists of all available lists
[ 30522, 2270, 3853, 2191, 27103, 1006, 1007, 1063, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 2862, 3207, 16294, 22753, 2015, 2004, 1002, 6210, 1027, 1028, 1002, 9530, 8873, 2290, 1007, 1063, 1002, 2023, 1011, 1028, 2862, 9148, 28682, 1031, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Plugin/Menu.php
Menu.urlForAction
protected function urlForAction($controllerAction, $additionalParams = array()) { $module = $this->getModule(); $this->checkisValidCallable($module, $controllerAction); $params = (array) $additionalParams; $params['action'] = $controllerAction; $params['module'] = $module; ...
php
protected function urlForAction($controllerAction, $additionalParams = array()) { $module = $this->getModule(); $this->checkisValidCallable($module, $controllerAction); $params = (array) $additionalParams; $params['action'] = $controllerAction; $params['module'] = $module; ...
[ "protected", "function", "urlForAction", "(", "$", "controllerAction", ",", "$", "additionalParams", "=", "array", "(", ")", ")", "{", "$", "module", "=", "$", "this", "->", "getModule", "(", ")", ";", "$", "this", "->", "checkisValidCallable", "(", "$", ...
Generates a URL for the given action. In your plugin controller you have to create a method with the same name as this method will be executed when a user clicks on the menu item. If you want to generate a URL for the action of another module, meaning not your plugin, you should use the method {@link urlForModuleAction...
[ "Generates", "a", "URL", "for", "the", "given", "action", ".", "In", "your", "plugin", "controller", "you", "have", "to", "create", "a", "method", "with", "the", "same", "name", "as", "this", "method", "will", "be", "executed", "when", "a", "user", "clic...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Plugin/Menu.php#L83-L93
train
Returns an array of parameters that can be used to generate the URL for the controller action
[ 30522, 5123, 3853, 24471, 10270, 6525, 7542, 1006, 1002, 11486, 18908, 3258, 1010, 1002, 3176, 28689, 5244, 1027, 9140, 1006, 1007, 1007, 1063, 1002, 11336, 1027, 1002, 2023, 1011, 1028, 2131, 5302, 8566, 2571, 1006, 1007, 1025, 1002, 2023,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Mail/Storage/Maildir.php
Zend_Mail_Storage_Maildir.getNumberByUniqueId
public function getNumberByUniqueId($id) { foreach ($this->_files as $num => $file) { if ($file['uniq'] == $id) { return $num + 1; } } /** * @see Zend_Mail_Storage_Exception */ // require_once 'Zend/Mail/Storage/Exception.php...
php
public function getNumberByUniqueId($id) { foreach ($this->_files as $num => $file) { if ($file['uniq'] == $id) { return $num + 1; } } /** * @see Zend_Mail_Storage_Exception */ // require_once 'Zend/Mail/Storage/Exception.php...
[ "public", "function", "getNumberByUniqueId", "(", "$", "id", ")", "{", "foreach", "(", "$", "this", "->", "_files", "as", "$", "num", "=>", "$", "file", ")", "{", "if", "(", "$", "file", "[", "'uniq'", "]", "==", "$", "id", ")", "{", "return", "$...
get a message number from a unique id I.e. if you have a webmailer that supports deleting messages you should use unique ids as parameter and use this method to translate it to message number right before calling removeMessage() @param string $id unique id @return int message number @throws Zend_Mail_Storage_Exceptio...
[ "get", "a", "message", "number", "from", "a", "unique", "id" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail/Storage/Maildir.php#L461-L474
train
Get number of files by unique id
[ 30522, 2270, 3853, 2131, 19172, 5677, 3762, 19496, 4226, 3593, 1006, 1002, 8909, 1007, 1063, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 1035, 6764, 2004, 1002, 16371, 2213, 1027, 1028, 1002, 5371, 1007, 1063, 2065, 1006, 1002, 5371, 1031, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Query/Grammars/MySqlGrammar.php
MySqlGrammar.compileDeleteWithoutJoins
protected function compileDeleteWithoutJoins($query, $table, $where) { $sql = trim("delete from {$table} {$where}"); // When using MySQL, delete statements may contain order by statements and limits // so we will compile both of those here. Once we have finished compiling this // we...
php
protected function compileDeleteWithoutJoins($query, $table, $where) { $sql = trim("delete from {$table} {$where}"); // When using MySQL, delete statements may contain order by statements and limits // so we will compile both of those here. Once we have finished compiling this // we...
[ "protected", "function", "compileDeleteWithoutJoins", "(", "$", "query", ",", "$", "table", ",", "$", "where", ")", "{", "$", "sql", "=", "trim", "(", "\"delete from {$table} {$where}\"", ")", ";", "// When using MySQL, delete statements may contain order by statements an...
Compile a delete query that does not use joins. @param \Illuminate\Database\Query\Builder $query @param string $table @param array $where @return string
[ "Compile", "a", "delete", "query", "that", "does", "not", "use", "joins", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Grammars/MySqlGrammar.php#L265-L281
train
Compiles a delete without joins into a single string
[ 30522, 5123, 3853, 9227, 12260, 2618, 24415, 5833, 5558, 7076, 1006, 1002, 23032, 1010, 1002, 2795, 1010, 1002, 2073, 1007, 1063, 1002, 29296, 1027, 12241, 1006, 1000, 3972, 12870, 2013, 1063, 1002, 2795, 1065, 1063, 1002, 2073, 1065, 1000,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Session/DatabaseSessionHandler.php
DatabaseSessionHandler.expired
protected function expired($session) { return isset($session->last_activity) && $session->last_activity < Carbon::now()->subMinutes($this->minutes)->getTimestamp(); }
php
protected function expired($session) { return isset($session->last_activity) && $session->last_activity < Carbon::now()->subMinutes($this->minutes)->getTimestamp(); }
[ "protected", "function", "expired", "(", "$", "session", ")", "{", "return", "isset", "(", "$", "session", "->", "last_activity", ")", "&&", "$", "session", "->", "last_activity", "<", "Carbon", "::", "now", "(", ")", "->", "subMinutes", "(", "$", "this"...
Determine if the session is expired. @param \stdClass $session @return bool
[ "Determine", "if", "the", "session", "is", "expired", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Session/DatabaseSessionHandler.php#L114-L118
train
Checks if session has expired
[ 30522, 5123, 3853, 13735, 1006, 1002, 5219, 1007, 1063, 2709, 26354, 3388, 1006, 1002, 5219, 1011, 1028, 2197, 1035, 4023, 1007, 1004, 1004, 1002, 5219, 1011, 1028, 2197, 1035, 4023, 1026, 6351, 1024, 1024, 2085, 1006, 1007, 1011, 1028, 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...
walkor/Workerman
Worker.php
Worker.stopAll
public static function stopAll() { static::$_status = static::STATUS_SHUTDOWN; // For master process. if (static::$_masterPid === posix_getpid()) { static::log("Workerman[" . basename(static::$_startFile) . "] stopping ..."); $worker_pid_array = static::getAllWorkerPi...
php
public static function stopAll() { static::$_status = static::STATUS_SHUTDOWN; // For master process. if (static::$_masterPid === posix_getpid()) { static::log("Workerman[" . basename(static::$_startFile) . "] stopping ..."); $worker_pid_array = static::getAllWorkerPi...
[ "public", "static", "function", "stopAll", "(", ")", "{", "static", "::", "$", "_status", "=", "static", "::", "STATUS_SHUTDOWN", ";", "// For master process.", "if", "(", "static", "::", "$", "_masterPid", "===", "posix_getpid", "(", ")", ")", "{", "static"...
Stop. @return void
[ "Stop", "." ]
13649907f05014fcfffcfccaef01e63ad3339351
https://github.com/walkor/Workerman/blob/13649907f05014fcfffcfccaef01e63ad3339351/Worker.php#L1768-L1809
train
Stop all workers
[ 30522, 2270, 10763, 3853, 2644, 8095, 1006, 1007, 1063, 10763, 1024, 1024, 1002, 1035, 3570, 1027, 10763, 1024, 1024, 3570, 1035, 3844, 7698, 1025, 1013, 1013, 2005, 3040, 2832, 1012, 2065, 1006, 10763, 1024, 1024, 1002, 1035, 3040, 23267, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.filledRectangle
function filledRectangle($x1, $y1, $width, $height) { $this->addContent(sprintf("\n%.3F %.3F %.3F %.3F re f", $x1, $y1, $width, $height)); }
php
function filledRectangle($x1, $y1, $width, $height) { $this->addContent(sprintf("\n%.3F %.3F %.3F %.3F re f", $x1, $y1, $width, $height)); }
[ "function", "filledRectangle", "(", "$", "x1", ",", "$", "y1", ",", "$", "width", ",", "$", "height", ")", "{", "$", "this", "->", "addContent", "(", "sprintf", "(", "\"\\n%.3F %.3F %.3F %.3F re f\"", ",", "$", "x1", ",", "$", "y1", ",", "$", "width", ...
a filled rectangle, note that it is the width and height of the rectangle which are the secondary parameters, not the coordinates of the upper-right corner @param $x1 @param $y1 @param $width @param $height
[ "a", "filled", "rectangle", "note", "that", "it", "is", "the", "width", "and", "height", "of", "the", "rectangle", "which", "are", "the", "secondary", "parameters", "not", "the", "coordinates", "of", "the", "upper", "-", "right", "corner" ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/lib/Cpdf.php#L3564-L3567
train
filledRectangle - Draws Rectangle
[ 30522, 3853, 3561, 2890, 25572, 3070, 2571, 1006, 1002, 1060, 2487, 1010, 1002, 1061, 2487, 1010, 1002, 9381, 1010, 1002, 4578, 1007, 1063, 1002, 2023, 1011, 1028, 5587, 8663, 6528, 2102, 1006, 9043, 2546, 1006, 1000, 1032, 1050, 1003, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Messenger/Transport/Serialization/Serializer.php
Serializer.encode
public function encode(Envelope $envelope): array { $context = $this->context; /** @var SerializerStamp|null $serializerStamp */ if ($serializerStamp = $envelope->last(SerializerStamp::class)) { $context = $serializerStamp->getContext() + $context; } $headers = [...
php
public function encode(Envelope $envelope): array { $context = $this->context; /** @var SerializerStamp|null $serializerStamp */ if ($serializerStamp = $envelope->last(SerializerStamp::class)) { $context = $serializerStamp->getContext() + $context; } $headers = [...
[ "public", "function", "encode", "(", "Envelope", "$", "envelope", ")", ":", "array", "{", "$", "context", "=", "$", "this", "->", "context", ";", "/** @var SerializerStamp|null $serializerStamp */", "if", "(", "$", "serializerStamp", "=", "$", "envelope", "->", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Messenger/Transport/Serialization/Serializer.php#L93-L107
train
Encode an Envelope
[ 30522, 2270, 3853, 4372, 16044, 1006, 11255, 1002, 11255, 1007, 1024, 9140, 1063, 1002, 6123, 1027, 1002, 2023, 1011, 1028, 6123, 1025, 1013, 1008, 1008, 1030, 13075, 7642, 17629, 9153, 8737, 1064, 19701, 1002, 7642, 17629, 9153, 8737, 1008...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Messenger/Command/FailedMessagesRemoveCommand.php
FailedMessagesRemoveCommand.execute
protected function execute(InputInterface $input, OutputInterface $output) { $io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output); $receiver = $this->getReceiver(); $shouldForce = $input->getOption('force'); $this->removeSi...
php
protected function execute(InputInterface $input, OutputInterface $output) { $io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output); $receiver = $this->getReceiver(); $shouldForce = $input->getOption('force'); $this->removeSi...
[ "protected", "function", "execute", "(", "InputInterface", "$", "input", ",", "OutputInterface", "$", "output", ")", "{", "$", "io", "=", "new", "SymfonyStyle", "(", "$", "input", ",", "$", "output", "instanceof", "ConsoleOutputInterface", "?", "$", "output", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Messenger/Command/FailedMessagesRemoveCommand.php#L58-L66
train
Remove single message
[ 30522, 5123, 3853, 15389, 1006, 7953, 18447, 2121, 12172, 1002, 7953, 1010, 6434, 18447, 2121, 12172, 1002, 6434, 1007, 1063, 1002, 22834, 1027, 2047, 25353, 2213, 14876, 4890, 21756, 2571, 1006, 1002, 7953, 1010, 1002, 6434, 6013, 11253, 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.manipulateDataTableMap
protected function manipulateDataTableMap($dataTable) { $result = $dataTable->getEmptyClone(); foreach ($dataTable->getDataTables() as $tableLabel => $childTable) { $newTable = $this->manipulate($childTable); $result->addTable($newTable, $tableLabel); } return...
php
protected function manipulateDataTableMap($dataTable) { $result = $dataTable->getEmptyClone(); foreach ($dataTable->getDataTables() as $tableLabel => $childTable) { $newTable = $this->manipulate($childTable); $result->addTable($newTable, $tableLabel); } return...
[ "protected", "function", "manipulateDataTableMap", "(", "$", "dataTable", ")", "{", "$", "result", "=", "$", "dataTable", "->", "getEmptyClone", "(", ")", ";", "foreach", "(", "$", "dataTable", "->", "getDataTables", "(", ")", "as", "$", "tableLabel", "=>", ...
Manipulates child DataTables of a DataTable\Map. See @manipulate for more info. @param DataTable\Map $dataTable @return DataTable\Map
[ "Manipulates", "child", "DataTables", "of", "a", "DataTable", "\\", "Map", ".", "See", "@manipulate", "for", "more", "info", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/API/DataTableManipulator.php#L78-L86
train
manipulate a data table
[ 30522, 5123, 3853, 20063, 6790, 10880, 2863, 2361, 1006, 1002, 2951, 10880, 1007, 1063, 1002, 2765, 1027, 1002, 2951, 10880, 1011, 1028, 2131, 6633, 13876, 2100, 20464, 5643, 1006, 1007, 1025, 18921, 6776, 1006, 1002, 2951, 10880, 1011, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Bridge/Twig/TwigEngine.php
TwigEngine.exists
public function exists($name) { if ($name instanceof Template) { return true; } $loader = $this->environment->getLoader(); if ($loader instanceof ExistsLoaderInterface || method_exists($loader, 'exists')) { return $loader->exists((string) $name); } ...
php
public function exists($name) { if ($name instanceof Template) { return true; } $loader = $this->environment->getLoader(); if ($loader instanceof ExistsLoaderInterface || method_exists($loader, 'exists')) { return $loader->exists((string) $name); } ...
[ "public", "function", "exists", "(", "$", "name", ")", "{", "if", "(", "$", "name", "instanceof", "Template", ")", "{", "return", "true", ";", "}", "$", "loader", "=", "$", "this", "->", "environment", "->", "getLoader", "(", ")", ";", "if", "(", "...
{@inheritdoc} It also supports Template as name parameter.
[ "{", "@inheritdoc", "}" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bridge/Twig/TwigEngine.php#L73-L94
train
Checks if a template exists
[ 30522, 2270, 3853, 6526, 1006, 1002, 2171, 1007, 1063, 2065, 1006, 1002, 2171, 6013, 11253, 23561, 1007, 1063, 2709, 2995, 1025, 1065, 1002, 7170, 2121, 1027, 1002, 2023, 1011, 1028, 4044, 1011, 1028, 2131, 11066, 2121, 1006, 1007, 1025, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
opencart/opencart
upload/catalog/controller/mail/forgotten.php
ControllerMailForgotten.index
public function index(&$route, &$args, &$output) { if ($args[0] && $args[1]) { $this->load->model('account/customer'); $customer_info = $this->model_account_customer->getCustomerByEmail($args[0]); if ($customer_info) { $this->load->language('mail/forgotten'); $this->load->model('tool/image'); ...
php
public function index(&$route, &$args, &$output) { if ($args[0] && $args[1]) { $this->load->model('account/customer'); $customer_info = $this->model_account_customer->getCustomerByEmail($args[0]); if ($customer_info) { $this->load->language('mail/forgotten'); $this->load->model('tool/image'); ...
[ "public", "function", "index", "(", "&", "$", "route", ",", "&", "$", "args", ",", "&", "$", "output", ")", "{", "if", "(", "$", "args", "[", "0", "]", "&&", "$", "args", "[", "1", "]", ")", "{", "$", "this", "->", "load", "->", "model", "(...
catalog/model/account/customer/editCode/after
[ "catalog", "/", "model", "/", "account", "/", "customer", "/", "editCode", "/", "after" ]
e7933b56ba05aafb3655c6b490c9733cd18b5c69
https://github.com/opencart/opencart/blob/e7933b56ba05aafb3655c6b490c9733cd18b5c69/upload/catalog/controller/mail/forgotten.php#L4-L47
train
Display the customer page
[ 30522, 2270, 3853, 5950, 1006, 1004, 1002, 2799, 1010, 1004, 1002, 12098, 5620, 1010, 1004, 1002, 6434, 1007, 1063, 2065, 1006, 1002, 12098, 5620, 1031, 1014, 1033, 1004, 1004, 1002, 12098, 5620, 1031, 1015, 1033, 1007, 1063, 1002, 2023, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Auth/SessionGuard.php
SessionGuard.attempting
public function attempting($callback) { if (isset($this->events)) { $this->events->listen(Events\Attempting::class, $callback); } }
php
public function attempting($callback) { if (isset($this->events)) { $this->events->listen(Events\Attempting::class, $callback); } }
[ "public", "function", "attempting", "(", "$", "callback", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "events", ")", ")", "{", "$", "this", "->", "events", "->", "listen", "(", "Events", "\\", "Attempting", "::", "class", ",", "$", "callbac...
Register an authentication attempt event listener. @param mixed $callback @return void
[ "Register", "an", "authentication", "attempt", "event", "listener", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/SessionGuard.php#L569-L574
train
Register a callback to the attempting event.
[ 30522, 2270, 3853, 7161, 1006, 1002, 2655, 5963, 1007, 1063, 2065, 1006, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 2824, 1007, 1007, 1063, 1002, 2023, 1011, 1028, 2824, 1011, 1028, 4952, 1006, 2824, 1032, 7161, 1024, 1024, 2465, 1010, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Bridge/Doctrine/ManagerRegistry.php
ManagerRegistry.resetService
protected function resetService($name) { if (!$this->container->initialized($name)) { return; } $manager = $this->container->get($name); if (!$manager instanceof LazyLoadingInterface) { throw new \LogicException('Resetting a non-lazy manager service is not su...
php
protected function resetService($name) { if (!$this->container->initialized($name)) { return; } $manager = $this->container->get($name); if (!$manager instanceof LazyLoadingInterface) { throw new \LogicException('Resetting a non-lazy manager service is not su...
[ "protected", "function", "resetService", "(", "$", "name", ")", "{", "if", "(", "!", "$", "this", "->", "container", "->", "initialized", "(", "$", "name", ")", ")", "{", "return", ";", "}", "$", "manager", "=", "$", "this", "->", "container", "->", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bridge/Doctrine/ManagerRegistry.php#L41-L73
train
Reset service to default state
[ 30522, 5123, 3853, 25141, 8043, 7903, 2063, 1006, 1002, 2171, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 11661, 1011, 1028, 3988, 3550, 1006, 1002, 2171, 1007, 1007, 1063, 2709, 1025, 1065, 1002, 3208, 1027, 1002, 2023, 1011, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Routing/RouteUrlGenerator.php
RouteUrlGenerator.formatDomain
protected function formatDomain($route, &$parameters) { return $this->addPortToDomain( $this->getRouteScheme($route).$route->getDomain() ); }
php
protected function formatDomain($route, &$parameters) { return $this->addPortToDomain( $this->getRouteScheme($route).$route->getDomain() ); }
[ "protected", "function", "formatDomain", "(", "$", "route", ",", "&", "$", "parameters", ")", "{", "return", "$", "this", "->", "addPortToDomain", "(", "$", "this", "->", "getRouteScheme", "(", "$", "route", ")", ".", "$", "route", "->", "getDomain", "("...
Format the domain and port for the route and request. @param \Illuminate\Routing\Route $route @param array $parameters @return string
[ "Format", "the", "domain", "and", "port", "for", "the", "route", "and", "request", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/RouteUrlGenerator.php#L131-L136
train
Format domain for route
[ 30522, 5123, 3853, 4289, 9527, 8113, 1006, 1002, 2799, 30524, 2131, 22494, 4570, 5403, 4168, 1006, 1002, 2799, 1007, 1012, 1002, 2799, 1011, 1028, 2131, 9527, 8113, 1006, 1007, 1007, 1025, 1065, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/VersionManager.php
VersionManager.getFileVersions
protected function getFileVersions($code) { if ($this->fileVersions !== null && array_key_exists($code, $this->fileVersions)) { return $this->fileVersions[$code]; } $versionFile = $this->getVersionFile($code); $versionInfo = Yaml::parseFile($versionFile); if (!i...
php
protected function getFileVersions($code) { if ($this->fileVersions !== null && array_key_exists($code, $this->fileVersions)) { return $this->fileVersions[$code]; } $versionFile = $this->getVersionFile($code); $versionInfo = Yaml::parseFile($versionFile); if (!i...
[ "protected", "function", "getFileVersions", "(", "$", "code", ")", "{", "if", "(", "$", "this", "->", "fileVersions", "!==", "null", "&&", "array_key_exists", "(", "$", "code", ",", "$", "this", "->", "fileVersions", ")", ")", "{", "return", "$", "this",...
Returns all versions of a plugin from its version file.
[ "Returns", "all", "versions", "of", "a", "plugin", "from", "its", "version", "file", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/classes/VersionManager.php#L268-L288
train
Get file versions
[ 30522, 5123, 3853, 2131, 8873, 20414, 2545, 8496, 1006, 1002, 3642, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 5371, 27774, 2015, 999, 1027, 1027, 19701, 1004, 1004, 9140, 1035, 3145, 1035, 6526, 1006, 1002, 3642, 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...
matomo-org/matomo
core/Access.php
Access.setSuperUserAccess
public function setSuperUserAccess($bool = true) { $this->hasSuperUserAccess = (bool) $bool; if ($bool) { $this->makeSureLoginNameIsSet(); } else { $this->resetSites(); } }
php
public function setSuperUserAccess($bool = true) { $this->hasSuperUserAccess = (bool) $bool; if ($bool) { $this->makeSureLoginNameIsSet(); } else { $this->resetSites(); } }
[ "public", "function", "setSuperUserAccess", "(", "$", "bool", "=", "true", ")", "{", "$", "this", "->", "hasSuperUserAccess", "=", "(", "bool", ")", "$", "bool", ";", "if", "(", "$", "bool", ")", "{", "$", "this", "->", "makeSureLoginNameIsSet", "(", "...
We bypass the normal auth method and give the current user Super User rights. This should be very carefully used. @param bool $bool
[ "We", "bypass", "the", "normal", "auth", "method", "and", "give", "the", "current", "user", "Super", "User", "rights", ".", "This", "should", "be", "very", "carefully", "used", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Access.php#L285-L294
train
Set Super User Access
[ 30522, 2270, 3853, 4520, 6279, 21608, 6906, 9468, 7971, 1006, 1002, 22017, 2140, 1027, 2995, 1007, 1063, 1002, 2023, 1011, 1028, 2038, 6342, 4842, 20330, 6305, 9623, 2015, 1027, 1006, 22017, 2140, 1007, 1002, 22017, 2140, 1025, 2065, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/system/console/PluginRefresh.php
PluginRefresh.handle
public function handle() { /* * Lookup plugin */ $pluginName = $this->argument('name'); $pluginName = PluginManager::instance()->normalizeIdentifier($pluginName); if (!PluginManager::instance()->exists($pluginName)) { throw new \InvalidArgumentException(...
php
public function handle() { /* * Lookup plugin */ $pluginName = $this->argument('name'); $pluginName = PluginManager::instance()->normalizeIdentifier($pluginName); if (!PluginManager::instance()->exists($pluginName)) { throw new \InvalidArgumentException(...
[ "public", "function", "handle", "(", ")", "{", "/*\n * Lookup plugin\n */", "$", "pluginName", "=", "$", "this", "->", "argument", "(", "'name'", ")", ";", "$", "pluginName", "=", "PluginManager", "::", "instance", "(", ")", "->", "normalizeIdent...
Execute the console command. @return void
[ "Execute", "the", "console", "command", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/console/PluginRefresh.php#L36-L59
train
Handles the plugin rollback and update action
[ 30522, 2270, 3853, 5047, 1006, 1007, 1063, 1013, 1008, 1008, 2298, 6279, 13354, 2378, 1008, 1013, 1002, 13354, 23111, 14074, 1027, 1002, 2023, 1011, 1028, 6685, 1006, 1005, 2171, 1005, 1007, 1025, 1002, 13354, 23111, 14074, 1027, 13354, 237...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Filter/ExcludeLowPopulation.php
ExcludeLowPopulation.filter
public function filter($table) { if(empty($this->columnToFilter)) { return; } $minimumValue = $this->minimumValue; $isValueLowPopulation = function ($value) use ($minimumValue) { return $value < $minimumValue; }; $table->filter('ColumnCallback...
php
public function filter($table) { if(empty($this->columnToFilter)) { return; } $minimumValue = $this->minimumValue; $isValueLowPopulation = function ($value) use ($minimumValue) { return $value < $minimumValue; }; $table->filter('ColumnCallback...
[ "public", "function", "filter", "(", "$", "table", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "columnToFilter", ")", ")", "{", "return", ";", "}", "$", "minimumValue", "=", "$", "this", "->", "minimumValue", ";", "$", "isValueLowPopulation", ...
See {@link ExcludeLowPopulation}. @param DataTable $table
[ "See", "{", "@link", "ExcludeLowPopulation", "}", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataTable/Filter/ExcludeLowPopulation.php#L88-L99
train
Filter the table to only return rows that are less than the minimum value
[ 30522, 2270, 3853, 11307, 1006, 1002, 2795, 1007, 1063, 2065, 1006, 4064, 1006, 1002, 2023, 1011, 1028, 5930, 3406, 8873, 21928, 1007, 1007, 1063, 2709, 1025, 1065, 1002, 6263, 10175, 5657, 1027, 1002, 2023, 1011, 1028, 6263, 10175, 5657, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Framework/Flex/Storage/FolderStorage.php
FolderStorage.getPathFromKey
public function getPathFromKey(string $key): string { return sprintf($this->dataPattern, $this->dataFolder, $key, substr($key, 0, 2)); }
php
public function getPathFromKey(string $key): string { return sprintf($this->dataPattern, $this->dataFolder, $key, substr($key, 0, 2)); }
[ "public", "function", "getPathFromKey", "(", "string", "$", "key", ")", ":", "string", "{", "return", "sprintf", "(", "$", "this", "->", "dataPattern", ",", "$", "this", "->", "dataFolder", ",", "$", "key", ",", "substr", "(", "$", "key", ",", "0", "...
Get filesystem path from the key. @param string $key @return string
[ "Get", "filesystem", "path", "from", "the", "key", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Framework/Flex/Storage/FolderStorage.php#L240-L243
train
Get path from key
[ 30522, 2270, 3853, 2131, 15069, 19699, 5358, 14839, 1006, 5164, 1002, 3145, 1007, 1024, 5164, 1063, 2709, 9043, 2546, 1006, 1002, 2023, 1011, 1028, 2951, 4502, 12079, 2078, 1010, 1002, 2023, 1011, 1028, 2951, 10371, 2121, 1010, 1002, 3145, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/DataAccess/LogAggregator.php
LogAggregator.getDimensionsToSelect
protected function getDimensionsToSelect($dimensions, $additionalSelects) { if (empty($additionalSelects)) { return $dimensions; } $dimensionsToSelect = array(); foreach ($dimensions as $selectAs => $dimension) { $asAlias = $this->getSelectAliasAs($dimension)...
php
protected function getDimensionsToSelect($dimensions, $additionalSelects) { if (empty($additionalSelects)) { return $dimensions; } $dimensionsToSelect = array(); foreach ($dimensions as $selectAs => $dimension) { $asAlias = $this->getSelectAliasAs($dimension)...
[ "protected", "function", "getDimensionsToSelect", "(", "$", "dimensions", ",", "$", "additionalSelects", ")", "{", "if", "(", "empty", "(", "$", "additionalSelects", ")", ")", "{", "return", "$", "dimensions", ";", "}", "$", "dimensionsToSelect", "=", "array",...
Will return the subset of $dimensions that are not found in $additionalSelects @param $dimensions @param array $additionalSelects @return array
[ "Will", "return", "the", "subset", "of", "$dimensions", "that", "are", "not", "found", "in", "$additionalSelects" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataAccess/LogAggregator.php#L398-L416
train
Returns the list of dimensions that should be selected based on the additionalSelects
[ 30522, 5123, 3853, 2131, 22172, 6132, 8496, 22282, 2571, 6593, 1006, 1002, 9646, 1010, 1002, 3176, 11246, 22471, 2015, 1007, 1063, 2065, 1006, 4064, 1006, 1002, 3176, 11246, 22471, 2015, 1007, 1007, 1063, 2709, 1002, 9646, 1025, 1065, 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...
overtrue/wechat
src/OfficialAccount/Card/MemberCardClient.php
MemberCardClient.setActivationForm
public function setActivationForm(string $cardId, array $settings) { $params = array_merge(['card_id' => $cardId], $settings); return $this->httpPostJson('card/membercard/activateuserform/set', $params); }
php
public function setActivationForm(string $cardId, array $settings) { $params = array_merge(['card_id' => $cardId], $settings); return $this->httpPostJson('card/membercard/activateuserform/set', $params); }
[ "public", "function", "setActivationForm", "(", "string", "$", "cardId", ",", "array", "$", "settings", ")", "{", "$", "params", "=", "array_merge", "(", "[", "'card_id'", "=>", "$", "cardId", "]", ",", "$", "settings", ")", ";", "return", "$", "this", ...
设置开卡字段接口. @param string $cardId @param array $settings @return mixed
[ "设置开卡字段接口", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/Card/MemberCardClient.php#L41-L46
train
Set the activation form for a card
[ 30522, 2270, 3853, 2275, 18908, 25761, 14192, 1006, 5164, 1002, 4003, 3593, 1010, 9140, 1002, 10906, 1007, 1063, 1002, 11498, 5244, 1027, 9140, 1035, 13590, 1006, 1031, 1005, 4003, 1035, 8909, 1005, 1027, 1028, 1002, 4003, 3593, 1033, 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/Serializer/Serializer.php
Serializer.supportsNormalization
public function supportsNormalization($data, $format = null, array $context = []) { return null !== $this->getNormalizer($data, $format, $context); }
php
public function supportsNormalization($data, $format = null, array $context = []) { return null !== $this->getNormalizer($data, $format, $context); }
[ "public", "function", "supportsNormalization", "(", "$", "data", ",", "$", "format", "=", "null", ",", "array", "$", "context", "=", "[", "]", ")", "{", "return", "null", "!==", "$", "this", "->", "getNormalizer", "(", "$", "data", ",", "$", "format", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Serializer/Serializer.php#L200-L203
train
Returns true if the normalizer supports the data passed
[ 30522, 2270, 3853, 6753, 12131, 9067, 3989, 1006, 1002, 2951, 1010, 1002, 4289, 1027, 19701, 1010, 9140, 1002, 6123, 1027, 1031, 1033, 1007, 1063, 2709, 19701, 999, 30524, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Work/OAuth/ServiceProvider.php
ServiceProvider.prepareCallbackUrl
private function prepareCallbackUrl($app) { $callback = $app['config']->get('oauth.callback'); if (0 === stripos($callback, 'http')) { return $callback; } $baseUrl = $app['request']->getSchemeAndHttpHost(); return $baseUrl.'/'.ltrim($callback, '/'); }
php
private function prepareCallbackUrl($app) { $callback = $app['config']->get('oauth.callback'); if (0 === stripos($callback, 'http')) { return $callback; } $baseUrl = $app['request']->getSchemeAndHttpHost(); return $baseUrl.'/'.ltrim($callback, '/'); }
[ "private", "function", "prepareCallbackUrl", "(", "$", "app", ")", "{", "$", "callback", "=", "$", "app", "[", "'config'", "]", "->", "get", "(", "'oauth.callback'", ")", ";", "if", "(", "0", "===", "stripos", "(", "$", "callback", ",", "'http'", ")", ...
Prepare the OAuth callback url for wechat. @param Container $app @return string
[ "Prepare", "the", "OAuth", "callback", "url", "for", "wechat", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Work/OAuth/ServiceProvider.php#L50-L61
train
Prepare callback url
[ 30522, 2797, 3853, 7374, 9289, 20850, 8684, 3126, 2140, 1006, 1002, 10439, 1007, 1063, 1002, 2655, 5963, 1027, 1002, 10439, 1031, 1005, 9530, 8873, 2290, 1005, 1033, 1011, 1028, 2131, 1006, 1005, 1051, 4887, 2705, 1012, 2655, 5963, 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/Extractor/PhpStringTokenParser.php
PhpStringTokenParser.parse
public static function parse($str) { $bLength = 0; if ('b' === $str[0]) { $bLength = 1; } if ('\'' === $str[$bLength]) { return str_replace( ['\\\\', '\\\''], ['\\', '\''], substr($str, $bLength + 1, -1) ...
php
public static function parse($str) { $bLength = 0; if ('b' === $str[0]) { $bLength = 1; } if ('\'' === $str[$bLength]) { return str_replace( ['\\\\', '\\\''], ['\\', '\''], substr($str, $bLength + 1, -1) ...
[ "public", "static", "function", "parse", "(", "$", "str", ")", "{", "$", "bLength", "=", "0", ";", "if", "(", "'b'", "===", "$", "str", "[", "0", "]", ")", "{", "$", "bLength", "=", "1", ";", "}", "if", "(", "'\\''", "===", "$", "str", "[", ...
Parses a string token. @param string $str String token content @return string The parsed string
[ "Parses", "a", "string", "token", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Translation/Extractor/PhpStringTokenParser.php#L70-L86
train
Parse the string into an array of escape sequences
[ 30522, 2270, 10763, 3853, 11968, 3366, 1006, 1002, 2358, 2099, 1007, 1063, 1002, 1038, 7770, 13512, 2232, 1027, 1014, 1025, 2065, 1006, 1005, 1038, 1005, 1027, 1027, 1027, 1002, 2358, 2099, 1031, 1014, 1033, 1007, 1063, 1002, 1038, 7770, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/FormField.php
FormField.evalConfig
protected function evalConfig($config) { if ($config === null) { $config = []; } /* * Standard config:property values */ $applyConfigValues = [ 'commentHtml', 'placeholder', 'dependsOn', 'required', ...
php
protected function evalConfig($config) { if ($config === null) { $config = []; } /* * Standard config:property values */ $applyConfigValues = [ 'commentHtml', 'placeholder', 'dependsOn', 'required', ...
[ "protected", "function", "evalConfig", "(", "$", "config", ")", "{", "if", "(", "$", "config", "===", "null", ")", "{", "$", "config", "=", "[", "]", ";", "}", "/*\n * Standard config:property values\n */", "$", "applyConfigValues", "=", "[", "...
Process options and apply them to this object. @param array $config @return array
[ "Process", "options", "and", "apply", "them", "to", "this", "object", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/classes/FormField.php#L268-L341
train
Evaluate the config array
[ 30522, 5123, 3853, 9345, 22499, 2078, 8873, 2290, 1006, 1002, 9530, 8873, 2290, 1007, 1063, 2065, 1006, 1002, 9530, 8873, 2290, 1027, 1027, 1027, 19701, 1007, 1063, 1002, 9530, 8873, 2290, 1027, 1031, 1033, 1025, 1065, 1013, 1008, 1008, 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...
matomo-org/matomo
libs/Zend/Db/Table/Abstract.php
Zend_Db_Table_Abstract.fetchRow
public function fetchRow($where = null, $order = null, $offset = null) { if (!($where instanceof Zend_Db_Table_Select)) { $select = $this->select(); if ($where !== null) { $this->_where($select, $where); } if ($order !== null) { ...
php
public function fetchRow($where = null, $order = null, $offset = null) { if (!($where instanceof Zend_Db_Table_Select)) { $select = $this->select(); if ($where !== null) { $this->_where($select, $where); } if ($order !== null) { ...
[ "public", "function", "fetchRow", "(", "$", "where", "=", "null", ",", "$", "order", "=", "null", ",", "$", "offset", "=", "null", ")", "{", "if", "(", "!", "(", "$", "where", "instanceof", "Zend_Db_Table_Select", ")", ")", "{", "$", "select", "=", ...
Fetches one row in an object of type Zend_Db_Table_Row_Abstract, or returns null if no row matches the specified criteria. @param string|array|Zend_Db_Table_Select $where OPTIONAL An SQL WHERE clause or Zend_Db_Table_Select object. @param string|array $order OPTIONAL An SQL ORDER clause. @param ...
[ "Fetches", "one", "row", "in", "an", "object", "of", "type", "Zend_Db_Table_Row_Abstract", "or", "returns", "null", "if", "no", "row", "matches", "the", "specified", "criteria", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Table/Abstract.php#L1372-L1410
train
Fetch a single row from the result set
[ 30522, 2270, 3853, 18584, 10524, 1006, 1002, 2073, 1027, 19701, 1010, 1002, 2344, 1027, 19701, 1010, 1002, 16396, 1027, 19701, 1007, 1063, 2065, 1006, 999, 1006, 1002, 2073, 6013, 11253, 16729, 2094, 1035, 16962, 1035, 2795, 1035, 7276, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/Login/PasswordResetter.php
PasswordResetter.confirmNewPassword
public function confirmNewPassword($login, $resetToken) { // get password reset info & user info $user = self::getUserInformation($login); if ($user === null) { throw new Exception(Piwik::translate('Login_InvalidUsernameEmail')); } // check that the reset token i...
php
public function confirmNewPassword($login, $resetToken) { // get password reset info & user info $user = self::getUserInformation($login); if ($user === null) { throw new Exception(Piwik::translate('Login_InvalidUsernameEmail')); } // check that the reset token i...
[ "public", "function", "confirmNewPassword", "(", "$", "login", ",", "$", "resetToken", ")", "{", "// get password reset info & user info", "$", "user", "=", "self", "::", "getUserInformation", "(", "$", "login", ")", ";", "if", "(", "$", "user", "===", "null",...
Confirms a password reset. This should be called after {@link initiatePasswordResetProcess()} is called. This method will get the new password associated with a reset token and set it as the specified user's password. @param string $login The login of the user whose password is being reset. @param string $resetToken ...
[ "Confirms", "a", "password", "reset", ".", "This", "should", "be", "called", "after", "{", "@link", "initiatePasswordResetProcess", "()", "}", "is", "called", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Login/PasswordResetter.php#L207-L235
train
Confirm the new password of a user
[ 30522, 2270, 3853, 12210, 2638, 2860, 15194, 18351, 1006, 1002, 8833, 2378, 1010, 1002, 25141, 18715, 2368, 1007, 1063, 1013, 1013, 2131, 20786, 25141, 18558, 1004, 5310, 18558, 1002, 5310, 1027, 2969, 1024, 1024, 2131, 20330, 2378, 14192, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/ScheduledTasksRunner.php
ScheduledTasksRunner.runScheduledTasks
public function runScheduledTasks() { $now = time(); // Currently, there are no hourly tasks. When there are some, // this could be too aggressive minimum interval (some hours would be skipped in case of low traffic) $minimumInterval = TrackerConfig::getConfigValue('scheduled_tasks_...
php
public function runScheduledTasks() { $now = time(); // Currently, there are no hourly tasks. When there are some, // this could be too aggressive minimum interval (some hours would be skipped in case of low traffic) $minimumInterval = TrackerConfig::getConfigValue('scheduled_tasks_...
[ "public", "function", "runScheduledTasks", "(", ")", "{", "$", "now", "=", "time", "(", ")", ";", "// Currently, there are no hourly tasks. When there are some,", "// this could be too aggressive minimum interval (some hours would be skipped in case of low traffic)", "$", "minimumInt...
Tracker requests will automatically trigger the Scheduled tasks. This is useful for users who don't setup the cron, but still want daily/weekly/monthly PDF reports emailed automatically. This is similar to calling the API CoreAdminHome.runScheduledTasks
[ "Tracker", "requests", "will", "automatically", "trigger", "the", "Scheduled", "tasks", ".", "This", "is", "useful", "for", "users", "who", "don", "t", "setup", "the", "cron", "but", "still", "want", "daily", "/", "weekly", "/", "monthly", "PDF", "reports", ...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Tracker/ScheduledTasksRunner.php#L38-L85
train
Runs Scheduled Tasks
[ 30522, 2270, 3853, 3216, 7690, 18696, 10230, 5705, 1006, 1007, 1063, 1002, 2085, 1027, 2051, 1006, 1007, 1025, 1013, 1013, 2747, 1010, 2045, 2024, 2053, 21462, 8518, 1012, 2043, 2045, 2024, 2070, 1010, 1013, 1013, 2023, 2071, 2022, 2205, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/CronArchive.php
CronArchive.hadWebsiteTrafficSinceMidnightInTimezone
private function hadWebsiteTrafficSinceMidnightInTimezone($idSite) { $timezone = Site::getTimezoneFor($idSite); $nowInTimezone = Date::factory('now', $timezone); $midnightInTimezone = $nowInTimezone->setTime('00:00:00'); $secondsSinceMidnight = $nowInTimezone->getTimestamp() -...
php
private function hadWebsiteTrafficSinceMidnightInTimezone($idSite) { $timezone = Site::getTimezoneFor($idSite); $nowInTimezone = Date::factory('now', $timezone); $midnightInTimezone = $nowInTimezone->setTime('00:00:00'); $secondsSinceMidnight = $nowInTimezone->getTimestamp() -...
[ "private", "function", "hadWebsiteTrafficSinceMidnightInTimezone", "(", "$", "idSite", ")", "{", "$", "timezone", "=", "Site", "::", "getTimezoneFor", "(", "$", "idSite", ")", ";", "$", "nowInTimezone", "=", "Date", "::", "factory", "(", "'now'", ",", "$", "...
Detects whether a site had visits since midnight in the websites timezone @param $idSite @return bool
[ "Detects", "whether", "a", "site", "had", "visits", "since", "midnight", "in", "the", "websites", "timezone" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/CronArchive.php#L1272-L1303
train
Checks if website had visits since midnight in timezone
[ 30522, 2797, 3853, 2018, 8545, 5910, 4221, 6494, 26989, 6169, 2378, 3401, 4328, 2094, 15864, 18447, 14428, 15975, 1006, 1002, 8909, 28032, 2063, 1007, 1063, 1002, 2051, 15975, 1027, 2609, 1024, 1024, 2131, 7292, 15975, 29278, 1006, 1002, 89...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Plugin/Controller.php
Controller.checkTokenInUrl
protected function checkTokenInUrl() { $tokenRequest = Common::getRequestVar('token_auth', false); $tokenUser = Piwik::getCurrentUserTokenAuth(); if (empty($tokenRequest) && empty($tokenUser)) { return; // UI tests } if ($tokenRequest !== $tokenUser) { ...
php
protected function checkTokenInUrl() { $tokenRequest = Common::getRequestVar('token_auth', false); $tokenUser = Piwik::getCurrentUserTokenAuth(); if (empty($tokenRequest) && empty($tokenUser)) { return; // UI tests } if ($tokenRequest !== $tokenUser) { ...
[ "protected", "function", "checkTokenInUrl", "(", ")", "{", "$", "tokenRequest", "=", "Common", "::", "getRequestVar", "(", "'token_auth'", ",", "false", ")", ";", "$", "tokenUser", "=", "Piwik", "::", "getCurrentUserTokenAuth", "(", ")", ";", "if", "(", "emp...
Checks that the token_auth in the URL matches the currently logged-in user's token_auth. This is a protection against CSRF and should be used in all controller methods that modify Piwik or any user settings. If called from JavaScript by using the `ajaxHelper` you have to call `ajaxHelper.withTokenInUrl();` before `aj...
[ "Checks", "that", "the", "token_auth", "in", "the", "URL", "matches", "the", "currently", "logged", "-", "in", "user", "s", "token_auth", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Plugin/Controller.php#L940-L952
train
Check if token_auth is set in url
[ 30522, 5123, 3853, 4638, 18715, 18595, 11231, 12190, 1006, 1007, 1063, 1002, 19204, 2890, 15500, 1027, 2691, 1024, 1024, 2131, 2890, 15500, 10755, 1006, 1005, 19204, 1035, 8740, 2705, 1005, 1010, 6270, 1007, 1025, 1002, 19204, 20330, 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...
symfony/symfony
src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php
SecurityExtension.createUserDaoProvider
private function createUserDaoProvider($name, $provider, ContainerBuilder $container) { $name = $this->getUserProviderId($name); // Doctrine Entity and In-memory DAO provider are managed by factories foreach ($this->userProviderFactories as $factory) { $key = str_replace('-', '_...
php
private function createUserDaoProvider($name, $provider, ContainerBuilder $container) { $name = $this->getUserProviderId($name); // Doctrine Entity and In-memory DAO provider are managed by factories foreach ($this->userProviderFactories as $factory) { $key = str_replace('-', '_...
[ "private", "function", "createUserDaoProvider", "(", "$", "name", ",", "$", "provider", ",", "ContainerBuilder", "$", "container", ")", "{", "$", "name", "=", "$", "this", "->", "getUserProviderId", "(", "$", "name", ")", ";", "// Doctrine Entity and In-memory D...
Parses a <provider> tag and returns the id for the related user provider service
[ "Parses", "a", "<provider", ">", "tag", "and", "returns", "the", "id", "for", "the", "related", "user", "provider", "service" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php#L633-L670
train
Creates user provider
[ 30522, 2797, 3853, 3443, 20330, 2850, 7361, 12298, 18688, 1006, 1002, 2171, 1010, 1002, 10802, 1010, 11661, 8569, 23891, 2099, 1002, 11661, 1007, 1063, 1002, 2171, 1027, 1002, 2023, 1011, 1028, 2131, 20330, 21572, 17258, 11124, 2094, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dompdf/dompdf
src/Adapter/GD.php
GD.get_text_width
public function get_text_width($text, $font, $size, $word_spacing = 0.0, $char_spacing = 0.0) { $font = $this->get_ttf_file($font); $size = $this->_upscale($size) * self::FONT_SCALE; // imagettfbbox() converts numeric entities to their respective // character. Preserve any originall...
php
public function get_text_width($text, $font, $size, $word_spacing = 0.0, $char_spacing = 0.0) { $font = $this->get_ttf_file($font); $size = $this->_upscale($size) * self::FONT_SCALE; // imagettfbbox() converts numeric entities to their respective // character. Preserve any originall...
[ "public", "function", "get_text_width", "(", "$", "text", ",", "$", "font", ",", "$", "size", ",", "$", "word_spacing", "=", "0.0", ",", "$", "char_spacing", "=", "0.0", ")", "{", "$", "font", "=", "$", "this", "->", "get_ttf_file", "(", "$", "font",...
Calculates text size, in points @param string $text the text to be sized @param string $font the desired font @param float $size the desired font size @param float $word_spacing word spacing, if any @param float $char_spacing char spacing, if any @return float
[ "Calculates", "text", "size", "in", "points" ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/Adapter/GD.php#L855-L873
train
Returns the width of the text in the font
[ 30522, 2270, 3853, 2131, 1035, 3793, 1035, 9381, 1006, 1002, 3793, 1010, 1002, 15489, 1010, 1002, 2946, 1010, 1002, 2773, 1035, 12403, 6129, 1027, 1014, 1012, 1014, 1010, 1002, 25869, 1035, 12403, 6129, 1027, 1014, 1012, 1014, 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...
symfony/symfony
src/Symfony/Component/Intl/Data/Bundle/Reader/JsonBundleReader.php
JsonBundleReader.read
public function read($path, $locale) { $fileName = $path.'/'.$locale.'.json'; // prevent directory traversal attacks if (\dirname($fileName) !== $path) { throw new ResourceBundleNotFoundException(sprintf('The resource bundle "%s" does not exist.', $fileName)); } ...
php
public function read($path, $locale) { $fileName = $path.'/'.$locale.'.json'; // prevent directory traversal attacks if (\dirname($fileName) !== $path) { throw new ResourceBundleNotFoundException(sprintf('The resource bundle "%s" does not exist.', $fileName)); } ...
[ "public", "function", "read", "(", "$", "path", ",", "$", "locale", ")", "{", "$", "fileName", "=", "$", "path", ".", "'/'", ".", "$", "locale", ".", "'.json'", ";", "// prevent directory traversal attacks", "if", "(", "\\", "dirname", "(", "$", "fileNam...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Intl/Data/Bundle/Reader/JsonBundleReader.php#L29-L53
train
Reads the JSON file
[ 30522, 2270, 3853, 3191, 1006, 1002, 4130, 1010, 1002, 2334, 2063, 1007, 1063, 1002, 5371, 18442, 1027, 1002, 4130, 1012, 1005, 1013, 1005, 1012, 1002, 2334, 2063, 1012, 1005, 1012, 1046, 3385, 1005, 1025, 1013, 1013, 4652, 14176, 29053, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
z-song/laravel-admin
src/Grid/Filter/Between.php
Between.condition
public function condition($inputs) { if (!Arr::has($inputs, $this->column)) { return; } $this->value = Arr::get($inputs, $this->column); $value = array_filter($this->value, function ($val) { return $val !== ''; }); if (empty($value)) { ...
php
public function condition($inputs) { if (!Arr::has($inputs, $this->column)) { return; } $this->value = Arr::get($inputs, $this->column); $value = array_filter($this->value, function ($val) { return $val !== ''; }); if (empty($value)) { ...
[ "public", "function", "condition", "(", "$", "inputs", ")", "{", "if", "(", "!", "Arr", "::", "has", "(", "$", "inputs", ",", "$", "this", "->", "column", ")", ")", "{", "return", ";", "}", "$", "this", "->", "value", "=", "Arr", "::", "get", "...
Get condition of this filter. @param array $inputs @return mixed
[ "Get", "condition", "of", "this", "filter", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Grid/Filter/Between.php#L60-L87
train
Return the condition for the query
[ 30522, 2270, 3853, 4650, 1006, 1002, 20407, 1007, 1063, 2065, 1006, 999, 12098, 2099, 1024, 1024, 2038, 1006, 1002, 20407, 1010, 1002, 2023, 1011, 1028, 5930, 1007, 1007, 1063, 2709, 1025, 1065, 1002, 2023, 1011, 1028, 3643, 1027, 12098, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Stopwatch/Stopwatch.php
Stopwatch.getSectionEvents
public function getSectionEvents($id) { return isset($this->sections[$id]) ? $this->sections[$id]->getEvents() : []; }
php
public function getSectionEvents($id) { return isset($this->sections[$id]) ? $this->sections[$id]->getEvents() : []; }
[ "public", "function", "getSectionEvents", "(", "$", "id", ")", "{", "return", "isset", "(", "$", "this", "->", "sections", "[", "$", "id", "]", ")", "?", "$", "this", "->", "sections", "[", "$", "id", "]", "->", "getEvents", "(", ")", ":", "[", "...
Gets all events for a given section. @param string $id A section identifier @return StopwatchEvent[]
[ "Gets", "all", "events", "for", "a", "given", "section", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Stopwatch/Stopwatch.php#L166-L169
train
Get Section Events
[ 30522, 2270, 3853, 4152, 18491, 18697, 7666, 1006, 1002, 8909, 1007, 1063, 2709, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 5433, 1031, 1002, 8909, 1033, 1007, 1029, 1002, 2023, 1011, 1028, 5433, 1031, 1002, 8909, 1033, 1011, 1028, 2131, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
overtrue/wechat
src/Payment/Refund/Client.php
Client.query
protected function query(string $number, string $type) { $params = [ 'appid' => $this->app['config']->app_id, $type => $number, ]; return $this->request($this->wrap('pay/refundquery'), $params); }
php
protected function query(string $number, string $type) { $params = [ 'appid' => $this->app['config']->app_id, $type => $number, ]; return $this->request($this->wrap('pay/refundquery'), $params); }
[ "protected", "function", "query", "(", "string", "$", "number", ",", "string", "$", "type", ")", "{", "$", "params", "=", "[", "'appid'", "=>", "$", "this", "->", "app", "[", "'config'", "]", "->", "app_id", ",", "$", "type", "=>", "$", "number", "...
Query refund. @param string $number @param string $type @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
[ "Query", "refund", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Payment/Refund/Client.php#L146-L154
train
Query refunds
[ 30522, 5123, 3853, 23032, 1006, 5164, 1002, 2193, 1010, 5164, 1002, 2828, 1007, 1063, 1002, 11498, 5244, 1027, 1031, 1005, 10439, 3593, 1005, 1027, 1028, 1002, 2023, 1011, 1028, 10439, 1031, 1005, 9530, 8873, 2290, 1005, 1033, 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...
getgrav/grav
system/src/Grav/Common/Grav.php
Grav.instance
public static function instance(array $values = []) { if (!self::$instance) { self::$instance = static::load($values); } elseif ($values) { $instance = self::$instance; foreach ($values as $key => $value) { $instance->offsetSet($key, $value); ...
php
public static function instance(array $values = []) { if (!self::$instance) { self::$instance = static::load($values); } elseif ($values) { $instance = self::$instance; foreach ($values as $key => $value) { $instance->offsetSet($key, $value); ...
[ "public", "static", "function", "instance", "(", "array", "$", "values", "=", "[", "]", ")", "{", "if", "(", "!", "self", "::", "$", "instance", ")", "{", "self", "::", "$", "instance", "=", "static", "::", "load", "(", "$", "values", ")", ";", "...
Return the Grav instance. Create it if it's not already instanced @param array $values @return Grav
[ "Return", "the", "Grav", "instance", ".", "Create", "it", "if", "it", "s", "not", "already", "instanced" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Grav.php#L130-L142
train
Get the current instance of the class
[ 30522, 2270, 10763, 3853, 6013, 1006, 9140, 1002, 5300, 1027, 1031, 1033, 1007, 1063, 2065, 1006, 999, 2969, 1024, 1024, 1002, 6013, 1007, 1063, 2969, 1024, 1024, 1002, 6013, 1027, 10763, 1024, 1024, 7170, 1006, 1002, 5300, 1007, 1025, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/DependencyInjection/Loader/FileLoader.php
FileLoader.setDefinition
protected function setDefinition($id, Definition $definition) { $this->container->removeBindings($id); if ($this->isLoadingInstanceof) { if (!$definition instanceof ChildDefinition) { throw new InvalidArgumentException(sprintf('Invalid type definition "%s": ChildDefiniti...
php
protected function setDefinition($id, Definition $definition) { $this->container->removeBindings($id); if ($this->isLoadingInstanceof) { if (!$definition instanceof ChildDefinition) { throw new InvalidArgumentException(sprintf('Invalid type definition "%s": ChildDefiniti...
[ "protected", "function", "setDefinition", "(", "$", "id", ",", "Definition", "$", "definition", ")", "{", "$", "this", "->", "container", "->", "removeBindings", "(", "$", "id", ")", ";", "if", "(", "$", "this", "->", "isLoadingInstanceof", ")", "{", "if...
Registers a definition in the container with its instanceof-conditionals. @param string $id @param Definition $definition
[ "Registers", "a", "definition", "in", "the", "container", "with", "its", "instanceof", "-", "conditionals", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/Loader/FileLoader.php#L92-L104
train
Set the definition for the given id
[ 30522, 5123, 3853, 2275, 3207, 16294, 22753, 1006, 1002, 8909, 1010, 6210, 1002, 6210, 1007, 1063, 1002, 2023, 1011, 1028, 11661, 1011, 1028, 6366, 8428, 4667, 2015, 1006, 1002, 8909, 1007, 1025, 2065, 1006, 1002, 2023, 1011, 1028, 2003, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/FormWidgetBase.php
FormWidgetBase.getId
public function getId($suffix = null) { $id = parent::getId($suffix); $id .= '-' . $this->fieldName; return HtmlHelper::nameToId($id); }
php
public function getId($suffix = null) { $id = parent::getId($suffix); $id .= '-' . $this->fieldName; return HtmlHelper::nameToId($id); }
[ "public", "function", "getId", "(", "$", "suffix", "=", "null", ")", "{", "$", "id", "=", "parent", "::", "getId", "(", "$", "suffix", ")", ";", "$", "id", ".=", "'-'", ".", "$", "this", "->", "fieldName", ";", "return", "HtmlHelper", "::", "nameTo...
Returns a unique ID for this widget. Useful in creating HTML markup.
[ "Returns", "a", "unique", "ID", "for", "this", "widget", ".", "Useful", "in", "creating", "HTML", "markup", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/classes/FormWidgetBase.php#L117-L122
train
Returns the id of the field
[ 30522, 2270, 3853, 2131, 3593, 1006, 1002, 16809, 1027, 19701, 1007, 1063, 1002, 8909, 1027, 6687, 1024, 1024, 2131, 3593, 1006, 1002, 16809, 1007, 1025, 1002, 8909, 1012, 1027, 1005, 1011, 1005, 1012, 1002, 2023, 1011, 1028, 2492, 18442, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.getHeaderLine
private function getHeaderLine($columnMetrics) { foreach ($columnMetrics as $index => $value) { if (in_array($value, $this->unsupportedColumns)) { unset($columnMetrics[$index]); } } if ($this->translateColumnNames) { $columnMetrics = $this...
php
private function getHeaderLine($columnMetrics) { foreach ($columnMetrics as $index => $value) { if (in_array($value, $this->unsupportedColumns)) { unset($columnMetrics[$index]); } } if ($this->translateColumnNames) { $columnMetrics = $this...
[ "private", "function", "getHeaderLine", "(", "$", "columnMetrics", ")", "{", "foreach", "(", "$", "columnMetrics", "as", "$", "index", "=>", "$", "value", ")", "{", "if", "(", "in_array", "(", "$", "value", ",", "$", "this", "->", "unsupportedColumns", "...
Returns the CSV header line for a set of metrics. Will translate columns if desired. @param array $columnMetrics @return array
[ "Returns", "the", "CSV", "header", "line", "for", "a", "set", "of", "metrics", ".", "Will", "translate", "columns", "if", "desired", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataTable/Renderer/Csv.php#L214-L231
train
Returns the header line for the column metrics
[ 30522, 2797, 3853, 2131, 4974, 2121, 4179, 1006, 1002, 5930, 12589, 2015, 1007, 1063, 18921, 6776, 1006, 1002, 5930, 12589, 2015, 2004, 1002, 5950, 1027, 1028, 1002, 3643, 1007, 1063, 2065, 1006, 1999, 1035, 9140, 1006, 1002, 3643, 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...
octobercms/october
modules/system/twig/MailPartialTokenParser.php
MailPartialTokenParser.parse
public function parse(Twig_Token $token) { $lineno = $token->getLine(); $stream = $this->parser->getStream(); $name = $this->parser->getExpressionParser()->parseExpression(); $paramNames = []; $nodes = [$name]; $hasBody = false; $body = null; $end = ...
php
public function parse(Twig_Token $token) { $lineno = $token->getLine(); $stream = $this->parser->getStream(); $name = $this->parser->getExpressionParser()->parseExpression(); $paramNames = []; $nodes = [$name]; $hasBody = false; $body = null; $end = ...
[ "public", "function", "parse", "(", "Twig_Token", "$", "token", ")", "{", "$", "lineno", "=", "$", "token", "->", "getLine", "(", ")", ";", "$", "stream", "=", "$", "this", "->", "parser", "->", "getStream", "(", ")", ";", "$", "name", "=", "$", ...
Parses a token and returns a node. @param Twig_Token $token A Twig_Token instance @return Twig_Node A Twig_Node instance
[ "Parses", "a", "token", "and", "returns", "a", "node", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/twig/MailPartialTokenParser.php#L28-L78
train
Parse the partial tag
[ 30522, 2270, 3853, 11968, 3366, 1006, 1056, 16279, 1035, 19204, 1002, 19204, 1007, 1063, 1002, 17517, 2080, 1027, 1002, 19204, 1011, 1028, 2131, 4179, 1006, 1007, 1025, 1002, 5460, 1027, 1002, 2023, 1011, 1028, 11968, 8043, 1011, 1028, 4152...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/EventListener/ProfilerListener.php
ProfilerListener.onKernelException
public function onKernelException(GetResponseForExceptionEvent $event) { if ($this->onlyMasterRequests && !$event->isMasterRequest()) { return; } $this->exception = $event->getException(); }
php
public function onKernelException(GetResponseForExceptionEvent $event) { if ($this->onlyMasterRequests && !$event->isMasterRequest()) { return; } $this->exception = $event->getException(); }
[ "public", "function", "onKernelException", "(", "GetResponseForExceptionEvent", "$", "event", ")", "{", "if", "(", "$", "this", "->", "onlyMasterRequests", "&&", "!", "$", "event", "->", "isMasterRequest", "(", ")", ")", "{", "return", ";", "}", "$", "this",...
Handles the onKernelException event.
[ "Handles", "the", "onKernelException", "event", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php#L62-L69
train
Called when an exception occurs in the kernel.
[ 30522, 2270, 3853, 2006, 5484, 11877, 10288, 24422, 1006, 2131, 6072, 26029, 20106, 5686, 2595, 24422, 18697, 3372, 1002, 2724, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 2069, 8706, 2890, 15500, 2015, 1004, 1004, 999, 1002, 2724, 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/Cache/Traits/ApcuTrait.php
ApcuTrait.doClear
protected function doClear($namespace) { return isset($namespace[0]) && class_exists('APCuIterator', false) && ('cli' !== \PHP_SAPI || filter_var(ini_get('apc.enable_cli'), FILTER_VALIDATE_BOOLEAN)) ? apcu_delete(new \APCuIterator(sprintf('/^%s/', preg_quote($namespace, '/')), APC_ITER_KEY)) ...
php
protected function doClear($namespace) { return isset($namespace[0]) && class_exists('APCuIterator', false) && ('cli' !== \PHP_SAPI || filter_var(ini_get('apc.enable_cli'), FILTER_VALIDATE_BOOLEAN)) ? apcu_delete(new \APCuIterator(sprintf('/^%s/', preg_quote($namespace, '/')), APC_ITER_KEY)) ...
[ "protected", "function", "doClear", "(", "$", "namespace", ")", "{", "return", "isset", "(", "$", "namespace", "[", "0", "]", ")", "&&", "class_exists", "(", "'APCuIterator'", ",", "false", ")", "&&", "(", "'cli'", "!==", "\\", "PHP_SAPI", "||", "filter_...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Cache/Traits/ApcuTrait.php#L82-L87
train
Clear cache for the given namespace
[ 30522, 5123, 3853, 9986, 19738, 2099, 1006, 1002, 3415, 15327, 1007, 1063, 2709, 26354, 3388, 1006, 1002, 3415, 15327, 1031, 1014, 1033, 1007, 1004, 1004, 2465, 1035, 6526, 1006, 1005, 9706, 28168, 6906, 4263, 1005, 1010, 6270, 1007, 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...
dompdf/dompdf
src/FrameReflower/AbstractFrameReflower.php
AbstractFrameReflower.get_min_max_width
function get_min_max_width() { if (!is_null($this->_min_max_cache)) { return $this->_min_max_cache; } $style = $this->_frame->get_style(); // Account for margins & padding $dims = array($style->padding_left, $style->padding_right, $style-...
php
function get_min_max_width() { if (!is_null($this->_min_max_cache)) { return $this->_min_max_cache; } $style = $this->_frame->get_style(); // Account for margins & padding $dims = array($style->padding_left, $style->padding_right, $style-...
[ "function", "get_min_max_width", "(", ")", "{", "if", "(", "!", "is_null", "(", "$", "this", "->", "_min_max_cache", ")", ")", "{", "return", "$", "this", "->", "_min_max_cache", ";", "}", "$", "style", "=", "$", "this", "->", "_frame", "->", "get_styl...
Required for table layout: Returns an array(0 => min, 1 => max, "min" => min, "max" => max) of the minimum and maximum widths of this frame. This provides a basic implementation. Child classes should override this if necessary. @return array|null
[ "Required", "for", "table", "layout", ":", "Returns", "an", "array", "(", "0", "=", ">", "min", "1", "=", ">", "max", "min", "=", ">", "min", "max", "=", ">", "max", ")", "of", "the", "minimum", "and", "maximum", "widths", "of", "this", "frame", ...
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/FrameReflower/AbstractFrameReflower.php#L209-L291
train
Returns the minimum and maximum width of the frame
[ 30522, 3853, 2131, 1035, 8117, 1035, 4098, 1035, 9381, 1006, 1007, 1063, 2065, 1006, 999, 2003, 1035, 19701, 1006, 1002, 2023, 1011, 1028, 1035, 8117, 1035, 4098, 1035, 17053, 1007, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 1035, 8117, 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/Config/ConfigFileFinder.php
ConfigFileFinder.getFiles
public function getFiles(array $paths, $pattern = '|\.yaml$|', $levels = -1) { $list = []; foreach ($paths as $folder) { $path = trim(Folder::getRelativePath($folder), '/'); $files = $this->detectRecursive($folder, $pattern, $levels); $list += $files[trim($path,...
php
public function getFiles(array $paths, $pattern = '|\.yaml$|', $levels = -1) { $list = []; foreach ($paths as $folder) { $path = trim(Folder::getRelativePath($folder), '/'); $files = $this->detectRecursive($folder, $pattern, $levels); $list += $files[trim($path,...
[ "public", "function", "getFiles", "(", "array", "$", "paths", ",", "$", "pattern", "=", "'|\\.yaml$|'", ",", "$", "levels", "=", "-", "1", ")", "{", "$", "list", "=", "[", "]", ";", "foreach", "(", "$", "paths", "as", "$", "folder", ")", "{", "$"...
Return all locations for all the files with a timestamp. @param array $paths List of folders to look from. @param string $pattern Pattern to match the file. Pattern will also be removed from the key. @param int $levels Maximum number of recursive directories. @return array
[ "Return", "all", "locations", "for", "all", "the", "files", "with", "a", "timestamp", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Config/ConfigFileFinder.php#L54-L65
train
Get all files in a list of folders
[ 30522, 2270, 3853, 2131, 8873, 4244, 1006, 9140, 1002, 10425, 1010, 1002, 5418, 1027, 1005, 1064, 1032, 1012, 8038, 19968, 1002, 1064, 1005, 1010, 1002, 3798, 1027, 1011, 1015, 1007, 1063, 1002, 2862, 1027, 1031, 1033, 1025, 18921, 6776, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Settings.php
Settings.createModel
protected function createModel($item) { if (!isset($item->class) || !strlen($item->class)) { throw new ApplicationException(Lang::get('system::lang.settings.missing_model')); } $class = $item->class; return $class::instance(); }
php
protected function createModel($item) { if (!isset($item->class) || !strlen($item->class)) { throw new ApplicationException(Lang::get('system::lang.settings.missing_model')); } $class = $item->class; return $class::instance(); }
[ "protected", "function", "createModel", "(", "$", "item", ")", "{", "if", "(", "!", "isset", "(", "$", "item", "->", "class", ")", "||", "!", "strlen", "(", "$", "item", "->", "class", ")", ")", "{", "throw", "new", "ApplicationException", "(", "Lang...
Internal method, prepare the list model object
[ "Internal", "method", "prepare", "the", "list", "model", "object" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/controllers/Settings.php#L161-L169
train
Create a new instance of the class associated with the current language
[ 30522, 5123, 3853, 3443, 5302, 9247, 1006, 1002, 8875, 1007, 1063, 2065, 1006, 999, 26354, 3388, 1006, 1002, 8875, 1011, 1028, 2465, 1007, 1064, 1064, 999, 2358, 20927, 2078, 1006, 1002, 8875, 1011, 1028, 2465, 1007, 1007, 1063, 5466, 204...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Schema/Grammars/MySqlGrammar.php
MySqlGrammar.compileCreateEngine
protected function compileCreateEngine($sql, Connection $connection, Blueprint $blueprint) { if (isset($blueprint->engine)) { return $sql.' engine = '.$blueprint->engine; } elseif (! is_null($engine = $connection->getConfig('engine'))) { return $sql.' engine = '.$engine; ...
php
protected function compileCreateEngine($sql, Connection $connection, Blueprint $blueprint) { if (isset($blueprint->engine)) { return $sql.' engine = '.$blueprint->engine; } elseif (! is_null($engine = $connection->getConfig('engine'))) { return $sql.' engine = '.$engine; ...
[ "protected", "function", "compileCreateEngine", "(", "$", "sql", ",", "Connection", "$", "connection", ",", "Blueprint", "$", "blueprint", ")", "{", "if", "(", "isset", "(", "$", "blueprint", "->", "engine", ")", ")", "{", "return", "$", "sql", ".", "' e...
Append the engine specifications to a command. @param string $sql @param \Illuminate\Database\Connection $connection @param \Illuminate\Database\Schema\Blueprint $blueprint @return string
[ "Append", "the", "engine", "specifications", "to", "a", "command", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php#L134-L143
train
Compiles create engine statement
[ 30522, 5123, 3853, 4012, 22090, 16748, 3686, 13159, 3170, 1006, 1002, 29296, 1010, 4434, 1002, 4434, 1010, 2630, 16550, 1002, 2630, 16550, 1007, 1063, 2065, 1006, 26354, 3388, 1006, 1002, 2630, 16550, 1011, 1028, 3194, 1007, 1007, 1063, 270...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/ResponseHeaderBag.php
ResponseHeaderBag.getCookies
public function getCookies($format = self::COOKIES_FLAT) { if (!\in_array($format, [self::COOKIES_FLAT, self::COOKIES_ARRAY])) { throw new \InvalidArgumentException(sprintf('Format "%s" invalid (%s).', $format, implode(', ', [self::COOKIES_FLAT, self::COOKIES_ARRAY]))); } if (se...
php
public function getCookies($format = self::COOKIES_FLAT) { if (!\in_array($format, [self::COOKIES_FLAT, self::COOKIES_ARRAY])) { throw new \InvalidArgumentException(sprintf('Format "%s" invalid (%s).', $format, implode(', ', [self::COOKIES_FLAT, self::COOKIES_ARRAY]))); } if (se...
[ "public", "function", "getCookies", "(", "$", "format", "=", "self", "::", "COOKIES_FLAT", ")", "{", "if", "(", "!", "\\", "in_array", "(", "$", "format", ",", "[", "self", "::", "COOKIES_FLAT", ",", "self", "::", "COOKIES_ARRAY", "]", ")", ")", "{", ...
Returns an array with all cookies. @param string $format @return Cookie[] @throws \InvalidArgumentException When the $format is invalid
[ "Returns", "an", "array", "with", "all", "cookies", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php#L216-L236
train
Get all cookies
[ 30522, 2270, 3853, 2131, 3597, 23212, 2229, 1006, 1002, 4289, 1027, 2969, 1024, 1024, 16324, 1035, 4257, 1007, 1063, 2065, 1006, 999, 1032, 1999, 1035, 9140, 1006, 1002, 4289, 1010, 1031, 2969, 1024, 1024, 16324, 1035, 4257, 1010, 2969, 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/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php
TextDescriptor.describeContainerAlias
protected function describeContainerAlias(Alias $alias, array $options = [], ContainerBuilder $builder = null) { if ($alias->isPublic()) { $options['output']->comment(sprintf('This service is a <info>public</info> alias for the service <info>%s</info>', (string) $alias)); } else { ...
php
protected function describeContainerAlias(Alias $alias, array $options = [], ContainerBuilder $builder = null) { if ($alias->isPublic()) { $options['output']->comment(sprintf('This service is a <info>public</info> alias for the service <info>%s</info>', (string) $alias)); } else { ...
[ "protected", "function", "describeContainerAlias", "(", "Alias", "$", "alias", ",", "array", "$", "options", "=", "[", "]", ",", "ContainerBuilder", "$", "builder", "=", "null", ")", "{", "if", "(", "$", "alias", "->", "isPublic", "(", ")", ")", "{", "...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php#L369-L382
train
Describes a container alias
[ 30522, 5123, 3853, 6235, 8663, 18249, 21673, 7951, 1006, 14593, 1002, 14593, 1010, 9140, 1002, 7047, 1027, 1031, 1033, 1010, 11661, 8569, 23891, 2099, 1002, 12508, 1027, 19701, 1007, 1063, 2065, 1006, 1002, 14593, 1011, 1028, 2003, 14289, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/system/classes/MailManager.php
MailManager.renderText
public function renderText($content, $data = []) { if (!$content) { return ''; } $text = $this->renderTwig($content, $data); $text = html_entity_decode(preg_replace("/[\r\n]{2,}/", "\n\n", $text), ENT_QUOTES, 'UTF-8'); return $text; }
php
public function renderText($content, $data = []) { if (!$content) { return ''; } $text = $this->renderTwig($content, $data); $text = html_entity_decode(preg_replace("/[\r\n]{2,}/", "\n\n", $text), ENT_QUOTES, 'UTF-8'); return $text; }
[ "public", "function", "renderText", "(", "$", "content", ",", "$", "data", "=", "[", "]", ")", "{", "if", "(", "!", "$", "content", ")", "{", "return", "''", ";", "}", "$", "text", "=", "$", "this", "->", "renderTwig", "(", "$", "content", ",", ...
Render the Markdown template into text. @param $content @param array $data @return string
[ "Render", "the", "Markdown", "template", "into", "text", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/classes/MailManager.php#L220-L231
train
Render text from twig
[ 30522, 2270, 3853, 17552, 18209, 1006, 1002, 4180, 1010, 1002, 2951, 1027, 1031, 1033, 1007, 1063, 2065, 1006, 999, 1002, 4180, 1007, 1063, 2709, 1005, 1005, 1025, 1065, 1002, 3793, 1027, 1002, 2023, 1011, 1028, 17552, 2102, 16279, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/system/classes/PluginManager.php
PluginManager.getIdentifier
public function getIdentifier($namespace) { $namespace = Str::normalizeClassName($namespace); if (strpos($namespace, '\\') === null) { return $namespace; } $parts = explode('\\', $namespace); $slice = array_slice($parts, 1, 2); $namespace = implode('.', $...
php
public function getIdentifier($namespace) { $namespace = Str::normalizeClassName($namespace); if (strpos($namespace, '\\') === null) { return $namespace; } $parts = explode('\\', $namespace); $slice = array_slice($parts, 1, 2); $namespace = implode('.', $...
[ "public", "function", "getIdentifier", "(", "$", "namespace", ")", "{", "$", "namespace", "=", "Str", "::", "normalizeClassName", "(", "$", "namespace", ")", ";", "if", "(", "strpos", "(", "$", "namespace", ",", "'\\\\'", ")", "===", "null", ")", "{", ...
Resolves a plugin identifier from a plugin class name or object. @param mixed Plugin class name or object @return string Identifier in format of Vendor.Plugin
[ "Resolves", "a", "plugin", "identifier", "from", "a", "plugin", "class", "name", "or", "object", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/classes/PluginManager.php#L424-L436
train
Get identifier of the namespace
[ 30522, 2270, 3853, 2131, 5178, 16778, 8873, 2121, 1006, 1002, 3415, 15327, 1007, 1063, 1002, 3415, 15327, 1027, 2358, 2099, 1024, 1024, 3671, 4697, 26266, 18442, 1006, 1002, 3415, 15327, 1007, 1025, 2065, 1006, 2358, 14536, 2891, 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...
slimphp/Slim
Slim/Route.php
Route.setArgument
public function setArgument($name, $value, $includeInSavedArguments = true) { if ($includeInSavedArguments) { $this->savedArguments[$name] = $value; } $this->arguments[$name] = $value; return $this; }
php
public function setArgument($name, $value, $includeInSavedArguments = true) { if ($includeInSavedArguments) { $this->savedArguments[$name] = $value; } $this->arguments[$name] = $value; return $this; }
[ "public", "function", "setArgument", "(", "$", "name", ",", "$", "value", ",", "$", "includeInSavedArguments", "=", "true", ")", "{", "if", "(", "$", "includeInSavedArguments", ")", "{", "$", "this", "->", "savedArguments", "[", "$", "name", "]", "=", "$...
{@inheritdoc}
[ "{" ]
ccef5f7d8bcd469d59cbe64f6210d83764f91543
https://github.com/slimphp/Slim/blob/ccef5f7d8bcd469d59cbe64f6210d83764f91543/Slim/Route.php#L213-L220
train
Set an argument value
[ 30522, 2270, 3853, 2275, 2906, 22850, 4765, 1006, 1002, 2171, 1010, 1002, 3643, 1010, 1002, 2421, 7076, 10696, 7662, 22850, 11187, 1027, 2995, 1007, 1063, 2065, 1006, 1002, 2421, 7076, 10696, 7662, 22850, 11187, 1007, 1063, 1002, 2023, 1011...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Mail/Message.php
Message.sender
public function sender($address, $name = null) { $this->swift->setSender($address, $name); return $this; }
php
public function sender($address, $name = null) { $this->swift->setSender($address, $name); return $this; }
[ "public", "function", "sender", "(", "$", "address", ",", "$", "name", "=", "null", ")", "{", "$", "this", "->", "swift", "->", "setSender", "(", "$", "address", ",", "$", "name", ")", ";", "return", "$", "this", ";", "}" ]
Set the "sender" of the message. @param string|array $address @param string|null $name @return $this
[ "Set", "the", "sender", "of", "the", "message", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Mail/Message.php#L62-L67
train
Set the sender address and name of the message
[ 30522, 2270, 3853, 4604, 2121, 1006, 1002, 4769, 1010, 1002, 2171, 1027, 19701, 1007, 1063, 1002, 2023, 1011, 1028, 9170, 1011, 1028, 4520, 10497, 2121, 1006, 1002, 4769, 1010, 1002, 2171, 1007, 1025, 2709, 1002, 2023, 1025, 1065, 102, 0,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Cookie/CookieJar.php
CookieJar.setDefaultPathAndDomain
public function setDefaultPathAndDomain($path, $domain, $secure = false, $sameSite = null) { [$this->path, $this->domain, $this->secure, $this->sameSite] = [$path, $domain, $secure, $sameSite]; return $this; }
php
public function setDefaultPathAndDomain($path, $domain, $secure = false, $sameSite = null) { [$this->path, $this->domain, $this->secure, $this->sameSite] = [$path, $domain, $secure, $sameSite]; return $this; }
[ "public", "function", "setDefaultPathAndDomain", "(", "$", "path", ",", "$", "domain", ",", "$", "secure", "=", "false", ",", "$", "sameSite", "=", "null", ")", "{", "[", "$", "this", "->", "path", ",", "$", "this", "->", "domain", ",", "$", "this", ...
Set the default path and domain for the jar. @param string $path @param string $domain @param bool $secure @param string $sameSite @return $this
[ "Set", "the", "default", "path", "and", "domain", "for", "the", "jar", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Cookie/CookieJar.php#L178-L183
train
Set Default Path and Domain
[ 30522, 2270, 3853, 2275, 3207, 7011, 11314, 15069, 5685, 9527, 8113, 1006, 1002, 4130, 1010, 1002, 5884, 1010, 1002, 5851, 1027, 6270, 1010, 1002, 2168, 28032, 2063, 1027, 19701, 1007, 1063, 1031, 1002, 2023, 1011, 1028, 4130, 1010, 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/FontMetrics.php
FontMetrics.loadFontFamilies
public function loadFontFamilies() { $fontDir = $this->getOptions()->getFontDir(); $rootDir = $this->getOptions()->getRootDir(); // FIXME: temporarily define constants for cache files <= v0.6.2 if (!defined("DOMPDF_DIR")) { define("DOMPDF_DIR", $rootDir); } if (!defined("DOM...
php
public function loadFontFamilies() { $fontDir = $this->getOptions()->getFontDir(); $rootDir = $this->getOptions()->getRootDir(); // FIXME: temporarily define constants for cache files <= v0.6.2 if (!defined("DOMPDF_DIR")) { define("DOMPDF_DIR", $rootDir); } if (!defined("DOM...
[ "public", "function", "loadFontFamilies", "(", ")", "{", "$", "fontDir", "=", "$", "this", "->", "getOptions", "(", ")", "->", "getFontDir", "(", ")", ";", "$", "rootDir", "=", "$", "this", "->", "getOptions", "(", ")", "->", "getRootDir", "(", ")", ...
Loads the stored font family cache @see FontMetrics::saveFontFamilies()
[ "Loads", "the", "stored", "font", "family", "cache" ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/FontMetrics.php#L123-L151
train
Load fonts from cache
[ 30522, 2270, 3853, 7170, 14876, 3372, 7011, 4328, 11983, 1006, 1007, 1063, 1002, 15489, 4305, 2099, 1027, 1002, 2023, 1011, 1028, 2131, 7361, 9285, 1006, 1007, 1011, 1028, 2131, 14876, 3372, 4305, 2099, 1006, 1007, 1025, 1002, 7117, 4305, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/ExamplePlugin/Updates/0.0.2.php
Updates_0_0_2.getMigrations
public function getMigrations(Updater $updater) { // many different migrations are available to be used via $this->migration factory $migration1 = $this->migration->db->changeColumnType('log_visit', 'example', 'BOOLEAN NOT NULL'); // you can also define custom SQL migrations. If you need to ...
php
public function getMigrations(Updater $updater) { // many different migrations are available to be used via $this->migration factory $migration1 = $this->migration->db->changeColumnType('log_visit', 'example', 'BOOLEAN NOT NULL'); // you can also define custom SQL migrations. If you need to ...
[ "public", "function", "getMigrations", "(", "Updater", "$", "updater", ")", "{", "// many different migrations are available to be used via $this->migration factory", "$", "migration1", "=", "$", "this", "->", "migration", "->", "db", "->", "changeColumnType", "(", "'log_...
Return database migrations to be executed in this update. Database migrations should be defined here, instead of in `doUpdate()`, since this method is used in the `core:update` command when displaying the queries an update will run. If you execute migrations directly in `doUpdate()`, they won't be displayed to the use...
[ "Return", "database", "migrations", "to", "be", "executed", "in", "this", "update", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/ExamplePlugin/Updates/0.0.2.php#L43-L54
train
Returns the migrations available for the current user
[ 30522, 2270, 3853, 2131, 4328, 29397, 2015, 1006, 10651, 2099, 1002, 10651, 2099, 1007, 1063, 1013, 1013, 2116, 2367, 9230, 2015, 2024, 2800, 2000, 2022, 2109, 3081, 1002, 2023, 1011, 1028, 9230, 4713, 1002, 9230, 2487, 1027, 1002, 2023, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Db/Adapter/Db2.php
Zend_Db_Adapter_Db2.prepare
public function prepare($sql) { $this->_connect(); $stmtClass = $this->_defaultStmtClass; if (!class_exists($stmtClass)) { // require_once 'Zend/Loader.php'; Zend_Loader::loadClass($stmtClass); } $stmt = new $stmtClass($this, $sql); $stmt->setF...
php
public function prepare($sql) { $this->_connect(); $stmtClass = $this->_defaultStmtClass; if (!class_exists($stmtClass)) { // require_once 'Zend/Loader.php'; Zend_Loader::loadClass($stmtClass); } $stmt = new $stmtClass($this, $sql); $stmt->setF...
[ "public", "function", "prepare", "(", "$", "sql", ")", "{", "$", "this", "->", "_connect", "(", ")", ";", "$", "stmtClass", "=", "$", "this", "->", "_defaultStmtClass", ";", "if", "(", "!", "class_exists", "(", "$", "stmtClass", ")", ")", "{", "// re...
Returns an SQL statement for preparation. @param string $sql The SQL statement with placeholders. @return Zend_Db_Statement_Db2
[ "Returns", "an", "SQL", "statement", "for", "preparation", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Adapter/Db2.php#L230-L241
train
Prepare statement for execution
[ 30522, 2270, 3853, 7374, 1006, 1002, 29296, 1007, 1063, 1002, 2023, 1011, 1028, 1035, 7532, 1006, 1007, 1025, 1002, 2358, 20492, 26266, 1027, 1002, 2023, 1011, 1028, 1035, 12398, 3367, 20492, 26266, 1025, 2065, 1006, 999, 2465, 1035, 6526, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Twig.php
Twig.setAutoescape
public function setAutoescape($state) { if (!$state) { user_error(__CLASS__ . '::' . __FUNCTION__ . '(false) is deprecated since Grav 1.5', E_USER_DEPRECATED); } $this->autoescape = (bool) $state; }
php
public function setAutoescape($state) { if (!$state) { user_error(__CLASS__ . '::' . __FUNCTION__ . '(false) is deprecated since Grav 1.5', E_USER_DEPRECATED); } $this->autoescape = (bool) $state; }
[ "public", "function", "setAutoescape", "(", "$", "state", ")", "{", "if", "(", "!", "$", "state", ")", "{", "user_error", "(", "__CLASS__", ".", "'::'", ".", "__FUNCTION__", ".", "'(false) is deprecated since Grav 1.5'", ",", "E_USER_DEPRECATED", ")", ";", "}"...
Overrides the autoescape setting @param bool $state @deprecated 1.5 Auto-escape should always be turned on to protect against XSS issues (can be disabled per template file).
[ "Overrides", "the", "autoescape", "setting" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Twig/Twig.php#L446-L453
train
Set Autoescape
[ 30522, 2270, 3853, 2275, 4887, 3406, 2229, 19464, 1006, 1002, 2110, 1007, 1063, 2065, 1006, 999, 1002, 2110, 1007, 1063, 5310, 1035, 7561, 1006, 1035, 1035, 2465, 1035, 1035, 1012, 1005, 1024, 1024, 1005, 1012, 1035, 1035, 3853, 1035, 103...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/thrift
lib/php/lib/ClassLoader/ThriftClassLoader.php
ThriftClassLoader.loadClass
public function loadClass($class) { if ((true === $this->apc && ($file = $this->findFileInApc($class))) or ($file = $this->findFile($class)) ) { require_once $file; } }
php
public function loadClass($class) { if ((true === $this->apc && ($file = $this->findFileInApc($class))) or ($file = $this->findFile($class)) ) { require_once $file; } }
[ "public", "function", "loadClass", "(", "$", "class", ")", "{", "if", "(", "(", "true", "===", "$", "this", "->", "apc", "&&", "(", "$", "file", "=", "$", "this", "->", "findFileInApc", "(", "$", "class", ")", ")", ")", "or", "(", "$", "file", ...
Loads the given class, definition or interface. @param string $class The name of the class
[ "Loads", "the", "given", "class", "definition", "or", "interface", "." ]
acdd4226c210336e9e15eb812e5932a645fcd5ce
https://github.com/apache/thrift/blob/acdd4226c210336e9e15eb812e5932a645fcd5ce/lib/php/lib/ClassLoader/ThriftClassLoader.php#L102-L109
train
Load a class in the current context
[ 30522, 2270, 3853, 7170, 26266, 1006, 1002, 2465, 1007, 1063, 2065, 1006, 1006, 2995, 1027, 1027, 1027, 1002, 2023, 1011, 1028, 9706, 2278, 1004, 1004, 1006, 1002, 5371, 1027, 1002, 2023, 1011, 1028, 2424, 8873, 19856, 9331, 2278, 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...
matomo-org/matomo
core/Tracker/Visit.php
Visit.isHostKnownAliasHost
public static function isHostKnownAliasHost($urlHost, $idSite) { $websiteData = Cache::getCacheWebsiteAttributes($idSite); if (isset($websiteData['hosts'])) { $canonicalHosts = array(); foreach ($websiteData['hosts'] as $host) { $canonicalHosts[] = self::toCa...
php
public static function isHostKnownAliasHost($urlHost, $idSite) { $websiteData = Cache::getCacheWebsiteAttributes($idSite); if (isset($websiteData['hosts'])) { $canonicalHosts = array(); foreach ($websiteData['hosts'] as $host) { $canonicalHosts[] = self::toCa...
[ "public", "static", "function", "isHostKnownAliasHost", "(", "$", "urlHost", ",", "$", "idSite", ")", "{", "$", "websiteData", "=", "Cache", "::", "getCacheWebsiteAttributes", "(", "$", "idSite", ")", ";", "if", "(", "isset", "(", "$", "websiteData", "[", ...
is the host any of the registered URLs for this website?
[ "is", "the", "host", "any", "of", "the", "registered", "URLs", "for", "this", "website?" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Tracker/Visit.php#L342-L359
train
Check if a host is known as alias host
[ 30522, 2270, 10763, 3853, 2003, 15006, 2102, 2243, 19779, 12032, 7951, 15006, 2102, 1006, 1002, 24471, 28061, 3367, 1010, 1002, 8909, 28032, 2063, 1007, 1063, 1002, 4037, 2850, 2696, 1027, 17053, 1024, 1024, 2131, 3540, 5403, 8545, 5910, 42...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
overtrue/wechat
src/OfficialAccount/Card/JssdkClient.php
JssdkClient.assign
public function assign(array $cards) { return json_encode(array_map(function ($card) { return $this->attachExtension($card['card_id'], $card); }, $cards)); }
php
public function assign(array $cards) { return json_encode(array_map(function ($card) { return $this->attachExtension($card['card_id'], $card); }, $cards)); }
[ "public", "function", "assign", "(", "array", "$", "cards", ")", "{", "return", "json_encode", "(", "array_map", "(", "function", "(", "$", "card", ")", "{", "return", "$", "this", "->", "attachExtension", "(", "$", "card", "[", "'card_id'", "]", ",", ...
微信卡券:JSAPI 卡券发放. @param array $cards @return string
[ "微信卡券:JSAPI", "卡券发放", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/Card/JssdkClient.php#L47-L52
train
assigns cards to the language
[ 30522, 2270, 3853, 23911, 1006, 9140, 1002, 5329, 1007, 1063, 2709, 1046, 3385, 1035, 4372, 16044, 1006, 9140, 1035, 4949, 1006, 3853, 1006, 1002, 4003, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 29489, 18413, 6132, 3258, 1006, 1002, 4003, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...