id
int32
0
241k
repo
stringlengths
6
63
path
stringlengths
5
140
func_name
stringlengths
3
151
original_string
stringlengths
84
13k
language
stringclasses
1 value
code
stringlengths
84
13k
code_tokens
list
docstring
stringlengths
3
47.2k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
91
247
196,400
fridge-project/dbal
src/Fridge/DBAL/Query/QueryBuilder.php
QueryBuilder.having
public function having($expression, $type = Expression\Expression::TYPE_AND) { return $this->addExpression('having', $type, $expression); }
php
public function having($expression, $type = Expression\Expression::TYPE_AND) { return $this->addExpression('having', $type, $expression); }
[ "public", "function", "having", "(", "$", "expression", ",", "$", "type", "=", "Expression", "\\", "Expression", "::", "TYPE_AND", ")", "{", "return", "$", "this", "->", "addExpression", "(", "'having'", ",", "$", "type", ",", "$", "expression", ")", ";"...
Adds an "HAVING" clause to the query. @param string|array|\Fridge\DBAL\Query\Expression\Expression $expression The expression. @param string $type The expression type (AND, OR). @return \Fridge\DBAL\Query\QueryBuilder The query builder.
[ "Adds", "an", "HAVING", "clause", "to", "the", "query", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Query/QueryBuilder.php#L428-L431
196,401
fridge-project/dbal
src/Fridge/DBAL/Query/QueryBuilder.php
QueryBuilder.setParameters
public function setParameters(array $parameters, array $types = array()) { foreach ($parameters as $parameter => $value) { if (isset($types[$parameter])) { $this->setParameter($parameter, $value, $types[$parameter]); } else { $this->setParameter($param...
php
public function setParameters(array $parameters, array $types = array()) { foreach ($parameters as $parameter => $value) { if (isset($types[$parameter])) { $this->setParameter($parameter, $value, $types[$parameter]); } else { $this->setParameter($param...
[ "public", "function", "setParameters", "(", "array", "$", "parameters", ",", "array", "$", "types", "=", "array", "(", ")", ")", "{", "foreach", "(", "$", "parameters", "as", "$", "parameter", "=>", "$", "value", ")", "{", "if", "(", "isset", "(", "$...
Sets query parameters. @param array $parameters The query parameters. @param array $types The query parameter types. @return \Fridge\DBAL\Query\QueryBuilder The query builder.
[ "Sets", "query", "parameters", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Query/QueryBuilder.php#L507-L518
196,402
fridge-project/dbal
src/Fridge/DBAL/Query/QueryBuilder.php
QueryBuilder.createParameter
public function createParameter($value, $type = null) { if ($this->mode === self::MODE_POSITIONAL) { return $this->createPositionalParameter($value, $type); } return $this->createNamedParameter($value, $type); }
php
public function createParameter($value, $type = null) { if ($this->mode === self::MODE_POSITIONAL) { return $this->createPositionalParameter($value, $type); } return $this->createNamedParameter($value, $type); }
[ "public", "function", "createParameter", "(", "$", "value", ",", "$", "type", "=", "null", ")", "{", "if", "(", "$", "this", "->", "mode", "===", "self", "::", "MODE_POSITIONAL", ")", "{", "return", "$", "this", "->", "createPositionalParameter", "(", "$...
Creates and sets a parameter. @param mixed $value The value. @param mixed $type The type. @return string The parameter placeholder.
[ "Creates", "and", "sets", "a", "parameter", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Query/QueryBuilder.php#L555-L562
196,403
fridge-project/dbal
src/Fridge/DBAL/Query/QueryBuilder.php
QueryBuilder.createPositionalParameter
public function createPositionalParameter($value, $type = null) { $this->setParameter($this->parameterCounters['positional'], $value, $type); return '?'; }
php
public function createPositionalParameter($value, $type = null) { $this->setParameter($this->parameterCounters['positional'], $value, $type); return '?'; }
[ "public", "function", "createPositionalParameter", "(", "$", "value", ",", "$", "type", "=", "null", ")", "{", "$", "this", "->", "setParameter", "(", "$", "this", "->", "parameterCounters", "[", "'positional'", "]", ",", "$", "value", ",", "$", "type", ...
Creates and sets a positional parameter. @param mixed $value The value. @param mixed $type The type. @return string The positional parameter placeholder.
[ "Creates", "and", "sets", "a", "positional", "parameter", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Query/QueryBuilder.php#L572-L577
196,404
fridge-project/dbal
src/Fridge/DBAL/Query/QueryBuilder.php
QueryBuilder.createNamedParameter
public function createNamedParameter($value, $type = null, $placeholder = null) { if ($placeholder === null) { $placeholder = ':fridge'; } $parameter = substr($placeholder, 1); if (!isset($this->parameterCounters['named'][$parameter])) { $this->parameterCoun...
php
public function createNamedParameter($value, $type = null, $placeholder = null) { if ($placeholder === null) { $placeholder = ':fridge'; } $parameter = substr($placeholder, 1); if (!isset($this->parameterCounters['named'][$parameter])) { $this->parameterCoun...
[ "public", "function", "createNamedParameter", "(", "$", "value", ",", "$", "type", "=", "null", ",", "$", "placeholder", "=", "null", ")", "{", "if", "(", "$", "placeholder", "===", "null", ")", "{", "$", "placeholder", "=", "':fridge'", ";", "}", "$",...
Creates and sets a named parameter. @param mixed $value The value. @param mixed $type The type @param string $placeholder The placeholder. @return string The named parameter placeholder.
[ "Creates", "and", "sets", "a", "named", "parameter", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Query/QueryBuilder.php#L588-L606
196,405
fridge-project/dbal
src/Fridge/DBAL/Query/QueryBuilder.php
QueryBuilder.getParameterType
public function getParameterType($identifier) { return isset($this->parameterTypes[$identifier]) ? $this->parameterTypes[$identifier] : null; }
php
public function getParameterType($identifier) { return isset($this->parameterTypes[$identifier]) ? $this->parameterTypes[$identifier] : null; }
[ "public", "function", "getParameterType", "(", "$", "identifier", ")", "{", "return", "isset", "(", "$", "this", "->", "parameterTypes", "[", "$", "identifier", "]", ")", "?", "$", "this", "->", "parameterTypes", "[", "$", "identifier", "]", ":", "null", ...
Gets a query parameter type. @param string $identifier The identifier. @return mixed The query parameter type.
[ "Gets", "a", "query", "parameter", "type", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Query/QueryBuilder.php#L647-L650
196,406
fridge-project/dbal
src/Fridge/DBAL/Query/QueryBuilder.php
QueryBuilder.getQuery
public function getQuery() { $query = null; switch ($this->type) { case self::SELECT: $query = $this->getSelectQuery(); break; case self::INSERT: $query = $this->getInsertQuery(); break; case self::U...
php
public function getQuery() { $query = null; switch ($this->type) { case self::SELECT: $query = $this->getSelectQuery(); break; case self::INSERT: $query = $this->getInsertQuery(); break; case self::U...
[ "public", "function", "getQuery", "(", ")", "{", "$", "query", "=", "null", ";", "switch", "(", "$", "this", "->", "type", ")", "{", "case", "self", "::", "SELECT", ":", "$", "query", "=", "$", "this", "->", "getSelectQuery", "(", ")", ";", "break"...
Gets the generated query. @return string The generated query.
[ "Gets", "the", "generated", "query", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Query/QueryBuilder.php#L657-L677
196,407
fridge-project/dbal
src/Fridge/DBAL/Query/QueryBuilder.php
QueryBuilder.addExpression
private function addExpression($part, $type, $expression) { if (!($expression instanceof Expression\Expression)) { $expression = new Expression\Expression($type, (array) $expression); } if ($this->parts[$part] === null) { $this->parts[$part] = $expression; ...
php
private function addExpression($part, $type, $expression) { if (!($expression instanceof Expression\Expression)) { $expression = new Expression\Expression($type, (array) $expression); } if ($this->parts[$part] === null) { $this->parts[$part] = $expression; ...
[ "private", "function", "addExpression", "(", "$", "part", ",", "$", "type", ",", "$", "expression", ")", "{", "if", "(", "!", "(", "$", "expression", "instanceof", "Expression", "\\", "Expression", ")", ")", "{", "$", "expression", "=", "new", "Expressio...
Adds an expression to the "WHERE" or "HAVING" clause. @param string $part The query part. @param string $type The expression type (AND, OR) @param string|array|\Fridge\DBAL\Query\Expression\Expression $expression ...
[ "Adds", "an", "expression", "to", "the", "WHERE", "or", "HAVING", "clause", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Query/QueryBuilder.php#L702-L723
196,408
fridge-project/dbal
src/Fridge/DBAL/Query/QueryBuilder.php
QueryBuilder.getSelectQuery
private function getSelectQuery() { return 'SELECT '.(empty($this->parts['select']) ? '*' : implode(', ', $this->parts['select'])). ' FROM '.$this->getFromClause(). (($this->parts['where'] !== null) ? ' WHERE '.$this->parts['where'] : null). (!empty($this->parts[...
php
private function getSelectQuery() { return 'SELECT '.(empty($this->parts['select']) ? '*' : implode(', ', $this->parts['select'])). ' FROM '.$this->getFromClause(). (($this->parts['where'] !== null) ? ' WHERE '.$this->parts['where'] : null). (!empty($this->parts[...
[ "private", "function", "getSelectQuery", "(", ")", "{", "return", "'SELECT '", ".", "(", "empty", "(", "$", "this", "->", "parts", "[", "'select'", "]", ")", "?", "'*'", ":", "implode", "(", "', '", ",", "$", "this", "->", "parts", "[", "'select'", "...
Generates a "SELECT" query @return string The "SELECT" query.
[ "Generates", "a", "SELECT", "query" ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Query/QueryBuilder.php#L730-L740
196,409
fridge-project/dbal
src/Fridge/DBAL/Query/QueryBuilder.php
QueryBuilder.getInsertQuery
private function getInsertQuery() { return 'INSERT INTO '.$this->parts['from'][0]['table']. ' ('.implode(', ', array_keys($this->parts['set'])).')'. ' VALUES'. ' ('.implode(', ', $this->parts['set']).')'; }
php
private function getInsertQuery() { return 'INSERT INTO '.$this->parts['from'][0]['table']. ' ('.implode(', ', array_keys($this->parts['set'])).')'. ' VALUES'. ' ('.implode(', ', $this->parts['set']).')'; }
[ "private", "function", "getInsertQuery", "(", ")", "{", "return", "'INSERT INTO '", ".", "$", "this", "->", "parts", "[", "'from'", "]", "[", "0", "]", "[", "'table'", "]", ".", "' ('", ".", "implode", "(", "', '", ",", "array_keys", "(", "$", "this", ...
Generates an "INSERT" query. @return string The "INSERT" query.
[ "Generates", "an", "INSERT", "query", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Query/QueryBuilder.php#L747-L753
196,410
fridge-project/dbal
src/Fridge/DBAL/Query/QueryBuilder.php
QueryBuilder.getUpdateQuery
private function getUpdateQuery() { if (isset($this->parts['from'][0]['alias'])) { $fromClause = $this->parts['from'][0]['alias'].' FROM '.$this->getFromClause(); } else { $fromClause = $this->parts['from'][0]['table']; } $setClause = array(); foreac...
php
private function getUpdateQuery() { if (isset($this->parts['from'][0]['alias'])) { $fromClause = $this->parts['from'][0]['alias'].' FROM '.$this->getFromClause(); } else { $fromClause = $this->parts['from'][0]['table']; } $setClause = array(); foreac...
[ "private", "function", "getUpdateQuery", "(", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "parts", "[", "'from'", "]", "[", "0", "]", "[", "'alias'", "]", ")", ")", "{", "$", "fromClause", "=", "$", "this", "->", "parts", "[", "'from'", ...
Generates an "UPDATE" query. @return string The "UPDATE" query.
[ "Generates", "an", "UPDATE", "query", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Query/QueryBuilder.php#L760-L777
196,411
fridge-project/dbal
src/Fridge/DBAL/Query/QueryBuilder.php
QueryBuilder.getDeleteQuery
private function getDeleteQuery() { $fromClause = null; if (isset($this->parts['from'][0]['alias'])) { $fromClause = $this->parts['from'][0]['alias'].' '; } $fromClause .= 'FROM '.$this->getFromClause(); return 'DELETE '.$fromClause. (($this->par...
php
private function getDeleteQuery() { $fromClause = null; if (isset($this->parts['from'][0]['alias'])) { $fromClause = $this->parts['from'][0]['alias'].' '; } $fromClause .= 'FROM '.$this->getFromClause(); return 'DELETE '.$fromClause. (($this->par...
[ "private", "function", "getDeleteQuery", "(", ")", "{", "$", "fromClause", "=", "null", ";", "if", "(", "isset", "(", "$", "this", "->", "parts", "[", "'from'", "]", "[", "0", "]", "[", "'alias'", "]", ")", ")", "{", "$", "fromClause", "=", "$", ...
Generates a "DELETE" query. @return string The "DELETE" query.
[ "Generates", "a", "DELETE", "query", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Query/QueryBuilder.php#L784-L796
196,412
fridge-project/dbal
src/Fridge/DBAL/Query/QueryBuilder.php
QueryBuilder.getFromClause
private function getFromClause() { $fromClauses = array(); foreach ($this->parts['from'] as $from) { $fromClause = $from['table']; if ($from['alias'] !== null) { $fromClause .= ' '.$from['alias']; } if (isset($this->parts['join'][$fr...
php
private function getFromClause() { $fromClauses = array(); foreach ($this->parts['from'] as $from) { $fromClause = $from['table']; if ($from['alias'] !== null) { $fromClause .= ' '.$from['alias']; } if (isset($this->parts['join'][$fr...
[ "private", "function", "getFromClause", "(", ")", "{", "$", "fromClauses", "=", "array", "(", ")", ";", "foreach", "(", "$", "this", "->", "parts", "[", "'from'", "]", "as", "$", "from", ")", "{", "$", "fromClause", "=", "$", "from", "[", "'table'", ...
Generates the "FROM" clause. @return string The "FROM" clause.
[ "Generates", "the", "FROM", "clause", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Query/QueryBuilder.php#L803-L826
196,413
phpffcms/ffcms-core
src/Helper/Type/Str.php
Str.cleanExtension
public static function cleanExtension(?string $string): ?string { // no extension in string is founded if (!self::contains('.', $string)) { return $string; } $splited = explode('.', $string); array_pop($splited); return implode('.', $splited); }
php
public static function cleanExtension(?string $string): ?string { // no extension in string is founded if (!self::contains('.', $string)) { return $string; } $splited = explode('.', $string); array_pop($splited); return implode('.', $splited); }
[ "public", "static", "function", "cleanExtension", "(", "?", "string", "$", "string", ")", ":", "?", "string", "{", "// no extension in string is founded", "if", "(", "!", "self", "::", "contains", "(", "'.'", ",", "$", "string", ")", ")", "{", "return", "$...
Remove extension from string @param string $string @return string|null
[ "Remove", "extension", "from", "string" ]
44a309553ef9f115ccfcfd71f2ac6e381c612082
https://github.com/phpffcms/ffcms-core/blob/44a309553ef9f115ccfcfd71f2ac6e381c612082/src/Helper/Type/Str.php#L103-L113
196,414
phpffcms/ffcms-core
src/Helper/Type/Str.php
Str.upperCase
public static function upperCase(?string $string = null): ?string { if ($string === null) { return null; } return mb_strtoupper($string, 'UTF-8'); }
php
public static function upperCase(?string $string = null): ?string { if ($string === null) { return null; } return mb_strtoupper($string, 'UTF-8'); }
[ "public", "static", "function", "upperCase", "(", "?", "string", "$", "string", "=", "null", ")", ":", "?", "string", "{", "if", "(", "$", "string", "===", "null", ")", "{", "return", "null", ";", "}", "return", "mb_strtoupper", "(", "$", "string", "...
Change content to upper case. Analog of strtoupper with UTF-8 @param string|null $string @return string|null
[ "Change", "content", "to", "upper", "case", ".", "Analog", "of", "strtoupper", "with", "UTF", "-", "8" ]
44a309553ef9f115ccfcfd71f2ac6e381c612082
https://github.com/phpffcms/ffcms-core/blob/44a309553ef9f115ccfcfd71f2ac6e381c612082/src/Helper/Type/Str.php#L145-L152
196,415
phpffcms/ffcms-core
src/Helper/Type/Str.php
Str.splitCamelCase
public static function splitCamelCase(string $string, string $glue = ' '): string { $expression = '/(?#! splitCamelCase Rev:20140412) # Split camelCase "words". Two global alternatives. Either g1of2: (?<=[a-z]) # Position is after a lowercase, ...
php
public static function splitCamelCase(string $string, string $glue = ' '): string { $expression = '/(?#! splitCamelCase Rev:20140412) # Split camelCase "words". Two global alternatives. Either g1of2: (?<=[a-z]) # Position is after a lowercase, ...
[ "public", "static", "function", "splitCamelCase", "(", "string", "$", "string", ",", "string", "$", "glue", "=", "' '", ")", ":", "string", "{", "$", "expression", "=", "'/(?#! splitCamelCase Rev:20140412)\n # Split camelCase \"words\". Two global alt...
Split camel case words with glue. camelCaseWords => Camel case words @param string $string @param string $glue @return string
[ "Split", "camel", "case", "words", "with", "glue", ".", "camelCaseWords", "=", ">", "Camel", "case", "words" ]
44a309553ef9f115ccfcfd71f2ac6e381c612082
https://github.com/phpffcms/ffcms-core/blob/44a309553ef9f115ccfcfd71f2ac6e381c612082/src/Helper/Type/Str.php#L171-L192
196,416
phpffcms/ffcms-core
src/Helper/Type/Str.php
Str.concat
public static function concat() { $args = func_get_args(); $separator = array_shift($args); $output = null; foreach ($args as $string) { $output .= $string . $separator; } $output = rtrim($output, $separator); return $output; }
php
public static function concat() { $args = func_get_args(); $separator = array_shift($args); $output = null; foreach ($args as $string) { $output .= $string . $separator; } $output = rtrim($output, $separator); return $output; }
[ "public", "static", "function", "concat", "(", ")", "{", "$", "args", "=", "func_get_args", "(", ")", ";", "$", "separator", "=", "array_shift", "(", "$", "args", ")", ";", "$", "output", "=", "null", ";", "foreach", "(", "$", "args", "as", "$", "s...
Concat string with add string by separator @param string $separator @param string $string1 @param string $string2 @return string
[ "Concat", "string", "with", "add", "string", "by", "separator" ]
44a309553ef9f115ccfcfd71f2ac6e381c612082
https://github.com/phpffcms/ffcms-core/blob/44a309553ef9f115ccfcfd71f2ac6e381c612082/src/Helper/Type/Str.php#L336-L348
196,417
freialib/ran.tools
src/Trait/Form.php
FormTrait.btn
function btn($label, $tagbody) { return $this->button($label, null, $tagbody) ->set('type', null); }
php
function btn($label, $tagbody) { return $this->button($label, null, $tagbody) ->set('type', null); }
[ "function", "btn", "(", "$", "label", ",", "$", "tagbody", ")", "{", "return", "$", "this", "->", "button", "(", "$", "label", ",", "null", ",", "$", "tagbody", ")", "->", "set", "(", "'type'", ",", "null", ")", ";", "}" ]
Same as button only it doenst submit data. @return \ran\Field
[ "Same", "as", "button", "only", "it", "doenst", "submit", "data", "." ]
f4cbb926ef54da357b102cbfa4b6ce273be6ce63
https://github.com/freialib/ran.tools/blob/f4cbb926ef54da357b102cbfa4b6ce273be6ce63/src/Trait/Form.php#L92-L95
196,418
freialib/ran.tools
src/Trait/Form.php
FormTrait.errors
function errors($fieldname) { if ($fieldname == null) { return null; } else { # field errors if ($this->errors !== null) { if (isset($this->errors[$fieldname])) { return $this->errors[$fieldname]; } else { # not set return null; } } } }
php
function errors($fieldname) { if ($fieldname == null) { return null; } else { # field errors if ($this->errors !== null) { if (isset($this->errors[$fieldname])) { return $this->errors[$fieldname]; } else { # not set return null; } } } }
[ "function", "errors", "(", "$", "fieldname", ")", "{", "if", "(", "$", "fieldname", "==", "null", ")", "{", "return", "null", ";", "}", "else", "{", "# field errors", "if", "(", "$", "this", "->", "errors", "!==", "null", ")", "{", "if", "(", "isse...
Retrieves errors for a given field or all errors if no field is specified. @return array or null
[ "Retrieves", "errors", "for", "a", "given", "field", "or", "all", "errors", "if", "no", "field", "is", "specified", "." ]
f4cbb926ef54da357b102cbfa4b6ce273be6ce63
https://github.com/freialib/ran.tools/blob/f4cbb926ef54da357b102cbfa4b6ce273be6ce63/src/Trait/Form.php#L289-L303
196,419
freialib/ran.tools
src/Trait/Form.php
FormTrait.addfieldconfigurer
function addfieldconfigurer(callable $configurer, $fieldtypes = null) { $fieldtypes != null or $fieldtypes = 'field'; is_array($fieldtypes) or $fieldtypes = [$fieldtypes]; foreach ($fieldtypes as $fieldtype) { $this->fieldconfigurers[$fieldtype] = $configurer; } return $this; }
php
function addfieldconfigurer(callable $configurer, $fieldtypes = null) { $fieldtypes != null or $fieldtypes = 'field'; is_array($fieldtypes) or $fieldtypes = [$fieldtypes]; foreach ($fieldtypes as $fieldtype) { $this->fieldconfigurers[$fieldtype] = $configurer; } return $this; }
[ "function", "addfieldconfigurer", "(", "callable", "$", "configurer", ",", "$", "fieldtypes", "=", "null", ")", "{", "$", "fieldtypes", "!=", "null", "or", "$", "fieldtypes", "=", "'field'", ";", "is_array", "(", "$", "fieldtypes", ")", "or", "$", "fieldty...
Adds a configurer to the field. The configurer is called by the fields during rendering. The configurer is primarily used for formatting. If fieldtype is null the configurer will apply to all fields in the absence of a specialized configurer. @return static $this
[ "Adds", "a", "configurer", "to", "the", "field", ".", "The", "configurer", "is", "called", "by", "the", "fields", "during", "rendering", ".", "The", "configurer", "is", "primarily", "used", "for", "formatting", "." ]
f4cbb926ef54da357b102cbfa4b6ce273be6ce63
https://github.com/freialib/ran.tools/blob/f4cbb926ef54da357b102cbfa4b6ce273be6ce63/src/Trait/Form.php#L346-L355
196,420
praxigento/mobi_mod_downline
Plugin/Magento/Customer/Model/GroupManagement.php
GroupManagement.aroundGetNotLoggedInGroup
public function aroundGetNotLoggedInGroup( \Magento\Customer\Model\GroupManagement $subject, \Closure $proceed ) { /* call parent to process other around-plugins */ $result = $proceed(); /* check referral code in registry */ $code = $this->hlpReferral->getReferral...
php
public function aroundGetNotLoggedInGroup( \Magento\Customer\Model\GroupManagement $subject, \Closure $proceed ) { /* call parent to process other around-plugins */ $result = $proceed(); /* check referral code in registry */ $code = $this->hlpReferral->getReferral...
[ "public", "function", "aroundGetNotLoggedInGroup", "(", "\\", "Magento", "\\", "Customer", "\\", "Model", "\\", "GroupManagement", "$", "subject", ",", "\\", "Closure", "$", "proceed", ")", "{", "/* call parent to process other around-plugins */", "$", "result", "=", ...
Get referral group data instead of anonymous group. @param \Magento\Customer\Model\GroupManagement $subject @param \Closure $proceed @return \Magento\Customer\Api\Data\GroupInterface @throws \Magento\Framework\Exception\LocalizedException
[ "Get", "referral", "group", "data", "instead", "of", "anonymous", "group", "." ]
0f3c276dfff1aa029f9fd205ccfc56f207a2e75b
https://github.com/praxigento/mobi_mod_downline/blob/0f3c276dfff1aa029f9fd205ccfc56f207a2e75b/Plugin/Magento/Customer/Model/GroupManagement.php#L37-L52
196,421
Kris-Kuiper/sFire-Framework
src/Container/Container.php
Container.add
public static function add($key, $value) { if(null === $value && is_array($key)) { foreach($key as $index => $value) { static :: $data[$index] = $value; } return; } if(true === isset(static :: $data[$key]) && true === is_array(static :: $data[$key])) { if(true === is_array($value...
php
public static function add($key, $value) { if(null === $value && is_array($key)) { foreach($key as $index => $value) { static :: $data[$index] = $value; } return; } if(true === isset(static :: $data[$key]) && true === is_array(static :: $data[$key])) { if(true === is_array($value...
[ "public", "static", "function", "add", "(", "$", "key", ",", "$", "value", ")", "{", "if", "(", "null", "===", "$", "value", "&&", "is_array", "(", "$", "key", ")", ")", "{", "foreach", "(", "$", "key", "as", "$", "index", "=>", "$", "value", "...
Stores a new piece of data and tries to merge the data if already exists @param string|array $key @param mixed $value
[ "Stores", "a", "new", "piece", "of", "data", "and", "tries", "to", "merge", "the", "data", "if", "already", "exists" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Container/Container.php#L23-L45
196,422
Kris-Kuiper/sFire-Framework
src/Container/Container.php
Container.set
public static function set($key, $value) { if(false === is_string($key)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($key)), E_USER_ERROR); } static :: $data[$key] = $value; }
php
public static function set($key, $value) { if(false === is_string($key)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($key)), E_USER_ERROR); } static :: $data[$key] = $value; }
[ "public", "static", "function", "set", "(", "$", "key", ",", "$", "value", ")", "{", "if", "(", "false", "===", "is_string", "(", "$", "key", ")", ")", "{", "return", "trigger_error", "(", "sprintf", "(", "'Argument 1 passed to %s() must be of the type string,...
Stores a new piece of data and overwrites the data if already exists @param string $key @param mixed $value
[ "Stores", "a", "new", "piece", "of", "data", "and", "overwrites", "the", "data", "if", "already", "exists" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Container/Container.php#L53-L60
196,423
Kris-Kuiper/sFire-Framework
src/Container/Container.php
Container.remove
public static function remove($key) { if(false === is_string($key)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($key)), E_USER_ERROR); } if($key && isset(static :: $data[$key])) { unset(static :: $data[$key]); } }
php
public static function remove($key) { if(false === is_string($key)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($key)), E_USER_ERROR); } if($key && isset(static :: $data[$key])) { unset(static :: $data[$key]); } }
[ "public", "static", "function", "remove", "(", "$", "key", ")", "{", "if", "(", "false", "===", "is_string", "(", "$", "key", ")", ")", "{", "return", "trigger_error", "(", "sprintf", "(", "'Argument 1 passed to %s() must be of the type string, \"%s\" given'", ","...
Remove data based on key @param string $key
[ "Remove", "data", "based", "on", "key" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/Container/Container.php#L90-L99
196,424
Stillat/Common
src/Stillat/Common/Math/FluentCalculator.php
FluentCalculator.set
public function set($number) { $this->setCurrentValue($number); $this->currentOperation = 'add'; $this->addToHistory('set', $number); return $this; }
php
public function set($number) { $this->setCurrentValue($number); $this->currentOperation = 'add'; $this->addToHistory('set', $number); return $this; }
[ "public", "function", "set", "(", "$", "number", ")", "{", "$", "this", "->", "setCurrentValue", "(", "$", "number", ")", ";", "$", "this", "->", "currentOperation", "=", "'add'", ";", "$", "this", "->", "addToHistory", "(", "'set'", ",", "$", "number"...
Sets the current value. @param $number @return $this
[ "Sets", "the", "current", "value", "." ]
9f69105292740c307aece588cf58a85892bad350
https://github.com/Stillat/Common/blob/9f69105292740c307aece588cf58a85892bad350/src/Stillat/Common/Math/FluentCalculator.php#L180-L186
196,425
Stillat/Common
src/Stillat/Common/Math/FluentCalculator.php
FluentCalculator.performOperationOnExpressionEngine
protected function performOperationOnExpressionEngine($operation, $number) { $this->currentOperation = $operation; if (is_array($number)) { foreach ($number as $actualNumber) { $this->{$operation}($actualNumber); } } else { $this->addToHist...
php
protected function performOperationOnExpressionEngine($operation, $number) { $this->currentOperation = $operation; if (is_array($number)) { foreach ($number as $actualNumber) { $this->{$operation}($actualNumber); } } else { $this->addToHist...
[ "protected", "function", "performOperationOnExpressionEngine", "(", "$", "operation", ",", "$", "number", ")", "{", "$", "this", "->", "currentOperation", "=", "$", "operation", ";", "if", "(", "is_array", "(", "$", "number", ")", ")", "{", "foreach", "(", ...
Helper function to recursively call a method on the FluentCalculator and the underlying expression engine. @param $operation @param $number
[ "Helper", "function", "to", "recursively", "call", "a", "method", "on", "the", "FluentCalculator", "and", "the", "underlying", "expression", "engine", "." ]
9f69105292740c307aece588cf58a85892bad350
https://github.com/Stillat/Common/blob/9f69105292740c307aece588cf58a85892bad350/src/Stillat/Common/Math/FluentCalculator.php#L195-L206
196,426
Stillat/Common
src/Stillat/Common/Math/FluentCalculator.php
FluentCalculator.add
public function add($number = null) { if ($number == null) { $this->internalSetOperationModeWithHistory('add'); } elseif ($number instanceof Closure) { $this->internalSetOperationModeWithHistory('add'); return $this->group($number); } else { $t...
php
public function add($number = null) { if ($number == null) { $this->internalSetOperationModeWithHistory('add'); } elseif ($number instanceof Closure) { $this->internalSetOperationModeWithHistory('add'); return $this->group($number); } else { $t...
[ "public", "function", "add", "(", "$", "number", "=", "null", ")", "{", "if", "(", "$", "number", "==", "null", ")", "{", "$", "this", "->", "internalSetOperationModeWithHistory", "(", "'add'", ")", ";", "}", "elseif", "(", "$", "number", "instanceof", ...
Adds a given number to the current value. @param $number @return $this
[ "Adds", "a", "given", "number", "to", "the", "current", "value", "." ]
9f69105292740c307aece588cf58a85892bad350
https://github.com/Stillat/Common/blob/9f69105292740c307aece588cf58a85892bad350/src/Stillat/Common/Math/FluentCalculator.php#L242-L253
196,427
Stillat/Common
src/Stillat/Common/Math/FluentCalculator.php
FluentCalculator.subtract
public function subtract($number = null) { if ($number == null) { $this->internalSetOperationModeWithHistory('subtract'); } elseif($number instanceof Closure) { $this->internalSetOperationModeWithHistory('subtract'); return $this->group($number); } else { ...
php
public function subtract($number = null) { if ($number == null) { $this->internalSetOperationModeWithHistory('subtract'); } elseif($number instanceof Closure) { $this->internalSetOperationModeWithHistory('subtract'); return $this->group($number); } else { ...
[ "public", "function", "subtract", "(", "$", "number", "=", "null", ")", "{", "if", "(", "$", "number", "==", "null", ")", "{", "$", "this", "->", "internalSetOperationModeWithHistory", "(", "'subtract'", ")", ";", "}", "elseif", "(", "$", "number", "inst...
Subtracts a given number from the current value. @param $number @return $this
[ "Subtracts", "a", "given", "number", "from", "the", "current", "value", "." ]
9f69105292740c307aece588cf58a85892bad350
https://github.com/Stillat/Common/blob/9f69105292740c307aece588cf58a85892bad350/src/Stillat/Common/Math/FluentCalculator.php#L262-L274
196,428
Stillat/Common
src/Stillat/Common/Math/FluentCalculator.php
FluentCalculator.multiply
public function multiply($number = null) { if ($number === null) { $this->internalSetOperationModeWithHistory('multiply'); } elseif ($number instanceof Closure) { $this->internalSetOperationModeWithHistory('multiply'); return $this->group($number); } else ...
php
public function multiply($number = null) { if ($number === null) { $this->internalSetOperationModeWithHistory('multiply'); } elseif ($number instanceof Closure) { $this->internalSetOperationModeWithHistory('multiply'); return $this->group($number); } else ...
[ "public", "function", "multiply", "(", "$", "number", "=", "null", ")", "{", "if", "(", "$", "number", "===", "null", ")", "{", "$", "this", "->", "internalSetOperationModeWithHistory", "(", "'multiply'", ")", ";", "}", "elseif", "(", "$", "number", "ins...
Multiplies the current value by a given number. @param $number @return $this
[ "Multiplies", "the", "current", "value", "by", "a", "given", "number", "." ]
9f69105292740c307aece588cf58a85892bad350
https://github.com/Stillat/Common/blob/9f69105292740c307aece588cf58a85892bad350/src/Stillat/Common/Math/FluentCalculator.php#L283-L295
196,429
Stillat/Common
src/Stillat/Common/Math/FluentCalculator.php
FluentCalculator.divide
public function divide($number = null) { if ($number === null) { $this->internalSetOperationModeWithHistory('divide'); } elseif ($number instanceof Closure) { $this->internalSetOperationModeWithHistory('divide'); return $this->group($number); } else { ...
php
public function divide($number = null) { if ($number === null) { $this->internalSetOperationModeWithHistory('divide'); } elseif ($number instanceof Closure) { $this->internalSetOperationModeWithHistory('divide'); return $this->group($number); } else { ...
[ "public", "function", "divide", "(", "$", "number", "=", "null", ")", "{", "if", "(", "$", "number", "===", "null", ")", "{", "$", "this", "->", "internalSetOperationModeWithHistory", "(", "'divide'", ")", ";", "}", "elseif", "(", "$", "number", "instanc...
Divides the current value by a given number. @param $number @throws \Stillat\Common\Exceptions\Arithmetic\DivideByZeroException; @return $this
[ "Divides", "the", "current", "value", "by", "a", "given", "number", "." ]
9f69105292740c307aece588cf58a85892bad350
https://github.com/Stillat/Common/blob/9f69105292740c307aece588cf58a85892bad350/src/Stillat/Common/Math/FluentCalculator.php#L305-L317
196,430
Stillat/Common
src/Stillat/Common/Math/FluentCalculator.php
FluentCalculator.round
public function round($number, $precision = 0, $mode = PHP_ROUND_HALF_UP) { return $this->runExpressionFunction3Param('round', $number, $precision, $mode); }
php
public function round($number, $precision = 0, $mode = PHP_ROUND_HALF_UP) { return $this->runExpressionFunction3Param('round', $number, $precision, $mode); }
[ "public", "function", "round", "(", "$", "number", ",", "$", "precision", "=", "0", ",", "$", "mode", "=", "PHP_ROUND_HALF_UP", ")", "{", "return", "$", "this", "->", "runExpressionFunction3Param", "(", "'round'", ",", "$", "number", ",", "$", "precision",...
Rounds a number to the nearest value. @param float|Closure $number @param int|Closure $precision optional The number of digits to round to. @param int|Closure $mode optional The rounding mode. @return $this
[ "Rounds", "a", "number", "to", "the", "nearest", "value", "." ]
9f69105292740c307aece588cf58a85892bad350
https://github.com/Stillat/Common/blob/9f69105292740c307aece588cf58a85892bad350/src/Stillat/Common/Math/FluentCalculator.php#L619-L622
196,431
mrimann/CacheBreaker
Classes/FusionObjects/ResourceUriImplementation.php
ResourceUriImplementation.evaluate
public function evaluate() { $path = $this->getPath(); if ($path === null) { throw new FusionException('"path" was not specified', 1386458763); } $package = $this->getPackage(); if ($package === null) { $controllerContext = $this->runtime->getControll...
php
public function evaluate() { $path = $this->getPath(); if ($path === null) { throw new FusionException('"path" was not specified', 1386458763); } $package = $this->getPackage(); if ($package === null) { $controllerContext = $this->runtime->getControll...
[ "public", "function", "evaluate", "(", ")", "{", "$", "path", "=", "$", "this", "->", "getPath", "(", ")", ";", "if", "(", "$", "path", "===", "null", ")", "{", "throw", "new", "FusionException", "(", "'\"path\" was not specified'", ",", "1386458763", ")...
Returns the absolute URL of a resource with cache bursting string @return string @throws FusionException @throws \Exception
[ "Returns", "the", "absolute", "URL", "of", "a", "resource", "with", "cache", "bursting", "string" ]
2b195f06bc2f92d1d9dc069fdc67cc28a3bee576
https://github.com/mrimann/CacheBreaker/blob/2b195f06bc2f92d1d9dc069fdc67cc28a3bee576/Classes/FusionObjects/ResourceUriImplementation.php#L61-L77
196,432
wb-crowdfusion/crowdfusion
system/core/classes/libraries/messages/MessageCodeResolver.php
MessageCodeResolver.getPropertyFilepaths
protected function getPropertyFilepaths() { $file = $this->basename.'.properties'; if($this->MessageService->fileExists($file)) return $this->MessageService->resolveFile($file)->getLocalPath(); return null; }
php
protected function getPropertyFilepaths() { $file = $this->basename.'.properties'; if($this->MessageService->fileExists($file)) return $this->MessageService->resolveFile($file)->getLocalPath(); return null; }
[ "protected", "function", "getPropertyFilepaths", "(", ")", "{", "$", "file", "=", "$", "this", "->", "basename", ".", "'.properties'", ";", "if", "(", "$", "this", "->", "MessageService", "->", "fileExists", "(", "$", "file", ")", ")", "return", "$", "th...
Get a list of reverse-specific absolute property file paths @return array
[ "Get", "a", "list", "of", "reverse", "-", "specific", "absolute", "property", "file", "paths" ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/libraries/messages/MessageCodeResolver.php#L205-L213
196,433
Wedeto/Auth
src/ACL/Rule.php
Rule.setRole
public function setRole($role_id) { if (!empty($role_id) && $this->policy === Rule::NOINHERIT) throw new Exception("Rule::NOINHERIT can not be used in combination with a role"); if ($role_id instanceof Role) { $this->role = $role_id; $role_id = $role_id->...
php
public function setRole($role_id) { if (!empty($role_id) && $this->policy === Rule::NOINHERIT) throw new Exception("Rule::NOINHERIT can not be used in combination with a role"); if ($role_id instanceof Role) { $this->role = $role_id; $role_id = $role_id->...
[ "public", "function", "setRole", "(", "$", "role_id", ")", "{", "if", "(", "!", "empty", "(", "$", "role_id", ")", "&&", "$", "this", "->", "policy", "===", "Rule", "::", "NOINHERIT", ")", "throw", "new", "Exception", "(", "\"Rule::NOINHERIT can not be use...
Set the role this Rule applies to. @param scala|Role $role_id Either a Role object or a Role-ID @throws Wedeto\ACL\Exception When the role is not a Role object or a scalar
[ "Set", "the", "role", "this", "Rule", "applies", "to", "." ]
d53777d860a9e67154b84b425e29da5d4dcd28e0
https://github.com/Wedeto/Auth/blob/d53777d860a9e67154b84b425e29da5d4dcd28e0/src/ACL/Rule.php#L111-L129
196,434
Wedeto/Auth
src/ACL/Rule.php
Rule.setEntity
public function setEntity($entity_id) { if ($entity_id instanceof Entity) { $this->entity = $entity_id; $entity_id = $entity_id->getID(); } elseif (!is_scalar($entity_id)) throw new Exception("Entity-ID must be an Entity or a scalar"); if ...
php
public function setEntity($entity_id) { if ($entity_id instanceof Entity) { $this->entity = $entity_id; $entity_id = $entity_id->getID(); } elseif (!is_scalar($entity_id)) throw new Exception("Entity-ID must be an Entity or a scalar"); if ...
[ "public", "function", "setEntity", "(", "$", "entity_id", ")", "{", "if", "(", "$", "entity_id", "instanceof", "Entity", ")", "{", "$", "this", "->", "entity", "=", "$", "entity_id", ";", "$", "entity_id", "=", "$", "entity_id", "->", "getID", "(", ")"...
Set the entity this Rule applies to @param scalar|Entity $entity_id Either a Entity object or a Role-ID @throws Wedeto\ACL\Exception When the entity is not a Entity object or a scalar
[ "Set", "the", "entity", "this", "Rule", "applies", "to" ]
d53777d860a9e67154b84b425e29da5d4dcd28e0
https://github.com/Wedeto/Auth/blob/d53777d860a9e67154b84b425e29da5d4dcd28e0/src/ACL/Rule.php#L137-L152
196,435
Wedeto/Auth
src/ACL/Rule.php
Rule.setPolicy
public function setPolicy(int $policy) { if (!($policy === Rule::ALLOW || $policy === Rule::DENY || $policy === Rule::INHERIT || $policy === Rule::NOINHERIT)) throw new Exception("Policy must be either Rule::ALLOW, Rule::DENY, Rule::INHERIT or Rule::NOINHERIT"); if ($policy === Rule::NO...
php
public function setPolicy(int $policy) { if (!($policy === Rule::ALLOW || $policy === Rule::DENY || $policy === Rule::INHERIT || $policy === Rule::NOINHERIT)) throw new Exception("Policy must be either Rule::ALLOW, Rule::DENY, Rule::INHERIT or Rule::NOINHERIT"); if ($policy === Rule::NO...
[ "public", "function", "setPolicy", "(", "int", "$", "policy", ")", "{", "if", "(", "!", "(", "$", "policy", "===", "Rule", "::", "ALLOW", "||", "$", "policy", "===", "Rule", "::", "DENY", "||", "$", "policy", "===", "Rule", "::", "INHERIT", "||", "...
Set the policy on the entity @param policy integer Should be one of Rule::ALLOW, Rule::DENY or Rule::UNDEFINED @throws Wedeto\ACL\Exception When the Rule is not ALLOW, DENY or UNDEFINED
[ "Set", "the", "policy", "on", "the", "entity" ]
d53777d860a9e67154b84b425e29da5d4dcd28e0
https://github.com/Wedeto/Auth/blob/d53777d860a9e67154b84b425e29da5d4dcd28e0/src/ACL/Rule.php#L179-L195
196,436
Wedeto/Auth
src/ACL/Rule.php
Rule.setAction
public function setAction(string $action) { if (!empty($action) && $this->policy === Rule::NOINHERIT) throw new Exception("Rule::NOINHERIT can not be used in combination with an action"); $action = (string)$action; if ($action !== $this->action) { $validator ...
php
public function setAction(string $action) { if (!empty($action) && $this->policy === Rule::NOINHERIT) throw new Exception("Rule::NOINHERIT can not be used in combination with an action"); $action = (string)$action; if ($action !== $this->action) { $validator ...
[ "public", "function", "setAction", "(", "string", "$", "action", ")", "{", "if", "(", "!", "empty", "(", "$", "action", ")", "&&", "$", "this", "->", "policy", "===", "Rule", "::", "NOINHERIT", ")", "throw", "new", "Exception", "(", "\"Rule::NOINHERIT ca...
Set the action on the entity @param $action scalar The action this Rule has a policy on. @throws Wedeto\ACL\Exception When the action is not a scalar
[ "Set", "the", "action", "on", "the", "entity" ]
d53777d860a9e67154b84b425e29da5d4dcd28e0
https://github.com/Wedeto/Auth/blob/d53777d860a9e67154b84b425e29da5d4dcd28e0/src/ACL/Rule.php#L202-L219
196,437
kynx/v8js-handlebars
src/Handlebars.php
Handlebars.isRegistered
public static function isRegistered($runtime = false) { $extension = $runtime ? self::EXTN_RUNTIME : self::EXTN_HANDLEBARS; return isset(V8Js::getExtensions()[$extension]); }
php
public static function isRegistered($runtime = false) { $extension = $runtime ? self::EXTN_RUNTIME : self::EXTN_HANDLEBARS; return isset(V8Js::getExtensions()[$extension]); }
[ "public", "static", "function", "isRegistered", "(", "$", "runtime", "=", "false", ")", "{", "$", "extension", "=", "$", "runtime", "?", "self", "::", "EXTN_RUNTIME", ":", "self", "::", "EXTN_HANDLEBARS", ";", "return", "isset", "(", "V8Js", "::", "getExte...
Returns true if the handlebars has been registered with V8Js @param bool|false $runtime @return bool
[ "Returns", "true", "if", "the", "handlebars", "has", "been", "registered", "with", "V8Js" ]
8e450d930efbcd56eb12ba36516831d8e1407a24
https://github.com/kynx/v8js-handlebars/blob/8e450d930efbcd56eb12ba36516831d8e1407a24/src/Handlebars.php#L67-L71
196,438
kynx/v8js-handlebars
src/Handlebars.php
Handlebars.registerHandlebarsExtension
public static function registerHandlebarsExtension($source, $runtime = false) { if (!self::isRegistered($runtime)) { $extension = $runtime ? self::EXTN_RUNTIME : self::EXTN_HANDLEBARS; V8Js::registerExtension($extension, $source, [], false); } }
php
public static function registerHandlebarsExtension($source, $runtime = false) { if (!self::isRegistered($runtime)) { $extension = $runtime ? self::EXTN_RUNTIME : self::EXTN_HANDLEBARS; V8Js::registerExtension($extension, $source, [], false); } }
[ "public", "static", "function", "registerHandlebarsExtension", "(", "$", "source", ",", "$", "runtime", "=", "false", ")", "{", "if", "(", "!", "self", "::", "isRegistered", "(", "$", "runtime", ")", ")", "{", "$", "extension", "=", "$", "runtime", "?", ...
Registers handlebars script with V8Js This *must* be called before the first call to self::create() @param string $source @param boolean $runtime
[ "Registers", "handlebars", "script", "with", "V8Js" ]
8e450d930efbcd56eb12ba36516831d8e1407a24
https://github.com/kynx/v8js-handlebars/blob/8e450d930efbcd56eb12ba36516831d8e1407a24/src/Handlebars.php#L80-L86
196,439
kynx/v8js-handlebars
src/Handlebars.php
Handlebars.create
public static function create($runtime = false, $extensions = [], $report_uncaught_exceptions = true) { return new Handlebars($runtime, $extensions, $report_uncaught_exceptions); }
php
public static function create($runtime = false, $extensions = [], $report_uncaught_exceptions = true) { return new Handlebars($runtime, $extensions, $report_uncaught_exceptions); }
[ "public", "static", "function", "create", "(", "$", "runtime", "=", "false", ",", "$", "extensions", "=", "[", "]", ",", "$", "report_uncaught_exceptions", "=", "true", ")", "{", "return", "new", "Handlebars", "(", "$", "runtime", ",", "$", "extensions", ...
Returns configured Handlebars instance @param boolean $runtime @param array $extensions @param bool|true $report_uncaught_exceptions @return Handlebars
[ "Returns", "configured", "Handlebars", "instance" ]
8e450d930efbcd56eb12ba36516831d8e1407a24
https://github.com/kynx/v8js-handlebars/blob/8e450d930efbcd56eb12ba36516831d8e1407a24/src/Handlebars.php#L95-L98
196,440
kynx/v8js-handlebars
src/Handlebars.php
Handlebars.precompile
public function precompile($template, $options = []) { if ($this->isRuntime) { throw new \BadMethodCallException("Cannot precompile templates using runtime"); } $this->v8->template = $template; $this->v8->options = $options; return $this->v8->executeString( ...
php
public function precompile($template, $options = []) { if ($this->isRuntime) { throw new \BadMethodCallException("Cannot precompile templates using runtime"); } $this->v8->template = $template; $this->v8->options = $options; return $this->v8->executeString( ...
[ "public", "function", "precompile", "(", "$", "template", ",", "$", "options", "=", "[", "]", ")", "{", "if", "(", "$", "this", "->", "isRuntime", ")", "{", "throw", "new", "\\", "BadMethodCallException", "(", "\"Cannot precompile templates using runtime\"", "...
Precompiles a given template so it can be sent to the client and executed without compilation @param string $template @param array $options @return mixed
[ "Precompiles", "a", "given", "template", "so", "it", "can", "be", "sent", "to", "the", "client", "and", "executed", "without", "compilation" ]
8e450d930efbcd56eb12ba36516831d8e1407a24
https://github.com/kynx/v8js-handlebars/blob/8e450d930efbcd56eb12ba36516831d8e1407a24/src/Handlebars.php#L126-L138
196,441
kynx/v8js-handlebars
src/Handlebars.php
Handlebars.registerPartial
public function registerPartial($name, $partial = false) { $partials = []; if (is_array($name)) { $partials = $name; } elseif (is_object($name)) { $partials = get_object_vars($name); } if (count($partials)) { $this->registerPhpArray('parti...
php
public function registerPartial($name, $partial = false) { $partials = []; if (is_array($name)) { $partials = $name; } elseif (is_object($name)) { $partials = get_object_vars($name); } if (count($partials)) { $this->registerPhpArray('parti...
[ "public", "function", "registerPartial", "(", "$", "name", ",", "$", "partial", "=", "false", ")", "{", "$", "partials", "=", "[", "]", ";", "if", "(", "is_array", "(", "$", "name", ")", ")", "{", "$", "partials", "=", "$", "name", ";", "}", "els...
Registers partials accessible by any template in the environment @param string|array|object $name @param string|bool $partial
[ "Registers", "partials", "accessible", "by", "any", "template", "in", "the", "environment" ]
8e450d930efbcd56eb12ba36516831d8e1407a24
https://github.com/kynx/v8js-handlebars/blob/8e450d930efbcd56eb12ba36516831d8e1407a24/src/Handlebars.php#L158-L174
196,442
kynx/v8js-handlebars
src/Handlebars.php
Handlebars.registerHelper
public function registerHelper($name, $helper = false) { if (is_array($name)) { foreach ($name as $n => $helper) { $this->registerHelper($n, $helper); } } elseif (is_object($name)) { $this->registerJavascriptObject('helper', $this->wrapHelperObject...
php
public function registerHelper($name, $helper = false) { if (is_array($name)) { foreach ($name as $n => $helper) { $this->registerHelper($n, $helper); } } elseif (is_object($name)) { $this->registerJavascriptObject('helper', $this->wrapHelperObject...
[ "public", "function", "registerHelper", "(", "$", "name", ",", "$", "helper", "=", "false", ")", "{", "if", "(", "is_array", "(", "$", "name", ")", ")", "{", "foreach", "(", "$", "name", "as", "$", "n", "=>", "$", "helper", ")", "{", "$", "this",...
Registers helpers accessible by any template in the environment @param string|array|object $name @param string|callable|bool $helper
[ "Registers", "helpers", "accessible", "by", "any", "template", "in", "the", "environment" ]
8e450d930efbcd56eb12ba36516831d8e1407a24
https://github.com/kynx/v8js-handlebars/blob/8e450d930efbcd56eb12ba36516831d8e1407a24/src/Handlebars.php#L190-L205
196,443
kynx/v8js-handlebars
src/Handlebars.php
Handlebars.registerDecorator
public function registerDecorator($name, $decorator) { if (is_object($name)) { $this->registerJavascriptObject('decorator', $this->wrapDecoratorObject($name)); } elseif ($decorator === false) { $this->registerJavascriptObject('decorator', $name); } elseif (is_callable...
php
public function registerDecorator($name, $decorator) { if (is_object($name)) { $this->registerJavascriptObject('decorator', $this->wrapDecoratorObject($name)); } elseif ($decorator === false) { $this->registerJavascriptObject('decorator', $name); } elseif (is_callable...
[ "public", "function", "registerDecorator", "(", "$", "name", ",", "$", "decorator", ")", "{", "if", "(", "is_object", "(", "$", "name", ")", ")", "{", "$", "this", "->", "registerJavascriptObject", "(", "'decorator'", ",", "$", "this", "->", "wrapDecorator...
Registers a decorator accessible by any template in the environment @param string|object $name @param string|callable|bool $decorator
[ "Registers", "a", "decorator", "accessible", "by", "any", "template", "in", "the", "environment" ]
8e450d930efbcd56eb12ba36516831d8e1407a24
https://github.com/kynx/v8js-handlebars/blob/8e450d930efbcd56eb12ba36516831d8e1407a24/src/Handlebars.php#L221-L232
196,444
Wedeto/Util
src/Functions.php
Functions.is_int_val
public static function is_int_val($val) { if (is_int($val)) return true; if (is_bool($val)) return false; if (!is_string($val)) return false; return (string)((int)$val) === $val; }
php
public static function is_int_val($val) { if (is_int($val)) return true; if (is_bool($val)) return false; if (!is_string($val)) return false; return (string)((int)$val) === $val; }
[ "public", "static", "function", "is_int_val", "(", "$", "val", ")", "{", "if", "(", "is_int", "(", "$", "val", ")", ")", "return", "true", ";", "if", "(", "is_bool", "(", "$", "val", ")", ")", "return", "false", ";", "if", "(", "!", "is_string", ...
Check if the provided value contains an integer value. The value may be an int, or anything convertable to an int. After conversion, the string representation of the value before and after conversion are compared, and if they are equal, the value is considered a proper integral value. @param mixed $val The value to te...
[ "Check", "if", "the", "provided", "value", "contains", "an", "integer", "value", ".", "The", "value", "may", "be", "an", "int", "or", "anything", "convertable", "to", "an", "int", ".", "After", "conversion", "the", "string", "representation", "of", "the", ...
0e080251bbaa8e7d91ae8d02eb79c029c976744a
https://github.com/Wedeto/Util/blob/0e080251bbaa8e7d91ae8d02eb79c029c976744a/src/Functions.php#L58-L65
196,445
Wedeto/Util
src/Functions.php
Functions.str
public static function str($obj, $html = false, $depth = 0) { if (is_null($obj)) return "NULL"; if (is_bool($obj)) return $obj ? "TRUE" : "FALSE"; if (is_scalar($obj)) return (string)$obj; $str = ""; if ($obj instanceof Throwable) ...
php
public static function str($obj, $html = false, $depth = 0) { if (is_null($obj)) return "NULL"; if (is_bool($obj)) return $obj ? "TRUE" : "FALSE"; if (is_scalar($obj)) return (string)$obj; $str = ""; if ($obj instanceof Throwable) ...
[ "public", "static", "function", "str", "(", "$", "obj", ",", "$", "html", "=", "false", ",", "$", "depth", "=", "0", ")", "{", "if", "(", "is_null", "(", "$", "obj", ")", ")", "return", "\"NULL\"", ";", "if", "(", "is_bool", "(", "$", "obj", ")...
Convert any object to a string representation. @param mixed $obj The variable to convert to a string @param bool $html True to add line breaks as <br>, false to add them as \n @param int $depth The recursion counter. When this increases above 1, '...' is returned @return string The value converted to a string
[ "Convert", "any", "object", "to", "a", "string", "representation", "." ]
0e080251bbaa8e7d91ae8d02eb79c029c976744a
https://github.com/Wedeto/Util/blob/0e080251bbaa8e7d91ae8d02eb79c029c976744a/src/Functions.php#L285-L339
196,446
Wedeto/Util
src/Functions.php
Functions.sprint_r
public static function sprint_r($obj) { ob_start(); print_r($obj); $str = ob_get_contents(); ob_end_clean(); $str = preg_replace("/\s+\\(\s+/", " ( ", $str); $str = preg_replace("/\n\s+/", ", ", $str); $str = preg_replace("/\n\s*\\)/", " )", $str); re...
php
public static function sprint_r($obj) { ob_start(); print_r($obj); $str = ob_get_contents(); ob_end_clean(); $str = preg_replace("/\s+\\(\s+/", " ( ", $str); $str = preg_replace("/\n\s+/", ", ", $str); $str = preg_replace("/\n\s*\\)/", " )", $str); re...
[ "public", "static", "function", "sprint_r", "(", "$", "obj", ")", "{", "ob_start", "(", ")", ";", "print_r", "(", "$", "obj", ")", ";", "$", "str", "=", "ob_get_contents", "(", ")", ";", "ob_end_clean", "(", ")", ";", "$", "str", "=", "preg_replace",...
Format an object using print_r, formatting to a singe line object notation
[ "Format", "an", "object", "using", "print_r", "formatting", "to", "a", "singe", "line", "object", "notation" ]
0e080251bbaa8e7d91ae8d02eb79c029c976744a
https://github.com/Wedeto/Util/blob/0e080251bbaa8e7d91ae8d02eb79c029c976744a/src/Functions.php#L349-L360
196,447
Wedeto/Util
src/Functions.php
Functions.debug
public static function debug(string $format) { if (!is_resource(self::$debug_stream)) self::$debug_stream = fopen('php://output', 'w'); $args = func_get_args(); foreach ($args as $idx => &$arg) { if ($idx === 0) $arg .= PHP_SAPI === 'cli' ? "\...
php
public static function debug(string $format) { if (!is_resource(self::$debug_stream)) self::$debug_stream = fopen('php://output', 'w'); $args = func_get_args(); foreach ($args as $idx => &$arg) { if ($idx === 0) $arg .= PHP_SAPI === 'cli' ? "\...
[ "public", "static", "function", "debug", "(", "string", "$", "format", ")", "{", "if", "(", "!", "is_resource", "(", "self", "::", "$", "debug_stream", ")", ")", "self", "::", "$", "debug_stream", "=", "fopen", "(", "'php://output'", ",", "'w'", ")", "...
Log an output message to a specified stream @param string $format The formatting string @param ... Arguments to fprintf. Non-scalar arguments will be converted to a string using WF::str
[ "Log", "an", "output", "message", "to", "a", "specified", "stream" ]
0e080251bbaa8e7d91ae8d02eb79c029c976744a
https://github.com/Wedeto/Util/blob/0e080251bbaa8e7d91ae8d02eb79c029c976744a/src/Functions.php#L410-L427
196,448
Wedeto/Util
src/Functions.php
Functions.fillPlaceholders
public static function fillPlaceholders(string $msg, array $values) { foreach ($values as $key => $value) $msg = str_replace('{' . $key . '}', self::str($value), $msg); return $msg; }
php
public static function fillPlaceholders(string $msg, array $values) { foreach ($values as $key => $value) $msg = str_replace('{' . $key . '}', self::str($value), $msg); return $msg; }
[ "public", "static", "function", "fillPlaceholders", "(", "string", "$", "msg", ",", "array", "$", "values", ")", "{", "foreach", "(", "$", "values", "as", "$", "key", "=>", "$", "value", ")", "$", "msg", "=", "str_replace", "(", "'{'", ".", "$", "key...
Fill a placeholder string @param string $msg The message to replace placeholder in @param array $values The assocative array containing the placeholders @return string The filled string
[ "Fill", "a", "placeholder", "string" ]
0e080251bbaa8e7d91ae8d02eb79c029c976744a
https://github.com/Wedeto/Util/blob/0e080251bbaa8e7d91ae8d02eb79c029c976744a/src/Functions.php#L444-L449
196,449
Wedeto/Util
src/Functions.php
Functions.clamp
public static function clamp(int $value, int $min, int $max) { return $value < $min ? $min : ($value > $max ? $max : $value); }
php
public static function clamp(int $value, int $min, int $max) { return $value < $min ? $min : ($value > $max ? $max : $value); }
[ "public", "static", "function", "clamp", "(", "int", "$", "value", ",", "int", "$", "min", ",", "int", "$", "max", ")", "{", "return", "$", "value", "<", "$", "min", "?", "$", "min", ":", "(", "$", "value", ">", "$", "max", "?", "$", "max", "...
Restrict the value to a specific valid range. @param int $value The value to clamp @param int $min THe minimum allowable value @param int $max The maximum allowable value @return int The value, $min when $value is less than $min, or $max when $value is more than max.
[ "Restrict", "the", "value", "to", "a", "specific", "valid", "range", "." ]
0e080251bbaa8e7d91ae8d02eb79c029c976744a
https://github.com/Wedeto/Util/blob/0e080251bbaa8e7d91ae8d02eb79c029c976744a/src/Functions.php#L459-L462
196,450
mvccore/ext-tool-locale
src/MvcCore/Ext/Tools/Locale.php
Locale.translateParsedLocaleToAppValue
protected static function translateParsedLocaleToAppValue (\stdClass $parsedLocale) { if (!static::$windowsPlatform) { $result = $parsedLocale; } else { $result = (object) array_merge([], (array) $parsedLocale); if (!static::$LANGS) static::prepareWinConfigOppositeArrays(); $langAndLocale = $parsedLoca...
php
protected static function translateParsedLocaleToAppValue (\stdClass $parsedLocale) { if (!static::$windowsPlatform) { $result = $parsedLocale; } else { $result = (object) array_merge([], (array) $parsedLocale); if (!static::$LANGS) static::prepareWinConfigOppositeArrays(); $langAndLocale = $parsedLoca...
[ "protected", "static", "function", "translateParsedLocaleToAppValue", "(", "\\", "stdClass", "$", "parsedLocale", ")", "{", "if", "(", "!", "static", "::", "$", "windowsPlatform", ")", "{", "$", "result", "=", "$", "parsedLocale", ";", "}", "else", "{", "$",...
Translate parsed system locale value into application locale value. Do not translate anything on non-windows plaforms, but translate windows system locale value language, terotiry and encoding combination into standard application values. @param \stdClass $parsedLocale @return \stdClass
[ "Translate", "parsed", "system", "locale", "value", "into", "application", "locale", "value", ".", "Do", "not", "translate", "anything", "on", "non", "-", "windows", "plaforms", "but", "translate", "windows", "system", "locale", "value", "language", "terotiry", ...
bd34466dd9d524f3e3c7b5f34aa358b9e6f49fe9
https://github.com/mvccore/ext-tool-locale/blob/bd34466dd9d524f3e3c7b5f34aa358b9e6f49fe9/src/MvcCore/Ext/Tools/Locale.php#L1015-L1064
196,451
OpenConext/Stepup-u2f-bundle
src/Service/U2fService.php
U2fService.verifyAuthentication
public function verifyAuthentication(Registration $registration, SignRequest $request, SignResponse $response) { if (!$this->appId->equals(new AppId($request->appId))) { return AuthenticationVerificationResult::appIdMismatch(); } if ($response->errorCode > 0) { retur...
php
public function verifyAuthentication(Registration $registration, SignRequest $request, SignResponse $response) { if (!$this->appId->equals(new AppId($request->appId))) { return AuthenticationVerificationResult::appIdMismatch(); } if ($response->errorCode > 0) { retur...
[ "public", "function", "verifyAuthentication", "(", "Registration", "$", "registration", ",", "SignRequest", "$", "request", ",", "SignResponse", "$", "response", ")", "{", "if", "(", "!", "$", "this", "->", "appId", "->", "equals", "(", "new", "AppId", "(", ...
Request signing of a sign request. Does not support U2F's sign counter system. @param Registration $registration The registration that is to be signed. @param SignRequest $request The sign request that you requested earlier and was used to query the U2F device. @param SignResponse $response The response that the U2F ...
[ "Request", "signing", "of", "a", "sign", "request", ".", "Does", "not", "support", "U2F", "s", "sign", "counter", "system", "." ]
992f91db04afaad98f0d10645d81f4e3ea6742d0
https://github.com/OpenConext/Stepup-u2f-bundle/blob/992f91db04afaad98f0d10645d81f4e3ea6742d0/src/Service/U2fService.php#L160-L222
196,452
ZhukV/AppleModel
src/Apple/Model/AbstractModel.php
AbstractModel.serialize
public function serialize() { $data = array(); foreach (get_object_vars($this) as $propertyName => $propertyValue) { $data[$propertyName] = $propertyValue; } return serialize($data); }
php
public function serialize() { $data = array(); foreach (get_object_vars($this) as $propertyName => $propertyValue) { $data[$propertyName] = $propertyValue; } return serialize($data); }
[ "public", "function", "serialize", "(", ")", "{", "$", "data", "=", "array", "(", ")", ";", "foreach", "(", "get_object_vars", "(", "$", "this", ")", "as", "$", "propertyName", "=>", "$", "propertyValue", ")", "{", "$", "data", "[", "$", "propertyName"...
Implements of \Serializable
[ "Implements", "of", "\\", "Serializable" ]
3ab06d560b7c442b8ebafdd95d1d2523b40ef903
https://github.com/ZhukV/AppleModel/blob/3ab06d560b7c442b8ebafdd95d1d2523b40ef903/src/Apple/Model/AbstractModel.php#L46-L55
196,453
ZhukV/AppleModel
src/Apple/Model/AbstractModel.php
AbstractModel.unserialize
public function unserialize($str) { $data = @unserialize($str); if ($data === false) { throw new \RuntimeException(sprintf('Can\'t unserialize model data: %s', $str)); } if (!is_array($data)) { throw new \RuntimeException(sprintf('Unserialized data must be a...
php
public function unserialize($str) { $data = @unserialize($str); if ($data === false) { throw new \RuntimeException(sprintf('Can\'t unserialize model data: %s', $str)); } if (!is_array($data)) { throw new \RuntimeException(sprintf('Unserialized data must be a...
[ "public", "function", "unserialize", "(", "$", "str", ")", "{", "$", "data", "=", "@", "unserialize", "(", "$", "str", ")", ";", "if", "(", "$", "data", "===", "false", ")", "{", "throw", "new", "\\", "RuntimeException", "(", "sprintf", "(", "'Can\\'...
Implements if \Serializable
[ "Implements", "if", "\\", "Serializable" ]
3ab06d560b7c442b8ebafdd95d1d2523b40ef903
https://github.com/ZhukV/AppleModel/blob/3ab06d560b7c442b8ebafdd95d1d2523b40ef903/src/Apple/Model/AbstractModel.php#L60-L79
196,454
Hnto/nuki
src/Handlers/Provider/Params.php
Params.get
public function get($key = false, $default = false) { if ($key === false) { return $this->params; } if (!$this->has($key) && $default === false) { return new Param($key, null); } if (!$this->has($key) && $default !== false) { return new Param($key,...
php
public function get($key = false, $default = false) { if ($key === false) { return $this->params; } if (!$this->has($key) && $default === false) { return new Param($key, null); } if (!$this->has($key) && $default !== false) { return new Param($key,...
[ "public", "function", "get", "(", "$", "key", "=", "false", ",", "$", "default", "=", "false", ")", "{", "if", "(", "$", "key", "===", "false", ")", "{", "return", "$", "this", "->", "params", ";", "}", "if", "(", "!", "$", "this", "->", "has",...
Get param value by key or false for all params Optional set default if not found @param bool $key @param bool $default @return Param|array
[ "Get", "param", "value", "by", "key", "or", "false", "for", "all", "params", "Optional", "set", "default", "if", "not", "found" ]
c3fb16244e8d611c335a88e3b9c9ee7d81fafc0c
https://github.com/Hnto/nuki/blob/c3fb16244e8d611c335a88e3b9c9ee7d81fafc0c/src/Handlers/Provider/Params.php#L52-L66
196,455
Dhii/iterator-abstract
src/KeyAwareIterableTrait.php
KeyAwareIterableTrait._getCurrentIterableKey
protected function _getCurrentIterableKey(&$iterable) { $current = $this->_getCurrentIterableValue($iterable); return ($current instanceof KeyAwareInterface) ? $current->getKey() : key($iterable); }
php
protected function _getCurrentIterableKey(&$iterable) { $current = $this->_getCurrentIterableValue($iterable); return ($current instanceof KeyAwareInterface) ? $current->getKey() : key($iterable); }
[ "protected", "function", "_getCurrentIterableKey", "(", "&", "$", "iterable", ")", "{", "$", "current", "=", "$", "this", "->", "_getCurrentIterableValue", "(", "$", "iterable", ")", ";", "return", "(", "$", "current", "instanceof", "KeyAwareInterface", ")", "...
Retrieves the key for the current element of an iterable. @since [*next-version*] @param array|Traversable $iterable The iterable. @return string|int|null The current key.
[ "Retrieves", "the", "key", "for", "the", "current", "element", "of", "an", "iterable", "." ]
576484183865575ffc2a0d586132741329626fb8
https://github.com/Dhii/iterator-abstract/blob/576484183865575ffc2a0d586132741329626fb8/src/KeyAwareIterableTrait.php#L24-L31
196,456
ARCANESOFT/Auth
src/Providers/ViewComposerServiceProvider.php
ViewComposerServiceProvider.registerOtherComposers
private function registerOtherComposers() { $this->composer( 'auth::admin.roles._partials.permissions-checkbox', 'Arcanesoft\Auth\ViewComposers\PermissionsComposer@composeRolePermissions' ); $this->composer( 'auth::admin.users.index', 'Arcanes...
php
private function registerOtherComposers() { $this->composer( 'auth::admin.roles._partials.permissions-checkbox', 'Arcanesoft\Auth\ViewComposers\PermissionsComposer@composeRolePermissions' ); $this->composer( 'auth::admin.users.index', 'Arcanes...
[ "private", "function", "registerOtherComposers", "(", ")", "{", "$", "this", "->", "composer", "(", "'auth::admin.roles._partials.permissions-checkbox'", ",", "'Arcanesoft\\Auth\\ViewComposers\\PermissionsComposer@composeRolePermissions'", ")", ";", "$", "this", "->", "composer...
Register other view composers.
[ "Register", "other", "view", "composers", "." ]
b33ca82597a76b1e395071f71ae3e51f1ec67e62
https://github.com/ARCANESOFT/Auth/blob/b33ca82597a76b1e395071f71ae3e51f1ec67e62/src/Providers/ViewComposerServiceProvider.php#L54-L70
196,457
vpg/titon.utility
src/Titon/Utility/Validator.php
Validator.addField
public function addField($field, $title, array $rules = array()) { $this->_fields[$field] = $title; /** * 0 => rule * rule => [opt, ...] */ if ($rules) { foreach ($rules as $rule => $options) { if (is_numeric($rule)) { $...
php
public function addField($field, $title, array $rules = array()) { $this->_fields[$field] = $title; /** * 0 => rule * rule => [opt, ...] */ if ($rules) { foreach ($rules as $rule => $options) { if (is_numeric($rule)) { $...
[ "public", "function", "addField", "(", "$", "field", ",", "$", "title", ",", "array", "$", "rules", "=", "array", "(", ")", ")", "{", "$", "this", "->", "_fields", "[", "$", "field", "]", "=", "$", "title", ";", "/**\n * 0 => rule\n * rul...
Add a field to be used in validation. Can optionally apply an array of validation rules. @param string $field @param string $title @param array $rules @return $this
[ "Add", "a", "field", "to", "be", "used", "in", "validation", ".", "Can", "optionally", "apply", "an", "array", "of", "validation", "rules", "." ]
8a77eb9e7b8baacf41cc25487289779d8319cd3a
https://github.com/vpg/titon.utility/blob/8a77eb9e7b8baacf41cc25487289779d8319cd3a/src/Titon/Utility/Validator.php#L85-L104
196,458
vpg/titon.utility
src/Titon/Utility/Validator.php
Validator.addRule
public function addRule($field, $rule, $message, $options = array()) { if (empty($this->_fields[$field])) { throw new InvalidArgumentException(sprintf('Field %s does not exist', $field)); } if (isset($this->_messages[$rule])) { $message = $message ?: $this->_messages[$ru...
php
public function addRule($field, $rule, $message, $options = array()) { if (empty($this->_fields[$field])) { throw new InvalidArgumentException(sprintf('Field %s does not exist', $field)); } if (isset($this->_messages[$rule])) { $message = $message ?: $this->_messages[$ru...
[ "public", "function", "addRule", "(", "$", "field", ",", "$", "rule", ",", "$", "message", ",", "$", "options", "=", "array", "(", ")", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "_fields", "[", "$", "field", "]", ")", ")", "{", "thr...
Add a validation rule to a field. Can supply an optional error message and options. @param string $field @param string $rule @param string $message @param array $options @return $this @throws \Titon\Utility\Exception\InvalidArgumentException
[ "Add", "a", "validation", "rule", "to", "a", "field", ".", "Can", "supply", "an", "optional", "error", "message", "and", "options", "." ]
8a77eb9e7b8baacf41cc25487289779d8319cd3a
https://github.com/vpg/titon.utility/blob/8a77eb9e7b8baacf41cc25487289779d8319cd3a/src/Titon/Utility/Validator.php#L128-L145
196,459
vpg/titon.utility
src/Titon/Utility/Validator.php
Validator.validate
public function validate() { if (!$this->_data) { return false; } $fields = $this->getFields(); $messages = $this->getMessages(); foreach ($this->_data as $field => $value) { if (empty($this->_rules[$field])) { continue; } ...
php
public function validate() { if (!$this->_data) { return false; } $fields = $this->getFields(); $messages = $this->getMessages(); foreach ($this->_data as $field => $value) { if (empty($this->_rules[$field])) { continue; } ...
[ "public", "function", "validate", "(", ")", "{", "if", "(", "!", "$", "this", "->", "_data", ")", "{", "return", "false", ";", "}", "$", "fields", "=", "$", "this", "->", "getFields", "(", ")", ";", "$", "messages", "=", "$", "this", "->", "getMe...
Validate the data against the rules schema. Return true if all fields passed validation. @return bool @throws \Titon\Utility\Exception\InvalidValidationRuleException
[ "Validate", "the", "data", "against", "the", "rules", "schema", ".", "Return", "true", "if", "all", "fields", "passed", "validation", "." ]
8a77eb9e7b8baacf41cc25487289779d8319cd3a
https://github.com/vpg/titon.utility/blob/8a77eb9e7b8baacf41cc25487289779d8319cd3a/src/Titon/Utility/Validator.php#L222-L277
196,460
vpg/titon.utility
src/Titon/Utility/Validator.php
Validator.makeFromShorthand
public static function makeFromShorthand(array $data = array(), array $fields = array()) { /** @type \Titon\Utility\Validator $obj */ $obj = new static($data); foreach ($fields as $field => $data) { $title = $field; // Convert to array if (is_string($data)) ...
php
public static function makeFromShorthand(array $data = array(), array $fields = array()) { /** @type \Titon\Utility\Validator $obj */ $obj = new static($data); foreach ($fields as $field => $data) { $title = $field; // Convert to array if (is_string($data)) ...
[ "public", "static", "function", "makeFromShorthand", "(", "array", "$", "data", "=", "array", "(", ")", ",", "array", "$", "fields", "=", "array", "(", ")", ")", "{", "/** @type \\Titon\\Utility\\Validator $obj */", "$", "obj", "=", "new", "static", "(", "$"...
Create a validator instance from a set of shorthand or expanded rule sets. @param array $data @param array $fields @return $this
[ "Create", "a", "validator", "instance", "from", "a", "set", "of", "shorthand", "or", "expanded", "rule", "sets", "." ]
8a77eb9e7b8baacf41cc25487289779d8319cd3a
https://github.com/vpg/titon.utility/blob/8a77eb9e7b8baacf41cc25487289779d8319cd3a/src/Titon/Utility/Validator.php#L286-L323
196,461
vpg/titon.utility
src/Titon/Utility/Validator.php
Validator.splitShorthand
public static function splitShorthand($shorthand) { $rule = null; $message = ''; $opts = array(); // rule:o1,o2,o3 // rule:o1,o2:The message here! if (strpos($shorthand, ':') !== false) { $parts = explode(':', $shorthand, 3); $rule = $parts[0]; ...
php
public static function splitShorthand($shorthand) { $rule = null; $message = ''; $opts = array(); // rule:o1,o2,o3 // rule:o1,o2:The message here! if (strpos($shorthand, ':') !== false) { $parts = explode(':', $shorthand, 3); $rule = $parts[0]; ...
[ "public", "static", "function", "splitShorthand", "(", "$", "shorthand", ")", "{", "$", "rule", "=", "null", ";", "$", "message", "=", "''", ";", "$", "opts", "=", "array", "(", ")", ";", "// rule:o1,o2,o3", "// rule:o1,o2:The message here!", "if", "(", "s...
Split a shorthand rule into multiple parts. @param string $shorthand @return array
[ "Split", "a", "shorthand", "rule", "into", "multiple", "parts", "." ]
8a77eb9e7b8baacf41cc25487289779d8319cd3a
https://github.com/vpg/titon.utility/blob/8a77eb9e7b8baacf41cc25487289779d8319cd3a/src/Titon/Utility/Validator.php#L331-L366
196,462
OpenConext/Stepup-bundle
src/Http/CookieHelper.php
CookieHelper.write
public function write(Response $response, $value) { $cookie = $this->createCookieWithValue($value); $response->headers->setCookie($cookie); return $cookie; }
php
public function write(Response $response, $value) { $cookie = $this->createCookieWithValue($value); $response->headers->setCookie($cookie); return $cookie; }
[ "public", "function", "write", "(", "Response", "$", "response", ",", "$", "value", ")", "{", "$", "cookie", "=", "$", "this", "->", "createCookieWithValue", "(", "$", "value", ")", ";", "$", "response", "->", "headers", "->", "setCookie", "(", "$", "c...
Write a new value for the current cookie to a given Response. @param string $value @return Cookie
[ "Write", "a", "new", "value", "for", "the", "current", "cookie", "to", "a", "given", "Response", "." ]
94178ddb421889df9e068109293a8da880793ed2
https://github.com/OpenConext/Stepup-bundle/blob/94178ddb421889df9e068109293a8da880793ed2/src/Http/CookieHelper.php#L46-L51
196,463
OpenConext/Stepup-bundle
src/Http/CookieHelper.php
CookieHelper.read
public function read(Request $request) { if (!$request->cookies->has($this->cookieSettings->getName())) { return null; } return $this->createCookieWithValue( $request->cookies->get($this->cookieSettings->getName()) ); }
php
public function read(Request $request) { if (!$request->cookies->has($this->cookieSettings->getName())) { return null; } return $this->createCookieWithValue( $request->cookies->get($this->cookieSettings->getName()) ); }
[ "public", "function", "read", "(", "Request", "$", "request", ")", "{", "if", "(", "!", "$", "request", "->", "cookies", "->", "has", "(", "$", "this", "->", "cookieSettings", "->", "getName", "(", ")", ")", ")", "{", "return", "null", ";", "}", "r...
Retrieve the current cookie from the Request if it exists. Note that we only read the value, we ignore the other settings. @param Request $request @return null|Cookie
[ "Retrieve", "the", "current", "cookie", "from", "the", "Request", "if", "it", "exists", "." ]
94178ddb421889df9e068109293a8da880793ed2
https://github.com/OpenConext/Stepup-bundle/blob/94178ddb421889df9e068109293a8da880793ed2/src/Http/CookieHelper.php#L61-L70
196,464
phpffcms/ffcms-core
src/Network/Response.php
Response.redirect
public function redirect($to, $full = false) { $to = trim($to, '/'); if (!$full && !Str::startsWith(App::$Alias->baseUrl, $to)) { $to = App::$Alias->baseUrl . '/' . $to; } $redirect = new FoundationRedirect($to); $redirect->send(); exit('Redirecting to ' ....
php
public function redirect($to, $full = false) { $to = trim($to, '/'); if (!$full && !Str::startsWith(App::$Alias->baseUrl, $to)) { $to = App::$Alias->baseUrl . '/' . $to; } $redirect = new FoundationRedirect($to); $redirect->send(); exit('Redirecting to ' ....
[ "public", "function", "redirect", "(", "$", "to", ",", "$", "full", "=", "false", ")", "{", "$", "to", "=", "trim", "(", "$", "to", ",", "'/'", ")", ";", "if", "(", "!", "$", "full", "&&", "!", "Str", "::", "startsWith", "(", "App", "::", "$"...
Fast redirect in web environment @param string $to @param bool $full
[ "Fast", "redirect", "in", "web", "environment" ]
44a309553ef9f115ccfcfd71f2ac6e381c612082
https://github.com/phpffcms/ffcms-core/blob/44a309553ef9f115ccfcfd71f2ac6e381c612082/src/Network/Response.php#L21-L30
196,465
zapheus/zapheus
src/Routing/Router.php
Router.connect
public function connect($uri, $handler, $middlewares = array()) { return $this->add($this->route('CONNECT', $uri, $handler, $middlewares)); }
php
public function connect($uri, $handler, $middlewares = array()) { return $this->add($this->route('CONNECT', $uri, $handler, $middlewares)); }
[ "public", "function", "connect", "(", "$", "uri", ",", "$", "handler", ",", "$", "middlewares", "=", "array", "(", ")", ")", "{", "return", "$", "this", "->", "add", "(", "$", "this", "->", "route", "(", "'CONNECT'", ",", "$", "uri", ",", "$", "h...
Adds a new route instance in CONNECT HTTP method. @param string $uri @param callable|string $handler @param array|callable|string $middlewares @return self
[ "Adds", "a", "new", "route", "instance", "in", "CONNECT", "HTTP", "method", "." ]
96618b5cee7d20b6700d0475e4334ae4b5163a6b
https://github.com/zapheus/zapheus/blob/96618b5cee7d20b6700d0475e4334ae4b5163a6b/src/Routing/Router.php#L54-L57
196,466
zapheus/zapheus
src/Routing/Router.php
Router.delete
public function delete($uri, $handler, $middlewares = array()) { return $this->add($this->route('DELETE', $uri, $handler, $middlewares)); }
php
public function delete($uri, $handler, $middlewares = array()) { return $this->add($this->route('DELETE', $uri, $handler, $middlewares)); }
[ "public", "function", "delete", "(", "$", "uri", ",", "$", "handler", ",", "$", "middlewares", "=", "array", "(", ")", ")", "{", "return", "$", "this", "->", "add", "(", "$", "this", "->", "route", "(", "'DELETE'", ",", "$", "uri", ",", "$", "han...
Adds a new route instance in DELETE HTTP method. @param string $uri @param callable|string $handler @param array|callable|string $middlewares @return self
[ "Adds", "a", "new", "route", "instance", "in", "DELETE", "HTTP", "method", "." ]
96618b5cee7d20b6700d0475e4334ae4b5163a6b
https://github.com/zapheus/zapheus/blob/96618b5cee7d20b6700d0475e4334ae4b5163a6b/src/Routing/Router.php#L67-L70
196,467
zapheus/zapheus
src/Routing/Router.php
Router.get
public function get($uri, $handler, $middlewares = array()) { return $this->add($this->route('GET', $uri, $handler, $middlewares)); }
php
public function get($uri, $handler, $middlewares = array()) { return $this->add($this->route('GET', $uri, $handler, $middlewares)); }
[ "public", "function", "get", "(", "$", "uri", ",", "$", "handler", ",", "$", "middlewares", "=", "array", "(", ")", ")", "{", "return", "$", "this", "->", "add", "(", "$", "this", "->", "route", "(", "'GET'", ",", "$", "uri", ",", "$", "handler",...
Adds a new route instance in GET HTTP method. @param string $uri @param callable|string $handler @param array|callable|string $middlewares @return self
[ "Adds", "a", "new", "route", "instance", "in", "GET", "HTTP", "method", "." ]
96618b5cee7d20b6700d0475e4334ae4b5163a6b
https://github.com/zapheus/zapheus/blob/96618b5cee7d20b6700d0475e4334ae4b5163a6b/src/Routing/Router.php#L80-L83
196,468
zapheus/zapheus
src/Routing/Router.php
Router.head
public function head($uri, $handler, $middlewares = array()) { return $this->add($this->route('HEAD', $uri, $handler, $middlewares)); }
php
public function head($uri, $handler, $middlewares = array()) { return $this->add($this->route('HEAD', $uri, $handler, $middlewares)); }
[ "public", "function", "head", "(", "$", "uri", ",", "$", "handler", ",", "$", "middlewares", "=", "array", "(", ")", ")", "{", "return", "$", "this", "->", "add", "(", "$", "this", "->", "route", "(", "'HEAD'", ",", "$", "uri", ",", "$", "handler...
Adds a new route instance in HEAD HTTP method. @param string $uri @param callable|string $handler @param array|callable|string $middlewares @return self
[ "Adds", "a", "new", "route", "instance", "in", "HEAD", "HTTP", "method", "." ]
96618b5cee7d20b6700d0475e4334ae4b5163a6b
https://github.com/zapheus/zapheus/blob/96618b5cee7d20b6700d0475e4334ae4b5163a6b/src/Routing/Router.php#L104-L107
196,469
zapheus/zapheus
src/Routing/Router.php
Router.options
public function options($uri, $handler, $middlewares = array()) { return $this->add($this->route('OPTIONS', $uri, $handler, $middlewares)); }
php
public function options($uri, $handler, $middlewares = array()) { return $this->add($this->route('OPTIONS', $uri, $handler, $middlewares)); }
[ "public", "function", "options", "(", "$", "uri", ",", "$", "handler", ",", "$", "middlewares", "=", "array", "(", ")", ")", "{", "return", "$", "this", "->", "add", "(", "$", "this", "->", "route", "(", "'OPTIONS'", ",", "$", "uri", ",", "$", "h...
Adds a new route instance in OPTIONS HTTP method. @param string $uri @param callable|string $handler @param array|callable|string $middlewares @return self
[ "Adds", "a", "new", "route", "instance", "in", "OPTIONS", "HTTP", "method", "." ]
96618b5cee7d20b6700d0475e4334ae4b5163a6b
https://github.com/zapheus/zapheus/blob/96618b5cee7d20b6700d0475e4334ae4b5163a6b/src/Routing/Router.php#L117-L120
196,470
zapheus/zapheus
src/Routing/Router.php
Router.patch
public function patch($uri, $handler, $middlewares = array()) { return $this->add($this->route('PATCH', $uri, $handler, $middlewares)); }
php
public function patch($uri, $handler, $middlewares = array()) { return $this->add($this->route('PATCH', $uri, $handler, $middlewares)); }
[ "public", "function", "patch", "(", "$", "uri", ",", "$", "handler", ",", "$", "middlewares", "=", "array", "(", ")", ")", "{", "return", "$", "this", "->", "add", "(", "$", "this", "->", "route", "(", "'PATCH'", ",", "$", "uri", ",", "$", "handl...
Adds a new route instance in PATCH HTTP method. @param string $uri @param callable|string $handler @param array|callable|string $middlewares @return self
[ "Adds", "a", "new", "route", "instance", "in", "PATCH", "HTTP", "method", "." ]
96618b5cee7d20b6700d0475e4334ae4b5163a6b
https://github.com/zapheus/zapheus/blob/96618b5cee7d20b6700d0475e4334ae4b5163a6b/src/Routing/Router.php#L130-L133
196,471
zapheus/zapheus
src/Routing/Router.php
Router.post
public function post($uri, $handler, $middlewares = array()) { return $this->add($this->route('POST', $uri, $handler, $middlewares)); }
php
public function post($uri, $handler, $middlewares = array()) { return $this->add($this->route('POST', $uri, $handler, $middlewares)); }
[ "public", "function", "post", "(", "$", "uri", ",", "$", "handler", ",", "$", "middlewares", "=", "array", "(", ")", ")", "{", "return", "$", "this", "->", "add", "(", "$", "this", "->", "route", "(", "'POST'", ",", "$", "uri", ",", "$", "handler...
Adds a new route instance in POST HTTP method. @param string $uri @param callable|string $handler @param array|callable|string $middlewares @return self
[ "Adds", "a", "new", "route", "instance", "in", "POST", "HTTP", "method", "." ]
96618b5cee7d20b6700d0475e4334ae4b5163a6b
https://github.com/zapheus/zapheus/blob/96618b5cee7d20b6700d0475e4334ae4b5163a6b/src/Routing/Router.php#L143-L146
196,472
zapheus/zapheus
src/Routing/Router.php
Router.purge
public function purge($uri, $handler, $middlewares = array()) { return $this->add($this->route('PURGE', $uri, $handler, $middlewares)); }
php
public function purge($uri, $handler, $middlewares = array()) { return $this->add($this->route('PURGE', $uri, $handler, $middlewares)); }
[ "public", "function", "purge", "(", "$", "uri", ",", "$", "handler", ",", "$", "middlewares", "=", "array", "(", ")", ")", "{", "return", "$", "this", "->", "add", "(", "$", "this", "->", "route", "(", "'PURGE'", ",", "$", "uri", ",", "$", "handl...
Adds a new route instance in PURGE HTTP method. @param string $uri @param callable|string $handler @param array|callable|string $middlewares @return self
[ "Adds", "a", "new", "route", "instance", "in", "PURGE", "HTTP", "method", "." ]
96618b5cee7d20b6700d0475e4334ae4b5163a6b
https://github.com/zapheus/zapheus/blob/96618b5cee7d20b6700d0475e4334ae4b5163a6b/src/Routing/Router.php#L156-L159
196,473
zapheus/zapheus
src/Routing/Router.php
Router.put
public function put($uri, $handler, $middlewares = array()) { return $this->add($this->route('PUT', $uri, $handler, $middlewares)); }
php
public function put($uri, $handler, $middlewares = array()) { return $this->add($this->route('PUT', $uri, $handler, $middlewares)); }
[ "public", "function", "put", "(", "$", "uri", ",", "$", "handler", ",", "$", "middlewares", "=", "array", "(", ")", ")", "{", "return", "$", "this", "->", "add", "(", "$", "this", "->", "route", "(", "'PUT'", ",", "$", "uri", ",", "$", "handler",...
Adds a new route instance in PUT HTTP method. @param string $uri @param callable|string $handler @param array|callable|string $middlewares @return self
[ "Adds", "a", "new", "route", "instance", "in", "PUT", "HTTP", "method", "." ]
96618b5cee7d20b6700d0475e4334ae4b5163a6b
https://github.com/zapheus/zapheus/blob/96618b5cee7d20b6700d0475e4334ae4b5163a6b/src/Routing/Router.php#L169-L172
196,474
zapheus/zapheus
src/Routing/Router.php
Router.trace
public function trace($uri, $handler, $middlewares = array()) { return $this->add($this->route('TRACE', $uri, $handler, $middlewares)); }
php
public function trace($uri, $handler, $middlewares = array()) { return $this->add($this->route('TRACE', $uri, $handler, $middlewares)); }
[ "public", "function", "trace", "(", "$", "uri", ",", "$", "handler", ",", "$", "middlewares", "=", "array", "(", ")", ")", "{", "return", "$", "this", "->", "add", "(", "$", "this", "->", "route", "(", "'TRACE'", ",", "$", "uri", ",", "$", "handl...
Adds a new route instance in TRACE HTTP method. @param string $uri @param callable|string $handler @param array|callable|string $middlewares @return self
[ "Adds", "a", "new", "route", "instance", "in", "TRACE", "HTTP", "method", "." ]
96618b5cee7d20b6700d0475e4334ae4b5163a6b
https://github.com/zapheus/zapheus/blob/96618b5cee7d20b6700d0475e4334ae4b5163a6b/src/Routing/Router.php#L192-L195
196,475
zapheus/zapheus
src/Routing/Router.php
Router.route
protected function route($method, $uri, $handler, $middlewares) { if (is_string($handler) === true) { $namespace = $this->namespace; $namespace !== '' && $namespace .= '\\'; $handler = $namespace . $handler; } return new Route($method, $uri, $ha...
php
protected function route($method, $uri, $handler, $middlewares) { if (is_string($handler) === true) { $namespace = $this->namespace; $namespace !== '' && $namespace .= '\\'; $handler = $namespace . $handler; } return new Route($method, $uri, $ha...
[ "protected", "function", "route", "(", "$", "method", ",", "$", "uri", ",", "$", "handler", ",", "$", "middlewares", ")", "{", "if", "(", "is_string", "(", "$", "handler", ")", "===", "true", ")", "{", "$", "namespace", "=", "$", "this", "->", "nam...
Prepares a new route instance. @param string $method @param string $uri @param callable|string $handler @param array|callable|string $middlewares @return \Zapheus\Routing\Route
[ "Prepares", "a", "new", "route", "instance", "." ]
96618b5cee7d20b6700d0475e4334ae4b5163a6b
https://github.com/zapheus/zapheus/blob/96618b5cee7d20b6700d0475e4334ae4b5163a6b/src/Routing/Router.php#L206-L218
196,476
frameworkwtf/core
src/Provider.php
Provider.getSentry
protected function getSentry(Container $container): callable { return function ($c) { $config = $c['config']('suit.sentry'); $client = new \Raven_Client($config['dsn'], $config['options'] ?? []); $client->install(); if ($c->has('user')) { $cli...
php
protected function getSentry(Container $container): callable { return function ($c) { $config = $c['config']('suit.sentry'); $client = new \Raven_Client($config['dsn'], $config['options'] ?? []); $client->install(); if ($c->has('user')) { $cli...
[ "protected", "function", "getSentry", "(", "Container", "$", "container", ")", ":", "callable", "{", "return", "function", "(", "$", "c", ")", "{", "$", "config", "=", "$", "c", "[", "'config'", "]", "(", "'suit.sentry'", ")", ";", "$", "client", "=", ...
Add Sentry integration.
[ "Add", "Sentry", "integration", "." ]
8104ca140ec287c26724389780e5e1dba57a030a
https://github.com/frameworkwtf/core/blob/8104ca140ec287c26724389780e5e1dba57a030a/src/Provider.php#L49-L62
196,477
frameworkwtf/core
src/Provider.php
Provider.setErrorHandler
protected function setErrorHandler(Container $container): callable { return function (Container $container) { return function (ServerRequestInterface $request, ResponseInterface $response, Throwable $e) use ($container) { $container->sentry->captureException($e); ...
php
protected function setErrorHandler(Container $container): callable { return function (Container $container) { return function (ServerRequestInterface $request, ResponseInterface $response, Throwable $e) use ($container) { $container->sentry->captureException($e); ...
[ "protected", "function", "setErrorHandler", "(", "Container", "$", "container", ")", ":", "callable", "{", "return", "function", "(", "Container", "$", "container", ")", "{", "return", "function", "(", "ServerRequestInterface", "$", "request", ",", "ResponseInterf...
Set error handler with sentry. @param Container $container @return callable
[ "Set", "error", "handler", "with", "sentry", "." ]
8104ca140ec287c26724389780e5e1dba57a030a
https://github.com/frameworkwtf/core/blob/8104ca140ec287c26724389780e5e1dba57a030a/src/Provider.php#L96-L108
196,478
gplcart/export
handlers/Export.php
Export.prepare
protected function prepare(array $product) { $data = array(); foreach ($this->job['data']['header'] as $key => $value) { $data[$key] = isset($product[$key]) ? $product[$key] : ''; } $this->prepareImages($data, $product); $this->preparePrice($data, $product); ...
php
protected function prepare(array $product) { $data = array(); foreach ($this->job['data']['header'] as $key => $value) { $data[$key] = isset($product[$key]) ? $product[$key] : ''; } $this->prepareImages($data, $product); $this->preparePrice($data, $product); ...
[ "protected", "function", "prepare", "(", "array", "$", "product", ")", "{", "$", "data", "=", "array", "(", ")", ";", "foreach", "(", "$", "this", "->", "job", "[", "'data'", "]", "[", "'header'", "]", "as", "$", "key", "=>", "$", "value", ")", "...
Prepares export data @param array $product @return array
[ "Prepares", "export", "data" ]
b4d93c7a2bd6653f12231fb30d36601ea00fc926
https://github.com/gplcart/export/blob/b4d93c7a2bd6653f12231fb30d36601ea00fc926/handlers/Export.php#L99-L111
196,479
ColibriPlatform/base
Migration.php
Migration.up
public function up($limit = 0) { $migrations = $this->getNewMigrations(); if (empty($migrations)) { $this->messages[] = 'No new migration found. Your system is up-to-date.'; return true; } foreach ($migrations as $migration) { if (!$this->migrate...
php
public function up($limit = 0) { $migrations = $this->getNewMigrations(); if (empty($migrations)) { $this->messages[] = 'No new migration found. Your system is up-to-date.'; return true; } foreach ($migrations as $migration) { if (!$this->migrate...
[ "public", "function", "up", "(", "$", "limit", "=", "0", ")", "{", "$", "migrations", "=", "$", "this", "->", "getNewMigrations", "(", ")", ";", "if", "(", "empty", "(", "$", "migrations", ")", ")", "{", "$", "this", "->", "messages", "[", "]", "...
Upgrades the application by applying new migrations. @return integer the status of the action execution. 0 means normal, other values mean abnormal.
[ "Upgrades", "the", "application", "by", "applying", "new", "migrations", "." ]
b45db9c88317e28acc5b024ac98f8428685179aa
https://github.com/ColibriPlatform/base/blob/b45db9c88317e28acc5b024ac98f8428685179aa/Migration.php#L64-L80
196,480
ColibriPlatform/base
Migration.php
Migration.migrateUp
protected function migrateUp($class) { if ($class === self::BASE_MIGRATION) { return true; } $this->messages[] = "*** applying $class"; $start = microtime(true); $migration = $this->createMigration($class); ob_start(); $result = $migration->up(); ...
php
protected function migrateUp($class) { if ($class === self::BASE_MIGRATION) { return true; } $this->messages[] = "*** applying $class"; $start = microtime(true); $migration = $this->createMigration($class); ob_start(); $result = $migration->up(); ...
[ "protected", "function", "migrateUp", "(", "$", "class", ")", "{", "if", "(", "$", "class", "===", "self", "::", "BASE_MIGRATION", ")", "{", "return", "true", ";", "}", "$", "this", "->", "messages", "[", "]", "=", "\"*** applying $class\"", ";", "$", ...
Upgrades with the specified migration class. @param string $class the migration class name @return boolean whether the migration is successful
[ "Upgrades", "with", "the", "specified", "migration", "class", "." ]
b45db9c88317e28acc5b024ac98f8428685179aa
https://github.com/ColibriPlatform/base/blob/b45db9c88317e28acc5b024ac98f8428685179aa/Migration.php#L88-L115
196,481
ColibriPlatform/base
Migration.php
Migration.getMigrationHistory
protected function getMigrationHistory($limit) { if ($this->db->schema->getTableSchema($this->migrationTable, true) === null) { $this->createMigrationHistoryTable(); } $query = new Query; $rows = $query->select(['version', 'apply_time']) ->from($this->migrationTab...
php
protected function getMigrationHistory($limit) { if ($this->db->schema->getTableSchema($this->migrationTable, true) === null) { $this->createMigrationHistoryTable(); } $query = new Query; $rows = $query->select(['version', 'apply_time']) ->from($this->migrationTab...
[ "protected", "function", "getMigrationHistory", "(", "$", "limit", ")", "{", "if", "(", "$", "this", "->", "db", "->", "schema", "->", "getTableSchema", "(", "$", "this", "->", "migrationTable", ",", "true", ")", "===", "null", ")", "{", "$", "this", "...
Returns the migration history. @param integer $limit the maximum number of records in the history to be returned. `null` for "no limit". @return array the migration history
[ "Returns", "the", "migration", "history", "." ]
b45db9c88317e28acc5b024ac98f8428685179aa
https://github.com/ColibriPlatform/base/blob/b45db9c88317e28acc5b024ac98f8428685179aa/Migration.php#L172-L188
196,482
johnkrovitch/Sam
File/Locator.php
Locator.locate
public function locate($source) { $sources = []; $normalizedSources = []; // if the wildcard is at the end of the string, it means that we look for a directory $endingWithWilCard = substr($source, strlen($source) - 2) === '/*'; if ($endingWithWilCard) { ...
php
public function locate($source) { $sources = []; $normalizedSources = []; // if the wildcard is at the end of the string, it means that we look for a directory $endingWithWilCard = substr($source, strlen($source) - 2) === '/*'; if ($endingWithWilCard) { ...
[ "public", "function", "locate", "(", "$", "source", ")", "{", "$", "sources", "=", "[", "]", ";", "$", "normalizedSources", "=", "[", "]", ";", "// if the wildcard is at the end of the string, it means that we look for a directory", "$", "endingWithWilCard", "=", "sub...
Locate a source either if it a file or a directory and normalize it. Return an array of SplFileInfo. @param mixed $source @return SplFileInfo[] @throws Exception
[ "Locate", "a", "source", "either", "if", "it", "a", "file", "or", "a", "directory", "and", "normalize", "it", ".", "Return", "an", "array", "of", "SplFileInfo", "." ]
fbd3770c11eecc0a6d8070f439f149062316f606
https://github.com/johnkrovitch/Sam/blob/fbd3770c11eecc0a6d8070f439f149062316f606/File/Locator.php#L35-L72
196,483
johnkrovitch/Sam
File/Locator.php
Locator.getSourcesFromFinder
protected function getSourcesFromFinder($source) { $array = explode(DIRECTORY_SEPARATOR, $source); $filename = array_pop($array); $directory = $source; $pattern = '*'; // if a dot is present, the last part is the filename pattern if (strstr($filename, '.') !=...
php
protected function getSourcesFromFinder($source) { $array = explode(DIRECTORY_SEPARATOR, $source); $filename = array_pop($array); $directory = $source; $pattern = '*'; // if a dot is present, the last part is the filename pattern if (strstr($filename, '.') !=...
[ "protected", "function", "getSourcesFromFinder", "(", "$", "source", ")", "{", "$", "array", "=", "explode", "(", "DIRECTORY_SEPARATOR", ",", "$", "source", ")", ";", "$", "filename", "=", "array_pop", "(", "$", "array", ")", ";", "$", "directory", "=", ...
Return files sources using the finder to allow wild wards. @param $source @return SplFileInfo[]
[ "Return", "files", "sources", "using", "the", "finder", "to", "allow", "wild", "wards", "." ]
fbd3770c11eecc0a6d8070f439f149062316f606
https://github.com/johnkrovitch/Sam/blob/fbd3770c11eecc0a6d8070f439f149062316f606/File/Locator.php#L91-L115
196,484
johnkrovitch/Sam
File/Locator.php
Locator.removeLastSlash
private function removeLastSlash($string) { if ('/' === substr($string, strlen($string) - 1)) { $string = substr($string, 0, strlen($string) - 1); } return $string; }
php
private function removeLastSlash($string) { if ('/' === substr($string, strlen($string) - 1)) { $string = substr($string, 0, strlen($string) - 1); } return $string; }
[ "private", "function", "removeLastSlash", "(", "$", "string", ")", "{", "if", "(", "'/'", "===", "substr", "(", "$", "string", ",", "strlen", "(", "$", "string", ")", "-", "1", ")", ")", "{", "$", "string", "=", "substr", "(", "$", "string", ",", ...
Remove the last slash of the string. @param string $string @return string
[ "Remove", "the", "last", "slash", "of", "the", "string", "." ]
fbd3770c11eecc0a6d8070f439f149062316f606
https://github.com/johnkrovitch/Sam/blob/fbd3770c11eecc0a6d8070f439f149062316f606/File/Locator.php#L124-L131
196,485
agentmedia/phine-core
src/Core/Logic/Translation/ContentTranslator.php
ContentTranslator.SetContent
public function SetContent(Content $content) { $this->texts = array(); $wordings = ContentWording::Schema()->FetchByContent(false, $content); foreach($wordings as $wording) { $prefix = Str::Replace('-', '.', $content->GetType()); $this->texts[$prefix . '.' . $...
php
public function SetContent(Content $content) { $this->texts = array(); $wordings = ContentWording::Schema()->FetchByContent(false, $content); foreach($wordings as $wording) { $prefix = Str::Replace('-', '.', $content->GetType()); $this->texts[$prefix . '.' . $...
[ "public", "function", "SetContent", "(", "Content", "$", "content", ")", "{", "$", "this", "->", "texts", "=", "array", "(", ")", ";", "$", "wordings", "=", "ContentWording", "::", "Schema", "(", ")", "->", "FetchByContent", "(", "false", ",", "$", "co...
Set the current content to retrieve customized wording texts @param Content $content The content
[ "Set", "the", "current", "content", "to", "retrieve", "customized", "wording", "texts" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Translation/ContentTranslator.php#L37-L46
196,486
agentmedia/phine-core
src/Core/Logic/Translation/ContentTranslator.php
ContentTranslator.GetReplacement
public function GetReplacement($placeholder) { if (isset($this->texts[$placeholder])) { return $this->texts[$placeholder]; } return $this->phpTranslator->GetReplacement($placeholder); }
php
public function GetReplacement($placeholder) { if (isset($this->texts[$placeholder])) { return $this->texts[$placeholder]; } return $this->phpTranslator->GetReplacement($placeholder); }
[ "public", "function", "GetReplacement", "(", "$", "placeholder", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "texts", "[", "$", "placeholder", "]", ")", ")", "{", "return", "$", "this", "->", "texts", "[", "$", "placeholder", "]", ";", "}",...
Gets the placeholder replacement text @param string $placeholder The placeholder @return string Returns the replacement, without parameters attached, yet
[ "Gets", "the", "placeholder", "replacement", "text" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Translation/ContentTranslator.php#L73-L80
196,487
sndsgd/http
src/http/data/decoder/QueryStringDecoder.php
QueryStringDecoder.decodePair
public function decodePair(string $keyValuePair): array { # more than a handful of clients like to use '+' characters # when encoding data that is (almost) compliant with rfc 3986 # this is a hack that allows for it if (strpos($keyValuePair, "+") !== false) { $keyValuePai...
php
public function decodePair(string $keyValuePair): array { # more than a handful of clients like to use '+' characters # when encoding data that is (almost) compliant with rfc 3986 # this is a hack that allows for it if (strpos($keyValuePair, "+") !== false) { $keyValuePai...
[ "public", "function", "decodePair", "(", "string", "$", "keyValuePair", ")", ":", "array", "{", "# more than a handful of clients like to use '+' characters", "# when encoding data that is (almost) compliant with rfc 3986", "# this is a hack that allows for it", "if", "(", "strpos", ...
Decode a urlencoded parameter key value pair @param string $keyValuePair @return array<string> The decoded key and value
[ "Decode", "a", "urlencoded", "parameter", "key", "value", "pair" ]
e7f82010a66c6d3241a24ea82baf4593130c723b
https://github.com/sndsgd/http/blob/e7f82010a66c6d3241a24ea82baf4593130c723b/src/http/data/decoder/QueryStringDecoder.php#L54-L69
196,488
sndsgd/http
src/http/data/decoder/QueryStringDecoder.php
QueryStringDecoder.decode
public function decode($query): array { foreach (explode("&", $query) as $keyValuePair) { list($key, $value) = $this->decodePair($keyValuePair); $this->values->addValue($key, $value); } return $this->values->getValues(); }
php
public function decode($query): array { foreach (explode("&", $query) as $keyValuePair) { list($key, $value) = $this->decodePair($keyValuePair); $this->values->addValue($key, $value); } return $this->values->getValues(); }
[ "public", "function", "decode", "(", "$", "query", ")", ":", "array", "{", "foreach", "(", "explode", "(", "\"&\"", ",", "$", "query", ")", "as", "$", "keyValuePair", ")", "{", "list", "(", "$", "key", ",", "$", "value", ")", "=", "$", "this", "-...
Decode a query string @param string $query @return array
[ "Decode", "a", "query", "string" ]
e7f82010a66c6d3241a24ea82baf4593130c723b
https://github.com/sndsgd/http/blob/e7f82010a66c6d3241a24ea82baf4593130c723b/src/http/data/decoder/QueryStringDecoder.php#L77-L84
196,489
PenoaksDev/Milky-Framework
src/Milky/Database/Query/Builder.php
Builder.crossJoin
public function crossJoin( $table, $first = null, $operator = null, $second = null ) { if ( $first ) { return $this->join( $table, $first, $operator, $second, 'cross' ); } $this->joins[] = new JoinClause( 'cross', $table ); return $this; }
php
public function crossJoin( $table, $first = null, $operator = null, $second = null ) { if ( $first ) { return $this->join( $table, $first, $operator, $second, 'cross' ); } $this->joins[] = new JoinClause( 'cross', $table ); return $this; }
[ "public", "function", "crossJoin", "(", "$", "table", ",", "$", "first", "=", "null", ",", "$", "operator", "=", "null", ",", "$", "second", "=", "null", ")", "{", "if", "(", "$", "first", ")", "{", "return", "$", "this", "->", "join", "(", "$", ...
Add a "cross join" clause to the query. @param string $table @param string $first @param string $operator @param string $second @return Builder|static
[ "Add", "a", "cross", "join", "clause", "to", "the", "query", "." ]
8afd7156610a70371aa5b1df50b8a212bf7b142c
https://github.com/PenoaksDev/Milky-Framework/blob/8afd7156610a70371aa5b1df50b8a212bf7b142c/src/Milky/Database/Query/Builder.php#L476-L486
196,490
PenoaksDev/Milky-Framework
src/Milky/Database/Query/Builder.php
Builder.lock
public function lock( $value = true ) { $this->lock = $value; if ( $this->lock ) { $this->useWritePdo(); } return $this; }
php
public function lock( $value = true ) { $this->lock = $value; if ( $this->lock ) { $this->useWritePdo(); } return $this; }
[ "public", "function", "lock", "(", "$", "value", "=", "true", ")", "{", "$", "this", "->", "lock", "=", "$", "value", ";", "if", "(", "$", "this", "->", "lock", ")", "{", "$", "this", "->", "useWritePdo", "(", ")", ";", "}", "return", "$", "thi...
Lock the selected rows in the table. @param bool $value @return $this
[ "Lock", "the", "selected", "rows", "in", "the", "table", "." ]
8afd7156610a70371aa5b1df50b8a212bf7b142c
https://github.com/PenoaksDev/Milky-Framework/blob/8afd7156610a70371aa5b1df50b8a212bf7b142c/src/Milky/Database/Query/Builder.php#L1528-L1538
196,491
cmsgears/module-community
common/models/entities/Group.php
Group.getMemberUsers
public function getMemberUsers() { $memberTable = CmnTables::getTableName( CmnTables::TABLE_GROUP_MEMBER ); return $this->hasMany( User::class, [ 'id' => 'userId' ] ) ->viaTable( $memberTable, [ 'groupId' => 'id' ] ); }
php
public function getMemberUsers() { $memberTable = CmnTables::getTableName( CmnTables::TABLE_GROUP_MEMBER ); return $this->hasMany( User::class, [ 'id' => 'userId' ] ) ->viaTable( $memberTable, [ 'groupId' => 'id' ] ); }
[ "public", "function", "getMemberUsers", "(", ")", "{", "$", "memberTable", "=", "CmnTables", "::", "getTableName", "(", "CmnTables", "::", "TABLE_GROUP_MEMBER", ")", ";", "return", "$", "this", "->", "hasMany", "(", "User", "::", "class", ",", "[", "'id'", ...
Return all the group member users. @return \cmsgears\core\common\models\entities\User[]
[ "Return", "all", "the", "group", "member", "users", "." ]
0ca9cf0aa0cee395a4788bd6085f291e10728555
https://github.com/cmsgears/module-community/blob/0ca9cf0aa0cee395a4788bd6085f291e10728555/common/models/entities/Group.php#L304-L310
196,492
cmsgears/module-community
common/models/entities/Group.php
Group.queryWithAuthor
public static function queryWithAuthor( $config = [] ) { $config[ 'relations' ][] = [ 'avatar', 'modelContent', 'modelContent.template', 'modelContent.banner', 'creator' ]; $config[ 'relations' ][] = [ 'creator.avatar' => function ( $query ) { $fileTable = CoreTables::getTableName( CoreTables::TABLE_FILE ); ...
php
public static function queryWithAuthor( $config = [] ) { $config[ 'relations' ][] = [ 'avatar', 'modelContent', 'modelContent.template', 'modelContent.banner', 'creator' ]; $config[ 'relations' ][] = [ 'creator.avatar' => function ( $query ) { $fileTable = CoreTables::getTableName( CoreTables::TABLE_FILE ); ...
[ "public", "static", "function", "queryWithAuthor", "(", "$", "config", "=", "[", "]", ")", "{", "$", "config", "[", "'relations'", "]", "[", "]", "=", "[", "'avatar'", ",", "'modelContent'", ",", "'modelContent.template'", ",", "'modelContent.banner'", ",", ...
Return query to find the model with avatar, content, template, banner, author and author avatar. @param array $config @return \yii\db\ActiveQuery to query with avatar, content, template, banner, author and author avatar.
[ "Return", "query", "to", "find", "the", "model", "with", "avatar", "content", "template", "banner", "author", "and", "author", "avatar", "." ]
0ca9cf0aa0cee395a4788bd6085f291e10728555
https://github.com/cmsgears/module-community/blob/0ca9cf0aa0cee395a4788bd6085f291e10728555/common/models/entities/Group.php#L391-L401
196,493
bkstg/resource-bundle
EventSubscriber/ProductionMenuSubscriber.php
ProductionMenuSubscriber.addResourceItem
public function addResourceItem(ProductionMenuCollectionEvent $event): void { $menu = $event->getMenu(); $group = $event->getGroup(); // Create resource menu item. $resources = $this->factory->createItem('menu_item.resources', [ 'route' => 'bkstg_resource_index', ...
php
public function addResourceItem(ProductionMenuCollectionEvent $event): void { $menu = $event->getMenu(); $group = $event->getGroup(); // Create resource menu item. $resources = $this->factory->createItem('menu_item.resources', [ 'route' => 'bkstg_resource_index', ...
[ "public", "function", "addResourceItem", "(", "ProductionMenuCollectionEvent", "$", "event", ")", ":", "void", "{", "$", "menu", "=", "$", "event", "->", "getMenu", "(", ")", ";", "$", "group", "=", "$", "event", "->", "getGroup", "(", ")", ";", "// Crea...
Add the resource menu items. @param ProductionMenuCollectionEvent $event The menu collection event. @return void
[ "Add", "the", "resource", "menu", "items", "." ]
9d094366799a4df117a1dd747af9bb6debe14325
https://github.com/bkstg/resource-bundle/blob/9d094366799a4df117a1dd747af9bb6debe14325/EventSubscriber/ProductionMenuSubscriber.php#L60-L92
196,494
ZFrapid/zfrapid-library
src/View/Helper/BootstrapFlashMessenger.php
BootstrapFlashMessenger.render
public function render() { // get messages $allMessages = [ 'danger' => array_unique( array_merge( $this->flashMessenger->getErrorMessages(), $this->flashMessenger->getCurrentErrorMessages() ) ), ...
php
public function render() { // get messages $allMessages = [ 'danger' => array_unique( array_merge( $this->flashMessenger->getErrorMessages(), $this->flashMessenger->getCurrentErrorMessages() ) ), ...
[ "public", "function", "render", "(", ")", "{", "// get messages", "$", "allMessages", "=", "[", "'danger'", "=>", "array_unique", "(", "array_merge", "(", "$", "this", "->", "flashMessenger", "->", "getErrorMessages", "(", ")", ",", "$", "this", "->", "flash...
Outputs message depending on flag @return string
[ "Outputs", "message", "depending", "on", "flag" ]
3eca4f465dd1f2dee889532892c5052e830bc03c
https://github.com/ZFrapid/zfrapid-library/blob/3eca4f465dd1f2dee889532892c5052e830bc03c/src/View/Helper/BootstrapFlashMessenger.php#L58-L119
196,495
mwyatt/core
src/Mail.php
Mail.getInlinedHtml
public function getInlinedHtml($body) { $inliner = new \TijsVerkoyen\CssToInlineStyles\CssToInlineStyles; $inliner->setHtml($body); $inliner->setUseInlineStylesBlock(); return $inliner->convert(); }
php
public function getInlinedHtml($body) { $inliner = new \TijsVerkoyen\CssToInlineStyles\CssToInlineStyles; $inliner->setHtml($body); $inliner->setUseInlineStylesBlock(); return $inliner->convert(); }
[ "public", "function", "getInlinedHtml", "(", "$", "body", ")", "{", "$", "inliner", "=", "new", "\\", "TijsVerkoyen", "\\", "CssToInlineStyles", "\\", "CssToInlineStyles", ";", "$", "inliner", "->", "setHtml", "(", "$", "body", ")", ";", "$", "inliner", "-...
sets body after mashing in inline styles this is the method for doing tagging, simple now! @return string inlined stuffs
[ "sets", "body", "after", "mashing", "in", "inline", "styles", "this", "is", "the", "method", "for", "doing", "tagging", "simple", "now!" ]
8ea9d67cc84fe6aff17a469c703d5492dbcd93ed
https://github.com/mwyatt/core/blob/8ea9d67cc84fe6aff17a469c703d5492dbcd93ed/src/Mail.php#L51-L57
196,496
shgysk8zer0/core_api
traits/pdostatement.php
PDOStatement.execute
final public function execute($bound_input_params = null) { if (!is_array($bound_input_params) or empty($bound_input_params)) { $success = parent::execute(); } else { $success = parent::execute($this->bindConversion($bound_input_params)); } // Accumulative success of statement execution if (is_null($t...
php
final public function execute($bound_input_params = null) { if (!is_array($bound_input_params) or empty($bound_input_params)) { $success = parent::execute(); } else { $success = parent::execute($this->bindConversion($bound_input_params)); } // Accumulative success of statement execution if (is_null($t...
[ "final", "public", "function", "execute", "(", "$", "bound_input_params", "=", "null", ")", "{", "if", "(", "!", "is_array", "(", "$", "bound_input_params", ")", "or", "empty", "(", "$", "bound_input_params", ")", ")", "{", "$", "success", "=", "parent", ...
Execute the prepared statement @param array $bound_input_params [$key => $value] @return self
[ "Execute", "the", "prepared", "statement" ]
9e9b8baf761af874b95256ad2462e55fbb2b2e58
https://github.com/shgysk8zer0/core_api/blob/9e9b8baf761af874b95256ad2462e55fbb2b2e58/traits/pdostatement.php#L54-L74
196,497
Xsaven/laravel-intelect-admin
src/Addons/LogViewer/LogViewer.php
LogViewer.getLogFiles
public function getLogFiles($count = 20) { $files = glob(storage_path('logs/*')); $files = array_combine($files, array_map("filemtime", $files)); arsort($files); $files = array_map('basename', array_keys($files)); return array_slice($files, 0, $count); }
php
public function getLogFiles($count = 20) { $files = glob(storage_path('logs/*')); $files = array_combine($files, array_map("filemtime", $files)); arsort($files); $files = array_map('basename', array_keys($files)); return array_slice($files, 0, $count); }
[ "public", "function", "getLogFiles", "(", "$", "count", "=", "20", ")", "{", "$", "files", "=", "glob", "(", "storage_path", "(", "'logs/*'", ")", ")", ";", "$", "files", "=", "array_combine", "(", "$", "files", ",", "array_map", "(", "\"filemtime\"", ...
Get log file list in storage. @param int $count @return array
[ "Get", "log", "file", "list", "in", "storage", "." ]
592574633d12c74cf25b43dd6694fee496abefcb
https://github.com/Xsaven/laravel-intelect-admin/blob/592574633d12c74cf25b43dd6694fee496abefcb/src/Addons/LogViewer/LogViewer.php#L102-L111
196,498
Xsaven/laravel-intelect-admin
src/Addons/LogViewer/LogViewer.php
LogViewer.getPrevPageUrl
public function getPrevPageUrl() { if ($this->pageOffset['end'] >= $this->getFilesize() - 1) { return false; } return [ 'file' => $this->file, 'offset' => $this->pageOffset['end'] ]; }
php
public function getPrevPageUrl() { if ($this->pageOffset['end'] >= $this->getFilesize() - 1) { return false; } return [ 'file' => $this->file, 'offset' => $this->pageOffset['end'] ]; }
[ "public", "function", "getPrevPageUrl", "(", ")", "{", "if", "(", "$", "this", "->", "pageOffset", "[", "'end'", "]", ">=", "$", "this", "->", "getFilesize", "(", ")", "-", "1", ")", "{", "return", "false", ";", "}", "return", "[", "'file'", "=>", ...
Get previous page url. @return bool|string
[ "Get", "previous", "page", "url", "." ]
592574633d12c74cf25b43dd6694fee496abefcb
https://github.com/Xsaven/laravel-intelect-admin/blob/592574633d12c74cf25b43dd6694fee496abefcb/src/Addons/LogViewer/LogViewer.php#L130-L139
196,499
Xsaven/laravel-intelect-admin
src/Addons/LogViewer/LogViewer.php
LogViewer.tail
public function tail($seek) { // Open the file $f = fopen($this->filePath, "rb"); if (!$seek) { // Jump to last character fseek($f, -1, SEEK_END); } else { fseek($f, abs($seek)); } $output = ''; while (!feof($f)) { ...
php
public function tail($seek) { // Open the file $f = fopen($this->filePath, "rb"); if (!$seek) { // Jump to last character fseek($f, -1, SEEK_END); } else { fseek($f, abs($seek)); } $output = ''; while (!feof($f)) { ...
[ "public", "function", "tail", "(", "$", "seek", ")", "{", "// Open the file", "$", "f", "=", "fopen", "(", "$", "this", "->", "filePath", ",", "\"rb\"", ")", ";", "if", "(", "!", "$", "seek", ")", "{", "// Jump to last character", "fseek", "(", "$", ...
Get tail logs in log file. @param integer $seek @return array
[ "Get", "tail", "logs", "in", "log", "file", "." ]
592574633d12c74cf25b43dd6694fee496abefcb
https://github.com/Xsaven/laravel-intelect-admin/blob/592574633d12c74cf25b43dd6694fee496abefcb/src/Addons/LogViewer/LogViewer.php#L237-L266