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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
15,500 | bluelyte/transmission-remote | src/Remote.php | Remote.setPort | public function setPort($port)
{
if (!ctype_digit($port)) {
trigger_error('Port must be a positive integer: ' . var_export($port, true), E_USER_ERROR);
}
$this->port = $port;
} | php | public function setPort($port)
{
if (!ctype_digit($port)) {
trigger_error('Port must be a positive integer: ' . var_export($port, true), E_USER_ERROR);
}
$this->port = $port;
} | [
"public",
"function",
"setPort",
"(",
"$",
"port",
")",
"{",
"if",
"(",
"!",
"ctype_digit",
"(",
"$",
"port",
")",
")",
"{",
"trigger_error",
"(",
"'Port must be a positive integer: '",
".",
"var_export",
"(",
"$",
"port",
",",
"true",
")",
",",
"E_USER_ER... | Sets the port on which to operate the daemon.
@param string $port | [
"Sets",
"the",
"port",
"on",
"which",
"to",
"operate",
"the",
"daemon",
"."
] | 82683b8b9101f623dbd6c1923348cff00380250c | https://github.com/bluelyte/transmission-remote/blob/82683b8b9101f623dbd6c1923348cff00380250c/src/Remote.php#L83-L89 |
15,501 | bluelyte/transmission-remote | src/Remote.php | Remote.setDownloadPath | public function setDownloadPath($downloadPath)
{
if (!is_dir($downloadPath) || !is_writable($downloadPath)) {
trigger_error('Cannot write to directory: ' . $downloadPath, E_USER_ERROR);
}
$this->downloadPath = $downloadPath;
} | php | public function setDownloadPath($downloadPath)
{
if (!is_dir($downloadPath) || !is_writable($downloadPath)) {
trigger_error('Cannot write to directory: ' . $downloadPath, E_USER_ERROR);
}
$this->downloadPath = $downloadPath;
} | [
"public",
"function",
"setDownloadPath",
"(",
"$",
"downloadPath",
")",
"{",
"if",
"(",
"!",
"is_dir",
"(",
"$",
"downloadPath",
")",
"||",
"!",
"is_writable",
"(",
"$",
"downloadPath",
")",
")",
"{",
"trigger_error",
"(",
"'Cannot write to directory: '",
".",... | Sets the path at which to store downloaded files.
@param string $downloadPath | [
"Sets",
"the",
"path",
"at",
"which",
"to",
"store",
"downloaded",
"files",
"."
] | 82683b8b9101f623dbd6c1923348cff00380250c | https://github.com/bluelyte/transmission-remote/blob/82683b8b9101f623dbd6c1923348cff00380250c/src/Remote.php#L106-L112 |
15,502 | bluelyte/transmission-remote | src/Remote.php | Remote.execute | protected function execute($command)
{
$process = proc_open($command, array(1 => array('pipe', 'w'), 2 => array('pipe', 'w')), $pipes);
fclose($pipes[2]);
$this->output = stream_get_contents($pipes[1]);
fclose($pipes[1]);
$status = proc_get_status($process);
$this->st... | php | protected function execute($command)
{
$process = proc_open($command, array(1 => array('pipe', 'w'), 2 => array('pipe', 'w')), $pipes);
fclose($pipes[2]);
$this->output = stream_get_contents($pipes[1]);
fclose($pipes[1]);
$status = proc_get_status($process);
$this->st... | [
"protected",
"function",
"execute",
"(",
"$",
"command",
")",
"{",
"$",
"process",
"=",
"proc_open",
"(",
"$",
"command",
",",
"array",
"(",
"1",
"=>",
"array",
"(",
"'pipe'",
",",
"'w'",
")",
",",
"2",
"=>",
"array",
"(",
"'pipe'",
",",
"'w'",
")"... | Execute a shell command.
@param string $command | [
"Execute",
"a",
"shell",
"command",
"."
] | 82683b8b9101f623dbd6c1923348cff00380250c | https://github.com/bluelyte/transmission-remote/blob/82683b8b9101f623dbd6c1923348cff00380250c/src/Remote.php#L131-L140 |
15,503 | bluelyte/transmission-remote | src/Remote.php | Remote.start | public function start()
{
if ($this->started) {
return;
}
$auth = $this->getAuthFlag();
$command = 'transmission-remote -C ' . $auth
. ' -' . ($this->encryption ? 'er' : 'ep')
. ' -p ' . $this->port
. ' -' . ($this->upnp ? 'm' : 'M')
... | php | public function start()
{
if ($this->started) {
return;
}
$auth = $this->getAuthFlag();
$command = 'transmission-remote -C ' . $auth
. ' -' . ($this->encryption ? 'er' : 'ep')
. ' -p ' . $this->port
. ' -' . ($this->upnp ? 'm' : 'M')
... | [
"public",
"function",
"start",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"started",
")",
"{",
"return",
";",
"}",
"$",
"auth",
"=",
"$",
"this",
"->",
"getAuthFlag",
"(",
")",
";",
"$",
"command",
"=",
"'transmission-remote -C '",
".",
"$",
"auth"... | Starts the daemon. | [
"Starts",
"the",
"daemon",
"."
] | 82683b8b9101f623dbd6c1923348cff00380250c | https://github.com/bluelyte/transmission-remote/blob/82683b8b9101f623dbd6c1923348cff00380250c/src/Remote.php#L175-L196 |
15,504 | bluelyte/transmission-remote | src/Remote.php | Remote.addTorrents | public function addTorrents($paths)
{
if (is_array($paths)) {
$paths = implode(' ', $paths);
}
$this->execute('transmission-remote ' . $this->getAuthFlag() . ' -a ' . $paths);
} | php | public function addTorrents($paths)
{
if (is_array($paths)) {
$paths = implode(' ', $paths);
}
$this->execute('transmission-remote ' . $this->getAuthFlag() . ' -a ' . $paths);
} | [
"public",
"function",
"addTorrents",
"(",
"$",
"paths",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"paths",
")",
")",
"{",
"$",
"paths",
"=",
"implode",
"(",
"' '",
",",
"$",
"paths",
")",
";",
"}",
"$",
"this",
"->",
"execute",
"(",
"'transmission... | Adds a torrent to download.
@param string|array $path Space-delimited list or array of paths to
one or more .torrent files | [
"Adds",
"a",
"torrent",
"to",
"download",
"."
] | 82683b8b9101f623dbd6c1923348cff00380250c | https://github.com/bluelyte/transmission-remote/blob/82683b8b9101f623dbd6c1923348cff00380250c/src/Remote.php#L204-L210 |
15,505 | jasny/router | src/Router/UrlParsing.php | UrlParsing.splitUrl | protected function splitUrl($url)
{
$path = parse_url(trim($url, '/'), PHP_URL_PATH);
return $path ? explode('/', $path) : array();
} | php | protected function splitUrl($url)
{
$path = parse_url(trim($url, '/'), PHP_URL_PATH);
return $path ? explode('/', $path) : array();
} | [
"protected",
"function",
"splitUrl",
"(",
"$",
"url",
")",
"{",
"$",
"path",
"=",
"parse_url",
"(",
"trim",
"(",
"$",
"url",
",",
"'/'",
")",
",",
"PHP_URL_PATH",
")",
";",
"return",
"$",
"path",
"?",
"explode",
"(",
"'/'",
",",
"$",
"path",
")",
... | Get parts of a URL path
@param string $url
@return array | [
"Get",
"parts",
"of",
"a",
"URL",
"path"
] | 4c776665ba343150b442c21893946e3d54190896 | https://github.com/jasny/router/blob/4c776665ba343150b442c21893946e3d54190896/src/Router/UrlParsing.php#L16-L20 |
15,506 | phpalchemy/cerberus | src/Alchemy/Component/Cerberus/Model/Base/Permission.php | Permission.initPermissionsRelatedById | public function initPermissionsRelatedById($overrideExisting = true)
{
if (null !== $this->collPermissionsRelatedById && !$overrideExisting) {
return;
}
$this->collPermissionsRelatedById = new ObjectCollection();
$this->collPermissionsRelatedById->setModel('\Alchemy\Compo... | php | public function initPermissionsRelatedById($overrideExisting = true)
{
if (null !== $this->collPermissionsRelatedById && !$overrideExisting) {
return;
}
$this->collPermissionsRelatedById = new ObjectCollection();
$this->collPermissionsRelatedById->setModel('\Alchemy\Compo... | [
"public",
"function",
"initPermissionsRelatedById",
"(",
"$",
"overrideExisting",
"=",
"true",
")",
"{",
"if",
"(",
"null",
"!==",
"$",
"this",
"->",
"collPermissionsRelatedById",
"&&",
"!",
"$",
"overrideExisting",
")",
"{",
"return",
";",
"}",
"$",
"this",
... | Initializes the collPermissionsRelatedById collection.
By default this just sets the collPermissionsRelatedById collection to an empty array (like clearcollPermissionsRelatedById());
however, you may wish to override this method in your stub class to provide setting appropriate
to your application -- for example, sett... | [
"Initializes",
"the",
"collPermissionsRelatedById",
"collection",
"."
] | 3424a360c9bded71eb5b570bc114a7759cb23ec6 | https://github.com/phpalchemy/cerberus/blob/3424a360c9bded71eb5b570bc114a7759cb23ec6/src/Alchemy/Component/Cerberus/Model/Base/Permission.php#L1568-L1575 |
15,507 | phpalchemy/cerberus | src/Alchemy/Component/Cerberus/Model/Base/Permission.php | Permission.getPermissionsRelatedById | public function getPermissionsRelatedById(Criteria $criteria = null, ConnectionInterface $con = null)
{
$partial = $this->collPermissionsRelatedByIdPartial && !$this->isNew();
if (null === $this->collPermissionsRelatedById || null !== $criteria || $partial) {
if ($this->isNew() && null ... | php | public function getPermissionsRelatedById(Criteria $criteria = null, ConnectionInterface $con = null)
{
$partial = $this->collPermissionsRelatedByIdPartial && !$this->isNew();
if (null === $this->collPermissionsRelatedById || null !== $criteria || $partial) {
if ($this->isNew() && null ... | [
"public",
"function",
"getPermissionsRelatedById",
"(",
"Criteria",
"$",
"criteria",
"=",
"null",
",",
"ConnectionInterface",
"$",
"con",
"=",
"null",
")",
"{",
"$",
"partial",
"=",
"$",
"this",
"->",
"collPermissionsRelatedByIdPartial",
"&&",
"!",
"$",
"this",
... | Gets an array of ChildPermission objects which contain a foreign key that references this object.
If the $criteria is not null, it is used to always fetch the results from the database.
Otherwise the results are fetched from the database the first time, then cached.
Next time the same method is called without $criteri... | [
"Gets",
"an",
"array",
"of",
"ChildPermission",
"objects",
"which",
"contain",
"a",
"foreign",
"key",
"that",
"references",
"this",
"object",
"."
] | 3424a360c9bded71eb5b570bc114a7759cb23ec6 | https://github.com/phpalchemy/cerberus/blob/3424a360c9bded71eb5b570bc114a7759cb23ec6/src/Alchemy/Component/Cerberus/Model/Base/Permission.php#L1591-L1633 |
15,508 | phpalchemy/cerberus | src/Alchemy/Component/Cerberus/Model/Base/Permission.php | Permission.countPermissionsRelatedById | public function countPermissionsRelatedById(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
{
$partial = $this->collPermissionsRelatedByIdPartial && !$this->isNew();
if (null === $this->collPermissionsRelatedById || null !== $criteria || $partial) {
if ($th... | php | public function countPermissionsRelatedById(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
{
$partial = $this->collPermissionsRelatedByIdPartial && !$this->isNew();
if (null === $this->collPermissionsRelatedById || null !== $criteria || $partial) {
if ($th... | [
"public",
"function",
"countPermissionsRelatedById",
"(",
"Criteria",
"$",
"criteria",
"=",
"null",
",",
"$",
"distinct",
"=",
"false",
",",
"ConnectionInterface",
"$",
"con",
"=",
"null",
")",
"{",
"$",
"partial",
"=",
"$",
"this",
"->",
"collPermissionsRelat... | Returns the number of related Permission objects.
@param Criteria $criteria
@param boolean $distinct
@param ConnectionInterface $con
@return int Count of related Permission objects.
@throws PropelException | [
"Returns",
"the",
"number",
"of",
"related",
"Permission",
"objects",
"."
] | 3424a360c9bded71eb5b570bc114a7759cb23ec6 | https://github.com/phpalchemy/cerberus/blob/3424a360c9bded71eb5b570bc114a7759cb23ec6/src/Alchemy/Component/Cerberus/Model/Base/Permission.php#L1677-L1700 |
15,509 | phpalchemy/cerberus | src/Alchemy/Component/Cerberus/Model/Base/Permission.php | Permission.addPermissionRelatedById | public function addPermissionRelatedById(ChildPermission $l)
{
if ($this->collPermissionsRelatedById === null) {
$this->initPermissionsRelatedById();
$this->collPermissionsRelatedByIdPartial = true;
}
if (!$this->collPermissionsRelatedById->contains($l)) {
... | php | public function addPermissionRelatedById(ChildPermission $l)
{
if ($this->collPermissionsRelatedById === null) {
$this->initPermissionsRelatedById();
$this->collPermissionsRelatedByIdPartial = true;
}
if (!$this->collPermissionsRelatedById->contains($l)) {
... | [
"public",
"function",
"addPermissionRelatedById",
"(",
"ChildPermission",
"$",
"l",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"collPermissionsRelatedById",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"initPermissionsRelatedById",
"(",
")",
";",
"$",
"this",
"->"... | Method called to associate a ChildPermission object to this object
through the ChildPermission foreign key attribute.
@param ChildPermission $l ChildPermission
@return $this|\Alchemy\Component\Cerberus\Model\Permission The current object (for fluent API support) | [
"Method",
"called",
"to",
"associate",
"a",
"ChildPermission",
"object",
"to",
"this",
"object",
"through",
"the",
"ChildPermission",
"foreign",
"key",
"attribute",
"."
] | 3424a360c9bded71eb5b570bc114a7759cb23ec6 | https://github.com/phpalchemy/cerberus/blob/3424a360c9bded71eb5b570bc114a7759cb23ec6/src/Alchemy/Component/Cerberus/Model/Base/Permission.php#L1709-L1721 |
15,510 | phpalchemy/cerberus | src/Alchemy/Component/Cerberus/Model/Base/Permission.php | Permission.getRolePermissions | public function getRolePermissions(Criteria $criteria = null, ConnectionInterface $con = null)
{
$partial = $this->collRolePermissionsPartial && !$this->isNew();
if (null === $this->collRolePermissions || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collRolePe... | php | public function getRolePermissions(Criteria $criteria = null, ConnectionInterface $con = null)
{
$partial = $this->collRolePermissionsPartial && !$this->isNew();
if (null === $this->collRolePermissions || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collRolePe... | [
"public",
"function",
"getRolePermissions",
"(",
"Criteria",
"$",
"criteria",
"=",
"null",
",",
"ConnectionInterface",
"$",
"con",
"=",
"null",
")",
"{",
"$",
"partial",
"=",
"$",
"this",
"->",
"collRolePermissionsPartial",
"&&",
"!",
"$",
"this",
"->",
"isN... | Gets an array of ChildRolePermission objects which contain a foreign key that references this object.
If the $criteria is not null, it is used to always fetch the results from the database.
Otherwise the results are fetched from the database the first time, then cached.
Next time the same method is called without $cri... | [
"Gets",
"an",
"array",
"of",
"ChildRolePermission",
"objects",
"which",
"contain",
"a",
"foreign",
"key",
"that",
"references",
"this",
"object",
"."
] | 3424a360c9bded71eb5b570bc114a7759cb23ec6 | https://github.com/phpalchemy/cerberus/blob/3424a360c9bded71eb5b570bc114a7759cb23ec6/src/Alchemy/Component/Cerberus/Model/Base/Permission.php#L1809-L1851 |
15,511 | phpalchemy/cerberus | src/Alchemy/Component/Cerberus/Model/Base/Permission.php | Permission.countRolePermissions | public function countRolePermissions(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
{
$partial = $this->collRolePermissionsPartial && !$this->isNew();
if (null === $this->collRolePermissions || null !== $criteria || $partial) {
if ($this->isNew() && null =... | php | public function countRolePermissions(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
{
$partial = $this->collRolePermissionsPartial && !$this->isNew();
if (null === $this->collRolePermissions || null !== $criteria || $partial) {
if ($this->isNew() && null =... | [
"public",
"function",
"countRolePermissions",
"(",
"Criteria",
"$",
"criteria",
"=",
"null",
",",
"$",
"distinct",
"=",
"false",
",",
"ConnectionInterface",
"$",
"con",
"=",
"null",
")",
"{",
"$",
"partial",
"=",
"$",
"this",
"->",
"collRolePermissionsPartial"... | Returns the number of related RolePermission objects.
@param Criteria $criteria
@param boolean $distinct
@param ConnectionInterface $con
@return int Count of related RolePermission objects.
@throws PropelException | [
"Returns",
"the",
"number",
"of",
"related",
"RolePermission",
"objects",
"."
] | 3424a360c9bded71eb5b570bc114a7759cb23ec6 | https://github.com/phpalchemy/cerberus/blob/3424a360c9bded71eb5b570bc114a7759cb23ec6/src/Alchemy/Component/Cerberus/Model/Base/Permission.php#L1898-L1921 |
15,512 | phpalchemy/cerberus | src/Alchemy/Component/Cerberus/Model/Base/Permission.php | Permission.getRolePermissionsJoinRole | public function getRolePermissionsJoinRole(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
{
$query = ChildRolePermissionQuery::create(null, $criteria);
$query->joinWith('Role', $joinBehavior);
return $this->getRolePermissions($query, $con);
... | php | public function getRolePermissionsJoinRole(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
{
$query = ChildRolePermissionQuery::create(null, $criteria);
$query->joinWith('Role', $joinBehavior);
return $this->getRolePermissions($query, $con);
... | [
"public",
"function",
"getRolePermissionsJoinRole",
"(",
"Criteria",
"$",
"criteria",
"=",
"null",
",",
"ConnectionInterface",
"$",
"con",
"=",
"null",
",",
"$",
"joinBehavior",
"=",
"Criteria",
"::",
"LEFT_JOIN",
")",
"{",
"$",
"query",
"=",
"ChildRolePermissio... | If this collection has already been initialized with
an identical criteria, it returns the collection.
Otherwise if this Permission is new, it will return
an empty collection; or if this Permission has previously
been saved, it will retrieve related RolePermissions from storage.
This method is protected by default in ... | [
"If",
"this",
"collection",
"has",
"already",
"been",
"initialized",
"with",
"an",
"identical",
"criteria",
"it",
"returns",
"the",
"collection",
".",
"Otherwise",
"if",
"this",
"Permission",
"is",
"new",
"it",
"will",
"return",
"an",
"empty",
"collection",
";... | 3424a360c9bded71eb5b570bc114a7759cb23ec6 | https://github.com/phpalchemy/cerberus/blob/3424a360c9bded71eb5b570bc114a7759cb23ec6/src/Alchemy/Component/Cerberus/Model/Base/Permission.php#L1990-L1996 |
15,513 | phpalchemy/cerberus | src/Alchemy/Component/Cerberus/Model/Base/Permission.php | Permission.getRoles | public function getRoles(Criteria $criteria = null, ConnectionInterface $con = null)
{
$partial = $this->collRolesPartial && !$this->isNew();
if (null === $this->collRoles || null !== $criteria || $partial) {
if ($this->isNew()) {
// return empty collection
... | php | public function getRoles(Criteria $criteria = null, ConnectionInterface $con = null)
{
$partial = $this->collRolesPartial && !$this->isNew();
if (null === $this->collRoles || null !== $criteria || $partial) {
if ($this->isNew()) {
// return empty collection
... | [
"public",
"function",
"getRoles",
"(",
"Criteria",
"$",
"criteria",
"=",
"null",
",",
"ConnectionInterface",
"$",
"con",
"=",
"null",
")",
"{",
"$",
"partial",
"=",
"$",
"this",
"->",
"collRolesPartial",
"&&",
"!",
"$",
"this",
"->",
"isNew",
"(",
")",
... | Gets a collection of ChildRole objects related by a many-to-many relationship
to the current object by way of the role_permission cross-reference table.
If the $criteria is not null, it is used to always fetch the results from the database.
Otherwise the results are fetched from the database the first time, then cache... | [
"Gets",
"a",
"collection",
"of",
"ChildRole",
"objects",
"related",
"by",
"a",
"many",
"-",
"to",
"-",
"many",
"relationship",
"to",
"the",
"current",
"object",
"by",
"way",
"of",
"the",
"role_permission",
"cross",
"-",
"reference",
"table",
"."
] | 3424a360c9bded71eb5b570bc114a7759cb23ec6 | https://github.com/phpalchemy/cerberus/blob/3424a360c9bded71eb5b570bc114a7759cb23ec6/src/Alchemy/Component/Cerberus/Model/Base/Permission.php#L2054-L2087 |
15,514 | phpalchemy/cerberus | src/Alchemy/Component/Cerberus/Model/Base/Permission.php | Permission.countRoles | public function countRoles(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
{
$partial = $this->collRolesPartial && !$this->isNew();
if (null === $this->collRoles || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collRoles) {
... | php | public function countRoles(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
{
$partial = $this->collRolesPartial && !$this->isNew();
if (null === $this->collRoles || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collRoles) {
... | [
"public",
"function",
"countRoles",
"(",
"Criteria",
"$",
"criteria",
"=",
"null",
",",
"$",
"distinct",
"=",
"false",
",",
"ConnectionInterface",
"$",
"con",
"=",
"null",
")",
"{",
"$",
"partial",
"=",
"$",
"this",
"->",
"collRolesPartial",
"&&",
"!",
"... | Gets the number of Role objects related by a many-to-many relationship
to the current object by way of the role_permission cross-reference table.
@param Criteria $criteria Optional query object to filter the query
@param boolean $distinct Set to true to force count distinct
@param ConnectionInterface $c... | [
"Gets",
"the",
"number",
"of",
"Role",
"objects",
"related",
"by",
"a",
"many",
"-",
"to",
"-",
"many",
"relationship",
"to",
"the",
"current",
"object",
"by",
"way",
"of",
"the",
"role_permission",
"cross",
"-",
"reference",
"table",
"."
] | 3424a360c9bded71eb5b570bc114a7759cb23ec6 | https://github.com/phpalchemy/cerberus/blob/3424a360c9bded71eb5b570bc114a7759cb23ec6/src/Alchemy/Component/Cerberus/Model/Base/Permission.php#L2132-L2156 |
15,515 | phpalchemy/cerberus | src/Alchemy/Component/Cerberus/Model/Base/Permission.php | Permission.removeRole | public function removeRole(ChildRole $role)
{
if ($this->getRoles()->contains($role)) { $rolePermission = new ChildRolePermission();
$rolePermission->setRole($role);
if ($role->isPermissionsLoaded()) {
//remove the back reference if available
$role->g... | php | public function removeRole(ChildRole $role)
{
if ($this->getRoles()->contains($role)) { $rolePermission = new ChildRolePermission();
$rolePermission->setRole($role);
if ($role->isPermissionsLoaded()) {
//remove the back reference if available
$role->g... | [
"public",
"function",
"removeRole",
"(",
"ChildRole",
"$",
"role",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"getRoles",
"(",
")",
"->",
"contains",
"(",
"$",
"role",
")",
")",
"{",
"$",
"rolePermission",
"=",
"new",
"ChildRolePermission",
"(",
")",
";",... | Remove role of this object
through the role_permission cross reference table.
@param ChildRole $role
@return ChildPermission The current object (for fluent API support) | [
"Remove",
"role",
"of",
"this",
"object",
"through",
"the",
"role_permission",
"cross",
"reference",
"table",
"."
] | 3424a360c9bded71eb5b570bc114a7759cb23ec6 | https://github.com/phpalchemy/cerberus/blob/3424a360c9bded71eb5b570bc114a7759cb23ec6/src/Alchemy/Component/Cerberus/Model/Base/Permission.php#L2212-L2238 |
15,516 | czim/laravel-pxlcms | src/Sluggable/SluggableTranslatedTrait.php | SluggableTranslatedTrait.findBySlug | public static function findBySlug($slug, $locale = null)
{
/** @var \Dimsav\Translatable\Translatable $model */
$model = (new static);
/** @var SluggableTrait $translationModel */
$translationModel = $model->getTranslationModelName();
$parentKey = $model->getRelationK... | php | public static function findBySlug($slug, $locale = null)
{
/** @var \Dimsav\Translatable\Translatable $model */
$model = (new static);
/** @var SluggableTrait $translationModel */
$translationModel = $model->getTranslationModelName();
$parentKey = $model->getRelationK... | [
"public",
"static",
"function",
"findBySlug",
"(",
"$",
"slug",
",",
"$",
"locale",
"=",
"null",
")",
"{",
"/** @var \\Dimsav\\Translatable\\Translatable $model */",
"$",
"model",
"=",
"(",
"new",
"static",
")",
";",
"/** @var SluggableTrait $translationModel */",
"$"... | Find by slug on translated attribute
@param string $slug
@param string $locale optional, if omitted returns for any locale
@return $this|null | [
"Find",
"by",
"slug",
"on",
"translated",
"attribute"
] | 910297d2a3f2db86dde51b0e10fe5aad45f1aa1a | https://github.com/czim/laravel-pxlcms/blob/910297d2a3f2db86dde51b0e10fe5aad45f1aa1a/src/Sluggable/SluggableTranslatedTrait.php#L20-L34 |
15,517 | czim/laravel-pxlcms | src/Sluggable/SluggableTranslatedTrait.php | SluggableTranslatedTrait.scopeWhereSlug | public function scopeWhereSlug($query, $slug, $locale = null)
{
return $query->whereHas('translations', function ($query) use ($slug, $locale) {
return $query->whereSlug($slug, $locale, true);
});
} | php | public function scopeWhereSlug($query, $slug, $locale = null)
{
return $query->whereHas('translations', function ($query) use ($slug, $locale) {
return $query->whereSlug($slug, $locale, true);
});
} | [
"public",
"function",
"scopeWhereSlug",
"(",
"$",
"query",
",",
"$",
"slug",
",",
"$",
"locale",
"=",
"null",
")",
"{",
"return",
"$",
"query",
"->",
"whereHas",
"(",
"'translations'",
",",
"function",
"(",
"$",
"query",
")",
"use",
"(",
"$",
"slug",
... | Scopes query for slug on translated attribute
@param \Illuminate\Database\Eloquent\Builder $query
@param string $slug
@param string $locale
@return $this|null | [
"Scopes",
"query",
"for",
"slug",
"on",
"translated",
"attribute"
] | 910297d2a3f2db86dde51b0e10fe5aad45f1aa1a | https://github.com/czim/laravel-pxlcms/blob/910297d2a3f2db86dde51b0e10fe5aad45f1aa1a/src/Sluggable/SluggableTranslatedTrait.php#L44-L49 |
15,518 | vincentchalamon/VinceCmsSonataAdminBundle | Admin/Entity/ArticleAdmin.php | ArticleAdmin.createQuery | public function createQuery($context = 'list')
{
$query = parent::createQuery($context);
$query->leftJoin($query->getRootAlias().'.template', 'template')->addSelect('template')
->leftJoin('template.areas', 'area')->addSelect('area')
->leftJoin($query->getRootAlias().'.met... | php | public function createQuery($context = 'list')
{
$query = parent::createQuery($context);
$query->leftJoin($query->getRootAlias().'.template', 'template')->addSelect('template')
->leftJoin('template.areas', 'area')->addSelect('area')
->leftJoin($query->getRootAlias().'.met... | [
"public",
"function",
"createQuery",
"(",
"$",
"context",
"=",
"'list'",
")",
"{",
"$",
"query",
"=",
"parent",
"::",
"createQuery",
"(",
"$",
"context",
")",
";",
"$",
"query",
"->",
"leftJoin",
"(",
"$",
"query",
"->",
"getRootAlias",
"(",
")",
".",
... | Need to override createQuery method because or list order & joins
{@inheritdoc} | [
"Need",
"to",
"override",
"createQuery",
"method",
"because",
"or",
"list",
"order",
"&",
"joins"
] | edc768061734a92ba116488dd7b61ad40af21ceb | https://github.com/vincentchalamon/VinceCmsSonataAdminBundle/blob/edc768061734a92ba116488dd7b61ad40af21ceb/Admin/Entity/ArticleAdmin.php#L192-L201 |
15,519 | chippyash/Math-Type-Calculator | src/Chippyash/Math/Type/Traits/CheckIntTypes.php | CheckIntTypes.checkIntTypes | protected function checkIntTypes(NumericTypeInterface $a, NumericTypeInterface $b)
{
$a1 = ($a instanceof IntType ? $a : $a->asIntType());
$b1 = ($a instanceof IntType ? $b : $b->asIntType());
return [$a1, $b1];
} | php | protected function checkIntTypes(NumericTypeInterface $a, NumericTypeInterface $b)
{
$a1 = ($a instanceof IntType ? $a : $a->asIntType());
$b1 = ($a instanceof IntType ? $b : $b->asIntType());
return [$a1, $b1];
} | [
"protected",
"function",
"checkIntTypes",
"(",
"NumericTypeInterface",
"$",
"a",
",",
"NumericTypeInterface",
"$",
"b",
")",
"{",
"$",
"a1",
"=",
"(",
"$",
"a",
"instanceof",
"IntType",
"?",
"$",
"a",
":",
"$",
"a",
"->",
"asIntType",
"(",
")",
")",
";... | Check for integer type, converting if necessary
@param NumericTypeInterface $a
@param NumericTypeInterface $b
@return array [IntType, IntType] | [
"Check",
"for",
"integer",
"type",
"converting",
"if",
"necessary"
] | 2a2fae0ab4d052772d3dd45745efd5a91f88b9e3 | https://github.com/chippyash/Math-Type-Calculator/blob/2a2fae0ab4d052772d3dd45745efd5a91f88b9e3/src/Chippyash/Math/Type/Traits/CheckIntTypes.php#L28-L34 |
15,520 | drunomics/service-utils | src/Core/Config/ConfigFactoryTrait.php | ConfigFactoryTrait.getConfigFactory | public function getConfigFactory() {
if (empty($this->configFactory)) {
$this->configFactory = \Drupal::service('config.factory');
}
return $this->configFactory;
} | php | public function getConfigFactory() {
if (empty($this->configFactory)) {
$this->configFactory = \Drupal::service('config.factory');
}
return $this->configFactory;
} | [
"public",
"function",
"getConfigFactory",
"(",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"this",
"->",
"configFactory",
")",
")",
"{",
"$",
"this",
"->",
"configFactory",
"=",
"\\",
"Drupal",
"::",
"service",
"(",
"'config.factory'",
")",
";",
"}",
"return... | Gets the config factory.
@return \Drupal\Core\Config\ConfigFactoryInterface
The config factory. | [
"Gets",
"the",
"config",
"factory",
"."
] | 56761750043132365ef4ae5d9e0cf4263459328f | https://github.com/drunomics/service-utils/blob/56761750043132365ef4ae5d9e0cf4263459328f/src/Core/Config/ConfigFactoryTrait.php#L38-L43 |
15,521 | gregorybesson/PlaygroundCore | src/Validator/MailDomain.php | MailDomain.setFile | public function setFile($file)
{
if (empty($file) || false === stream_resolve_include_path($file)) {
throw new Exception\InvalidArgumentException('Invalid options to validator provided');
}
$this->options['file'] = $file;
return $this;
} | php | public function setFile($file)
{
if (empty($file) || false === stream_resolve_include_path($file)) {
throw new Exception\InvalidArgumentException('Invalid options to validator provided');
}
$this->options['file'] = $file;
return $this;
} | [
"public",
"function",
"setFile",
"(",
"$",
"file",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"file",
")",
"||",
"false",
"===",
"stream_resolve_include_path",
"(",
"$",
"file",
")",
")",
"{",
"throw",
"new",
"Exception",
"\\",
"InvalidArgumentException",
"("... | Sets the path to the file
@param string $path to the file
@return MailDomain Provides a fluent interface
@throws Exception\InvalidArgumentException When file is not found | [
"Sets",
"the",
"path",
"to",
"the",
"file"
] | f8dfa4c7660b54354933b3c28c0cf35304a649df | https://github.com/gregorybesson/PlaygroundCore/blob/f8dfa4c7660b54354933b3c28c0cf35304a649df/src/Validator/MailDomain.php#L48-L56 |
15,522 | tonicospinelli/class-generation | src/ClassGeneration/Property.php | Property.setType | public function setType($type)
{
$this->type = (string)$type;
$this->getDocBlock()->getTagCollection()->removeByName(Tag::TAG_VAR);
$tag = Tag::createFromProperty($this);
$this->getDocBlock()->addTag($tag);
return $this;
} | php | public function setType($type)
{
$this->type = (string)$type;
$this->getDocBlock()->getTagCollection()->removeByName(Tag::TAG_VAR);
$tag = Tag::createFromProperty($this);
$this->getDocBlock()->addTag($tag);
return $this;
} | [
"public",
"function",
"setType",
"(",
"$",
"type",
")",
"{",
"$",
"this",
"->",
"type",
"=",
"(",
"string",
")",
"$",
"type",
";",
"$",
"this",
"->",
"getDocBlock",
"(",
")",
"->",
"getTagCollection",
"(",
")",
"->",
"removeByName",
"(",
"Tag",
"::",... | Sets the property's type.
@param string $type
@return Property | [
"Sets",
"the",
"property",
"s",
"type",
"."
] | eee63bdb68c066b25b885b57b23656e809381a76 | https://github.com/tonicospinelli/class-generation/blob/eee63bdb68c066b25b885b57b23656e809381a76/src/ClassGeneration/Property.php#L146-L156 |
15,523 | pipelinersales/pipeliner-php-sdk | src/PipelinerSales/ApiClient/Query/Criteria.php | Criteria.toUrlQuery | public function toUrlQuery()
{
$queryData = array();
foreach (self::$properties as $p => $setter) {
if ($this->$p !== null) {
$queryData[$p] = $this->$p;
}
}
return http_build_query($queryData);
} | php | public function toUrlQuery()
{
$queryData = array();
foreach (self::$properties as $p => $setter) {
if ($this->$p !== null) {
$queryData[$p] = $this->$p;
}
}
return http_build_query($queryData);
} | [
"public",
"function",
"toUrlQuery",
"(",
")",
"{",
"$",
"queryData",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"self",
"::",
"$",
"properties",
"as",
"$",
"p",
"=>",
"$",
"setter",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"$",
"p",
"!==",
"null... | Returns the resulting url-encoded query string.
@return string | [
"Returns",
"the",
"resulting",
"url",
"-",
"encoded",
"query",
"string",
"."
] | a020149ffde815be17634542010814cf854c3d5f | https://github.com/pipelinersales/pipeliner-php-sdk/blob/a020149ffde815be17634542010814cf854c3d5f/src/PipelinerSales/ApiClient/Query/Criteria.php#L68-L77 |
15,524 | pipelinersales/pipeliner-php-sdk | src/PipelinerSales/ApiClient/Query/Criteria.php | Criteria.set | public function set($criteria)
{
if ($criteria instanceof Criteria) {
//this is much faster than using the same method that's used for arrays (see below)
$this->limit = $criteria->limit;
$this->offset = $criteria->offset;
$this->sort = $criteria->sort;
... | php | public function set($criteria)
{
if ($criteria instanceof Criteria) {
//this is much faster than using the same method that's used for arrays (see below)
$this->limit = $criteria->limit;
$this->offset = $criteria->offset;
$this->sort = $criteria->sort;
... | [
"public",
"function",
"set",
"(",
"$",
"criteria",
")",
"{",
"if",
"(",
"$",
"criteria",
"instanceof",
"Criteria",
")",
"{",
"//this is much faster than using the same method that's used for arrays (see below)",
"$",
"this",
"->",
"limit",
"=",
"$",
"criteria",
"->",
... | Sets multiple parameters at once.
@param mixed $criteria Can be one of the following:
<ul>
<li>Another Criteria object - copies that object's criteria into this one.
Competely replaces the current object's values, unsetting those which have not been
set in $criteria</li>
<li>An array - sets the parameters present in t... | [
"Sets",
"multiple",
"parameters",
"at",
"once",
"."
] | a020149ffde815be17634542010814cf854c3d5f | https://github.com/pipelinersales/pipeliner-php-sdk/blob/a020149ffde815be17634542010814cf854c3d5f/src/PipelinerSales/ApiClient/Query/Criteria.php#L247-L269 |
15,525 | pipelinersales/pipeliner-php-sdk | src/PipelinerSales/ApiClient/Query/Criteria.php | Criteria.parseHttpQuery | private function parseHttpQuery($query)
{
/* can't use parse_str, because the minimum supported PHP version
* is 5.3, which still has the magic_quotes_gpc option that affects its
* result, so some users could hypothetically have that enabled */
if (empty($query)) {
retu... | php | private function parseHttpQuery($query)
{
/* can't use parse_str, because the minimum supported PHP version
* is 5.3, which still has the magic_quotes_gpc option that affects its
* result, so some users could hypothetically have that enabled */
if (empty($query)) {
retu... | [
"private",
"function",
"parseHttpQuery",
"(",
"$",
"query",
")",
"{",
"/* can't use parse_str, because the minimum supported PHP version\n * is 5.3, which still has the magic_quotes_gpc option that affects its\n * result, so some users could hypothetically have that enabled */",
"i... | Parses a http query into a key-value array, similar to PHP's parse_str function.
@param string $query query string (without a leading question mark)
@return array | [
"Parses",
"a",
"http",
"query",
"into",
"a",
"key",
"-",
"value",
"array",
"similar",
"to",
"PHP",
"s",
"parse_str",
"function",
"."
] | a020149ffde815be17634542010814cf854c3d5f | https://github.com/pipelinersales/pipeliner-php-sdk/blob/a020149ffde815be17634542010814cf854c3d5f/src/PipelinerSales/ApiClient/Query/Criteria.php#L276-L292 |
15,526 | innobrig/flex-input | src/Input.php | Input.fromCookie | public static function fromCookie ($key, $default=null, $filter=null, $args=array())
{
if (!$key) {
return self::filterArray ($_COOKIE, $filter, $args);
}
return self::getPassedValue ($key, $default, 'C', $filter, $args);
} | php | public static function fromCookie ($key, $default=null, $filter=null, $args=array())
{
if (!$key) {
return self::filterArray ($_COOKIE, $filter, $args);
}
return self::getPassedValue ($key, $default, 'C', $filter, $args);
} | [
"public",
"static",
"function",
"fromCookie",
"(",
"$",
"key",
",",
"$",
"default",
"=",
"null",
",",
"$",
"filter",
"=",
"null",
",",
"$",
"args",
"=",
"array",
"(",
")",
")",
"{",
"if",
"(",
"!",
"$",
"key",
")",
"{",
"return",
"self",
"::",
... | Wrapper for COOKIE input
@param string $key The input field to return.
@param mixed $default The value to return if the requested field is not found (optional) (default=false).
@param string $filter The filter directive to apply to the retrieved input (optional) (default=null)
@param array $args The filter p... | [
"Wrapper",
"for",
"COOKIE",
"input"
] | 81db6cd22820d310d35be9a71d545dafffb21c64 | https://github.com/innobrig/flex-input/blob/81db6cd22820d310d35be9a71d545dafffb21c64/src/Input.php#L33-L40 |
15,527 | innobrig/flex-input | src/Input.php | Input.fromDelete | public static function fromDelete ($key, $default=null, $filter=null, $args=array())
{
if (!$key) {
$values = array();
parse_str (file_get_contents("php://input"), $values);
return self::filterArray ($values, $filter, $args);
}
return self::getPassedValue... | php | public static function fromDelete ($key, $default=null, $filter=null, $args=array())
{
if (!$key) {
$values = array();
parse_str (file_get_contents("php://input"), $values);
return self::filterArray ($values, $filter, $args);
}
return self::getPassedValue... | [
"public",
"static",
"function",
"fromDelete",
"(",
"$",
"key",
",",
"$",
"default",
"=",
"null",
",",
"$",
"filter",
"=",
"null",
",",
"$",
"args",
"=",
"array",
"(",
")",
")",
"{",
"if",
"(",
"!",
"$",
"key",
")",
"{",
"$",
"values",
"=",
"arr... | Wrapper for DELETE input
@param string $key The input field to return.
@param mixed $default The value to return if the requested field is not found (optional) (default=false).
@param string $filter The filter directive to apply to the retrieved input (optional) (default=null)
@param array $args The filter p... | [
"Wrapper",
"for",
"DELETE",
"input"
] | 81db6cd22820d310d35be9a71d545dafffb21c64 | https://github.com/innobrig/flex-input/blob/81db6cd22820d310d35be9a71d545dafffb21c64/src/Input.php#L54-L63 |
15,528 | innobrig/flex-input | src/Input.php | Input.fromFiles | public static function fromFiles ($key, $default=null, $filter=null, $args=array())
{
if (!$key) {
return self::filterArray ($_FILES, $filter, $args);
}
return self::getPassedValue ($key, $default, 'F', $filter, $args);
} | php | public static function fromFiles ($key, $default=null, $filter=null, $args=array())
{
if (!$key) {
return self::filterArray ($_FILES, $filter, $args);
}
return self::getPassedValue ($key, $default, 'F', $filter, $args);
} | [
"public",
"static",
"function",
"fromFiles",
"(",
"$",
"key",
",",
"$",
"default",
"=",
"null",
",",
"$",
"filter",
"=",
"null",
",",
"$",
"args",
"=",
"array",
"(",
")",
")",
"{",
"if",
"(",
"!",
"$",
"key",
")",
"{",
"return",
"self",
"::",
"... | Wrapper for FILES input
@param string $key The input field to return.
@param mixed $default The value to return if the requested field is not found (optional) (default=false).
@param string $filter The filter directive to apply to the retrieved input (optional) (default=null)
@param array $args The filter pr... | [
"Wrapper",
"for",
"FILES",
"input"
] | 81db6cd22820d310d35be9a71d545dafffb21c64 | https://github.com/innobrig/flex-input/blob/81db6cd22820d310d35be9a71d545dafffb21c64/src/Input.php#L77-L84 |
15,529 | innobrig/flex-input | src/Input.php | Input.fromGet | public static function fromGet ($key, $default=null, $filter=null, $args=array())
{
if (!$key) {
return self::filterArray ($_GET, $filter, $args);
}
return self::getPassedValue ($key, $default, 'G', $filter, $args);
} | php | public static function fromGet ($key, $default=null, $filter=null, $args=array())
{
if (!$key) {
return self::filterArray ($_GET, $filter, $args);
}
return self::getPassedValue ($key, $default, 'G', $filter, $args);
} | [
"public",
"static",
"function",
"fromGet",
"(",
"$",
"key",
",",
"$",
"default",
"=",
"null",
",",
"$",
"filter",
"=",
"null",
",",
"$",
"args",
"=",
"array",
"(",
")",
")",
"{",
"if",
"(",
"!",
"$",
"key",
")",
"{",
"return",
"self",
"::",
"fi... | Wrapper for GET input
@param string $key The input field to return.
@param mixed $default The value to return if the requested field is not found (optional) (default=false).
@param string $filter The filter directive to apply to the retrieved input (optional) (default=null)
@param array $args The filter proc... | [
"Wrapper",
"for",
"GET",
"input"
] | 81db6cd22820d310d35be9a71d545dafffb21c64 | https://github.com/innobrig/flex-input/blob/81db6cd22820d310d35be9a71d545dafffb21c64/src/Input.php#L98-L105 |
15,530 | innobrig/flex-input | src/Input.php | Input.fromPost | public static function fromPost ($key, $default=null, $filter=null, $args=array())
{
if (!$key) {
return self::filterArray ($_POST, $filter, $args);
}
return self::getPassedValue ($key, $default, 'P', $filter, $args);
} | php | public static function fromPost ($key, $default=null, $filter=null, $args=array())
{
if (!$key) {
return self::filterArray ($_POST, $filter, $args);
}
return self::getPassedValue ($key, $default, 'P', $filter, $args);
} | [
"public",
"static",
"function",
"fromPost",
"(",
"$",
"key",
",",
"$",
"default",
"=",
"null",
",",
"$",
"filter",
"=",
"null",
",",
"$",
"args",
"=",
"array",
"(",
")",
")",
"{",
"if",
"(",
"!",
"$",
"key",
")",
"{",
"return",
"self",
"::",
"f... | Wrapper for POST input
@param string $key The input field to return.
@param mixed $default The value to return if the requested field is not found (optional) (default=false).
@param string $filter The filter directive to apply to the retrieved input (optional) (default=null)
@param array $args The filter pro... | [
"Wrapper",
"for",
"POST",
"input"
] | 81db6cd22820d310d35be9a71d545dafffb21c64 | https://github.com/innobrig/flex-input/blob/81db6cd22820d310d35be9a71d545dafffb21c64/src/Input.php#L119-L126 |
15,531 | innobrig/flex-input | src/Input.php | Input.fromRequest | public static function fromRequest ($key, $default=null, $filter=null, $args=array())
{
if (!$key) {
return self::filterArray ($_REQUEST, $filter, $args);
}
return self::getPassedValue ($key, $default, 'R', $filter, $args);
} | php | public static function fromRequest ($key, $default=null, $filter=null, $args=array())
{
if (!$key) {
return self::filterArray ($_REQUEST, $filter, $args);
}
return self::getPassedValue ($key, $default, 'R', $filter, $args);
} | [
"public",
"static",
"function",
"fromRequest",
"(",
"$",
"key",
",",
"$",
"default",
"=",
"null",
",",
"$",
"filter",
"=",
"null",
",",
"$",
"args",
"=",
"array",
"(",
")",
")",
"{",
"if",
"(",
"!",
"$",
"key",
")",
"{",
"return",
"self",
"::",
... | Wrapper for REQUEST input
@param string $key The input field to return.
@param mixed $default The value to return if the requested field is not found (optional) (default=false).
@param string $filter The filter directive to apply to the retrieved input (optional) (default=null)
@param array $args The filter ... | [
"Wrapper",
"for",
"REQUEST",
"input"
] | 81db6cd22820d310d35be9a71d545dafffb21c64 | https://github.com/innobrig/flex-input/blob/81db6cd22820d310d35be9a71d545dafffb21c64/src/Input.php#L184-L191 |
15,532 | innobrig/flex-input | src/Input.php | Input.filterArray | protected static function filterArray (array $values, $filter=null, $args=array(), $doTrim=true)
{
if (!$values) {
return $values;
}
if (!$filter) {
$filter = self::$defaultFilter;
}
if (!$args) {
$args = array ('flags' => self::$defaultF... | php | protected static function filterArray (array $values, $filter=null, $args=array(), $doTrim=true)
{
if (!$values) {
return $values;
}
if (!$filter) {
$filter = self::$defaultFilter;
}
if (!$args) {
$args = array ('flags' => self::$defaultF... | [
"protected",
"static",
"function",
"filterArray",
"(",
"array",
"$",
"values",
",",
"$",
"filter",
"=",
"null",
",",
"$",
"args",
"=",
"array",
"(",
")",
",",
"$",
"doTrim",
"=",
"true",
")",
"{",
"if",
"(",
"!",
"$",
"values",
")",
"{",
"return",
... | Filter an array item by item. This function is recursive array safe.
@param array $values The array to filter
@param string $filter The filter directive to apply to the retrieved input (optional) (default=null)
@param array $args The filter processing args to apply (optional) (default=array())
@param bool $do... | [
"Filter",
"an",
"array",
"item",
"by",
"item",
".",
"This",
"function",
"is",
"recursive",
"array",
"safe",
"."
] | 81db6cd22820d310d35be9a71d545dafffb21c64 | https://github.com/innobrig/flex-input/blob/81db6cd22820d310d35be9a71d545dafffb21c64/src/Input.php#L332-L355 |
15,533 | christeredvartsen/sysinfo | src/SysInfo/Linux/Disk.php | Disk.sumField | private function sumField($devices = null, $partitions = null, $field) {
$result = 0;
if ($devices) {
$devices = (array) $devices;
}
if (is_array($devices)) {
$devices = array_flip($devices);
}
if ($partitions) {
$partitions = (array... | php | private function sumField($devices = null, $partitions = null, $field) {
$result = 0;
if ($devices) {
$devices = (array) $devices;
}
if (is_array($devices)) {
$devices = array_flip($devices);
}
if ($partitions) {
$partitions = (array... | [
"private",
"function",
"sumField",
"(",
"$",
"devices",
"=",
"null",
",",
"$",
"partitions",
"=",
"null",
",",
"$",
"field",
")",
"{",
"$",
"result",
"=",
"0",
";",
"if",
"(",
"$",
"devices",
")",
"{",
"$",
"devices",
"=",
"(",
"array",
")",
"$",... | Calcuate a sum
@param string|string[] $devices The name of the device to fetch, for instance "sda", or an
array of device names: array('hda', 'hdb').
@param int|int[] $partitions Which partition(s) to fetch info about.
@return int | [
"Calcuate",
"a",
"sum"
] | f1a8acb2997a41b52e9da970e5db041acd5b2ea3 | https://github.com/christeredvartsen/sysinfo/blob/f1a8acb2997a41b52e9da970e5db041acd5b2ea3/src/SysInfo/Linux/Disk.php#L86-L120 |
15,534 | shawnsandy/ui-pages | src/Controllers/GithubLoginController.php | GithubLoginController.loginUser | protected function loginUser($user)
{
$this->session->put(
config('pagekit.session_key', 'pagekit_session'), [
'github_id' => $user->id,
'github_name' => $user->name,
'github_email' => $user->email
]
);
$this->sessio... | php | protected function loginUser($user)
{
$this->session->put(
config('pagekit.session_key', 'pagekit_session'), [
'github_id' => $user->id,
'github_name' => $user->name,
'github_email' => $user->email
]
);
$this->sessio... | [
"protected",
"function",
"loginUser",
"(",
"$",
"user",
")",
"{",
"$",
"this",
"->",
"session",
"->",
"put",
"(",
"config",
"(",
"'pagekit.session_key'",
",",
"'pagekit_session'",
")",
",",
"[",
"'github_id'",
"=>",
"$",
"user",
"->",
"id",
",",
"'github_n... | Checks if the user credentials matches the credentials stored
in the config
@param $user | [
"Checks",
"if",
"the",
"user",
"credentials",
"matches",
"the",
"credentials",
"stored",
"in",
"the",
"config"
] | 11584c12fa3e2b9a5c513f4ec9e2eaf78c206ca8 | https://github.com/shawnsandy/ui-pages/blob/11584c12fa3e2b9a5c513f4ec9e2eaf78c206ca8/src/Controllers/GithubLoginController.php#L76-L87 |
15,535 | gregorybesson/PlaygroundCore | src/TwitterCard/Config.php | Config.getTags | public function getTags($useDefault = null)
{
if (is_null($useDefault)) {
$useDefault = $this->useDefault;
}
$tags = array();
foreach ($this->tags as $tag) {
if (!array_key_exists($tag->getProperty(), $tags)) {
$tags[$tag->getProperty()] = $tag... | php | public function getTags($useDefault = null)
{
if (is_null($useDefault)) {
$useDefault = $this->useDefault;
}
$tags = array();
foreach ($this->tags as $tag) {
if (!array_key_exists($tag->getProperty(), $tags)) {
$tags[$tag->getProperty()] = $tag... | [
"public",
"function",
"getTags",
"(",
"$",
"useDefault",
"=",
"null",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"useDefault",
")",
")",
"{",
"$",
"useDefault",
"=",
"$",
"this",
"->",
"useDefault",
";",
"}",
"$",
"tags",
"=",
"array",
"(",
")",
";"... | return the tags merged with the defaults
@return array | [
"return",
"the",
"tags",
"merged",
"with",
"the",
"defaults"
] | f8dfa4c7660b54354933b3c28c0cf35304a649df | https://github.com/gregorybesson/PlaygroundCore/blob/f8dfa4c7660b54354933b3c28c0cf35304a649df/src/TwitterCard/Config.php#L89-L108 |
15,536 | sokil/php-rest | src/Sokil/Rest/Client/Factory.php | Factory.getConnection | public function getConnection()
{
if(!$this->_connection) {
$this->_connection = new \Guzzle\Http\Client($this->getHost());
}
return $this->_connection;
} | php | public function getConnection()
{
if(!$this->_connection) {
$this->_connection = new \Guzzle\Http\Client($this->getHost());
}
return $this->_connection;
} | [
"public",
"function",
"getConnection",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_connection",
")",
"{",
"$",
"this",
"->",
"_connection",
"=",
"new",
"\\",
"Guzzle",
"\\",
"Http",
"\\",
"Client",
"(",
"$",
"this",
"->",
"getHost",
"(",
")",... | Get Guzzle RESTful client
@return \Guzzle\Http\Client | [
"Get",
"Guzzle",
"RESTful",
"client"
] | 5399d4ca38d3595de68598605d3d0d70f7ecfc7b | https://github.com/sokil/php-rest/blob/5399d4ca38d3595de68598605d3d0d70f7ecfc7b/src/Sokil/Rest/Client/Factory.php#L63-L70 |
15,537 | goblindegook/Syllables | src/Template/Loader/Taxonomy.php | Taxonomy._should_load_template | protected function _should_load_template() {
return ( \is_tax() || \is_category() || \is_tag() )
&& ! empty( $this->term )
&& in_array( $this->taxonomy, $this->taxonomies );
} | php | protected function _should_load_template() {
return ( \is_tax() || \is_category() || \is_tag() )
&& ! empty( $this->term )
&& in_array( $this->taxonomy, $this->taxonomies );
} | [
"protected",
"function",
"_should_load_template",
"(",
")",
"{",
"return",
"(",
"\\",
"is_tax",
"(",
")",
"||",
"\\",
"is_category",
"(",
")",
"||",
"\\",
"is_tag",
"(",
")",
")",
"&&",
"!",
"empty",
"(",
"$",
"this",
"->",
"term",
")",
"&&",
"in_arr... | Determines whether a custom template for a taxonomy term should be loaded.
@return boolean Whether a custom template should be loaded.
@uses \is_category()
@uses \is_tag()
@uses \is_tax()
@codeCoverageIgnore | [
"Determines",
"whether",
"a",
"custom",
"template",
"for",
"a",
"taxonomy",
"term",
"should",
"be",
"loaded",
"."
] | 1a98cd15e37595a85b242242f88fee38c4e36acc | https://github.com/goblindegook/Syllables/blob/1a98cd15e37595a85b242242f88fee38c4e36acc/src/Template/Loader/Taxonomy.php#L73-L77 |
15,538 | activecollab/databasestructure | src/Builder/BaseTypeClassBuilder.php | BaseTypeClassBuilder.buildFields | private function buildFields(array $fields, $indent, array &$result)
{
$stringified_field_names = [];
$fields_with_default_value = [];
foreach ($fields as $field) {
if ($field instanceof ScalarField && $field->getShouldBeAddedToModel()) {
$stringified_field_names... | php | private function buildFields(array $fields, $indent, array &$result)
{
$stringified_field_names = [];
$fields_with_default_value = [];
foreach ($fields as $field) {
if ($field instanceof ScalarField && $field->getShouldBeAddedToModel()) {
$stringified_field_names... | [
"private",
"function",
"buildFields",
"(",
"array",
"$",
"fields",
",",
"$",
"indent",
",",
"array",
"&",
"$",
"result",
")",
"{",
"$",
"stringified_field_names",
"=",
"[",
"]",
";",
"$",
"fields_with_default_value",
"=",
"[",
"]",
";",
"foreach",
"(",
"... | Build field definitions.
@param FieldInterface[] $fields
@param string $indent
@param array $result | [
"Build",
"field",
"definitions",
"."
] | 4b2353c4422186bcfce63b3212da3e70e63eb5df | https://github.com/activecollab/databasestructure/blob/4b2353c4422186bcfce63b3212da3e70e63eb5df/src/Builder/BaseTypeClassBuilder.php#L273-L311 |
15,539 | activecollab/databasestructure | src/Builder/BaseTypeClassBuilder.php | BaseTypeClassBuilder.buildGeneratedFields | public function buildGeneratedFields(array $generated_field_names, $indent, array &$result)
{
$result[] = '';
$result[] = $indent . '/**';
$result[] = $indent . ' * Generated fields that are loaded, but not managed by the entity..';
$result[] = $indent . ' *';
$result[] = $in... | php | public function buildGeneratedFields(array $generated_field_names, $indent, array &$result)
{
$result[] = '';
$result[] = $indent . '/**';
$result[] = $indent . ' * Generated fields that are loaded, but not managed by the entity..';
$result[] = $indent . ' *';
$result[] = $in... | [
"public",
"function",
"buildGeneratedFields",
"(",
"array",
"$",
"generated_field_names",
",",
"$",
"indent",
",",
"array",
"&",
"$",
"result",
")",
"{",
"$",
"result",
"[",
"]",
"=",
"''",
";",
"$",
"result",
"[",
"]",
"=",
"$",
"indent",
".",
"'/**'"... | Build a list of generated fields.
@param string[] $generated_field_names
@param string $indent
@param array $result | [
"Build",
"a",
"list",
"of",
"generated",
"fields",
"."
] | 4b2353c4422186bcfce63b3212da3e70e63eb5df | https://github.com/activecollab/databasestructure/blob/4b2353c4422186bcfce63b3212da3e70e63eb5df/src/Builder/BaseTypeClassBuilder.php#L320-L331 |
15,540 | activecollab/databasestructure | src/Builder/BaseTypeClassBuilder.php | BaseTypeClassBuilder.buildGeneratedFieldGetter | private function buildGeneratedFieldGetter($field_name, $caster, $indent, array &$result)
{
$short_getter = null;
switch ($caster) {
case ValueCasterInterface::CAST_INT:
$return_type = 'int';
break;
case ValueCasterInterface::CAST_FLOAT:
... | php | private function buildGeneratedFieldGetter($field_name, $caster, $indent, array &$result)
{
$short_getter = null;
switch ($caster) {
case ValueCasterInterface::CAST_INT:
$return_type = 'int';
break;
case ValueCasterInterface::CAST_FLOAT:
... | [
"private",
"function",
"buildGeneratedFieldGetter",
"(",
"$",
"field_name",
",",
"$",
"caster",
",",
"$",
"indent",
",",
"array",
"&",
"$",
"result",
")",
"{",
"$",
"short_getter",
"=",
"null",
";",
"switch",
"(",
"$",
"caster",
")",
"{",
"case",
"ValueC... | Build getter for generated field.
@param string $field_name
@param string $caster
@param string $indent
@param array $result | [
"Build",
"getter",
"for",
"generated",
"field",
"."
] | 4b2353c4422186bcfce63b3212da3e70e63eb5df | https://github.com/activecollab/databasestructure/blob/4b2353c4422186bcfce63b3212da3e70e63eb5df/src/Builder/BaseTypeClassBuilder.php#L466-L528 |
15,541 | activecollab/databasestructure | src/Builder/BaseTypeClassBuilder.php | BaseTypeClassBuilder.useShortGetterName | private function useShortGetterName($field_name)
{
return substr($field_name, 0, 3) === 'is_' || in_array(substr($field_name, 0, 4), ['has_', 'had_', 'was_']) || in_array(substr($field_name, 0, 5), ['were_', 'have_']);
} | php | private function useShortGetterName($field_name)
{
return substr($field_name, 0, 3) === 'is_' || in_array(substr($field_name, 0, 4), ['has_', 'had_', 'was_']) || in_array(substr($field_name, 0, 5), ['were_', 'have_']);
} | [
"private",
"function",
"useShortGetterName",
"(",
"$",
"field_name",
")",
"{",
"return",
"substr",
"(",
"$",
"field_name",
",",
"0",
",",
"3",
")",
"===",
"'is_'",
"||",
"in_array",
"(",
"substr",
"(",
"$",
"field_name",
",",
"0",
",",
"4",
")",
",",
... | Return true if we should use a short getter name.
@param string $field_name
@return bool | [
"Return",
"true",
"if",
"we",
"should",
"use",
"a",
"short",
"getter",
"name",
"."
] | 4b2353c4422186bcfce63b3212da3e70e63eb5df | https://github.com/activecollab/databasestructure/blob/4b2353c4422186bcfce63b3212da3e70e63eb5df/src/Builder/BaseTypeClassBuilder.php#L536-L539 |
15,542 | activecollab/databasestructure | src/Builder/BaseTypeClassBuilder.php | BaseTypeClassBuilder.buildJsonSerialize | private function buildJsonSerialize(array $serialize, $indent, array &$result)
{
if (count($serialize)) {
$result[] = '';
$result[] = $indent . '/**';
$result[] = $indent . ' * Prepare object properties so they can be serialized to JSON.';
$result[] = $indent ... | php | private function buildJsonSerialize(array $serialize, $indent, array &$result)
{
if (count($serialize)) {
$result[] = '';
$result[] = $indent . '/**';
$result[] = $indent . ' * Prepare object properties so they can be serialized to JSON.';
$result[] = $indent ... | [
"private",
"function",
"buildJsonSerialize",
"(",
"array",
"$",
"serialize",
",",
"$",
"indent",
",",
"array",
"&",
"$",
"result",
")",
"{",
"if",
"(",
"count",
"(",
"$",
"serialize",
")",
")",
"{",
"$",
"result",
"[",
"]",
"=",
"''",
";",
"$",
"re... | Build JSON serialize method, if we need to serialize extra fields.
@param array $serialize
@param string $indent
@param array $result | [
"Build",
"JSON",
"serialize",
"method",
"if",
"we",
"need",
"to",
"serialize",
"extra",
"fields",
"."
] | 4b2353c4422186bcfce63b3212da3e70e63eb5df | https://github.com/activecollab/databasestructure/blob/4b2353c4422186bcfce63b3212da3e70e63eb5df/src/Builder/BaseTypeClassBuilder.php#L548-L568 |
15,543 | activecollab/databasestructure | src/Builder/BaseTypeClassBuilder.php | BaseTypeClassBuilder.buildValidatePresenceLinesForScalarField | private function buildValidatePresenceLinesForScalarField(ScalarField $field, $line_indent, array &$validator_lines)
{
if ($field instanceof RequiredInterface && $field instanceof UniqueInterface) {
if ($field->isRequired() && $field->isUnique()) {
$validator_lines[] = $line_inde... | php | private function buildValidatePresenceLinesForScalarField(ScalarField $field, $line_indent, array &$validator_lines)
{
if ($field instanceof RequiredInterface && $field instanceof UniqueInterface) {
if ($field->isRequired() && $field->isUnique()) {
$validator_lines[] = $line_inde... | [
"private",
"function",
"buildValidatePresenceLinesForScalarField",
"(",
"ScalarField",
"$",
"field",
",",
"$",
"line_indent",
",",
"array",
"&",
"$",
"validator_lines",
")",
"{",
"if",
"(",
"$",
"field",
"instanceof",
"RequiredInterface",
"&&",
"$",
"field",
"inst... | Build validate lines for scalar fields.
@param ScalarField $field
@param string $line_indent
@param array $validator_lines | [
"Build",
"validate",
"lines",
"for",
"scalar",
"fields",
"."
] | 4b2353c4422186bcfce63b3212da3e70e63eb5df | https://github.com/activecollab/databasestructure/blob/4b2353c4422186bcfce63b3212da3e70e63eb5df/src/Builder/BaseTypeClassBuilder.php#L628-L643 |
15,544 | activecollab/databasestructure | src/Builder/BaseTypeClassBuilder.php | BaseTypeClassBuilder.buildValidateUniquenessLine | private function buildValidateUniquenessLine($field_name, array $context)
{
$field_names = [var_export($field_name, true)];
foreach ($context as $v) {
$field_names[] = var_export($v, true);
}
return '$validator->unique(' . implode(', ', $field_names) . ');';
} | php | private function buildValidateUniquenessLine($field_name, array $context)
{
$field_names = [var_export($field_name, true)];
foreach ($context as $v) {
$field_names[] = var_export($v, true);
}
return '$validator->unique(' . implode(', ', $field_names) . ');';
} | [
"private",
"function",
"buildValidateUniquenessLine",
"(",
"$",
"field_name",
",",
"array",
"$",
"context",
")",
"{",
"$",
"field_names",
"=",
"[",
"var_export",
"(",
"$",
"field_name",
",",
"true",
")",
"]",
";",
"foreach",
"(",
"$",
"context",
"as",
"$",... | Build validator uniqueness line.
@param string $field_name
@param array $context
@return string | [
"Build",
"validator",
"uniqueness",
"line",
"."
] | 4b2353c4422186bcfce63b3212da3e70e63eb5df | https://github.com/activecollab/databasestructure/blob/4b2353c4422186bcfce63b3212da3e70e63eb5df/src/Builder/BaseTypeClassBuilder.php#L663-L672 |
15,545 | e0ipso/drupal-unit-autoload | src/AutoloaderBootstrap.php | AutoloaderBootstrap.registerDrupalPaths | protected function registerDrupalPaths($composer_config) {
if (empty($composer_config['class-location'])) {
return;
}
$this->loader->setClassMap((array) $composer_config['class-location']);
$this->load();
} | php | protected function registerDrupalPaths($composer_config) {
if (empty($composer_config['class-location'])) {
return;
}
$this->loader->setClassMap((array) $composer_config['class-location']);
$this->load();
} | [
"protected",
"function",
"registerDrupalPaths",
"(",
"$",
"composer_config",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"composer_config",
"[",
"'class-location'",
"]",
")",
")",
"{",
"return",
";",
"}",
"$",
"this",
"->",
"loader",
"->",
"setClassMap",
"(",
... | Register the path based autoloader.
@param object $composer_config
The Composer configuration. | [
"Register",
"the",
"path",
"based",
"autoloader",
"."
] | 7ce147b269c7333eca31e2cd04b736d6274b9cbf | https://github.com/e0ipso/drupal-unit-autoload/blob/7ce147b269c7333eca31e2cd04b736d6274b9cbf/src/AutoloaderBootstrap.php#L102-L108 |
15,546 | e0ipso/drupal-unit-autoload | src/AutoloaderBootstrap.php | AutoloaderBootstrap.registerPsr | protected function registerPsr(array $composer_config) {
$psr0 = $psr4 = array();
if (!empty($composer_config['psr-0'])) {
$psr0 = (array) $composer_config['psr-0'];
}
if (!empty($composer_config['psr-4'])) {
$psr4 = (array) $composer_config['psr-4'];
}
if (empty($psr4) && empty($psr... | php | protected function registerPsr(array $composer_config) {
$psr0 = $psr4 = array();
if (!empty($composer_config['psr-0'])) {
$psr0 = (array) $composer_config['psr-0'];
}
if (!empty($composer_config['psr-4'])) {
$psr4 = (array) $composer_config['psr-4'];
}
if (empty($psr4) && empty($psr... | [
"protected",
"function",
"registerPsr",
"(",
"array",
"$",
"composer_config",
")",
"{",
"$",
"psr0",
"=",
"$",
"psr4",
"=",
"array",
"(",
")",
";",
"if",
"(",
"!",
"empty",
"(",
"$",
"composer_config",
"[",
"'psr-0'",
"]",
")",
")",
"{",
"$",
"psr0",... | Use Composer's autoloader to register the PRS-0 and PSR-4 paths.
@param array $composer_config
The Composer configuration. | [
"Use",
"Composer",
"s",
"autoloader",
"to",
"register",
"the",
"PRS",
"-",
"0",
"and",
"PSR",
"-",
"4",
"paths",
"."
] | 7ce147b269c7333eca31e2cd04b736d6274b9cbf | https://github.com/e0ipso/drupal-unit-autoload/blob/7ce147b269c7333eca31e2cd04b736d6274b9cbf/src/AutoloaderBootstrap.php#L116-L132 |
15,547 | gintonicweb/GintonicCMS | src/Controller/Admin/UsersController.php | UsersController.index | public function index()
{
$action = $this->Crud->action();
$action->config('scaffold.fields_blacklist', ['created', 'modified']);
$this->Crud->execute();
} | php | public function index()
{
$action = $this->Crud->action();
$action->config('scaffold.fields_blacklist', ['created', 'modified']);
$this->Crud->execute();
} | [
"public",
"function",
"index",
"(",
")",
"{",
"$",
"action",
"=",
"$",
"this",
"->",
"Crud",
"->",
"action",
"(",
")",
";",
"$",
"action",
"->",
"config",
"(",
"'scaffold.fields_blacklist'",
",",
"[",
"'created'",
",",
"'modified'",
"]",
")",
";",
"$",... | Index method
Don't show created and modified fields
@return void | [
"Index",
"method",
"Don",
"t",
"show",
"created",
"and",
"modified",
"fields"
] | b34445fecea56a7d432d0f3e2f988cde8ead746b | https://github.com/gintonicweb/GintonicCMS/blob/b34445fecea56a7d432d0f3e2f988cde8ead746b/src/Controller/Admin/UsersController.php#L57-L62 |
15,548 | gintonicweb/GintonicCMS | src/Controller/Admin/UsersController.php | UsersController.view | public function view()
{
$action = $this->Crud->action();
$action->config('scaffold.relations', false);
$this->Crud->execute();
} | php | public function view()
{
$action = $this->Crud->action();
$action->config('scaffold.relations', false);
$this->Crud->execute();
} | [
"public",
"function",
"view",
"(",
")",
"{",
"$",
"action",
"=",
"$",
"this",
"->",
"Crud",
"->",
"action",
"(",
")",
";",
"$",
"action",
"->",
"config",
"(",
"'scaffold.relations'",
",",
"false",
")",
";",
"$",
"this",
"->",
"Crud",
"->",
"execute",... | View method
Related models are blacklisted because the role is already present in
the main user panel
@return void | [
"View",
"method",
"Related",
"models",
"are",
"blacklisted",
"because",
"the",
"role",
"is",
"already",
"present",
"in",
"the",
"main",
"user",
"panel"
] | b34445fecea56a7d432d0f3e2f988cde8ead746b | https://github.com/gintonicweb/GintonicCMS/blob/b34445fecea56a7d432d0f3e2f988cde8ead746b/src/Controller/Admin/UsersController.php#L71-L76 |
15,549 | bestit/commercetools-order-export-bundle | src/OrderVisitor.php | OrderVisitor.getNextOrderCollection | private function getNextOrderCollection(int $renderedArticleCount)
{
$count = $this->count();
$logger = $this->getLogger();
$orderCollection = null;
$withPagination = $this->withPagination();
$logger->debug(
'Tries to load the next order collection',
... | php | private function getNextOrderCollection(int $renderedArticleCount)
{
$count = $this->count();
$logger = $this->getLogger();
$orderCollection = null;
$withPagination = $this->withPagination();
$logger->debug(
'Tries to load the next order collection',
... | [
"private",
"function",
"getNextOrderCollection",
"(",
"int",
"$",
"renderedArticleCount",
")",
"{",
"$",
"count",
"=",
"$",
"this",
"->",
"count",
"(",
")",
";",
"$",
"logger",
"=",
"$",
"this",
"->",
"getLogger",
"(",
")",
";",
"$",
"orderCollection",
"... | Returns the next order collection or void.
@param int $renderedArticleCount How many articles are rendered allready.
@return OrderCollection|void | [
"Returns",
"the",
"next",
"order",
"collection",
"or",
"void",
"."
] | 44bd0dedff6edab5ecf5803dcf6d24ffe0dbf845 | https://github.com/bestit/commercetools-order-export-bundle/blob/44bd0dedff6edab5ecf5803dcf6d24ffe0dbf845/src/OrderVisitor.php#L151-L174 |
15,550 | bestit/commercetools-order-export-bundle | src/OrderVisitor.php | OrderVisitor.getTotalCount | private function getTotalCount(): int
{
if ($this->totalCount === -1) {
$this->setTotalCount($this->getLastResponse()->getTotal());
}
return $this->totalCount;
} | php | private function getTotalCount(): int
{
if ($this->totalCount === -1) {
$this->setTotalCount($this->getLastResponse()->getTotal());
}
return $this->totalCount;
} | [
"private",
"function",
"getTotalCount",
"(",
")",
":",
"int",
"{",
"if",
"(",
"$",
"this",
"->",
"totalCount",
"===",
"-",
"1",
")",
"{",
"$",
"this",
"->",
"setTotalCount",
"(",
"$",
"this",
"->",
"getLastResponse",
"(",
")",
"->",
"getTotal",
"(",
... | Returns the total count of found orders.
@return int | [
"Returns",
"the",
"total",
"count",
"of",
"found",
"orders",
"."
] | 44bd0dedff6edab5ecf5803dcf6d24ffe0dbf845 | https://github.com/bestit/commercetools-order-export-bundle/blob/44bd0dedff6edab5ecf5803dcf6d24ffe0dbf845/src/OrderVisitor.php#L206-L213 |
15,551 | bestit/commercetools-order-export-bundle | src/OrderVisitor.php | OrderVisitor.loadOrderCollection | private function loadOrderCollection(): OrderVisitor
{
$logger = $this->getLogger();
/** @var PagedQueryResponse $response */
$response = $this->getClient()->execute($this->getOrderQuery());
if ($response instanceof ErrorResponse) {
$logger->error('Got error response lo... | php | private function loadOrderCollection(): OrderVisitor
{
$logger = $this->getLogger();
/** @var PagedQueryResponse $response */
$response = $this->getClient()->execute($this->getOrderQuery());
if ($response instanceof ErrorResponse) {
$logger->error('Got error response lo... | [
"private",
"function",
"loadOrderCollection",
"(",
")",
":",
"OrderVisitor",
"{",
"$",
"logger",
"=",
"$",
"this",
"->",
"getLogger",
"(",
")",
";",
"/** @var PagedQueryResponse $response */",
"$",
"response",
"=",
"$",
"this",
"->",
"getClient",
"(",
")",
"->... | Loads the order collection.
@return OrderVisitor | [
"Loads",
"the",
"order",
"collection",
"."
] | 44bd0dedff6edab5ecf5803dcf6d24ffe0dbf845 | https://github.com/bestit/commercetools-order-export-bundle/blob/44bd0dedff6edab5ecf5803dcf6d24ffe0dbf845/src/OrderVisitor.php#L219-L239 |
15,552 | bestit/commercetools-order-export-bundle | src/OrderVisitor.php | OrderVisitor.loadOrderQuery | private function loadOrderQuery(): OrderVisitor
{
$logger = $this->getLogger();
$query = new OrderQueryRequest();
if ($wheres = $this->getDefaultWhere()) {
$logger->debug('Added where-clause to fech orders.', ['predicates' => $wheres]);
array_walk($wheres, function ... | php | private function loadOrderQuery(): OrderVisitor
{
$logger = $this->getLogger();
$query = new OrderQueryRequest();
if ($wheres = $this->getDefaultWhere()) {
$logger->debug('Added where-clause to fech orders.', ['predicates' => $wheres]);
array_walk($wheres, function ... | [
"private",
"function",
"loadOrderQuery",
"(",
")",
":",
"OrderVisitor",
"{",
"$",
"logger",
"=",
"$",
"this",
"->",
"getLogger",
"(",
")",
";",
"$",
"query",
"=",
"new",
"OrderQueryRequest",
"(",
")",
";",
"if",
"(",
"$",
"wheres",
"=",
"$",
"this",
... | Returns the order query request.
@return OrderVisitor | [
"Returns",
"the",
"order",
"query",
"request",
"."
] | 44bd0dedff6edab5ecf5803dcf6d24ffe0dbf845 | https://github.com/bestit/commercetools-order-export-bundle/blob/44bd0dedff6edab5ecf5803dcf6d24ffe0dbf845/src/OrderVisitor.php#L245-L263 |
15,553 | bestit/commercetools-order-export-bundle | src/OrderVisitor.php | OrderVisitor.withPagination | private function withPagination(bool $newStatus = true): bool
{
$oldStatus = $this->withPagination;
if (func_num_args()) {
$this->withPagination = $newStatus;
}
return $oldStatus;
} | php | private function withPagination(bool $newStatus = true): bool
{
$oldStatus = $this->withPagination;
if (func_num_args()) {
$this->withPagination = $newStatus;
}
return $oldStatus;
} | [
"private",
"function",
"withPagination",
"(",
"bool",
"$",
"newStatus",
"=",
"true",
")",
":",
"bool",
"{",
"$",
"oldStatus",
"=",
"$",
"this",
"->",
"withPagination",
";",
"if",
"(",
"func_num_args",
"(",
")",
")",
"{",
"$",
"this",
"->",
"withPaginatio... | Sets the pagination status for this list.
@param bool $newStatus
@return bool | [
"Sets",
"the",
"pagination",
"status",
"for",
"this",
"list",
"."
] | 44bd0dedff6edab5ecf5803dcf6d24ffe0dbf845 | https://github.com/bestit/commercetools-order-export-bundle/blob/44bd0dedff6edab5ecf5803dcf6d24ffe0dbf845/src/OrderVisitor.php#L342-L351 |
15,554 | bestit/commercetools-order-export-bundle | src/OrderVisitor.php | OrderVisitor.yieldOrders | public function yieldOrders()
{
$usedIndex = 0;
$orderCollection = $this->getOrderCollection();
while ($orderCollection && count($orderCollection)) {
foreach ($orderCollection as $order) {
set_time_limit(0);
yield $usedIndex++ => $order;
... | php | public function yieldOrders()
{
$usedIndex = 0;
$orderCollection = $this->getOrderCollection();
while ($orderCollection && count($orderCollection)) {
foreach ($orderCollection as $order) {
set_time_limit(0);
yield $usedIndex++ => $order;
... | [
"public",
"function",
"yieldOrders",
"(",
")",
"{",
"$",
"usedIndex",
"=",
"0",
";",
"$",
"orderCollection",
"=",
"$",
"this",
"->",
"getOrderCollection",
"(",
")",
";",
"while",
"(",
"$",
"orderCollection",
"&&",
"count",
"(",
"$",
"orderCollection",
")",... | Yields all found orders.
@return Generator | [
"Yields",
"all",
"found",
"orders",
"."
] | 44bd0dedff6edab5ecf5803dcf6d24ffe0dbf845 | https://github.com/bestit/commercetools-order-export-bundle/blob/44bd0dedff6edab5ecf5803dcf6d24ffe0dbf845/src/OrderVisitor.php#L357-L371 |
15,555 | ua1-labs/firebug | Fire/Bug.php | Bug.addPanel | public function addPanel(Panel $panel)
{
$id = $panel->getId();
if (!empty($this->_panels[$id])) {
throw new BugException('[FireBug] No panels exist with ID "' . $id . '".');
}
$this->_panels[$id] = $panel;
} | php | public function addPanel(Panel $panel)
{
$id = $panel->getId();
if (!empty($this->_panels[$id])) {
throw new BugException('[FireBug] No panels exist with ID "' . $id . '".');
}
$this->_panels[$id] = $panel;
} | [
"public",
"function",
"addPanel",
"(",
"Panel",
"$",
"panel",
")",
"{",
"$",
"id",
"=",
"$",
"panel",
"->",
"getId",
"(",
")",
";",
"if",
"(",
"!",
"empty",
"(",
"$",
"this",
"->",
"_panels",
"[",
"$",
"id",
"]",
")",
")",
"{",
"throw",
"new",
... | Adds a Fire\Bug\Panel object to the the array of panels.
@param \Fire\Bug\Panel $panel The panel you are adding to FireBug
@return void | [
"Adds",
"a",
"Fire",
"\\",
"Bug",
"\\",
"Panel",
"object",
"to",
"the",
"the",
"array",
"of",
"panels",
"."
] | 70a45b2c0bbf64978641eb07e5f3cddfc1951162 | https://github.com/ua1-labs/firebug/blob/70a45b2c0bbf64978641eb07e5f3cddfc1951162/Fire/Bug.php#L113-L120 |
15,556 | ua1-labs/firebug | Fire/Bug.php | Bug.render | public function render()
{
if ($this->_enabled) {
if (php_sapi_name() === 'cli') {
echo 'FireBug: ' . $this->getLoadTime() . ' milliseconds' . "\n";
} else {
ob_start();
include $this->_template;
$debugPanel = ob_get_con... | php | public function render()
{
if ($this->_enabled) {
if (php_sapi_name() === 'cli') {
echo 'FireBug: ' . $this->getLoadTime() . ' milliseconds' . "\n";
} else {
ob_start();
include $this->_template;
$debugPanel = ob_get_con... | [
"public",
"function",
"render",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_enabled",
")",
"{",
"if",
"(",
"php_sapi_name",
"(",
")",
"===",
"'cli'",
")",
"{",
"echo",
"'FireBug: '",
".",
"$",
"this",
"->",
"getLoadTime",
"(",
")",
".",
"' millise... | Method used to render FireBug.
@return void | [
"Method",
"used",
"to",
"render",
"FireBug",
"."
] | 70a45b2c0bbf64978641eb07e5f3cddfc1951162 | https://github.com/ua1-labs/firebug/blob/70a45b2c0bbf64978641eb07e5f3cddfc1951162/Fire/Bug.php#L174-L188 |
15,557 | comelyio/comely | src/Comely/IO/DependencyInjection/DependencyInjectionContainer.php | DependencyInjectionContainer.add | public function add(string $key, $object)
{
$key = self::ProcessKey(__METHOD__, $key);
$objectType = gettype($object);
switch ($objectType) {
case "object":
$this->repository->push($object, $key);
return true;
case "string":
... | php | public function add(string $key, $object)
{
$key = self::ProcessKey(__METHOD__, $key);
$objectType = gettype($object);
switch ($objectType) {
case "object":
$this->repository->push($object, $key);
return true;
case "string":
... | [
"public",
"function",
"add",
"(",
"string",
"$",
"key",
",",
"$",
"object",
")",
"{",
"$",
"key",
"=",
"self",
"::",
"ProcessKey",
"(",
"__METHOD__",
",",
"$",
"key",
")",
";",
"$",
"objectType",
"=",
"gettype",
"(",
"$",
"object",
")",
";",
"switc... | Store an instance or add new server
If second argument is an instance, it will be stored as-is.
If second argument is a class name (string), it will be added as service
and instance to Service will be returned
@param string $key
@param $object
@return Service|bool
@throws DependencyInjectionException
@throws Excepti... | [
"Store",
"an",
"instance",
"or",
"add",
"new",
"server"
] | 561ea7aef36fea347a1a79d3ee5597d4057ddf82 | https://github.com/comelyio/comely/blob/561ea7aef36fea347a1a79d3ee5597d4057ddf82/src/Comely/IO/DependencyInjection/DependencyInjectionContainer.php#L75-L90 |
15,558 | nicoSWD/put.io-api-v2 | src/PutIO/Engines/HTTP/NativeEngine.php | NativeEngine.request | public function request(
$method,
$url,
array $params = [],
$outFile = '',
$returnBool = \false,
$arrayKey = '',
$verifyPeer = \true
) {
list($url, $contextOptions) = $this->configureRequestOptions($url, $method, $params, $verifyPeer);
$fp = @... | php | public function request(
$method,
$url,
array $params = [],
$outFile = '',
$returnBool = \false,
$arrayKey = '',
$verifyPeer = \true
) {
list($url, $contextOptions) = $this->configureRequestOptions($url, $method, $params, $verifyPeer);
$fp = @... | [
"public",
"function",
"request",
"(",
"$",
"method",
",",
"$",
"url",
",",
"array",
"$",
"params",
"=",
"[",
"]",
",",
"$",
"outFile",
"=",
"''",
",",
"$",
"returnBool",
"=",
"\\",
"false",
",",
"$",
"arrayKey",
"=",
"''",
",",
"$",
"verifyPeer",
... | Makes an HTTP request to put.io's API and returns the response.
Relies on native PHP functions.
NOTE!! Due to restrictions, files must be loaded into the memory when
uploading. I don't recommend uploading large files using native
functions. Only use this if you absolutely must! Otherwise, the cURL
engine is much bette... | [
"Makes",
"an",
"HTTP",
"request",
"to",
"put",
".",
"io",
"s",
"API",
"and",
"returns",
"the",
"response",
".",
"Relies",
"on",
"native",
"PHP",
"functions",
"."
] | d91bedd91ea75793512a921bfd9aa83e86a6f0a7 | https://github.com/nicoSWD/put.io-api-v2/blob/d91bedd91ea75793512a921bfd9aa83e86a6f0a7/src/PutIO/Engines/HTTP/NativeEngine.php#L57-L72 |
15,559 | codeburnerframework/router | src/Matcher.php | Matcher.match | public function match($httpMethod, $path)
{
$path = $this->parsePath($path);
if (($route = $this->collector->findStaticRoute($httpMethod, $path)) ||
($route = $this->matchDynamicRoute($httpMethod, $path))) {
$route->setMatcher($this);
return $route;
}
... | php | public function match($httpMethod, $path)
{
$path = $this->parsePath($path);
if (($route = $this->collector->findStaticRoute($httpMethod, $path)) ||
($route = $this->matchDynamicRoute($httpMethod, $path))) {
$route->setMatcher($this);
return $route;
}
... | [
"public",
"function",
"match",
"(",
"$",
"httpMethod",
",",
"$",
"path",
")",
"{",
"$",
"path",
"=",
"$",
"this",
"->",
"parsePath",
"(",
"$",
"path",
")",
";",
"if",
"(",
"(",
"$",
"route",
"=",
"$",
"this",
"->",
"collector",
"->",
"findStaticRou... | Find a route that matches the given arguments.
@param string $httpMethod
@param string $path
@throws NotFoundException
@throws MethodNotAllowedException
@return Route | [
"Find",
"a",
"route",
"that",
"matches",
"the",
"given",
"arguments",
"."
] | 2b0e8030303dd08d3fadfc4c57aa37b184a408cd | https://github.com/codeburnerframework/router/blob/2b0e8030303dd08d3fadfc4c57aa37b184a408cd/src/Matcher.php#L71-L83 |
15,560 | codeburnerframework/router | src/Matcher.php | Matcher.matchDynamicRoute | protected function matchDynamicRoute($httpMethod, $path)
{
if ($routes = $this->collector->findDynamicRoutes($httpMethod, $path)) {
// cache the parser reference
$this->parser = $this->collector->getParser();
// chunk routes for smaller regex groups using the Sturges' For... | php | protected function matchDynamicRoute($httpMethod, $path)
{
if ($routes = $this->collector->findDynamicRoutes($httpMethod, $path)) {
// cache the parser reference
$this->parser = $this->collector->getParser();
// chunk routes for smaller regex groups using the Sturges' For... | [
"protected",
"function",
"matchDynamicRoute",
"(",
"$",
"httpMethod",
",",
"$",
"path",
")",
"{",
"if",
"(",
"$",
"routes",
"=",
"$",
"this",
"->",
"collector",
"->",
"findDynamicRoutes",
"(",
"$",
"httpMethod",
",",
"$",
"path",
")",
")",
"{",
"// cache... | Find and return the request dynamic route based on the compiled data and Path.
@param string $httpMethod
@param string $path
@return Route|false If the request match an array with the action and parameters will
be returned otherwise a false will. | [
"Find",
"and",
"return",
"the",
"request",
"dynamic",
"route",
"based",
"on",
"the",
"compiled",
"data",
"and",
"Path",
"."
] | 2b0e8030303dd08d3fadfc4c57aa37b184a408cd | https://github.com/codeburnerframework/router/blob/2b0e8030303dd08d3fadfc4c57aa37b184a408cd/src/Matcher.php#L95-L120 |
15,561 | codeburnerframework/router | src/Matcher.php | Matcher.buildRoute | protected function buildRoute(Route $route)
{
if ($route->getBlock()) {
return $route;
}
list($pattern, $params) = $this->parsePlaceholders($route->getPattern());
return $route->setPatternWithoutReset($pattern)->setParams($params)->setBlock(true);
} | php | protected function buildRoute(Route $route)
{
if ($route->getBlock()) {
return $route;
}
list($pattern, $params) = $this->parsePlaceholders($route->getPattern());
return $route->setPatternWithoutReset($pattern)->setParams($params)->setBlock(true);
} | [
"protected",
"function",
"buildRoute",
"(",
"Route",
"$",
"route",
")",
"{",
"if",
"(",
"$",
"route",
"->",
"getBlock",
"(",
")",
")",
"{",
"return",
"$",
"route",
";",
"}",
"list",
"(",
"$",
"pattern",
",",
"$",
"params",
")",
"=",
"$",
"this",
... | Parse the dynamic segments of the pattern and replace then for
corresponding regex.
@param Route $route
@return Route | [
"Parse",
"the",
"dynamic",
"segments",
"of",
"the",
"pattern",
"and",
"replace",
"then",
"for",
"corresponding",
"regex",
"."
] | 2b0e8030303dd08d3fadfc4c57aa37b184a408cd | https://github.com/codeburnerframework/router/blob/2b0e8030303dd08d3fadfc4c57aa37b184a408cd/src/Matcher.php#L130-L138 |
15,562 | codeburnerframework/router | src/Matcher.php | Matcher.buildGroup | protected function buildGroup(array $routes)
{
$groupCount = (int) $map = $regex = [];
foreach ($routes as $route) {
$params = $route->getParams();
$paramsCount = count($params);
$groupCount = max($groupCount, $paramsCount) + 1;
$... | php | protected function buildGroup(array $routes)
{
$groupCount = (int) $map = $regex = [];
foreach ($routes as $route) {
$params = $route->getParams();
$paramsCount = count($params);
$groupCount = max($groupCount, $paramsCount) + 1;
$... | [
"protected",
"function",
"buildGroup",
"(",
"array",
"$",
"routes",
")",
"{",
"$",
"groupCount",
"=",
"(",
"int",
")",
"$",
"map",
"=",
"$",
"regex",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"routes",
"as",
"$",
"route",
")",
"{",
"$",
"params",
... | Group several dynamic routes patterns into one big regex and maps
the routes to the pattern positions in the big regex.
@param Route[] $routes
@return array | [
"Group",
"several",
"dynamic",
"routes",
"patterns",
"into",
"one",
"big",
"regex",
"and",
"maps",
"the",
"routes",
"to",
"the",
"pattern",
"positions",
"in",
"the",
"big",
"regex",
"."
] | 2b0e8030303dd08d3fadfc4c57aa37b184a408cd | https://github.com/codeburnerframework/router/blob/2b0e8030303dd08d3fadfc4c57aa37b184a408cd/src/Matcher.php#L148-L161 |
15,563 | codeburnerframework/router | src/Matcher.php | Matcher.parsePlaceholders | protected function parsePlaceholders($pattern)
{
$params = [];
$parser = $this->parser;
preg_match_all("~" . $parser::DYNAMIC_REGEX . "~x", $pattern, $matches, PREG_SET_ORDER);
foreach ((array) $matches as $key => $match) {
$pattern = str_replace($match[0], isset($match... | php | protected function parsePlaceholders($pattern)
{
$params = [];
$parser = $this->parser;
preg_match_all("~" . $parser::DYNAMIC_REGEX . "~x", $pattern, $matches, PREG_SET_ORDER);
foreach ((array) $matches as $key => $match) {
$pattern = str_replace($match[0], isset($match... | [
"protected",
"function",
"parsePlaceholders",
"(",
"$",
"pattern",
")",
"{",
"$",
"params",
"=",
"[",
"]",
";",
"$",
"parser",
"=",
"$",
"this",
"->",
"parser",
";",
"preg_match_all",
"(",
"\"~\"",
".",
"$",
"parser",
"::",
"DYNAMIC_REGEX",
".",
"\"~x\""... | Parse an route pattern seeking for parameters and build the route regex.
@param string $pattern
@return array 0 => new route regex, 1 => map of parameter names | [
"Parse",
"an",
"route",
"pattern",
"seeking",
"for",
"parameters",
"and",
"build",
"the",
"route",
"regex",
"."
] | 2b0e8030303dd08d3fadfc4c57aa37b184a408cd | https://github.com/codeburnerframework/router/blob/2b0e8030303dd08d3fadfc4c57aa37b184a408cd/src/Matcher.php#L170-L183 |
15,564 | codeburnerframework/router | src/Matcher.php | Matcher.parsePath | protected function parsePath($path)
{
$path = parse_url(substr(strstr(";" . $path, ";" . $this->basepath), strlen(";" . $this->basepath)), PHP_URL_PATH);
if ($path === false) {
throw new Exception("Seriously malformed URL passed to route matcher.");
}
return $path;
... | php | protected function parsePath($path)
{
$path = parse_url(substr(strstr(";" . $path, ";" . $this->basepath), strlen(";" . $this->basepath)), PHP_URL_PATH);
if ($path === false) {
throw new Exception("Seriously malformed URL passed to route matcher.");
}
return $path;
... | [
"protected",
"function",
"parsePath",
"(",
"$",
"path",
")",
"{",
"$",
"path",
"=",
"parse_url",
"(",
"substr",
"(",
"strstr",
"(",
"\";\"",
".",
"$",
"path",
",",
"\";\"",
".",
"$",
"this",
"->",
"basepath",
")",
",",
"strlen",
"(",
"\";\"",
".",
... | Get only the path of a given url.
@param string $path The given URL
@throws Exception
@return string | [
"Get",
"only",
"the",
"path",
"of",
"a",
"given",
"url",
"."
] | 2b0e8030303dd08d3fadfc4c57aa37b184a408cd | https://github.com/codeburnerframework/router/blob/2b0e8030303dd08d3fadfc4c57aa37b184a408cd/src/Matcher.php#L194-L203 |
15,565 | codeburnerframework/router | src/Matcher.php | Matcher.matchSimilarRoute | protected function matchSimilarRoute($httpMethod, $path)
{
$dm = [];
if (($sm = $this->checkStaticRouteInOtherMethods($httpMethod, $path))
|| ($dm = $this->checkDynamicRouteInOtherMethods($httpMethod, $path))) {
throw new MethodNotAllowedException($httpMethod, $path, arr... | php | protected function matchSimilarRoute($httpMethod, $path)
{
$dm = [];
if (($sm = $this->checkStaticRouteInOtherMethods($httpMethod, $path))
|| ($dm = $this->checkDynamicRouteInOtherMethods($httpMethod, $path))) {
throw new MethodNotAllowedException($httpMethod, $path, arr... | [
"protected",
"function",
"matchSimilarRoute",
"(",
"$",
"httpMethod",
",",
"$",
"path",
")",
"{",
"$",
"dm",
"=",
"[",
"]",
";",
"if",
"(",
"(",
"$",
"sm",
"=",
"$",
"this",
"->",
"checkStaticRouteInOtherMethods",
"(",
"$",
"httpMethod",
",",
"$",
"pat... | Generate an HTTP error request with method not allowed or not found.
@param string $httpMethod
@param string $path
@throws NotFoundException
@throws MethodNotAllowedException | [
"Generate",
"an",
"HTTP",
"error",
"request",
"with",
"method",
"not",
"allowed",
"or",
"not",
"found",
"."
] | 2b0e8030303dd08d3fadfc4c57aa37b184a408cd | https://github.com/codeburnerframework/router/blob/2b0e8030303dd08d3fadfc4c57aa37b184a408cd/src/Matcher.php#L215-L225 |
15,566 | codeburnerframework/router | src/Matcher.php | Matcher.checkStaticRouteInOtherMethods | protected function checkStaticRouteInOtherMethods($targetHttpMethod, $path)
{
return array_filter($this->getHttpMethodsBut($targetHttpMethod), function ($httpMethod) use ($path) {
return (bool) $this->collector->findStaticRoute($httpMethod, $path);
});
} | php | protected function checkStaticRouteInOtherMethods($targetHttpMethod, $path)
{
return array_filter($this->getHttpMethodsBut($targetHttpMethod), function ($httpMethod) use ($path) {
return (bool) $this->collector->findStaticRoute($httpMethod, $path);
});
} | [
"protected",
"function",
"checkStaticRouteInOtherMethods",
"(",
"$",
"targetHttpMethod",
",",
"$",
"path",
")",
"{",
"return",
"array_filter",
"(",
"$",
"this",
"->",
"getHttpMethodsBut",
"(",
"$",
"targetHttpMethod",
")",
",",
"function",
"(",
"$",
"httpMethod",
... | Verify if a static route match in another method than the requested.
@param string $targetHttpMethod The HTTP method that must not be checked
@param string $path The Path that must be matched.
@return array | [
"Verify",
"if",
"a",
"static",
"route",
"match",
"in",
"another",
"method",
"than",
"the",
"requested",
"."
] | 2b0e8030303dd08d3fadfc4c57aa37b184a408cd | https://github.com/codeburnerframework/router/blob/2b0e8030303dd08d3fadfc4c57aa37b184a408cd/src/Matcher.php#L236-L241 |
15,567 | codeburnerframework/router | src/Matcher.php | Matcher.checkDynamicRouteInOtherMethods | protected function checkDynamicRouteInOtherMethods($targetHttpMethod, $path)
{
return array_filter($this->getHttpMethodsBut($targetHttpMethod), function ($httpMethod) use ($path) {
return (bool) $this->matchDynamicRoute($httpMethod, $path);
});
} | php | protected function checkDynamicRouteInOtherMethods($targetHttpMethod, $path)
{
return array_filter($this->getHttpMethodsBut($targetHttpMethod), function ($httpMethod) use ($path) {
return (bool) $this->matchDynamicRoute($httpMethod, $path);
});
} | [
"protected",
"function",
"checkDynamicRouteInOtherMethods",
"(",
"$",
"targetHttpMethod",
",",
"$",
"path",
")",
"{",
"return",
"array_filter",
"(",
"$",
"this",
"->",
"getHttpMethodsBut",
"(",
"$",
"targetHttpMethod",
")",
",",
"function",
"(",
"$",
"httpMethod",... | Verify if a dynamic route match in another method than the requested.
@param string $targetHttpMethod The HTTP method that must not be checked
@param string $path The Path that must be matched.
@return array | [
"Verify",
"if",
"a",
"dynamic",
"route",
"match",
"in",
"another",
"method",
"than",
"the",
"requested",
"."
] | 2b0e8030303dd08d3fadfc4c57aa37b184a408cd | https://github.com/codeburnerframework/router/blob/2b0e8030303dd08d3fadfc4c57aa37b184a408cd/src/Matcher.php#L252-L257 |
15,568 | JustBlackBird/jms-serializer-strict-json | src/Exception/TypeMismatchException.php | TypeMismatchException.fromValue | public static function fromValue(
$expected_type,
$actual_value,
DeserializationContext $context = null
) {
if (null !== $context && count($context->getCurrentPath()) > 0) {
$property = sprintf('property "%s" to be ', implode('.', $context->getCurrentPath()));
} e... | php | public static function fromValue(
$expected_type,
$actual_value,
DeserializationContext $context = null
) {
if (null !== $context && count($context->getCurrentPath()) > 0) {
$property = sprintf('property "%s" to be ', implode('.', $context->getCurrentPath()));
} e... | [
"public",
"static",
"function",
"fromValue",
"(",
"$",
"expected_type",
",",
"$",
"actual_value",
",",
"DeserializationContext",
"$",
"context",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"!==",
"$",
"context",
"&&",
"count",
"(",
"$",
"context",
"->",
"get... | A handy method for building exception instance.
@param string $expected_type
@param mixed $actual_value
@param DeserializationContext|null $context
@return TypeMismatchException | [
"A",
"handy",
"method",
"for",
"building",
"exception",
"instance",
"."
] | db1d1473ccb0de32dfb12ec89c89e028a515d61e | https://github.com/JustBlackBird/jms-serializer-strict-json/blob/db1d1473ccb0de32dfb12ec89c89e028a515d61e/src/Exception/TypeMismatchException.php#L33-L51 |
15,569 | avto-dev/app-version-laravel | src/AppVersionServiceProvider.php | AppVersionServiceProvider.registerAppVersionManager | protected function registerAppVersionManager()
{
$this->app->singleton(AppVersionManager::class, function (Application $app) {
$config = (array) $app
->make('config')
->get(static::getConfigRootKeyName());
return new AppVersionManager($config);
... | php | protected function registerAppVersionManager()
{
$this->app->singleton(AppVersionManager::class, function (Application $app) {
$config = (array) $app
->make('config')
->get(static::getConfigRootKeyName());
return new AppVersionManager($config);
... | [
"protected",
"function",
"registerAppVersionManager",
"(",
")",
"{",
"$",
"this",
"->",
"app",
"->",
"singleton",
"(",
"AppVersionManager",
"::",
"class",
",",
"function",
"(",
"Application",
"$",
"app",
")",
"{",
"$",
"config",
"=",
"(",
"array",
")",
"$"... | Register version manager instance.
@return void | [
"Register",
"version",
"manager",
"instance",
"."
] | 5cbf9df5981cadd2d5148c49c834cc17fb903c3f | https://github.com/avto-dev/app-version-laravel/blob/5cbf9df5981cadd2d5148c49c834cc17fb903c3f/src/AppVersionServiceProvider.php#L64-L76 |
15,570 | avto-dev/app-version-laravel | src/AppVersionServiceProvider.php | AppVersionServiceProvider.initializeConfigs | protected function initializeConfigs()
{
$this->mergeConfigFrom(static::getConfigPath(), static::getConfigRootKeyName());
$this->publishes([
realpath(static::getConfigPath()) => config_path(basename(static::getConfigPath())),
], 'config');
} | php | protected function initializeConfigs()
{
$this->mergeConfigFrom(static::getConfigPath(), static::getConfigRootKeyName());
$this->publishes([
realpath(static::getConfigPath()) => config_path(basename(static::getConfigPath())),
], 'config');
} | [
"protected",
"function",
"initializeConfigs",
"(",
")",
"{",
"$",
"this",
"->",
"mergeConfigFrom",
"(",
"static",
"::",
"getConfigPath",
"(",
")",
",",
"static",
"::",
"getConfigRootKeyName",
"(",
")",
")",
";",
"$",
"this",
"->",
"publishes",
"(",
"[",
"r... | Initialize configs.
@return void | [
"Initialize",
"configs",
"."
] | 5cbf9df5981cadd2d5148c49c834cc17fb903c3f | https://github.com/avto-dev/app-version-laravel/blob/5cbf9df5981cadd2d5148c49c834cc17fb903c3f/src/AppVersionServiceProvider.php#L113-L120 |
15,571 | contao-bootstrap/buttons | src/Netzmacht/Bootstrap/Buttons/ContentElement/ButtonsElement.php | ButtonsElement.compile | protected function compile()
{
if (!$this->bootstrap_buttonStyle) {
$this->bootstrap_buttonStyle = 'btn-default';
}
$buttons = Factory::createFromFieldset($this->bootstrap_buttons);
$buttons->eachChild(array($this, 'addButtonStyle'));
$this->Template->buttons = ... | php | protected function compile()
{
if (!$this->bootstrap_buttonStyle) {
$this->bootstrap_buttonStyle = 'btn-default';
}
$buttons = Factory::createFromFieldset($this->bootstrap_buttons);
$buttons->eachChild(array($this, 'addButtonStyle'));
$this->Template->buttons = ... | [
"protected",
"function",
"compile",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"bootstrap_buttonStyle",
")",
"{",
"$",
"this",
"->",
"bootstrap_buttonStyle",
"=",
"'btn-default'",
";",
"}",
"$",
"buttons",
"=",
"Factory",
"::",
"createFromFieldset",
"... | Compile the button toolbar.
@return void | [
"Compile",
"the",
"button",
"toolbar",
"."
] | f573a24c19ec059aae528a12ba46dfc993844201 | https://github.com/contao-bootstrap/buttons/blob/f573a24c19ec059aae528a12ba46dfc993844201/src/Netzmacht/Bootstrap/Buttons/ContentElement/ButtonsElement.php#L35-L45 |
15,572 | contao-bootstrap/buttons | src/Netzmacht/Bootstrap/Buttons/ContentElement/ButtonsElement.php | ButtonsElement.addButtonStyle | public function addButtonStyle($child)
{
if ($child instanceof Group || $child instanceof Toolbar) {
$child->eachChild(array($this, 'addButtonStyle'));
} else {
$class = $child->getAttribute('class');
$class = array_filter($class, function ($item) {
... | php | public function addButtonStyle($child)
{
if ($child instanceof Group || $child instanceof Toolbar) {
$child->eachChild(array($this, 'addButtonStyle'));
} else {
$class = $child->getAttribute('class');
$class = array_filter($class, function ($item) {
... | [
"public",
"function",
"addButtonStyle",
"(",
"$",
"child",
")",
"{",
"if",
"(",
"$",
"child",
"instanceof",
"Group",
"||",
"$",
"child",
"instanceof",
"Toolbar",
")",
"{",
"$",
"child",
"->",
"eachChild",
"(",
"array",
"(",
"$",
"this",
",",
"'addButtonS... | Add button style.
@param mixed $child Current child.
@return void | [
"Add",
"button",
"style",
"."
] | f573a24c19ec059aae528a12ba46dfc993844201 | https://github.com/contao-bootstrap/buttons/blob/f573a24c19ec059aae528a12ba46dfc993844201/src/Netzmacht/Bootstrap/Buttons/ContentElement/ButtonsElement.php#L54-L68 |
15,573 | nathancox/silverstripe-hasoneautocompletefield | src/forms/HasOneAutocompleteField.php | HasOneAutocompleteField.search | public function search(HTTPRequest $request)
{
// Check form field state
if($this->isDisabled() || $this->isReadonly()) {
return $this->httpError(403);
}
$query = $request->getVar('query');
// use callbacks if they're set, otherwise used this class's methods for... | php | public function search(HTTPRequest $request)
{
// Check form field state
if($this->isDisabled() || $this->isReadonly()) {
return $this->httpError(403);
}
$query = $request->getVar('query');
// use callbacks if they're set, otherwise used this class's methods for... | [
"public",
"function",
"search",
"(",
"HTTPRequest",
"$",
"request",
")",
"{",
"// Check form field state",
"if",
"(",
"$",
"this",
"->",
"isDisabled",
"(",
")",
"||",
"$",
"this",
"->",
"isReadonly",
"(",
")",
")",
"{",
"return",
"$",
"this",
"->",
"http... | The action that handles AJAX search requests
@param SS_HTTPRequest $request
@return json | [
"The",
"action",
"that",
"handles",
"AJAX",
"search",
"requests"
] | 862a971723dfc053ddb9c155defa32ab2bcd870e | https://github.com/nathancox/silverstripe-hasoneautocompletefield/blob/862a971723dfc053ddb9c155defa32ab2bcd870e/src/forms/HasOneAutocompleteField.php#L83-L106 |
15,574 | nathancox/silverstripe-hasoneautocompletefield | src/forms/HasOneAutocompleteField.php | HasOneAutocompleteField.getResults | protected function getResults($query)
{
$searchFields = ($this->getSearchFields() ?: singleton($this->sourceObject)->stat('searchable_fields'));
if(!$searchFields) {
throw new Exception(
sprintf('HasOneAutocompleteField: No searchable fields could be found for class "%s... | php | protected function getResults($query)
{
$searchFields = ($this->getSearchFields() ?: singleton($this->sourceObject)->stat('searchable_fields'));
if(!$searchFields) {
throw new Exception(
sprintf('HasOneAutocompleteField: No searchable fields could be found for class "%s... | [
"protected",
"function",
"getResults",
"(",
"$",
"query",
")",
"{",
"$",
"searchFields",
"=",
"(",
"$",
"this",
"->",
"getSearchFields",
"(",
")",
"?",
":",
"singleton",
"(",
"$",
"this",
"->",
"sourceObject",
")",
"->",
"stat",
"(",
"'searchable_fields'",... | Takes the search term and returns a DataList
@param string $query
@return DataList | [
"Takes",
"the",
"search",
"term",
"and",
"returns",
"a",
"DataList"
] | 862a971723dfc053ddb9c155defa32ab2bcd870e | https://github.com/nathancox/silverstripe-hasoneautocompletefield/blob/862a971723dfc053ddb9c155defa32ab2bcd870e/src/forms/HasOneAutocompleteField.php#L113-L138 |
15,575 | nathancox/silverstripe-hasoneautocompletefield | src/forms/HasOneAutocompleteField.php | HasOneAutocompleteField.processResults | protected function processResults($results)
{
$json = array();
foreach($results as $result) {
$name = $result->{$this->labelField};
$json[$result->ID] = array(
'name' => $name,
'currentString' => $this->getCurrentItemText($result)
... | php | protected function processResults($results)
{
$json = array();
foreach($results as $result) {
$name = $result->{$this->labelField};
$json[$result->ID] = array(
'name' => $name,
'currentString' => $this->getCurrentItemText($result)
... | [
"protected",
"function",
"processResults",
"(",
"$",
"results",
")",
"{",
"$",
"json",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"results",
"as",
"$",
"result",
")",
"{",
"$",
"name",
"=",
"$",
"result",
"->",
"{",
"$",
"this",
"->",
"label... | Takes the DataList of search results and returns the json to be sent to the front end.
@param DataList
@return json | [
"Takes",
"the",
"DataList",
"of",
"search",
"results",
"and",
"returns",
"the",
"json",
"to",
"be",
"sent",
"to",
"the",
"front",
"end",
"."
] | 862a971723dfc053ddb9c155defa32ab2bcd870e | https://github.com/nathancox/silverstripe-hasoneautocompletefield/blob/862a971723dfc053ddb9c155defa32ab2bcd870e/src/forms/HasOneAutocompleteField.php#L145-L158 |
15,576 | nathancox/silverstripe-hasoneautocompletefield | src/forms/HasOneAutocompleteField.php | HasOneAutocompleteField.getItem | function getItem()
{
$sourceObject = $this->sourceObject;
if ($this->value !== null) {
$item = $sourceObject::get()->byID($this->value);
} else {
$item = $sourceObject::create();
}
return $item;
} | php | function getItem()
{
$sourceObject = $this->sourceObject;
if ($this->value !== null) {
$item = $sourceObject::get()->byID($this->value);
} else {
$item = $sourceObject::create();
}
return $item;
} | [
"function",
"getItem",
"(",
")",
"{",
"$",
"sourceObject",
"=",
"$",
"this",
"->",
"sourceObject",
";",
"if",
"(",
"$",
"this",
"->",
"value",
"!==",
"null",
")",
"{",
"$",
"item",
"=",
"$",
"sourceObject",
"::",
"get",
"(",
")",
"->",
"byID",
"(",... | Get the currently selected object
@return DataObject | [
"Get",
"the",
"currently",
"selected",
"object"
] | 862a971723dfc053ddb9c155defa32ab2bcd870e | https://github.com/nathancox/silverstripe-hasoneautocompletefield/blob/862a971723dfc053ddb9c155defa32ab2bcd870e/src/forms/HasOneAutocompleteField.php#L302-L311 |
15,577 | dragosprotung/stc-core | src/Workout/SportGuesser.php | SportGuesser.guess | public static function guess(string $code) : string
{
switch (strtolower(trim($code))) {
case SportMapperInterface::RUNNING:
case 'run':
return SportMapperInterface::RUNNING;
case SportMapperInterface::CYCLING_SPORT:
case 'cycling':
... | php | public static function guess(string $code) : string
{
switch (strtolower(trim($code))) {
case SportMapperInterface::RUNNING:
case 'run':
return SportMapperInterface::RUNNING;
case SportMapperInterface::CYCLING_SPORT:
case 'cycling':
... | [
"public",
"static",
"function",
"guess",
"(",
"string",
"$",
"code",
")",
":",
"string",
"{",
"switch",
"(",
"strtolower",
"(",
"trim",
"(",
"$",
"code",
")",
")",
")",
"{",
"case",
"SportMapperInterface",
"::",
"RUNNING",
":",
"case",
"'run'",
":",
"r... | Get the sport code from the tracker sport code.
@param string $code The code from the tracker.
@return string | [
"Get",
"the",
"sport",
"code",
"from",
"the",
"tracker",
"sport",
"code",
"."
] | 9783e3414294f4ee555a1d538d2807269deeb9e7 | https://github.com/dragosprotung/stc-core/blob/9783e3414294f4ee555a1d538d2807269deeb9e7/src/Workout/SportGuesser.php#L18-L34 |
15,578 | czim/laravel-pxlcms | src/Sluggable/SluggableTrait.php | SluggableTrait.bootSluggableTrait | public static function bootSluggableTrait()
{
// cache config for this model
static::$slugsTable = config('pxlcms.slugs.table', 'cms_slugs');
static::$slugsColumn = config('pxlcms.slugs.column', 'slug');
static::$slugsEntryKey = config('pxlcms.slugs.keys.entry', 'ent... | php | public static function bootSluggableTrait()
{
// cache config for this model
static::$slugsTable = config('pxlcms.slugs.table', 'cms_slugs');
static::$slugsColumn = config('pxlcms.slugs.column', 'slug');
static::$slugsEntryKey = config('pxlcms.slugs.keys.entry', 'ent... | [
"public",
"static",
"function",
"bootSluggableTrait",
"(",
")",
"{",
"// cache config for this model",
"static",
"::",
"$",
"slugsTable",
"=",
"config",
"(",
"'pxlcms.slugs.table'",
",",
"'cms_slugs'",
")",
";",
"static",
"::",
"$",
"slugsColumn",
"=",
"config",
"... | Caches config on model boot | [
"Caches",
"config",
"on",
"model",
"boot"
] | 910297d2a3f2db86dde51b0e10fe5aad45f1aa1a | https://github.com/czim/laravel-pxlcms/blob/910297d2a3f2db86dde51b0e10fe5aad45f1aa1a/src/Sluggable/SluggableTrait.php#L32-L41 |
15,579 | czim/laravel-pxlcms | src/Sluggable/SluggableTrait.php | SluggableTrait.scopeWhereSlug | public function scopeWhereSlug($scope, $slug, $locale = null, $forHasQuery = false)
{
/** @var CmsModel|SluggableTrait $model */
$model = new static;
if ($model->storeSlugLocally()) {
return $this->CviebrockScopeWhereSlug($scope, $slug);
}
// build scope with jo... | php | public function scopeWhereSlug($scope, $slug, $locale = null, $forHasQuery = false)
{
/** @var CmsModel|SluggableTrait $model */
$model = new static;
if ($model->storeSlugLocally()) {
return $this->CviebrockScopeWhereSlug($scope, $slug);
}
// build scope with jo... | [
"public",
"function",
"scopeWhereSlug",
"(",
"$",
"scope",
",",
"$",
"slug",
",",
"$",
"locale",
"=",
"null",
",",
"$",
"forHasQuery",
"=",
"false",
")",
"{",
"/** @var CmsModel|SluggableTrait $model */",
"$",
"model",
"=",
"new",
"static",
";",
"if",
"(",
... | Query scope for finding a model by its slug.
@param Builder $scope
@param string $slug
@param string $locale if not set, matches for any locale
@param bool $forHasQuery if true, the scope is part of a has relation subquery
@return mixed | [
"Query",
"scope",
"for",
"finding",
"a",
"model",
"by",
"its",
"slug",
"."
] | 910297d2a3f2db86dde51b0e10fe5aad45f1aa1a | https://github.com/czim/laravel-pxlcms/blob/910297d2a3f2db86dde51b0e10fe5aad45f1aa1a/src/Sluggable/SluggableTrait.php#L91-L122 |
15,580 | czim/laravel-pxlcms | src/Sluggable/SluggableTrait.php | SluggableTrait.setSlug | protected function setSlug($slug)
{
$config = $this->getSluggableConfig();
$save_to = $config['save_to'];
if ($this->storeSlugLocally()) {
$this->setAttribute($save_to, $slug);
return;
}
$this->setSlugInCmsTable($slug);
} | php | protected function setSlug($slug)
{
$config = $this->getSluggableConfig();
$save_to = $config['save_to'];
if ($this->storeSlugLocally()) {
$this->setAttribute($save_to, $slug);
return;
}
$this->setSlugInCmsTable($slug);
} | [
"protected",
"function",
"setSlug",
"(",
"$",
"slug",
")",
"{",
"$",
"config",
"=",
"$",
"this",
"->",
"getSluggableConfig",
"(",
")",
";",
"$",
"save_to",
"=",
"$",
"config",
"[",
"'save_to'",
"]",
";",
"if",
"(",
"$",
"this",
"->",
"storeSlugLocally"... | Set the slug manually.
@param string $slug | [
"Set",
"the",
"slug",
"manually",
"."
] | 910297d2a3f2db86dde51b0e10fe5aad45f1aa1a | https://github.com/czim/laravel-pxlcms/blob/910297d2a3f2db86dde51b0e10fe5aad45f1aa1a/src/Sluggable/SluggableTrait.php#L130-L141 |
15,581 | czim/laravel-pxlcms | src/Sluggable/SluggableTrait.php | SluggableTrait.getSlugRecordFromCmsTable | protected function getSlugRecordFromCmsTable()
{
/** @var CmsModel|SluggableTrait $this */
$languageId = $this->storeSlugForLanguageId();
$entryId = $this->isTranslationModel()
? $this->getAttribute(config('pxlcms.translatable.translation_foreign_key'))
: $this-... | php | protected function getSlugRecordFromCmsTable()
{
/** @var CmsModel|SluggableTrait $this */
$languageId = $this->storeSlugForLanguageId();
$entryId = $this->isTranslationModel()
? $this->getAttribute(config('pxlcms.translatable.translation_foreign_key'))
: $this-... | [
"protected",
"function",
"getSlugRecordFromCmsTable",
"(",
")",
"{",
"/** @var CmsModel|SluggableTrait $this */",
"$",
"languageId",
"=",
"$",
"this",
"->",
"storeSlugForLanguageId",
"(",
")",
";",
"$",
"entryId",
"=",
"$",
"this",
"->",
"isTranslationModel",
"(",
"... | Returns current slug from CMS slugs table
@return object|null | [
"Returns",
"current",
"slug",
"from",
"CMS",
"slugs",
"table"
] | 910297d2a3f2db86dde51b0e10fe5aad45f1aa1a | https://github.com/czim/laravel-pxlcms/blob/910297d2a3f2db86dde51b0e10fe5aad45f1aa1a/src/Sluggable/SluggableTrait.php#L186-L222 |
15,582 | czim/laravel-pxlcms | src/Sluggable/SluggableTrait.php | SluggableTrait.getAllSlugsForModuleFromCmsTable | protected function getAllSlugsForModuleFromCmsTable($likeSlug = null, $limitToLanguage = true)
{
/** @var CmsModel|SluggableTrait $this */
$config = $this->getSluggableConfig();
$includeTrashed = $config['include_trashed'];
$separator = $config['separator'];
$... | php | protected function getAllSlugsForModuleFromCmsTable($likeSlug = null, $limitToLanguage = true)
{
/** @var CmsModel|SluggableTrait $this */
$config = $this->getSluggableConfig();
$includeTrashed = $config['include_trashed'];
$separator = $config['separator'];
$... | [
"protected",
"function",
"getAllSlugsForModuleFromCmsTable",
"(",
"$",
"likeSlug",
"=",
"null",
",",
"$",
"limitToLanguage",
"=",
"true",
")",
"{",
"/** @var CmsModel|SluggableTrait $this */",
"$",
"config",
"=",
"$",
"this",
"->",
"getSluggableConfig",
"(",
")",
";... | Returns current slugs for this module from CMS slugs table
@param string $likeSlug if set, only returns slugs that are like the string
@param bool $limitToLanguage if true, only returns matches within the language
@return null|object | [
"Returns",
"current",
"slugs",
"for",
"this",
"module",
"from",
"CMS",
"slugs",
"table"
] | 910297d2a3f2db86dde51b0e10fe5aad45f1aa1a | https://github.com/czim/laravel-pxlcms/blob/910297d2a3f2db86dde51b0e10fe5aad45f1aa1a/src/Sluggable/SluggableTrait.php#L266-L297 |
15,583 | czim/laravel-pxlcms | src/Sluggable/SluggableTrait.php | SluggableTrait.storeSlugForLanguageId | protected function storeSlugForLanguageId()
{
/** @var CmsModel|SluggableTrait $this */
$config = $this->getSluggableConfig();
$languageKey = array_get($config, 'language_key');
$localeKey = array_get($config, 'locale_key');
if ($languageKey) {
return $th... | php | protected function storeSlugForLanguageId()
{
/** @var CmsModel|SluggableTrait $this */
$config = $this->getSluggableConfig();
$languageKey = array_get($config, 'language_key');
$localeKey = array_get($config, 'locale_key');
if ($languageKey) {
return $th... | [
"protected",
"function",
"storeSlugForLanguageId",
"(",
")",
"{",
"/** @var CmsModel|SluggableTrait $this */",
"$",
"config",
"=",
"$",
"this",
"->",
"getSluggableConfig",
"(",
")",
";",
"$",
"languageKey",
"=",
"array_get",
"(",
"$",
"config",
",",
"'language_key'"... | Returns the language_id to store slugs for
@return string | [
"Returns",
"the",
"language_id",
"to",
"store",
"slugs",
"for"
] | 910297d2a3f2db86dde51b0e10fe5aad45f1aa1a | https://github.com/czim/laravel-pxlcms/blob/910297d2a3f2db86dde51b0e10fe5aad45f1aa1a/src/Sluggable/SluggableTrait.php#L365-L382 |
15,584 | Wonail/wocenter | actions/FlushCache.php | FlushCache.flushCache | protected function flushCache(Module $current = null)
{
$message = '';
if ($current === null) {
$current = Yii::$app;
}
$modules = $current->getModules();
foreach ($modules as $moduleName => $module) {
if (is_array($module)) {
$module =... | php | protected function flushCache(Module $current = null)
{
$message = '';
if ($current === null) {
$current = Yii::$app;
}
$modules = $current->getModules();
foreach ($modules as $moduleName => $module) {
if (is_array($module)) {
$module =... | [
"protected",
"function",
"flushCache",
"(",
"Module",
"$",
"current",
"=",
"null",
")",
"{",
"$",
"message",
"=",
"''",
";",
"if",
"(",
"$",
"current",
"===",
"null",
")",
"{",
"$",
"current",
"=",
"Yii",
"::",
"$",
"app",
";",
"}",
"$",
"modules",... | Recursive flush all app cache
@param null|Module $current Current Module
@return string execute message | [
"Recursive",
"flush",
"all",
"app",
"cache"
] | 186c15aad008d32fbf5ad75256cf01581dccf9e6 | https://github.com/Wonail/wocenter/blob/186c15aad008d32fbf5ad75256cf01581dccf9e6/actions/FlushCache.php#L40-L73 |
15,585 | JoffreyPoreeCoding/MongoDB-ODM | src/Tools/ArrayModifier.php | ArrayModifier.aggregate | public static function aggregate($array, $specialKeys = self::SPECIALS_KEYS, $prefix = '')
{
$new = [];
foreach ($array as $key => $value) {
$newKey = (!empty($prefix)) ? $prefix . '.' . $key : $key;
if (!in_array($key, $specialKeys, true) && !in_array($key, array_keys($speci... | php | public static function aggregate($array, $specialKeys = self::SPECIALS_KEYS, $prefix = '')
{
$new = [];
foreach ($array as $key => $value) {
$newKey = (!empty($prefix)) ? $prefix . '.' . $key : $key;
if (!in_array($key, $specialKeys, true) && !in_array($key, array_keys($speci... | [
"public",
"static",
"function",
"aggregate",
"(",
"$",
"array",
",",
"$",
"specialKeys",
"=",
"self",
"::",
"SPECIALS_KEYS",
",",
"$",
"prefix",
"=",
"''",
")",
"{",
"$",
"new",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"array",
"as",
"$",
"key",
"=... | Aggregate an array to dot notation
@param array $array Input array
@param array $specialKeys array of key to not aggregate
@param string $prefix prefix
@return array | [
"Aggregate",
"an",
"array",
"to",
"dot",
"notation"
] | 56fd7ab28c22f276573a89d56bb93c8d74ad7f74 | https://github.com/JoffreyPoreeCoding/MongoDB-ODM/blob/56fd7ab28c22f276573a89d56bb93c8d74ad7f74/src/Tools/ArrayModifier.php#L44-L67 |
15,586 | JoffreyPoreeCoding/MongoDB-ODM | src/Tools/ArrayModifier.php | ArrayModifier.disaggregate | public static function disaggregate($array)
{
$new = [];
foreach ($array as $key => $val) {
if (false !== strpos($key, ".")) {
list($realKey, $aggregated) = explode(".", $key, 2);
$values = self::getDisaggregatedValues(preg_grep("/^$realKey/", array_keys($... | php | public static function disaggregate($array)
{
$new = [];
foreach ($array as $key => $val) {
if (false !== strpos($key, ".")) {
list($realKey, $aggregated) = explode(".", $key, 2);
$values = self::getDisaggregatedValues(preg_grep("/^$realKey/", array_keys($... | [
"public",
"static",
"function",
"disaggregate",
"(",
"$",
"array",
")",
"{",
"$",
"new",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"array",
"as",
"$",
"key",
"=>",
"$",
"val",
")",
"{",
"if",
"(",
"false",
"!==",
"strpos",
"(",
"$",
"key",
",",
... | Disaggreate a dot notation array to an multi-dimensionnal array
@param array $array Dot notation array
@return void | [
"Disaggreate",
"a",
"dot",
"notation",
"array",
"to",
"an",
"multi",
"-",
"dimensionnal",
"array"
] | 56fd7ab28c22f276573a89d56bb93c8d74ad7f74 | https://github.com/JoffreyPoreeCoding/MongoDB-ODM/blob/56fd7ab28c22f276573a89d56bb93c8d74ad7f74/src/Tools/ArrayModifier.php#L75-L89 |
15,587 | JoffreyPoreeCoding/MongoDB-ODM | src/Tools/ArrayModifier.php | ArrayModifier.getDisaggregatedValues | private static function getDisaggregatedValues($keys, $array)
{
$values = [];
foreach ($keys as $key) {
$realKey = explode(".", $key, 2)[1];
$values[$realKey] = $array[$key];
}
return $values;
} | php | private static function getDisaggregatedValues($keys, $array)
{
$values = [];
foreach ($keys as $key) {
$realKey = explode(".", $key, 2)[1];
$values[$realKey] = $array[$key];
}
return $values;
} | [
"private",
"static",
"function",
"getDisaggregatedValues",
"(",
"$",
"keys",
",",
"$",
"array",
")",
"{",
"$",
"values",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"keys",
"as",
"$",
"key",
")",
"{",
"$",
"realKey",
"=",
"explode",
"(",
"\".\"",
",",
... | Get values of disaggregated array
@param array $keys Key
@param array $array Array to disaggegate
@return array | [
"Get",
"values",
"of",
"disaggregated",
"array"
] | 56fd7ab28c22f276573a89d56bb93c8d74ad7f74 | https://github.com/JoffreyPoreeCoding/MongoDB-ODM/blob/56fd7ab28c22f276573a89d56bb93c8d74ad7f74/src/Tools/ArrayModifier.php#L98-L106 |
15,588 | acasademont/wurfl | WURFL/Handlers/Handler.php | WURFL_Handlers_Handler.match | public function match(WURFL_Request_GenericRequest $request)
{
if ($this->canHandle($request->userAgentNormalized)) {
return $this->applyMatch($request);
}
if (isset($this->nextHandler)) {
return $this->nextHandler->match($request);
}
... | php | public function match(WURFL_Request_GenericRequest $request)
{
if ($this->canHandle($request->userAgentNormalized)) {
return $this->applyMatch($request);
}
if (isset($this->nextHandler)) {
return $this->nextHandler->match($request);
}
... | [
"public",
"function",
"match",
"(",
"WURFL_Request_GenericRequest",
"$",
"request",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"canHandle",
"(",
"$",
"request",
"->",
"userAgentNormalized",
")",
")",
"{",
"return",
"$",
"this",
"->",
"applyMatch",
"(",
"$",
"... | Finds the device id for the given request - if it is not found it
delegates to the next available handler
@param WURFL_Request_GenericRequest $request
@return string WURFL Device ID for matching device | [
"Finds",
"the",
"device",
"id",
"for",
"the",
"given",
"request",
"-",
"if",
"it",
"is",
"not",
"found",
"it",
"delegates",
"to",
"the",
"next",
"available",
"handler"
] | 0f4fb6e06b452ba95ad1d15e7d8226d0974b60c2 | https://github.com/acasademont/wurfl/blob/0f4fb6e06b452ba95ad1d15e7d8226d0974b60c2/WURFL/Handlers/Handler.php#L211-L222 |
15,589 | AbuseIO/parser-spamcop | src/Spamcop.php | Spamcop.parseSummaryReport | public function parseSummaryReport()
{
$reports = [ ];
preg_match_all(
"/^\s*".
"(?<ip>[a-f0-9:\.]+)\s+".
"(?<date>\w+\s+\d+\s\d+)h\/".
"(?<days>\d+)\s+".
"(?<trap>\d+)\s+".
"(?<user>\d+)\s+".
"(?<mole>\d+)\s+".
... | php | public function parseSummaryReport()
{
$reports = [ ];
preg_match_all(
"/^\s*".
"(?<ip>[a-f0-9:\.]+)\s+".
"(?<date>\w+\s+\d+\s\d+)h\/".
"(?<days>\d+)\s+".
"(?<trap>\d+)\s+".
"(?<user>\d+)\s+".
"(?<mole>\d+)\s+".
... | [
"public",
"function",
"parseSummaryReport",
"(",
")",
"{",
"$",
"reports",
"=",
"[",
"]",
";",
"preg_match_all",
"(",
"\"/^\\s*\"",
".",
"\"(?<ip>[a-f0-9:\\.]+)\\s+\"",
".",
"\"(?<date>\\w+\\s+\\d+\\s\\d+)h\\/\"",
".",
"\"(?<days>\\d+)\\s+\"",
".",
"\"(?<trap>\\d+)\\s+\""... | This is a spamcop formatted summery with a multiple incidents
@return array $reports | [
"This",
"is",
"a",
"spamcop",
"formatted",
"summery",
"with",
"a",
"multiple",
"incidents"
] | 6745d54bfee747b66af6e7332a59d554de3d8253 | https://github.com/AbuseIO/parser-spamcop/blob/6745d54bfee747b66af6e7332a59d554de3d8253/src/Spamcop.php#L105-L141 |
15,590 | AbuseIO/parser-spamcop | src/Spamcop.php | Spamcop.parseAlerts | public function parseAlerts()
{
$reports = [ ];
preg_match_all(
'/\s*(?<ip>[a-f0-9:\.]+)/',
// Someone from spamcop found it funny to prefix IPv6 addresses, so lets strip that off
str_replace('IPv6 ', '', $this->parsedMail->getMessageBody()),
$matche... | php | public function parseAlerts()
{
$reports = [ ];
preg_match_all(
'/\s*(?<ip>[a-f0-9:\.]+)/',
// Someone from spamcop found it funny to prefix IPv6 addresses, so lets strip that off
str_replace('IPv6 ', '', $this->parsedMail->getMessageBody()),
$matche... | [
"public",
"function",
"parseAlerts",
"(",
")",
"{",
"$",
"reports",
"=",
"[",
"]",
";",
"preg_match_all",
"(",
"'/\\s*(?<ip>[a-f0-9:\\.]+)/'",
",",
"// Someone from spamcop found it funny to prefix IPv6 addresses, so lets strip that off",
"str_replace",
"(",
"'IPv6 '",
",",
... | This is a spamcop formatted alert with a multiple incidents
@return array $reports | [
"This",
"is",
"a",
"spamcop",
"formatted",
"alert",
"with",
"a",
"multiple",
"incidents"
] | 6745d54bfee747b66af6e7332a59d554de3d8253 | https://github.com/AbuseIO/parser-spamcop/blob/6745d54bfee747b66af6e7332a59d554de3d8253/src/Spamcop.php#L149-L179 |
15,591 | AbuseIO/parser-spamcop | src/Spamcop.php | Spamcop.parseSpamReportCustom | public function parseSpamReportCustom()
{
$reports = [ ];
$body = $this->parsedMail->getMessageBody();
// Grab the message part from the body
preg_match(
'/(\[ SpamCop V[0-9\.\]\ ]*+)\r?\n(?<message>.*)\r?\n\[ Offending message \]/s',
$body,
$mat... | php | public function parseSpamReportCustom()
{
$reports = [ ];
$body = $this->parsedMail->getMessageBody();
// Grab the message part from the body
preg_match(
'/(\[ SpamCop V[0-9\.\]\ ]*+)\r?\n(?<message>.*)\r?\n\[ Offending message \]/s',
$body,
$mat... | [
"public",
"function",
"parseSpamReportCustom",
"(",
")",
"{",
"$",
"reports",
"=",
"[",
"]",
";",
"$",
"body",
"=",
"$",
"this",
"->",
"parsedMail",
"->",
"getMessageBody",
"(",
")",
";",
"// Grab the message part from the body",
"preg_match",
"(",
"'/(\\[ SpamC... | This is a spamcop formatted mail with a single incident
@return array $reports | [
"This",
"is",
"a",
"spamcop",
"formatted",
"mail",
"with",
"a",
"single",
"incident"
] | 6745d54bfee747b66af6e7332a59d554de3d8253 | https://github.com/AbuseIO/parser-spamcop/blob/6745d54bfee747b66af6e7332a59d554de3d8253/src/Spamcop.php#L187-L261 |
15,592 | AbuseIO/parser-spamcop | src/Spamcop.php | Spamcop.parseSpamReportArf | public function parseSpamReportArf()
{
$reports = [ ];
//Seriously spamcop? Newlines arent in the CL specifications
$this->arfMail['report'] = str_replace("\r", "", $this->arfMail['report']);
preg_match_all('/([\w\-]+): (.*)[ ]*\r?\n/', $this->arfMail['report'], $regs);
$re... | php | public function parseSpamReportArf()
{
$reports = [ ];
//Seriously spamcop? Newlines arent in the CL specifications
$this->arfMail['report'] = str_replace("\r", "", $this->arfMail['report']);
preg_match_all('/([\w\-]+): (.*)[ ]*\r?\n/', $this->arfMail['report'], $regs);
$re... | [
"public",
"function",
"parseSpamReportArf",
"(",
")",
"{",
"$",
"reports",
"=",
"[",
"]",
";",
"//Seriously spamcop? Newlines arent in the CL specifications",
"$",
"this",
"->",
"arfMail",
"[",
"'report'",
"]",
"=",
"str_replace",
"(",
"\"\\r\"",
",",
"\"\"",
",",... | This is a ARF mail with a single incident
@return array $reports | [
"This",
"is",
"a",
"ARF",
"mail",
"with",
"a",
"single",
"incident"
] | 6745d54bfee747b66af6e7332a59d554de3d8253 | https://github.com/AbuseIO/parser-spamcop/blob/6745d54bfee747b66af6e7332a59d554de3d8253/src/Spamcop.php#L269-L333 |
15,593 | vincentchalamon/VinceCmsSonataAdminBundle | Controller/MenuController.php | MenuController.upAction | public function upAction(Request $request)
{
/** @var MenuRepository $repo */
$repo = $this->get('vince_cms.repository.menu');
/** @var Menu $menu */
$menu = $repo->find($request->get('id'));
if ($menu->getParent()) {
$repo->moveUp($menu);
}
retur... | php | public function upAction(Request $request)
{
/** @var MenuRepository $repo */
$repo = $this->get('vince_cms.repository.menu');
/** @var Menu $menu */
$menu = $repo->find($request->get('id'));
if ($menu->getParent()) {
$repo->moveUp($menu);
}
retur... | [
"public",
"function",
"upAction",
"(",
"Request",
"$",
"request",
")",
"{",
"/** @var MenuRepository $repo */",
"$",
"repo",
"=",
"$",
"this",
"->",
"get",
"(",
"'vince_cms.repository.menu'",
")",
";",
"/** @var Menu $menu */",
"$",
"menu",
"=",
"$",
"repo",
"->... | Move menu up
@author Vincent Chalamon <[email protected]>
@param Request $request
@return \Symfony\Component\HttpFoundation\RedirectResponse | [
"Move",
"menu",
"up"
] | edc768061734a92ba116488dd7b61ad40af21ceb | https://github.com/vincentchalamon/VinceCmsSonataAdminBundle/blob/edc768061734a92ba116488dd7b61ad40af21ceb/Controller/MenuController.php#L31-L42 |
15,594 | vincentchalamon/VinceCmsSonataAdminBundle | Controller/MenuController.php | MenuController.downAction | public function downAction(Request $request)
{
/** @var MenuRepository $repo */
$repo = $this->get('vince_cms.repository.menu');
/** @var Menu $menu */
$menu = $repo->find($request->get('id'));
if ($menu->getParent()) {
$repo->moveDown($menu);
}
r... | php | public function downAction(Request $request)
{
/** @var MenuRepository $repo */
$repo = $this->get('vince_cms.repository.menu');
/** @var Menu $menu */
$menu = $repo->find($request->get('id'));
if ($menu->getParent()) {
$repo->moveDown($menu);
}
r... | [
"public",
"function",
"downAction",
"(",
"Request",
"$",
"request",
")",
"{",
"/** @var MenuRepository $repo */",
"$",
"repo",
"=",
"$",
"this",
"->",
"get",
"(",
"'vince_cms.repository.menu'",
")",
";",
"/** @var Menu $menu */",
"$",
"menu",
"=",
"$",
"repo",
"... | Move menu down
@author Vincent Chalamon <[email protected]>
@param Request $request
@return \Symfony\Component\HttpFoundation\RedirectResponse | [
"Move",
"menu",
"down"
] | edc768061734a92ba116488dd7b61ad40af21ceb | https://github.com/vincentchalamon/VinceCmsSonataAdminBundle/blob/edc768061734a92ba116488dd7b61ad40af21ceb/Controller/MenuController.php#L53-L64 |
15,595 | crossjoin/Css | src/Crossjoin/Css/Format/Rule/TraitIsValid.php | TraitIsValid.setIsValid | public function setIsValid($isValid)
{
if (is_bool($isValid)) {
$this->isValid = $isValid;
} else {
throw new \InvalidArgumentException(
"Invalid value '" . $isValid . "' for argument 'isValid' given."
);
}
return $this;
} | php | public function setIsValid($isValid)
{
if (is_bool($isValid)) {
$this->isValid = $isValid;
} else {
throw new \InvalidArgumentException(
"Invalid value '" . $isValid . "' for argument 'isValid' given."
);
}
return $this;
} | [
"public",
"function",
"setIsValid",
"(",
"$",
"isValid",
")",
"{",
"if",
"(",
"is_bool",
"(",
"$",
"isValid",
")",
")",
"{",
"$",
"this",
"->",
"isValid",
"=",
"$",
"isValid",
";",
"}",
"else",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"("... | Sets the validation status.
@param bool $isValid
@return $this | [
"Sets",
"the",
"validation",
"status",
"."
] | 7b50ca94c4bdad60d01cfa327f00b7a600d6f9f3 | https://github.com/crossjoin/Css/blob/7b50ca94c4bdad60d01cfa327f00b7a600d6f9f3/src/Crossjoin/Css/Format/Rule/TraitIsValid.php#L22-L33 |
15,596 | crossjoin/Css | src/Crossjoin/Css/Format/Rule/TraitIsValid.php | TraitIsValid.addValidationError | public function addValidationError($errorMessage)
{
if (is_string($errorMessage)) {
$this->validationErrors[] = $errorMessage;
} else {
throw new \InvalidArgumentException(
"Invalid type '" . gettype($errorMessage). "' for argument 'errorMessage' given."
... | php | public function addValidationError($errorMessage)
{
if (is_string($errorMessage)) {
$this->validationErrors[] = $errorMessage;
} else {
throw new \InvalidArgumentException(
"Invalid type '" . gettype($errorMessage). "' for argument 'errorMessage' given."
... | [
"public",
"function",
"addValidationError",
"(",
"$",
"errorMessage",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"errorMessage",
")",
")",
"{",
"$",
"this",
"->",
"validationErrors",
"[",
"]",
"=",
"$",
"errorMessage",
";",
"}",
"else",
"{",
"throw",
"n... | Adds a validation error message.
@param string $errorMessage
@return $this | [
"Adds",
"a",
"validation",
"error",
"message",
"."
] | 7b50ca94c4bdad60d01cfa327f00b7a600d6f9f3 | https://github.com/crossjoin/Css/blob/7b50ca94c4bdad60d01cfa327f00b7a600d6f9f3/src/Crossjoin/Css/Format/Rule/TraitIsValid.php#L51-L62 |
15,597 | phpalchemy/cerberus | src/Alchemy/Component/Cerberus/Model/Base/LogQuery.php | LogQuery.filterByDateTime | public function filterByDateTime($dateTime = null, $comparison = null)
{
if (is_array($dateTime)) {
$useMinMax = false;
if (isset($dateTime['min'])) {
$this->addUsingAlias(LogTableMap::COL_DATE_TIME, $dateTime['min'], Criteria::GREATER_EQUAL);
$useMinM... | php | public function filterByDateTime($dateTime = null, $comparison = null)
{
if (is_array($dateTime)) {
$useMinMax = false;
if (isset($dateTime['min'])) {
$this->addUsingAlias(LogTableMap::COL_DATE_TIME, $dateTime['min'], Criteria::GREATER_EQUAL);
$useMinM... | [
"public",
"function",
"filterByDateTime",
"(",
"$",
"dateTime",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"dateTime",
")",
")",
"{",
"$",
"useMinMax",
"=",
"false",
";",
"if",
"(",
"isset",
"(",
"$",... | Filter the query on the date_time column
Example usage:
<code>
$query->filterByDateTime('2011-03-14'); // WHERE date_time = '2011-03-14'
$query->filterByDateTime('now'); // WHERE date_time = '2011-03-14'
$query->filterByDateTime(array('max' => 'yesterday')); // WHERE date_time > '2011-03-13'
</code>
@param mixed ... | [
"Filter",
"the",
"query",
"on",
"the",
"date_time",
"column"
] | 3424a360c9bded71eb5b570bc114a7759cb23ec6 | https://github.com/phpalchemy/cerberus/blob/3424a360c9bded71eb5b570bc114a7759cb23ec6/src/Alchemy/Component/Cerberus/Model/Base/LogQuery.php#L346-L367 |
15,598 | phpalchemy/cerberus | src/Alchemy/Component/Cerberus/Model/Base/LogQuery.php | LogQuery.filterByLogText | public function filterByLogText($logText = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($logText)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $logText)) {
$logText = str_replace('*', '%', $logText);
... | php | public function filterByLogText($logText = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($logText)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $logText)) {
$logText = str_replace('*', '%', $logText);
... | [
"public",
"function",
"filterByLogText",
"(",
"$",
"logText",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"comparison",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"logText",
")",
")",
"{",
"$",
"comparis... | Filter the query on the log_text column
Example usage:
<code>
$query->filterByLogText('fooValue'); // WHERE log_text = 'fooValue'
$query->filterByLogText('%fooValue%'); // WHERE log_text LIKE '%fooValue%'
</code>
@param string $logText The value to use as filter.
Accepts wildcards (* and % trigger a LIKE)
@para... | [
"Filter",
"the",
"query",
"on",
"the",
"log_text",
"column"
] | 3424a360c9bded71eb5b570bc114a7759cb23ec6 | https://github.com/phpalchemy/cerberus/blob/3424a360c9bded71eb5b570bc114a7759cb23ec6/src/Alchemy/Component/Cerberus/Model/Base/LogQuery.php#L384-L396 |
15,599 | phpalchemy/cerberus | src/Alchemy/Component/Cerberus/Model/Base/LogQuery.php | LogQuery.filterBySessionId | public function filterBySessionId($sessionId = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($sessionId)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $sessionId)) {
$sessionId = str_replace('*', '%', $sessionId... | php | public function filterBySessionId($sessionId = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($sessionId)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $sessionId)) {
$sessionId = str_replace('*', '%', $sessionId... | [
"public",
"function",
"filterBySessionId",
"(",
"$",
"sessionId",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"comparison",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"sessionId",
")",
")",
"{",
"$",
"co... | Filter the query on the session_id column
Example usage:
<code>
$query->filterBySessionId('fooValue'); // WHERE session_id = 'fooValue'
$query->filterBySessionId('%fooValue%'); // WHERE session_id LIKE '%fooValue%'
</code>
@param string $sessionId The value to use as filter.
Accepts wildcards (* and % trigger a... | [
"Filter",
"the",
"query",
"on",
"the",
"session_id",
"column"
] | 3424a360c9bded71eb5b570bc114a7759cb23ec6 | https://github.com/phpalchemy/cerberus/blob/3424a360c9bded71eb5b570bc114a7759cb23ec6/src/Alchemy/Component/Cerberus/Model/Base/LogQuery.php#L471-L483 |
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.