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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
241,100 | vinala/kernel | src/MVC/Model/ORM.php | ORM.reset | private function reset()
{
$vars = get_object_vars($this);
//
foreach ($vars as $key => $value) {
unset($this->$key);
}
} | php | private function reset()
{
$vars = get_object_vars($this);
//
foreach ($vars as $key => $value) {
unset($this->$key);
}
} | [
"private",
"function",
"reset",
"(",
")",
"{",
"$",
"vars",
"=",
"get_object_vars",
"(",
"$",
"this",
")",
";",
"//",
"foreach",
"(",
"$",
"vars",
"as",
"$",
"key",
"=>",
"$",
"value",
")",
"{",
"unset",
"(",
"$",
"this",
"->",
"$",
"key",
")",
... | reset the current model if it's deleted.
@return null | [
"reset",
"the",
"current",
"model",
"if",
"it",
"s",
"deleted",
"."
] | 346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a | https://github.com/vinala/kernel/blob/346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a/src/MVC/Model/ORM.php#L774-L781 |
241,101 | vinala/kernel | src/MVC/Model/ORM.php | ORM.restore | public function restore()
{
if ($this->_kept) {
$this->bring();
//
Query::table(static::$table)
->set('deleted_at', 'NULL', false)
->where($this->_keyName, '=', $this->_keyValue)
->update();
}
} | php | public function restore()
{
if ($this->_kept) {
$this->bring();
//
Query::table(static::$table)
->set('deleted_at', 'NULL', false)
->where($this->_keyName, '=', $this->_keyValue)
->update();
}
} | [
"public",
"function",
"restore",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_kept",
")",
"{",
"$",
"this",
"->",
"bring",
"(",
")",
";",
"//",
"Query",
"::",
"table",
"(",
"static",
"::",
"$",
"table",
")",
"->",
"set",
"(",
"'deleted_at'",
",... | restore the model if it's kept deleted.
@return bool | [
"restore",
"the",
"model",
"if",
"it",
"s",
"kept",
"deleted",
"."
] | 346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a | https://github.com/vinala/kernel/blob/346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a/src/MVC/Model/ORM.php#L788-L798 |
241,102 | vinala/kernel | src/MVC/Model/ORM.php | ORM.bring | private function bring()
{
foreach ($this->_keptData as $key => $value) {
$this->$key = $value;
}
//
$this->_keyValue = $this->_keptData[$this->_keyName];
//
$this->_keptData = null;
$this->_kept = false;
} | php | private function bring()
{
foreach ($this->_keptData as $key => $value) {
$this->$key = $value;
}
//
$this->_keyValue = $this->_keptData[$this->_keyName];
//
$this->_keptData = null;
$this->_kept = false;
} | [
"private",
"function",
"bring",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"_keptData",
"as",
"$",
"key",
"=>",
"$",
"value",
")",
"{",
"$",
"this",
"->",
"$",
"key",
"=",
"$",
"value",
";",
"}",
"//",
"$",
"this",
"->",
"_keyValue",
"=",
... | to extruct data from keptdata array to become properties.
@return null | [
"to",
"extruct",
"data",
"from",
"keptdata",
"array",
"to",
"become",
"properties",
"."
] | 346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a | https://github.com/vinala/kernel/blob/346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a/src/MVC/Model/ORM.php#L805-L815 |
241,103 | vinala/kernel | src/MVC/Model/ORM.php | ORM.all | public static function all()
{
$class = get_called_class();
$object = new $class();
$table = $object->_table;
$key = $object->_keyName;
//
$data = Query::table($table)->select('*')->where("'true'", '=', 'true');
//
if ($object->_canKept) {
... | php | public static function all()
{
$class = get_called_class();
$object = new $class();
$table = $object->_table;
$key = $object->_keyName;
//
$data = Query::table($table)->select('*')->where("'true'", '=', 'true');
//
if ($object->_canKept) {
... | [
"public",
"static",
"function",
"all",
"(",
")",
"{",
"$",
"class",
"=",
"get_called_class",
"(",
")",
";",
"$",
"object",
"=",
"new",
"$",
"class",
"(",
")",
";",
"$",
"table",
"=",
"$",
"object",
"->",
"_table",
";",
"$",
"key",
"=",
"$",
"obje... | get collection of all data of the model from data table.
@return Collection | [
"get",
"collection",
"of",
"all",
"data",
"of",
"the",
"model",
"from",
"data",
"table",
"."
] | 346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a | https://github.com/vinala/kernel/blob/346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a/src/MVC/Model/ORM.php#L886-L912 |
241,104 | vinala/kernel | src/MVC/Model/ORM.php | ORM.onlyTrash | public static function onlyTrash()
{
$class = get_called_class();
$object = new $class();
$table = $object->_table;
$key = $object->_keyName;
//
$data = Query::table($table)->select('*');
//
if ($object->_canKept) {
$data = $data->where('de... | php | public static function onlyTrash()
{
$class = get_called_class();
$object = new $class();
$table = $object->_table;
$key = $object->_keyName;
//
$data = Query::table($table)->select('*');
//
if ($object->_canKept) {
$data = $data->where('de... | [
"public",
"static",
"function",
"onlyTrash",
"(",
")",
"{",
"$",
"class",
"=",
"get_called_class",
"(",
")",
";",
"$",
"object",
"=",
"new",
"$",
"class",
"(",
")",
";",
"$",
"table",
"=",
"$",
"object",
"->",
"_table",
";",
"$",
"key",
"=",
"$",
... | get collection of all kept data of the model from data table.
@return Collection | [
"get",
"collection",
"of",
"all",
"kept",
"data",
"of",
"the",
"model",
"from",
"data",
"table",
"."
] | 346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a | https://github.com/vinala/kernel/blob/346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a/src/MVC/Model/ORM.php#L945-L961 |
241,105 | vinala/kernel | src/MVC/Model/ORM.php | ORM.where | public static function where($column, $relation, $value)
{
$self = self::instance();
$key = $self->_keyName;
$data = \Query::from($self->_table)->select($key)->where($column, $relation, $value)->get();
$rows = [];
if (!is_null($data)) {
foreach ($data as $item) {... | php | public static function where($column, $relation, $value)
{
$self = self::instance();
$key = $self->_keyName;
$data = \Query::from($self->_table)->select($key)->where($column, $relation, $value)->get();
$rows = [];
if (!is_null($data)) {
foreach ($data as $item) {... | [
"public",
"static",
"function",
"where",
"(",
"$",
"column",
",",
"$",
"relation",
",",
"$",
"value",
")",
"{",
"$",
"self",
"=",
"self",
"::",
"instance",
"(",
")",
";",
"$",
"key",
"=",
"$",
"self",
"->",
"_keyName",
";",
"$",
"data",
"=",
"\\"... | get data by where clause.
@param string $column
@param string $relation
@param string $value
@return array | [
"get",
"data",
"by",
"where",
"clause",
"."
] | 346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a | https://github.com/vinala/kernel/blob/346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a/src/MVC/Model/ORM.php#L1054-L1068 |
241,106 | indigophp-archive/codeception-fuel-module | fuel/fuel/packages/parser/classes/view.php | View.forge | public static function forge($file = null, $data = null, $auto_encode = null)
{
$class = null;
if ($file !== null)
{
$extension = pathinfo($file, PATHINFO_EXTENSION);
$class = \Config::get('parser.extensions.'.$extension, null);
}
if ($class === null)
{
$class = get_called_class();
}
// On... | php | public static function forge($file = null, $data = null, $auto_encode = null)
{
$class = null;
if ($file !== null)
{
$extension = pathinfo($file, PATHINFO_EXTENSION);
$class = \Config::get('parser.extensions.'.$extension, null);
}
if ($class === null)
{
$class = get_called_class();
}
// On... | [
"public",
"static",
"function",
"forge",
"(",
"$",
"file",
"=",
"null",
",",
"$",
"data",
"=",
"null",
",",
"$",
"auto_encode",
"=",
"null",
")",
"{",
"$",
"class",
"=",
"null",
";",
"if",
"(",
"$",
"file",
"!==",
"null",
")",
"{",
"$",
"extensio... | Forges a new View object based on the extension
@param string $file view filename
@param array $data view data
@param bool $auto_encode auto encode boolean, null for default
@return object a new view instance | [
"Forges",
"a",
"new",
"View",
"object",
"based",
"on",
"the",
"extension"
] | 0973b7cbd540a0e89cc5bb7af94627f77f09bf49 | https://github.com/indigophp-archive/codeception-fuel-module/blob/0973b7cbd540a0e89cc5bb7af94627f77f09bf49/fuel/fuel/packages/parser/classes/view.php#L54-L111 |
241,107 | friendsofaura/FOA.Responder_Bundle | src/Renderer/Smarty.php | Smarty.setTemplateExtension | public function setTemplateExtension($extension)
{
$extension = (string) $extension;
$extension = trim($extension);
if ('.' == $extension[0]) {
$extension = substr($extension, 1);
}
$this->extension = $extension;
} | php | public function setTemplateExtension($extension)
{
$extension = (string) $extension;
$extension = trim($extension);
if ('.' == $extension[0]) {
$extension = substr($extension, 1);
}
$this->extension = $extension;
} | [
"public",
"function",
"setTemplateExtension",
"(",
"$",
"extension",
")",
"{",
"$",
"extension",
"=",
"(",
"string",
")",
"$",
"extension",
";",
"$",
"extension",
"=",
"trim",
"(",
"$",
"extension",
")",
";",
"if",
"(",
"'.'",
"==",
"$",
"extension",
"... | Set Template Extension file
@param string $extension | [
"Set",
"Template",
"Extension",
"file"
] | 1c5548a12aead69c775052878330161de4cf0e48 | https://github.com/friendsofaura/FOA.Responder_Bundle/blob/1c5548a12aead69c775052878330161de4cf0e48/src/Renderer/Smarty.php#L46-L55 |
241,108 | friendsofaura/FOA.Responder_Bundle | src/Renderer/Smarty.php | Smarty.setLayoutVariableName | public function setLayoutVariableName($name)
{
$name = (string) $name;
$name = trim($name);
if (! preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $name)) {
throw new InvalidArgumentException('Invalid variable name');
}
$this->layoutVariableName = $name;
... | php | public function setLayoutVariableName($name)
{
$name = (string) $name;
$name = trim($name);
if (! preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $name)) {
throw new InvalidArgumentException('Invalid variable name');
}
$this->layoutVariableName = $name;
... | [
"public",
"function",
"setLayoutVariableName",
"(",
"$",
"name",
")",
"{",
"$",
"name",
"=",
"(",
"string",
")",
"$",
"name",
";",
"$",
"name",
"=",
"trim",
"(",
"$",
"name",
")",
";",
"if",
"(",
"!",
"preg_match",
"(",
"'/^[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9... | Set Layout main variable name
@param string $name | [
"Set",
"Layout",
"main",
"variable",
"name"
] | 1c5548a12aead69c775052878330161de4cf0e48 | https://github.com/friendsofaura/FOA.Responder_Bundle/blob/1c5548a12aead69c775052878330161de4cf0e48/src/Renderer/Smarty.php#L72-L80 |
241,109 | uthando-cms/uthando-common | src/UthandoCommon/Model/NestedSet.php | NestedSet.hasChildren | public function hasChildren(): bool
{
$children = (($this->getRgt() - $this->getLft()) - 1) / 2;
return (0 === $children) ? false : true;
} | php | public function hasChildren(): bool
{
$children = (($this->getRgt() - $this->getLft()) - 1) / 2;
return (0 === $children) ? false : true;
} | [
"public",
"function",
"hasChildren",
"(",
")",
":",
"bool",
"{",
"$",
"children",
"=",
"(",
"(",
"$",
"this",
"->",
"getRgt",
"(",
")",
"-",
"$",
"this",
"->",
"getLft",
"(",
")",
")",
"-",
"1",
")",
"/",
"2",
";",
"return",
"(",
"0",
"===",
... | returns true if there are children
@return bool | [
"returns",
"true",
"if",
"there",
"are",
"children"
] | feb915da5d26b60f536282e1bc3ad5c22e53f485 | https://github.com/uthando-cms/uthando-common/blob/feb915da5d26b60f536282e1bc3ad5c22e53f485/src/UthandoCommon/Model/NestedSet.php#L103-L107 |
241,110 | amilna/yap | gii/crud/Generator.php | Generator.generateSearchRules | public function generateSearchRules()
{
if (($table = $this->getTableSchema()) === false) {
return ["[['" . implode("', '", $this->getColumnNames()) . "'], 'safe']"];
}
$types = [];
foreach ($table->columns as $column) {
switch ($column->type) {
... | php | public function generateSearchRules()
{
if (($table = $this->getTableSchema()) === false) {
return ["[['" . implode("', '", $this->getColumnNames()) . "'], 'safe']"];
}
$types = [];
foreach ($table->columns as $column) {
switch ($column->type) {
... | [
"public",
"function",
"generateSearchRules",
"(",
")",
"{",
"if",
"(",
"(",
"$",
"table",
"=",
"$",
"this",
"->",
"getTableSchema",
"(",
")",
")",
"===",
"false",
")",
"{",
"return",
"[",
"\"[['\"",
".",
"implode",
"(",
"\"', '\"",
",",
"$",
"this",
... | Generates validation rules for the search model.
@return array the generated validation rules | [
"Generates",
"validation",
"rules",
"for",
"the",
"search",
"model",
"."
] | 24a9e7115cb92055b4c5e78c63a4a7d4f962004a | https://github.com/amilna/yap/blob/24a9e7115cb92055b4c5e78c63a4a7d4f962004a/gii/crud/Generator.php#L313-L362 |
241,111 | indigophp-archive/codeception-fuel-module | fuel/fuel/packages/orm/classes/observer.php | Observer.instance | public static function instance($model_class)
{
$observer = get_called_class();
if (empty(static::$_instances[$observer][$model_class]))
{
static::$_instances[$observer][$model_class] = new static($model_class);
}
return static::$_instances[$observer][$model_class];
} | php | public static function instance($model_class)
{
$observer = get_called_class();
if (empty(static::$_instances[$observer][$model_class]))
{
static::$_instances[$observer][$model_class] = new static($model_class);
}
return static::$_instances[$observer][$model_class];
} | [
"public",
"static",
"function",
"instance",
"(",
"$",
"model_class",
")",
"{",
"$",
"observer",
"=",
"get_called_class",
"(",
")",
";",
"if",
"(",
"empty",
"(",
"static",
"::",
"$",
"_instances",
"[",
"$",
"observer",
"]",
"[",
"$",
"model_class",
"]",
... | Create an instance of this observer
@param string name of the model class | [
"Create",
"an",
"instance",
"of",
"this",
"observer"
] | 0973b7cbd540a0e89cc5bb7af94627f77f09bf49 | https://github.com/indigophp-archive/codeception-fuel-module/blob/0973b7cbd540a0e89cc5bb7af94627f77f09bf49/fuel/fuel/packages/orm/classes/observer.php#L47-L56 |
241,112 | requtize/atline | src/Atline/Compiler.php | Compiler.compiledExists | public function compiledExists()
{
return $this->cached === false ? false : file_exists($this->cachePath.'/'.$this->getClassName().'.php');
} | php | public function compiledExists()
{
return $this->cached === false ? false : file_exists($this->cachePath.'/'.$this->getClassName().'.php');
} | [
"public",
"function",
"compiledExists",
"(",
")",
"{",
"return",
"$",
"this",
"->",
"cached",
"===",
"false",
"?",
"false",
":",
"file_exists",
"(",
"$",
"this",
"->",
"cachePath",
".",
"'/'",
".",
"$",
"this",
"->",
"getClassName",
"(",
")",
".",
"'.p... | Check if compiled view already exists.
@return boolean | [
"Check",
"if",
"compiled",
"view",
"already",
"exists",
"."
] | 9a1b5fe70485f701b3d300fe41d81e6eccc0f27d | https://github.com/requtize/atline/blob/9a1b5fe70485f701b3d300fe41d81e6eccc0f27d/src/Atline/Compiler.php#L175-L178 |
241,113 | requtize/atline | src/Atline/Compiler.php | Compiler.compile | public function compile()
{
if($this->compiledExists() === false)
{
if(is_file($this->filepath) === false)
{
throw new \Exception('File "'.$this->filepath.'" does not exists.');
}
$this->raw = file_get_contents($this->filepath);
... | php | public function compile()
{
if($this->compiledExists() === false)
{
if(is_file($this->filepath) === false)
{
throw new \Exception('File "'.$this->filepath.'" does not exists.');
}
$this->raw = file_get_contents($this->filepath);
... | [
"public",
"function",
"compile",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"compiledExists",
"(",
")",
"===",
"false",
")",
"{",
"if",
"(",
"is_file",
"(",
"$",
"this",
"->",
"filepath",
")",
"===",
"false",
")",
"{",
"throw",
"new",
"\\",
"Exce... | Compile view, if compiled version doesn't exists in cache.
@return void | [
"Compile",
"view",
"if",
"compiled",
"version",
"doesn",
"t",
"exists",
"in",
"cache",
"."
] | 9a1b5fe70485f701b3d300fe41d81e6eccc0f27d | https://github.com/requtize/atline/blob/9a1b5fe70485f701b3d300fe41d81e6eccc0f27d/src/Atline/Compiler.php#L206-L233 |
241,114 | requtize/atline | src/Atline/Compiler.php | Compiler.resolveExtending | public function resolveExtending()
{
/**
* Extending of view.
*/
preg_match_all('/@extends\(\'([a-zA-Z0-9\.\-]+)\'\)/', $this->prepared, $matches);
if(isset($matches[1][0]))
{
$this->extends = trim($matches[1][0]);
$this->prepared = trim(s... | php | public function resolveExtending()
{
/**
* Extending of view.
*/
preg_match_all('/@extends\(\'([a-zA-Z0-9\.\-]+)\'\)/', $this->prepared, $matches);
if(isset($matches[1][0]))
{
$this->extends = trim($matches[1][0]);
$this->prepared = trim(s... | [
"public",
"function",
"resolveExtending",
"(",
")",
"{",
"/**\n * Extending of view.\n */",
"preg_match_all",
"(",
"'/@extends\\(\\'([a-zA-Z0-9\\.\\-]+)\\'\\)/'",
",",
"$",
"this",
"->",
"prepared",
",",
"$",
"matches",
")",
";",
"if",
"(",
"isset",
"(",... | Extending view.
Examples:
- Extends view by view named by definition: master.index
@extends('master.index')
- Tells that this view should not be extending.
@no-extends | [
"Extending",
"view",
"."
] | 9a1b5fe70485f701b3d300fe41d81e6eccc0f27d | https://github.com/requtize/atline/blob/9a1b5fe70485f701b3d300fe41d81e6eccc0f27d/src/Atline/Compiler.php#L429-L454 |
241,115 | requtize/atline | src/Atline/Compiler.php | Compiler.compileSpecialStatements | public function compileSpecialStatements()
{
/**
* Statemet that sets the variable value.
*/
preg_match_all('/@set\s?(.*)/', $this->prepared, $matches);
foreach($matches[0] as $key => $val)
{
$exploded = explode(' ', $matches[1][$key]);
$var... | php | public function compileSpecialStatements()
{
/**
* Statemet that sets the variable value.
*/
preg_match_all('/@set\s?(.*)/', $this->prepared, $matches);
foreach($matches[0] as $key => $val)
{
$exploded = explode(' ', $matches[1][$key]);
$var... | [
"public",
"function",
"compileSpecialStatements",
"(",
")",
"{",
"/**\n * Statemet that sets the variable value.\n */",
"preg_match_all",
"(",
"'/@set\\s?(.*)/'",
",",
"$",
"this",
"->",
"prepared",
",",
"$",
"matches",
")",
";",
"foreach",
"(",
"$",
"ma... | Compile special statements.
Exaples:
- Sets variable with value
@set $variable 'value'
@return void | [
"Compile",
"special",
"statements",
"."
] | 9a1b5fe70485f701b3d300fe41d81e6eccc0f27d | https://github.com/requtize/atline/blob/9a1b5fe70485f701b3d300fe41d81e6eccc0f27d/src/Atline/Compiler.php#L844-L869 |
241,116 | requtize/atline | src/Atline/Compiler.php | Compiler.createFiltersMethods | public function createFiltersMethods(array $names, $variable)
{
if($names === array())
{
return $variable;
}
$filter = array_shift($names);
if($filter === 'raw')
{
$result = $this->createFiltersMethods($names, $variable);
}
el... | php | public function createFiltersMethods(array $names, $variable)
{
if($names === array())
{
return $variable;
}
$filter = array_shift($names);
if($filter === 'raw')
{
$result = $this->createFiltersMethods($names, $variable);
}
el... | [
"public",
"function",
"createFiltersMethods",
"(",
"array",
"$",
"names",
",",
"$",
"variable",
")",
"{",
"if",
"(",
"$",
"names",
"===",
"array",
"(",
")",
")",
"{",
"return",
"$",
"variable",
";",
"}",
"$",
"filter",
"=",
"array_shift",
"(",
"$",
"... | Creates filters methods for varible.
@param array $names Array of filters to apply.
@param string $variable Variable name for filtering.
@return string | [
"Creates",
"filters",
"methods",
"for",
"varible",
"."
] | 9a1b5fe70485f701b3d300fe41d81e6eccc0f27d | https://github.com/requtize/atline/blob/9a1b5fe70485f701b3d300fe41d81e6eccc0f27d/src/Atline/Compiler.php#L878-L909 |
241,117 | coreplex/core | src/Session/Native.php | Native.get | public function get($key)
{
$session = $this->getSessionData();
return $this->has($key) ? $session[$key] : null;
} | php | public function get($key)
{
$session = $this->getSessionData();
return $this->has($key) ? $session[$key] : null;
} | [
"public",
"function",
"get",
"(",
"$",
"key",
")",
"{",
"$",
"session",
"=",
"$",
"this",
"->",
"getSessionData",
"(",
")",
";",
"return",
"$",
"this",
"->",
"has",
"(",
"$",
"key",
")",
"?",
"$",
"session",
"[",
"$",
"key",
"]",
":",
"null",
"... | Retrieve a property from the session by its key.
@param $key
@return mixed | [
"Retrieve",
"a",
"property",
"from",
"the",
"session",
"by",
"its",
"key",
"."
] | 82ce08268dc6291310bc7d1060cc65a17e78244c | https://github.com/coreplex/core/blob/82ce08268dc6291310bc7d1060cc65a17e78244c/src/Session/Native.php#L69-L74 |
241,118 | coreplex/core | src/Session/Native.php | Native.getSessionData | protected function getSessionData()
{
$data = isset($_SESSION[$this->config['key']]) ? $_SESSION[$this->config['key']] : [];
return array_merge($data, $this->flash);
} | php | protected function getSessionData()
{
$data = isset($_SESSION[$this->config['key']]) ? $_SESSION[$this->config['key']] : [];
return array_merge($data, $this->flash);
} | [
"protected",
"function",
"getSessionData",
"(",
")",
"{",
"$",
"data",
"=",
"isset",
"(",
"$",
"_SESSION",
"[",
"$",
"this",
"->",
"config",
"[",
"'key'",
"]",
"]",
")",
"?",
"$",
"_SESSION",
"[",
"$",
"this",
"->",
"config",
"[",
"'key'",
"]",
"]"... | Merge all of the notifier session data and any flashed data.
@return array | [
"Merge",
"all",
"of",
"the",
"notifier",
"session",
"data",
"and",
"any",
"flashed",
"data",
"."
] | 82ce08268dc6291310bc7d1060cc65a17e78244c | https://github.com/coreplex/core/blob/82ce08268dc6291310bc7d1060cc65a17e78244c/src/Session/Native.php#L123-L128 |
241,119 | ExSituMarketing/EXS-LanderTrackingHouseBundle | Service/TrackingParameterAppender.php | TrackingParameterAppender.append | public function append($url, $formatterName = null)
{
$urlComponents = parse_url($url);
$parameters = array();
if (isset($urlComponents['query'])) {
parse_str($urlComponents['query'], $parameters);
}
$trackingParameters = $this->persister->getAllTrackingParamete... | php | public function append($url, $formatterName = null)
{
$urlComponents = parse_url($url);
$parameters = array();
if (isset($urlComponents['query'])) {
parse_str($urlComponents['query'], $parameters);
}
$trackingParameters = $this->persister->getAllTrackingParamete... | [
"public",
"function",
"append",
"(",
"$",
"url",
",",
"$",
"formatterName",
"=",
"null",
")",
"{",
"$",
"urlComponents",
"=",
"parse_url",
"(",
"$",
"url",
")",
";",
"$",
"parameters",
"=",
"array",
"(",
")",
";",
"if",
"(",
"isset",
"(",
"$",
"url... | Appends the query parameters depending on domain's formatters defined in configuration.
@param string $url
@param string $formatterName
@return string | [
"Appends",
"the",
"query",
"parameters",
"depending",
"on",
"domain",
"s",
"formatters",
"defined",
"in",
"configuration",
"."
] | 404ce51ec1ee0bf5e669eb1f4cd04746e244f61a | https://github.com/ExSituMarketing/EXS-LanderTrackingHouseBundle/blob/404ce51ec1ee0bf5e669eb1f4cd04746e244f61a/Service/TrackingParameterAppender.php#L90-L131 |
241,120 | SlabPHP/sequencer | src/CallQueue.php | CallQueue.execute | public function execute($objectContext)
{
if (!$this->ok) return;
foreach ($this->entries as $entry)
{
if (!$this->ok) return;
$entry->execute($objectContext);
}
} | php | public function execute($objectContext)
{
if (!$this->ok) return;
foreach ($this->entries as $entry)
{
if (!$this->ok) return;
$entry->execute($objectContext);
}
} | [
"public",
"function",
"execute",
"(",
"$",
"objectContext",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"ok",
")",
"return",
";",
"foreach",
"(",
"$",
"this",
"->",
"entries",
"as",
"$",
"entry",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"ok"... | Execute call queue
@param $objectContext | [
"Execute",
"call",
"queue"
] | 77fd738a4df741c8e789b9ccf4974efc47328346 | https://github.com/SlabPHP/sequencer/blob/77fd738a4df741c8e789b9ccf4974efc47328346/src/CallQueue.php#L77-L87 |
241,121 | znframework/package-console | Library.php | Library.classMethod | protected function classMethod(&$class = NULL, &$method = NULL, $command)
{
$commandEx = explode(':', $command);
$class = $commandEx[0];
$method = $commandEx[1] ?? NULL;
} | php | protected function classMethod(&$class = NULL, &$method = NULL, $command)
{
$commandEx = explode(':', $command);
$class = $commandEx[0];
$method = $commandEx[1] ?? NULL;
} | [
"protected",
"function",
"classMethod",
"(",
"&",
"$",
"class",
"=",
"NULL",
",",
"&",
"$",
"method",
"=",
"NULL",
",",
"$",
"command",
")",
"{",
"$",
"commandEx",
"=",
"explode",
"(",
"':'",
",",
"$",
"command",
")",
";",
"$",
"class",
"=",
"$",
... | protected class method
@param string &$class
@param string &$method
@return void | [
"protected",
"class",
"method"
] | fde428da8b9d926ea4256c235f542e6225c5d788 | https://github.com/znframework/package-console/blob/fde428da8b9d926ea4256c235f542e6225c5d788/Library.php#L46-L51 |
241,122 | jannisfink/config | src/loader/FileConfigurationLoader.php | FileConfigurationLoader.checkConfiguration | public final function checkConfiguration($deep = false) {
if (!file_exists($this->filename) || !is_readable($this->filename)) {
throw new ConfigurationNotFoundException("File $this->filename does not exist or is not readable");
}
$fileExtension = pathinfo($this->filename, PATHINFO_EXTENSION);
if ... | php | public final function checkConfiguration($deep = false) {
if (!file_exists($this->filename) || !is_readable($this->filename)) {
throw new ConfigurationNotFoundException("File $this->filename does not exist or is not readable");
}
$fileExtension = pathinfo($this->filename, PATHINFO_EXTENSION);
if ... | [
"public",
"final",
"function",
"checkConfiguration",
"(",
"$",
"deep",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"file_exists",
"(",
"$",
"this",
"->",
"filename",
")",
"||",
"!",
"is_readable",
"(",
"$",
"this",
"->",
"filename",
")",
")",
"{",
"throw",... | Checks, if a given file can be parsed by this configuration loader. If the file type is supported
by this loader, this function will return true without further checking for correct syntax of the
configuration file.
If the deep parameter is set to true, this function will try to parse the file formats to test
whether ... | [
"Checks",
"if",
"a",
"given",
"file",
"can",
"be",
"parsed",
"by",
"this",
"configuration",
"loader",
".",
"If",
"the",
"file",
"type",
"is",
"supported",
"by",
"this",
"loader",
"this",
"function",
"will",
"return",
"true",
"without",
"further",
"checking",... | 54dc18c6125c971c46ded9f9484f6802112aab44 | https://github.com/jannisfink/config/blob/54dc18c6125c971c46ded9f9484f6802112aab44/src/loader/FileConfigurationLoader.php#L70-L90 |
241,123 | inceddy/ieu_http | src/ieu/Http/RedirectResponse.php | RedirectResponse.setTarget | public function setTarget($target)
{
if (!is_string($target) || $target == '') {
throw new \InvalidArgumentException('No valid URL given.');
}
$this->target = $target;
// Set meta refresh content if header location is ignored
$this->setContent(
... | php | public function setTarget($target)
{
if (!is_string($target) || $target == '') {
throw new \InvalidArgumentException('No valid URL given.');
}
$this->target = $target;
// Set meta refresh content if header location is ignored
$this->setContent(
... | [
"public",
"function",
"setTarget",
"(",
"$",
"target",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"target",
")",
"||",
"$",
"target",
"==",
"''",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'No valid URL given.'",
")",
";",
"}... | Sets the target URL where the redirections points to.
@param string $target
The target URL
@return self | [
"Sets",
"the",
"target",
"URL",
"where",
"the",
"redirections",
"points",
"to",
"."
] | 4c9b097ee1e31ca45acfb79a855462d78b5c979c | https://github.com/inceddy/ieu_http/blob/4c9b097ee1e31ca45acfb79a855462d78b5c979c/src/ieu/Http/RedirectResponse.php#L52-L77 |
241,124 | nubs/sensible | src/Editor.php | Editor.editFile | public function editFile(ProcessBuilder $processBuilder, $filePath)
{
$proc = $processBuilder->setPrefix($this->_editorCommand)->setArguments([$filePath])->getProcess();
$proc->setTty(true)->run();
return $proc;
} | php | public function editFile(ProcessBuilder $processBuilder, $filePath)
{
$proc = $processBuilder->setPrefix($this->_editorCommand)->setArguments([$filePath])->getProcess();
$proc->setTty(true)->run();
return $proc;
} | [
"public",
"function",
"editFile",
"(",
"ProcessBuilder",
"$",
"processBuilder",
",",
"$",
"filePath",
")",
"{",
"$",
"proc",
"=",
"$",
"processBuilder",
"->",
"setPrefix",
"(",
"$",
"this",
"->",
"_editorCommand",
")",
"->",
"setArguments",
"(",
"[",
"$",
... | Edit the given file using the symfony process builder to build the
symfony process to execute.
@api
@param \Symfony\Component\Process\ProcessBuilder $processBuilder The
process builder.
@param string $filePath The path to the file to edit.
@return \Symfony\Component\Process\Process The already-executed process. | [
"Edit",
"the",
"given",
"file",
"using",
"the",
"symfony",
"process",
"builder",
"to",
"build",
"the",
"symfony",
"process",
"to",
"execute",
"."
] | d0ba8d66a93d42ac0a9fb813093e8c0c3559bac7 | https://github.com/nubs/sensible/blob/d0ba8d66a93d42ac0a9fb813093e8c0c3559bac7/src/Editor.php#L35-L41 |
241,125 | nubs/sensible | src/Editor.php | Editor.editData | public function editData(ProcessBuilder $processBuilder, $data)
{
$filePath = tempnam(sys_get_temp_dir(), 'sensibleEditor');
file_put_contents($filePath, $data);
$proc = $this->editFile($processBuilder, $filePath);
if ($proc->isSuccessful()) {
$data = file_get_contents($... | php | public function editData(ProcessBuilder $processBuilder, $data)
{
$filePath = tempnam(sys_get_temp_dir(), 'sensibleEditor');
file_put_contents($filePath, $data);
$proc = $this->editFile($processBuilder, $filePath);
if ($proc->isSuccessful()) {
$data = file_get_contents($... | [
"public",
"function",
"editData",
"(",
"ProcessBuilder",
"$",
"processBuilder",
",",
"$",
"data",
")",
"{",
"$",
"filePath",
"=",
"tempnam",
"(",
"sys_get_temp_dir",
"(",
")",
",",
"'sensibleEditor'",
")",
";",
"file_put_contents",
"(",
"$",
"filePath",
",",
... | Edit the given data using the symfony process builder to build the
symfony process to execute.
@api
@param \Symfony\Component\Process\ProcessBuilder $processBuilder The
process builder.
@param string $data The data to edit.
@return string The edited data (left alone if the editor returns a
failure). | [
"Edit",
"the",
"given",
"data",
"using",
"the",
"symfony",
"process",
"builder",
"to",
"build",
"the",
"symfony",
"process",
"to",
"execute",
"."
] | d0ba8d66a93d42ac0a9fb813093e8c0c3559bac7 | https://github.com/nubs/sensible/blob/d0ba8d66a93d42ac0a9fb813093e8c0c3559bac7/src/Editor.php#L54-L67 |
241,126 | arkanmgerges/multi-tier-architecture | src/MultiTierArchitecture/UseCase/Definition/BaseAbstract.php | BaseAbstract.execute | public function execute()
{
$repositoryResponse = [];
$arrayOfObjects = [];
$resultCount = 0;
$responseStatus = ResponseAbstract::STATUS_SUCCESS;
try {
$this->executeDataGateway();
if ($this->repository != null) {
$arrayOfObjects = ... | php | public function execute()
{
$repositoryResponse = [];
$arrayOfObjects = [];
$resultCount = 0;
$responseStatus = ResponseAbstract::STATUS_SUCCESS;
try {
$this->executeDataGateway();
if ($this->repository != null) {
$arrayOfObjects = ... | [
"public",
"function",
"execute",
"(",
")",
"{",
"$",
"repositoryResponse",
"=",
"[",
"]",
";",
"$",
"arrayOfObjects",
"=",
"[",
"]",
";",
"$",
"resultCount",
"=",
"0",
";",
"$",
"responseStatus",
"=",
"ResponseAbstract",
"::",
"STATUS_SUCCESS",
";",
"try",... | Execute this use case
@return void | [
"Execute",
"this",
"use",
"case"
] | e8729841db66de7de0bdc9ed79ab73fe2bc262c0 | https://github.com/arkanmgerges/multi-tier-architecture/blob/e8729841db66de7de0bdc9ed79ab73fe2bc262c0/src/MultiTierArchitecture/UseCase/Definition/BaseAbstract.php#L52-L84 |
241,127 | dms-org/package.content | src/Cms/Definition/ContentPackageDefinition.php | ContentPackageDefinition.module | public function module(string $name, string $icon, callable $definitionCallback)
{
$definition = new ContentModuleDefinition($name, $icon, $this->config);
$definitionCallback($definition);
$this->customModules([
$name => function () use ($definition) {
return $de... | php | public function module(string $name, string $icon, callable $definitionCallback)
{
$definition = new ContentModuleDefinition($name, $icon, $this->config);
$definitionCallback($definition);
$this->customModules([
$name => function () use ($definition) {
return $de... | [
"public",
"function",
"module",
"(",
"string",
"$",
"name",
",",
"string",
"$",
"icon",
",",
"callable",
"$",
"definitionCallback",
")",
"{",
"$",
"definition",
"=",
"new",
"ContentModuleDefinition",
"(",
"$",
"name",
",",
"$",
"icon",
",",
"$",
"this",
... | Defines a module within the content package.
Example:
<code>
$content->module('pages', 'file-text', function (ContentModuleDefinition $content) {
$content->group('template', 'Template')
->withImage('banner', 'Banner')
->withHtml('header', 'Header')
->withHtml('footer', 'Footer');
$content->page('home', 'Home')
->url(... | [
"Defines",
"a",
"module",
"within",
"the",
"content",
"package",
"."
] | 6511e805c5be586c1f3740e095b49adabd621f80 | https://github.com/dms-org/package.content/blob/6511e805c5be586c1f3740e095b49adabd621f80/src/Cms/Definition/ContentPackageDefinition.php#L84-L98 |
241,128 | bugotech/support | src/Num.php | Num.value | public static function value($str, $round = false)
{
if (is_string($str)) {
$str = strtr($str, '.', '');
$str = strtr($str, ',', '.');
}
$val = floatval($str);
if ($round !== false) {
$val = round($val, intval($round));
}
return ... | php | public static function value($str, $round = false)
{
if (is_string($str)) {
$str = strtr($str, '.', '');
$str = strtr($str, ',', '.');
}
$val = floatval($str);
if ($round !== false) {
$val = round($val, intval($round));
}
return ... | [
"public",
"static",
"function",
"value",
"(",
"$",
"str",
",",
"$",
"round",
"=",
"false",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"str",
")",
")",
"{",
"$",
"str",
"=",
"strtr",
"(",
"$",
"str",
",",
"'.'",
",",
"''",
")",
";",
"$",
"str... | Converte string em float.
@param $str
@param bool|int $round
@return float | [
"Converte",
"string",
"em",
"float",
"."
] | 8938b8c83bdc414ea46bd6e41d1911282782be6c | https://github.com/bugotech/support/blob/8938b8c83bdc414ea46bd6e41d1911282782be6c/src/Num.php#L60-L74 |
241,129 | BuildrPHP/Test-Tools | src/DataSetLoader/XML/StaticType/SimpleXMLNodeTypedAttributeGetter.php | SimpleXMLNodeTypedAttributeGetter.getValue | public function getValue() {
$type = (string) $this->element->attributes()->type;
$type = (empty($type)) ? 'string' : $type;
$value = (string) $this->element->attributes()->value;
$casterClassName = $this->resolveCasterClassName($type);
/** @type \BuildR\TestTools\Caster\Caster... | php | public function getValue() {
$type = (string) $this->element->attributes()->type;
$type = (empty($type)) ? 'string' : $type;
$value = (string) $this->element->attributes()->value;
$casterClassName = $this->resolveCasterClassName($type);
/** @type \BuildR\TestTools\Caster\Caster... | [
"public",
"function",
"getValue",
"(",
")",
"{",
"$",
"type",
"=",
"(",
"string",
")",
"$",
"this",
"->",
"element",
"->",
"attributes",
"(",
")",
"->",
"type",
";",
"$",
"type",
"=",
"(",
"empty",
"(",
"$",
"type",
")",
")",
"?",
"'string'",
":"... | Post-processing the node value by additionally specified type
declaration. If no type is defined, values returned as string.
@return bool|float|int|string | [
"Post",
"-",
"processing",
"the",
"node",
"value",
"by",
"additionally",
"specified",
"type",
"declaration",
".",
"If",
"no",
"type",
"is",
"defined",
"values",
"returned",
"as",
"string",
"."
] | 55978eb4447d6f063cc9b85501349636ca3fa67a | https://github.com/BuildrPHP/Test-Tools/blob/55978eb4447d6f063cc9b85501349636ca3fa67a/src/DataSetLoader/XML/StaticType/SimpleXMLNodeTypedAttributeGetter.php#L62-L72 |
241,130 | BuildrPHP/Test-Tools | src/DataSetLoader/XML/StaticType/SimpleXMLNodeTypedAttributeGetter.php | SimpleXMLNodeTypedAttributeGetter.resolveCasterClassName | private function resolveCasterClassName($type) {
foreach($this->casters as $typeNames => $casterClass) {
$names = explode('|', $typeNames);
if(!in_array($type, $names)) {
continue;
}
return $casterClass;
}
throw CasterExc... | php | private function resolveCasterClassName($type) {
foreach($this->casters as $typeNames => $casterClass) {
$names = explode('|', $typeNames);
if(!in_array($type, $names)) {
continue;
}
return $casterClass;
}
throw CasterExc... | [
"private",
"function",
"resolveCasterClassName",
"(",
"$",
"type",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"casters",
"as",
"$",
"typeNames",
"=>",
"$",
"casterClass",
")",
"{",
"$",
"names",
"=",
"explode",
"(",
"'|'",
",",
"$",
"typeNames",
")",
... | Resolve the correct caster class by defined type
@param string $type
@return string
@throws \BuildR\TestTools\Exception\CasterException | [
"Resolve",
"the",
"correct",
"caster",
"class",
"by",
"defined",
"type"
] | 55978eb4447d6f063cc9b85501349636ca3fa67a | https://github.com/BuildrPHP/Test-Tools/blob/55978eb4447d6f063cc9b85501349636ca3fa67a/src/DataSetLoader/XML/StaticType/SimpleXMLNodeTypedAttributeGetter.php#L82-L94 |
241,131 | avoo/FrameworkGeneratorBundle | Generator/Template/Form.php | Form.addFormDeclaration | private function addFormDeclaration($formTypeName)
{
$name = strtolower($this->model);
$extension = $matches = preg_split('/(?=[A-Z])/', $this->bundle->getName(), -1, PREG_SPLIT_NO_EMPTY);
$bundleName = $this->getBundlePrefix();
array_pop($extension);
$path = $this->bundle->g... | php | private function addFormDeclaration($formTypeName)
{
$name = strtolower($this->model);
$extension = $matches = preg_split('/(?=[A-Z])/', $this->bundle->getName(), -1, PREG_SPLIT_NO_EMPTY);
$bundleName = $this->getBundlePrefix();
array_pop($extension);
$path = $this->bundle->g... | [
"private",
"function",
"addFormDeclaration",
"(",
"$",
"formTypeName",
")",
"{",
"$",
"name",
"=",
"strtolower",
"(",
"$",
"this",
"->",
"model",
")",
";",
"$",
"extension",
"=",
"$",
"matches",
"=",
"preg_split",
"(",
"'/(?=[A-Z])/'",
",",
"$",
"this",
... | Add service form declaration
@param string $formTypeName | [
"Add",
"service",
"form",
"declaration"
] | 3178268b9e58e6c60c27e0b9ea976944c1f61a48 | https://github.com/avoo/FrameworkGeneratorBundle/blob/3178268b9e58e6c60c27e0b9ea976944c1f61a48/Generator/Template/Form.php#L121-L142 |
241,132 | avoo/FrameworkGeneratorBundle | Generator/Template/Form.php | Form.addService | private function addService($path, $bundleName, $name, $formTypeName)
{
$ref = '<services>';
$replaceBefore = true;
$group = $bundleName . '_' . $name;
$declaration = <<<EOF
<service id="$bundleName.form.type.$name" class="%$bundleName.form.type.$name.class%">
<a... | php | private function addService($path, $bundleName, $name, $formTypeName)
{
$ref = '<services>';
$replaceBefore = true;
$group = $bundleName . '_' . $name;
$declaration = <<<EOF
<service id="$bundleName.form.type.$name" class="%$bundleName.form.type.$name.class%">
<a... | [
"private",
"function",
"addService",
"(",
"$",
"path",
",",
"$",
"bundleName",
",",
"$",
"name",
",",
"$",
"formTypeName",
")",
"{",
"$",
"ref",
"=",
"'<services>'",
";",
"$",
"replaceBefore",
"=",
"true",
";",
"$",
"group",
"=",
"$",
"bundleName",
"."... | Add service node
@param string $path
@param string $bundleName
@param string $name
@param string $formTypeName | [
"Add",
"service",
"node"
] | 3178268b9e58e6c60c27e0b9ea976944c1f61a48 | https://github.com/avoo/FrameworkGeneratorBundle/blob/3178268b9e58e6c60c27e0b9ea976944c1f61a48/Generator/Template/Form.php#L196-L227 |
241,133 | avoo/FrameworkGeneratorBundle | Generator/Template/Form.php | Form.addParameter | private function addParameter($path, $bundleName, $name)
{
$formPath = $this->configuration['namespace'] . '\\' . $this->model . 'Type';
$ref = '<parameters>';
$replaceBefore = true;
$declaration = <<<EOF
<parameter key="$bundleName.form.type.$name.class">$formPath</paramete... | php | private function addParameter($path, $bundleName, $name)
{
$formPath = $this->configuration['namespace'] . '\\' . $this->model . 'Type';
$ref = '<parameters>';
$replaceBefore = true;
$declaration = <<<EOF
<parameter key="$bundleName.form.type.$name.class">$formPath</paramete... | [
"private",
"function",
"addParameter",
"(",
"$",
"path",
",",
"$",
"bundleName",
",",
"$",
"name",
")",
"{",
"$",
"formPath",
"=",
"$",
"this",
"->",
"configuration",
"[",
"'namespace'",
"]",
".",
"'\\\\'",
".",
"$",
"this",
"->",
"model",
".",
"'Type'... | Add parameter node
@param string $path
@param string $bundleName
@param string $name | [
"Add",
"parameter",
"node"
] | 3178268b9e58e6c60c27e0b9ea976944c1f61a48 | https://github.com/avoo/FrameworkGeneratorBundle/blob/3178268b9e58e6c60c27e0b9ea976944c1f61a48/Generator/Template/Form.php#L236-L262 |
241,134 | novuso/novusopress | core/CommentWalker.php | CommentWalker.start_lvl | public function start_lvl(&$output, $depth = 0, $args = [])
{
$GLOBALS['comment_depth'] = $depth + 1;
switch ($args['style']) {
case 'div':
break;
case 'ol':
$output .= '<ol class="children list-unstyled">'.PHP_EOL;
break;
... | php | public function start_lvl(&$output, $depth = 0, $args = [])
{
$GLOBALS['comment_depth'] = $depth + 1;
switch ($args['style']) {
case 'div':
break;
case 'ol':
$output .= '<ol class="children list-unstyled">'.PHP_EOL;
break;
... | [
"public",
"function",
"start_lvl",
"(",
"&",
"$",
"output",
",",
"$",
"depth",
"=",
"0",
",",
"$",
"args",
"=",
"[",
"]",
")",
"{",
"$",
"GLOBALS",
"[",
"'comment_depth'",
"]",
"=",
"$",
"depth",
"+",
"1",
";",
"switch",
"(",
"$",
"args",
"[",
... | Start the list before the elements are added.
@param string $output Passed by reference; used to append additional content
@param integer $depth Depth of comment
@param array $args Uses 'style' argument for type of HTML list | [
"Start",
"the",
"list",
"before",
"the",
"elements",
"are",
"added",
"."
] | e31a46b0afa4126788f5754f928552ce13f8531f | https://github.com/novuso/novusopress/blob/e31a46b0afa4126788f5754f928552ce13f8531f/core/CommentWalker.php#L24-L39 |
241,135 | novuso/novusopress | core/CommentWalker.php | CommentWalker.end_lvl | public function end_lvl(&$output, $depth = 0, $args = [])
{
$tab = ' ';
$indent = ($depth == 1) ? 8 + $depth : 7 + ($depth * 2);
switch ($args['style']) {
case 'div':
break;
case 'ol':
case 'ul':
default:
$ou... | php | public function end_lvl(&$output, $depth = 0, $args = [])
{
$tab = ' ';
$indent = ($depth == 1) ? 8 + $depth : 7 + ($depth * 2);
switch ($args['style']) {
case 'div':
break;
case 'ol':
case 'ul':
default:
$ou... | [
"public",
"function",
"end_lvl",
"(",
"&",
"$",
"output",
",",
"$",
"depth",
"=",
"0",
",",
"$",
"args",
"=",
"[",
"]",
")",
"{",
"$",
"tab",
"=",
"' '",
";",
"$",
"indent",
"=",
"(",
"$",
"depth",
"==",
"1",
")",
"?",
"8",
"+",
"$",
"de... | End the list of items after the elements are added.
@param string $output Passed by reference; used to append additional content
@param integer $depth Depth of comment
@param array $args Will only append content if style argument value is 'ol' or 'ul' | [
"End",
"the",
"list",
"of",
"items",
"after",
"the",
"elements",
"are",
"added",
"."
] | e31a46b0afa4126788f5754f928552ce13f8531f | https://github.com/novuso/novusopress/blob/e31a46b0afa4126788f5754f928552ce13f8531f/core/CommentWalker.php#L48-L64 |
241,136 | stubbles/stubbles-sequence | src/main/php/iterator/Generator.php | Generator.next | public function next()
{
$operation = $this->operation;
$this->value = $operation($this->value);
$this->elementsGenerated++;
} | php | public function next()
{
$operation = $this->operation;
$this->value = $operation($this->value);
$this->elementsGenerated++;
} | [
"public",
"function",
"next",
"(",
")",
"{",
"$",
"operation",
"=",
"$",
"this",
"->",
"operation",
";",
"$",
"this",
"->",
"value",
"=",
"$",
"operation",
"(",
"$",
"this",
"->",
"value",
")",
";",
"$",
"this",
"->",
"elementsGenerated",
"++",
";",
... | generates next value | [
"generates",
"next",
"value"
] | 258d2247f1cdd826818348fe15829d5a98a9de70 | https://github.com/stubbles/stubbles-sequence/blob/258d2247f1cdd826818348fe15829d5a98a9de70/src/main/php/iterator/Generator.php#L101-L106 |
241,137 | xloit/xloit-exception | src/Exception.php | Exception.create | public static function create($message, $messageVariables = null, $code = null, PhpException $previous = null)
{
$messageFormat = [
'message' => $message,
'messageVariables' => $messageVariables
];
return new static($messageFormat, $code, $previous);
} | php | public static function create($message, $messageVariables = null, $code = null, PhpException $previous = null)
{
$messageFormat = [
'message' => $message,
'messageVariables' => $messageVariables
];
return new static($messageFormat, $code, $previous);
} | [
"public",
"static",
"function",
"create",
"(",
"$",
"message",
",",
"$",
"messageVariables",
"=",
"null",
",",
"$",
"code",
"=",
"null",
",",
"PhpException",
"$",
"previous",
"=",
"null",
")",
"{",
"$",
"messageFormat",
"=",
"[",
"'message'",
"=>",
"$",
... | Creates a new exception by the given arguments.
@param string $message The message format.
@param array $messageVariables The message variables.
@param int|string $code The code of this exception.
@param PhpException $previous The previous exception.
@return Exception The n... | [
"Creates",
"a",
"new",
"exception",
"by",
"the",
"given",
"arguments",
"."
] | ba7cc942a9263c570b9b2325f93c75fb2e774714 | https://github.com/xloit/xloit-exception/blob/ba7cc942a9263c570b9b2325f93c75fb2e774714/src/Exception.php#L141-L149 |
241,138 | xloit/xloit-exception | src/Exception.php | Exception.setCode | public function setCode($code)
{
if (!is_scalar($code)) {
throw new InvalidArgumentException(
sprintf(
'Wrong parameters for %s([int|string $code]); %s given.',
__METHOD__,
is_object($code) ? get_class($code) : gettype($... | php | public function setCode($code)
{
if (!is_scalar($code)) {
throw new InvalidArgumentException(
sprintf(
'Wrong parameters for %s([int|string $code]); %s given.',
__METHOD__,
is_object($code) ? get_class($code) : gettype($... | [
"public",
"function",
"setCode",
"(",
"$",
"code",
")",
"{",
"if",
"(",
"!",
"is_scalar",
"(",
"$",
"code",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"sprintf",
"(",
"'Wrong parameters for %s([int|string $code]); %s given.'",
",",
"__METHOD__... | Sets the Exception code.
@param int|string $code
@return static
@throws InvalidArgumentException | [
"Sets",
"the",
"Exception",
"code",
"."
] | ba7cc942a9263c570b9b2325f93c75fb2e774714 | https://github.com/xloit/xloit-exception/blob/ba7cc942a9263c570b9b2325f93c75fb2e774714/src/Exception.php#L227-L243 |
241,139 | xloit/xloit-exception | src/Exception.php | Exception.setMessage | public function setMessage($message)
{
$messageVariables = null;
if (is_array($message)) {
if (array_key_exists('messageVariables', $message)) {
$messageVariables = $message['messageVariables'];
}
if (array_key_exists('message', $message)) {
... | php | public function setMessage($message)
{
$messageVariables = null;
if (is_array($message)) {
if (array_key_exists('messageVariables', $message)) {
$messageVariables = $message['messageVariables'];
}
if (array_key_exists('message', $message)) {
... | [
"public",
"function",
"setMessage",
"(",
"$",
"message",
")",
"{",
"$",
"messageVariables",
"=",
"null",
";",
"if",
"(",
"is_array",
"(",
"$",
"message",
")",
")",
"{",
"if",
"(",
"array_key_exists",
"(",
"'messageVariables'",
",",
"$",
"message",
")",
"... | Sets the Exception generated message.
@param array|string $message
@return static
@throws InvalidArgumentException | [
"Sets",
"the",
"Exception",
"generated",
"message",
"."
] | ba7cc942a9263c570b9b2325f93c75fb2e774714 | https://github.com/xloit/xloit-exception/blob/ba7cc942a9263c570b9b2325f93c75fb2e774714/src/Exception.php#L253-L284 |
241,140 | xloit/xloit-exception | src/Exception.php | Exception.createMessage | protected function createMessage($message, $variables = null)
{
if (null !== $variables && is_array($variables)) {
$variables = array_merge($this->getMessageVariables(), $variables);
} else {
$variables = $this->getMessageVariables();
}
foreach ($variables as... | php | protected function createMessage($message, $variables = null)
{
if (null !== $variables && is_array($variables)) {
$variables = array_merge($this->getMessageVariables(), $variables);
} else {
$variables = $this->getMessageVariables();
}
foreach ($variables as... | [
"protected",
"function",
"createMessage",
"(",
"$",
"message",
",",
"$",
"variables",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"!==",
"$",
"variables",
"&&",
"is_array",
"(",
"$",
"variables",
")",
")",
"{",
"$",
"variables",
"=",
"array_merge",
"(",
... | Constructs and returns a exception message with the given message key and value.
Returns null if and only if the given key does not correspond to an existing template.
@param string $message
@param array $variables
@return string | [
"Constructs",
"and",
"returns",
"a",
"exception",
"message",
"with",
"the",
"given",
"message",
"key",
"and",
"value",
".",
"Returns",
"null",
"if",
"and",
"only",
"if",
"the",
"given",
"key",
"does",
"not",
"correspond",
"to",
"an",
"existing",
"template",
... | ba7cc942a9263c570b9b2325f93c75fb2e774714 | https://github.com/xloit/xloit-exception/blob/ba7cc942a9263c570b9b2325f93c75fb2e774714/src/Exception.php#L322-L343 |
241,141 | xloit/xloit-exception | src/Exception.php | Exception.getCauseMessage | public function getCauseMessage()
{
$causes = [];
$current = [
'class' => get_class($this),
'message' => $this->getMessage(),
'code' => $this->getCode(),
'file' => $this->getFile(),
'line' => $this->getLine()
];
... | php | public function getCauseMessage()
{
$causes = [];
$current = [
'class' => get_class($this),
'message' => $this->getMessage(),
'code' => $this->getCode(),
'file' => $this->getFile(),
'line' => $this->getLine()
];
... | [
"public",
"function",
"getCauseMessage",
"(",
")",
"{",
"$",
"causes",
"=",
"[",
"]",
";",
"$",
"current",
"=",
"[",
"'class'",
"=>",
"get_class",
"(",
"$",
"this",
")",
",",
"'message'",
"=>",
"$",
"this",
"->",
"getMessage",
"(",
")",
",",
"'code'"... | Get the message of caused exceptions.
@return array | [
"Get",
"the",
"message",
"of",
"caused",
"exceptions",
"."
] | ba7cc942a9263c570b9b2325f93c75fb2e774714 | https://github.com/xloit/xloit-exception/blob/ba7cc942a9263c570b9b2325f93c75fb2e774714/src/Exception.php#L350-L385 |
241,142 | xloit/xloit-exception | src/Exception.php | Exception.getTraceSaveAsString | public function getTraceSaveAsString()
{
$traces = $this->getTrace();
$messages = ['STACK TRACE DETAILS : '];
foreach ($traces as $index => $trace) {
$message = sprintf('#%d ', $index + 1);
/** @noinspection UnSafeIsSetOverArrayInspection */
if (isset(... | php | public function getTraceSaveAsString()
{
$traces = $this->getTrace();
$messages = ['STACK TRACE DETAILS : '];
foreach ($traces as $index => $trace) {
$message = sprintf('#%d ', $index + 1);
/** @noinspection UnSafeIsSetOverArrayInspection */
if (isset(... | [
"public",
"function",
"getTraceSaveAsString",
"(",
")",
"{",
"$",
"traces",
"=",
"$",
"this",
"->",
"getTrace",
"(",
")",
";",
"$",
"messages",
"=",
"[",
"'STACK TRACE DETAILS : '",
"]",
";",
"foreach",
"(",
"$",
"traces",
"as",
"$",
"index",
"=>",
"$",
... | Gets the stack trace as a string.
@link http://php.net/manual/en/exception.gettraceasstring.php
@return string | [
"Gets",
"the",
"stack",
"trace",
"as",
"a",
"string",
"."
] | ba7cc942a9263c570b9b2325f93c75fb2e774714 | https://github.com/xloit/xloit-exception/blob/ba7cc942a9263c570b9b2325f93c75fb2e774714/src/Exception.php#L394-L454 |
241,143 | xloit/xloit-exception | src/Exception.php | Exception.switchType | protected function switchType($argument)
{
$stringType = null;
$type = strtolower(gettype($argument));
switch ($type) {
case 'boolean':
$stringType = sprintf(
'[%s "%s"]', ucwords($type),
((int) $argument === 1) ? 'Tr... | php | protected function switchType($argument)
{
$stringType = null;
$type = strtolower(gettype($argument));
switch ($type) {
case 'boolean':
$stringType = sprintf(
'[%s "%s"]', ucwords($type),
((int) $argument === 1) ? 'Tr... | [
"protected",
"function",
"switchType",
"(",
"$",
"argument",
")",
"{",
"$",
"stringType",
"=",
"null",
";",
"$",
"type",
"=",
"strtolower",
"(",
"gettype",
"(",
"$",
"argument",
")",
")",
";",
"switch",
"(",
"$",
"type",
")",
"{",
"case",
"'boolean'",
... | Convert type to string.
@param mixed $argument
@return string | [
"Convert",
"type",
"to",
"string",
"."
] | ba7cc942a9263c570b9b2325f93c75fb2e774714 | https://github.com/xloit/xloit-exception/blob/ba7cc942a9263c570b9b2325f93c75fb2e774714/src/Exception.php#L463-L501 |
241,144 | titon/db-mysql | src/Titon/Db/Mysql/MysqlDriver.php | MysqlDriver.initialize | public function initialize() {
$this->setDialect(new MysqlDialect($this));
$flags = $this->getConfig('flags');
if ($timezone = $this->getConfig('timezone')) {
if ($timezone === 'UTC') {
$timezone = '+00:00';
}
$flags[PDO::MYSQL_ATTR_INIT_COM... | php | public function initialize() {
$this->setDialect(new MysqlDialect($this));
$flags = $this->getConfig('flags');
if ($timezone = $this->getConfig('timezone')) {
if ($timezone === 'UTC') {
$timezone = '+00:00';
}
$flags[PDO::MYSQL_ATTR_INIT_COM... | [
"public",
"function",
"initialize",
"(",
")",
"{",
"$",
"this",
"->",
"setDialect",
"(",
"new",
"MysqlDialect",
"(",
"$",
"this",
")",
")",
";",
"$",
"flags",
"=",
"$",
"this",
"->",
"getConfig",
"(",
"'flags'",
")",
";",
"if",
"(",
"$",
"timezone",
... | Set the dialect and timezone being used. | [
"Set",
"the",
"dialect",
"and",
"timezone",
"being",
"used",
"."
] | 0b69db820f907b8cae4093417406a7435fdbf92f | https://github.com/titon/db-mysql/blob/0b69db820f907b8cae4093417406a7435fdbf92f/src/Titon/Db/Mysql/MysqlDriver.php#L34-L48 |
241,145 | sebardo/ecommerce | EcommerceBundle/Controller/ProductController.php | ProductController.listJsonAction | public function listJsonAction()
{
$em = $this->getDoctrine()->getManager();
$adminManager = $this->get('admin_manager');
/** @var \AdminBundle\Services\DataTables\JsonList $jsonList */
$jsonList = $this->get('json_list');
$jsonList->setRepository($em->getRepository('Ecommerc... | php | public function listJsonAction()
{
$em = $this->getDoctrine()->getManager();
$adminManager = $this->get('admin_manager');
/** @var \AdminBundle\Services\DataTables\JsonList $jsonList */
$jsonList = $this->get('json_list');
$jsonList->setRepository($em->getRepository('Ecommerc... | [
"public",
"function",
"listJsonAction",
"(",
")",
"{",
"$",
"em",
"=",
"$",
"this",
"->",
"getDoctrine",
"(",
")",
"->",
"getManager",
"(",
")",
";",
"$",
"adminManager",
"=",
"$",
"this",
"->",
"get",
"(",
"'admin_manager'",
")",
";",
"/** @var \\AdminB... | Returns a list of Product entities in JSON format.
@return JsonResponse
@Route("/list.{_format}", requirements={ "_format" = "json" }, defaults={ "_format" = "json" })
@Method("GET") | [
"Returns",
"a",
"list",
"of",
"Product",
"entities",
"in",
"JSON",
"format",
"."
] | 3e17545e69993f10a1df17f9887810c7378fc7f9 | https://github.com/sebardo/ecommerce/blob/3e17545e69993f10a1df17f9887810c7378fc7f9/EcommerceBundle/Controller/ProductController.php#L51-L66 |
241,146 | sebardo/ecommerce | EcommerceBundle/Controller/ProductController.php | ProductController.statsAction | public function statsAction($id, $from, $to)
{
$em = $this->getDoctrine()->getManager();
/** @var Actor $entity */
$entity = $em->getRepository('EcommerceBundle:Product')->find($id);
/** @var FrontManager $frontManager */
$adminManager = $this->container->get('admi... | php | public function statsAction($id, $from, $to)
{
$em = $this->getDoctrine()->getManager();
/** @var Actor $entity */
$entity = $em->getRepository('EcommerceBundle:Product')->find($id);
/** @var FrontManager $frontManager */
$adminManager = $this->container->get('admi... | [
"public",
"function",
"statsAction",
"(",
"$",
"id",
",",
"$",
"from",
",",
"$",
"to",
")",
"{",
"$",
"em",
"=",
"$",
"this",
"->",
"getDoctrine",
"(",
")",
"->",
"getManager",
"(",
")",
";",
"/** @var Actor $entity */",
"$",
"entity",
"=",
"$",
"em"... | Returns a list of Actor entities in JSON format.
@return JsonResponse
@Route("/stats/{id}/{from}/{to}", requirements={ "_format" = "json" }, defaults={ "_format" = "json" })
@Method("GET") | [
"Returns",
"a",
"list",
"of",
"Actor",
"entities",
"in",
"JSON",
"format",
"."
] | 3e17545e69993f10a1df17f9887810c7378fc7f9 | https://github.com/sebardo/ecommerce/blob/3e17545e69993f10a1df17f9887810c7378fc7f9/EcommerceBundle/Controller/ProductController.php#L76-L100 |
241,147 | sebardo/ecommerce | EcommerceBundle/Controller/ProductController.php | ProductController.editAction | public function editAction(Request $request, Product $product)
{
//access control
$user = $this->container->get('security.token_storage')->getToken()->getUser();
if ($user->isGranted('ROLE_USER') && $product->getActor()->getId() != $user->getId()) {
return $this->redirect($this... | php | public function editAction(Request $request, Product $product)
{
//access control
$user = $this->container->get('security.token_storage')->getToken()->getUser();
if ($user->isGranted('ROLE_USER') && $product->getActor()->getId() != $user->getId()) {
return $this->redirect($this... | [
"public",
"function",
"editAction",
"(",
"Request",
"$",
"request",
",",
"Product",
"$",
"product",
")",
"{",
"//access control",
"$",
"user",
"=",
"$",
"this",
"->",
"container",
"->",
"get",
"(",
"'security.token_storage'",
")",
"->",
"getToken",
"(",
")",... | Displays a form to edit an existing Product entity.
@Route("/{id}/edit")
@Method({"GET", "POST"})
@Template() | [
"Displays",
"a",
"form",
"to",
"edit",
"an",
"existing",
"Product",
"entity",
"."
] | 3e17545e69993f10a1df17f9887810c7378fc7f9 | https://github.com/sebardo/ecommerce/blob/3e17545e69993f10a1df17f9887810c7378fc7f9/EcommerceBundle/Controller/ProductController.php#L185-L239 |
241,148 | sebardo/ecommerce | EcommerceBundle/Controller/ProductController.php | ProductController.createDeleteForm | private function createDeleteForm(Product $product)
{
return $this->createFormBuilder()
->setAction($this->generateUrl('ecommerce_product_delete', array('id' => $product->getId())))
->setMethod('DELETE')
->getForm()
;
} | php | private function createDeleteForm(Product $product)
{
return $this->createFormBuilder()
->setAction($this->generateUrl('ecommerce_product_delete', array('id' => $product->getId())))
->setMethod('DELETE')
->getForm()
;
} | [
"private",
"function",
"createDeleteForm",
"(",
"Product",
"$",
"product",
")",
"{",
"return",
"$",
"this",
"->",
"createFormBuilder",
"(",
")",
"->",
"setAction",
"(",
"$",
"this",
"->",
"generateUrl",
"(",
"'ecommerce_product_delete'",
",",
"array",
"(",
"'i... | Creates a form to delete a Product entity.
@param Product $product The Product entity
@return \Symfony\Component\Form\Form The form | [
"Creates",
"a",
"form",
"to",
"delete",
"a",
"Product",
"entity",
"."
] | 3e17545e69993f10a1df17f9887810c7378fc7f9 | https://github.com/sebardo/ecommerce/blob/3e17545e69993f10a1df17f9887810c7378fc7f9/EcommerceBundle/Controller/ProductController.php#L304-L311 |
241,149 | sebardo/ecommerce | EcommerceBundle/Controller/ProductController.php | ProductController.updateImage | public function updateImage(Request $request)
{
$fileName = $request->query->get('file');
$type = $request->query->get('type');
$value = $request->query->get('value');
/** @var Image $entity */
$qb = $this->getDoctrine()->getManager()->getRepository('CoreBundle:Image')... | php | public function updateImage(Request $request)
{
$fileName = $request->query->get('file');
$type = $request->query->get('type');
$value = $request->query->get('value');
/** @var Image $entity */
$qb = $this->getDoctrine()->getManager()->getRepository('CoreBundle:Image')... | [
"public",
"function",
"updateImage",
"(",
"Request",
"$",
"request",
")",
"{",
"$",
"fileName",
"=",
"$",
"request",
"->",
"query",
"->",
"get",
"(",
"'file'",
")",
";",
"$",
"type",
"=",
"$",
"request",
"->",
"query",
"->",
"get",
"(",
"'type'",
")"... | Manages a product image
@return array
@Route("/update/image") | [
"Manages",
"a",
"product",
"image"
] | 3e17545e69993f10a1df17f9887810c7378fc7f9 | https://github.com/sebardo/ecommerce/blob/3e17545e69993f10a1df17f9887810c7378fc7f9/EcommerceBundle/Controller/ProductController.php#L335-L363 |
241,150 | bishopb/vanilla | plugins/VanillaStats/class.vanillastats.plugin.php | VanillaStatsPlugin.Gdn_Dispatcher_BeforeDispatch_Handler | public function Gdn_Dispatcher_BeforeDispatch_Handler($Sender) {
$Enabled = C('Garden.Analytics.Enabled', TRUE);
if ($Enabled && !Gdn::PluginManager()->HasNewMethod('SettingsController', 'Index')) {
Gdn::PluginManager()->RegisterNewMethod('VanillaStatsPlugin', 'StatsDashboard', 'SettingsContro... | php | public function Gdn_Dispatcher_BeforeDispatch_Handler($Sender) {
$Enabled = C('Garden.Analytics.Enabled', TRUE);
if ($Enabled && !Gdn::PluginManager()->HasNewMethod('SettingsController', 'Index')) {
Gdn::PluginManager()->RegisterNewMethod('VanillaStatsPlugin', 'StatsDashboard', 'SettingsContro... | [
"public",
"function",
"Gdn_Dispatcher_BeforeDispatch_Handler",
"(",
"$",
"Sender",
")",
"{",
"$",
"Enabled",
"=",
"C",
"(",
"'Garden.Analytics.Enabled'",
",",
"TRUE",
")",
";",
"if",
"(",
"$",
"Enabled",
"&&",
"!",
"Gdn",
"::",
"PluginManager",
"(",
")",
"->... | Override the default dashboard page with the new stats one. | [
"Override",
"the",
"default",
"dashboard",
"page",
"with",
"the",
"new",
"stats",
"one",
"."
] | 8494eb4a4ad61603479015a8054d23ff488364e8 | https://github.com/bishopb/vanilla/blob/8494eb4a4ad61603479015a8054d23ff488364e8/plugins/VanillaStats/class.vanillastats.plugin.php#L50-L56 |
241,151 | bishopb/vanilla | plugins/VanillaStats/class.vanillastats.plugin.php | VanillaStatsPlugin.StatsDashboard | public function StatsDashboard($Sender) {
$StatsUrl = $this->AnalyticsServer;
if (!StringBeginsWith($StatsUrl, 'http:') && !StringBeginsWith($StatsUrl, 'https:'))
$StatsUrl = Gdn::Request()->Scheme()."://{$StatsUrl}";
// Tell the page where to find the Vanilla Analytics provider
... | php | public function StatsDashboard($Sender) {
$StatsUrl = $this->AnalyticsServer;
if (!StringBeginsWith($StatsUrl, 'http:') && !StringBeginsWith($StatsUrl, 'https:'))
$StatsUrl = Gdn::Request()->Scheme()."://{$StatsUrl}";
// Tell the page where to find the Vanilla Analytics provider
... | [
"public",
"function",
"StatsDashboard",
"(",
"$",
"Sender",
")",
"{",
"$",
"StatsUrl",
"=",
"$",
"this",
"->",
"AnalyticsServer",
";",
"if",
"(",
"!",
"StringBeginsWith",
"(",
"$",
"StatsUrl",
",",
"'http:'",
")",
"&&",
"!",
"StringBeginsWith",
"(",
"$",
... | Override the default index method of the settings controller in the
dashboard application to render new statistics. | [
"Override",
"the",
"default",
"index",
"method",
"of",
"the",
"settings",
"controller",
"in",
"the",
"dashboard",
"application",
"to",
"render",
"new",
"statistics",
"."
] | 8494eb4a4ad61603479015a8054d23ff488364e8 | https://github.com/bishopb/vanilla/blob/8494eb4a4ad61603479015a8054d23ff488364e8/plugins/VanillaStats/class.vanillastats.plugin.php#L84-L122 |
241,152 | bishopb/vanilla | plugins/VanillaStats/class.vanillastats.plugin.php | VanillaStatsPlugin.SettingsController_DashboardSummaries_Create | public function SettingsController_DashboardSummaries_Create($Sender) {
// Load javascript & css, check permissions, and load side menu for this page.
$Sender->AddJsFile('settings.js');
$Sender->Title(T('Dashboard Summaries'));
$Sender->RequiredAdminPermissions[] = 'Garden.Settings.Manage';
... | php | public function SettingsController_DashboardSummaries_Create($Sender) {
// Load javascript & css, check permissions, and load side menu for this page.
$Sender->AddJsFile('settings.js');
$Sender->Title(T('Dashboard Summaries'));
$Sender->RequiredAdminPermissions[] = 'Garden.Settings.Manage';
... | [
"public",
"function",
"SettingsController_DashboardSummaries_Create",
"(",
"$",
"Sender",
")",
"{",
"// Load javascript & css, check permissions, and load side menu for this page.\r",
"$",
"Sender",
"->",
"AddJsFile",
"(",
"'settings.js'",
")",
";",
"$",
"Sender",
"->",
"Titl... | A view containing most active discussions & users during a specific time
period. This gets ajaxed into the dashboard homepage as date ranges are
defined. | [
"A",
"view",
"containing",
"most",
"active",
"discussions",
"&",
"users",
"during",
"a",
"specific",
"time",
"period",
".",
"This",
"gets",
"ajaxed",
"into",
"the",
"dashboard",
"homepage",
"as",
"date",
"ranges",
"are",
"defined",
"."
] | 8494eb4a4ad61603479015a8054d23ff488364e8 | https://github.com/bishopb/vanilla/blob/8494eb4a4ad61603479015a8054d23ff488364e8/plugins/VanillaStats/class.vanillastats.plugin.php#L129-L174 |
241,153 | cityware/city-wmi | src/Processors/Software.php | Software.get | public function get()
{
$keys = $this->registry
->setRoot(Registry::HKEY_LOCAL_MACHINE)
->setPath($this->path)
->get();
$software = [];
foreach ($keys as $key) {
// Set a new temporary path for the software key
$path = $this->path... | php | public function get()
{
$keys = $this->registry
->setRoot(Registry::HKEY_LOCAL_MACHINE)
->setPath($this->path)
->get();
$software = [];
foreach ($keys as $key) {
// Set a new temporary path for the software key
$path = $this->path... | [
"public",
"function",
"get",
"(",
")",
"{",
"$",
"keys",
"=",
"$",
"this",
"->",
"registry",
"->",
"setRoot",
"(",
"Registry",
"::",
"HKEY_LOCAL_MACHINE",
")",
"->",
"setPath",
"(",
"$",
"this",
"->",
"path",
")",
"->",
"get",
"(",
")",
";",
"$",
"... | Returns an array of software on the current computer.
@return array | [
"Returns",
"an",
"array",
"of",
"software",
"on",
"the",
"current",
"computer",
"."
] | c7296e6855b6719f537ff5c2dc19d521ce1415d8 | https://github.com/cityware/city-wmi/blob/c7296e6855b6719f537ff5c2dc19d521ce1415d8/src/Processors/Software.php#L36-L64 |
241,154 | uthando-cms/uthando-common | src/UthandoCommon/Mapper/AbstractDbMapper.php | AbstractDbMapper.getResultSet | protected function getResultSet()
{
if (!$this->resultSetPrototype instanceof HydratingResultSet) {
$resultSetPrototype = new HydratingResultSet;
$resultSetPrototype->setHydrator($this->getHydrator());
$resultSetPrototype->setObjectPrototype($this->getModel());
... | php | protected function getResultSet()
{
if (!$this->resultSetPrototype instanceof HydratingResultSet) {
$resultSetPrototype = new HydratingResultSet;
$resultSetPrototype->setHydrator($this->getHydrator());
$resultSetPrototype->setObjectPrototype($this->getModel());
... | [
"protected",
"function",
"getResultSet",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"resultSetPrototype",
"instanceof",
"HydratingResultSet",
")",
"{",
"$",
"resultSetPrototype",
"=",
"new",
"HydratingResultSet",
";",
"$",
"resultSetPrototype",
"->",
"setHy... | gets the resultSet
@return HydratingResultSet | [
"gets",
"the",
"resultSet"
] | feb915da5d26b60f536282e1bc3ad5c22e53f485 | https://github.com/uthando-cms/uthando-common/blob/feb915da5d26b60f536282e1bc3ad5c22e53f485/src/UthandoCommon/Mapper/AbstractDbMapper.php#L92-L102 |
241,155 | uthando-cms/uthando-common | src/UthandoCommon/Mapper/AbstractDbMapper.php | AbstractDbMapper.getById | public function getById($id, $col = null)
{
$col = ($col) ?: $this->getPrimaryKey();
$select = $this->getSelect()->where([$col => $id]);
$resultSet = $this->fetchResult($select);
if ($resultSet->count() > 1) {
$rowSet = [];
foreach ($resultSet as $row) {
... | php | public function getById($id, $col = null)
{
$col = ($col) ?: $this->getPrimaryKey();
$select = $this->getSelect()->where([$col => $id]);
$resultSet = $this->fetchResult($select);
if ($resultSet->count() > 1) {
$rowSet = [];
foreach ($resultSet as $row) {
... | [
"public",
"function",
"getById",
"(",
"$",
"id",
",",
"$",
"col",
"=",
"null",
")",
"{",
"$",
"col",
"=",
"(",
"$",
"col",
")",
"?",
":",
"$",
"this",
"->",
"getPrimaryKey",
"(",
")",
";",
"$",
"select",
"=",
"$",
"this",
"->",
"getSelect",
"("... | Gets one or more rows by its id
@param $id
@param null|string $col
@return array|ModelInterface | [
"Gets",
"one",
"or",
"more",
"rows",
"by",
"its",
"id"
] | feb915da5d26b60f536282e1bc3ad5c22e53f485 | https://github.com/uthando-cms/uthando-common/blob/feb915da5d26b60f536282e1bc3ad5c22e53f485/src/UthandoCommon/Mapper/AbstractDbMapper.php#L111-L129 |
241,156 | uthando-cms/uthando-common | src/UthandoCommon/Mapper/AbstractDbMapper.php | AbstractDbMapper.fetchAll | public function fetchAll($sort = null)
{
$select = $this->getSelect();
$select = $this->setSortOrder($select, $sort);
$resultSet = $this->fetchResult($select);
return $resultSet;
} | php | public function fetchAll($sort = null)
{
$select = $this->getSelect();
$select = $this->setSortOrder($select, $sort);
$resultSet = $this->fetchResult($select);
return $resultSet;
} | [
"public",
"function",
"fetchAll",
"(",
"$",
"sort",
"=",
"null",
")",
"{",
"$",
"select",
"=",
"$",
"this",
"->",
"getSelect",
"(",
")",
";",
"$",
"select",
"=",
"$",
"this",
"->",
"setSortOrder",
"(",
"$",
"select",
",",
"$",
"sort",
")",
";",
"... | Fetches all rows from database table.
@param null|string $sort
@return HydratingResultSet|\Zend\Db\ResultSet\ResultSet|Paginator | [
"Fetches",
"all",
"rows",
"from",
"database",
"table",
"."
] | feb915da5d26b60f536282e1bc3ad5c22e53f485 | https://github.com/uthando-cms/uthando-common/blob/feb915da5d26b60f536282e1bc3ad5c22e53f485/src/UthandoCommon/Mapper/AbstractDbMapper.php#L182-L190 |
241,157 | uthando-cms/uthando-common | src/UthandoCommon/Mapper/AbstractDbMapper.php | AbstractDbMapper.search | public function search(array $search, $sort, $select = null)
{
$select = ($select) ?: $this->getSelect();
foreach ($search as $key => $value) {
if (!$value['searchString'] == '') {
if (substr($value['searchString'], 0, 1) == '=' && $key == 0) {
$id = ... | php | public function search(array $search, $sort, $select = null)
{
$select = ($select) ?: $this->getSelect();
foreach ($search as $key => $value) {
if (!$value['searchString'] == '') {
if (substr($value['searchString'], 0, 1) == '=' && $key == 0) {
$id = ... | [
"public",
"function",
"search",
"(",
"array",
"$",
"search",
",",
"$",
"sort",
",",
"$",
"select",
"=",
"null",
")",
"{",
"$",
"select",
"=",
"(",
"$",
"select",
")",
"?",
":",
"$",
"this",
"->",
"getSelect",
"(",
")",
";",
"foreach",
"(",
"$",
... | basic search on table data
@param array $search
@param string $sort
@param Select $select
@return \Zend\Db\ResultSet\ResultSet|Paginator|HydratingResultSet | [
"basic",
"search",
"on",
"table",
"data"
] | feb915da5d26b60f536282e1bc3ad5c22e53f485 | https://github.com/uthando-cms/uthando-common/blob/feb915da5d26b60f536282e1bc3ad5c22e53f485/src/UthandoCommon/Mapper/AbstractDbMapper.php#L200-L227 |
241,158 | uthando-cms/uthando-common | src/UthandoCommon/Mapper/AbstractDbMapper.php | AbstractDbMapper.insert | public function insert(array $data, $table = null)
{
$table = ($table) ?: $this->getTable();
$sql = $this->getSql();
$insert = $sql->insert($table);
$insert->values($data);
$statement = $sql->prepareStatementForSqlObject($insert);
$result = $statement->execute();
... | php | public function insert(array $data, $table = null)
{
$table = ($table) ?: $this->getTable();
$sql = $this->getSql();
$insert = $sql->insert($table);
$insert->values($data);
$statement = $sql->prepareStatementForSqlObject($insert);
$result = $statement->execute();
... | [
"public",
"function",
"insert",
"(",
"array",
"$",
"data",
",",
"$",
"table",
"=",
"null",
")",
"{",
"$",
"table",
"=",
"(",
"$",
"table",
")",
"?",
":",
"$",
"this",
"->",
"getTable",
"(",
")",
";",
"$",
"sql",
"=",
"$",
"this",
"->",
"getSql"... | Inserts a new row into database returns insertId
@param array $data
@param string $table
@return int|null | [
"Inserts",
"a",
"new",
"row",
"into",
"database",
"returns",
"insertId"
] | feb915da5d26b60f536282e1bc3ad5c22e53f485 | https://github.com/uthando-cms/uthando-common/blob/feb915da5d26b60f536282e1bc3ad5c22e53f485/src/UthandoCommon/Mapper/AbstractDbMapper.php#L236-L248 |
241,159 | uthando-cms/uthando-common | src/UthandoCommon/Mapper/AbstractDbMapper.php | AbstractDbMapper.paginate | public function paginate($select, $resultSet = null)
{
$resultSet = $resultSet ?: $this->getResultSet();
$adapter = new DbSelect($select, $this->getAdapter(), $resultSet);
$paginator = new Paginator($adapter);
$options = $this->getPaginatorOptions();
if (isset($options['lim... | php | public function paginate($select, $resultSet = null)
{
$resultSet = $resultSet ?: $this->getResultSet();
$adapter = new DbSelect($select, $this->getAdapter(), $resultSet);
$paginator = new Paginator($adapter);
$options = $this->getPaginatorOptions();
if (isset($options['lim... | [
"public",
"function",
"paginate",
"(",
"$",
"select",
",",
"$",
"resultSet",
"=",
"null",
")",
"{",
"$",
"resultSet",
"=",
"$",
"resultSet",
"?",
":",
"$",
"this",
"->",
"getResultSet",
"(",
")",
";",
"$",
"adapter",
"=",
"new",
"DbSelect",
"(",
"$",... | Paginates the result set
@param Select $select
@param AbstractResultSet $resultSet
@return Paginator | [
"Paginates",
"the",
"result",
"set"
] | feb915da5d26b60f536282e1bc3ad5c22e53f485 | https://github.com/uthando-cms/uthando-common/blob/feb915da5d26b60f536282e1bc3ad5c22e53f485/src/UthandoCommon/Mapper/AbstractDbMapper.php#L338-L357 |
241,160 | uthando-cms/uthando-common | src/UthandoCommon/Mapper/AbstractDbMapper.php | AbstractDbMapper.fetchResult | protected function fetchResult(Select $select, AbstractResultSet $resultSet = null)
{
$resultSet = $resultSet ?: $this->getResultSet();
$resultSet->buffer();
if ($this->usePaginator()) {
$this->setUsePaginator(false);
$resultSet = $this->paginate($select, $resultSet)... | php | protected function fetchResult(Select $select, AbstractResultSet $resultSet = null)
{
$resultSet = $resultSet ?: $this->getResultSet();
$resultSet->buffer();
if ($this->usePaginator()) {
$this->setUsePaginator(false);
$resultSet = $this->paginate($select, $resultSet)... | [
"protected",
"function",
"fetchResult",
"(",
"Select",
"$",
"select",
",",
"AbstractResultSet",
"$",
"resultSet",
"=",
"null",
")",
"{",
"$",
"resultSet",
"=",
"$",
"resultSet",
"?",
":",
"$",
"this",
"->",
"getResultSet",
"(",
")",
";",
"$",
"resultSet",
... | Fetches the result of select from database
@param Select $select
@param AbstractResultSet $resultSet
@return \Zend\Db\ResultSet\ResultSet|Paginator|HydratingResultSet | [
"Fetches",
"the",
"result",
"of",
"select",
"from",
"database"
] | feb915da5d26b60f536282e1bc3ad5c22e53f485 | https://github.com/uthando-cms/uthando-common/blob/feb915da5d26b60f536282e1bc3ad5c22e53f485/src/UthandoCommon/Mapper/AbstractDbMapper.php#L366-L381 |
241,161 | uthando-cms/uthando-common | src/UthandoCommon/Mapper/AbstractDbMapper.php | AbstractDbMapper.setSortOrder | public function setSortOrder(Select $select, $sort)
{
if ($sort === '' || null === $sort || empty($sort)) {
return $select;
}
$select->reset('order');
if (is_string($sort)) {
$sort = explode(' ', $sort);
}
$order = [];
foreach ($sor... | php | public function setSortOrder(Select $select, $sort)
{
if ($sort === '' || null === $sort || empty($sort)) {
return $select;
}
$select->reset('order');
if (is_string($sort)) {
$sort = explode(' ', $sort);
}
$order = [];
foreach ($sor... | [
"public",
"function",
"setSortOrder",
"(",
"Select",
"$",
"select",
",",
"$",
"sort",
")",
"{",
"if",
"(",
"$",
"sort",
"===",
"''",
"||",
"null",
"===",
"$",
"sort",
"||",
"empty",
"(",
"$",
"sort",
")",
")",
"{",
"return",
"$",
"select",
";",
"... | Sets sort order of database query
@param Select $select
@param string|array $sort
@return Select | [
"Sets",
"sort",
"order",
"of",
"database",
"query"
] | feb915da5d26b60f536282e1bc3ad5c22e53f485 | https://github.com/uthando-cms/uthando-common/blob/feb915da5d26b60f536282e1bc3ad5c22e53f485/src/UthandoCommon/Mapper/AbstractDbMapper.php#L408-L440 |
241,162 | vinala/kernel | src/Foundation/Application.php | Application.run | public static function run($root = '../', $routes = true, $session = true)
{
self::setScreen();
self::setRoot($root);
//
self::setCaseVars(false, false);
// call the connector and run it
self::callBus();
// Connector::run('web',$session);
Bus::run('we... | php | public static function run($root = '../', $routes = true, $session = true)
{
self::setScreen();
self::setRoot($root);
//
self::setCaseVars(false, false);
// call the connector and run it
self::callBus();
// Connector::run('web',$session);
Bus::run('we... | [
"public",
"static",
"function",
"run",
"(",
"$",
"root",
"=",
"'../'",
",",
"$",
"routes",
"=",
"true",
",",
"$",
"session",
"=",
"true",
")",
"{",
"self",
"::",
"setScreen",
"(",
")",
";",
"self",
"::",
"setRoot",
"(",
"$",
"root",
")",
";",
"//... | Run the Framework. | [
"Run",
"the",
"Framework",
"."
] | 346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a | https://github.com/vinala/kernel/blob/346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a/src/Foundation/Application.php#L127-L149 |
241,163 | vinala/kernel | src/Foundation/Application.php | Application.console | public static function console($root = '', $session = true)
{
self::setCaseVars(true, false);
//
self::consoleServerVars();
//
self::setScreen();
self::setRoot($root);
// call the connector and run it
self::consoleBus();
Bus::run('lumos');
... | php | public static function console($root = '', $session = true)
{
self::setCaseVars(true, false);
//
self::consoleServerVars();
//
self::setScreen();
self::setRoot($root);
// call the connector and run it
self::consoleBus();
Bus::run('lumos');
... | [
"public",
"static",
"function",
"console",
"(",
"$",
"root",
"=",
"''",
",",
"$",
"session",
"=",
"true",
")",
"{",
"self",
"::",
"setCaseVars",
"(",
"true",
",",
"false",
")",
";",
"//",
"self",
"::",
"consoleServerVars",
"(",
")",
";",
"//",
"self"... | Run the console. | [
"Run",
"the",
"console",
"."
] | 346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a | https://github.com/vinala/kernel/blob/346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a/src/Foundation/Application.php#L160-L179 |
241,164 | vinala/kernel | src/Foundation/Application.php | Application.ini | protected static function ini($database = true, $test = false)
{
Alias::ini(self::$root);
Url::ini();
Path::ini();
Template::run();
if (Component::isOn('faker')) {
Faker::ini();
}
Link::ini();
Lang::ini($test);
if ($database && Comp... | php | protected static function ini($database = true, $test = false)
{
Alias::ini(self::$root);
Url::ini();
Path::ini();
Template::run();
if (Component::isOn('faker')) {
Faker::ini();
}
Link::ini();
Lang::ini($test);
if ($database && Comp... | [
"protected",
"static",
"function",
"ini",
"(",
"$",
"database",
"=",
"true",
",",
"$",
"test",
"=",
"false",
")",
"{",
"Alias",
"::",
"ini",
"(",
"self",
"::",
"$",
"root",
")",
";",
"Url",
"::",
"ini",
"(",
")",
";",
"Path",
"::",
"ini",
"(",
... | Init Framework classes. | [
"Init",
"Framework",
"classes",
"."
] | 346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a | https://github.com/vinala/kernel/blob/346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a/src/Foundation/Application.php#L209-L226 |
241,165 | vinala/kernel | src/Foundation/Application.php | Application.vendor | public static function vendor()
{
self::checkVendor();
$path = is_null(self::$root) ? 'vendor/autoload.php' : self::$root.'vendor/autoload.php';
include_once $path;
} | php | public static function vendor()
{
self::checkVendor();
$path = is_null(self::$root) ? 'vendor/autoload.php' : self::$root.'vendor/autoload.php';
include_once $path;
} | [
"public",
"static",
"function",
"vendor",
"(",
")",
"{",
"self",
"::",
"checkVendor",
"(",
")",
";",
"$",
"path",
"=",
"is_null",
"(",
"self",
"::",
"$",
"root",
")",
"?",
"'vendor/autoload.php'",
":",
"self",
"::",
"$",
"root",
".",
"'vendor/autoload.ph... | call vendor. | [
"call",
"vendor",
"."
] | 346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a | https://github.com/vinala/kernel/blob/346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a/src/Foundation/Application.php#L240-L245 |
241,166 | lucidphp/mux | src/Routes.php | Routes.setRoutes | private function setRoutes(array $routes)
{
$this->routes = [];
foreach ($routes as $name => $route) {
$this->add($name, $route);
}
} | php | private function setRoutes(array $routes)
{
$this->routes = [];
foreach ($routes as $name => $route) {
$this->add($name, $route);
}
} | [
"private",
"function",
"setRoutes",
"(",
"array",
"$",
"routes",
")",
"{",
"$",
"this",
"->",
"routes",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"routes",
"as",
"$",
"name",
"=>",
"$",
"route",
")",
"{",
"$",
"this",
"->",
"add",
"(",
"$",
"name"... | Sets the initial route collection.
@param array $routes
@return void | [
"Sets",
"the",
"initial",
"route",
"collection",
"."
] | 2d054ea01450bdad6a4af8198ca6f10705e1c327 | https://github.com/lucidphp/mux/blob/2d054ea01450bdad6a4af8198ca6f10705e1c327/src/Routes.php#L142-L149 |
241,167 | mikegibson/sentient | src/Data/RepositoryManager.php | RepositoryManager.registerRepository | public function registerRepository(ManagedRepositoryInterface $repository) {
$name = $repository->getName();
if($this->hasRepository($name)) {
throw new \LogicException(sprintf('Repository %s is already registered.', $name));
}
$event = new ManagedRepositoryEvent($repository);
$this->eventDispatcher->disp... | php | public function registerRepository(ManagedRepositoryInterface $repository) {
$name = $repository->getName();
if($this->hasRepository($name)) {
throw new \LogicException(sprintf('Repository %s is already registered.', $name));
}
$event = new ManagedRepositoryEvent($repository);
$this->eventDispatcher->disp... | [
"public",
"function",
"registerRepository",
"(",
"ManagedRepositoryInterface",
"$",
"repository",
")",
"{",
"$",
"name",
"=",
"$",
"repository",
"->",
"getName",
"(",
")",
";",
"if",
"(",
"$",
"this",
"->",
"hasRepository",
"(",
"$",
"name",
")",
")",
"{",... | Register a repository
@param ManagedRepositoryInterface $repository
@return $this
@throws \LogicException | [
"Register",
"a",
"repository"
] | 05aaaa0cd8e649d2b526df52a59c9fb53c114338 | https://github.com/mikegibson/sentient/blob/05aaaa0cd8e649d2b526df52a59c9fb53c114338/src/Data/RepositoryManager.php#L57-L70 |
241,168 | CatLabInteractive/Neuron | src/Neuron/Filter/Parser.php | Parser.validate | public function validate ($object = null)
{
if (!isset ($this->context))
{
throw new InvalidParameter ("You must set a context before validating or filtering.");
}
$result = $this->reduce ($this->context, $object);
if ($result)
{
return true;
}
else
{
return false;
}
} | php | public function validate ($object = null)
{
if (!isset ($this->context))
{
throw new InvalidParameter ("You must set a context before validating or filtering.");
}
$result = $this->reduce ($this->context, $object);
if ($result)
{
return true;
}
else
{
return false;
}
} | [
"public",
"function",
"validate",
"(",
"$",
"object",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"context",
")",
")",
"{",
"throw",
"new",
"InvalidParameter",
"(",
"\"You must set a context before validating or filtering.\"",
")",
... | Validate a single object
@param $object
@throws \Neuron\Exceptions\InvalidParameter
@return bool | [
"Validate",
"a",
"single",
"object"
] | 67dca5349891e23b31a96dcdead893b9491a1b8b | https://github.com/CatLabInteractive/Neuron/blob/67dca5349891e23b31a96dcdead893b9491a1b8b/src/Neuron/Filter/Parser.php#L495-L512 |
241,169 | rezonans/rezonans-core | Flow/Configurator.php | Configurator.loadEnv | public function loadEnv(string $path): Configurator
{
if (is_readable($path)) {
$this->dotEnv->load($path);
}
return $this;
} | php | public function loadEnv(string $path): Configurator
{
if (is_readable($path)) {
$this->dotEnv->load($path);
}
return $this;
} | [
"public",
"function",
"loadEnv",
"(",
"string",
"$",
"path",
")",
":",
"Configurator",
"{",
"if",
"(",
"is_readable",
"(",
"$",
"path",
")",
")",
"{",
"$",
"this",
"->",
"dotEnv",
"->",
"load",
"(",
"$",
"path",
")",
";",
"}",
"return",
"$",
"this"... | Public environment from .env file
@param string $path
@return Configurator | [
"Public",
"environment",
"from",
".",
"env",
"file"
] | a1200a9473a38cc0c6cda854f254dac01905fb4f | https://github.com/rezonans/rezonans-core/blob/a1200a9473a38cc0c6cda854f254dac01905fb4f/Flow/Configurator.php#L30-L37 |
241,170 | rezonans/rezonans-core | Flow/Configurator.php | Configurator.readConfigDir | public function readConfigDir(string $path): Configurator
{
if (!is_dir($path)) {
throw new \InvalidArgumentException(
sprintf("Config dir isn't a directory! %s given.", $path));
}
$entitiesDir = new \DirectoryIterator($path);
foreach ($entitiesDir as $fi... | php | public function readConfigDir(string $path): Configurator
{
if (!is_dir($path)) {
throw new \InvalidArgumentException(
sprintf("Config dir isn't a directory! %s given.", $path));
}
$entitiesDir = new \DirectoryIterator($path);
foreach ($entitiesDir as $fi... | [
"public",
"function",
"readConfigDir",
"(",
"string",
"$",
"path",
")",
":",
"Configurator",
"{",
"if",
"(",
"!",
"is_dir",
"(",
"$",
"path",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"sprintf",
"(",
"\"Config dir isn't a directory!... | Include all php scripts in the dir
@param string $path
@return Configurator | [
"Include",
"all",
"php",
"scripts",
"in",
"the",
"dir"
] | a1200a9473a38cc0c6cda854f254dac01905fb4f | https://github.com/rezonans/rezonans-core/blob/a1200a9473a38cc0c6cda854f254dac01905fb4f/Flow/Configurator.php#L44-L60 |
241,171 | Silvestra/Silvestra | src/Silvestra/Bundle/TextBundle/Form/Handler/TextFormHandler.php | TextFormHandler.process | public function process(Request $request, FormInterface $form)
{
if ($request->isMethod('POST')) {
$form->submit($request);
if ($form->isValid()) {
/** @var TextInterface $text */
$text = $form->getData();
foreach ($text->getTranslation... | php | public function process(Request $request, FormInterface $form)
{
if ($request->isMethod('POST')) {
$form->submit($request);
if ($form->isValid()) {
/** @var TextInterface $text */
$text = $form->getData();
foreach ($text->getTranslation... | [
"public",
"function",
"process",
"(",
"Request",
"$",
"request",
",",
"FormInterface",
"$",
"form",
")",
"{",
"if",
"(",
"$",
"request",
"->",
"isMethod",
"(",
"'POST'",
")",
")",
"{",
"$",
"form",
"->",
"submit",
"(",
"$",
"request",
")",
";",
"if",... | Process text.
@param Request $request
@param FormInterface $form
@return bool | [
"Process",
"text",
"."
] | b7367601b01495ae3c492b42042f804dee13ab06 | https://github.com/Silvestra/Silvestra/blob/b7367601b01495ae3c492b42042f804dee13ab06/src/Silvestra/Bundle/TextBundle/Form/Handler/TextFormHandler.php#L47-L64 |
241,172 | jails/li3_access | extensions/adapter/security/access/Rules.php | Rules._init | protected function _init() {
parent::_init();
$this->_rules += [
'allowAll' => [
'rule' => function() {
return true;
}
],
'denyAll' => [
'rule' => function() {
return false;
}
],
'allowAnyUser' => [
'message' => 'You must be logged in.',
'rule' => function($user) {
... | php | protected function _init() {
parent::_init();
$this->_rules += [
'allowAll' => [
'rule' => function() {
return true;
}
],
'denyAll' => [
'rule' => function() {
return false;
}
],
'allowAnyUser' => [
'message' => 'You must be logged in.',
'rule' => function($user) {
... | [
"protected",
"function",
"_init",
"(",
")",
"{",
"parent",
"::",
"_init",
"(",
")",
";",
"$",
"this",
"->",
"_rules",
"+=",
"[",
"'allowAll'",
"=>",
"[",
"'rule'",
"=>",
"function",
"(",
")",
"{",
"return",
"true",
";",
"}",
"]",
",",
"'denyAll'",
... | Initializes default rules to use. | [
"Initializes",
"default",
"rules",
"to",
"use",
"."
] | aded70dca872ea9237e3eb709099730348008321 | https://github.com/jails/li3_access/blob/aded70dca872ea9237e3eb709099730348008321/extensions/adapter/security/access/Rules.php#L62-L95 |
241,173 | jails/li3_access | extensions/adapter/security/access/Rules.php | Rules.check | public function check($user, $request, array $options = []) {
$defaults = ['rules' => $this->_defaults, 'allowAny' => $this->_allowAny];
$options += $defaults;
if (empty($options['rules'])) {
throw new RuntimeException("Missing `'rules'` option.");
}
$rules = (array) $options['rules'];
$this->_error = ... | php | public function check($user, $request, array $options = []) {
$defaults = ['rules' => $this->_defaults, 'allowAny' => $this->_allowAny];
$options += $defaults;
if (empty($options['rules'])) {
throw new RuntimeException("Missing `'rules'` option.");
}
$rules = (array) $options['rules'];
$this->_error = ... | [
"public",
"function",
"check",
"(",
"$",
"user",
",",
"$",
"request",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"defaults",
"=",
"[",
"'rules'",
"=>",
"$",
"this",
"->",
"_defaults",
",",
"'allowAny'",
"=>",
"$",
"this",
"->",
"_a... | The check method
@param mixed $user The user data array that holds all necessary information about
the user requesting access. If set to `null`, the default `Rules::_user()`
will be used.
@param object $request The requested object.
@param array $options Options array to pass to the rule closure.
@return boolean `true... | [
"The",
"check",
"method"
] | aded70dca872ea9237e3eb709099730348008321 | https://github.com/jails/li3_access/blob/aded70dca872ea9237e3eb709099730348008321/extensions/adapter/security/access/Rules.php#L107-L135 |
241,174 | cityware/city-snmp | src/SNMP.php | SNMP.realWalk | public function realWalk($oid, $suffixAsKey = false) {
try {
$return = $this->_lastResult = $this->_session->walk($oid, $suffixAsKey);
} catch (Exception $exc) {
$this->close();
throw new Exception("Erro '{$this->_session->getError()}' with execute WALK OID ({$oid}): ... | php | public function realWalk($oid, $suffixAsKey = false) {
try {
$return = $this->_lastResult = $this->_session->walk($oid, $suffixAsKey);
} catch (Exception $exc) {
$this->close();
throw new Exception("Erro '{$this->_session->getError()}' with execute WALK OID ({$oid}): ... | [
"public",
"function",
"realWalk",
"(",
"$",
"oid",
",",
"$",
"suffixAsKey",
"=",
"false",
")",
"{",
"try",
"{",
"$",
"return",
"=",
"$",
"this",
"->",
"_lastResult",
"=",
"$",
"this",
"->",
"_session",
"->",
"walk",
"(",
"$",
"oid",
",",
"$",
"suff... | Proxy to the snmp2_real_walk command
@param string $oid The OID to walk
@return array The results of the walk | [
"Proxy",
"to",
"the",
"snmp2_real_walk",
"command"
] | 831b7485b6c932a84f081d5ceeb9c5f4e7a8641d | https://github.com/cityware/city-snmp/blob/831b7485b6c932a84f081d5ceeb9c5f4e7a8641d/src/SNMP.php#L204-L213 |
241,175 | cityware/city-snmp | src/SNMP.php | SNMP.realWalkToArray | public function realWalkToArray($oid, $suffixAsKey = false) {
$arrayData = $this->realWalk($oid, $suffixAsKey);
foreach ($arrayData as $_oid => $value) {
$this->_lastResult[$_oid] = $this->parseSnmpValue($value);
}
return $this->_lastResult;
} | php | public function realWalkToArray($oid, $suffixAsKey = false) {
$arrayData = $this->realWalk($oid, $suffixAsKey);
foreach ($arrayData as $_oid => $value) {
$this->_lastResult[$_oid] = $this->parseSnmpValue($value);
}
return $this->_lastResult;
} | [
"public",
"function",
"realWalkToArray",
"(",
"$",
"oid",
",",
"$",
"suffixAsKey",
"=",
"false",
")",
"{",
"$",
"arrayData",
"=",
"$",
"this",
"->",
"realWalk",
"(",
"$",
"oid",
",",
"$",
"suffixAsKey",
")",
";",
"foreach",
"(",
"$",
"arrayData",
"as",... | Proxy to the snmp2_real_walk command return array
@param string $oid The OID to walk
@return array The results of the walk | [
"Proxy",
"to",
"the",
"snmp2_real_walk",
"command",
"return",
"array"
] | 831b7485b6c932a84f081d5ceeb9c5f4e7a8641d | https://github.com/cityware/city-snmp/blob/831b7485b6c932a84f081d5ceeb9c5f4e7a8641d/src/SNMP.php#L221-L230 |
241,176 | cityware/city-snmp | src/SNMP.php | SNMP.realWalk1d | public function realWalk1d($oid) {
$arrayData = $this->realWalk($oid);
$result = array();
foreach ($arrayData as $_oid => $value) {
$oidPrefix = substr($_oid, 0, strrpos($_oid, '.'));
if (!isset($result[$oidPrefix])) {
$result[$oidPrefix] = Array();
... | php | public function realWalk1d($oid) {
$arrayData = $this->realWalk($oid);
$result = array();
foreach ($arrayData as $_oid => $value) {
$oidPrefix = substr($_oid, 0, strrpos($_oid, '.'));
if (!isset($result[$oidPrefix])) {
$result[$oidPrefix] = Array();
... | [
"public",
"function",
"realWalk1d",
"(",
"$",
"oid",
")",
"{",
"$",
"arrayData",
"=",
"$",
"this",
"->",
"realWalk",
"(",
"$",
"oid",
")",
";",
"$",
"result",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"arrayData",
"as",
"$",
"_oid",
"=>",
... | Get indexed Real Walk return values
@param string $oid
@return array | [
"Get",
"indexed",
"Real",
"Walk",
"return",
"values"
] | 831b7485b6c932a84f081d5ceeb9c5f4e7a8641d | https://github.com/cityware/city-snmp/blob/831b7485b6c932a84f081d5ceeb9c5f4e7a8641d/src/SNMP.php#L237-L255 |
241,177 | cityware/city-snmp | src/SNMP.php | SNMP.get | public function get($oid, $preserveKeys = false) {
if ($this->cache() && ( $rtn = $this->getCache()->load($oid) ) !== null) {
return $rtn;
}
try {
$this->_lastResult = $this->_session->get($oid, $preserveKeys);
} catch (Exception $exc) {
$this->close(... | php | public function get($oid, $preserveKeys = false) {
if ($this->cache() && ( $rtn = $this->getCache()->load($oid) ) !== null) {
return $rtn;
}
try {
$this->_lastResult = $this->_session->get($oid, $preserveKeys);
} catch (Exception $exc) {
$this->close(... | [
"public",
"function",
"get",
"(",
"$",
"oid",
",",
"$",
"preserveKeys",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"cache",
"(",
")",
"&&",
"(",
"$",
"rtn",
"=",
"$",
"this",
"->",
"getCache",
"(",
")",
"->",
"load",
"(",
"$",
"oid",... | Get a single SNMP value
@throws \Cityware\SnmpException On *any* SNMP error, warnings are supressed and a generic exception is thrown
@param string $oid The OID to get
@return mixed The resultant value | [
"Get",
"a",
"single",
"SNMP",
"value"
] | 831b7485b6c932a84f081d5ceeb9c5f4e7a8641d | https://github.com/cityware/city-snmp/blob/831b7485b6c932a84f081d5ceeb9c5f4e7a8641d/src/SNMP.php#L264-L282 |
241,178 | cityware/city-snmp | src/SNMP.php | SNMP.subOidWalk | public function subOidWalk($oid, $position, $elements = 1) {
if ($this->cache() && ( $rtn = $this->getCache()->load($oid) ) !== null) {
return $rtn;
}
$this->_lastResult = $this->realWalk($oid);
if ($this->_lastResult === false) {
$this->close();
thr... | php | public function subOidWalk($oid, $position, $elements = 1) {
if ($this->cache() && ( $rtn = $this->getCache()->load($oid) ) !== null) {
return $rtn;
}
$this->_lastResult = $this->realWalk($oid);
if ($this->_lastResult === false) {
$this->close();
thr... | [
"public",
"function",
"subOidWalk",
"(",
"$",
"oid",
",",
"$",
"position",
",",
"$",
"elements",
"=",
"1",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"cache",
"(",
")",
"&&",
"(",
"$",
"rtn",
"=",
"$",
"this",
"->",
"getCache",
"(",
")",
"->",
"lo... | Get indexed SNMP values where the array key is the given position of the OID
I.e. the following query with sample results:
subOidWalk( '.1.3.6.1.4.1.9.9.23.1.2.1.1.9', 15 )
.1.3.6.1.4.1.9.9.23.1.2.1.1.9.10101.5 = Hex-STRING: 00 00 00 01
.1.3.6.1.4.1.9.9.23.1.2.1.1.9.10105.2 = Hex-STRING: 00 00 00 01
.1.3.6.1.4.1.9.... | [
"Get",
"indexed",
"SNMP",
"values",
"where",
"the",
"array",
"key",
"is",
"the",
"given",
"position",
"of",
"the",
"OID"
] | 831b7485b6c932a84f081d5ceeb9c5f4e7a8641d | https://github.com/cityware/city-snmp/blob/831b7485b6c932a84f081d5ceeb9c5f4e7a8641d/src/SNMP.php#L378-L404 |
241,179 | cityware/city-snmp | src/SNMP.php | SNMP.walkIPv4 | public function walkIPv4($oid) {
if ($this->cache() && ( $rtn = $this->getCache()->load($oid) ) !== null) {
return $rtn;
}
$this->_lastResult = $this->realWalk($oid);
if ($this->_lastResult === false) {
throw new Exception('Could not perform walk for OID ' . $oi... | php | public function walkIPv4($oid) {
if ($this->cache() && ( $rtn = $this->getCache()->load($oid) ) !== null) {
return $rtn;
}
$this->_lastResult = $this->realWalk($oid);
if ($this->_lastResult === false) {
throw new Exception('Could not perform walk for OID ' . $oi... | [
"public",
"function",
"walkIPv4",
"(",
"$",
"oid",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"cache",
"(",
")",
"&&",
"(",
"$",
"rtn",
"=",
"$",
"this",
"->",
"getCache",
"(",
")",
"->",
"load",
"(",
"$",
"oid",
")",
")",
"!==",
"null",
")",
"{... | Get indexed SNMP values where they are indexed by IPv4 addresses
I.e. the following query with sample results:
subOidWalk( '.1.3.6.1.2.1.15.3.1.1. )
.1.3.6.1.2.1.15.3.1.1.10.20.30.4 = IpAddress: 192.168.10.10
...
would yield an array:
[10.20.30.4] => "192.168.10.10"
....
@throws \Cityware\SnmpException On *any* ... | [
"Get",
"indexed",
"SNMP",
"values",
"where",
"they",
"are",
"indexed",
"by",
"IPv4",
"addresses"
] | 831b7485b6c932a84f081d5ceeb9c5f4e7a8641d | https://github.com/cityware/city-snmp/blob/831b7485b6c932a84f081d5ceeb9c5f4e7a8641d/src/SNMP.php#L426-L448 |
241,180 | cityware/city-snmp | src/SNMP.php | SNMP.parseSnmpValue | public function parseSnmpValue($v) {
// first, rule out an empty string
if ($v == '""' || $v == '') {
return "";
}
$type = substr($v, 0, strpos($v, ':'));
$value = trim(substr($v, strpos($v, ':') + 1));
switch ($type) {
case 'STRING':
... | php | public function parseSnmpValue($v) {
// first, rule out an empty string
if ($v == '""' || $v == '') {
return "";
}
$type = substr($v, 0, strpos($v, ':'));
$value = trim(substr($v, strpos($v, ':') + 1));
switch ($type) {
case 'STRING':
... | [
"public",
"function",
"parseSnmpValue",
"(",
"$",
"v",
")",
"{",
"// first, rule out an empty string",
"if",
"(",
"$",
"v",
"==",
"'\"\"'",
"||",
"$",
"v",
"==",
"''",
")",
"{",
"return",
"\"\"",
";",
"}",
"$",
"type",
"=",
"substr",
"(",
"$",
"v",
"... | Parse the result of an SNMP query into a PHP type
For example, [STRING: "blah"] is parsed to a PHP string containing: blah
@param string $v The value to parse
@return mixed The parsed value
@throws Exception | [
"Parse",
"the",
"result",
"of",
"an",
"SNMP",
"query",
"into",
"a",
"PHP",
"type"
] | 831b7485b6c932a84f081d5ceeb9c5f4e7a8641d | https://github.com/cityware/city-snmp/blob/831b7485b6c932a84f081d5ceeb9c5f4e7a8641d/src/SNMP.php#L459-L521 |
241,181 | cityware/city-snmp | src/SNMP.php | SNMP.setHost | public function setHost($h) {
$this->_host = $h;
// clear the temporary result cache and last result
$this->_lastResult = null;
unset($this->_resultCache);
$this->_resultCache = array();
return $this;
} | php | public function setHost($h) {
$this->_host = $h;
// clear the temporary result cache and last result
$this->_lastResult = null;
unset($this->_resultCache);
$this->_resultCache = array();
return $this;
} | [
"public",
"function",
"setHost",
"(",
"$",
"h",
")",
"{",
"$",
"this",
"->",
"_host",
"=",
"$",
"h",
";",
"// clear the temporary result cache and last result",
"$",
"this",
"->",
"_lastResult",
"=",
"null",
";",
"unset",
"(",
"$",
"this",
"->",
"_resultCach... | Sets the target host for SNMP queries.
@param string $h The target host for SNMP queries.
@return \Cityware\Snmp\SNMP An instance of $this (for fluent interfaces) | [
"Sets",
"the",
"target",
"host",
"for",
"SNMP",
"queries",
"."
] | 831b7485b6c932a84f081d5ceeb9c5f4e7a8641d | https://github.com/cityware/city-snmp/blob/831b7485b6c932a84f081d5ceeb9c5f4e7a8641d/src/SNMP.php#L722-L731 |
241,182 | cityware/city-snmp | src/SNMP.php | SNMP.getCache | public function getCache() {
if ($this->_cache === null) {
$this->_cache = new \Cityware\Snmp\Cache\Basic();
}
return $this->_cache;
} | php | public function getCache() {
if ($this->_cache === null) {
$this->_cache = new \Cityware\Snmp\Cache\Basic();
}
return $this->_cache;
} | [
"public",
"function",
"getCache",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_cache",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"_cache",
"=",
"new",
"\\",
"Cityware",
"\\",
"Snmp",
"\\",
"Cache",
"\\",
"Basic",
"(",
")",
";",
"}",
"return",
... | Get the cache in use (or create a Cache\Basic instance
We kind of mandate the use of a cache as the code is written with a cache in mind.
You are free to disable it via disableCache() but your machines may be hammered!
We would suggest disableCache() / enableCache() used in pairs only when really needed.
@return \Ci... | [
"Get",
"the",
"cache",
"in",
"use",
"(",
"or",
"create",
"a",
"Cache",
"\\",
"Basic",
"instance"
] | 831b7485b6c932a84f081d5ceeb9c5f4e7a8641d | https://github.com/cityware/city-snmp/blob/831b7485b6c932a84f081d5ceeb9c5f4e7a8641d/src/SNMP.php#L870-L875 |
241,183 | cityware/city-snmp | src/SNMP.php | SNMP.useExtension | public function useExtension($mib, $args) {
$mib = '\\Cityware\\Snmp\\MIBS\\' . str_replace('_', '\\', $mib);
$m = new $mib();
$m->setSNMP($this);
return $m;
} | php | public function useExtension($mib, $args) {
$mib = '\\Cityware\\Snmp\\MIBS\\' . str_replace('_', '\\', $mib);
$m = new $mib();
$m->setSNMP($this);
return $m;
} | [
"public",
"function",
"useExtension",
"(",
"$",
"mib",
",",
"$",
"args",
")",
"{",
"$",
"mib",
"=",
"'\\\\Cityware\\\\Snmp\\\\MIBS\\\\'",
".",
"str_replace",
"(",
"'_'",
",",
"'\\\\'",
",",
"$",
"mib",
")",
";",
"$",
"m",
"=",
"new",
"$",
"mib",
"(",
... | This is the MIB Extension magic
Calling $this->useXXX_YYY_ZZZ()->fn() will instantiate
an extension MIB class is the given name and this $this SNMP
instance and then call fn().
See the examples for more information.
@param string $mib The extension class to use
@param array $args
@return \Cityware\Snmp\MIBS | [
"This",
"is",
"the",
"MIB",
"Extension",
"magic"
] | 831b7485b6c932a84f081d5ceeb9c5f4e7a8641d | https://github.com/cityware/city-snmp/blob/831b7485b6c932a84f081d5ceeb9c5f4e7a8641d/src/SNMP.php#L905-L910 |
241,184 | cityware/city-snmp | src/SNMP.php | SNMP.subOidWalkLong | public function subOidWalkLong($oid, $positionS, $positionE) {
if ($this->cache() && ( $rtn = $this->getCache()->load($oid) ) !== null) {
return $rtn;
}
$this->_lastResult = $this->realWalk($oid);
if ($this->_lastResult === false) {
throw new Exception('Could no... | php | public function subOidWalkLong($oid, $positionS, $positionE) {
if ($this->cache() && ( $rtn = $this->getCache()->load($oid) ) !== null) {
return $rtn;
}
$this->_lastResult = $this->realWalk($oid);
if ($this->_lastResult === false) {
throw new Exception('Could no... | [
"public",
"function",
"subOidWalkLong",
"(",
"$",
"oid",
",",
"$",
"positionS",
",",
"$",
"positionE",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"cache",
"(",
")",
"&&",
"(",
"$",
"rtn",
"=",
"$",
"this",
"->",
"getCache",
"(",
")",
"->",
"load",
"... | Get indexed SNMP values where the array key is spread over a number of OID positions
@throws \Cityware\SnmpException On *any* SNMP error, warnings are supressed and a generic exception is thrown
@param string $oid The OID to walk
@param int $positionS The start position of the OID to use as the key
@param int $positio... | [
"Get",
"indexed",
"SNMP",
"values",
"where",
"the",
"array",
"key",
"is",
"spread",
"over",
"a",
"number",
"of",
"OID",
"positions"
] | 831b7485b6c932a84f081d5ceeb9c5f4e7a8641d | https://github.com/cityware/city-snmp/blob/831b7485b6c932a84f081d5ceeb9c5f4e7a8641d/src/SNMP.php#L928-L953 |
241,185 | vivait/ScrutinizerFormatter | src/Vivait/ScrutinizerFormatterExtension/Extension.php | Extension.addFormatter | protected function addFormatter(ServiceContainer $container, $name, $class)
{
$container->set(
'formatter.formatters.' . $name,
function (ServiceContainer $c) use ($class) {
$c->set('formatter.presenter', new StringPresenter($c->get('formatter.presenter.differ')));
... | php | protected function addFormatter(ServiceContainer $container, $name, $class)
{
$container->set(
'formatter.formatters.' . $name,
function (ServiceContainer $c) use ($class) {
$c->set('formatter.presenter', new StringPresenter($c->get('formatter.presenter.differ')));
... | [
"protected",
"function",
"addFormatter",
"(",
"ServiceContainer",
"$",
"container",
",",
"$",
"name",
",",
"$",
"class",
")",
"{",
"$",
"container",
"->",
"set",
"(",
"'formatter.formatters.'",
".",
"$",
"name",
",",
"function",
"(",
"ServiceContainer",
"$",
... | Add a formatter to the service container
@param ServiceContainer $container
@param string $name
@param string $class | [
"Add",
"a",
"formatter",
"to",
"the",
"service",
"container"
] | 6e6de9c4351c350cc31938b43cc5efd512cef4b7 | https://github.com/vivait/ScrutinizerFormatter/blob/6e6de9c4351c350cc31938b43cc5efd512cef4b7/src/Vivait/ScrutinizerFormatterExtension/Extension.php#L43-L58 |
241,186 | NamelessCoder/gizzle-git-plugins | src/GizzlePlugins/PluginList.php | PluginList.getPluginClassNames | public function getPluginClassNames() {
$plugins = array();
if (TRUE === $this->isEnabled('NamelessCoder\\GizzleGitPlugins\\GizzlePlugins\\ClonePlugin')) {
$plugins[] = 'NamelessCoder\\GizzleGitPlugins\\GizzlePlugins\\ClonePlugin';
}
if (TRUE === $this->isEnabled('NamelessCoder\\GizzleGitPlugins\\GizzlePlugi... | php | public function getPluginClassNames() {
$plugins = array();
if (TRUE === $this->isEnabled('NamelessCoder\\GizzleGitPlugins\\GizzlePlugins\\ClonePlugin')) {
$plugins[] = 'NamelessCoder\\GizzleGitPlugins\\GizzlePlugins\\ClonePlugin';
}
if (TRUE === $this->isEnabled('NamelessCoder\\GizzleGitPlugins\\GizzlePlugi... | [
"public",
"function",
"getPluginClassNames",
"(",
")",
"{",
"$",
"plugins",
"=",
"array",
"(",
")",
";",
"if",
"(",
"TRUE",
"===",
"$",
"this",
"->",
"isEnabled",
"(",
"'NamelessCoder\\\\GizzleGitPlugins\\\\GizzlePlugins\\\\ClonePlugin'",
")",
")",
"{",
"$",
"pl... | Get all class names of plugins delivered from implementer package.
@return string[] | [
"Get",
"all",
"class",
"names",
"of",
"plugins",
"delivered",
"from",
"implementer",
"package",
"."
] | 7c476db81b58bed7dc769866491b2adb6ddb19bb | https://github.com/NamelessCoder/gizzle-git-plugins/blob/7c476db81b58bed7dc769866491b2adb6ddb19bb/src/GizzlePlugins/PluginList.php#L41-L59 |
241,187 | ushios/elasticsearch-bundle | DependencyInjection/UshiosElasticSearchExtension.php | UshiosElasticSearchExtension.clientSettings | protected function clientSettings(array $configs, ContainerBuilder $container)
{
foreach($configs as $key => $infos){
$clientDefinition = new Definition();
$clientDefinition->setClass($infos['class']);
$hostsSettings = $this->hostSettings($infos);
... | php | protected function clientSettings(array $configs, ContainerBuilder $container)
{
foreach($configs as $key => $infos){
$clientDefinition = new Definition();
$clientDefinition->setClass($infos['class']);
$hostsSettings = $this->hostSettings($infos);
... | [
"protected",
"function",
"clientSettings",
"(",
"array",
"$",
"configs",
",",
"ContainerBuilder",
"$",
"container",
")",
"{",
"foreach",
"(",
"$",
"configs",
"as",
"$",
"key",
"=>",
"$",
"infos",
")",
"{",
"$",
"clientDefinition",
"=",
"new",
"Definition",
... | Reading the config.yml for aws-sdk client.
@param array $configs
@param ContainerBuilder $container | [
"Reading",
"the",
"config",
".",
"yml",
"for",
"aws",
"-",
"sdk",
"client",
"."
] | 4524370dc59c24b53636ca57f39f66ecdb93e89c | https://github.com/ushios/elasticsearch-bundle/blob/4524370dc59c24b53636ca57f39f66ecdb93e89c/DependencyInjection/UshiosElasticSearchExtension.php#L40-L68 |
241,188 | marando/phpSOFA | src/Marando/IAU/iauApcg.php | iauApcg.Apcg | public static function Apcg($date1, $date2, array $ebpv, array $ehp,
iauASTROM &$astrom) {
/* Geocentric observer */
$pv = [ [ 0.0, 0.0, 0.0],
[ 0.0, 0.0, 0.0]];
/* Compute the star-independent astrometry parameters. */
IAU::Apcs($date1, $date2, $pv, $ebpv, $ehp, $astrom);
/* Fi... | php | public static function Apcg($date1, $date2, array $ebpv, array $ehp,
iauASTROM &$astrom) {
/* Geocentric observer */
$pv = [ [ 0.0, 0.0, 0.0],
[ 0.0, 0.0, 0.0]];
/* Compute the star-independent astrometry parameters. */
IAU::Apcs($date1, $date2, $pv, $ebpv, $ehp, $astrom);
/* Fi... | [
"public",
"static",
"function",
"Apcg",
"(",
"$",
"date1",
",",
"$",
"date2",
",",
"array",
"$",
"ebpv",
",",
"array",
"$",
"ehp",
",",
"iauASTROM",
"&",
"$",
"astrom",
")",
"{",
"/* Geocentric observer */",
"$",
"pv",
"=",
"[",
"[",
"0.0",
",",
"0.0... | - - - - - - - -
i a u A p c g
- - - - - - - -
For a geocentric observer, prepare star-independent astrometry
parameters for transformations between ICRS and GCRS coordinates.
The Earth ephemeris is supplied by the caller.
The parameters produced by this function are required in the
parallax, light deflection and aber... | [
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"i",
"a",
"u",
"A",
"p",
"c",
"g",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-"
] | 757fa49fe335ae1210eaa7735473fd4388b13f07 | https://github.com/marando/phpSOFA/blob/757fa49fe335ae1210eaa7735473fd4388b13f07/src/Marando/IAU/iauApcg.php#L117-L128 |
241,189 | gossi/trixionary | src/domain/base/GroupDomainTrait.php | GroupDomainTrait.doRemoveSkills | protected function doRemoveSkills(Group $model, $data) {
$errors = [];
foreach ($data as $entry) {
if (!isset($entry['id'])) {
$errors[] = 'Missing id for Skill';
} else {
$related = SkillQuery::create()->findOneById($entry['id']);
$model->removeSkill($related);
}
}
if (count($errors) > 0)... | php | protected function doRemoveSkills(Group $model, $data) {
$errors = [];
foreach ($data as $entry) {
if (!isset($entry['id'])) {
$errors[] = 'Missing id for Skill';
} else {
$related = SkillQuery::create()->findOneById($entry['id']);
$model->removeSkill($related);
}
}
if (count($errors) > 0)... | [
"protected",
"function",
"doRemoveSkills",
"(",
"Group",
"$",
"model",
",",
"$",
"data",
")",
"{",
"$",
"errors",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"data",
"as",
"$",
"entry",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"entry",
"[",
"'id... | Interal mechanism to remove Skills from Group
@param Group $model
@param mixed $data | [
"Interal",
"mechanism",
"to",
"remove",
"Skills",
"from",
"Group"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/domain/base/GroupDomainTrait.php#L430-L444 |
241,190 | gossi/trixionary | src/domain/base/GroupDomainTrait.php | GroupDomainTrait.doUpdateSkills | protected function doUpdateSkills(Group $model, $data) {
// remove all relationships before
SkillGroupQuery::create()->filterByGroup($model)->delete();
// add them
$errors = [];
foreach ($data as $entry) {
if (!isset($entry['id'])) {
$errors[] = 'Missing id for Skill';
} else {
$related = Skill... | php | protected function doUpdateSkills(Group $model, $data) {
// remove all relationships before
SkillGroupQuery::create()->filterByGroup($model)->delete();
// add them
$errors = [];
foreach ($data as $entry) {
if (!isset($entry['id'])) {
$errors[] = 'Missing id for Skill';
} else {
$related = Skill... | [
"protected",
"function",
"doUpdateSkills",
"(",
"Group",
"$",
"model",
",",
"$",
"data",
")",
"{",
"// remove all relationships before",
"SkillGroupQuery",
"::",
"create",
"(",
")",
"->",
"filterByGroup",
"(",
"$",
"model",
")",
"->",
"delete",
"(",
")",
";",
... | Internal update mechanism of Skills on Group
@param Group $model
@param mixed $data | [
"Internal",
"update",
"mechanism",
"of",
"Skills",
"on",
"Group"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/domain/base/GroupDomainTrait.php#L468-L486 |
241,191 | crayner/symfony-form | Util/FormErrorsParser.php | FormErrorsParser.realParseErrors | private function realParseErrors(FormInterface $form, array &$results)
{
$errors = $form->getErrors();
if (count($errors) > 0)
{
$config = $form->getConfig();
$name = $form->getName();
$label = $config->getOption('label');
$translation = $this->getTranslationDomain($form);
if (e... | php | private function realParseErrors(FormInterface $form, array &$results)
{
$errors = $form->getErrors();
if (count($errors) > 0)
{
$config = $form->getConfig();
$name = $form->getName();
$label = $config->getOption('label');
$translation = $this->getTranslationDomain($form);
if (e... | [
"private",
"function",
"realParseErrors",
"(",
"FormInterface",
"$",
"form",
",",
"array",
"&",
"$",
"results",
")",
"{",
"$",
"errors",
"=",
"$",
"form",
"->",
"getErrors",
"(",
")",
";",
"if",
"(",
"count",
"(",
"$",
"errors",
")",
">",
"0",
")",
... | This does the actual job. Method travels through all levels of form recursively and gathers errors.
@param FormInterface $form
@param array &$results
@return array | [
"This",
"does",
"the",
"actual",
"job",
".",
"Method",
"travels",
"through",
"all",
"levels",
"of",
"form",
"recursively",
"and",
"gathers",
"errors",
"."
] | d9fb4f01265ffbcbc74cf4e2adebf99da359c8c2 | https://github.com/crayner/symfony-form/blob/d9fb4f01265ffbcbc74cf4e2adebf99da359c8c2/Util/FormErrorsParser.php#L51-L87 |
241,192 | crayner/symfony-form | Util/FormErrorsParser.php | FormErrorsParser.getTranslationDomain | private function getTranslationDomain(FormInterface $form)
{
$translation = $form->getConfig()->getOption('translation_domain');
if (empty($translation))
{
$parent = $form->getParent();
if (empty($parent))
$translation = 'messages';
while (empty($translation))
{
$translation = $parent->g... | php | private function getTranslationDomain(FormInterface $form)
{
$translation = $form->getConfig()->getOption('translation_domain');
if (empty($translation))
{
$parent = $form->getParent();
if (empty($parent))
$translation = 'messages';
while (empty($translation))
{
$translation = $parent->g... | [
"private",
"function",
"getTranslationDomain",
"(",
"FormInterface",
"$",
"form",
")",
"{",
"$",
"translation",
"=",
"$",
"form",
"->",
"getConfig",
"(",
")",
"->",
"getOption",
"(",
"'translation_domain'",
")",
";",
"if",
"(",
"empty",
"(",
"$",
"translatio... | Find the Translation Domain.
Needs to be done for each element as sub forms or elements could have different translation domains.
@param FormInterface $form
@return string | [
"Find",
"the",
"Translation",
"Domain",
"."
] | d9fb4f01265ffbcbc74cf4e2adebf99da359c8c2 | https://github.com/crayner/symfony-form/blob/d9fb4f01265ffbcbc74cf4e2adebf99da359c8c2/Util/FormErrorsParser.php#L98-L118 |
241,193 | eix/core | src/php/main/Eix/Services/Data/Entity.php | Entity.addFieldValidators | public function addFieldValidators(array $fieldValidators)
{
foreach ($fieldValidators as $fieldName => $validators) {
$this->fieldValidators[$fieldName] = $validators;
}
} | php | public function addFieldValidators(array $fieldValidators)
{
foreach ($fieldValidators as $fieldName => $validators) {
$this->fieldValidators[$fieldName] = $validators;
}
} | [
"public",
"function",
"addFieldValidators",
"(",
"array",
"$",
"fieldValidators",
")",
"{",
"foreach",
"(",
"$",
"fieldValidators",
"as",
"$",
"fieldName",
"=>",
"$",
"validators",
")",
"{",
"$",
"this",
"->",
"fieldValidators",
"[",
"$",
"fieldName",
"]",
"... | Adds field validators to the existing ones.
@param array $fieldValidators the field validators as an array
in the form: array(fieldName => array(validatorType1[, validatorType2]...)) | [
"Adds",
"field",
"validators",
"to",
"the",
"existing",
"ones",
"."
] | a5b4c09cc168221e85804fdfeb78e519a0415466 | https://github.com/eix/core/blob/a5b4c09cc168221e85804fdfeb78e519a0415466/src/php/main/Eix/Services/Data/Entity.php#L178-L183 |
241,194 | eix/core | src/php/main/Eix/Services/Data/Entity.php | Entity.getFieldsData | public function getFieldsData()
{
$fieldsData = array();
foreach ($this->getFields() as $field) {
$fieldData = $this->$field;
// If the field is an Entity, decode it.
if ($fieldData instanceof self) {
$fieldData = $fieldData->getFieldsData();
... | php | public function getFieldsData()
{
$fieldsData = array();
foreach ($this->getFields() as $field) {
$fieldData = $this->$field;
// If the field is an Entity, decode it.
if ($fieldData instanceof self) {
$fieldData = $fieldData->getFieldsData();
... | [
"public",
"function",
"getFieldsData",
"(",
")",
"{",
"$",
"fieldsData",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"getFields",
"(",
")",
"as",
"$",
"field",
")",
"{",
"$",
"fieldData",
"=",
"$",
"this",
"->",
"$",
"field",
";... | Returns an array composed of all the persistable fields.
@return array | [
"Returns",
"an",
"array",
"composed",
"of",
"all",
"the",
"persistable",
"fields",
"."
] | a5b4c09cc168221e85804fdfeb78e519a0415466 | https://github.com/eix/core/blob/a5b4c09cc168221e85804fdfeb78e519a0415466/src/php/main/Eix/Services/Data/Entity.php#L190-L211 |
241,195 | eix/core | src/php/main/Eix/Services/Data/Entity.php | Entity.store | public function store()
{
// Check whether the object has ever been stored.
if ($this->isNew) {
Logger::get()->debug('Storing new entity ' . get_class($this) . '...');
// Create the record. Get an ID back.
$this->id = $this->getDataSource()->create($this->getField... | php | public function store()
{
// Check whether the object has ever been stored.
if ($this->isNew) {
Logger::get()->debug('Storing new entity ' . get_class($this) . '...');
// Create the record. Get an ID back.
$this->id = $this->getDataSource()->create($this->getField... | [
"public",
"function",
"store",
"(",
")",
"{",
"// Check whether the object has ever been stored.",
"if",
"(",
"$",
"this",
"->",
"isNew",
")",
"{",
"Logger",
"::",
"get",
"(",
")",
"->",
"debug",
"(",
"'Storing new entity '",
".",
"get_class",
"(",
"$",
"this"... | Stores the object in the persistence layer. | [
"Stores",
"the",
"object",
"in",
"the",
"persistence",
"layer",
"."
] | a5b4c09cc168221e85804fdfeb78e519a0415466 | https://github.com/eix/core/blob/a5b4c09cc168221e85804fdfeb78e519a0415466/src/php/main/Eix/Services/Data/Entity.php#L231-L247 |
241,196 | eix/core | src/php/main/Eix/Services/Data/Entity.php | Entity.destroy | public function destroy()
{
// Delete from the persistence layer.
$this->getDataSource()->destroy($this->id);
// Remove from the registry.
$this->getFactory()->unregisterEntity($this);
// Done, garbage collection should do the rest.
} | php | public function destroy()
{
// Delete from the persistence layer.
$this->getDataSource()->destroy($this->id);
// Remove from the registry.
$this->getFactory()->unregisterEntity($this);
// Done, garbage collection should do the rest.
} | [
"public",
"function",
"destroy",
"(",
")",
"{",
"// Delete from the persistence layer.",
"$",
"this",
"->",
"getDataSource",
"(",
")",
"->",
"destroy",
"(",
"$",
"this",
"->",
"id",
")",
";",
"// Remove from the registry.",
"$",
"this",
"->",
"getFactory",
"(",
... | Destroys all copies of the object, even the persisted ones. | [
"Destroys",
"all",
"copies",
"of",
"the",
"object",
"even",
"the",
"persisted",
"ones",
"."
] | a5b4c09cc168221e85804fdfeb78e519a0415466 | https://github.com/eix/core/blob/a5b4c09cc168221e85804fdfeb78e519a0415466/src/php/main/Eix/Services/Data/Entity.php#L252-L259 |
241,197 | anklimsk/cakephp-basic-functions | Vendor/langcode-conv/zendframework/zend-filter/src/Compress.php | Compress.setOptions | public function setOptions($options)
{
if (!is_array($options) && !$options instanceof Traversable) {
throw new Exception\InvalidArgumentException(sprintf(
'"%s" expects an array or Traversable; received "%s"',
__METHOD__,
(is_object($options) ? ge... | php | public function setOptions($options)
{
if (!is_array($options) && !$options instanceof Traversable) {
throw new Exception\InvalidArgumentException(sprintf(
'"%s" expects an array or Traversable; received "%s"',
__METHOD__,
(is_object($options) ? ge... | [
"public",
"function",
"setOptions",
"(",
"$",
"options",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
"options",
")",
"&&",
"!",
"$",
"options",
"instanceof",
"Traversable",
")",
"{",
"throw",
"new",
"Exception",
"\\",
"InvalidArgumentException",
"(",
"... | Set filter setate
@param array $options
@throws Exception\InvalidArgumentException if options is not an array or Traversable
@return self | [
"Set",
"filter",
"setate"
] | 7554e8b0b420fd3155593af7bf76b7ccbdc8701e | https://github.com/anklimsk/cakephp-basic-functions/blob/7554e8b0b420fd3155593af7bf76b7ccbdc8701e/Vendor/langcode-conv/zendframework/zend-filter/src/Compress.php#L56-L76 |
241,198 | anklimsk/cakephp-basic-functions | Vendor/langcode-conv/zendframework/zend-filter/src/Compress.php | Compress.getAdapter | public function getAdapter()
{
if ($this->adapter instanceof Compress\CompressionAlgorithmInterface) {
return $this->adapter;
}
$adapter = $this->adapter;
$options = $this->getAdapterOptions();
if (!class_exists($adapter)) {
$adapter = 'Zend\\Filter\\... | php | public function getAdapter()
{
if ($this->adapter instanceof Compress\CompressionAlgorithmInterface) {
return $this->adapter;
}
$adapter = $this->adapter;
$options = $this->getAdapterOptions();
if (!class_exists($adapter)) {
$adapter = 'Zend\\Filter\\... | [
"public",
"function",
"getAdapter",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"adapter",
"instanceof",
"Compress",
"\\",
"CompressionAlgorithmInterface",
")",
"{",
"return",
"$",
"this",
"->",
"adapter",
";",
"}",
"$",
"adapter",
"=",
"$",
"this",
"->",... | Returns the current adapter, instantiating it if necessary
@throws Exception\RuntimeException
@throws Exception\InvalidArgumentException
@return Compress\CompressionAlgorithmInterface | [
"Returns",
"the",
"current",
"adapter",
"instantiating",
"it",
"if",
"necessary"
] | 7554e8b0b420fd3155593af7bf76b7ccbdc8701e | https://github.com/anklimsk/cakephp-basic-functions/blob/7554e8b0b420fd3155593af7bf76b7ccbdc8701e/Vendor/langcode-conv/zendframework/zend-filter/src/Compress.php#L85-L109 |
241,199 | anklimsk/cakephp-basic-functions | Vendor/langcode-conv/zendframework/zend-filter/src/Compress.php | Compress.setAdapter | public function setAdapter($adapter)
{
if ($adapter instanceof Compress\CompressionAlgorithmInterface) {
$this->adapter = $adapter;
return $this;
}
if (!is_string($adapter)) {
throw new Exception\InvalidArgumentException('Invalid adapter provided; must be ... | php | public function setAdapter($adapter)
{
if ($adapter instanceof Compress\CompressionAlgorithmInterface) {
$this->adapter = $adapter;
return $this;
}
if (!is_string($adapter)) {
throw new Exception\InvalidArgumentException('Invalid adapter provided; must be ... | [
"public",
"function",
"setAdapter",
"(",
"$",
"adapter",
")",
"{",
"if",
"(",
"$",
"adapter",
"instanceof",
"Compress",
"\\",
"CompressionAlgorithmInterface",
")",
"{",
"$",
"this",
"->",
"adapter",
"=",
"$",
"adapter",
";",
"return",
"$",
"this",
";",
"}"... | Sets compression adapter
@param string|Compress\CompressionAlgorithmInterface $adapter Adapter to use
@return self
@throws Exception\InvalidArgumentException | [
"Sets",
"compression",
"adapter"
] | 7554e8b0b420fd3155593af7bf76b7ccbdc8701e | https://github.com/anklimsk/cakephp-basic-functions/blob/7554e8b0b420fd3155593af7bf76b7ccbdc8701e/Vendor/langcode-conv/zendframework/zend-filter/src/Compress.php#L128-L140 |
Subsets and Splits
Yii Code Samples
Gathers all records from test, train, and validation sets that contain the word 'yii', providing a basic filtered view of the dataset relevant to Yii-related content.