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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
12,400 | PytoCryto/PytoTPL | src/Compiler.php | Compiler.wrap | public function wrap($content, $end = ';', $newLine = false)
{
return '<?php ' . $content . $end . ' ?>' . ($newLine === true ? PHP_EOL : '');
} | php | public function wrap($content, $end = ';', $newLine = false)
{
return '<?php ' . $content . $end . ' ?>' . ($newLine === true ? PHP_EOL : '');
} | [
"public",
"function",
"wrap",
"(",
"$",
"content",
",",
"$",
"end",
"=",
"';'",
",",
"$",
"newLine",
"=",
"false",
")",
"{",
"return",
"'<?php '",
".",
"$",
"content",
".",
"$",
"end",
".",
"' ?>'",
".",
"(",
"$",
"newLine",
"===",
"true",
"?",
"... | Wrap the given value in PHP tags
@param string $content
@param null|string $end
@param bool $newLine
@return string | [
"Wrap",
"the",
"given",
"value",
"in",
"PHP",
"tags"
] | a130fb26d57b888871a5b047fba970a5fafd4131 | https://github.com/PytoCryto/PytoTPL/blob/a130fb26d57b888871a5b047fba970a5fafd4131/src/Compiler.php#L153-L156 |
12,401 | nours/TableBundle | Renderer/TwigRenderer.php | TwigRenderer.setTheme | public function setTheme(View $view, $themes)
{
$cacheKey = $this->getCacheKey($view);
$this->themes[$cacheKey] = $themes;
} | php | public function setTheme(View $view, $themes)
{
$cacheKey = $this->getCacheKey($view);
$this->themes[$cacheKey] = $themes;
} | [
"public",
"function",
"setTheme",
"(",
"View",
"$",
"view",
",",
"$",
"themes",
")",
"{",
"$",
"cacheKey",
"=",
"$",
"this",
"->",
"getCacheKey",
"(",
"$",
"view",
")",
";",
"$",
"this",
"->",
"themes",
"[",
"$",
"cacheKey",
"]",
"=",
"$",
"themes"... | Sets a theme for a table view
@param View $view
@param $themes | [
"Sets",
"a",
"theme",
"for",
"a",
"table",
"view"
] | 0fb5bd7cc13008fb7890037b1a1ccb02d047c329 | https://github.com/nours/TableBundle/blob/0fb5bd7cc13008fb7890037b1a1ccb02d047c329/Renderer/TwigRenderer.php#L66-L71 |
12,402 | nours/TableBundle | Renderer/TwigRenderer.php | TwigRenderer.loadTemplates | private function loadTemplates(array $themes)
{
$templates = array();
foreach ($themes as $theme) {
$key = is_object($theme) ? spl_object_hash($theme) : $theme;
if (!isset($this->templates[$key])) {
$template = $this->twig->load($theme);
$thi... | php | private function loadTemplates(array $themes)
{
$templates = array();
foreach ($themes as $theme) {
$key = is_object($theme) ? spl_object_hash($theme) : $theme;
if (!isset($this->templates[$key])) {
$template = $this->twig->load($theme);
$thi... | [
"private",
"function",
"loadTemplates",
"(",
"array",
"$",
"themes",
")",
"{",
"$",
"templates",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"themes",
"as",
"$",
"theme",
")",
"{",
"$",
"key",
"=",
"is_object",
"(",
"$",
"theme",
")",
"?",
"s... | Loads the templates used by current theme. | [
"Loads",
"the",
"templates",
"used",
"by",
"current",
"theme",
"."
] | 0fb5bd7cc13008fb7890037b1a1ccb02d047c329 | https://github.com/nours/TableBundle/blob/0fb5bd7cc13008fb7890037b1a1ccb02d047c329/Renderer/TwigRenderer.php#L76-L92 |
12,403 | echo511/TreeTraversal | src/Tree.php | Tree.moveNode | public function moveNode($headId, $targetId = null, $mode = self::MODE_UNDER)
{
$head = $this->getNode($headId);
$target = $this->getNode($targetId);
switch ($mode) {
case self::MODE_BEFORE:
$operation = new MoveBefore($head, $target, $this->config, $this);
... | php | public function moveNode($headId, $targetId = null, $mode = self::MODE_UNDER)
{
$head = $this->getNode($headId);
$target = $this->getNode($targetId);
switch ($mode) {
case self::MODE_BEFORE:
$operation = new MoveBefore($head, $target, $this->config, $this);
... | [
"public",
"function",
"moveNode",
"(",
"$",
"headId",
",",
"$",
"targetId",
"=",
"null",
",",
"$",
"mode",
"=",
"self",
"::",
"MODE_UNDER",
")",
"{",
"$",
"head",
"=",
"$",
"this",
"->",
"getNode",
"(",
"$",
"headId",
")",
";",
"$",
"target",
"=",
... | Move head node to target node.
@param mixed $headId
@param mixed $targetId
@param int $mode | [
"Move",
"head",
"node",
"to",
"target",
"node",
"."
] | 7d748c90df4a1941e7c1ad4578f892bc1414c189 | https://github.com/echo511/TreeTraversal/blob/7d748c90df4a1941e7c1ad4578f892bc1414c189/src/Tree.php#L108-L126 |
12,404 | echo511/TreeTraversal | src/Tree.php | Tree.deleteNode | public function deleteNode($nodeId)
{
$node = $this->getNode($nodeId);
$operation = new Operations\Delete($node, $this->config, $this);
$operation->run();
} | php | public function deleteNode($nodeId)
{
$node = $this->getNode($nodeId);
$operation = new Operations\Delete($node, $this->config, $this);
$operation->run();
} | [
"public",
"function",
"deleteNode",
"(",
"$",
"nodeId",
")",
"{",
"$",
"node",
"=",
"$",
"this",
"->",
"getNode",
"(",
"$",
"nodeId",
")",
";",
"$",
"operation",
"=",
"new",
"Operations",
"\\",
"Delete",
"(",
"$",
"node",
",",
"$",
"this",
"->",
"c... | Delete node and its children.
@param int $nodeId | [
"Delete",
"node",
"and",
"its",
"children",
"."
] | 7d748c90df4a1941e7c1ad4578f892bc1414c189 | https://github.com/echo511/TreeTraversal/blob/7d748c90df4a1941e7c1ad4578f892bc1414c189/src/Tree.php#L132-L138 |
12,405 | echo511/TreeTraversal | src/Tree.php | Tree.isChildOf | public function isChildOf($head, $target)
{
if (!is_array($head)) {
$head = $this->getNode($head);
}
if (!is_array($target)) {
$target = $this->getNode($target);
}
$config = $this->config;
$headLft = $head[$config['lft']];
$headRgt = $h... | php | public function isChildOf($head, $target)
{
if (!is_array($head)) {
$head = $this->getNode($head);
}
if (!is_array($target)) {
$target = $this->getNode($target);
}
$config = $this->config;
$headLft = $head[$config['lft']];
$headRgt = $h... | [
"public",
"function",
"isChildOf",
"(",
"$",
"head",
",",
"$",
"target",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
"head",
")",
")",
"{",
"$",
"head",
"=",
"$",
"this",
"->",
"getNode",
"(",
"$",
"head",
")",
";",
"}",
"if",
"(",
"!",
"... | Is head node child of target node?
@param type $head
@param type $target | [
"Is",
"head",
"node",
"child",
"of",
"target",
"node?"
] | 7d748c90df4a1941e7c1ad4578f892bc1414c189 | https://github.com/echo511/TreeTraversal/blob/7d748c90df4a1941e7c1ad4578f892bc1414c189/src/Tree.php#L145-L163 |
12,406 | echo511/TreeTraversal | src/Tree.php | Tree.getChildren | public function getChildren($headId, $relativeDepth = null, $summarize = false)
{
$head = $this->getNode($headId);
$config = $this->config;
$query = $this->table()
->select(null)
->select("$config[id] AS id")
->where("$config[lft] > ?", $head['... | php | public function getChildren($headId, $relativeDepth = null, $summarize = false)
{
$head = $this->getNode($headId);
$config = $this->config;
$query = $this->table()
->select(null)
->select("$config[id] AS id")
->where("$config[lft] > ?", $head['... | [
"public",
"function",
"getChildren",
"(",
"$",
"headId",
",",
"$",
"relativeDepth",
"=",
"null",
",",
"$",
"summarize",
"=",
"false",
")",
"{",
"$",
"head",
"=",
"$",
"this",
"->",
"getNode",
"(",
"$",
"headId",
")",
";",
"$",
"config",
"=",
"$",
"... | Get IDs of children nodes.
@param mixed $headId
@param int|null Eg. 1 - children, 2 - grandchildren.
@param bool If enabled and $relativeDepth = 2 then select children and grandchildren.
@return array | [
"Get",
"IDs",
"of",
"children",
"nodes",
"."
] | 7d748c90df4a1941e7c1ad4578f892bc1414c189 | https://github.com/echo511/TreeTraversal/blob/7d748c90df4a1941e7c1ad4578f892bc1414c189/src/Tree.php#L172-L196 |
12,407 | echo511/TreeTraversal | src/Tree.php | Tree.getParents | public function getParents($headId)
{
$head = $this->getNode($headId);
$config = $this->config;
$parents = $this->table()
->select(null)
->select("$config[id] AS id")
->where("$config[lft] < ?", $head['lft'])
->where("$config[rg... | php | public function getParents($headId)
{
$head = $this->getNode($headId);
$config = $this->config;
$parents = $this->table()
->select(null)
->select("$config[id] AS id")
->where("$config[lft] < ?", $head['lft'])
->where("$config[rg... | [
"public",
"function",
"getParents",
"(",
"$",
"headId",
")",
"{",
"$",
"head",
"=",
"$",
"this",
"->",
"getNode",
"(",
"$",
"headId",
")",
";",
"$",
"config",
"=",
"$",
"this",
"->",
"config",
";",
"$",
"parents",
"=",
"$",
"this",
"->",
"table",
... | Get parents in order, the big boss first.
@param type $headId
@return type | [
"Get",
"parents",
"in",
"order",
"the",
"big",
"boss",
"first",
"."
] | 7d748c90df4a1941e7c1ad4578f892bc1414c189 | https://github.com/echo511/TreeTraversal/blob/7d748c90df4a1941e7c1ad4578f892bc1414c189/src/Tree.php#L203-L219 |
12,408 | echo511/TreeTraversal | src/Tree.php | Tree.getNode | protected function getNode($id)
{
$config = $this->config;
return $this->table()
->select(null)
->select("$config[id] AS id, $config[lft] AS lft, $config[rgt] AS rgt, $config[dpt] AS dpt, $config[prt] AS prt")
->where($config['i... | php | protected function getNode($id)
{
$config = $this->config;
return $this->table()
->select(null)
->select("$config[id] AS id, $config[lft] AS lft, $config[rgt] AS rgt, $config[dpt] AS dpt, $config[prt] AS prt")
->where($config['i... | [
"protected",
"function",
"getNode",
"(",
"$",
"id",
")",
"{",
"$",
"config",
"=",
"$",
"this",
"->",
"config",
";",
"return",
"$",
"this",
"->",
"table",
"(",
")",
"->",
"select",
"(",
"null",
")",
"->",
"select",
"(",
"\"$config[id] AS id, $config[lft] ... | Return single node tree data.
@param mixed $id
@return array | [
"Return",
"single",
"node",
"tree",
"data",
"."
] | 7d748c90df4a1941e7c1ad4578f892bc1414c189 | https://github.com/echo511/TreeTraversal/blob/7d748c90df4a1941e7c1ad4578f892bc1414c189/src/Tree.php#L244-L252 |
12,409 | atelierspierrot/validators | src/Validator/HostnameValidator.php | HostnameValidator.setMustPass | public function setMustPass($ref)
{
if (null!==$this->getMask($ref)) {
$this->must_pass = $ref;
} else {
throw new \Exception(sprintf("Unknown standard [%s] in Hostname validation!", $ref));
}
} | php | public function setMustPass($ref)
{
if (null!==$this->getMask($ref)) {
$this->must_pass = $ref;
} else {
throw new \Exception(sprintf("Unknown standard [%s] in Hostname validation!", $ref));
}
} | [
"public",
"function",
"setMustPass",
"(",
"$",
"ref",
")",
"{",
"if",
"(",
"null",
"!==",
"$",
"this",
"->",
"getMask",
"(",
"$",
"ref",
")",
")",
"{",
"$",
"this",
"->",
"must_pass",
"=",
"$",
"ref",
";",
"}",
"else",
"{",
"throw",
"new",
"\\",
... | Defines the RFC to validate
@param string $ref
@throws \Exception if the `$ref` is not a known RFC | [
"Defines",
"the",
"RFC",
"to",
"validate"
] | 6c97b10bfe8324b33771f24cee8c722d7bc3bb15 | https://github.com/atelierspierrot/validators/blob/6c97b10bfe8324b33771f24cee8c722d7bc3bb15/src/Validator/HostnameValidator.php#L145-L152 |
12,410 | Sowapps/orpheus-inputcontroller | src/InputController/HTTPController/HTTPRoute.php | HTTPRoute.prepare | public function prepare(InputRequest $request) {
$routeOptions = $this->getOptions();
if( !isset($routeOptions['session']) || $routeOptions['session'] ) {
startSession();
}
} | php | public function prepare(InputRequest $request) {
$routeOptions = $this->getOptions();
if( !isset($routeOptions['session']) || $routeOptions['session'] ) {
startSession();
}
} | [
"public",
"function",
"prepare",
"(",
"InputRequest",
"$",
"request",
")",
"{",
"$",
"routeOptions",
"=",
"$",
"this",
"->",
"getOptions",
"(",
")",
";",
"if",
"(",
"!",
"isset",
"(",
"$",
"routeOptions",
"[",
"'session'",
"]",
")",
"||",
"$",
"routeOp... | Prepare environment for this route
@param HTTPRequest $request | [
"Prepare",
"environment",
"for",
"this",
"route"
] | 91f848a42ac02ae4009ffb3e9a9b4e8c0731455e | https://github.com/Sowapps/orpheus-inputcontroller/blob/91f848a42ac02ae4009ffb3e9a9b4e8c0731455e/src/InputController/HTTPController/HTTPRoute.php#L98-L103 |
12,411 | Sowapps/orpheus-inputcontroller | src/InputController/HTTPController/HTTPRoute.php | HTTPRoute.extractVariable | protected static function extractVariable($str, &$var=null, &$regex=null) {
list($p1, $p2) = explodeList(':', $str, 2);
// Optionnal only if there is a default value
if( $p2 ) {
// {regex|type:variable}
$var = $p2;
$regex = $p1;
if( ctype_alpha($regex) && isset(static::$typesRegex[$regex]) ) {
$r... | php | protected static function extractVariable($str, &$var=null, &$regex=null) {
list($p1, $p2) = explodeList(':', $str, 2);
// Optionnal only if there is a default value
if( $p2 ) {
// {regex|type:variable}
$var = $p2;
$regex = $p1;
if( ctype_alpha($regex) && isset(static::$typesRegex[$regex]) ) {
$r... | [
"protected",
"static",
"function",
"extractVariable",
"(",
"$",
"str",
",",
"&",
"$",
"var",
"=",
"null",
",",
"&",
"$",
"regex",
"=",
"null",
")",
"{",
"list",
"(",
"$",
"p1",
",",
"$",
"p2",
")",
"=",
"explodeList",
"(",
"':'",
",",
"$",
"str",... | Extract variable from configuration string
@param string $str
@param string $var
@param string $regex | [
"Extract",
"variable",
"from",
"configuration",
"string"
] | 91f848a42ac02ae4009ffb3e9a9b4e8c0731455e | https://github.com/Sowapps/orpheus-inputcontroller/blob/91f848a42ac02ae4009ffb3e9a9b4e8c0731455e/src/InputController/HTTPController/HTTPRoute.php#L148-L163 |
12,412 | Sowapps/orpheus-inputcontroller | src/InputController/HTTPController/HTTPRoute.php | HTTPRoute.generatePathRegex | protected function generatePathRegex() {
if( $this->pathRegex ) { return; }
$variables = array();
$this->pathRegex = preg_replace_callback(
'#\{([^\}]+)\}#sm',
function($matches) use(&$variables) {
// debug('$matches', $matches);
$regex = $var = null;
static::extractVariable(str_replace('\.', '.... | php | protected function generatePathRegex() {
if( $this->pathRegex ) { return; }
$variables = array();
$this->pathRegex = preg_replace_callback(
'#\{([^\}]+)\}#sm',
function($matches) use(&$variables) {
// debug('$matches', $matches);
$regex = $var = null;
static::extractVariable(str_replace('\.', '.... | [
"protected",
"function",
"generatePathRegex",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"pathRegex",
")",
"{",
"return",
";",
"}",
"$",
"variables",
"=",
"array",
"(",
")",
";",
"$",
"this",
"->",
"pathRegex",
"=",
"preg_replace_callback",
"(",
"'#\\{... | Generate all regex of the path from extracted variables | [
"Generate",
"all",
"regex",
"of",
"the",
"path",
"from",
"extracted",
"variables"
] | 91f848a42ac02ae4009ffb3e9a9b4e8c0731455e | https://github.com/Sowapps/orpheus-inputcontroller/blob/91f848a42ac02ae4009ffb3e9a9b4e8c0731455e/src/InputController/HTTPController/HTTPRoute.php#L168-L183 |
12,413 | hirnsturm/typo3-extbase-services | TYPO3/Extbase/Domain/Model/BaseValueObject.php | BaseValueObject.getCheckedUidsAsArray | public function getCheckedUidsAsArray($property)
{
$array = array();
$entities = $this->{'get' . ucfirst($property)}();
foreach ($entities as $item) {
$array[$item->getUid()] = $item->getUid();
}
return $array;
} | php | public function getCheckedUidsAsArray($property)
{
$array = array();
$entities = $this->{'get' . ucfirst($property)}();
foreach ($entities as $item) {
$array[$item->getUid()] = $item->getUid();
}
return $array;
} | [
"public",
"function",
"getCheckedUidsAsArray",
"(",
"$",
"property",
")",
"{",
"$",
"array",
"=",
"array",
"(",
")",
";",
"$",
"entities",
"=",
"$",
"this",
"->",
"{",
"'get'",
".",
"ucfirst",
"(",
"$",
"property",
")",
"}",
"(",
")",
";",
"foreach",... | Returns the UIDs of releated entites as array
@param string $property
@return array | [
"Returns",
"the",
"UIDs",
"of",
"releated",
"entites",
"as",
"array"
] | 1cdb97eb260267ea5e5610e802d20a5453296bb1 | https://github.com/hirnsturm/typo3-extbase-services/blob/1cdb97eb260267ea5e5610e802d20a5453296bb1/TYPO3/Extbase/Domain/Model/BaseValueObject.php#L22-L32 |
12,414 | hirnsturm/typo3-extbase-services | TYPO3/Extbase/Domain/Model/BaseValueObject.php | BaseValueObject.has | public function has($property)
{
if (is_array($property)) {
foreach ($property as $item) {
if (is_a($this->{$item}, '\\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage')) {
return ($this->{$item}->count()) ? true : false;
} else {
... | php | public function has($property)
{
if (is_array($property)) {
foreach ($property as $item) {
if (is_a($this->{$item}, '\\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage')) {
return ($this->{$item}->count()) ? true : false;
} else {
... | [
"public",
"function",
"has",
"(",
"$",
"property",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"property",
")",
")",
"{",
"foreach",
"(",
"$",
"property",
"as",
"$",
"item",
")",
"{",
"if",
"(",
"is_a",
"(",
"$",
"this",
"->",
"{",
"$",
"item",
... | Checks if a property has value
@param mixed $property array|string
@return boolean | [
"Checks",
"if",
"a",
"property",
"has",
"value"
] | 1cdb97eb260267ea5e5610e802d20a5453296bb1 | https://github.com/hirnsturm/typo3-extbase-services/blob/1cdb97eb260267ea5e5610e802d20a5453296bb1/TYPO3/Extbase/Domain/Model/BaseValueObject.php#L40-L57 |
12,415 | jivoo/core | src/Utilities.php | Utilities.dashesToCamelCase | public static function dashesToCamelCase($dashes)
{
$words = explode('-', $dashes);
$camelCase = '';
foreach ($words as $word) {
$camelCase .= ucfirst($word);
}
return $camelCase;
} | php | public static function dashesToCamelCase($dashes)
{
$words = explode('-', $dashes);
$camelCase = '';
foreach ($words as $word) {
$camelCase .= ucfirst($word);
}
return $camelCase;
} | [
"public",
"static",
"function",
"dashesToCamelCase",
"(",
"$",
"dashes",
")",
"{",
"$",
"words",
"=",
"explode",
"(",
"'-'",
",",
"$",
"dashes",
")",
";",
"$",
"camelCase",
"=",
"''",
";",
"foreach",
"(",
"$",
"words",
"as",
"$",
"word",
")",
"{",
... | Convert a lowercase dash-separated name to a camel case class-name.
E.g.
from "camel-case" to "CamelCase".
@param string $dashes
Dash-separated string
@return string A camel case string | [
"Convert",
"a",
"lowercase",
"dash",
"-",
"separated",
"name",
"to",
"a",
"camel",
"case",
"class",
"-",
"name",
".",
"E",
".",
"g",
".",
"from",
"camel",
"-",
"case",
"to",
"CamelCase",
"."
] | 4ef3445068f0ff9c0a6512cb741831a847013b76 | https://github.com/jivoo/core/blob/4ef3445068f0ff9c0a6512cb741831a847013b76/src/Utilities.php#L85-L93 |
12,416 | jivoo/core | src/Utilities.php | Utilities.underscoresToCamelCase | public static function underscoresToCamelCase($underscores)
{
$words = explode('_', $underscores);
$camelCase = '';
foreach ($words as $word) {
$camelCase .= ucfirst($word);
}
return $camelCase;
} | php | public static function underscoresToCamelCase($underscores)
{
$words = explode('_', $underscores);
$camelCase = '';
foreach ($words as $word) {
$camelCase .= ucfirst($word);
}
return $camelCase;
} | [
"public",
"static",
"function",
"underscoresToCamelCase",
"(",
"$",
"underscores",
")",
"{",
"$",
"words",
"=",
"explode",
"(",
"'_'",
",",
"$",
"underscores",
")",
";",
"$",
"camelCase",
"=",
"''",
";",
"foreach",
"(",
"$",
"words",
"as",
"$",
"word",
... | Convert a lowercase underscore-separated name to a camel case class-name.
E.g. from "camel_case" to "CamelCase".
@param string $underscores
Underscores-separated string
@return string A camel case string | [
"Convert",
"a",
"lowercase",
"underscore",
"-",
"separated",
"name",
"to",
"a",
"camel",
"case",
"class",
"-",
"name",
".",
"E",
".",
"g",
".",
"from",
"camel_case",
"to",
"CamelCase",
"."
] | 4ef3445068f0ff9c0a6512cb741831a847013b76 | https://github.com/jivoo/core/blob/4ef3445068f0ff9c0a6512cb741831a847013b76/src/Utilities.php#L103-L111 |
12,417 | jivoo/core | src/Utilities.php | Utilities.getNamespace | public static function getNamespace($className)
{
if (is_object($className)) {
$className = get_class($className);
}
if (strpos($className, '\\') === false) {
return '';
}
return preg_replace('/\\\\[^\\\\]+$/', '', $className);
} | php | public static function getNamespace($className)
{
if (is_object($className)) {
$className = get_class($className);
}
if (strpos($className, '\\') === false) {
return '';
}
return preg_replace('/\\\\[^\\\\]+$/', '', $className);
} | [
"public",
"static",
"function",
"getNamespace",
"(",
"$",
"className",
")",
"{",
"if",
"(",
"is_object",
"(",
"$",
"className",
")",
")",
"{",
"$",
"className",
"=",
"get_class",
"(",
"$",
"className",
")",
";",
"}",
"if",
"(",
"strpos",
"(",
"$",
"c... | Get namespace part of a class name.
@param string|object $className
Class or object, e.g. 'Jivoo\Utilities'.
@return string Namespace, e.g. 'Jivoo'. | [
"Get",
"namespace",
"part",
"of",
"a",
"class",
"name",
"."
] | 4ef3445068f0ff9c0a6512cb741831a847013b76 | https://github.com/jivoo/core/blob/4ef3445068f0ff9c0a6512cb741831a847013b76/src/Utilities.php#L133-L142 |
12,418 | jivoo/core | src/Utilities.php | Utilities.getClassName | public static function getClassName($className)
{
if (is_object($className)) {
$className = get_class($className);
}
$className = array_slice(explode('\\', $className), - 1);
return $className[0];
} | php | public static function getClassName($className)
{
if (is_object($className)) {
$className = get_class($className);
}
$className = array_slice(explode('\\', $className), - 1);
return $className[0];
} | [
"public",
"static",
"function",
"getClassName",
"(",
"$",
"className",
")",
"{",
"if",
"(",
"is_object",
"(",
"$",
"className",
")",
")",
"{",
"$",
"className",
"=",
"get_class",
"(",
"$",
"className",
")",
";",
"}",
"$",
"className",
"=",
"array_slice",... | Get class name part of a qualified class name.
@param string|object $className
Class or object, e.g. 'Jivoo\Utilities'.
@return string Class name, e.g. 'Utilities'. | [
"Get",
"class",
"name",
"part",
"of",
"a",
"qualified",
"class",
"name",
"."
] | 4ef3445068f0ff9c0a6512cb741831a847013b76 | https://github.com/jivoo/core/blob/4ef3445068f0ff9c0a6512cb741831a847013b76/src/Utilities.php#L151-L158 |
12,419 | jivoo/core | src/Utilities.php | Utilities.getCaller | public static function getCaller()
{
$backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3);
if (isset($backtrace[2])) {
$caller = '';
if (isset($backtrace[2]['class'])) {
$caller = $backtrace[2]['class'] . $backtrace[2]['type'];
}
... | php | public static function getCaller()
{
$backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3);
if (isset($backtrace[2])) {
$caller = '';
if (isset($backtrace[2]['class'])) {
$caller = $backtrace[2]['class'] . $backtrace[2]['type'];
}
... | [
"public",
"static",
"function",
"getCaller",
"(",
")",
"{",
"$",
"backtrace",
"=",
"debug_backtrace",
"(",
"DEBUG_BACKTRACE_IGNORE_ARGS",
",",
"3",
")",
";",
"if",
"(",
"isset",
"(",
"$",
"backtrace",
"[",
"2",
"]",
")",
")",
"{",
"$",
"caller",
"=",
"... | Get caller class and method.
@return string Either returns the name of the class and method as a
string (either 'Class->method' or 'Class::staticMethod'), the name of the
function, '{closure}', or '{null}'. | [
"Get",
"caller",
"class",
"and",
"method",
"."
] | 4ef3445068f0ff9c0a6512cb741831a847013b76 | https://github.com/jivoo/core/blob/4ef3445068f0ff9c0a6512cb741831a847013b76/src/Utilities.php#L258-L270 |
12,420 | snowiow/cocurl | src/Player.php | Player.create | public static function create(array $data): Player
{
$player = new Player();
parent::fill($data, $player);
if (is_array($player->clan)) {
$player->clan = Clan::create($player->clan);
}
if (is_array($player->league)) {
$player->league = League::create($... | php | public static function create(array $data): Player
{
$player = new Player();
parent::fill($data, $player);
if (is_array($player->clan)) {
$player->clan = Clan::create($player->clan);
}
if (is_array($player->league)) {
$player->league = League::create($... | [
"public",
"static",
"function",
"create",
"(",
"array",
"$",
"data",
")",
":",
"Player",
"{",
"$",
"player",
"=",
"new",
"Player",
"(",
")",
";",
"parent",
"::",
"fill",
"(",
"$",
"data",
",",
"$",
"player",
")",
";",
"if",
"(",
"is_array",
"(",
... | Creates a player object with the given data
@param array $data an associative array to fill up the members of the
player class
@return Player a player object with the data given as it's members | [
"Creates",
"a",
"player",
"object",
"with",
"the",
"given",
"data"
] | 583df05bd3c8f24fd99f294da9906a3e4b1a9c7b | https://github.com/snowiow/cocurl/blob/583df05bd3c8f24fd99f294da9906a3e4b1a9c7b/src/Player.php#L90-L101 |
12,421 | asbsoft/yii2-common_2_170212 | web/UniView.php | UniView.stopBlock | public function stopBlock($name = null)
{
if (empty($this->currentBlockName)) {
throw new InvalidParamException(
"Unexpected stopBlock in '{$this->processingViewFile}'"
);
}
if (!empty($name) && $this->currentBlockName != $name) {
throw new... | php | public function stopBlock($name = null)
{
if (empty($this->currentBlockName)) {
throw new InvalidParamException(
"Unexpected stopBlock in '{$this->processingViewFile}'"
);
}
if (!empty($name) && $this->currentBlockName != $name) {
throw new... | [
"public",
"function",
"stopBlock",
"(",
"$",
"name",
"=",
"null",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"this",
"->",
"currentBlockName",
")",
")",
"{",
"throw",
"new",
"InvalidParamException",
"(",
"\"Unexpected stopBlock in '{$this->processingViewFile}'\"",
")... | Stop block with save or echo. | [
"Stop",
"block",
"with",
"save",
"or",
"echo",
"."
] | 6c58012ff89225d7d4e42b200cf39e009e9d9dac | https://github.com/asbsoft/yii2-common_2_170212/blob/6c58012ff89225d7d4e42b200cf39e009e9d9dac/web/UniView.php#L146-L186 |
12,422 | asbsoft/yii2-common_2_170212 | web/UniView.php | UniView.replaceParentBlock | protected function replaceParentBlock($savedContent)
{
$pattern = sprintf(self::TMPL_RENDER_PARENT, "([^']+)", "([^|]+)");
$result = preg_match("/{$pattern}/", $savedContent, $matches);
if (!$result) {
return $savedContent;
} else { // processing parentBlock()
$full... | php | protected function replaceParentBlock($savedContent)
{
$pattern = sprintf(self::TMPL_RENDER_PARENT, "([^']+)", "([^|]+)");
$result = preg_match("/{$pattern}/", $savedContent, $matches);
if (!$result) {
return $savedContent;
} else { // processing parentBlock()
$full... | [
"protected",
"function",
"replaceParentBlock",
"(",
"$",
"savedContent",
")",
"{",
"$",
"pattern",
"=",
"sprintf",
"(",
"self",
"::",
"TMPL_RENDER_PARENT",
",",
"\"([^']+)\"",
",",
"\"([^|]+)\"",
")",
";",
"$",
"result",
"=",
"preg_match",
"(",
"\"/{$pattern}/\"... | Replace in block tag with parentBlock info.
@param string $savedContent
@return string | [
"Replace",
"in",
"block",
"tag",
"with",
"parentBlock",
"info",
"."
] | 6c58012ff89225d7d4e42b200cf39e009e9d9dac | https://github.com/asbsoft/yii2-common_2_170212/blob/6c58012ff89225d7d4e42b200cf39e009e9d9dac/web/UniView.php#L212-L225 |
12,423 | asbsoft/yii2-common_2_170212 | web/UniView.php | UniView.findParentBlock | protected function findParentBlock($fullBlockName, $viewFileName)
{
$parentViewFile = $this->findParentViewFile($viewFileName);
$viewFilesChain = $this->getViewFilesChain($parentViewFile);
$savedContent = '';
foreach ($viewFilesChain as $viewFile) {
if ($this->viewBlocks(... | php | protected function findParentBlock($fullBlockName, $viewFileName)
{
$parentViewFile = $this->findParentViewFile($viewFileName);
$viewFilesChain = $this->getViewFilesChain($parentViewFile);
$savedContent = '';
foreach ($viewFilesChain as $viewFile) {
if ($this->viewBlocks(... | [
"protected",
"function",
"findParentBlock",
"(",
"$",
"fullBlockName",
",",
"$",
"viewFileName",
")",
"{",
"$",
"parentViewFile",
"=",
"$",
"this",
"->",
"findParentViewFile",
"(",
"$",
"viewFileName",
")",
";",
"$",
"viewFilesChain",
"=",
"$",
"this",
"->",
... | Find parent block.
@param string $fullBlockName name of block - name of current block where parentBlock() occured
@return string block body or empty string if not found | [
"Find",
"parent",
"block",
"."
] | 6c58012ff89225d7d4e42b200cf39e009e9d9dac | https://github.com/asbsoft/yii2-common_2_170212/blob/6c58012ff89225d7d4e42b200cf39e009e9d9dac/web/UniView.php#L232-L244 |
12,424 | asbsoft/yii2-common_2_170212 | web/UniView.php | UniView.startParent | public function startParent($addParentData = [])
{
if (!empty($this->_extendingParent[$this->processingViewFile])) {
throw new InvalidParamException("Nested startParent() impossible in '{$this->processingViewFile}'");
}
$this->_extendingParent[$this->processingViewFile] = true;
... | php | public function startParent($addParentData = [])
{
if (!empty($this->_extendingParent[$this->processingViewFile])) {
throw new InvalidParamException("Nested startParent() impossible in '{$this->processingViewFile}'");
}
$this->_extendingParent[$this->processingViewFile] = true;
... | [
"public",
"function",
"startParent",
"(",
"$",
"addParentData",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"!",
"empty",
"(",
"$",
"this",
"->",
"_extendingParent",
"[",
"$",
"this",
"->",
"processingViewFile",
"]",
")",
")",
"{",
"throw",
"new",
"InvalidParamE... | Begin extend parent view file.
@param array $addParentData additional data from inherited view-file | [
"Begin",
"extend",
"parent",
"view",
"file",
"."
] | 6c58012ff89225d7d4e42b200cf39e009e9d9dac | https://github.com/asbsoft/yii2-common_2_170212/blob/6c58012ff89225d7d4e42b200cf39e009e9d9dac/web/UniView.php#L274-L285 |
12,425 | asbsoft/yii2-common_2_170212 | web/UniView.php | UniView.stopParent | public function stopParent()
{
if (!empty($this->currentBlockName)) {
throw new InvalidParamException("Unclosed startBlock detected in '{$this->processingViewFile}'");
}
if (empty($this->_extendingParent[$this->processingViewFile])) {
throw new InvalidParamException("... | php | public function stopParent()
{
if (!empty($this->currentBlockName)) {
throw new InvalidParamException("Unclosed startBlock detected in '{$this->processingViewFile}'");
}
if (empty($this->_extendingParent[$this->processingViewFile])) {
throw new InvalidParamException("... | [
"public",
"function",
"stopParent",
"(",
")",
"{",
"if",
"(",
"!",
"empty",
"(",
"$",
"this",
"->",
"currentBlockName",
")",
")",
"{",
"throw",
"new",
"InvalidParamException",
"(",
"\"Unclosed startBlock detected in '{$this->processingViewFile}'\"",
")",
";",
"}",
... | End extend parent view file. | [
"End",
"extend",
"parent",
"view",
"file",
"."
] | 6c58012ff89225d7d4e42b200cf39e009e9d9dac | https://github.com/asbsoft/yii2-common_2_170212/blob/6c58012ff89225d7d4e42b200cf39e009e9d9dac/web/UniView.php#L290-L323 |
12,426 | asbsoft/yii2-common_2_170212 | web/UniView.php | UniView.getViewsSubSubdir | protected function getViewsSubSubdir($currentViewFile)
{
$viewsSubSubdir = false;
$currentViewFile = realpath($currentViewFile);
$currentViewPath = dirname($currentViewFile);
$module = $this->context->module;
$pathList = $module->getBasePathList();
foreach ($pathLis... | php | protected function getViewsSubSubdir($currentViewFile)
{
$viewsSubSubdir = false;
$currentViewFile = realpath($currentViewFile);
$currentViewPath = dirname($currentViewFile);
$module = $this->context->module;
$pathList = $module->getBasePathList();
foreach ($pathLis... | [
"protected",
"function",
"getViewsSubSubdir",
"(",
"$",
"currentViewFile",
")",
"{",
"$",
"viewsSubSubdir",
"=",
"false",
";",
"$",
"currentViewFile",
"=",
"realpath",
"(",
"$",
"currentViewFile",
")",
";",
"$",
"currentViewPath",
"=",
"dirname",
"(",
"$",
"cu... | Get views sub subdir.
@param string $currentViewFile
@return string
@throws InvalidParamException if $currentViewFile is out of this module parents path list | [
"Get",
"views",
"sub",
"subdir",
"."
] | 6c58012ff89225d7d4e42b200cf39e009e9d9dac | https://github.com/asbsoft/yii2-common_2_170212/blob/6c58012ff89225d7d4e42b200cf39e009e9d9dac/web/UniView.php#L385-L404 |
12,427 | stanislav-web/httpstatuses-json | src/HttpStatuses/HttpStatuses.php | HttpStatuses.getStatus | public function getStatus($code) {
$filename = __DIR__.'/../../data/'.substr($code, 0,1).'.json';
if(file_exists($filename)) {
return json_decode(file_get_contents($filename), true)[$code];
}
return [];
} | php | public function getStatus($code) {
$filename = __DIR__.'/../../data/'.substr($code, 0,1).'.json';
if(file_exists($filename)) {
return json_decode(file_get_contents($filename), true)[$code];
}
return [];
} | [
"public",
"function",
"getStatus",
"(",
"$",
"code",
")",
"{",
"$",
"filename",
"=",
"__DIR__",
".",
"'/../../data/'",
".",
"substr",
"(",
"$",
"code",
",",
"0",
",",
"1",
")",
".",
"'.json'",
";",
"if",
"(",
"file_exists",
"(",
"$",
"filename",
")",... | Get status full description from code
@param int $code
@return array | [
"Get",
"status",
"full",
"description",
"from",
"code"
] | 76900fe87a60253361dff44897a61a58839e5729 | https://github.com/stanislav-web/httpstatuses-json/blob/76900fe87a60253361dff44897a61a58839e5729/src/HttpStatuses/HttpStatuses.php#L23-L30 |
12,428 | digit-soft/re-action-promise | src/Promise.php | Promise.parentCancellerFunction | protected static function parentCancellerFunction(self &$parent)
{
return function () use (&$parent) {
--$parent->requiredCancelRequests;
if ($parent->requiredCancelRequests <= 0) {
$parent->cancel();
}
$parent = null;
};
} | php | protected static function parentCancellerFunction(self &$parent)
{
return function () use (&$parent) {
--$parent->requiredCancelRequests;
if ($parent->requiredCancelRequests <= 0) {
$parent->cancel();
}
$parent = null;
};
} | [
"protected",
"static",
"function",
"parentCancellerFunction",
"(",
"self",
"&",
"$",
"parent",
")",
"{",
"return",
"function",
"(",
")",
"use",
"(",
"&",
"$",
"parent",
")",
"{",
"--",
"$",
"parent",
"->",
"requiredCancelRequests",
";",
"if",
"(",
"$",
"... | Creates a static parent canceller callback that is not bound to a promise instance.
Moving the closure creation to a static method allows us to create a
callback that is not bound to a promise instance. By passing the target
promise instance by reference, we can still execute its cancellation logic
and still clear thi... | [
"Creates",
"a",
"static",
"parent",
"canceller",
"callback",
"that",
"is",
"not",
"bound",
"to",
"a",
"promise",
"instance",
"."
] | 9a16b9ca95eeafd3ebcc0a1e8e76ad958c48bac1 | https://github.com/digit-soft/re-action-promise/blob/9a16b9ca95eeafd3ebcc0a1e8e76ad958c48bac1/src/Promise.php#L334-L345 |
12,429 | digit-soft/re-action-promise | src/Promise.php | Promise.rejectFunction | protected static function rejectFunction(self &$target)
{
return function ($reason = null) use (&$target) {
if ($target !== null) {
$target->reject($reason);
$target = null;
}
};
} | php | protected static function rejectFunction(self &$target)
{
return function ($reason = null) use (&$target) {
if ($target !== null) {
$target->reject($reason);
$target = null;
}
};
} | [
"protected",
"static",
"function",
"rejectFunction",
"(",
"self",
"&",
"$",
"target",
")",
"{",
"return",
"function",
"(",
"$",
"reason",
"=",
"null",
")",
"use",
"(",
"&",
"$",
"target",
")",
"{",
"if",
"(",
"$",
"target",
"!==",
"null",
")",
"{",
... | Creates a static rejection callback that is not bound to a promise instance.
Moving the closure creation to a static method allows us to create a
callback that is not bound to a promise instance. By passing the target
promise instance by reference, we can still execute its rejection logic
and still clear this referenc... | [
"Creates",
"a",
"static",
"rejection",
"callback",
"that",
"is",
"not",
"bound",
"to",
"a",
"promise",
"instance",
"."
] | 9a16b9ca95eeafd3ebcc0a1e8e76ad958c48bac1 | https://github.com/digit-soft/re-action-promise/blob/9a16b9ca95eeafd3ebcc0a1e8e76ad958c48bac1/src/Promise.php#L387-L395 |
12,430 | digit-soft/re-action-promise | src/Promise.php | Promise.notifyFunction | protected static function notifyFunction(&$progressHandlers)
{
return function ($update = null) use (&$progressHandlers) {
foreach ($progressHandlers as $handler) {
$handler($update);
}
};
} | php | protected static function notifyFunction(&$progressHandlers)
{
return function ($update = null) use (&$progressHandlers) {
foreach ($progressHandlers as $handler) {
$handler($update);
}
};
} | [
"protected",
"static",
"function",
"notifyFunction",
"(",
"&",
"$",
"progressHandlers",
")",
"{",
"return",
"function",
"(",
"$",
"update",
"=",
"null",
")",
"use",
"(",
"&",
"$",
"progressHandlers",
")",
"{",
"foreach",
"(",
"$",
"progressHandlers",
"as",
... | Creates a static progress callback that is not bound to a promise instance.
Moving the closure creation to a static method allows us to create a
callback that is not bound to a promise instance. By passing its progress
handlers by reference, we can still execute them when requested and still
clear this reference when ... | [
"Creates",
"a",
"static",
"progress",
"callback",
"that",
"is",
"not",
"bound",
"to",
"a",
"promise",
"instance",
"."
] | 9a16b9ca95eeafd3ebcc0a1e8e76ad958c48bac1 | https://github.com/digit-soft/re-action-promise/blob/9a16b9ca95eeafd3ebcc0a1e8e76ad958c48bac1/src/Promise.php#L412-L419 |
12,431 | sgtlambda/fieldwork | src/fieldwork/components/SelectBox.php | SelectBox.setSelect2Options | private function setSelect2Options ($select2options)
{
foreach ($select2options as $key => $option)
$this->select2options[$key] = $option;
return $this;
} | php | private function setSelect2Options ($select2options)
{
foreach ($select2options as $key => $option)
$this->select2options[$key] = $option;
return $this;
} | [
"private",
"function",
"setSelect2Options",
"(",
"$",
"select2options",
")",
"{",
"foreach",
"(",
"$",
"select2options",
"as",
"$",
"key",
"=>",
"$",
"option",
")",
"$",
"this",
"->",
"select2options",
"[",
"$",
"key",
"]",
"=",
"$",
"option",
";",
"retu... | Merges the options
@param array $select2options
@return $this | [
"Merges",
"the",
"options"
] | ba18939c9822db4dc84947d90979cfb0da072cb0 | https://github.com/sgtlambda/fieldwork/blob/ba18939c9822db4dc84947d90979cfb0da072cb0/src/fieldwork/components/SelectBox.php#L132-L137 |
12,432 | sgtlambda/fieldwork | src/fieldwork/components/SelectBox.php | SelectBox.setPlaceholder | public function setPlaceholder ($placeholder = null)
{
if ($placeholder === false)
$this->usePlaceholder = false;
else {
$this->setSelect2Options(array(
self::SELECT2_OPTION_PLACEHOLDER => $placeholder === null ? $this->label : $placeholder
));
... | php | public function setPlaceholder ($placeholder = null)
{
if ($placeholder === false)
$this->usePlaceholder = false;
else {
$this->setSelect2Options(array(
self::SELECT2_OPTION_PLACEHOLDER => $placeholder === null ? $this->label : $placeholder
));
... | [
"public",
"function",
"setPlaceholder",
"(",
"$",
"placeholder",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"placeholder",
"===",
"false",
")",
"$",
"this",
"->",
"usePlaceholder",
"=",
"false",
";",
"else",
"{",
"$",
"this",
"->",
"setSelect2Options",
"(",
... | Determines the placeholder behaviour. Set to FALSE if the first option should be selected on default. Set to
NULL if the label should be used. Otherwise specify a placeholder.
@param null|boolean|string $placeholder
@return $this | [
"Determines",
"the",
"placeholder",
"behaviour",
".",
"Set",
"to",
"FALSE",
"if",
"the",
"first",
"option",
"should",
"be",
"selected",
"on",
"default",
".",
"Set",
"to",
"NULL",
"if",
"the",
"label",
"should",
"be",
"used",
".",
"Otherwise",
"specify",
"a... | ba18939c9822db4dc84947d90979cfb0da072cb0 | https://github.com/sgtlambda/fieldwork/blob/ba18939c9822db4dc84947d90979cfb0da072cb0/src/fieldwork/components/SelectBox.php#L147-L158 |
12,433 | sgtlambda/fieldwork | src/fieldwork/components/SelectBox.php | SelectBox.isSelected | protected function isSelected ($v)
{
return $this->value === $v || (is_array($this->value) && in_array($v, $this->value));
} | php | protected function isSelected ($v)
{
return $this->value === $v || (is_array($this->value) && in_array($v, $this->value));
} | [
"protected",
"function",
"isSelected",
"(",
"$",
"v",
")",
"{",
"return",
"$",
"this",
"->",
"value",
"===",
"$",
"v",
"||",
"(",
"is_array",
"(",
"$",
"this",
"->",
"value",
")",
"&&",
"in_array",
"(",
"$",
"v",
",",
"$",
"this",
"->",
"value",
... | Determines whether the given value is currently selected
@param $v
@return bool | [
"Determines",
"whether",
"the",
"given",
"value",
"is",
"currently",
"selected"
] | ba18939c9822db4dc84947d90979cfb0da072cb0 | https://github.com/sgtlambda/fieldwork/blob/ba18939c9822db4dc84947d90979cfb0da072cb0/src/fieldwork/components/SelectBox.php#L215-L218 |
12,434 | emaphp/eMapper | lib/eMapper/Fluent/Query/FluentSelect.php | FluentSelect.orderBy | public function orderBy($orderBy = null) {
if (is_array($orderBy))
$this->orderByClause = $orderBy;
else
$this->orderByClause = func_get_args();
return $this;
} | php | public function orderBy($orderBy = null) {
if (is_array($orderBy))
$this->orderByClause = $orderBy;
else
$this->orderByClause = func_get_args();
return $this;
} | [
"public",
"function",
"orderBy",
"(",
"$",
"orderBy",
"=",
"null",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"orderBy",
")",
")",
"$",
"this",
"->",
"orderByClause",
"=",
"$",
"orderBy",
";",
"else",
"$",
"this",
"->",
"orderByClause",
"=",
"func_get_... | Sets order by clauses
@return \eMapper\Fluent\Query\FluentSelect | [
"Sets",
"order",
"by",
"clauses"
] | df7100e601d2a1363d07028a786b6ceb22271829 | https://github.com/emaphp/eMapper/blob/df7100e601d2a1363d07028a786b6ceb22271829/lib/eMapper/Fluent/Query/FluentSelect.php#L93-L99 |
12,435 | emaphp/eMapper | lib/eMapper/Fluent/Query/FluentSelect.php | FluentSelect.groupBy | public function groupBy($groupBy) {
if (is_array($groupBy))
$this->groupByClause = $groupBy;
else
$this->groupByClause = func_get_args();
return $this;
} | php | public function groupBy($groupBy) {
if (is_array($groupBy))
$this->groupByClause = $groupBy;
else
$this->groupByClause = func_get_args();
return $this;
} | [
"public",
"function",
"groupBy",
"(",
"$",
"groupBy",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"groupBy",
")",
")",
"$",
"this",
"->",
"groupByClause",
"=",
"$",
"groupBy",
";",
"else",
"$",
"this",
"->",
"groupByClause",
"=",
"func_get_args",
"(",
"... | Sets group by clauses
@return \eMapper\Fluent\Query\FluentSelect | [
"Sets",
"group",
"by",
"clauses"
] | df7100e601d2a1363d07028a786b6ceb22271829 | https://github.com/emaphp/eMapper/blob/df7100e601d2a1363d07028a786b6ceb22271829/lib/eMapper/Fluent/Query/FluentSelect.php#L125-L131 |
12,436 | emaphp/eMapper | lib/eMapper/Fluent/Query/FluentSelect.php | FluentSelect.fetch | public function fetch($mappingType = null) {
list($query, $args) = $this->build();
//generate a mapper instance
if (is_null($mappingType))
$mapper = empty($this->config) ? $this->fluent->getMapper() : $this->fluent->getMapper()->merge($this->config);
else {
$config = empty($this->config) ? ['map.type' =>... | php | public function fetch($mappingType = null) {
list($query, $args) = $this->build();
//generate a mapper instance
if (is_null($mappingType))
$mapper = empty($this->config) ? $this->fluent->getMapper() : $this->fluent->getMapper()->merge($this->config);
else {
$config = empty($this->config) ? ['map.type' =>... | [
"public",
"function",
"fetch",
"(",
"$",
"mappingType",
"=",
"null",
")",
"{",
"list",
"(",
"$",
"query",
",",
"$",
"args",
")",
"=",
"$",
"this",
"->",
"build",
"(",
")",
";",
"//generate a mapper instance",
"if",
"(",
"is_null",
"(",
"$",
"mappingTyp... | Fetchs the current query with an optional mapping type
@param string $mappingType
@return mixed | [
"Fetchs",
"the",
"current",
"query",
"with",
"an",
"optional",
"mapping",
"type"
] | df7100e601d2a1363d07028a786b6ceb22271829 | https://github.com/emaphp/eMapper/blob/df7100e601d2a1363d07028a786b6ceb22271829/lib/eMapper/Fluent/Query/FluentSelect.php#L254-L266 |
12,437 | atelierspierrot/library | src/Library/HttpFundamental/Cookie.php | Cookie.exists | public function exists($cookie_name = null)
{
if (!empty($cookie_name)) {
$this->setName($cookie_name);
}
return isset($_COOKIE[$this->getName()]);
} | php | public function exists($cookie_name = null)
{
if (!empty($cookie_name)) {
$this->setName($cookie_name);
}
return isset($_COOKIE[$this->getName()]);
} | [
"public",
"function",
"exists",
"(",
"$",
"cookie_name",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"empty",
"(",
"$",
"cookie_name",
")",
")",
"{",
"$",
"this",
"->",
"setName",
"(",
"$",
"cookie_name",
")",
";",
"}",
"return",
"isset",
"(",
"$",
"_CO... | Test if a cookie exists
@param string $cookie_name
@return bool | [
"Test",
"if",
"a",
"cookie",
"exists"
] | a2988a11370d13c7e0dc47f9d2d81c664c30b8dd | https://github.com/atelierspierrot/library/blob/a2988a11370d13c7e0dc47f9d2d81c664c30b8dd/src/Library/HttpFundamental/Cookie.php#L441-L447 |
12,438 | atelierspierrot/library | src/Library/HttpFundamental/Cookie.php | Cookie.read | public function read($cookie_name = null)
{
if (!empty($cookie_name)) {
$this->setName($cookie_name);
}
$val = isset($_COOKIE[$this->getName()]) ? $_COOKIE[$this->getName()] : null;
if ($val && is_string($val) && ($this->getFlag() & self::FLATNESS_ARRAY)) {
pa... | php | public function read($cookie_name = null)
{
if (!empty($cookie_name)) {
$this->setName($cookie_name);
}
$val = isset($_COOKIE[$this->getName()]) ? $_COOKIE[$this->getName()] : null;
if ($val && is_string($val) && ($this->getFlag() & self::FLATNESS_ARRAY)) {
pa... | [
"public",
"function",
"read",
"(",
"$",
"cookie_name",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"empty",
"(",
"$",
"cookie_name",
")",
")",
"{",
"$",
"this",
"->",
"setName",
"(",
"$",
"cookie_name",
")",
";",
"}",
"$",
"val",
"=",
"isset",
"(",
"$... | Get a cookie value
@param string $cookie_name
@return string|array | [
"Get",
"a",
"cookie",
"value"
] | a2988a11370d13c7e0dc47f9d2d81c664c30b8dd | https://github.com/atelierspierrot/library/blob/a2988a11370d13c7e0dc47f9d2d81c664c30b8dd/src/Library/HttpFundamental/Cookie.php#L455-L469 |
12,439 | atelierspierrot/library | src/Library/HttpFundamental/Cookie.php | Cookie.addInCookie | public function addInCookie($variable_name, $variable_value, $cookie_name = null)
{
if (!empty($cookie_name)) {
$this->setName($cookie_name);
}
if (!empty($variable_value)) {
$this->setValue($variable_value);
}
return $this
->setName($this-... | php | public function addInCookie($variable_name, $variable_value, $cookie_name = null)
{
if (!empty($cookie_name)) {
$this->setName($cookie_name);
}
if (!empty($variable_value)) {
$this->setValue($variable_value);
}
return $this
->setName($this-... | [
"public",
"function",
"addInCookie",
"(",
"$",
"variable_name",
",",
"$",
"variable_value",
",",
"$",
"cookie_name",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"empty",
"(",
"$",
"cookie_name",
")",
")",
"{",
"$",
"this",
"->",
"setName",
"(",
"$",
"cookie... | Add a variable value in a cookie
@param string $variable_name
@param string $variable_value
@param string $cookie_name
@return bool | [
"Add",
"a",
"variable",
"value",
"in",
"a",
"cookie"
] | a2988a11370d13c7e0dc47f9d2d81c664c30b8dd | https://github.com/atelierspierrot/library/blob/a2988a11370d13c7e0dc47f9d2d81c664c30b8dd/src/Library/HttpFundamental/Cookie.php#L509-L520 |
12,440 | atelierspierrot/library | src/Library/HttpFundamental/Cookie.php | Cookie.clear | public function clear($cookie_name = null)
{
if (!empty($cookie_name)) {
$this->setName($cookie_name);
}
return $this
->setValue(null)
->setExpire(-1000)
->send()
;
} | php | public function clear($cookie_name = null)
{
if (!empty($cookie_name)) {
$this->setName($cookie_name);
}
return $this
->setValue(null)
->setExpire(-1000)
->send()
;
} | [
"public",
"function",
"clear",
"(",
"$",
"cookie_name",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"empty",
"(",
"$",
"cookie_name",
")",
")",
"{",
"$",
"this",
"->",
"setName",
"(",
"$",
"cookie_name",
")",
";",
"}",
"return",
"$",
"this",
"->",
"setV... | Clear a cookie
@param string $cookie_name
@return bool | [
"Clear",
"a",
"cookie"
] | a2988a11370d13c7e0dc47f9d2d81c664c30b8dd | https://github.com/atelierspierrot/library/blob/a2988a11370d13c7e0dc47f9d2d81c664c30b8dd/src/Library/HttpFundamental/Cookie.php#L528-L538 |
12,441 | oroinc/OroChainProcessorComponent | ExpressionParser.php | ExpressionParser.parse | public static function parse($value)
{
if (\is_string($value)) {
$operator = null;
if (\strpos($value, AbstractMatcher::OPERATOR_AND)) {
$operator = AbstractMatcher::OPERATOR_AND;
$value = \explode(AbstractMatcher::OPERATOR_AND, $value);
} ... | php | public static function parse($value)
{
if (\is_string($value)) {
$operator = null;
if (\strpos($value, AbstractMatcher::OPERATOR_AND)) {
$operator = AbstractMatcher::OPERATOR_AND;
$value = \explode(AbstractMatcher::OPERATOR_AND, $value);
} ... | [
"public",
"static",
"function",
"parse",
"(",
"$",
"value",
")",
"{",
"if",
"(",
"\\",
"is_string",
"(",
"$",
"value",
")",
")",
"{",
"$",
"operator",
"=",
"null",
";",
"if",
"(",
"\\",
"strpos",
"(",
"$",
"value",
",",
"AbstractMatcher",
"::",
"OP... | Checks if the given expression is a string and if so, parses it and returns an array
contains the parsed expression that is ready to be used in matchers.
@param mixed $value
@return mixed | [
"Checks",
"if",
"the",
"given",
"expression",
"is",
"a",
"string",
"and",
"if",
"so",
"parses",
"it",
"and",
"returns",
"an",
"array",
"contains",
"the",
"parsed",
"expression",
"that",
"is",
"ready",
"to",
"be",
"used",
"in",
"matchers",
"."
] | 89c9bc60140292c9367a0c3178f760ecbcec6bd2 | https://github.com/oroinc/OroChainProcessorComponent/blob/89c9bc60140292c9367a0c3178f760ecbcec6bd2/ExpressionParser.php#L20-L48 |
12,442 | GrupaZero/core | database/migrations/2014_11_16_114113_create_options.php | CreateOptions.seedOptions | private function seedOptions()
{
// gzero config options
$options = [
'general' => [
'site_name' => [],
'site_desc' => [],
'default_page_size' => [],
'cookies_policy_url' => [],
],
... | php | private function seedOptions()
{
// gzero config options
$options = [
'general' => [
'site_name' => [],
'site_desc' => [],
'default_page_size' => [],
'cookies_policy_url' => [],
],
... | [
"private",
"function",
"seedOptions",
"(",
")",
"{",
"// gzero config options",
"$",
"options",
"=",
"[",
"'general'",
"=>",
"[",
"'site_name'",
"=>",
"[",
"]",
",",
"'site_desc'",
"=>",
"[",
"]",
",",
"'default_page_size'",
"=>",
"[",
"]",
",",
"'cookies_po... | Seed options from gzero config to 'main' category
@return void | [
"Seed",
"options",
"from",
"gzero",
"config",
"to",
"main",
"category"
] | 093e515234fa0385b259ba4d8bc7832174a44eab | https://github.com/GrupaZero/core/blob/093e515234fa0385b259ba4d8bc7832174a44eab/database/migrations/2014_11_16_114113_create_options.php#L59-L99 |
12,443 | GrupaZero/core | database/migrations/2014_11_16_114113_create_options.php | CreateOptions.getDefaultValueForGeneral | private function getDefaultValueForGeneral($key)
{
switch ($key) {
case 'site_name':
$value = config('app.name');
break;
case 'site_desc':
$value = "GZERO-CMS Content management system.";
break;
default:
... | php | private function getDefaultValueForGeneral($key)
{
switch ($key) {
case 'site_name':
$value = config('app.name');
break;
case 'site_desc':
$value = "GZERO-CMS Content management system.";
break;
default:
... | [
"private",
"function",
"getDefaultValueForGeneral",
"(",
"$",
"key",
")",
"{",
"switch",
"(",
"$",
"key",
")",
"{",
"case",
"'site_name'",
":",
"$",
"value",
"=",
"config",
"(",
"'app.name'",
")",
";",
"break",
";",
"case",
"'site_desc'",
":",
"$",
"valu... | It generates default value for general options
@param $key
@return mixed|string | [
"It",
"generates",
"default",
"value",
"for",
"general",
"options"
] | 093e515234fa0385b259ba4d8bc7832174a44eab | https://github.com/GrupaZero/core/blob/093e515234fa0385b259ba4d8bc7832174a44eab/database/migrations/2014_11_16_114113_create_options.php#L108-L122 |
12,444 | nattreid/form | src/Control/LinkControl.php | LinkControl.link | public function link(?string $link = null): self
{
$this->control->href = $link;
return $this;
} | php | public function link(?string $link = null): self
{
$this->control->href = $link;
return $this;
} | [
"public",
"function",
"link",
"(",
"?",
"string",
"$",
"link",
"=",
"null",
")",
":",
"self",
"{",
"$",
"this",
"->",
"control",
"->",
"href",
"=",
"$",
"link",
";",
"return",
"$",
"this",
";",
"}"
] | Ulozi link odkazu
@param string $link
@return self | [
"Ulozi",
"link",
"odkazu"
] | d8b447f77e2374832e4c52520767847497a2033e | https://github.com/nattreid/form/blob/d8b447f77e2374832e4c52520767847497a2033e/src/Control/LinkControl.php#L34-L38 |
12,445 | monolyth-php/cesession | src/Handler/Memcached.php | Memcached.getKey | private function getKey(string $id = null) : string
{
$id = $id ?: session_id();
return sprintf('%s/session/%s', session_name(), $id);
} | php | private function getKey(string $id = null) : string
{
$id = $id ?: session_id();
return sprintf('%s/session/%s', session_name(), $id);
} | [
"private",
"function",
"getKey",
"(",
"string",
"$",
"id",
"=",
"null",
")",
":",
"string",
"{",
"$",
"id",
"=",
"$",
"id",
"?",
":",
"session_id",
"(",
")",
";",
"return",
"sprintf",
"(",
"'%s/session/%s'",
",",
"session_name",
"(",
")",
",",
"$",
... | Helper to get a formatted key for memcached based on a session ID.
@param string $id Session ID, defaults to `session_id()`.
@return string | [
"Helper",
"to",
"get",
"a",
"formatted",
"key",
"for",
"memcached",
"based",
"on",
"a",
"session",
"ID",
"."
] | 4b1660396dab801177d34271154f7f6d286de6fa | https://github.com/monolyth-php/cesession/blob/4b1660396dab801177d34271154f7f6d286de6fa/src/Handler/Memcached.php#L29-L33 |
12,446 | asbsoft/yii2module-users_0_170112 | controllers/MainController.php | MainController.actionSignup | public function actionSignup($defaultUrl = null)
{
$user = $this->module->model('User');
$configProfileForm = [
'user' => $user,
'scenario' => ProfileForm::SCENARIO_CREATE,
'captchaActionUid' => $this->uniqueId . '/' . static::$captchaActionId,
];
... | php | public function actionSignup($defaultUrl = null)
{
$user = $this->module->model('User');
$configProfileForm = [
'user' => $user,
'scenario' => ProfileForm::SCENARIO_CREATE,
'captchaActionUid' => $this->uniqueId . '/' . static::$captchaActionId,
];
... | [
"public",
"function",
"actionSignup",
"(",
"$",
"defaultUrl",
"=",
"null",
")",
"{",
"$",
"user",
"=",
"$",
"this",
"->",
"module",
"->",
"model",
"(",
"'User'",
")",
";",
"$",
"configProfileForm",
"=",
"[",
"'user'",
"=>",
"$",
"user",
",",
"'scenario... | Create user's profile.
@param string|array $defaultUrl return URL after signup
@return mixed | [
"Create",
"user",
"s",
"profile",
"."
] | 3906fdde2d5fdd54637f2b5246d52fe91ec5f648 | https://github.com/asbsoft/yii2module-users_0_170112/blob/3906fdde2d5fdd54637f2b5246d52fe91ec5f648/controllers/MainController.php#L191-L214 |
12,447 | asbsoft/yii2module-users_0_170112 | controllers/MainController.php | MainController.actionConfirm | public function actionConfirm($token)
{
$user = $this->module->model('User');
$user = $this->findModel([
'auth_key' => $token,
'status' => $user::STATUS_REGISTERED,
]);
if (empty($user)) {
Yii::$app->session->setFlash('error',
Yii:... | php | public function actionConfirm($token)
{
$user = $this->module->model('User');
$user = $this->findModel([
'auth_key' => $token,
'status' => $user::STATUS_REGISTERED,
]);
if (empty($user)) {
Yii::$app->session->setFlash('error',
Yii:... | [
"public",
"function",
"actionConfirm",
"(",
"$",
"token",
")",
"{",
"$",
"user",
"=",
"$",
"this",
"->",
"module",
"->",
"model",
"(",
"'User'",
")",
";",
"$",
"user",
"=",
"$",
"this",
"->",
"findModel",
"(",
"[",
"'auth_key'",
"=>",
"$",
"token",
... | Confirm registration by click on link in email. | [
"Confirm",
"registration",
"by",
"click",
"on",
"link",
"in",
"email",
"."
] | 3906fdde2d5fdd54637f2b5246d52fe91ec5f648 | https://github.com/asbsoft/yii2module-users_0_170112/blob/3906fdde2d5fdd54637f2b5246d52fe91ec5f648/controllers/MainController.php#L270-L311 |
12,448 | jaeger-app/email | src/Email.php | Email.setViewOptions | public function setViewOptions($template, array $view_data = array())
{
$this->view_options = $view_data;
$this->view_template = $template;
return $this;
} | php | public function setViewOptions($template, array $view_data = array())
{
$this->view_options = $view_data;
$this->view_template = $template;
return $this;
} | [
"public",
"function",
"setViewOptions",
"(",
"$",
"template",
",",
"array",
"$",
"view_data",
"=",
"array",
"(",
")",
")",
"{",
"$",
"this",
"->",
"view_options",
"=",
"$",
"view_data",
";",
"$",
"this",
"->",
"view_template",
"=",
"$",
"template",
";",
... | Compiles the options to use for the view
@param string $template
@param array $view_data
@return \JaegerApp\Email | [
"Compiles",
"the",
"options",
"to",
"use",
"for",
"the",
"view"
] | 0ab7535e578b2112a929816e39afb6118eaca669 | https://github.com/jaeger-app/email/blob/0ab7535e578b2112a929816e39afb6118eaca669/src/Email.php#L199-L204 |
12,449 | jaeger-app/email | src/Email.php | Email.getMailer | public function getMailer()
{
if (is_null($this->mailer)) {
if(class_exists('\Swift'))
{
if(version_compare(\Swift::VERSION, 4, '<=') && version_compare(\Swift::VERSION, 3, '>='))
{
$mailer = new Email\Swift3($this->config);
... | php | public function getMailer()
{
if (is_null($this->mailer)) {
if(class_exists('\Swift'))
{
if(version_compare(\Swift::VERSION, 4, '<=') && version_compare(\Swift::VERSION, 3, '>='))
{
$mailer = new Email\Swift3($this->config);
... | [
"public",
"function",
"getMailer",
"(",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"this",
"->",
"mailer",
")",
")",
"{",
"if",
"(",
"class_exists",
"(",
"'\\Swift'",
")",
")",
"{",
"if",
"(",
"version_compare",
"(",
"\\",
"Swift",
"::",
"VERSION",
",... | Returns an instance of the mail object
@return Email\SwiftAbstract | [
"Returns",
"an",
"instance",
"of",
"the",
"mail",
"object"
] | 0ab7535e578b2112a929816e39afb6118eaca669 | https://github.com/jaeger-app/email/blob/0ab7535e578b2112a929816e39afb6118eaca669/src/Email.php#L342-L363 |
12,450 | jaeger-app/email | src/Email.php | Email.clear | public function clear()
{
$this->mailer = null;
$this->to = $this->attachemnts = array();
$this->subject = $this->message = false;
return $this;
} | php | public function clear()
{
$this->mailer = null;
$this->to = $this->attachemnts = array();
$this->subject = $this->message = false;
return $this;
} | [
"public",
"function",
"clear",
"(",
")",
"{",
"$",
"this",
"->",
"mailer",
"=",
"null",
";",
"$",
"this",
"->",
"to",
"=",
"$",
"this",
"->",
"attachemnts",
"=",
"array",
"(",
")",
";",
"$",
"this",
"->",
"subject",
"=",
"$",
"this",
"->",
"messa... | Resets the email object
@return \JaegerApp\Email | [
"Resets",
"the",
"email",
"object"
] | 0ab7535e578b2112a929816e39afb6118eaca669 | https://github.com/jaeger-app/email/blob/0ab7535e578b2112a929816e39afb6118eaca669/src/Email.php#L370-L376 |
12,451 | jaeger-app/email | src/Email.php | Email.send | public function send(array $vars = array())
{
if (count($this->getTo()) == 0) {
throw new \InvalidArgumentException('A "To" email address is requried');
}
if ($this->getSubject() == '') {
throw new \InvalidArgumentException('A subject for the email must be se... | php | public function send(array $vars = array())
{
if (count($this->getTo()) == 0) {
throw new \InvalidArgumentException('A "To" email address is requried');
}
if ($this->getSubject() == '') {
throw new \InvalidArgumentException('A subject for the email must be se... | [
"public",
"function",
"send",
"(",
"array",
"$",
"vars",
"=",
"array",
"(",
")",
")",
"{",
"if",
"(",
"count",
"(",
"$",
"this",
"->",
"getTo",
"(",
")",
")",
"==",
"0",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'A \"To\" emai... | Sends the email
@param array $vars
@throws \InvalidArgumentException
@throws \InvalidArgumentException
@throws EmailException | [
"Sends",
"the",
"email"
] | 0ab7535e578b2112a929816e39afb6118eaca669 | https://github.com/jaeger-app/email/blob/0ab7535e578b2112a929816e39afb6118eaca669/src/Email.php#L386-L421 |
12,452 | ehough/shortstop | src/main/php/ehough/shortstop/impl/exec/command/StreamsCommand.php | ehough_shortstop_impl_exec_command_StreamsCommand.canHandle | public function canHandle(ehough_shortstop_api_HttpRequest $request)
{
$scheme = $request->getUrl()->getScheme();
return preg_match_all('/https?/', $scheme, $matches) === 1;
} | php | public function canHandle(ehough_shortstop_api_HttpRequest $request)
{
$scheme = $request->getUrl()->getScheme();
return preg_match_all('/https?/', $scheme, $matches) === 1;
} | [
"public",
"function",
"canHandle",
"(",
"ehough_shortstop_api_HttpRequest",
"$",
"request",
")",
"{",
"$",
"scheme",
"=",
"$",
"request",
"->",
"getUrl",
"(",
")",
"->",
"getScheme",
"(",
")",
";",
"return",
"preg_match_all",
"(",
"'/https?/'",
",",
"$",
"sc... | Determines if this transport can handle the given request.
@param ehough_shortstop_api_HttpRequest $request The request to handle.
@return bool True if this transport can handle the given request. False otherwise. | [
"Determines",
"if",
"this",
"transport",
"can",
"handle",
"the",
"given",
"request",
"."
] | 4cef21457741347546c70e8e5c0cef6d3162b257 | https://github.com/ehough/shortstop/blob/4cef21457741347546c70e8e5c0cef6d3162b257/src/main/php/ehough/shortstop/impl/exec/command/StreamsCommand.php#L229-L234 |
12,453 | sellerlabs/nucleus | src/SellerLabs/Nucleus/Control/Monad.php | Monad.fmap | public function fmap(callable $closure)
{
return $this->bind(function ($a) use ($closure) {
return $this->of($closure($a));
});
} | php | public function fmap(callable $closure)
{
return $this->bind(function ($a) use ($closure) {
return $this->of($closure($a));
});
} | [
"public",
"function",
"fmap",
"(",
"callable",
"$",
"closure",
")",
"{",
"return",
"$",
"this",
"->",
"bind",
"(",
"function",
"(",
"$",
"a",
")",
"use",
"(",
"$",
"closure",
")",
"{",
"return",
"$",
"this",
"->",
"of",
"(",
"$",
"closure",
"(",
... | Apply a function.
@param callable|Closure $closure
@return MonadInterface | [
"Apply",
"a",
"function",
"."
] | c05d9c23d424a6bd5ab2e29140805cc6e37e4623 | https://github.com/sellerlabs/nucleus/blob/c05d9c23d424a6bd5ab2e29140805cc6e37e4623/src/SellerLabs/Nucleus/Control/Monad.php#L45-L50 |
12,454 | jitesoft/php-math | src/Vector2D.php | Vector2D.set | public function set(float $x, float $y) {
$this->setX($x);
$this->setY($y);
} | php | public function set(float $x, float $y) {
$this->setX($x);
$this->setY($y);
} | [
"public",
"function",
"set",
"(",
"float",
"$",
"x",
",",
"float",
"$",
"y",
")",
"{",
"$",
"this",
"->",
"setX",
"(",
"$",
"x",
")",
";",
"$",
"this",
"->",
"setY",
"(",
"$",
"y",
")",
";",
"}"
] | Set the X and Y coordinate of the vector.
@param float $x X-Coordinate.
@param float $y Y-Coordinate. | [
"Set",
"the",
"X",
"and",
"Y",
"coordinate",
"of",
"the",
"vector",
"."
] | 1775055e5a14ef30c7df0deeb1fe1ff0775bb581 | https://github.com/jitesoft/php-math/blob/1775055e5a14ef30c7df0deeb1fe1ff0775bb581/src/Vector2D.php#L39-L42 |
12,455 | marando/phpSOFA | src/Marando/IAU/iauTaiutc.php | iauTaiutc.Taiutc | public static function Taiutc($tai1, $tai2, &$utc1, &$utc2) {
$big1;
$i;
$j;
$a1;
$a2;
$u1;
$u2;
$g1;
$g2;
/* Put the two parts of the TAI into big-first order. */
$big1 = ( $tai1 >= $tai2 );
if ($big1) {
$a1 = $tai1;
$a2 = $tai2;
}
else {
$a1 =... | php | public static function Taiutc($tai1, $tai2, &$utc1, &$utc2) {
$big1;
$i;
$j;
$a1;
$a2;
$u1;
$u2;
$g1;
$g2;
/* Put the two parts of the TAI into big-first order. */
$big1 = ( $tai1 >= $tai2 );
if ($big1) {
$a1 = $tai1;
$a2 = $tai2;
}
else {
$a1 =... | [
"public",
"static",
"function",
"Taiutc",
"(",
"$",
"tai1",
",",
"$",
"tai2",
",",
"&",
"$",
"utc1",
",",
"&",
"$",
"utc2",
")",
"{",
"$",
"big1",
";",
"$",
"i",
";",
"$",
"j",
";",
"$",
"a1",
";",
"$",
"a2",
";",
"$",
"u1",
";",
"$",
"u2... | - - - - - - - - - -
i a u T a i u t c
- - - - - - - - - -
Time scale transformation: International Atomic Time, TAI, to
Coordinated Universal Time, UTC.
This function is part of the International Astronomical Union's
SOFA (Standards of Fundamental Astronomy) software collection.
Status: canonical.
Given:
tai1,tai... | [
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"i",
"a",
"u",
"T",
"a",
"i",
"u",
"t",
"c",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-"
] | 757fa49fe335ae1210eaa7735473fd4388b13f07 | https://github.com/marando/phpSOFA/blob/757fa49fe335ae1210eaa7735473fd4388b13f07/src/Marando/IAU/iauTaiutc.php#L73-L124 |
12,456 | kambo-1st/HttpMessage | src/Utils/UriValidator.php | UriValidator.validateQuery | public function validateQuery($query)
{
if (!is_string($query) && !method_exists($query, '__toString')) {
throw new InvalidArgumentException(
'Query must be a string'
);
}
if (strpos($query, '#') !== false) {
throw new InvalidArgumentExcep... | php | public function validateQuery($query)
{
if (!is_string($query) && !method_exists($query, '__toString')) {
throw new InvalidArgumentException(
'Query must be a string'
);
}
if (strpos($query, '#') !== false) {
throw new InvalidArgumentExcep... | [
"public",
"function",
"validateQuery",
"(",
"$",
"query",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"query",
")",
"&&",
"!",
"method_exists",
"(",
"$",
"query",
",",
"'__toString'",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"... | Validate query.
Path must NOT contain URI fragment. It can be object,
but then the class must implement __toString method.
@param string|object $query The query path
@return void
@throws InvalidArgumentException If the query is invalid. | [
"Validate",
"query",
"."
] | 38877b9d895f279fdd5bdf957d8f23f9808a940a | https://github.com/kambo-1st/HttpMessage/blob/38877b9d895f279fdd5bdf957d8f23f9808a940a/src/Utils/UriValidator.php#L71-L84 |
12,457 | mszewcz/php-light-framework | src/Validator/Specific/EmailAddress.php | EmailAddress.isReserved | private function isReserved(string $host): bool
{
$hosts = [$host];
if (!\preg_match('/^([0-9]{1,3}\.){3}[0-9]{1,3}$/', $host)) {
$tmp = \gethostbynamel($host);
$hosts = $tmp !== false ? $tmp : [];
}
$res = true;
$flags = FILTER_FLAG_IPV4 | FILTER_FLA... | php | private function isReserved(string $host): bool
{
$hosts = [$host];
if (!\preg_match('/^([0-9]{1,3}\.){3}[0-9]{1,3}$/', $host)) {
$tmp = \gethostbynamel($host);
$hosts = $tmp !== false ? $tmp : [];
}
$res = true;
$flags = FILTER_FLAG_IPV4 | FILTER_FLA... | [
"private",
"function",
"isReserved",
"(",
"string",
"$",
"host",
")",
":",
"bool",
"{",
"$",
"hosts",
"=",
"[",
"$",
"host",
"]",
";",
"if",
"(",
"!",
"\\",
"preg_match",
"(",
"'/^([0-9]{1,3}\\.){3}[0-9]{1,3}$/'",
",",
"$",
"host",
")",
")",
"{",
"$",
... | Checks whether host IP is private or reserved
@param string $host
@return bool | [
"Checks",
"whether",
"host",
"IP",
"is",
"private",
"or",
"reserved"
] | 4d3b46781c387202c2dfbdb8760151b3ae8ef49c | https://github.com/mszewcz/php-light-framework/blob/4d3b46781c387202c2dfbdb8760151b3ae8ef49c/src/Validator/Specific/EmailAddress.php#L47-L65 |
12,458 | mszewcz/php-light-framework | src/Validator/Specific/EmailAddress.php | EmailAddress.mxCheck | private function mxCheck(string $value = ''): bool
{
$mxHosts = [];
$weight = [];
if (@\getmxrr($value, $mxHosts, $weight) !== false) {
if (!empty($mxHosts) && !empty($weight)) {
$mxHosts = \array_combine($mxHosts, $weight);
}
\arsort($mxH... | php | private function mxCheck(string $value = ''): bool
{
$mxHosts = [];
$weight = [];
if (@\getmxrr($value, $mxHosts, $weight) !== false) {
if (!empty($mxHosts) && !empty($weight)) {
$mxHosts = \array_combine($mxHosts, $weight);
}
\arsort($mxH... | [
"private",
"function",
"mxCheck",
"(",
"string",
"$",
"value",
"=",
"''",
")",
":",
"bool",
"{",
"$",
"mxHosts",
"=",
"[",
"]",
";",
"$",
"weight",
"=",
"[",
"]",
";",
"if",
"(",
"@",
"\\",
"getmxrr",
"(",
"$",
"value",
",",
"$",
"mxHosts",
","... | Performs MX check
@param string $value
@return bool | [
"Performs",
"MX",
"check"
] | 4d3b46781c387202c2dfbdb8760151b3ae8ef49c | https://github.com/mszewcz/php-light-framework/blob/4d3b46781c387202c2dfbdb8760151b3ae8ef49c/src/Validator/Specific/EmailAddress.php#L73-L98 |
12,459 | mszewcz/php-light-framework | src/Validator/Specific/EmailAddress.php | EmailAddress.deepMxCheck | private function deepMxCheck(array $value = []): bool
{
$isValid = false;
foreach ($value as $host => $weight) {
$res = $this->isReserved($host);
if (!$res && (\checkdnsrr($host, 'A') || \checkdnsrr($host, 'AAAA') || \checkdnsrr($host, 'A6'))) {
$isValid = tru... | php | private function deepMxCheck(array $value = []): bool
{
$isValid = false;
foreach ($value as $host => $weight) {
$res = $this->isReserved($host);
if (!$res && (\checkdnsrr($host, 'A') || \checkdnsrr($host, 'AAAA') || \checkdnsrr($host, 'A6'))) {
$isValid = tru... | [
"private",
"function",
"deepMxCheck",
"(",
"array",
"$",
"value",
"=",
"[",
"]",
")",
":",
"bool",
"{",
"$",
"isValid",
"=",
"false",
";",
"foreach",
"(",
"$",
"value",
"as",
"$",
"host",
"=>",
"$",
"weight",
")",
"{",
"$",
"res",
"=",
"$",
"this... | Performs deep MX check
@param array $value
@return bool | [
"Performs",
"deep",
"MX",
"check"
] | 4d3b46781c387202c2dfbdb8760151b3ae8ef49c | https://github.com/mszewcz/php-light-framework/blob/4d3b46781c387202c2dfbdb8760151b3ae8ef49c/src/Validator/Specific/EmailAddress.php#L106-L117 |
12,460 | qi-interactive/matacms-rbac | components/DbManager.php | DbManager.deleteAllItemsByUser | public function deleteAllItemsByUser($userId)
{
if (empty($userId)) {
return [];
}
$command = \Yii::$app->getDb()->createCommand();
$command->delete($this->assignmentTable, 'user_id = :user_id', ['user_id' => $userId]);
return $command->execute();
} | php | public function deleteAllItemsByUser($userId)
{
if (empty($userId)) {
return [];
}
$command = \Yii::$app->getDb()->createCommand();
$command->delete($this->assignmentTable, 'user_id = :user_id', ['user_id' => $userId]);
return $command->execute();
} | [
"public",
"function",
"deleteAllItemsByUser",
"(",
"$",
"userId",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"userId",
")",
")",
"{",
"return",
"[",
"]",
";",
"}",
"$",
"command",
"=",
"\\",
"Yii",
"::",
"$",
"app",
"->",
"getDb",
"(",
")",
"->",
"c... | Deleted roles and permissions assigned to user.
@param integer $userId
@return array | [
"Deleted",
"roles",
"and",
"permissions",
"assigned",
"to",
"user",
"."
] | f273de201006a127b95c332e53f31de02c559130 | https://github.com/qi-interactive/matacms-rbac/blob/f273de201006a127b95c332e53f31de02c559130/components/DbManager.php#L102-L111 |
12,461 | neontabs-drupal8/nt8property | src/Batch/NT8PropertyBatch.php | NT8PropertyBatch.propertyBatchLoad | public static function propertyBatchLoad(int $batch_size = 8, int $modify_replace = 0) {
$batchSizeList = [
1 => 1,
2 => 2,
3 => 4,
4 => 8,
5 => 16,
6 => 32,
7 => 64,
8 => 128,
9 => 256,
];
// Get list of properties to reload.
$per_page = $batchSize... | php | public static function propertyBatchLoad(int $batch_size = 8, int $modify_replace = 0) {
$batchSizeList = [
1 => 1,
2 => 2,
3 => 4,
4 => 8,
5 => 16,
6 => 32,
7 => 64,
8 => 128,
9 => 256,
];
// Get list of properties to reload.
$per_page = $batchSize... | [
"public",
"static",
"function",
"propertyBatchLoad",
"(",
"int",
"$",
"batch_size",
"=",
"8",
",",
"int",
"$",
"modify_replace",
"=",
"0",
")",
"{",
"$",
"batchSizeList",
"=",
"[",
"1",
"=>",
"1",
",",
"2",
"=>",
"2",
",",
"3",
"=>",
"4",
",",
"4",... | Instantiates and handles a Drupal batch property load.
@param int $batch_size
The number of properties to request & process per search.
The batch size goes up in a 2 ^ n scale.
@param int $modify_replace
Modify the existing nodes or create new ones (deleting the current).
0 => Modify, 1 => Replace. | [
"Instantiates",
"and",
"handles",
"a",
"Drupal",
"batch",
"property",
"load",
"."
] | 53b630a612c6dc7c90a8ca1ce4ceb41568473447 | https://github.com/neontabs-drupal8/nt8property/blob/53b630a612c6dc7c90a8ca1ce4ceb41568473447/src/Batch/NT8PropertyBatch.php#L20-L77 |
12,462 | neontabs-drupal8/nt8property | src/Batch/NT8PropertyBatch.php | NT8PropertyBatch.propertyBatchLoadCallback | public static function propertyBatchLoadCallback($page_counter, $per_page, $search_instance_id, $modify_replace, &$context) {
$nt8restService = \Drupal::service('nt8tabsio.tabs_service');
$nt8PropertyMethods = \Drupal::service('nt8property.property_methods');
$pages = $per_page['pages'];
$pageSize = $p... | php | public static function propertyBatchLoadCallback($page_counter, $per_page, $search_instance_id, $modify_replace, &$context) {
$nt8restService = \Drupal::service('nt8tabsio.tabs_service');
$nt8PropertyMethods = \Drupal::service('nt8property.property_methods');
$pages = $per_page['pages'];
$pageSize = $p... | [
"public",
"static",
"function",
"propertyBatchLoadCallback",
"(",
"$",
"page_counter",
",",
"$",
"per_page",
",",
"$",
"search_instance_id",
",",
"$",
"modify_replace",
",",
"&",
"$",
"context",
")",
"{",
"$",
"nt8restService",
"=",
"\\",
"Drupal",
"::",
"serv... | Callback function for drupal property batch load progress.
@param $page_counter
@param $per_page
@param $search_instance_id
@param $modify_replace
@param $context | [
"Callback",
"function",
"for",
"drupal",
"property",
"batch",
"load",
"progress",
"."
] | 53b630a612c6dc7c90a8ca1ce4ceb41568473447 | https://github.com/neontabs-drupal8/nt8property/blob/53b630a612c6dc7c90a8ca1ce4ceb41568473447/src/Batch/NT8PropertyBatch.php#L89-L130 |
12,463 | neontabs-drupal8/nt8property | src/Batch/NT8PropertyBatch.php | NT8PropertyBatch.propertyBatchLoadFinishedCallback | public static function propertyBatchLoadFinishedCallback($success, $results, $operations) {
$updated_node_ids = implode(', ', $results['nodes_updated']);
$processed = $results['count_processed'];
drupal_set_message("Processed $processed nodes. And updated these: [$updated_node_ids] nodes.");
} | php | public static function propertyBatchLoadFinishedCallback($success, $results, $operations) {
$updated_node_ids = implode(', ', $results['nodes_updated']);
$processed = $results['count_processed'];
drupal_set_message("Processed $processed nodes. And updated these: [$updated_node_ids] nodes.");
} | [
"public",
"static",
"function",
"propertyBatchLoadFinishedCallback",
"(",
"$",
"success",
",",
"$",
"results",
",",
"$",
"operations",
")",
"{",
"$",
"updated_node_ids",
"=",
"implode",
"(",
"', '",
",",
"$",
"results",
"[",
"'nodes_updated'",
"]",
")",
";",
... | Callback which is fired once the Drupal batch job has finished.
@param $success
@param $results
@param $operations | [
"Callback",
"which",
"is",
"fired",
"once",
"the",
"Drupal",
"batch",
"job",
"has",
"finished",
"."
] | 53b630a612c6dc7c90a8ca1ce4ceb41568473447 | https://github.com/neontabs-drupal8/nt8property/blob/53b630a612c6dc7c90a8ca1ce4ceb41568473447/src/Batch/NT8PropertyBatch.php#L139-L145 |
12,464 | devsdmf/slice-http | src/Slice/Http/ResponseAbstract.php | ResponseAbstract.fromString | public static function fromString($response)
{
$code = self::extractCode($response);
$headers = self::extractHeaders($response);
$body = self::extractBody($response);
$version = self::extractVersion($response);
$message = self::extractMessage($response);
# FIX FOR MULTIPLE HTTP RESPONSE CODE RETURNE... | php | public static function fromString($response)
{
$code = self::extractCode($response);
$headers = self::extractHeaders($response);
$body = self::extractBody($response);
$version = self::extractVersion($response);
$message = self::extractMessage($response);
# FIX FOR MULTIPLE HTTP RESPONSE CODE RETURNE... | [
"public",
"static",
"function",
"fromString",
"(",
"$",
"response",
")",
"{",
"$",
"code",
"=",
"self",
"::",
"extractCode",
"(",
"$",
"response",
")",
";",
"$",
"headers",
"=",
"self",
"::",
"extractHeaders",
"(",
"$",
"response",
")",
";",
"$",
"body... | Create a new Response object from a string
@param string $response
@return \Slice\Http\AbstractResponse | [
"Create",
"a",
"new",
"Response",
"object",
"from",
"a",
"string"
] | 8ab12b42354ff092d88d29d265733186698cb829 | https://github.com/devsdmf/slice-http/blob/8ab12b42354ff092d88d29d265733186698cb829/src/Slice/Http/ResponseAbstract.php#L651-L665 |
12,465 | indigophp-archive/fuel-core | lib/Monolog/Handler/ConsoleHandler.php | ConsoleHandler.setColor | public function setColor($level, $foreground_color = 'white', $background_color = null)
{
if (array_key_exists($level, $this->levels))
{
$this->levels[$level][0] = $foreground_color;
$this->levels[$level][1] = $background_color;
}
return $this;
} | php | public function setColor($level, $foreground_color = 'white', $background_color = null)
{
if (array_key_exists($level, $this->levels))
{
$this->levels[$level][0] = $foreground_color;
$this->levels[$level][1] = $background_color;
}
return $this;
} | [
"public",
"function",
"setColor",
"(",
"$",
"level",
",",
"$",
"foreground_color",
"=",
"'white'",
",",
"$",
"background_color",
"=",
"null",
")",
"{",
"if",
"(",
"array_key_exists",
"(",
"$",
"level",
",",
"$",
"this",
"->",
"levels",
")",
")",
"{",
"... | Sets the colors for a level
@param integer $level
@param string $foreground_color
@param string|null $background_color
@return this | [
"Sets",
"the",
"colors",
"for",
"a",
"level"
] | 275462154fb7937f8e1c2c541b31d8e7c5760e39 | https://github.com/indigophp-archive/fuel-core/blob/275462154fb7937f8e1c2c541b31d8e7c5760e39/lib/Monolog/Handler/ConsoleHandler.php#L45-L54 |
12,466 | sgoendoer/sonic | src/Identity/EntityAuthData.php | EntityAuthData.getJWT | public function getJWT()
{
if($this->personalKeyPair === NULL)
throw new \Exception("JWT cannot be built without the personalKey");
// create and sign JWT
$signer = new Sha512();
$personalPrivateKey = PrivateKey::formatPEM($this->personalKeyPair->getPrivateKey());
$token = (new Builder(... | php | public function getJWT()
{
if($this->personalKeyPair === NULL)
throw new \Exception("JWT cannot be built without the personalKey");
// create and sign JWT
$signer = new Sha512();
$personalPrivateKey = PrivateKey::formatPEM($this->personalKeyPair->getPrivateKey());
$token = (new Builder(... | [
"public",
"function",
"getJWT",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"personalKeyPair",
"===",
"NULL",
")",
"throw",
"new",
"\\",
"Exception",
"(",
"\"JWT cannot be built without the personalKey\"",
")",
";",
"// create and sign JWT\r",
"$",
"signer",
"=",... | Creates a signed JWT to be pushed to the GSLS. If the personalKeyPair is not set, an exception is thrown
@return String The JWT | [
"Creates",
"a",
"signed",
"JWT",
"to",
"be",
"pushed",
"to",
"the",
"GSLS",
".",
"If",
"the",
"personalKeyPair",
"is",
"not",
"set",
"an",
"exception",
"is",
"thrown"
] | 2c32ebd78607dc3e8558f10a0b7bf881d37fc168 | https://github.com/sgoendoer/sonic/blob/2c32ebd78607dc3e8558f10a0b7bf881d37fc168/src/Identity/EntityAuthData.php#L119-L135 |
12,467 | thecmsthread/core-admin | src/Controller/User.php | User.redirect | public function redirect()
{
if (headers_sent() === false) {
header('X-PHP-Response-Code: 403', true, 403);
}
if (isset($_GET['template']) === false) {
return redirect($this->router->generate('login-page'));
} else {
return 'Redirect: ' . $this->ro... | php | public function redirect()
{
if (headers_sent() === false) {
header('X-PHP-Response-Code: 403', true, 403);
}
if (isset($_GET['template']) === false) {
return redirect($this->router->generate('login-page'));
} else {
return 'Redirect: ' . $this->ro... | [
"public",
"function",
"redirect",
"(",
")",
"{",
"if",
"(",
"headers_sent",
"(",
")",
"===",
"false",
")",
"{",
"header",
"(",
"'X-PHP-Response-Code: 403'",
",",
"true",
",",
"403",
")",
";",
"}",
"if",
"(",
"isset",
"(",
"$",
"_GET",
"[",
"'template'"... | Redirect to the login page | [
"Redirect",
"to",
"the",
"login",
"page"
] | 020595646e2dd521683e5352e6d9dbad420c06fb | https://github.com/thecmsthread/core-admin/blob/020595646e2dd521683e5352e6d9dbad420c06fb/src/Controller/User.php#L87-L97 |
12,468 | thecmsthread/core-admin | src/Controller/User.php | User.logout | public function logout()
{
$this->core->auth()->invalidate();
$this->router->map('GET', '/login', "Auth@showLogin", 'login-page');
return $this->redirect();
} | php | public function logout()
{
$this->core->auth()->invalidate();
$this->router->map('GET', '/login', "Auth@showLogin", 'login-page');
return $this->redirect();
} | [
"public",
"function",
"logout",
"(",
")",
"{",
"$",
"this",
"->",
"core",
"->",
"auth",
"(",
")",
"->",
"invalidate",
"(",
")",
";",
"$",
"this",
"->",
"router",
"->",
"map",
"(",
"'GET'",
",",
"'/login'",
",",
"\"Auth@showLogin\"",
",",
"'login-page'"... | Logout active page | [
"Logout",
"active",
"page"
] | 020595646e2dd521683e5352e6d9dbad420c06fb | https://github.com/thecmsthread/core-admin/blob/020595646e2dd521683e5352e6d9dbad420c06fb/src/Controller/User.php#L118-L123 |
12,469 | aedart/model | src/Traits/Strings/CardOwnerTrait.php | CardOwnerTrait.getCardOwner | public function getCardOwner() : ?string
{
if ( ! $this->hasCardOwner()) {
$this->setCardOwner($this->getDefaultCardOwner());
}
return $this->cardOwner;
} | php | public function getCardOwner() : ?string
{
if ( ! $this->hasCardOwner()) {
$this->setCardOwner($this->getDefaultCardOwner());
}
return $this->cardOwner;
} | [
"public",
"function",
"getCardOwner",
"(",
")",
":",
"?",
"string",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"hasCardOwner",
"(",
")",
")",
"{",
"$",
"this",
"->",
"setCardOwner",
"(",
"$",
"this",
"->",
"getDefaultCardOwner",
"(",
")",
")",
";",
"}",... | Get card owner
If no "card owner" value has been set, this method will
set and return a default "card owner" value,
if any such value is available
@see getDefaultCardOwner()
@return string|null card owner or null if no card owner has been set | [
"Get",
"card",
"owner"
] | 9a562c1c53a276d01ace0ab71f5305458bea542f | https://github.com/aedart/model/blob/9a562c1c53a276d01ace0ab71f5305458bea542f/src/Traits/Strings/CardOwnerTrait.php#L48-L54 |
12,470 | xloit/xloit-bridge-zend-authentication | src/Adapter/AdapterChain.php | AdapterChain.prependAdapter | public function prependAdapter(AdapterInterface $adapter)
{
$priority = self::DEFAULT_PRIORITY;
if (!$this->adapters->isEmpty()) {
$extractedNodes = $this->adapters->toArray(PriorityQueue::EXTR_PRIORITY);
rsort($extractedNodes, SORT_NUMERIC);
$priority = $extra... | php | public function prependAdapter(AdapterInterface $adapter)
{
$priority = self::DEFAULT_PRIORITY;
if (!$this->adapters->isEmpty()) {
$extractedNodes = $this->adapters->toArray(PriorityQueue::EXTR_PRIORITY);
rsort($extractedNodes, SORT_NUMERIC);
$priority = $extra... | [
"public",
"function",
"prependAdapter",
"(",
"AdapterInterface",
"$",
"adapter",
")",
"{",
"$",
"priority",
"=",
"self",
"::",
"DEFAULT_PRIORITY",
";",
"if",
"(",
"!",
"$",
"this",
"->",
"adapters",
"->",
"isEmpty",
"(",
")",
")",
"{",
"$",
"extractedNodes... | Adds a adapter to the beginning of the chain.
@param AdapterInterface $adapter
@return $this | [
"Adds",
"a",
"adapter",
"to",
"the",
"beginning",
"of",
"the",
"chain",
"."
] | 299c6ad8d5756c8db040b39a50ecfcc137c42b72 | https://github.com/xloit/xloit-bridge-zend-authentication/blob/299c6ad8d5756c8db040b39a50ecfcc137c42b72/src/Adapter/AdapterChain.php#L107-L122 |
12,471 | xloit/xloit-bridge-zend-authentication | src/Adapter/AdapterChain.php | AdapterChain.merge | public function merge(AdapterChain $adaptersChain)
{
$adapters = $adaptersChain->adapters->toArray(PriorityQueue::EXTR_BOTH);
foreach ($adapters as $item) {
$this->attach($item['data'], $item['priority']);
}
return $this;
} | php | public function merge(AdapterChain $adaptersChain)
{
$adapters = $adaptersChain->adapters->toArray(PriorityQueue::EXTR_BOTH);
foreach ($adapters as $item) {
$this->attach($item['data'], $item['priority']);
}
return $this;
} | [
"public",
"function",
"merge",
"(",
"AdapterChain",
"$",
"adaptersChain",
")",
"{",
"$",
"adapters",
"=",
"$",
"adaptersChain",
"->",
"adapters",
"->",
"toArray",
"(",
"PriorityQueue",
"::",
"EXTR_BOTH",
")",
";",
"foreach",
"(",
"$",
"adapters",
"as",
"$",
... | Merge the adapter chain with the one given in parameter.
@param AdapterChain $adaptersChain
@return $this | [
"Merge",
"the",
"adapter",
"chain",
"with",
"the",
"one",
"given",
"in",
"parameter",
"."
] | 299c6ad8d5756c8db040b39a50ecfcc137c42b72 | https://github.com/xloit/xloit-bridge-zend-authentication/blob/299c6ad8d5756c8db040b39a50ecfcc137c42b72/src/Adapter/AdapterChain.php#L131-L140 |
12,472 | xloit/xloit-bridge-zend-authentication | src/Adapter/AdapterChain.php | AdapterChain.attach | public function attach(AdapterInterface $adapter, $priority = self::DEFAULT_PRIORITY)
{
$this->adapters->insert($adapter, $priority);
return $this;
} | php | public function attach(AdapterInterface $adapter, $priority = self::DEFAULT_PRIORITY)
{
$this->adapters->insert($adapter, $priority);
return $this;
} | [
"public",
"function",
"attach",
"(",
"AdapterInterface",
"$",
"adapter",
",",
"$",
"priority",
"=",
"self",
"::",
"DEFAULT_PRIORITY",
")",
"{",
"$",
"this",
"->",
"adapters",
"->",
"insert",
"(",
"$",
"adapter",
",",
"$",
"priority",
")",
";",
"return",
... | Attach a adapter to the end of the chain.
@param AdapterInterface $adapter
@param int $priority Priority at which to enqueue adapter; defaults to 1 (higher executes earlier).
@return $this | [
"Attach",
"a",
"adapter",
"to",
"the",
"end",
"of",
"the",
"chain",
"."
] | 299c6ad8d5756c8db040b39a50ecfcc137c42b72 | https://github.com/xloit/xloit-bridge-zend-authentication/blob/299c6ad8d5756c8db040b39a50ecfcc137c42b72/src/Adapter/AdapterChain.php#L150-L155 |
12,473 | xloit/xloit-bridge-zend-authentication | src/Adapter/AdapterChain.php | AdapterChain.getMessages | public function getMessages()
{
$results = $this->getResults();
$messages = [];
foreach ($results as $result) {
/** @noinspection SlowArrayOperationsInLoopInspection */
$messages = array_replace_recursive($messages, $result->getMessages());
}
return... | php | public function getMessages()
{
$results = $this->getResults();
$messages = [];
foreach ($results as $result) {
/** @noinspection SlowArrayOperationsInLoopInspection */
$messages = array_replace_recursive($messages, $result->getMessages());
}
return... | [
"public",
"function",
"getMessages",
"(",
")",
"{",
"$",
"results",
"=",
"$",
"this",
"->",
"getResults",
"(",
")",
";",
"$",
"messages",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"results",
"as",
"$",
"result",
")",
"{",
"/** @noinspection SlowArrayOpera... | Returns array of validation failure messages.
@return array | [
"Returns",
"array",
"of",
"validation",
"failure",
"messages",
"."
] | 299c6ad8d5756c8db040b39a50ecfcc137c42b72 | https://github.com/xloit/xloit-bridge-zend-authentication/blob/299c6ad8d5756c8db040b39a50ecfcc137c42b72/src/Adapter/AdapterChain.php#L287-L298 |
12,474 | faustbrian/binary | src/Hex/Reader.php | Reader.low | public static function low(string $data, int $offset = 0, $nibble = null): string
{
return unpack($nibble ? "h{$nibble}" : 'h', $data, $offset)[1];
} | php | public static function low(string $data, int $offset = 0, $nibble = null): string
{
return unpack($nibble ? "h{$nibble}" : 'h', $data, $offset)[1];
} | [
"public",
"static",
"function",
"low",
"(",
"string",
"$",
"data",
",",
"int",
"$",
"offset",
"=",
"0",
",",
"$",
"nibble",
"=",
"null",
")",
":",
"string",
"{",
"return",
"unpack",
"(",
"$",
"nibble",
"?",
"\"h{$nibble}\"",
":",
"'h'",
",",
"$",
"... | Read a hex string with low nibble first.
@param string $data
@param int $offset
@param mixed $nibble
@return string | [
"Read",
"a",
"hex",
"string",
"with",
"low",
"nibble",
"first",
"."
] | 7d845497460c2dabf7e369ec8e55baf989ef74cb | https://github.com/faustbrian/binary/blob/7d845497460c2dabf7e369ec8e55baf989ef74cb/src/Hex/Reader.php#L32-L35 |
12,475 | faustbrian/binary | src/Hex/Reader.php | Reader.high | public static function high(string $data, int $offset = 0, $nibble = null): string
{
return unpack($nibble ? "H{$nibble}" : 'H', $data, $offset)[1];
} | php | public static function high(string $data, int $offset = 0, $nibble = null): string
{
return unpack($nibble ? "H{$nibble}" : 'H', $data, $offset)[1];
} | [
"public",
"static",
"function",
"high",
"(",
"string",
"$",
"data",
",",
"int",
"$",
"offset",
"=",
"0",
",",
"$",
"nibble",
"=",
"null",
")",
":",
"string",
"{",
"return",
"unpack",
"(",
"$",
"nibble",
"?",
"\"H{$nibble}\"",
":",
"'H'",
",",
"$",
... | Read a hex string with high nibble first.
@param string $data
@param int $offset
@param mixed $nibble
@return string | [
"Read",
"a",
"hex",
"string",
"with",
"high",
"nibble",
"first",
"."
] | 7d845497460c2dabf7e369ec8e55baf989ef74cb | https://github.com/faustbrian/binary/blob/7d845497460c2dabf7e369ec8e55baf989ef74cb/src/Hex/Reader.php#L46-L49 |
12,476 | alevilar/MtSites | Model/Site.php | Site.fromUser | public function fromUser ( $user_id ) {
$sites = $this->User->find('first', array(
'conditions' => array(
'User.id' => $user_id
),
'contain' => array(
'Site',
)
));
if (!empty( $sites['Site'] )) {
return $sites['Site'];
} else {
return null;
}
} | php | public function fromUser ( $user_id ) {
$sites = $this->User->find('first', array(
'conditions' => array(
'User.id' => $user_id
),
'contain' => array(
'Site',
)
));
if (!empty( $sites['Site'] )) {
return $sites['Site'];
} else {
return null;
}
} | [
"public",
"function",
"fromUser",
"(",
"$",
"user_id",
")",
"{",
"$",
"sites",
"=",
"$",
"this",
"->",
"User",
"->",
"find",
"(",
"'first'",
",",
"array",
"(",
"'conditions'",
"=>",
"array",
"(",
"'User.id'",
"=>",
"$",
"user_id",
")",
",",
"'contain'"... | Me devuelve todos los sitios del usuario
@param int $id UserId | [
"Me",
"devuelve",
"todos",
"los",
"sitios",
"del",
"usuario"
] | 5b1cdc52a929ca86a220ae12add84c52027a3c20 | https://github.com/alevilar/MtSites/blob/5b1cdc52a929ca86a220ae12add84c52027a3c20/Model/Site.php#L173-L189 |
12,477 | alevilar/MtSites | Model/Site.php | Site.buscarUsersComercio | public function buscarUsersComercio() {
$currentSiteAlias = MtSites::getSiteName();
$site = $this->find('first', array(
'contain' => array(
'User' => array('conditions' => array('is_admin' => 0))
),
'conditions' => array(
'Site.alias' => $currentSiteAlias
),
));
... | php | public function buscarUsersComercio() {
$currentSiteAlias = MtSites::getSiteName();
$site = $this->find('first', array(
'contain' => array(
'User' => array('conditions' => array('is_admin' => 0))
),
'conditions' => array(
'Site.alias' => $currentSiteAlias
),
));
... | [
"public",
"function",
"buscarUsersComercio",
"(",
")",
"{",
"$",
"currentSiteAlias",
"=",
"MtSites",
"::",
"getSiteName",
"(",
")",
";",
"$",
"site",
"=",
"$",
"this",
"->",
"find",
"(",
"'first'",
",",
"array",
"(",
"'contain'",
"=>",
"array",
"(",
"'Us... | Busca todos los usuarios del comercio
@return array de usuarios | [
"Busca",
"todos",
"los",
"usuarios",
"del",
"comercio"
] | 5b1cdc52a929ca86a220ae12add84c52027a3c20 | https://github.com/alevilar/MtSites/blob/5b1cdc52a929ca86a220ae12add84c52027a3c20/Model/Site.php#L207-L223 |
12,478 | simplecomplex/php-config | src/CliConfig.php | CliConfig.cmdListStores | protected function cmdListStores() /*: void*/
{
/**
* @see simplecomplex_cache_cli()
*/
$container = Dependency::container();
// Validate input. ---------------------------------------------
$match = '';
if (
!empty($this->command->arguments['mat... | php | protected function cmdListStores() /*: void*/
{
/**
* @see simplecomplex_cache_cli()
*/
$container = Dependency::container();
// Validate input. ---------------------------------------------
$match = '';
if (
!empty($this->command->arguments['mat... | [
"protected",
"function",
"cmdListStores",
"(",
")",
"/*: void*/",
"{",
"/**\n * @see simplecomplex_cache_cli()\n */",
"$",
"container",
"=",
"Dependency",
"::",
"container",
"(",
")",
";",
"// Validate input. ---------------------------------------------",
"$",
... | List all config stores.
A copy of CliCache, except for further check that the cache store name
starts with 'config.'.
@see \SimpleComplex\Cache\CliCache
@return mixed
Exits if no/falsy option 'get'. | [
"List",
"all",
"config",
"stores",
"."
] | 0d8450bc7523e8991452ef70f4f57f3d3e67f0d4 | https://github.com/simplecomplex/php-config/blob/0d8450bc7523e8991452ef70f4f57f3d3e67f0d4/src/CliConfig.php#L240-L303 |
12,479 | sgtlambda/jvwp | src/rwmb/RWMB.php | RWMB.addField | public function addField(Field $field)
{
if (array_search($field, $this->fields) === false)
$this->fields[] = $field;
} | php | public function addField(Field $field)
{
if (array_search($field, $this->fields) === false)
$this->fields[] = $field;
} | [
"public",
"function",
"addField",
"(",
"Field",
"$",
"field",
")",
"{",
"if",
"(",
"array_search",
"(",
"$",
"field",
",",
"$",
"this",
"->",
"fields",
")",
"===",
"false",
")",
"$",
"this",
"->",
"fields",
"[",
"]",
"=",
"$",
"field",
";",
"}"
] | Adds the field to the MetaBox, if not present
@param Field $field | [
"Adds",
"the",
"field",
"to",
"the",
"MetaBox",
"if",
"not",
"present"
] | 85dba59281216ccb9cff580d26063d304350bbe0 | https://github.com/sgtlambda/jvwp/blob/85dba59281216ccb9cff580d26063d304350bbe0/src/rwmb/RWMB.php#L27-L31 |
12,480 | sgtlambda/jvwp | src/rwmb/RWMB.php | RWMB.removeField | public function removeField(Field $field)
{
if (($index = array_search($field, $this->fields)) !== false)
array_splice($this->fields, $index, 1);
} | php | public function removeField(Field $field)
{
if (($index = array_search($field, $this->fields)) !== false)
array_splice($this->fields, $index, 1);
} | [
"public",
"function",
"removeField",
"(",
"Field",
"$",
"field",
")",
"{",
"if",
"(",
"(",
"$",
"index",
"=",
"array_search",
"(",
"$",
"field",
",",
"$",
"this",
"->",
"fields",
")",
")",
"!==",
"false",
")",
"array_splice",
"(",
"$",
"this",
"->",
... | Removes the field from the MetaBox, if present
@param Field $field | [
"Removes",
"the",
"field",
"from",
"the",
"MetaBox",
"if",
"present"
] | 85dba59281216ccb9cff580d26063d304350bbe0 | https://github.com/sgtlambda/jvwp/blob/85dba59281216ccb9cff580d26063d304350bbe0/src/rwmb/RWMB.php#L38-L42 |
12,481 | vinala/kernel | src/Foundation/Bus.php | Bus.run | public static function run($type = 'web', $session = true)
{
$lumos = $type == 'lumos' ? true : false;
static::init($type);
//Support Surface
static::support();
//Version Surface
static::version();
//Logging Surface
static::logging();
//Inp... | php | public static function run($type = 'web', $session = true)
{
$lumos = $type == 'lumos' ? true : false;
static::init($type);
//Support Surface
static::support();
//Version Surface
static::version();
//Logging Surface
static::logging();
//Inp... | [
"public",
"static",
"function",
"run",
"(",
"$",
"type",
"=",
"'web'",
",",
"$",
"session",
"=",
"true",
")",
"{",
"$",
"lumos",
"=",
"$",
"type",
"==",
"'lumos'",
"?",
"true",
":",
"false",
";",
"static",
"::",
"init",
"(",
"$",
"type",
")",
";"... | Run the Bus surface.
@param bool $lumos
@param bool $session
@return null | [
"Run",
"the",
"Bus",
"surface",
"."
] | 346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a | https://github.com/vinala/kernel/blob/346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a/src/Foundation/Bus.php#L50-L196 |
12,482 | vinala/kernel | src/Foundation/Bus.php | Bus.call | private static function call(array $files, $folder, $ext = 'php')
{
foreach ($files as $file) {
static::need($folder.$file.'.'.$ext);
}
} | php | private static function call(array $files, $folder, $ext = 'php')
{
foreach ($files as $file) {
static::need($folder.$file.'.'.$ext);
}
} | [
"private",
"static",
"function",
"call",
"(",
"array",
"$",
"files",
",",
"$",
"folder",
",",
"$",
"ext",
"=",
"'php'",
")",
"{",
"foreach",
"(",
"$",
"files",
"as",
"$",
"file",
")",
"{",
"static",
"::",
"need",
"(",
"$",
"folder",
".",
"$",
"fi... | Call files of a folder.
@param array $files
@param string $folder
@return null | [
"Call",
"files",
"of",
"a",
"folder",
"."
] | 346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a | https://github.com/vinala/kernel/blob/346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a/src/Foundation/Bus.php#L264-L269 |
12,483 | vinala/kernel | src/Foundation/Bus.php | Bus.fetch | public static function fetch($pattern, $app = false)
{
if ($app) {
$path = root().'app/'.$pattern.'/*.php';
} else {
$path = root().$pattern.'/*.php';
}
return glob($path);
} | php | public static function fetch($pattern, $app = false)
{
if ($app) {
$path = root().'app/'.$pattern.'/*.php';
} else {
$path = root().$pattern.'/*.php';
}
return glob($path);
} | [
"public",
"static",
"function",
"fetch",
"(",
"$",
"pattern",
",",
"$",
"app",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"app",
")",
"{",
"$",
"path",
"=",
"root",
"(",
")",
".",
"'app/'",
".",
"$",
"pattern",
".",
"'/*.php'",
";",
"}",
"else",
"... | Fetch files from folder.
@param string $pattern
@param bool $app : if using app/files
@return array | [
"Fetch",
"files",
"from",
"folder",
"."
] | 346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a | https://github.com/vinala/kernel/blob/346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a/src/Foundation/Bus.php#L293-L302 |
12,484 | vinala/kernel | src/Foundation/Bus.php | Bus.input | private static function input()
{
$files = ['Input'];
$folder = static::$root.'Http'.'/';
self::call($files, $folder);
Input::register();
} | php | private static function input()
{
$files = ['Input'];
$folder = static::$root.'Http'.'/';
self::call($files, $folder);
Input::register();
} | [
"private",
"static",
"function",
"input",
"(",
")",
"{",
"$",
"files",
"=",
"[",
"'Input'",
"]",
";",
"$",
"folder",
"=",
"static",
"::",
"$",
"root",
".",
"'Http'",
".",
"'/'",
";",
"self",
"::",
"call",
"(",
"$",
"files",
",",
"$",
"folder",
")... | Call and init Input surface.
@return null | [
"Call",
"and",
"init",
"Input",
"surface",
"."
] | 346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a | https://github.com/vinala/kernel/blob/346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a/src/Foundation/Bus.php#L341-L349 |
12,485 | vinala/kernel | src/Foundation/Bus.php | Bus.config | private static function config($test = false)
{
$files = ['Config', 'Alias'];
$folder = static::$root.'Config'.'/';
self::call($files, $folder);
//
$files = ['ConfigException', 'DatabaseDriverNotFoundException', 'AliasedClassNotFoundException'];
$folder = static::$ro... | php | private static function config($test = false)
{
$files = ['Config', 'Alias'];
$folder = static::$root.'Config'.'/';
self::call($files, $folder);
//
$files = ['ConfigException', 'DatabaseDriverNotFoundException', 'AliasedClassNotFoundException'];
$folder = static::$ro... | [
"private",
"static",
"function",
"config",
"(",
"$",
"test",
"=",
"false",
")",
"{",
"$",
"files",
"=",
"[",
"'Config'",
",",
"'Alias'",
"]",
";",
"$",
"folder",
"=",
"static",
"::",
"$",
"root",
".",
"'Config'",
".",
"'/'",
";",
"self",
"::",
"cal... | Call Config surface and initiate it.
@return null | [
"Call",
"Config",
"surface",
"and",
"initiate",
"it",
"."
] | 346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a | https://github.com/vinala/kernel/blob/346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a/src/Foundation/Bus.php#L366-L379 |
12,486 | vinala/kernel | src/Foundation/Bus.php | Bus.maintenance | private static function maintenance($lumos)
{
$files = ['Maintenance'];
$folder = static::$root.'Maintenance'.'/';
self::call($files, $folder);
if (!$lumos) {
Maintenance::launch();
}
} | php | private static function maintenance($lumos)
{
$files = ['Maintenance'];
$folder = static::$root.'Maintenance'.'/';
self::call($files, $folder);
if (!$lumos) {
Maintenance::launch();
}
} | [
"private",
"static",
"function",
"maintenance",
"(",
"$",
"lumos",
")",
"{",
"$",
"files",
"=",
"[",
"'Maintenance'",
"]",
";",
"$",
"folder",
"=",
"static",
"::",
"$",
"root",
".",
"'Maintenance'",
".",
"'/'",
";",
"self",
"::",
"call",
"(",
"$",
"f... | Call the Maintenance surface.
@return null | [
"Call",
"the",
"Maintenance",
"surface",
"."
] | 346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a | https://github.com/vinala/kernel/blob/346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a/src/Foundation/Bus.php#L399-L409 |
12,487 | vinala/kernel | src/Foundation/Bus.php | Bus.time | private static function time()
{
$files = ['DateTime'];
$folder = static::$root.'Time'.'/';
self::call($files, $folder);
DateTime::setTimezone();
} | php | private static function time()
{
$files = ['DateTime'];
$folder = static::$root.'Time'.'/';
self::call($files, $folder);
DateTime::setTimezone();
} | [
"private",
"static",
"function",
"time",
"(",
")",
"{",
"$",
"files",
"=",
"[",
"'DateTime'",
"]",
";",
"$",
"folder",
"=",
"static",
"::",
"$",
"root",
".",
"'Time'",
".",
"'/'",
";",
"self",
"::",
"call",
"(",
"$",
"files",
",",
"$",
"folder",
... | Call Time surface.
@return numm | [
"Call",
"Time",
"surface",
"."
] | 346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a | https://github.com/vinala/kernel/blob/346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a/src/Foundation/Bus.php#L416-L424 |
12,488 | vinala/kernel | src/Foundation/Bus.php | Bus.component | private static function component()
{
$files = ['Component'];
$folder = static::$root.'Foundation'.'/';
self::call($files, $folder);
//
$files = ['SurfaceDisabledException'];
$folder = static::$root.'Foundation/Exceptions'.'/';
self::call($files, $folder);
... | php | private static function component()
{
$files = ['Component'];
$folder = static::$root.'Foundation'.'/';
self::call($files, $folder);
//
$files = ['SurfaceDisabledException'];
$folder = static::$root.'Foundation/Exceptions'.'/';
self::call($files, $folder);
... | [
"private",
"static",
"function",
"component",
"(",
")",
"{",
"$",
"files",
"=",
"[",
"'Component'",
"]",
";",
"$",
"folder",
"=",
"static",
"::",
"$",
"root",
".",
"'Foundation'",
".",
"'/'",
";",
"self",
"::",
"call",
"(",
"$",
"files",
",",
"$",
... | Call Component surface.
@return null | [
"Call",
"Component",
"surface",
"."
] | 346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a | https://github.com/vinala/kernel/blob/346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a/src/Foundation/Bus.php#L442-L453 |
12,489 | vinala/kernel | src/Foundation/Bus.php | Bus.session | private static function session($session)
{
$files = ['Session'];
$folder = static::$root.'Storage'.'/';
self::call($files, $folder);
$files = ['SessionKeyNotFoundException', 'SessionSurfaceIsOffException'];
$folder = static::$root.'Storage/Exceptions'.'/';
self::c... | php | private static function session($session)
{
$files = ['Session'];
$folder = static::$root.'Storage'.'/';
self::call($files, $folder);
$files = ['SessionKeyNotFoundException', 'SessionSurfaceIsOffException'];
$folder = static::$root.'Storage/Exceptions'.'/';
self::c... | [
"private",
"static",
"function",
"session",
"(",
"$",
"session",
")",
"{",
"$",
"files",
"=",
"[",
"'Session'",
"]",
";",
"$",
"folder",
"=",
"static",
"::",
"$",
"root",
".",
"'Storage'",
".",
"'/'",
";",
"self",
"::",
"call",
"(",
"$",
"files",
"... | Call Session class.
@param bool $session
@return null | [
"Call",
"Session",
"class",
"."
] | 346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a | https://github.com/vinala/kernel/blob/346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a/src/Foundation/Bus.php#L488-L504 |
12,490 | vinala/kernel | src/Foundation/Bus.php | Bus.storage | private static function storage($session)
{
//Initiat the class
static::session($session);
$files = ['Storage'];
$folder = static::$root.'Storage'.'/';
self::call($files, $folder);
$files = ['NotFoundStorageDiskException'];
$folder = static::$root.'Storage/... | php | private static function storage($session)
{
//Initiat the class
static::session($session);
$files = ['Storage'];
$folder = static::$root.'Storage'.'/';
self::call($files, $folder);
$files = ['NotFoundStorageDiskException'];
$folder = static::$root.'Storage/... | [
"private",
"static",
"function",
"storage",
"(",
"$",
"session",
")",
"{",
"//Initiat the class",
"static",
"::",
"session",
"(",
"$",
"session",
")",
";",
"$",
"files",
"=",
"[",
"'Storage'",
"]",
";",
"$",
"folder",
"=",
"static",
"::",
"$",
"root",
... | Call the Storage surface.
@return null | [
"Call",
"the",
"Storage",
"surface",
"."
] | 346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a | https://github.com/vinala/kernel/blob/346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a/src/Foundation/Bus.php#L511-L525 |
12,491 | vinala/kernel | src/Foundation/Bus.php | Bus.string | private static function string()
{
$files = ['Strings'];
$folder = static::$root.'Strings'.'/';
self::call($files, $folder);
$files = ['StringOutIndexException'];
$folder = static::$root.'Strings/Exceptions'.'/';
self::call($files, $folder);
} | php | private static function string()
{
$files = ['Strings'];
$folder = static::$root.'Strings'.'/';
self::call($files, $folder);
$files = ['StringOutIndexException'];
$folder = static::$root.'Strings/Exceptions'.'/';
self::call($files, $folder);
} | [
"private",
"static",
"function",
"string",
"(",
")",
"{",
"$",
"files",
"=",
"[",
"'Strings'",
"]",
";",
"$",
"folder",
"=",
"static",
"::",
"$",
"root",
".",
"'Strings'",
".",
"'/'",
";",
"self",
"::",
"call",
"(",
"$",
"files",
",",
"$",
"folder"... | Call the String surface.
@return null | [
"Call",
"the",
"String",
"surface",
"."
] | 346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a | https://github.com/vinala/kernel/blob/346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a/src/Foundation/Bus.php#L532-L543 |
12,492 | vinala/kernel | src/Foundation/Bus.php | Bus.validation | private static function validation()
{
$files = ['Validator', 'ValidationResult'];
$folder = static::$root.'Validation'.'/';
self::call($files, $folder);
//Initiate the validation surface
Validator::ini();
} | php | private static function validation()
{
$files = ['Validator', 'ValidationResult'];
$folder = static::$root.'Validation'.'/';
self::call($files, $folder);
//Initiate the validation surface
Validator::ini();
} | [
"private",
"static",
"function",
"validation",
"(",
")",
"{",
"$",
"files",
"=",
"[",
"'Validator'",
",",
"'ValidationResult'",
"]",
";",
"$",
"folder",
"=",
"static",
"::",
"$",
"root",
".",
"'Validation'",
".",
"'/'",
";",
"self",
"::",
"call",
"(",
... | Call the Validation surface.
@return null | [
"Call",
"the",
"Validation",
"surface",
"."
] | 346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a | https://github.com/vinala/kernel/blob/346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a/src/Foundation/Bus.php#L563-L572 |
12,493 | vinala/kernel | src/Foundation/Bus.php | Bus.router | private static function router()
{
$files = ['Url'];
$folder = static::$root.'Router'.'/';
self::call($files, $folder);
//New router surface
$files = ['Route', 'Routes'];
$folder = static::$root.'Http/Router'.'/';
self::call($files, $folder);
$fil... | php | private static function router()
{
$files = ['Url'];
$folder = static::$root.'Router'.'/';
self::call($files, $folder);
//New router surface
$files = ['Route', 'Routes'];
$folder = static::$root.'Http/Router'.'/';
self::call($files, $folder);
$fil... | [
"private",
"static",
"function",
"router",
"(",
")",
"{",
"$",
"files",
"=",
"[",
"'Url'",
"]",
";",
"$",
"folder",
"=",
"static",
"::",
"$",
"root",
".",
"'Router'",
".",
"'/'",
";",
"self",
"::",
"call",
"(",
"$",
"files",
",",
"$",
"folder",
"... | Call Router surface.
@return null | [
"Call",
"Router",
"surface",
"."
] | 346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a | https://github.com/vinala/kernel/blob/346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a/src/Foundation/Bus.php#L605-L623 |
12,494 | vinala/kernel | src/Foundation/Bus.php | Bus.caches | private static function caches()
{
$files = ['Driver', 'FileDriver', 'ArrayDriver', 'PhpFilesDriver', 'ApcDriver', 'PDODriver'];
$folder = static::$root.'Caches/Drivers'.'/';
self::call($files, $folder);
$files = ['Item', 'Cache'];
$folder = static::$root.'Caches'.'/';
... | php | private static function caches()
{
$files = ['Driver', 'FileDriver', 'ArrayDriver', 'PhpFilesDriver', 'ApcDriver', 'PDODriver'];
$folder = static::$root.'Caches/Drivers'.'/';
self::call($files, $folder);
$files = ['Item', 'Cache'];
$folder = static::$root.'Caches'.'/';
... | [
"private",
"static",
"function",
"caches",
"(",
")",
"{",
"$",
"files",
"=",
"[",
"'Driver'",
",",
"'FileDriver'",
",",
"'ArrayDriver'",
",",
"'PhpFilesDriver'",
",",
"'ApcDriver'",
",",
"'PDODriver'",
"]",
";",
"$",
"folder",
"=",
"static",
"::",
"$",
"ro... | Call Caches surface.
@return null | [
"Call",
"Caches",
"surface",
"."
] | 346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a | https://github.com/vinala/kernel/blob/346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a/src/Foundation/Bus.php#L630-L646 |
12,495 | vinala/kernel | src/Foundation/Bus.php | Bus.auth | private static function auth()
{
$files = ['Auth'];
$folder = static::$root.'Authentication'.'/';
self::call($files, $folder);
$files = ['AuthenticationModelNotFoundException'];
$folder = static::$root.'Authentication/Exceptions'.'/';
self::call($files, $folder);
... | php | private static function auth()
{
$files = ['Auth'];
$folder = static::$root.'Authentication'.'/';
self::call($files, $folder);
$files = ['AuthenticationModelNotFoundException'];
$folder = static::$root.'Authentication/Exceptions'.'/';
self::call($files, $folder);
... | [
"private",
"static",
"function",
"auth",
"(",
")",
"{",
"$",
"files",
"=",
"[",
"'Auth'",
"]",
";",
"$",
"folder",
"=",
"static",
"::",
"$",
"root",
".",
"'Authentication'",
".",
"'/'",
";",
"self",
"::",
"call",
"(",
"$",
"files",
",",
"$",
"folde... | Call Auth surface.
@return null | [
"Call",
"Auth",
"surface",
"."
] | 346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a | https://github.com/vinala/kernel/blob/346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a/src/Foundation/Bus.php#L666-L677 |
12,496 | vinala/kernel | src/Foundation/Bus.php | Bus.database | public static function database()
{
$path = static::$root.'Database/';
//--------------------------------------------------------
// Calling drivers
//--------------------------------------------------------
$files = ['Driver', 'MysqlDriver'];
$folder = $path.'Drive... | php | public static function database()
{
$path = static::$root.'Database/';
//--------------------------------------------------------
// Calling drivers
//--------------------------------------------------------
$files = ['Driver', 'MysqlDriver'];
$folder = $path.'Drive... | [
"public",
"static",
"function",
"database",
"(",
")",
"{",
"$",
"path",
"=",
"static",
"::",
"$",
"root",
".",
"'Database/'",
";",
"//--------------------------------------------------------",
"// Calling drivers",
"//--------------------------------------------------------",
... | Call Database surface.
@return null | [
"Call",
"Database",
"surface",
"."
] | 346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a | https://github.com/vinala/kernel/blob/346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a/src/Foundation/Bus.php#L684-L741 |
12,497 | vinala/kernel | src/Foundation/Bus.php | Bus.http | private static function http()
{
$files = ['Http', 'Request'];
$folder = static::$root.'Http'.'/';
self::call($files, $folder);
static::links();
static::redirect();
static::middleware();
} | php | private static function http()
{
$files = ['Http', 'Request'];
$folder = static::$root.'Http'.'/';
self::call($files, $folder);
static::links();
static::redirect();
static::middleware();
} | [
"private",
"static",
"function",
"http",
"(",
")",
"{",
"$",
"files",
"=",
"[",
"'Http'",
",",
"'Request'",
"]",
";",
"$",
"folder",
"=",
"static",
"::",
"$",
"root",
".",
"'Http'",
".",
"'/'",
";",
"self",
"::",
"call",
"(",
"$",
"files",
",",
"... | Call HTTP surface.
@return null | [
"Call",
"HTTP",
"surface",
"."
] | 346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a | https://github.com/vinala/kernel/blob/346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a/src/Foundation/Bus.php#L748-L758 |
12,498 | vinala/kernel | src/Foundation/Bus.php | Bus.links | private static function links()
{
$files = ['Link'];
$folder = static::$root.'Http/Links'.'/';
self::call($files, $folder);
$files = ['LinkKeyNotFoundException'];
$folder = static::$root.'Http/Links/Exceptions'.'/';
self::call($files, $folder);
} | php | private static function links()
{
$files = ['Link'];
$folder = static::$root.'Http/Links'.'/';
self::call($files, $folder);
$files = ['LinkKeyNotFoundException'];
$folder = static::$root.'Http/Links/Exceptions'.'/';
self::call($files, $folder);
} | [
"private",
"static",
"function",
"links",
"(",
")",
"{",
"$",
"files",
"=",
"[",
"'Link'",
"]",
";",
"$",
"folder",
"=",
"static",
"::",
"$",
"root",
".",
"'Http/Links'",
".",
"'/'",
";",
"self",
"::",
"call",
"(",
"$",
"files",
",",
"$",
"folder",... | Call the Links surface.
@return null | [
"Call",
"the",
"Links",
"surface",
"."
] | 346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a | https://github.com/vinala/kernel/blob/346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a/src/Foundation/Bus.php#L765-L776 |
12,499 | vinala/kernel | src/Foundation/Bus.php | Bus.middleware | private static function middleware()
{
$files = ['Filters', 'Middleware'];
$folder = static::$root.'Http/Middleware'.'/';
self::call($files, $folder);
$files = ['MiddlewareNotFoundException', 'MiddlewareWallException'];
$folder = static::$root.'Http/Middleware/Exceptions'.'... | php | private static function middleware()
{
$files = ['Filters', 'Middleware'];
$folder = static::$root.'Http/Middleware'.'/';
self::call($files, $folder);
$files = ['MiddlewareNotFoundException', 'MiddlewareWallException'];
$folder = static::$root.'Http/Middleware/Exceptions'.'... | [
"private",
"static",
"function",
"middleware",
"(",
")",
"{",
"$",
"files",
"=",
"[",
"'Filters'",
",",
"'Middleware'",
"]",
";",
"$",
"folder",
"=",
"static",
"::",
"$",
"root",
".",
"'Http/Middleware'",
".",
"'/'",
";",
"self",
"::",
"call",
"(",
"$"... | Call the Middleware surface.
@return null | [
"Call",
"the",
"Middleware",
"surface",
"."
] | 346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a | https://github.com/vinala/kernel/blob/346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a/src/Foundation/Bus.php#L796-L807 |
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.