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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
25,300 | horntell/php-sdk | lib/guzzle/GuzzleHttp/Adapter/Curl/MultiAdapter.php | MultiAdapter.releaseMultiHandle | private function releaseMultiHandle($handle, $maxHandles)
{
$id = (int) $handle;
if (count($this->multiHandles) <= $maxHandles) {
$this->multiOwned[$id] = false;
} elseif (isset($this->multiHandles[$id], $this->multiOwned[$id])) {
// Prune excessive handles
... | php | private function releaseMultiHandle($handle, $maxHandles)
{
$id = (int) $handle;
if (count($this->multiHandles) <= $maxHandles) {
$this->multiOwned[$id] = false;
} elseif (isset($this->multiHandles[$id], $this->multiOwned[$id])) {
// Prune excessive handles
... | [
"private",
"function",
"releaseMultiHandle",
"(",
"$",
"handle",
",",
"$",
"maxHandles",
")",
"{",
"$",
"id",
"=",
"(",
"int",
")",
"$",
"handle",
";",
"if",
"(",
"count",
"(",
"$",
"this",
"->",
"multiHandles",
")",
"<=",
"$",
"maxHandles",
")",
"{"... | Releases a curl_multi handle back into the cache and removes excess cache
@param resource $handle Curl multi handle to remove
@param int $maxHandles (Optional) Maximum number of existing multiHandles to allow before pruning. | [
"Releases",
"a",
"curl_multi",
"handle",
"back",
"into",
"the",
"cache",
"and",
"removes",
"excess",
"cache"
] | e5205e9396a21b754d5651a8aa5898da5922a1b7 | https://github.com/horntell/php-sdk/blob/e5205e9396a21b754d5651a8aa5898da5922a1b7/lib/guzzle/GuzzleHttp/Adapter/Curl/MultiAdapter.php#L294-L305 |
25,301 | Wedeto/FileFormats | src/AbstractReader.php | AbstractReader.read | public function read($param)
{
if ($param instanceof File)
return $this->readFile($param->getFullPath());
if (is_resource($param))
return $this->readFileHandle($param);
if (!is_string($param))
throw new \InvalidArgumentException("Cannot read argument: " ... | php | public function read($param)
{
if ($param instanceof File)
return $this->readFile($param->getFullPath());
if (is_resource($param))
return $this->readFileHandle($param);
if (!is_string($param))
throw new \InvalidArgumentException("Cannot read argument: " ... | [
"public",
"function",
"read",
"(",
"$",
"param",
")",
"{",
"if",
"(",
"$",
"param",
"instanceof",
"File",
")",
"return",
"$",
"this",
"->",
"readFile",
"(",
"$",
"param",
"->",
"getFullPath",
"(",
")",
")",
";",
"if",
"(",
"is_resource",
"(",
"$",
... | Read provided data. The method auto-detects if it is a file,
a resource or a string that contains the formatted data.
@param mixed $param The data to read
@return array The read data
@throws InvalidArgumentException When an unrecognized argument is provided
@throws Wedeto\IO\IOException When reading fails | [
"Read",
"provided",
"data",
".",
"The",
"method",
"auto",
"-",
"detects",
"if",
"it",
"is",
"a",
"file",
"a",
"resource",
"or",
"a",
"string",
"that",
"contains",
"the",
"formatted",
"data",
"."
] | 65b71fbd38a2ee6b504622aca4f4047ce9d31e9f | https://github.com/Wedeto/FileFormats/blob/65b71fbd38a2ee6b504622aca4f4047ce9d31e9f/src/AbstractReader.php#L52-L67 |
25,302 | Wedeto/FileFormats | src/AbstractReader.php | AbstractReader.readFile | public function readFile(string $file_name)
{
$contents = @file_get_contents($file_name);
if ($contents === false)
throw new IOException("Failed to read file contents");
$contents = Encoding::removeBOM($contents);
return $this->readString(file_get_contents($file_name));
... | php | public function readFile(string $file_name)
{
$contents = @file_get_contents($file_name);
if ($contents === false)
throw new IOException("Failed to read file contents");
$contents = Encoding::removeBOM($contents);
return $this->readString(file_get_contents($file_name));
... | [
"public",
"function",
"readFile",
"(",
"string",
"$",
"file_name",
")",
"{",
"$",
"contents",
"=",
"@",
"file_get_contents",
"(",
"$",
"file_name",
")",
";",
"if",
"(",
"$",
"contents",
"===",
"false",
")",
"throw",
"new",
"IOException",
"(",
"\"Failed to ... | Read data from a file
@param string $file_name The file to read
@return array The read data
@throws Wedeto\IO\IOException On read errors | [
"Read",
"data",
"from",
"a",
"file"
] | 65b71fbd38a2ee6b504622aca4f4047ce9d31e9f | https://github.com/Wedeto/FileFormats/blob/65b71fbd38a2ee6b504622aca4f4047ce9d31e9f/src/AbstractReader.php#L75-L83 |
25,303 | Wedeto/FileFormats | src/AbstractReader.php | AbstractReader.readFileHandle | public function readFileHandle($file_handle)
{
if (!is_resource($file_handle))
throw new \InvalidArgumentException("No file handle was provided");
$contents = stream_get_contents($file_handle);
$contents = Encoding::removeBOM($contents);
return $this->readString($conten... | php | public function readFileHandle($file_handle)
{
if (!is_resource($file_handle))
throw new \InvalidArgumentException("No file handle was provided");
$contents = stream_get_contents($file_handle);
$contents = Encoding::removeBOM($contents);
return $this->readString($conten... | [
"public",
"function",
"readFileHandle",
"(",
"$",
"file_handle",
")",
"{",
"if",
"(",
"!",
"is_resource",
"(",
"$",
"file_handle",
")",
")",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"\"No file handle was provided\"",
")",
";",
"$",
"contents",
"=",... | Read from a file handle to an open file or resource
@param resource $file_handle The resource to read
@throws Wedeto\IO\IOException On read errors | [
"Read",
"from",
"a",
"file",
"handle",
"to",
"an",
"open",
"file",
"or",
"resource"
] | 65b71fbd38a2ee6b504622aca4f4047ce9d31e9f | https://github.com/Wedeto/FileFormats/blob/65b71fbd38a2ee6b504622aca4f4047ce9d31e9f/src/AbstractReader.php#L90-L99 |
25,304 | dms-org/common.structure | src/Table/TableData.php | TableData.hasColumn | public function hasColumn($columnKey) : bool
{
$this->validateColumnKey(__METHOD__, $columnKey);
$this->loadColumns();
$columnHash = ValueHasher::hash($columnKey);
return isset($this->columns[$columnHash]);
} | php | public function hasColumn($columnKey) : bool
{
$this->validateColumnKey(__METHOD__, $columnKey);
$this->loadColumns();
$columnHash = ValueHasher::hash($columnKey);
return isset($this->columns[$columnHash]);
} | [
"public",
"function",
"hasColumn",
"(",
"$",
"columnKey",
")",
":",
"bool",
"{",
"$",
"this",
"->",
"validateColumnKey",
"(",
"__METHOD__",
",",
"$",
"columnKey",
")",
";",
"$",
"this",
"->",
"loadColumns",
"(",
")",
";",
"$",
"columnHash",
"=",
"ValueHa... | Returns whether the table data contains a column with the supplied key.
@param mixed $columnKey
@return bool
@throws TypeMismatchException | [
"Returns",
"whether",
"the",
"table",
"data",
"contains",
"a",
"column",
"with",
"the",
"supplied",
"key",
"."
] | 23f122182f60df5ec847047a81a39c8aab019ff1 | https://github.com/dms-org/common.structure/blob/23f122182f60df5ec847047a81a39c8aab019ff1/src/Table/TableData.php#L230-L238 |
25,305 | dms-org/common.structure | src/Table/TableData.php | TableData.getColumn | public function getColumn($columnKey) : TableDataColumn
{
$this->validateColumnKey(__METHOD__, $columnKey);
$this->loadColumns();
$columnHash = ValueHasher::hash($columnKey);
if (!isset($this->columns[$columnHash])) {
throw InvalidArgumentException::format(
... | php | public function getColumn($columnKey) : TableDataColumn
{
$this->validateColumnKey(__METHOD__, $columnKey);
$this->loadColumns();
$columnHash = ValueHasher::hash($columnKey);
if (!isset($this->columns[$columnHash])) {
throw InvalidArgumentException::format(
... | [
"public",
"function",
"getColumn",
"(",
"$",
"columnKey",
")",
":",
"TableDataColumn",
"{",
"$",
"this",
"->",
"validateColumnKey",
"(",
"__METHOD__",
",",
"$",
"columnKey",
")",
";",
"$",
"this",
"->",
"loadColumns",
"(",
")",
";",
"$",
"columnHash",
"=",... | Gets the table column with the supplied key.
@param mixed $columnKey
@return TableDataColumn
@throws InvalidArgumentException
@throws TypeMismatchException | [
"Gets",
"the",
"table",
"column",
"with",
"the",
"supplied",
"key",
"."
] | 23f122182f60df5ec847047a81a39c8aab019ff1 | https://github.com/dms-org/common.structure/blob/23f122182f60df5ec847047a81a39c8aab019ff1/src/Table/TableData.php#L249-L264 |
25,306 | dms-org/common.structure | src/Table/TableData.php | TableData.hasRow | public function hasRow($rowKey) : bool
{
$this->validateRowKey(__METHOD__, $rowKey);
$this->loadRows();
$rowHash = ValueHasher::hash($rowKey);
return isset($this->rows[$rowHash]);
} | php | public function hasRow($rowKey) : bool
{
$this->validateRowKey(__METHOD__, $rowKey);
$this->loadRows();
$rowHash = ValueHasher::hash($rowKey);
return isset($this->rows[$rowHash]);
} | [
"public",
"function",
"hasRow",
"(",
"$",
"rowKey",
")",
":",
"bool",
"{",
"$",
"this",
"->",
"validateRowKey",
"(",
"__METHOD__",
",",
"$",
"rowKey",
")",
";",
"$",
"this",
"->",
"loadRows",
"(",
")",
";",
"$",
"rowHash",
"=",
"ValueHasher",
"::",
"... | Returns whether the table data contains a row with the supplied key.
@param mixed $rowKey
@return bool
@throws TypeMismatchException | [
"Returns",
"whether",
"the",
"table",
"data",
"contains",
"a",
"row",
"with",
"the",
"supplied",
"key",
"."
] | 23f122182f60df5ec847047a81a39c8aab019ff1 | https://github.com/dms-org/common.structure/blob/23f122182f60df5ec847047a81a39c8aab019ff1/src/Table/TableData.php#L274-L282 |
25,307 | dms-org/common.structure | src/Table/TableData.php | TableData.getRow | public function getRow($rowKey) : TableDataRow
{
$this->validateRowKey(__METHOD__, $rowKey);
$this->loadRows();
$rowHash = ValueHasher::hash($rowKey);
if (!isset($this->rows[$rowHash])) {
throw InvalidArgumentException::format(
'Invalid row key supplied ... | php | public function getRow($rowKey) : TableDataRow
{
$this->validateRowKey(__METHOD__, $rowKey);
$this->loadRows();
$rowHash = ValueHasher::hash($rowKey);
if (!isset($this->rows[$rowHash])) {
throw InvalidArgumentException::format(
'Invalid row key supplied ... | [
"public",
"function",
"getRow",
"(",
"$",
"rowKey",
")",
":",
"TableDataRow",
"{",
"$",
"this",
"->",
"validateRowKey",
"(",
"__METHOD__",
",",
"$",
"rowKey",
")",
";",
"$",
"this",
"->",
"loadRows",
"(",
")",
";",
"$",
"rowHash",
"=",
"ValueHasher",
"... | Gets the table row with the supplied key.
@param mixed $rowKey
@return TableDataRow
@throws InvalidArgumentException
@throws TypeMismatchException | [
"Gets",
"the",
"table",
"row",
"with",
"the",
"supplied",
"key",
"."
] | 23f122182f60df5ec847047a81a39c8aab019ff1 | https://github.com/dms-org/common.structure/blob/23f122182f60df5ec847047a81a39c8aab019ff1/src/Table/TableData.php#L293-L308 |
25,308 | dms-org/common.structure | src/Table/TableData.php | TableData.hasCell | public function hasCell($columnKey, $rowKey) : bool
{
$this->validateColumnKey(__METHOD__, $columnKey);
$this->validateRowKey(__METHOD__, $rowKey);
$this->loadColumns();
$this->loadRows();
$columnHash = ValueHasher::hash($columnKey);
if (!isset($this->columns[$colum... | php | public function hasCell($columnKey, $rowKey) : bool
{
$this->validateColumnKey(__METHOD__, $columnKey);
$this->validateRowKey(__METHOD__, $rowKey);
$this->loadColumns();
$this->loadRows();
$columnHash = ValueHasher::hash($columnKey);
if (!isset($this->columns[$colum... | [
"public",
"function",
"hasCell",
"(",
"$",
"columnKey",
",",
"$",
"rowKey",
")",
":",
"bool",
"{",
"$",
"this",
"->",
"validateColumnKey",
"(",
"__METHOD__",
",",
"$",
"columnKey",
")",
";",
"$",
"this",
"->",
"validateRowKey",
"(",
"__METHOD__",
",",
"$... | Returns whether their is a cell value at the supplied row and column.
@param mixed $columnKey
@param mixed $rowKey
@return bool
@throws TypeMismatchException | [
"Returns",
"whether",
"their",
"is",
"a",
"cell",
"value",
"at",
"the",
"supplied",
"row",
"and",
"column",
"."
] | 23f122182f60df5ec847047a81a39c8aab019ff1 | https://github.com/dms-org/common.structure/blob/23f122182f60df5ec847047a81a39c8aab019ff1/src/Table/TableData.php#L319-L338 |
25,309 | dms-org/common.structure | src/Table/TableData.php | TableData.getCell | public function getCell($columnKey, $rowKey)
{
$column = $this->getColumn($columnKey);
$row = $this->getRow($rowKey);
return $row[$column];
} | php | public function getCell($columnKey, $rowKey)
{
$column = $this->getColumn($columnKey);
$row = $this->getRow($rowKey);
return $row[$column];
} | [
"public",
"function",
"getCell",
"(",
"$",
"columnKey",
",",
"$",
"rowKey",
")",
"{",
"$",
"column",
"=",
"$",
"this",
"->",
"getColumn",
"(",
"$",
"columnKey",
")",
";",
"$",
"row",
"=",
"$",
"this",
"->",
"getRow",
"(",
"$",
"rowKey",
")",
";",
... | Gets the value of the cell or NULL if the cell does not exist.
@param mixed $columnKey
@param mixed $rowKey
@return mixed
@throws TypeMismatchException | [
"Gets",
"the",
"value",
"of",
"the",
"cell",
"or",
"NULL",
"if",
"the",
"cell",
"does",
"not",
"exist",
"."
] | 23f122182f60df5ec847047a81a39c8aab019ff1 | https://github.com/dms-org/common.structure/blob/23f122182f60df5ec847047a81a39c8aab019ff1/src/Table/TableData.php#L349-L355 |
25,310 | Dhii/regex-abstract | src/GetAllMatchesRegexCapablePcreTrait.php | GetAllMatchesRegexCapablePcreTrait._getAllMatchesRegex | protected function _getAllMatchesRegex($pattern, $subject)
{
$matches = [];
$pattern = $this->_normalizeString($pattern);
$subject = $this->_normalizeString($subject);
try {
$result = @preg_match_all($pattern, $subject, $matches);
} catch (RootException $e) {
... | php | protected function _getAllMatchesRegex($pattern, $subject)
{
$matches = [];
$pattern = $this->_normalizeString($pattern);
$subject = $this->_normalizeString($subject);
try {
$result = @preg_match_all($pattern, $subject, $matches);
} catch (RootException $e) {
... | [
"protected",
"function",
"_getAllMatchesRegex",
"(",
"$",
"pattern",
",",
"$",
"subject",
")",
"{",
"$",
"matches",
"=",
"[",
"]",
";",
"$",
"pattern",
"=",
"$",
"this",
"->",
"_normalizeString",
"(",
"$",
"pattern",
")",
";",
"$",
"subject",
"=",
"$",... | Retrieves all matches that correspond to a RegEx pattern from a string.
@since [*next-version*]
@see preg_match_all()
@param string|Stringable $pattern The RegEx pattern to use for matching.
@param string|Stringable $subject The subject that will be searched for matches.
@throw InvalidArgumentException If the patter... | [
"Retrieves",
"all",
"matches",
"that",
"correspond",
"to",
"a",
"RegEx",
"pattern",
"from",
"a",
"string",
"."
] | 0751f9c91a6f86d5f901b6b7f3613dc80bb69a8a | https://github.com/Dhii/regex-abstract/blob/0751f9c91a6f86d5f901b6b7f3613dc80bb69a8a/src/GetAllMatchesRegexCapablePcreTrait.php#L35-L54 |
25,311 | bkstg/schedule-bundle | Repository/EventRepository.php | EventRepository.searchEvents | public function searchEvents(
Production $production,
\DateTime $from,
\DateTime $to,
bool $active = true
) {
$qb = $this->createQueryBuilder('e');
return $qb
->join('e.groups', 'g')
// Add conditions.
->andWhere($qb->expr()->eq('... | php | public function searchEvents(
Production $production,
\DateTime $from,
\DateTime $to,
bool $active = true
) {
$qb = $this->createQueryBuilder('e');
return $qb
->join('e.groups', 'g')
// Add conditions.
->andWhere($qb->expr()->eq('... | [
"public",
"function",
"searchEvents",
"(",
"Production",
"$",
"production",
",",
"\\",
"DateTime",
"$",
"from",
",",
"\\",
"DateTime",
"$",
"to",
",",
"bool",
"$",
"active",
"=",
"true",
")",
"{",
"$",
"qb",
"=",
"$",
"this",
"->",
"createQueryBuilder",
... | Search for events within a production.
@param Production $production The production to search in.
@param \DateTime $from The time to start searching from.
@param \DateTime $to The time to end searching from.
@param bool $active The active state of the events.
@return Event[] | [
"Search",
"for",
"events",
"within",
"a",
"production",
"."
] | e64ac897aa7b28bc48319470d65de13cd4788afe | https://github.com/bkstg/schedule-bundle/blob/e64ac897aa7b28bc48319470d65de13cd4788afe/Repository/EventRepository.php#L32-L57 |
25,312 | bkstg/schedule-bundle | Repository/EventRepository.php | EventRepository.searchEventsByUser | public function searchEventsByUser(
UserInterface $user,
\DateTime $from,
\DateTime $to,
bool $active = true
) {
$qb = $this->createQueryBuilder('e');
return $qb
->join('e.invitations', 'i')
// Add conditions.
->andWhere($qb->expr... | php | public function searchEventsByUser(
UserInterface $user,
\DateTime $from,
\DateTime $to,
bool $active = true
) {
$qb = $this->createQueryBuilder('e');
return $qb
->join('e.invitations', 'i')
// Add conditions.
->andWhere($qb->expr... | [
"public",
"function",
"searchEventsByUser",
"(",
"UserInterface",
"$",
"user",
",",
"\\",
"DateTime",
"$",
"from",
",",
"\\",
"DateTime",
"$",
"to",
",",
"bool",
"$",
"active",
"=",
"true",
")",
"{",
"$",
"qb",
"=",
"$",
"this",
"->",
"createQueryBuilder... | Search for events for a user.
@param UserInterface $user The production to search in.
@param \DateTime $from The time to start searching from.
@param \DateTime $to The time to end searching from.
@param bool $active The active state of the events.
@return Event[] | [
"Search",
"for",
"events",
"for",
"a",
"user",
"."
] | e64ac897aa7b28bc48319470d65de13cd4788afe | https://github.com/bkstg/schedule-bundle/blob/e64ac897aa7b28bc48319470d65de13cd4788afe/Repository/EventRepository.php#L69-L99 |
25,313 | bkstg/schedule-bundle | Repository/EventRepository.php | EventRepository.findArchivedEventsQuery | public function findArchivedEventsQuery(Production $production)
{
$qb = $this->createQueryBuilder('e');
return $qb
// Add joins.
->join('e.groups', 'g')
// Add conditions.
->andWhere($qb->expr()->eq('g', ':production'))
->andWhere($qb->ex... | php | public function findArchivedEventsQuery(Production $production)
{
$qb = $this->createQueryBuilder('e');
return $qb
// Add joins.
->join('e.groups', 'g')
// Add conditions.
->andWhere($qb->expr()->eq('g', ':production'))
->andWhere($qb->ex... | [
"public",
"function",
"findArchivedEventsQuery",
"(",
"Production",
"$",
"production",
")",
"{",
"$",
"qb",
"=",
"$",
"this",
"->",
"createQueryBuilder",
"(",
"'e'",
")",
";",
"return",
"$",
"qb",
"// Add joins.",
"->",
"join",
"(",
"'e.groups'",
",",
"'g'",... | Helper function to search for events that are not active.
@param Production $production The production to search in.
@return Event[] | [
"Helper",
"function",
"to",
"search",
"for",
"events",
"that",
"are",
"not",
"active",
"."
] | e64ac897aa7b28bc48319470d65de13cd4788afe | https://github.com/bkstg/schedule-bundle/blob/e64ac897aa7b28bc48319470d65de13cd4788afe/Repository/EventRepository.php#L108-L130 |
25,314 | bseddon/XPath20 | SequenceType.php | SequenceType.getValueType | public function getValueType()
{
if ( $this->Cardinality == XmlTypeCardinality::ZeroOrMore ||
$this->Cardinality == XmlTypeCardinality::OneOrMore )
return "\lyquidity\XPath2\XPath2NodeIterator";
if ( $this->IsNode )
return "\lyquidity\xml\xpath\XPathNavigator";
if ($this->Cardinality == XmlT... | php | public function getValueType()
{
if ( $this->Cardinality == XmlTypeCardinality::ZeroOrMore ||
$this->Cardinality == XmlTypeCardinality::OneOrMore )
return "\lyquidity\XPath2\XPath2NodeIterator";
if ( $this->IsNode )
return "\lyquidity\xml\xpath\XPathNavigator";
if ($this->Cardinality == XmlT... | [
"public",
"function",
"getValueType",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"Cardinality",
"==",
"XmlTypeCardinality",
"::",
"ZeroOrMore",
"||",
"$",
"this",
"->",
"Cardinality",
"==",
"XmlTypeCardinality",
"::",
"OneOrMore",
")",
"return",
"\"\\lyquidity... | Get the type of the value
@var Type $ValueType | [
"Get",
"the",
"type",
"of",
"the",
"value"
] | 69882b6efffaa5470a819d5fdd2f6473ddeb046d | https://github.com/bseddon/XPath20/blob/69882b6efffaa5470a819d5fdd2f6473ddeb046d/SequenceType.php#L291-L304 |
25,315 | bseddon/XPath20 | SequenceType.php | SequenceType.getAtomizedValueType | public function getAtomizedValueType()
{
if ( $this->IsNode )
{
switch ( $this->TypeCode )
{
case XmlTypeCode::Text:
case XmlTypeCode::ProcessingInstruction:
case XmlTypeCode::Comment:
case XmlTypeCode::UntypedAtomic:
return Types::$UntypedAtomicType;
default:
if... | php | public function getAtomizedValueType()
{
if ( $this->IsNode )
{
switch ( $this->TypeCode )
{
case XmlTypeCode::Text:
case XmlTypeCode::ProcessingInstruction:
case XmlTypeCode::Comment:
case XmlTypeCode::UntypedAtomic:
return Types::$UntypedAtomicType;
default:
if... | [
"public",
"function",
"getAtomizedValueType",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"IsNode",
")",
"{",
"switch",
"(",
"$",
"this",
"->",
"TypeCode",
")",
"{",
"case",
"XmlTypeCode",
"::",
"Text",
":",
"case",
"XmlTypeCode",
"::",
"ProcessingInstruc... | Get the type of the atomized value
@return Type | [
"Get",
"the",
"type",
"of",
"the",
"atomized",
"value"
] | 69882b6efffaa5470a819d5fdd2f6473ddeb046d | https://github.com/bseddon/XPath20/blob/69882b6efffaa5470a819d5fdd2f6473ddeb046d/SequenceType.php#L310-L341 |
25,316 | bseddon/XPath20 | SequenceType.php | SequenceType.getIsNumeric | public function getIsNumeric()
{
switch ( $this->TypeCode )
{
case XmlTypeCode::Decimal:
case XmlTypeCode::Float:
case XmlTypeCode::Double:
case XmlTypeCode::Integer:
case XmlTypeCode::NonPositiveInteger:
case XmlTypeCode::NegativeInteger:
case XmlTypeCode::Long:
case XmlTypeCode... | php | public function getIsNumeric()
{
switch ( $this->TypeCode )
{
case XmlTypeCode::Decimal:
case XmlTypeCode::Float:
case XmlTypeCode::Double:
case XmlTypeCode::Integer:
case XmlTypeCode::NonPositiveInteger:
case XmlTypeCode::NegativeInteger:
case XmlTypeCode::Long:
case XmlTypeCode... | [
"public",
"function",
"getIsNumeric",
"(",
")",
"{",
"switch",
"(",
"$",
"this",
"->",
"TypeCode",
")",
"{",
"case",
"XmlTypeCode",
"::",
"Decimal",
":",
"case",
"XmlTypeCode",
"::",
"Float",
":",
"case",
"XmlTypeCode",
"::",
"Double",
":",
"case",
"XmlTyp... | Returns true if the value is numeric
@return bool | [
"Returns",
"true",
"if",
"the",
"value",
"is",
"numeric"
] | 69882b6efffaa5470a819d5fdd2f6473ddeb046d | https://github.com/bseddon/XPath20/blob/69882b6efffaa5470a819d5fdd2f6473ddeb046d/SequenceType.php#L347-L370 |
25,317 | vainproject/vain-user | src/User/Observers/UserObserver.php | UserObserver.deleting | public function deleting($model)
{
foreach ($this->relations as $relation) {
if ($model->{$relation}()->count() > 0) {
// Returning false from an Eloquent event listener will cancel the operation.
return false;
}
}
} | php | public function deleting($model)
{
foreach ($this->relations as $relation) {
if ($model->{$relation}()->count() > 0) {
// Returning false from an Eloquent event listener will cancel the operation.
return false;
}
}
} | [
"public",
"function",
"deleting",
"(",
"$",
"model",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"relations",
"as",
"$",
"relation",
")",
"{",
"if",
"(",
"$",
"model",
"->",
"{",
"$",
"relation",
"}",
"(",
")",
"->",
"count",
"(",
")",
">",
"0",... | Post delete check if a user has any relevant relations,
if so we cancel the deletion and ask the user to
manually remove all relations for now.
@param $model
@return bool | [
"Post",
"delete",
"check",
"if",
"a",
"user",
"has",
"any",
"relevant",
"relations",
"if",
"so",
"we",
"cancel",
"the",
"deletion",
"and",
"ask",
"the",
"user",
"to",
"manually",
"remove",
"all",
"relations",
"for",
"now",
"."
] | 1c059faa61ebf289fcaea39a90b4523cfc9d6efc | https://github.com/vainproject/vain-user/blob/1c059faa61ebf289fcaea39a90b4523cfc9d6efc/src/User/Observers/UserObserver.php#L22-L30 |
25,318 | Wedeto/Util | src/ErrorInterceptor.php | ErrorInterceptor.execute | public function execute()
{
$registered = false;
if (self::$interceptor_stack === null)
{
$registered = true;
self::registerErrorHandler();
}
array_push(self::$interceptor_stack, $this);
$response = null;
try
{
... | php | public function execute()
{
$registered = false;
if (self::$interceptor_stack === null)
{
$registered = true;
self::registerErrorHandler();
}
array_push(self::$interceptor_stack, $this);
$response = null;
try
{
... | [
"public",
"function",
"execute",
"(",
")",
"{",
"$",
"registered",
"=",
"false",
";",
"if",
"(",
"self",
"::",
"$",
"interceptor_stack",
"===",
"null",
")",
"{",
"$",
"registered",
"=",
"true",
";",
"self",
"::",
"registerErrorHandler",
"(",
")",
";",
... | Execute the configured callback
@params Any parameters to pass to the callback
@return mixed The return value of the callback | [
"Execute",
"the",
"configured",
"callback"
] | 0e080251bbaa8e7d91ae8d02eb79c029c976744a | https://github.com/Wedeto/Util/blob/0e080251bbaa8e7d91ae8d02eb79c029c976744a/src/ErrorInterceptor.php#L82-L105 |
25,319 | Wedeto/Util | src/ErrorInterceptor.php | ErrorInterceptor.intercept | protected function intercept($errno, $errstr, $errfile, $errline, $errcontext)
{
foreach ($this->expected as $warning)
{
if ($errno & $warning[0] && strpos($errstr, $warning[1]) !== false)
{
$this->intercepted[] = new \ErrorException($errstr, 0, $errno, $errfi... | php | protected function intercept($errno, $errstr, $errfile, $errline, $errcontext)
{
foreach ($this->expected as $warning)
{
if ($errno & $warning[0] && strpos($errstr, $warning[1]) !== false)
{
$this->intercepted[] = new \ErrorException($errstr, 0, $errno, $errfi... | [
"protected",
"function",
"intercept",
"(",
"$",
"errno",
",",
"$",
"errstr",
",",
"$",
"errfile",
",",
"$",
"errline",
",",
"$",
"errcontext",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"expected",
"as",
"$",
"warning",
")",
"{",
"if",
"(",
"$",
... | Check if the produced error should be intercepted by the interceptor, based on the
defined expected errors.
@param int $errno Error type
@param string $errstr The error string
@param string $errfile The file the error occured in
@param int $errline The line the error occured on
@param array $errcontext Local variables... | [
"Check",
"if",
"the",
"produced",
"error",
"should",
"be",
"intercepted",
"by",
"the",
"interceptor",
"based",
"on",
"the",
"defined",
"expected",
"errors",
"."
] | 0e080251bbaa8e7d91ae8d02eb79c029c976744a | https://github.com/Wedeto/Util/blob/0e080251bbaa8e7d91ae8d02eb79c029c976744a/src/ErrorInterceptor.php#L126-L137 |
25,320 | Wedeto/Util | src/ErrorInterceptor.php | ErrorInterceptor.errorHandler | public static function errorHandler($errno, $errstr, $errfile, $errline, $errcontext)
{
if (count(self::$interceptor_stack) > 0)
{
$interceptor = end(self::$interceptor_stack);
if ($interceptor->intercept($errno, $errstr, $errfile, $errline, $errcontext))
{
... | php | public static function errorHandler($errno, $errstr, $errfile, $errline, $errcontext)
{
if (count(self::$interceptor_stack) > 0)
{
$interceptor = end(self::$interceptor_stack);
if ($interceptor->intercept($errno, $errstr, $errfile, $errline, $errcontext))
{
... | [
"public",
"static",
"function",
"errorHandler",
"(",
"$",
"errno",
",",
"$",
"errstr",
",",
"$",
"errfile",
",",
"$",
"errline",
",",
"$",
"errcontext",
")",
"{",
"if",
"(",
"count",
"(",
"self",
"::",
"$",
"interceptor_stack",
")",
">",
"0",
")",
"{... | Catch all PHP errors, notices and throw them as an exception instead. If
an interceptor was registered, the message is passed to the interceptor instead.
@param int $errno Error number
@param string $errstr Error description
@param string $errfile The file where the error occured
@param int $errline The line where the... | [
"Catch",
"all",
"PHP",
"errors",
"notices",
"and",
"throw",
"them",
"as",
"an",
"exception",
"instead",
".",
"If",
"an",
"interceptor",
"was",
"registered",
"the",
"message",
"is",
"passed",
"to",
"the",
"interceptor",
"instead",
"."
] | 0e080251bbaa8e7d91ae8d02eb79c029c976744a | https://github.com/Wedeto/Util/blob/0e080251bbaa8e7d91ae8d02eb79c029c976744a/src/ErrorInterceptor.php#L154-L166 |
25,321 | linpax/microphp-framework | src/auth/drivers/FileRbac.php | FileRbac.assign | public function assign($userId, $name)
{
if ($this->searchRoleRecursive($this->roles, $name)) {
$exists = $this->db->exists('rbac_user', ['user' => $userId, 'role' => $name]);
if (!$exists) {
return $this->db->insert('rbac_user', ['role' => $name, 'user' => $userId]);... | php | public function assign($userId, $name)
{
if ($this->searchRoleRecursive($this->roles, $name)) {
$exists = $this->db->exists('rbac_user', ['user' => $userId, 'role' => $name]);
if (!$exists) {
return $this->db->insert('rbac_user', ['role' => $name, 'user' => $userId]);... | [
"public",
"function",
"assign",
"(",
"$",
"userId",
",",
"$",
"name",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"searchRoleRecursive",
"(",
"$",
"this",
"->",
"roles",
",",
"$",
"name",
")",
")",
"{",
"$",
"exists",
"=",
"$",
"this",
"->",
"db",
"-... | Assign RBAC element into user
@access public
@param integer $userId user id
@param string $name element name
@return bool | [
"Assign",
"RBAC",
"element",
"into",
"user"
] | 11f3370f3f64c516cce9b84ecd8276c6e9ae8df9 | https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/auth/drivers/FileRbac.php#L55-L65 |
25,322 | OxfordInfoLabs/kinikit-core | src/Util/Configuration/ConfigFile.php | ConfigFile.getParameter | public function getParameter($key) {
if (array_key_exists ( $key, $this->parameters ))
return $this->parameters [$key];
else
return null;
} | php | public function getParameter($key) {
if (array_key_exists ( $key, $this->parameters ))
return $this->parameters [$key];
else
return null;
} | [
"public",
"function",
"getParameter",
"(",
"$",
"key",
")",
"{",
"if",
"(",
"array_key_exists",
"(",
"$",
"key",
",",
"$",
"this",
"->",
"parameters",
")",
")",
"return",
"$",
"this",
"->",
"parameters",
"[",
"$",
"key",
"]",
";",
"else",
"return",
"... | Get the parameter matching the passed key
or null if non existent
@param string $key | [
"Get",
"the",
"parameter",
"matching",
"the",
"passed",
"key",
"or",
"null",
"if",
"non",
"existent"
] | edc1b2e6ffabd595c4c7d322279b3dd1e59ef359 | https://github.com/OxfordInfoLabs/kinikit-core/blob/edc1b2e6ffabd595c4c7d322279b3dd1e59ef359/src/Util/Configuration/ConfigFile.php#L37-L42 |
25,323 | OxfordInfoLabs/kinikit-core | src/Util/Configuration/ConfigFile.php | ConfigFile.getConfigFileText | public function getConfigFileText() {
$configFileText = "";
foreach ( $this->parameters as $key => $value ) {
$configFileText .= $key . "=" . $value . "\n";
}
return $configFileText;
} | php | public function getConfigFileText() {
$configFileText = "";
foreach ( $this->parameters as $key => $value ) {
$configFileText .= $key . "=" . $value . "\n";
}
return $configFileText;
} | [
"public",
"function",
"getConfigFileText",
"(",
")",
"{",
"$",
"configFileText",
"=",
"\"\"",
";",
"foreach",
"(",
"$",
"this",
"->",
"parameters",
"as",
"$",
"key",
"=>",
"$",
"value",
")",
"{",
"$",
"configFileText",
".=",
"$",
"key",
".",
"\"=\"",
"... | Return the actual text which would be written out by the save method.
This is particularly useful in situations like the PropertiesResource
where the output needs to be injected into a resource.
@return string | [
"Return",
"the",
"actual",
"text",
"which",
"would",
"be",
"written",
"out",
"by",
"the",
"save",
"method",
".",
"This",
"is",
"particularly",
"useful",
"in",
"situations",
"like",
"the",
"PropertiesResource",
"where",
"the",
"output",
"needs",
"to",
"be",
"... | edc1b2e6ffabd595c4c7d322279b3dd1e59ef359 | https://github.com/OxfordInfoLabs/kinikit-core/blob/edc1b2e6ffabd595c4c7d322279b3dd1e59ef359/src/Util/Configuration/ConfigFile.php#L88-L94 |
25,324 | OxfordInfoLabs/kinikit-core | src/Util/Configuration/ConfigFile.php | ConfigFile.save | public function save($filePath = null) {
// Determine the correct file path.
$filePath = ($filePath == null) ? $this->configFilePath : $filePath;
// Store the file
file_put_contents ( $filePath, $this->getConfigFileText () );
} | php | public function save($filePath = null) {
// Determine the correct file path.
$filePath = ($filePath == null) ? $this->configFilePath : $filePath;
// Store the file
file_put_contents ( $filePath, $this->getConfigFileText () );
} | [
"public",
"function",
"save",
"(",
"$",
"filePath",
"=",
"null",
")",
"{",
"// Determine the correct file path.",
"$",
"filePath",
"=",
"(",
"$",
"filePath",
"==",
"null",
")",
"?",
"$",
"this",
"->",
"configFilePath",
":",
"$",
"filePath",
";",
"// Store th... | Save the config file back out. If null supplied for filepath, the constructed configFilePath is used | [
"Save",
"the",
"config",
"file",
"back",
"out",
".",
"If",
"null",
"supplied",
"for",
"filepath",
"the",
"constructed",
"configFilePath",
"is",
"used"
] | edc1b2e6ffabd595c4c7d322279b3dd1e59ef359 | https://github.com/OxfordInfoLabs/kinikit-core/blob/edc1b2e6ffabd595c4c7d322279b3dd1e59ef359/src/Util/Configuration/ConfigFile.php#L100-L107 |
25,325 | OxfordInfoLabs/kinikit-core | src/Util/Configuration/ConfigFile.php | ConfigFile.parseFile | private function parseFile($configFilePath) {
$configFileText = file_get_contents ( $configFilePath );
// Now split each line on carriage return
$lines = explode ( "\n", $configFileText );
// Now loop through each line, attempting a split by equals sign to get key value pairs out.
foreach ( $lines as $l... | php | private function parseFile($configFilePath) {
$configFileText = file_get_contents ( $configFilePath );
// Now split each line on carriage return
$lines = explode ( "\n", $configFileText );
// Now loop through each line, attempting a split by equals sign to get key value pairs out.
foreach ( $lines as $l... | [
"private",
"function",
"parseFile",
"(",
"$",
"configFilePath",
")",
"{",
"$",
"configFileText",
"=",
"file_get_contents",
"(",
"$",
"configFilePath",
")",
";",
"// Now split each line on carriage return",
"$",
"lines",
"=",
"explode",
"(",
"\"\\n\"",
",",
"$",
"c... | Parse function. Splits the config file into lines and
then looks for key value pairs of the form key=value | [
"Parse",
"function",
".",
"Splits",
"the",
"config",
"file",
"into",
"lines",
"and",
"then",
"looks",
"for",
"key",
"value",
"pairs",
"of",
"the",
"form",
"key",
"=",
"value"
] | edc1b2e6ffabd595c4c7d322279b3dd1e59ef359 | https://github.com/OxfordInfoLabs/kinikit-core/blob/edc1b2e6ffabd595c4c7d322279b3dd1e59ef359/src/Util/Configuration/ConfigFile.php#L113-L143 |
25,326 | lasallecms/lasallecms-l5-usermanagement-pkg | src/Helpers/TwoFactorAuthorization/TwoFactorAuthHelper.php | TwoFactorAuthHelper.doTwoFactorAuthLogin | public function doTwoFactorAuthLogin($userId) {
// Get the 2FA code
$codeToInput = $this->getCodeToInput();
// Update the user's database record wtih the 2FA code & timestamp
$this->updateUserRecordWithTwoFactorAuthCode($codeToInput, $userId);
// Put together the SMS message
... | php | public function doTwoFactorAuthLogin($userId) {
// Get the 2FA code
$codeToInput = $this->getCodeToInput();
// Update the user's database record wtih the 2FA code & timestamp
$this->updateUserRecordWithTwoFactorAuthCode($codeToInput, $userId);
// Put together the SMS message
... | [
"public",
"function",
"doTwoFactorAuthLogin",
"(",
"$",
"userId",
")",
"{",
"// Get the 2FA code",
"$",
"codeToInput",
"=",
"$",
"this",
"->",
"getCodeToInput",
"(",
")",
";",
"// Update the user's database record wtih the 2FA code & timestamp",
"$",
"this",
"->",
"upda... | Two Factor Authorization for the front-end LOGIN
@param int $userId User ID
@return void | [
"Two",
"Factor",
"Authorization",
"for",
"the",
"front",
"-",
"end",
"LOGIN"
] | b5203d596e18e2566e7fdcd3f13868bb44a94c1d | https://github.com/lasallecms/lasallecms-l5-usermanagement-pkg/blob/b5203d596e18e2566e7fdcd3f13868bb44a94c1d/src/Helpers/TwoFactorAuthorization/TwoFactorAuthHelper.php#L88-L102 |
25,327 | lasallecms/lasallecms-l5-usermanagement-pkg | src/Helpers/TwoFactorAuthorization/TwoFactorAuthHelper.php | TwoFactorAuthHelper.doTwoFactorAuthRegistration | public function doTwoFactorAuthRegistration($data) {
// Get the 2FA code
$codeToInput = $this->getCodeToInput();
// Set this 2FA code into a session variable, since
// this is the only opportunity to so save the ephemerally generated 2FA
$this->request->session()->put('codeToIn... | php | public function doTwoFactorAuthRegistration($data) {
// Get the 2FA code
$codeToInput = $this->getCodeToInput();
// Set this 2FA code into a session variable, since
// this is the only opportunity to so save the ephemerally generated 2FA
$this->request->session()->put('codeToIn... | [
"public",
"function",
"doTwoFactorAuthRegistration",
"(",
"$",
"data",
")",
"{",
"// Get the 2FA code",
"$",
"codeToInput",
"=",
"$",
"this",
"->",
"getCodeToInput",
"(",
")",
";",
"// Set this 2FA code into a session variable, since",
"// this is the only opportunity to so s... | Two Factor Authorization for the front-end REGISTRATION
@param array $data
@return void | [
"Two",
"Factor",
"Authorization",
"for",
"the",
"front",
"-",
"end",
"REGISTRATION"
] | b5203d596e18e2566e7fdcd3f13868bb44a94c1d | https://github.com/lasallecms/lasallecms-l5-usermanagement-pkg/blob/b5203d596e18e2566e7fdcd3f13868bb44a94c1d/src/Helpers/TwoFactorAuthorization/TwoFactorAuthHelper.php#L110-L127 |
25,328 | lasallecms/lasallecms-l5-usermanagement-pkg | src/Helpers/TwoFactorAuthorization/TwoFactorAuthHelper.php | TwoFactorAuthHelper.isTwoFactorAuthFormTimeout | public function isTwoFactorAuthFormTimeout($userId=null, $startTime=null ) {
if (isset($userId)) {
// User wants to login, performing 2FA for this login
$startTime = strtotime($this->getUserSmsTokenCreatedAt($userId));
} else {
// New front-end registration, perfor... | php | public function isTwoFactorAuthFormTimeout($userId=null, $startTime=null ) {
if (isset($userId)) {
// User wants to login, performing 2FA for this login
$startTime = strtotime($this->getUserSmsTokenCreatedAt($userId));
} else {
// New front-end registration, perfor... | [
"public",
"function",
"isTwoFactorAuthFormTimeout",
"(",
"$",
"userId",
"=",
"null",
",",
"$",
"startTime",
"=",
"null",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"userId",
")",
")",
"{",
"// User wants to login, performing 2FA for this login",
"$",
"startTime",
"... | Has too much time passed between issuing the 2FA code and this code being
entered into the verification form?
@param int $userId User ID --> if null, then called by 2FA registration
@param datetime $startTime Time 2FA form created --> if null, then called by 2FA login
@return bool | [
"Has",
"too",
"much",
"time",
"passed",
"between",
"issuing",
"the",
"2FA",
"code",
"and",
"this",
"code",
"being",
"entered",
"into",
"the",
"verification",
"form?"
] | b5203d596e18e2566e7fdcd3f13868bb44a94c1d | https://github.com/lasallecms/lasallecms-l5-usermanagement-pkg/blob/b5203d596e18e2566e7fdcd3f13868bb44a94c1d/src/Helpers/TwoFactorAuthorization/TwoFactorAuthHelper.php#L137-L172 |
25,329 | lasallecms/lasallecms-l5-usermanagement-pkg | src/Helpers/TwoFactorAuthorization/TwoFactorAuthHelper.php | TwoFactorAuthHelper.isInputtedTwoFactorAuthCodeCorrect | public function isInputtedTwoFactorAuthCodeCorrect($userId=null) {
$inputted2faCode = $this->request->input('2facode');
if (isset($userId)) {
$sent2faCode = $this->getUserSmsToken($userId);
} else {
$sent2faCode = $this->request->session()->get('codeToInput');
... | php | public function isInputtedTwoFactorAuthCodeCorrect($userId=null) {
$inputted2faCode = $this->request->input('2facode');
if (isset($userId)) {
$sent2faCode = $this->getUserSmsToken($userId);
} else {
$sent2faCode = $this->request->session()->get('codeToInput');
... | [
"public",
"function",
"isInputtedTwoFactorAuthCodeCorrect",
"(",
"$",
"userId",
"=",
"null",
")",
"{",
"$",
"inputted2faCode",
"=",
"$",
"this",
"->",
"request",
"->",
"input",
"(",
"'2facode'",
")",
";",
"if",
"(",
"isset",
"(",
"$",
"userId",
")",
")",
... | Did the user input the correct 2FA code?
@param int $userId User ID --> if null, then called by 2FA registration;
otherwise, called by 2FA login
@return bool | [
"Did",
"the",
"user",
"input",
"the",
"correct",
"2FA",
"code?"
] | b5203d596e18e2566e7fdcd3f13868bb44a94c1d | https://github.com/lasallecms/lasallecms-l5-usermanagement-pkg/blob/b5203d596e18e2566e7fdcd3f13868bb44a94c1d/src/Helpers/TwoFactorAuthorization/TwoFactorAuthHelper.php#L182-L197 |
25,330 | lasallecms/lasallecms-l5-usermanagement-pkg | src/Helpers/TwoFactorAuthorization/TwoFactorAuthHelper.php | TwoFactorAuthHelper.isUserTwoFactorAuthEnabled | public function isUserTwoFactorAuthEnabled($userId) {
$result = DB::table('users')
->where('id', '=', $userId)
->value('two_factor_auth_enabled')
;
if ($result) {
return true;
}
return false;
} | php | public function isUserTwoFactorAuthEnabled($userId) {
$result = DB::table('users')
->where('id', '=', $userId)
->value('two_factor_auth_enabled')
;
if ($result) {
return true;
}
return false;
} | [
"public",
"function",
"isUserTwoFactorAuthEnabled",
"(",
"$",
"userId",
")",
"{",
"$",
"result",
"=",
"DB",
"::",
"table",
"(",
"'users'",
")",
"->",
"where",
"(",
"'id'",
",",
"'='",
",",
"$",
"userId",
")",
"->",
"value",
"(",
"'two_factor_auth_enabled'"... | Is user enabled for Two Factor Authorization
@param int $userId User ID
@return bool | [
"Is",
"user",
"enabled",
"for",
"Two",
"Factor",
"Authorization"
] | b5203d596e18e2566e7fdcd3f13868bb44a94c1d | https://github.com/lasallecms/lasallecms-l5-usermanagement-pkg/blob/b5203d596e18e2566e7fdcd3f13868bb44a94c1d/src/Helpers/TwoFactorAuthorization/TwoFactorAuthHelper.php#L253-L263 |
25,331 | lasallecms/lasallecms-l5-usermanagement-pkg | src/Helpers/TwoFactorAuthorization/TwoFactorAuthHelper.php | TwoFactorAuthHelper.existstUserCountryCodeAndPhoneNumber | public function existstUserCountryCodeAndPhoneNumber($userId) {
$countryCode = DB::table('users')
->where('id', '=', $userId)
->value('phone_country_code')
;
$phoneNumber = DB::table('users')
->where('id', '=', $userId)
->value('phone_number')
... | php | public function existstUserCountryCodeAndPhoneNumber($userId) {
$countryCode = DB::table('users')
->where('id', '=', $userId)
->value('phone_country_code')
;
$phoneNumber = DB::table('users')
->where('id', '=', $userId)
->value('phone_number')
... | [
"public",
"function",
"existstUserCountryCodeAndPhoneNumber",
"(",
"$",
"userId",
")",
"{",
"$",
"countryCode",
"=",
"DB",
"::",
"table",
"(",
"'users'",
")",
"->",
"where",
"(",
"'id'",
",",
"'='",
",",
"$",
"userId",
")",
"->",
"value",
"(",
"'phone_coun... | Does the user have a country code and phone number for 2FA?
@param int $userId User ID | [
"Does",
"the",
"user",
"have",
"a",
"country",
"code",
"and",
"phone",
"number",
"for",
"2FA?"
] | b5203d596e18e2566e7fdcd3f13868bb44a94c1d | https://github.com/lasallecms/lasallecms-l5-usermanagement-pkg/blob/b5203d596e18e2566e7fdcd3f13868bb44a94c1d/src/Helpers/TwoFactorAuthorization/TwoFactorAuthHelper.php#L270-L286 |
25,332 | lasallecms/lasallecms-l5-usermanagement-pkg | src/Helpers/TwoFactorAuthorization/TwoFactorAuthHelper.php | TwoFactorAuthHelper.updateUserRecordWithTwoFactorAuthCode | public function updateUserRecordWithTwoFactorAuthCode($codeToInput, $userId) {
$now = Carbon::now();
DB::table('users')
->where('id', $userId)
->update(['sms_token' => $codeToInput, 'sms_token_created_at' => $now] )
;
} | php | public function updateUserRecordWithTwoFactorAuthCode($codeToInput, $userId) {
$now = Carbon::now();
DB::table('users')
->where('id', $userId)
->update(['sms_token' => $codeToInput, 'sms_token_created_at' => $now] )
;
} | [
"public",
"function",
"updateUserRecordWithTwoFactorAuthCode",
"(",
"$",
"codeToInput",
",",
"$",
"userId",
")",
"{",
"$",
"now",
"=",
"Carbon",
"::",
"now",
"(",
")",
";",
"DB",
"::",
"table",
"(",
"'users'",
")",
"->",
"where",
"(",
"'id'",
",",
"$",
... | UPDATE the user record for fields "sms_token" and "sms_token_created_at"
@param text $codeToInput The code sent to the user via sms that has to be entered into a form to allow login
@param int $userId User ID
@return void | [
"UPDATE",
"the",
"user",
"record",
"for",
"fields",
"sms_token",
"and",
"sms_token_created_at"
] | b5203d596e18e2566e7fdcd3f13868bb44a94c1d | https://github.com/lasallecms/lasallecms-l5-usermanagement-pkg/blob/b5203d596e18e2566e7fdcd3f13868bb44a94c1d/src/Helpers/TwoFactorAuthorization/TwoFactorAuthHelper.php#L344-L352 |
25,333 | lasallecms/lasallecms-l5-usermanagement-pkg | src/Helpers/TwoFactorAuthorization/TwoFactorAuthHelper.php | TwoFactorAuthHelper.updateUserRecordWithLastlogin | public function updateUserRecordWithLastlogin($userId) {
$now = Carbon::now();
$ip = $this->request->getClientIp();
DB::table('users')
->where('id', $userId)
->update(['last_login' => $now, 'last_login_ip' => $ip] )
;
} | php | public function updateUserRecordWithLastlogin($userId) {
$now = Carbon::now();
$ip = $this->request->getClientIp();
DB::table('users')
->where('id', $userId)
->update(['last_login' => $now, 'last_login_ip' => $ip] )
;
} | [
"public",
"function",
"updateUserRecordWithLastlogin",
"(",
"$",
"userId",
")",
"{",
"$",
"now",
"=",
"Carbon",
"::",
"now",
"(",
")",
";",
"$",
"ip",
"=",
"$",
"this",
"->",
"request",
"->",
"getClientIp",
"(",
")",
";",
"DB",
"::",
"table",
"(",
"'... | UPDATE the user record for fields "last_login" and "last_login_ip"
This method is here because it is convenient, as this class is already injected in the auth classes
@param int $userId User ID
@return void | [
"UPDATE",
"the",
"user",
"record",
"for",
"fields",
"last_login",
"and",
"last_login_ip"
] | b5203d596e18e2566e7fdcd3f13868bb44a94c1d | https://github.com/lasallecms/lasallecms-l5-usermanagement-pkg/blob/b5203d596e18e2566e7fdcd3f13868bb44a94c1d/src/Helpers/TwoFactorAuthorization/TwoFactorAuthHelper.php#L386-L395 |
25,334 | lasallecms/lasallecms-l5-usermanagement-pkg | src/Helpers/TwoFactorAuthorization/TwoFactorAuthHelper.php | TwoFactorAuthHelper.redirectPathUponSuccessfulFrontendLogin | public function redirectPathUponSuccessfulFrontendLogin()
{
if (property_exists($this, 'redirectPath')) {
return $this->redirectPath;
}
if (property_exists($this, 'redirectPath')) {
return $this->redirectTo;
}
if (config('lasasllecmsfrontend.frontend... | php | public function redirectPathUponSuccessfulFrontendLogin()
{
if (property_exists($this, 'redirectPath')) {
return $this->redirectPath;
}
if (property_exists($this, 'redirectPath')) {
return $this->redirectTo;
}
if (config('lasasllecmsfrontend.frontend... | [
"public",
"function",
"redirectPathUponSuccessfulFrontendLogin",
"(",
")",
"{",
"if",
"(",
"property_exists",
"(",
"$",
"this",
",",
"'redirectPath'",
")",
")",
"{",
"return",
"$",
"this",
"->",
"redirectPath",
";",
"}",
"if",
"(",
"property_exists",
"(",
"$",... | Upon successful front-end login, redirect to this path
@return string | [
"Upon",
"successful",
"front",
"-",
"end",
"login",
"redirect",
"to",
"this",
"path"
] | b5203d596e18e2566e7fdcd3f13868bb44a94c1d | https://github.com/lasallecms/lasallecms-l5-usermanagement-pkg/blob/b5203d596e18e2566e7fdcd3f13868bb44a94c1d/src/Helpers/TwoFactorAuthorization/TwoFactorAuthHelper.php#L495-L510 |
25,335 | apioo/psx-validate | src/Validate.php | Validate.apply | public function apply($value, $type = self::TYPE_STRING, array $filters = array(), $title = null, $required = true)
{
$result = $this->validate($value, $type, $filters, $title, $required);
if ($result->hasError()) {
throw new ValidationException($result->getFirstError(), $title, $result... | php | public function apply($value, $type = self::TYPE_STRING, array $filters = array(), $title = null, $required = true)
{
$result = $this->validate($value, $type, $filters, $title, $required);
if ($result->hasError()) {
throw new ValidationException($result->getFirstError(), $title, $result... | [
"public",
"function",
"apply",
"(",
"$",
"value",
",",
"$",
"type",
"=",
"self",
"::",
"TYPE_STRING",
",",
"array",
"$",
"filters",
"=",
"array",
"(",
")",
",",
"$",
"title",
"=",
"null",
",",
"$",
"required",
"=",
"true",
")",
"{",
"$",
"result",
... | Applies filter on the given value and returns the value on success or
throws an exception if an error occured
@param string $value
@param string $type
@param \PSX\Validate\FilterInterface[]|callable $filters
@param string $title
@param boolean $required
@return mixed | [
"Applies",
"filter",
"on",
"the",
"given",
"value",
"and",
"returns",
"the",
"value",
"on",
"success",
"or",
"throws",
"an",
"exception",
"if",
"an",
"error",
"occured"
] | 4860c6a2c7f7ca52d3bd6d7e6ec7d6a7ddcfd83d | https://github.com/apioo/psx-validate/blob/4860c6a2c7f7ca52d3bd6d7e6ec7d6a7ddcfd83d/src/Validate.php#L53-L64 |
25,336 | LartTyler/PHP-DaybreakCommons | src/DaybreakStudios/Common/Utility/Counter.php | Counter.clear | public function clear($key = null) {
if ($key === null)
$this->counts->clear();
else
$this->counts->remove($key);
} | php | public function clear($key = null) {
if ($key === null)
$this->counts->clear();
else
$this->counts->remove($key);
} | [
"public",
"function",
"clear",
"(",
"$",
"key",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"key",
"===",
"null",
")",
"$",
"this",
"->",
"counts",
"->",
"clear",
"(",
")",
";",
"else",
"$",
"this",
"->",
"counts",
"->",
"remove",
"(",
"$",
"key",
"... | Clears the given key, or the entire counter if the key is not given.
@param mixed $key the key to clear; pass null to clear the entire counter | [
"Clears",
"the",
"given",
"key",
"or",
"the",
"entire",
"counter",
"if",
"the",
"key",
"is",
"not",
"given",
"."
] | db25b5d6cea9b5a1d5afc4c5548a2cbc3018bc0d | https://github.com/LartTyler/PHP-DaybreakCommons/blob/db25b5d6cea9b5a1d5afc4c5548a2cbc3018bc0d/src/DaybreakStudios/Common/Utility/Counter.php#L61-L66 |
25,337 | LartTyler/PHP-DaybreakCommons | src/DaybreakStudios/Common/Utility/Counter.php | Counter.add | public function add($key, $amount) {
if (!$this->allowed($key))
throw new OutOfBoundsException(sprintf('"%s" is not an allowed key in strict mode', $key));
else if (!$this->has($key))
$this->counts->put($key, 0);
$this->counts->put($key, $this->counts->get($key) + $amount);
return $this->counts->g... | php | public function add($key, $amount) {
if (!$this->allowed($key))
throw new OutOfBoundsException(sprintf('"%s" is not an allowed key in strict mode', $key));
else if (!$this->has($key))
$this->counts->put($key, 0);
$this->counts->put($key, $this->counts->get($key) + $amount);
return $this->counts->g... | [
"public",
"function",
"add",
"(",
"$",
"key",
",",
"$",
"amount",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"allowed",
"(",
"$",
"key",
")",
")",
"throw",
"new",
"OutOfBoundsException",
"(",
"sprintf",
"(",
"'\"%s\" is not an allowed key in strict mode'",... | Adds the given amount to a key. If the key does not exist and the counter is not running in strict mode, it
will be initialized to zero.
@throws OutOfBoundsException if the counter is in strict mode and the key was not defined at construction
@param mixed $key the key to add to
@param int|float $amount the a... | [
"Adds",
"the",
"given",
"amount",
"to",
"a",
"key",
".",
"If",
"the",
"key",
"does",
"not",
"exist",
"and",
"the",
"counter",
"is",
"not",
"running",
"in",
"strict",
"mode",
"it",
"will",
"be",
"initialized",
"to",
"zero",
"."
] | db25b5d6cea9b5a1d5afc4c5548a2cbc3018bc0d | https://github.com/LartTyler/PHP-DaybreakCommons/blob/db25b5d6cea9b5a1d5afc4c5548a2cbc3018bc0d/src/DaybreakStudios/Common/Utility/Counter.php#L78-L87 |
25,338 | staticka/staticka | src/Page.php | Page.uris | public function uris()
{
$uri = (string) $this->uri;
$exists = isset($this->data['permalink']);
$exists && $uri = $this->data['permalink'];
$items = explode('/', (string) $uri);
$items = array_filter((array) $items);
return (array) array_values($items);
} | php | public function uris()
{
$uri = (string) $this->uri;
$exists = isset($this->data['permalink']);
$exists && $uri = $this->data['permalink'];
$items = explode('/', (string) $uri);
$items = array_filter((array) $items);
return (array) array_values($items);
} | [
"public",
"function",
"uris",
"(",
")",
"{",
"$",
"uri",
"=",
"(",
"string",
")",
"$",
"this",
"->",
"uri",
";",
"$",
"exists",
"=",
"isset",
"(",
"$",
"this",
"->",
"data",
"[",
"'permalink'",
"]",
")",
";",
"$",
"exists",
"&&",
"$",
"uri",
"=... | Returns an array of URI segments.
@return array | [
"Returns",
"an",
"array",
"of",
"URI",
"segments",
"."
] | 6e3b814c391ed03b0bd409803e11579bae677ce4 | https://github.com/staticka/staticka/blob/6e3b814c391ed03b0bd409803e11579bae677ce4/src/Page.php#L80-L93 |
25,339 | staticka/staticka | src/Page.php | Page.layout | public function layout()
{
$exists = (boolean) isset($this->data['layout']);
return $exists ? $this->data['layout'] : null;
} | php | public function layout()
{
$exists = (boolean) isset($this->data['layout']);
return $exists ? $this->data['layout'] : null;
} | [
"public",
"function",
"layout",
"(",
")",
"{",
"$",
"exists",
"=",
"(",
"boolean",
")",
"isset",
"(",
"$",
"this",
"->",
"data",
"[",
"'layout'",
"]",
")",
";",
"return",
"$",
"exists",
"?",
"$",
"this",
"->",
"data",
"[",
"'layout'",
"]",
":",
"... | Returns the layout of the page.
@return string|null | [
"Returns",
"the",
"layout",
"of",
"the",
"page",
"."
] | 6e3b814c391ed03b0bd409803e11579bae677ce4 | https://github.com/staticka/staticka/blob/6e3b814c391ed03b0bd409803e11579bae677ce4/src/Page.php#L100-L105 |
25,340 | kaiohken1982/Neobazaar | src/Neobazaar/Entity/Repository/UserRepository.php | UserRepository.getPaginator | public function getPaginator($params = array())
{
$page = isset($params['page']) ? (int)$params['page'] : 1;
$email = isset($params['email']) ? $params['email'] : null;
$limit = isset($params['limit']) ? (int) $params['limit'] : 10;
$offset = isset($params['offset']) ? (int) $params['offset'] : 0;
$qb... | php | public function getPaginator($params = array())
{
$page = isset($params['page']) ? (int)$params['page'] : 1;
$email = isset($params['email']) ? $params['email'] : null;
$limit = isset($params['limit']) ? (int) $params['limit'] : 10;
$offset = isset($params['offset']) ? (int) $params['offset'] : 0;
$qb... | [
"public",
"function",
"getPaginator",
"(",
"$",
"params",
"=",
"array",
"(",
")",
")",
"{",
"$",
"page",
"=",
"isset",
"(",
"$",
"params",
"[",
"'page'",
"]",
")",
"?",
"(",
"int",
")",
"$",
"params",
"[",
"'page'",
"]",
":",
"1",
";",
"$",
"em... | Return the paginator
@param array $params
@return \Zend\Paginator\Paginator | [
"Return",
"the",
"paginator"
] | 288c972dea981d715c4e136edb5dba0318c9e6cb | https://github.com/kaiohken1982/Neobazaar/blob/288c972dea981d715c4e136edb5dba0318c9e6cb/src/Neobazaar/Entity/Repository/UserRepository.php#L112-L149 |
25,341 | bytic/auth | src/Models/Users/Traits/Authentication/AuthenticationUserTrait.php | AuthenticationUserTrait.authenticate | public function authenticate($request = [])
{
if ($request) {
$this->email = clean($request['email']);
$this->password = $this->getPasswordHelper()->hash(clean($request['password']));
} else {
$this->password = $this->getPasswordHelper()->hash(clean($this->passwor... | php | public function authenticate($request = [])
{
if ($request) {
$this->email = clean($request['email']);
$this->password = $this->getPasswordHelper()->hash(clean($request['password']));
} else {
$this->password = $this->getPasswordHelper()->hash(clean($this->passwor... | [
"public",
"function",
"authenticate",
"(",
"$",
"request",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"$",
"request",
")",
"{",
"$",
"this",
"->",
"email",
"=",
"clean",
"(",
"$",
"request",
"[",
"'email'",
"]",
")",
";",
"$",
"this",
"->",
"password",
... | Authenticate user from request
@param array $request
@return bool|null | [
"Authenticate",
"user",
"from",
"request"
] | c155687840e9cd160e0c55a94f24a3608f72604c | https://github.com/bytic/auth/blob/c155687840e9cd160e0c55a94f24a3608f72604c/src/Models/Users/Traits/Authentication/AuthenticationUserTrait.php#L36-L59 |
25,342 | OxfordInfoLabs/kinikit-core | src/Util/Multithreading/Thread.php | Thread.run | public function run($parameters = array()) {
// Grab a process ID for a new forked process
$this->pid = \pcntl_fork();
if (!$this->pid) {
$this->process($parameters);
posix_kill(getmypid(), 9);
}
return $this->pid;
} | php | public function run($parameters = array()) {
// Grab a process ID for a new forked process
$this->pid = \pcntl_fork();
if (!$this->pid) {
$this->process($parameters);
posix_kill(getmypid(), 9);
}
return $this->pid;
} | [
"public",
"function",
"run",
"(",
"$",
"parameters",
"=",
"array",
"(",
")",
")",
"{",
"// Grab a process ID for a new forked process",
"$",
"this",
"->",
"pid",
"=",
"\\",
"pcntl_fork",
"(",
")",
";",
"if",
"(",
"!",
"$",
"this",
"->",
"pid",
")",
"{",
... | Main run method called to start the thread. | [
"Main",
"run",
"method",
"called",
"to",
"start",
"the",
"thread",
"."
] | edc1b2e6ffabd595c4c7d322279b3dd1e59ef359 | https://github.com/OxfordInfoLabs/kinikit-core/blob/edc1b2e6ffabd595c4c7d322279b3dd1e59ef359/src/Util/Multithreading/Thread.php#L22-L33 |
25,343 | OxfordInfoLabs/kinikit-core | src/Util/Multithreading/Thread.php | Thread.wait | public function wait() {
if ($this->pid) {
\pcntl_waitpid($this->pid, $status, WUNTRACED);
return $status;
} else {
return false;
}
} | php | public function wait() {
if ($this->pid) {
\pcntl_waitpid($this->pid, $status, WUNTRACED);
return $status;
} else {
return false;
}
} | [
"public",
"function",
"wait",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"pid",
")",
"{",
"\\",
"pcntl_waitpid",
"(",
"$",
"this",
"->",
"pid",
",",
"$",
"status",
",",
"WUNTRACED",
")",
";",
"return",
"$",
"status",
";",
"}",
"else",
"{",
"ret... | Blocking method called by another thread which waits until this
thread has completed. | [
"Blocking",
"method",
"called",
"by",
"another",
"thread",
"which",
"waits",
"until",
"this",
"thread",
"has",
"completed",
"."
] | edc1b2e6ffabd595c4c7d322279b3dd1e59ef359 | https://github.com/OxfordInfoLabs/kinikit-core/blob/edc1b2e6ffabd595c4c7d322279b3dd1e59ef359/src/Util/Multithreading/Thread.php#L40-L47 |
25,344 | OxfordInfoLabs/kinikit-core | src/Util/Multithreading/Thread.php | Thread.getStatus | public function getStatus() {
if ($this->pid) {
$waitPID = \pcntl_waitpid($this->pid, $status, WNOHANG);
if ($waitPID == $this->pid) {
return Thread::THREAD_EXITED;
} else {
return Thread::THREAD_RUNNING;
}
}
} | php | public function getStatus() {
if ($this->pid) {
$waitPID = \pcntl_waitpid($this->pid, $status, WNOHANG);
if ($waitPID == $this->pid) {
return Thread::THREAD_EXITED;
} else {
return Thread::THREAD_RUNNING;
}
}
} | [
"public",
"function",
"getStatus",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"pid",
")",
"{",
"$",
"waitPID",
"=",
"\\",
"pcntl_waitpid",
"(",
"$",
"this",
"->",
"pid",
",",
"$",
"status",
",",
"WNOHANG",
")",
";",
"if",
"(",
"$",
"waitPID",
"... | Get the current status for this thread. | [
"Get",
"the",
"current",
"status",
"for",
"this",
"thread",
"."
] | edc1b2e6ffabd595c4c7d322279b3dd1e59ef359 | https://github.com/OxfordInfoLabs/kinikit-core/blob/edc1b2e6ffabd595c4c7d322279b3dd1e59ef359/src/Util/Multithreading/Thread.php#L53-L63 |
25,345 | miBadger/miBadger.Settings | src/Settings.php | Settings.load | public function load($path = self::DEFAULT_FILENAME)
{
$file = new File($path);
if (($data = json_decode($file->read(), true)) === null) {
throw new \UnexpectedValueException('Invalid JSON.');
}
$this->data = (array) $data;
return $this;
} | php | public function load($path = self::DEFAULT_FILENAME)
{
$file = new File($path);
if (($data = json_decode($file->read(), true)) === null) {
throw new \UnexpectedValueException('Invalid JSON.');
}
$this->data = (array) $data;
return $this;
} | [
"public",
"function",
"load",
"(",
"$",
"path",
"=",
"self",
"::",
"DEFAULT_FILENAME",
")",
"{",
"$",
"file",
"=",
"new",
"File",
"(",
"$",
"path",
")",
";",
"if",
"(",
"(",
"$",
"data",
"=",
"json_decode",
"(",
"$",
"file",
"->",
"read",
"(",
")... | Load the settings file from the given location.
@param $path = self::DEFAULT_FILENAME
@return $this
@throws FileException on failure.
@throws \UnexpectedValueException on failure. | [
"Load",
"the",
"settings",
"file",
"from",
"the",
"given",
"location",
"."
] | dc2be14d96e2db84acb9fba543099380b1f14bd8 | https://github.com/miBadger/miBadger.Settings/blob/dc2be14d96e2db84acb9fba543099380b1f14bd8/src/Settings.php#L144-L155 |
25,346 | miBadger/miBadger.Settings | src/Settings.php | Settings.save | public function save($path = self::DEFAULT_FILENAME)
{
$file = new File($path);
$file->write(json_encode($this->data));
return $this;
} | php | public function save($path = self::DEFAULT_FILENAME)
{
$file = new File($path);
$file->write(json_encode($this->data));
return $this;
} | [
"public",
"function",
"save",
"(",
"$",
"path",
"=",
"self",
"::",
"DEFAULT_FILENAME",
")",
"{",
"$",
"file",
"=",
"new",
"File",
"(",
"$",
"path",
")",
";",
"$",
"file",
"->",
"write",
"(",
"json_encode",
"(",
"$",
"this",
"->",
"data",
")",
")",
... | Save the settings file at the given location.
@param $path = self::DEFAULT_FILENAME
@return $this
@throws FileException on failure. | [
"Save",
"the",
"settings",
"file",
"at",
"the",
"given",
"location",
"."
] | dc2be14d96e2db84acb9fba543099380b1f14bd8 | https://github.com/miBadger/miBadger.Settings/blob/dc2be14d96e2db84acb9fba543099380b1f14bd8/src/Settings.php#L164-L171 |
25,347 | wearenolte/wp-endpoints-routes | src/Routes.php | Routes.get_blog_routes | private function get_blog_routes() {
$data = [];
$blog_url = false;
$home_url = home_url();
$page_on_front = get_option( 'page_on_front' );
$blog_page = get_option( 'page_for_posts' );
if ( ! $page_on_front ) {
$blog_url = '/';
} elseif ( $blog_page ) {
$blog_url = rtrim( str_replace( $home_url... | php | private function get_blog_routes() {
$data = [];
$blog_url = false;
$home_url = home_url();
$page_on_front = get_option( 'page_on_front' );
$blog_page = get_option( 'page_for_posts' );
if ( ! $page_on_front ) {
$blog_url = '/';
} elseif ( $blog_page ) {
$blog_url = rtrim( str_replace( $home_url... | [
"private",
"function",
"get_blog_routes",
"(",
")",
"{",
"$",
"data",
"=",
"[",
"]",
";",
"$",
"blog_url",
"=",
"false",
";",
"$",
"home_url",
"=",
"home_url",
"(",
")",
";",
"$",
"page_on_front",
"=",
"get_option",
"(",
"'page_on_front'",
")",
";",
"$... | Create routes for the blog page and single posts if active..
@return array | [
"Create",
"routes",
"for",
"the",
"blog",
"page",
"and",
"single",
"posts",
"if",
"active",
".."
] | d86e77908f9d7ddc862d1a902cd8d2d7c0449473 | https://github.com/wearenolte/wp-endpoints-routes/blob/d86e77908f9d7ddc862d1a902cd8d2d7c0449473/src/Routes.php#L91-L131 |
25,348 | agentmedia/phine-core | src/Core/Modules/Backend/UserList.php | UserList.GroupsFormUrl | protected function GroupsFormUrl(User $user)
{
$args = array('user'=>$user->GetID());
return BackendRouter::ModuleUrl(new UsergroupAssignmentForm(), $args);
} | php | protected function GroupsFormUrl(User $user)
{
$args = array('user'=>$user->GetID());
return BackendRouter::ModuleUrl(new UsergroupAssignmentForm(), $args);
} | [
"protected",
"function",
"GroupsFormUrl",
"(",
"User",
"$",
"user",
")",
"{",
"$",
"args",
"=",
"array",
"(",
"'user'",
"=>",
"$",
"user",
"->",
"GetID",
"(",
")",
")",
";",
"return",
"BackendRouter",
"::",
"ModuleUrl",
"(",
"new",
"UsergroupAssignmentForm... | The url to the form for the user groups
@param User $user
@return string | [
"The",
"url",
"to",
"the",
"form",
"for",
"the",
"user",
"groups"
] | 38c1be8d03ebffae950d00a96da3c612aff67832 | https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Modules/Backend/UserList.php#L65-L69 |
25,349 | agentmedia/phine-core | src/Core/Modules/Backend/UserList.php | UserList.RemovalObject | protected function RemovalObject()
{
$id = Request::PostData('delete');
return $id ? User::Schema()->ByID($id) : null;
} | php | protected function RemovalObject()
{
$id = Request::PostData('delete');
return $id ? User::Schema()->ByID($id) : null;
} | [
"protected",
"function",
"RemovalObject",
"(",
")",
"{",
"$",
"id",
"=",
"Request",
"::",
"PostData",
"(",
"'delete'",
")",
";",
"return",
"$",
"id",
"?",
"User",
"::",
"Schema",
"(",
")",
"->",
"ByID",
"(",
"$",
"id",
")",
":",
"null",
";",
"}"
] | Gets the site for removal if delete id is posted
@return User | [
"Gets",
"the",
"site",
"for",
"removal",
"if",
"delete",
"id",
"is",
"posted"
] | 38c1be8d03ebffae950d00a96da3c612aff67832 | https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Modules/Backend/UserList.php#L104-L108 |
25,350 | agentmedia/phine-core | src/Core/Modules/Backend/UserList.php | UserList.CanEdit | protected function CanEdit(User $user)
{
return self::Guard()->Allow(BackendAction::Edit(), $user)&&
self::Guard()->Allow(BackendAction::UseIt(), new UserForm());
} | php | protected function CanEdit(User $user)
{
return self::Guard()->Allow(BackendAction::Edit(), $user)&&
self::Guard()->Allow(BackendAction::UseIt(), new UserForm());
} | [
"protected",
"function",
"CanEdit",
"(",
"User",
"$",
"user",
")",
"{",
"return",
"self",
"::",
"Guard",
"(",
")",
"->",
"Allow",
"(",
"BackendAction",
"::",
"Edit",
"(",
")",
",",
"$",
"user",
")",
"&&",
"self",
"::",
"Guard",
"(",
")",
"->",
"All... | True if user can be edited
@param User $user
@return string | [
"True",
"if",
"user",
"can",
"be",
"edited"
] | 38c1be8d03ebffae950d00a96da3c612aff67832 | https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Modules/Backend/UserList.php#L121-L125 |
25,351 | rutger-speksnijder/restphp | src/RestPHP/Response/Types/Text.php | Text.transformToText | private function transformToText($data, $hypertextRoutes = [], $depth = 0)
{
// Return the data as string if it's not an array
if (!is_array($data)) {
return "{$data}\n{$this->getHypertextString($hypertextRoutes)}";
}
// Loop through the data and add to the string
... | php | private function transformToText($data, $hypertextRoutes = [], $depth = 0)
{
// Return the data as string if it's not an array
if (!is_array($data)) {
return "{$data}\n{$this->getHypertextString($hypertextRoutes)}";
}
// Loop through the data and add to the string
... | [
"private",
"function",
"transformToText",
"(",
"$",
"data",
",",
"$",
"hypertextRoutes",
"=",
"[",
"]",
",",
"$",
"depth",
"=",
"0",
")",
"{",
"// Return the data as string if it's not an array",
"if",
"(",
"!",
"is_array",
"(",
"$",
"data",
")",
")",
"{",
... | Recursively converts the response into a text string.
@param mixed $data The data to transform.
@param optional array $hypertextRoutes An array with hypertext routes.
@return string The response as a text string. | [
"Recursively",
"converts",
"the",
"response",
"into",
"a",
"text",
"string",
"."
] | 326a7c0d79b266bbdd8a27ff1c8021caf9d28a3d | https://github.com/rutger-speksnijder/restphp/blob/326a7c0d79b266bbdd8a27ff1c8021caf9d28a3d/src/RestPHP/Response/Types/Text.php#L48-L74 |
25,352 | rutger-speksnijder/restphp | src/RestPHP/Response/Types/Text.php | Text.getHypertextString | private function getHypertextString($routes = [])
{
// Check if we have routes
if (!$routes) {
return '';
}
// Loop through the routes and add them to the string
$str = "links: \n";
foreach ($routes as $name => $route) {
$str .= "\trel: {$name... | php | private function getHypertextString($routes = [])
{
// Check if we have routes
if (!$routes) {
return '';
}
// Loop through the routes and add them to the string
$str = "links: \n";
foreach ($routes as $name => $route) {
$str .= "\trel: {$name... | [
"private",
"function",
"getHypertextString",
"(",
"$",
"routes",
"=",
"[",
"]",
")",
"{",
"// Check if we have routes",
"if",
"(",
"!",
"$",
"routes",
")",
"{",
"return",
"''",
";",
"}",
"// Loop through the routes and add them to the string",
"$",
"str",
"=",
"... | Transforms the hypertext routes into a string.
@param array $routes The hypertext routes.
@return string The hypertext routes transformed into a string. | [
"Transforms",
"the",
"hypertext",
"routes",
"into",
"a",
"string",
"."
] | 326a7c0d79b266bbdd8a27ff1c8021caf9d28a3d | https://github.com/rutger-speksnijder/restphp/blob/326a7c0d79b266bbdd8a27ff1c8021caf9d28a3d/src/RestPHP/Response/Types/Text.php#L83-L96 |
25,353 | locomotivemtl/charcoal-queue | src/Charcoal/Queue/AbstractQueueManager.php | AbstractQueueManager.processQueue | public function processQueue(callable $callback = null)
{
$queued = $this->loadQueueItems();
if (!is_callable($callback)) {
$callback = $this->processedCallback;
}
$success = [];
$failures = [];
$skipped = [];
foreach ($queued as $q) {
... | php | public function processQueue(callable $callback = null)
{
$queued = $this->loadQueueItems();
if (!is_callable($callback)) {
$callback = $this->processedCallback;
}
$success = [];
$failures = [];
$skipped = [];
foreach ($queued as $q) {
... | [
"public",
"function",
"processQueue",
"(",
"callable",
"$",
"callback",
"=",
"null",
")",
"{",
"$",
"queued",
"=",
"$",
"this",
"->",
"loadQueueItems",
"(",
")",
";",
"if",
"(",
"!",
"is_callable",
"(",
"$",
"callback",
")",
")",
"{",
"$",
"callback",
... | Process the items of the queue.
If no callback is passed and a self::$processedCallback is set, the latter is used.
@param callable $callback An optional alternative callback routine executed
after all queue items are processed.
@return boolean Success / Failure | [
"Process",
"the",
"items",
"of",
"the",
"queue",
"."
] | 90c47581cd35fbb554eca513f909171a70325b44 | https://github.com/locomotivemtl/charcoal-queue/blob/90c47581cd35fbb554eca513f909171a70325b44/src/Charcoal/Queue/AbstractQueueManager.php#L257-L297 |
25,354 | locomotivemtl/charcoal-queue | src/Charcoal/Queue/AbstractQueueManager.php | AbstractQueueManager.loadQueueItems | public function loadQueueItems()
{
$loader = new CollectionLoader([
'logger' => $this->logger,
'factory' => $this->queueItemFactory(),
]);
$loader->setModel($this->queueItemProto());
$loader->addFilter([
'property' => 'processed',
'val... | php | public function loadQueueItems()
{
$loader = new CollectionLoader([
'logger' => $this->logger,
'factory' => $this->queueItemFactory(),
]);
$loader->setModel($this->queueItemProto());
$loader->addFilter([
'property' => 'processed',
'val... | [
"public",
"function",
"loadQueueItems",
"(",
")",
"{",
"$",
"loader",
"=",
"new",
"CollectionLoader",
"(",
"[",
"'logger'",
"=>",
"$",
"this",
"->",
"logger",
",",
"'factory'",
"=>",
"$",
"this",
"->",
"queueItemFactory",
"(",
")",
",",
"]",
")",
";",
... | Retrieve the items of the current queue.
@return \Charcoal\Model\Collection|array | [
"Retrieve",
"the",
"items",
"of",
"the",
"current",
"queue",
"."
] | 90c47581cd35fbb554eca513f909171a70325b44 | https://github.com/locomotivemtl/charcoal-queue/blob/90c47581cd35fbb554eca513f909171a70325b44/src/Charcoal/Queue/AbstractQueueManager.php#L304-L342 |
25,355 | Subscribo/klarna-invoice-sdk-wrapped | src/klarnaaddr.php | KlarnaAddr.setEmail | public function setEmail($email)
{
if (!is_string($email)) {
$email = strval($email);
}
$this->email = $email;
} | php | public function setEmail($email)
{
if (!is_string($email)) {
$email = strval($email);
}
$this->email = $email;
} | [
"public",
"function",
"setEmail",
"(",
"$",
"email",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"email",
")",
")",
"{",
"$",
"email",
"=",
"strval",
"(",
"$",
"email",
")",
";",
"}",
"$",
"this",
"->",
"email",
"=",
"$",
"email",
";",
"}"... | Sets the email address.
@param string $email email address
@return void | [
"Sets",
"the",
"email",
"address",
"."
] | 4a45ddd9ec444f5a6d02628ad65e635a3e12611c | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/klarnaaddr.php#L231-L238 |
25,356 | Subscribo/klarna-invoice-sdk-wrapped | src/klarnaaddr.php | KlarnaAddr.setTelno | public function setTelno($telno)
{
if (!is_string($telno)) {
$telno = strval($telno);
}
$this->telno = $telno;
} | php | public function setTelno($telno)
{
if (!is_string($telno)) {
$telno = strval($telno);
}
$this->telno = $telno;
} | [
"public",
"function",
"setTelno",
"(",
"$",
"telno",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"telno",
")",
")",
"{",
"$",
"telno",
"=",
"strval",
"(",
"$",
"telno",
")",
";",
"}",
"$",
"this",
"->",
"telno",
"=",
"$",
"telno",
";",
"}"... | Sets the phone number.
@param string $telno telno
@return void | [
"Sets",
"the",
"phone",
"number",
"."
] | 4a45ddd9ec444f5a6d02628ad65e635a3e12611c | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/klarnaaddr.php#L257-L263 |
25,357 | Subscribo/klarna-invoice-sdk-wrapped | src/klarnaaddr.php | KlarnaAddr.setCellno | public function setCellno($cellno)
{
if (!is_string($cellno)) {
$cellno = strval($cellno);
}
$this->cellno = $cellno;
} | php | public function setCellno($cellno)
{
if (!is_string($cellno)) {
$cellno = strval($cellno);
}
$this->cellno = $cellno;
} | [
"public",
"function",
"setCellno",
"(",
"$",
"cellno",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"cellno",
")",
")",
"{",
"$",
"cellno",
"=",
"strval",
"(",
"$",
"cellno",
")",
";",
"}",
"$",
"this",
"->",
"cellno",
"=",
"$",
"cellno",
";"... | Sets the cellphone number.
@param string $cellno mobile number
@return void | [
"Sets",
"the",
"cellphone",
"number",
"."
] | 4a45ddd9ec444f5a6d02628ad65e635a3e12611c | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/klarnaaddr.php#L282-L289 |
25,358 | Subscribo/klarna-invoice-sdk-wrapped | src/klarnaaddr.php | KlarnaAddr.setFirstName | public function setFirstName($fname)
{
if (!is_string($fname)) {
$fname = strval($fname);
}
$this->fname = $fname;
} | php | public function setFirstName($fname)
{
if (!is_string($fname)) {
$fname = strval($fname);
}
$this->fname = $fname;
} | [
"public",
"function",
"setFirstName",
"(",
"$",
"fname",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"fname",
")",
")",
"{",
"$",
"fname",
"=",
"strval",
"(",
"$",
"fname",
")",
";",
"}",
"$",
"this",
"->",
"fname",
"=",
"$",
"fname",
";",
... | Sets the first name.
@param string $fname firstname
@return void | [
"Sets",
"the",
"first",
"name",
"."
] | 4a45ddd9ec444f5a6d02628ad65e635a3e12611c | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/klarnaaddr.php#L308-L315 |
25,359 | Subscribo/klarna-invoice-sdk-wrapped | src/klarnaaddr.php | KlarnaAddr.setLastName | public function setLastName($lname)
{
if (!is_string($lname)) {
$lname = strval($lname);
}
$this->lname = $lname;
} | php | public function setLastName($lname)
{
if (!is_string($lname)) {
$lname = strval($lname);
}
$this->lname = $lname;
} | [
"public",
"function",
"setLastName",
"(",
"$",
"lname",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"lname",
")",
")",
"{",
"$",
"lname",
"=",
"strval",
"(",
"$",
"lname",
")",
";",
"}",
"$",
"this",
"->",
"lname",
"=",
"$",
"lname",
";",
... | Sets the last name.
@param string $lname lastname
@return void | [
"Sets",
"the",
"last",
"name",
"."
] | 4a45ddd9ec444f5a6d02628ad65e635a3e12611c | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/klarnaaddr.php#L334-L341 |
25,360 | Subscribo/klarna-invoice-sdk-wrapped | src/klarnaaddr.php | KlarnaAddr.setStreet | public function setStreet($street)
{
if (!is_string($street)) {
$street = strval($street);
}
$this->street = $street;
} | php | public function setStreet($street)
{
if (!is_string($street)) {
$street = strval($street);
}
$this->street = $street;
} | [
"public",
"function",
"setStreet",
"(",
"$",
"street",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"street",
")",
")",
"{",
"$",
"street",
"=",
"strval",
"(",
"$",
"street",
")",
";",
"}",
"$",
"this",
"->",
"street",
"=",
"$",
"street",
";"... | Sets the street address.
@param string $street street address
@return void | [
"Sets",
"the",
"street",
"address",
"."
] | 4a45ddd9ec444f5a6d02628ad65e635a3e12611c | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/klarnaaddr.php#L416-L423 |
25,361 | Subscribo/klarna-invoice-sdk-wrapped | src/klarnaaddr.php | KlarnaAddr.setZipCode | public function setZipCode($zip)
{
if (!is_string($zip)) {
$zip = strval($zip);
}
$zip = str_replace(' ', '', $zip); //remove spaces
$this->zip = $zip;
} | php | public function setZipCode($zip)
{
if (!is_string($zip)) {
$zip = strval($zip);
}
$zip = str_replace(' ', '', $zip); //remove spaces
$this->zip = $zip;
} | [
"public",
"function",
"setZipCode",
"(",
"$",
"zip",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"zip",
")",
")",
"{",
"$",
"zip",
"=",
"strval",
"(",
"$",
"zip",
")",
";",
"}",
"$",
"zip",
"=",
"str_replace",
"(",
"' '",
",",
"''",
",",
... | Sets the zip code.
@param string $zip zip code
@return void | [
"Sets",
"the",
"zip",
"code",
"."
] | 4a45ddd9ec444f5a6d02628ad65e635a3e12611c | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/klarnaaddr.php#L442-L452 |
25,362 | Subscribo/klarna-invoice-sdk-wrapped | src/klarnaaddr.php | KlarnaAddr.setCity | public function setCity($city)
{
if (!is_string($city)) {
$city = strval($city);
}
$this->city = $city;
} | php | public function setCity($city)
{
if (!is_string($city)) {
$city = strval($city);
}
$this->city = $city;
} | [
"public",
"function",
"setCity",
"(",
"$",
"city",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"city",
")",
")",
"{",
"$",
"city",
"=",
"strval",
"(",
"$",
"city",
")",
";",
"}",
"$",
"this",
"->",
"city",
"=",
"$",
"city",
";",
"}"
] | Sets the city.
@param string $city city
@return void | [
"Sets",
"the",
"city",
"."
] | 4a45ddd9ec444f5a6d02628ad65e635a3e12611c | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/klarnaaddr.php#L471-L478 |
25,363 | Subscribo/klarna-invoice-sdk-wrapped | src/klarnaaddr.php | KlarnaAddr.setCountry | public function setCountry($country)
{
if ($country === null) {
throw new Klarna_ArgumentNotSetException('Country');
}
if (is_numeric($country)) {
if (!is_int($country)) {
$country = intval($country);
}
$this->country = $country... | php | public function setCountry($country)
{
if ($country === null) {
throw new Klarna_ArgumentNotSetException('Country');
}
if (is_numeric($country)) {
if (!is_int($country)) {
$country = intval($country);
}
$this->country = $country... | [
"public",
"function",
"setCountry",
"(",
"$",
"country",
")",
"{",
"if",
"(",
"$",
"country",
"===",
"null",
")",
"{",
"throw",
"new",
"Klarna_ArgumentNotSetException",
"(",
"'Country'",
")",
";",
"}",
"if",
"(",
"is_numeric",
"(",
"$",
"country",
")",
"... | Sets the country, use either a two letter representation or the integer
constant.
@param int $country {@link KlarnaCountry}
@throws KlarnaException
@return void | [
"Sets",
"the",
"country",
"use",
"either",
"a",
"two",
"letter",
"representation",
"or",
"the",
"integer",
"constant",
"."
] | 4a45ddd9ec444f5a6d02628ad65e635a3e12611c | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/klarnaaddr.php#L510-L527 |
25,364 | Subscribo/klarna-invoice-sdk-wrapped | src/klarnaaddr.php | KlarnaAddr.toArray | public function toArray()
{
return array(
'email' => $this->getEmail(),
'telno' => $this->getTelno(),
'cellno' => $this->getCellno(),
'fname' => $this->getFirstName(),
'lname' => $this->getLastName(),
'company' => $this->getCompanyName(... | php | public function toArray()
{
return array(
'email' => $this->getEmail(),
'telno' => $this->getTelno(),
'cellno' => $this->getCellno(),
'fname' => $this->getFirstName(),
'lname' => $this->getLastName(),
'company' => $this->getCompanyName(... | [
"public",
"function",
"toArray",
"(",
")",
"{",
"return",
"array",
"(",
"'email'",
"=>",
"$",
"this",
"->",
"getEmail",
"(",
")",
",",
"'telno'",
"=>",
"$",
"this",
"->",
"getTelno",
"(",
")",
",",
"'cellno'",
"=>",
"$",
"this",
"->",
"getCellno",
"(... | Returns an associative array representing this object.
@return array | [
"Returns",
"an",
"associative",
"array",
"representing",
"this",
"object",
"."
] | 4a45ddd9ec444f5a6d02628ad65e635a3e12611c | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/klarnaaddr.php#L590-L607 |
25,365 | Talis90/HtmlMediaFinder | library/HtmlMediaFinder/RemoteXpathAdapter.php | RemoteXpathAdapter.postRequest | static function postRequest($url, array $post) {
$handle = curl_init($url);
curl_setopt_array($handle, [
CURLOPT_POST => count($post),
CURLOPT_POSTFIELDS => http_build_query($post),
CURLOPT_RETURNTRANSFER => 1
]);
$result = curl_exec($handle);
curl_close($handle);
return $result;
} | php | static function postRequest($url, array $post) {
$handle = curl_init($url);
curl_setopt_array($handle, [
CURLOPT_POST => count($post),
CURLOPT_POSTFIELDS => http_build_query($post),
CURLOPT_RETURNTRANSFER => 1
]);
$result = curl_exec($handle);
curl_close($handle);
return $result;
} | [
"static",
"function",
"postRequest",
"(",
"$",
"url",
",",
"array",
"$",
"post",
")",
"{",
"$",
"handle",
"=",
"curl_init",
"(",
"$",
"url",
")",
";",
"curl_setopt_array",
"(",
"$",
"handle",
",",
"[",
"CURLOPT_POST",
"=>",
"count",
"(",
"$",
"post",
... | Get result string of post request
@param string $url
@param array $post
@return string | [
"Get",
"result",
"string",
"of",
"post",
"request"
] | fd19212a88d5d3f78d20aeea1accf7be427643b0 | https://github.com/Talis90/HtmlMediaFinder/blob/fd19212a88d5d3f78d20aeea1accf7be427643b0/library/HtmlMediaFinder/RemoteXpathAdapter.php#L42-L55 |
25,366 | koolkode/meta | src/Source/SourceParser.php | SourceParser.parse | public function parse(SourceStream $code, SourceStorageInterface $storage = NULL)
{
$buffer = new SourceBuffer();
$this->doParse($code, $buffer, $storage);
return $buffer;
} | php | public function parse(SourceStream $code, SourceStorageInterface $storage = NULL)
{
$buffer = new SourceBuffer();
$this->doParse($code, $buffer, $storage);
return $buffer;
} | [
"public",
"function",
"parse",
"(",
"SourceStream",
"$",
"code",
",",
"SourceStorageInterface",
"$",
"storage",
"=",
"NULL",
")",
"{",
"$",
"buffer",
"=",
"new",
"SourceBuffer",
"(",
")",
";",
"$",
"this",
"->",
"doParse",
"(",
"$",
"code",
",",
"$",
"... | Parse the given code and create a SourceGenerator from it, extracted data for static
analysis is stored in the given storage implementation.
@param SourceStream $code The source code to be parsed.
@param SourceStorageInterface $storage The stoage implementation for extracted data.
@return SourceGenerator | [
"Parse",
"the",
"given",
"code",
"and",
"create",
"a",
"SourceGenerator",
"from",
"it",
"extracted",
"data",
"for",
"static",
"analysis",
"is",
"stored",
"in",
"the",
"given",
"storage",
"implementation",
"."
] | 339db24d3ce461190f552c96e243bca21010f360 | https://github.com/koolkode/meta/blob/339db24d3ce461190f552c96e243bca21010f360/src/Source/SourceParser.php#L40-L46 |
25,367 | koolkode/meta | src/Source/SourceParser.php | SourceParser.lookup | protected function lookup($localName, $namespace = '', array $import = [])
{
if($localName == '')
{
return $localName;
}
switch(strtolower($localName))
{
case 'bool':
case 'int':
case 'float':
case 'string':
case 'array':
case 'callable':
return strtolower($localName);
break;
... | php | protected function lookup($localName, $namespace = '', array $import = [])
{
if($localName == '')
{
return $localName;
}
switch(strtolower($localName))
{
case 'bool':
case 'int':
case 'float':
case 'string':
case 'array':
case 'callable':
return strtolower($localName);
break;
... | [
"protected",
"function",
"lookup",
"(",
"$",
"localName",
",",
"$",
"namespace",
"=",
"''",
",",
"array",
"$",
"import",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"$",
"localName",
"==",
"''",
")",
"{",
"return",
"$",
"localName",
";",
"}",
"switch",
"("... | Lookup a fully qualified name in the given namespace considering imports.
@param string $localName
@param string $namespace
@param array<string, string> $import
@return string | [
"Lookup",
"a",
"fully",
"qualified",
"name",
"in",
"the",
"given",
"namespace",
"considering",
"imports",
"."
] | 339db24d3ce461190f552c96e243bca21010f360 | https://github.com/koolkode/meta/blob/339db24d3ce461190f552c96e243bca21010f360/src/Source/SourceParser.php#L638-L678 |
25,368 | koolkode/meta | src/Source/SourceParser.php | SourceParser.parseTypeModifiers | protected function parseTypeModifiers(array $tokens)
{
$modifiers = 0;
foreach($tokens as $tok)
{
if(is_array($tok))
{
switch($tok[0])
{
case T_ABSTRACT:
$modifiers |= MetaInfo::IS_ABSTRACT;
break;
case T_FINAL:
$modifiers |= MetaInfo::IS_FINAL;
br... | php | protected function parseTypeModifiers(array $tokens)
{
$modifiers = 0;
foreach($tokens as $tok)
{
if(is_array($tok))
{
switch($tok[0])
{
case T_ABSTRACT:
$modifiers |= MetaInfo::IS_ABSTRACT;
break;
case T_FINAL:
$modifiers |= MetaInfo::IS_FINAL;
br... | [
"protected",
"function",
"parseTypeModifiers",
"(",
"array",
"$",
"tokens",
")",
"{",
"$",
"modifiers",
"=",
"0",
";",
"foreach",
"(",
"$",
"tokens",
"as",
"$",
"tok",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"tok",
")",
")",
"{",
"switch",
"(",
... | Extract all type modifiers from the given tokens and combine them into a bit mask.
@param array $tokens
@return integer | [
"Extract",
"all",
"type",
"modifiers",
"from",
"the",
"given",
"tokens",
"and",
"combine",
"them",
"into",
"a",
"bit",
"mask",
"."
] | 339db24d3ce461190f552c96e243bca21010f360 | https://github.com/koolkode/meta/blob/339db24d3ce461190f552c96e243bca21010f360/src/Source/SourceParser.php#L686-L707 |
25,369 | koolkode/meta | src/Source/SourceParser.php | SourceParser.parseFieldModifiers | protected function parseFieldModifiers(array $tokens)
{
$modifiers = MetaInfo::IS_PUBLIC;
foreach($tokens as $tok)
{
if(is_array($tok))
{
switch($tok[0])
{
case T_VAR:
case T_PUBLIC:
$modifiers = ($modifiers | MetaInfo::MASK_VISIBILITY) ^ MetaInfo::IS_NOT_PUBLIC;
break;
... | php | protected function parseFieldModifiers(array $tokens)
{
$modifiers = MetaInfo::IS_PUBLIC;
foreach($tokens as $tok)
{
if(is_array($tok))
{
switch($tok[0])
{
case T_VAR:
case T_PUBLIC:
$modifiers = ($modifiers | MetaInfo::MASK_VISIBILITY) ^ MetaInfo::IS_NOT_PUBLIC;
break;
... | [
"protected",
"function",
"parseFieldModifiers",
"(",
"array",
"$",
"tokens",
")",
"{",
"$",
"modifiers",
"=",
"MetaInfo",
"::",
"IS_PUBLIC",
";",
"foreach",
"(",
"$",
"tokens",
"as",
"$",
"tok",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"tok",
")",
")... | Parse all field modifiers from the given tokens and combine them into a bit mask.
@param array $tokens
@return integer | [
"Parse",
"all",
"field",
"modifiers",
"from",
"the",
"given",
"tokens",
"and",
"combine",
"them",
"into",
"a",
"bit",
"mask",
"."
] | 339db24d3ce461190f552c96e243bca21010f360 | https://github.com/koolkode/meta/blob/339db24d3ce461190f552c96e243bca21010f360/src/Source/SourceParser.php#L715-L743 |
25,370 | koolkode/meta | src/Source/SourceParser.php | SourceParser.parseMethodModifiers | protected function parseMethodModifiers(array $tokens)
{
$modifiers = MetaInfo::IS_PUBLIC;
foreach($tokens as $tok)
{
if(is_array($tok))
{
switch($tok[0])
{
case T_PUBLIC:
$modifiers = ($modifiers | MetaInfo::MASK_VISIBILITY) ^ MetaInfo::IS_NOT_PUBLIC;
break;
case... | php | protected function parseMethodModifiers(array $tokens)
{
$modifiers = MetaInfo::IS_PUBLIC;
foreach($tokens as $tok)
{
if(is_array($tok))
{
switch($tok[0])
{
case T_PUBLIC:
$modifiers = ($modifiers | MetaInfo::MASK_VISIBILITY) ^ MetaInfo::IS_NOT_PUBLIC;
break;
case... | [
"protected",
"function",
"parseMethodModifiers",
"(",
"array",
"$",
"tokens",
")",
"{",
"$",
"modifiers",
"=",
"MetaInfo",
"::",
"IS_PUBLIC",
";",
"foreach",
"(",
"$",
"tokens",
"as",
"$",
"tok",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"tok",
")",
"... | Parse all method modifiers from the given tokens and combine them into a bit mask.
@param array $tokens
@return integer | [
"Parse",
"all",
"method",
"modifiers",
"from",
"the",
"given",
"tokens",
"and",
"combine",
"them",
"into",
"a",
"bit",
"mask",
"."
] | 339db24d3ce461190f552c96e243bca21010f360 | https://github.com/koolkode/meta/blob/339db24d3ce461190f552c96e243bca21010f360/src/Source/SourceParser.php#L751-L784 |
25,371 | phossa/phossa-shared | src/Phossa/Shared/Message/MessageAbstract.php | MessageAbstract.buildMessage | protected static function buildMessage(
/*# string */ $template,
array $arguments
)/*# : string */ {
// use formatter
if (self::hasFormatter()) {
return self::getFormatter()
->formatMessage($template, $arguments);
// default is vsprintf()
... | php | protected static function buildMessage(
/*# string */ $template,
array $arguments
)/*# : string */ {
// use formatter
if (self::hasFormatter()) {
return self::getFormatter()
->formatMessage($template, $arguments);
// default is vsprintf()
... | [
"protected",
"static",
"function",
"buildMessage",
"(",
"/*# string */",
"$",
"template",
",",
"array",
"$",
"arguments",
")",
"/*# : string */",
"{",
"// use formatter",
"if",
"(",
"self",
"::",
"hasFormatter",
"(",
")",
")",
"{",
"return",
"self",
"::",
"get... | Build message from template and arguments.
- Make sure '%s' matches the arguments provided.
- Use message formatter if exists
@param string $template message template
@param array $arguments arguments for the template
@return string
@access protected
@static | [
"Build",
"message",
"from",
"template",
"and",
"arguments",
"."
] | fcf140c09e94c3a441ee4e285de0b4c18cb6504b | https://github.com/phossa/phossa-shared/blob/fcf140c09e94c3a441ee4e285de0b4c18cb6504b/src/Phossa/Shared/Message/MessageAbstract.php#L175-L202 |
25,372 | jonesiscoding/device | src/DeviceFeatureInfo.php | DeviceFeatureInfo.get | public function get( $item = null )
{
if( empty( $this->_detect ) || !array_key_exists( $item, $this->_detect ) )
{
$this->_detect = $this->detect();
}
if( $item )
{
return ( array_key_exists( $item, $this->_detect ) ) ? $this->_detect[ $item ] : false;
}
return $this->_detec... | php | public function get( $item = null )
{
if( empty( $this->_detect ) || !array_key_exists( $item, $this->_detect ) )
{
$this->_detect = $this->detect();
}
if( $item )
{
return ( array_key_exists( $item, $this->_detect ) ) ? $this->_detect[ $item ] : false;
}
return $this->_detec... | [
"public",
"function",
"get",
"(",
"$",
"item",
"=",
"null",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"this",
"->",
"_detect",
")",
"||",
"!",
"array_key_exists",
"(",
"$",
"item",
",",
"$",
"this",
"->",
"_detect",
")",
")",
"{",
"$",
"this",
"->"... | Retrieves the full results of the current client detection, or a specific parameter. Available parameters are
hidpi, width, height, speed, modern, touch, and cookies.
@param string|null $item The parameter you wish to detect
@return string|array|bool The detected parameter, or if $item was not given, the ar... | [
"Retrieves",
"the",
"full",
"results",
"of",
"the",
"current",
"client",
"detection",
"or",
"a",
"specific",
"parameter",
".",
"Available",
"parameters",
"are",
"hidpi",
"width",
"height",
"speed",
"modern",
"touch",
"and",
"cookies",
"."
] | d3c66f934bcaa8e5e0424cf684c995b1c80cee29 | https://github.com/jonesiscoding/device/blob/d3c66f934bcaa8e5e0424cf684c995b1c80cee29/src/DeviceFeatureInfo.php#L49-L62 |
25,373 | jonesiscoding/device | src/DeviceFeatureInfo.php | DeviceFeatureInfo.detect | private function detect()
{
$detect = array();
$defaults = $this->getDefaults();
if( $this->isDetected() )
{
$detect = json_decode( $_COOKIE[ $this->cookieName ], true );
if( !is_null( $detect ) )
{
// Convert Boolean values from strings
foreach( $detect as $k => $... | php | private function detect()
{
$detect = array();
$defaults = $this->getDefaults();
if( $this->isDetected() )
{
$detect = json_decode( $_COOKIE[ $this->cookieName ], true );
if( !is_null( $detect ) )
{
// Convert Boolean values from strings
foreach( $detect as $k => $... | [
"private",
"function",
"detect",
"(",
")",
"{",
"$",
"detect",
"=",
"array",
"(",
")",
";",
"$",
"defaults",
"=",
"$",
"this",
"->",
"getDefaults",
"(",
")",
";",
"if",
"(",
"$",
"this",
"->",
"isDetected",
"(",
")",
")",
"{",
"$",
"detect",
"=",... | Parses the cookie left by d.js. If the cookie is not set due to Javascript being disabled, or cookies being
being blocked, DetectByUserAgent is used to determine the values by the user agent.
Using the user agent can be quite flawed. As we are limiting it to feature detection, it makes a good backup here.
@return ar... | [
"Parses",
"the",
"cookie",
"left",
"by",
"d",
".",
"js",
".",
"If",
"the",
"cookie",
"is",
"not",
"set",
"due",
"to",
"Javascript",
"being",
"disabled",
"or",
"cookies",
"being",
"being",
"blocked",
"DetectByUserAgent",
"is",
"used",
"to",
"determine",
"th... | d3c66f934bcaa8e5e0424cf684c995b1c80cee29 | https://github.com/jonesiscoding/device/blob/d3c66f934bcaa8e5e0424cf684c995b1c80cee29/src/DeviceFeatureInfo.php#L221-L253 |
25,374 | cubicmushroom/valueobjects | src/DateTime/Date.php | Date.fromNative | public static function fromNative()
{
$args = func_get_args();
$year = new Year($args[0]);
$month = Month::fromNative($args[1]);
$day = new MonthDay($args[2]);
return new static($year, $month, $day);
} | php | public static function fromNative()
{
$args = func_get_args();
$year = new Year($args[0]);
$month = Month::fromNative($args[1]);
$day = new MonthDay($args[2]);
return new static($year, $month, $day);
} | [
"public",
"static",
"function",
"fromNative",
"(",
")",
"{",
"$",
"args",
"=",
"func_get_args",
"(",
")",
";",
"$",
"year",
"=",
"new",
"Year",
"(",
"$",
"args",
"[",
"0",
"]",
")",
";",
"$",
"month",
"=",
"Month",
"::",
"fromNative",
"(",
"$",
"... | Returns a new Date from native year, month and day values
@param int $year
@param string $month
@param int $day
@return Date | [
"Returns",
"a",
"new",
"Date",
"from",
"native",
"year",
"month",
"and",
"day",
"values"
] | 4554239ab75d65eeb9773219aa5b07e9fbfabb92 | https://github.com/cubicmushroom/valueobjects/blob/4554239ab75d65eeb9773219aa5b07e9fbfabb92/src/DateTime/Date.php#L28-L37 |
25,375 | cubicmushroom/valueobjects | src/DateTime/Date.php | Date.fromNativeDateTime | public static function fromNativeDateTime(\DateTime $date)
{
$year = \intval($date->format('Y'));
$month = Month::fromNativeDateTime($date);
$day = \intval($date->format('d'));
return new static(new Year($year), $month, new MonthDay($day));
} | php | public static function fromNativeDateTime(\DateTime $date)
{
$year = \intval($date->format('Y'));
$month = Month::fromNativeDateTime($date);
$day = \intval($date->format('d'));
return new static(new Year($year), $month, new MonthDay($day));
} | [
"public",
"static",
"function",
"fromNativeDateTime",
"(",
"\\",
"DateTime",
"$",
"date",
")",
"{",
"$",
"year",
"=",
"\\",
"intval",
"(",
"$",
"date",
"->",
"format",
"(",
"'Y'",
")",
")",
";",
"$",
"month",
"=",
"Month",
"::",
"fromNativeDateTime",
"... | Returns a new Date from a native PHP \DateTime
@param \DateTime $date
@return Date | [
"Returns",
"a",
"new",
"Date",
"from",
"a",
"native",
"PHP",
"\\",
"DateTime"
] | 4554239ab75d65eeb9773219aa5b07e9fbfabb92 | https://github.com/cubicmushroom/valueobjects/blob/4554239ab75d65eeb9773219aa5b07e9fbfabb92/src/DateTime/Date.php#L45-L52 |
25,376 | cubicmushroom/valueobjects | src/DateTime/Date.php | Date.sameValueAs | public function sameValueAs(ValueObjectInterface $date)
{
if (false === Util::classEquals($this, $date)) {
return false;
}
return $this->getYear()->sameValueAs($date->getYear()) &&
$this->getMonth()->sameValueAs($date->getMonth()) &&
$this->getDay()... | php | public function sameValueAs(ValueObjectInterface $date)
{
if (false === Util::classEquals($this, $date)) {
return false;
}
return $this->getYear()->sameValueAs($date->getYear()) &&
$this->getMonth()->sameValueAs($date->getMonth()) &&
$this->getDay()... | [
"public",
"function",
"sameValueAs",
"(",
"ValueObjectInterface",
"$",
"date",
")",
"{",
"if",
"(",
"false",
"===",
"Util",
"::",
"classEquals",
"(",
"$",
"this",
",",
"$",
"date",
")",
")",
"{",
"return",
"false",
";",
"}",
"return",
"$",
"this",
"->"... | Tells whether two Date are equal by comparing their values
@param ValueObjectInterface $date
@return bool | [
"Tells",
"whether",
"two",
"Date",
"are",
"equal",
"by",
"comparing",
"their",
"values"
] | 4554239ab75d65eeb9773219aa5b07e9fbfabb92 | https://github.com/cubicmushroom/valueobjects/blob/4554239ab75d65eeb9773219aa5b07e9fbfabb92/src/DateTime/Date.php#L94-L103 |
25,377 | cubicmushroom/valueobjects | src/DateTime/Date.php | Date.toNativeDateTime | public function toNativeDateTime()
{
$year = $this->getYear()->toNative();
$month = $this->getMonth()->getNumericValue();
$day = $this->getDay()->toNative();
$date = new \DateTime();
$date->setDate($year, $month, $day);
$date->setTime(0, 0, 0);
return $da... | php | public function toNativeDateTime()
{
$year = $this->getYear()->toNative();
$month = $this->getMonth()->getNumericValue();
$day = $this->getDay()->toNative();
$date = new \DateTime();
$date->setDate($year, $month, $day);
$date->setTime(0, 0, 0);
return $da... | [
"public",
"function",
"toNativeDateTime",
"(",
")",
"{",
"$",
"year",
"=",
"$",
"this",
"->",
"getYear",
"(",
")",
"->",
"toNative",
"(",
")",
";",
"$",
"month",
"=",
"$",
"this",
"->",
"getMonth",
"(",
")",
"->",
"getNumericValue",
"(",
")",
";",
... | Returns a native PHP \DateTime version of the current Date
@return \DateTime | [
"Returns",
"a",
"native",
"PHP",
"\\",
"DateTime",
"version",
"of",
"the",
"current",
"Date"
] | 4554239ab75d65eeb9773219aa5b07e9fbfabb92 | https://github.com/cubicmushroom/valueobjects/blob/4554239ab75d65eeb9773219aa5b07e9fbfabb92/src/DateTime/Date.php#L140-L151 |
25,378 | bseddon/XPath20 | DOM/DOMXPathNavigator.php | DOMXPathNavigator.ComparePosition | public function ComparePosition( $other, $useLineNo = false)
{
$thisDomNode = $this->getUnderlyingObject();
$otherDomNode = $other->getUnderlyingObject();
$doc1 = $thisDomNode->baseURI;
$doc2 = $otherDomNode->baseURI;
if ( strcasecmp( $doc1, $doc2 ) != 0 )
// if ( spl_object_hash( $this->domNode->... | php | public function ComparePosition( $other, $useLineNo = false)
{
$thisDomNode = $this->getUnderlyingObject();
$otherDomNode = $other->getUnderlyingObject();
$doc1 = $thisDomNode->baseURI;
$doc2 = $otherDomNode->baseURI;
if ( strcasecmp( $doc1, $doc2 ) != 0 )
// if ( spl_object_hash( $this->domNode->... | [
"public",
"function",
"ComparePosition",
"(",
"$",
"other",
",",
"$",
"useLineNo",
"=",
"false",
")",
"{",
"$",
"thisDomNode",
"=",
"$",
"this",
"->",
"getUnderlyingObject",
"(",
")",
";",
"$",
"otherDomNode",
"=",
"$",
"other",
"->",
"getUnderlyingObject",
... | Compares the position of the current XPathNavigator with the
position of the XPathNavigator specified.
@param XPathNavigator $other : The XPathNavigator to compare against.
@param bool $useLineNo (Default: false)
@return XmlNodeOrder An XmlNodeOrder value representing the comparative position of the two XPathNavigator... | [
"Compares",
"the",
"position",
"of",
"the",
"current",
"XPathNavigator",
"with",
"the",
"position",
"of",
"the",
"XPathNavigator",
"specified",
"."
] | 69882b6efffaa5470a819d5fdd2f6473ddeb046d | https://github.com/bseddon/XPath20/blob/69882b6efffaa5470a819d5fdd2f6473ddeb046d/DOM/DOMXPathNavigator.php#L155-L217 |
25,379 | bseddon/XPath20 | DOM/DOMXPathNavigator.php | DOMXPathNavigator.getLineNo | public function getLineNo()
{
if ( ! isset( $this->domNode ) || $this->domNode instanceof \DOMDocument )
{
return 0;
}
return $this->domNode->getLineNo();
} | php | public function getLineNo()
{
if ( ! isset( $this->domNode ) || $this->domNode instanceof \DOMDocument )
{
return 0;
}
return $this->domNode->getLineNo();
} | [
"public",
"function",
"getLineNo",
"(",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"domNode",
")",
"||",
"$",
"this",
"->",
"domNode",
"instanceof",
"\\",
"DOMDocument",
")",
"{",
"return",
"0",
";",
"}",
"return",
"$",
"this",
"->",
... | return the line number in the underlying XML document of the current node | [
"return",
"the",
"line",
"number",
"in",
"the",
"underlying",
"XML",
"document",
"of",
"the",
"current",
"node"
] | 69882b6efffaa5470a819d5fdd2f6473ddeb046d | https://github.com/bseddon/XPath20/blob/69882b6efffaa5470a819d5fdd2f6473ddeb046d/DOM/DOMXPathNavigator.php#L222-L230 |
25,380 | bseddon/XPath20 | DOM/DOMXPathNavigator.php | DOMXPathNavigator.GetAttribute | public function GetAttribute( $localName, $namespaceURI )
{
if ( $this->domNode->nodeType != XML_ELEMENT_NODE )
{
return "";
}
foreach ( $this->domNode->attributes as /** @var \DOMAttr $attribute */ $attribute )
{
if ( $attribute->namespaceURI != $namespaceURI || $attribute->localName != $loc... | php | public function GetAttribute( $localName, $namespaceURI )
{
if ( $this->domNode->nodeType != XML_ELEMENT_NODE )
{
return "";
}
foreach ( $this->domNode->attributes as /** @var \DOMAttr $attribute */ $attribute )
{
if ( $attribute->namespaceURI != $namespaceURI || $attribute->localName != $loc... | [
"public",
"function",
"GetAttribute",
"(",
"$",
"localName",
",",
"$",
"namespaceURI",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"domNode",
"->",
"nodeType",
"!=",
"XML_ELEMENT_NODE",
")",
"{",
"return",
"\"\"",
";",
"}",
"foreach",
"(",
"$",
"this",
"->",... | Gets the value of the attribute with the specified local name and namespace URI.
@param string $localName : The local name of the attribute.
@param string $namespaceURI : The namespace URI of the attribute.
@return string A string that contains the value of the specified attribute; Empty
if a matching attribute is no... | [
"Gets",
"the",
"value",
"of",
"the",
"attribute",
"with",
"the",
"specified",
"local",
"name",
"and",
"namespace",
"URI",
"."
] | 69882b6efffaa5470a819d5fdd2f6473ddeb046d | https://github.com/bseddon/XPath20/blob/69882b6efffaa5470a819d5fdd2f6473ddeb046d/DOM/DOMXPathNavigator.php#L253-L271 |
25,381 | bseddon/XPath20 | DOM/DOMXPathNavigator.php | DOMXPathNavigator.getHasChildren | public function getHasChildren( $type = null )
{
if ( is_null( $this->domNode ) ) return false;
$hasAnyChildren = $this->domNode->hasChildNodes();
if ( ! $hasAnyChildren || is_null( $type ) ) return $hasAnyChildren;
$clone = $this->CloneInstance();
return $clone->MoveToChild( $type );
} | php | public function getHasChildren( $type = null )
{
if ( is_null( $this->domNode ) ) return false;
$hasAnyChildren = $this->domNode->hasChildNodes();
if ( ! $hasAnyChildren || is_null( $type ) ) return $hasAnyChildren;
$clone = $this->CloneInstance();
return $clone->MoveToChild( $type );
} | [
"public",
"function",
"getHasChildren",
"(",
"$",
"type",
"=",
"null",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"this",
"->",
"domNode",
")",
")",
"return",
"false",
";",
"$",
"hasAnyChildren",
"=",
"$",
"this",
"->",
"domNode",
"->",
"hasChildNodes",
... | Not used but implement
Gets a value indicating whether the current node has any child nodes.
@param XPathNodeType $type
@return bool $HasChildren true if the current node has any child nodes; otherwise, false. | [
"Not",
"used",
"but",
"implement",
"Gets",
"a",
"value",
"indicating",
"whether",
"the",
"current",
"node",
"has",
"any",
"child",
"nodes",
"."
] | 69882b6efffaa5470a819d5fdd2f6473ddeb046d | https://github.com/bseddon/XPath20/blob/69882b6efffaa5470a819d5fdd2f6473ddeb046d/DOM/DOMXPathNavigator.php#L305-L313 |
25,382 | bseddon/XPath20 | DOM/DOMXPathNavigator.php | DOMXPathNavigator.getInnerXml | public function getInnerXml()
{
if ( is_null( $this->domNode ) ) return null;
$owner = $this->domNode instanceof \DOMDocument ? $this->domNode : $this->domNode->ownerDocument;
$xml = $owner->saveXml( $this->domNode, LIBXML_NOEMPTYTAG );
$xml = ltrim( preg_replace( "/^<\?xml.*\?>/", "", $xml ) );
$xml =... | php | public function getInnerXml()
{
if ( is_null( $this->domNode ) ) return null;
$owner = $this->domNode instanceof \DOMDocument ? $this->domNode : $this->domNode->ownerDocument;
$xml = $owner->saveXml( $this->domNode, LIBXML_NOEMPTYTAG );
$xml = ltrim( preg_replace( "/^<\?xml.*\?>/", "", $xml ) );
$xml =... | [
"public",
"function",
"getInnerXml",
"(",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"this",
"->",
"domNode",
")",
")",
"return",
"null",
";",
"$",
"owner",
"=",
"$",
"this",
"->",
"domNode",
"instanceof",
"\\",
"DOMDocument",
"?",
"$",
"this",
"->",
... | Not used but implement
Gets or sets the markup representing the child nodes of the current node.
@return string A string that contains the markup of the child nodes of the current node. | [
"Not",
"used",
"but",
"implement",
"Gets",
"or",
"sets",
"the",
"markup",
"representing",
"the",
"child",
"nodes",
"of",
"the",
"current",
"node",
"."
] | 69882b6efffaa5470a819d5fdd2f6473ddeb046d | https://github.com/bseddon/XPath20/blob/69882b6efffaa5470a819d5fdd2f6473ddeb046d/DOM/DOMXPathNavigator.php#L321-L329 |
25,383 | bseddon/XPath20 | DOM/DOMXPathNavigator.php | DOMXPathNavigator.getLocalName | public function getLocalName()
{
if ( is_null( $this->domNode ) ) return null;
if ( $this->domNode instanceof \DOMNameSpaceNode )
{
return $this->domNode->localName;
}
else
{
return $this->domNode->nodeType == XPathNodeType::ProcessingInstruction
? "{$this->domNode->nodeName}"
: "{... | php | public function getLocalName()
{
if ( is_null( $this->domNode ) ) return null;
if ( $this->domNode instanceof \DOMNameSpaceNode )
{
return $this->domNode->localName;
}
else
{
return $this->domNode->nodeType == XPathNodeType::ProcessingInstruction
? "{$this->domNode->nodeName}"
: "{... | [
"public",
"function",
"getLocalName",
"(",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"this",
"->",
"domNode",
")",
")",
"return",
"null",
";",
"if",
"(",
"$",
"this",
"->",
"domNode",
"instanceof",
"\\",
"DOMNameSpaceNode",
")",
"{",
"return",
"$",
"th... | When overridden in a derived class, gets the XPathNavigator.Name
of the current node without any namespace prefix.
@return string A string that contains the local name of the current node, or Empty
if the current node does not have a name (for example, text or comment nodes). | [
"When",
"overridden",
"in",
"a",
"derived",
"class",
"gets",
"the",
"XPathNavigator",
".",
"Name",
"of",
"the",
"current",
"node",
"without",
"any",
"namespace",
"prefix",
"."
] | 69882b6efffaa5470a819d5fdd2f6473ddeb046d | https://github.com/bseddon/XPath20/blob/69882b6efffaa5470a819d5fdd2f6473ddeb046d/DOM/DOMXPathNavigator.php#L350-L363 |
25,384 | bseddon/XPath20 | DOM/DOMXPathNavigator.php | DOMXPathNavigator.getName | public function getName()
{
if ( is_null( $this->domNode ) ) return null;
if ( $this->domNode instanceof \DOMNameSpaceNode )
{
return $this->domNode->prefix;
}
else
{
return empty( $this->domNode->prefix )
? "{$this->domNode->localName}"
: "{$this->domNode->prefix}:{$this->domNod... | php | public function getName()
{
if ( is_null( $this->domNode ) ) return null;
if ( $this->domNode instanceof \DOMNameSpaceNode )
{
return $this->domNode->prefix;
}
else
{
return empty( $this->domNode->prefix )
? "{$this->domNode->localName}"
: "{$this->domNode->prefix}:{$this->domNod... | [
"public",
"function",
"getName",
"(",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"this",
"->",
"domNode",
")",
")",
"return",
"null",
";",
"if",
"(",
"$",
"this",
"->",
"domNode",
"instanceof",
"\\",
"DOMNameSpaceNode",
")",
"{",
"return",
"$",
"this",
... | When overridden in a derived class, gets the qualified name of the current node.
@return string A string that contains the qualified XPathNavigator.Name of the
current node, or Empty if the current node does not have a name
(for example, text or comment nodes). | [
"When",
"overridden",
"in",
"a",
"derived",
"class",
"gets",
"the",
"qualified",
"name",
"of",
"the",
"current",
"node",
"."
] | 69882b6efffaa5470a819d5fdd2f6473ddeb046d | https://github.com/bseddon/XPath20/blob/69882b6efffaa5470a819d5fdd2f6473ddeb046d/DOM/DOMXPathNavigator.php#L372-L386 |
25,385 | bseddon/XPath20 | DOM/DOMXPathNavigator.php | DOMXPathNavigator.getNamespaceURI | public function getNamespaceURI()
{
if ( is_null( $this->domNode ) ) return null;
return is_null( $this->domNode->namespaceURI ) ? "" : $this->domNode->namespaceURI;
} | php | public function getNamespaceURI()
{
if ( is_null( $this->domNode ) ) return null;
return is_null( $this->domNode->namespaceURI ) ? "" : $this->domNode->namespaceURI;
} | [
"public",
"function",
"getNamespaceURI",
"(",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"this",
"->",
"domNode",
")",
")",
"return",
"null",
";",
"return",
"is_null",
"(",
"$",
"this",
"->",
"domNode",
"->",
"namespaceURI",
")",
"?",
"\"\"",
":",
"$",
... | When overridden in a derived class, gets the namespace URI of the current node.
@return string A string that contains the namespace URI of the current node,
or Empty if the current node has no namespace URI. | [
"When",
"overridden",
"in",
"a",
"derived",
"class",
"gets",
"the",
"namespace",
"URI",
"of",
"the",
"current",
"node",
"."
] | 69882b6efffaa5470a819d5fdd2f6473ddeb046d | https://github.com/bseddon/XPath20/blob/69882b6efffaa5470a819d5fdd2f6473ddeb046d/DOM/DOMXPathNavigator.php#L394-L398 |
25,386 | bseddon/XPath20 | DOM/DOMXPathNavigator.php | DOMXPathNavigator.getNodeType | public function getNodeType()
{
if ( is_null( $this->domNode ) ) return null;
return isset( DOMXPathNavigator::$nodeTypeMap[ $this->domNode->nodeType ] )
? DOMXPathNavigator::$nodeTypeMap[ $this->domNode->nodeType ]
: XPathNodeType::Element;
} | php | public function getNodeType()
{
if ( is_null( $this->domNode ) ) return null;
return isset( DOMXPathNavigator::$nodeTypeMap[ $this->domNode->nodeType ] )
? DOMXPathNavigator::$nodeTypeMap[ $this->domNode->nodeType ]
: XPathNodeType::Element;
} | [
"public",
"function",
"getNodeType",
"(",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"this",
"->",
"domNode",
")",
")",
"return",
"null",
";",
"return",
"isset",
"(",
"DOMXPathNavigator",
"::",
"$",
"nodeTypeMap",
"[",
"$",
"this",
"->",
"domNode",
"->",
... | When overridden in a derived class, gets the XPathNodeType of the current node.
@return XPathNodeType One of the XPathNodeType values representing the current node. | [
"When",
"overridden",
"in",
"a",
"derived",
"class",
"gets",
"the",
"XPathNodeType",
"of",
"the",
"current",
"node",
"."
] | 69882b6efffaa5470a819d5fdd2f6473ddeb046d | https://github.com/bseddon/XPath20/blob/69882b6efffaa5470a819d5fdd2f6473ddeb046d/DOM/DOMXPathNavigator.php#L416-L422 |
25,387 | bseddon/XPath20 | DOM/DOMXPathNavigator.php | DOMXPathNavigator.getOuterXml | public function getOuterXml()
{
if ( is_null( $this->domNode ) ) return "";
return is_null( $this->domNode->parentNode )
? $this->domNode->ownerDocument->saveXml( $this->domNode )
: $this->domNode->ownerDocument->saveXml( $this->domNode->parentNode );
} | php | public function getOuterXml()
{
if ( is_null( $this->domNode ) ) return "";
return is_null( $this->domNode->parentNode )
? $this->domNode->ownerDocument->saveXml( $this->domNode )
: $this->domNode->ownerDocument->saveXml( $this->domNode->parentNode );
} | [
"public",
"function",
"getOuterXml",
"(",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"this",
"->",
"domNode",
")",
")",
"return",
"\"\"",
";",
"return",
"is_null",
"(",
"$",
"this",
"->",
"domNode",
"->",
"parentNode",
")",
"?",
"$",
"this",
"->",
"do... | Gets or sets the markup representing the opening and closing tags of the current node and its child nodes.
@return string A string that contains the markup representing the opening and closing
tags of the current node and its child nodes. | [
"Gets",
"or",
"sets",
"the",
"markup",
"representing",
"the",
"opening",
"and",
"closing",
"tags",
"of",
"the",
"current",
"node",
"and",
"its",
"child",
"nodes",
"."
] | 69882b6efffaa5470a819d5fdd2f6473ddeb046d | https://github.com/bseddon/XPath20/blob/69882b6efffaa5470a819d5fdd2f6473ddeb046d/DOM/DOMXPathNavigator.php#L430-L436 |
25,388 | bseddon/XPath20 | DOM/DOMXPathNavigator.php | DOMXPathNavigator.getSchemaInfo | public function getSchemaInfo()
{
if ( is_null( $this->domNode ) ) return null;
switch( $this->domNode->nodeType )
{
case XML_ATTRIBUTE_NODE:
case XML_ELEMENT_NODE:
return new DOMName( $this->domNode );
case XML_TEXT_NODE:
return new DOMName( $this->domNode->parentNode );
defa... | php | public function getSchemaInfo()
{
if ( is_null( $this->domNode ) ) return null;
switch( $this->domNode->nodeType )
{
case XML_ATTRIBUTE_NODE:
case XML_ELEMENT_NODE:
return new DOMName( $this->domNode );
case XML_TEXT_NODE:
return new DOMName( $this->domNode->parentNode );
defa... | [
"public",
"function",
"getSchemaInfo",
"(",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"this",
"->",
"domNode",
")",
")",
"return",
"null",
";",
"switch",
"(",
"$",
"this",
"->",
"domNode",
"->",
"nodeType",
")",
"{",
"case",
"XML_ATTRIBUTE_NODE",
":",
... | Gets the schema information that has been assigned to the current node as a result of schema validation.
@return IXmlSchemaInfo An IXmlSchemaInfo object that contains the schema information
for the current node. | [
"Gets",
"the",
"schema",
"information",
"that",
"has",
"been",
"assigned",
"to",
"the",
"current",
"node",
"as",
"a",
"result",
"of",
"schema",
"validation",
"."
] | 69882b6efffaa5470a819d5fdd2f6473ddeb046d | https://github.com/bseddon/XPath20/blob/69882b6efffaa5470a819d5fdd2f6473ddeb046d/DOM/DOMXPathNavigator.php#L455-L471 |
25,389 | bseddon/XPath20 | DOM/DOMXPathNavigator.php | DOMXPathNavigator.CloneInstance | public function CloneInstance()
{
// Clone in this sense means be able to have a different current position so creating a new
// DOMXPathNavigator instance should be sufficient. There is no need to clone the current node.
return is_null( $this->domNode )
? $this
: new DOMXPathNavigator( $this->domNod... | php | public function CloneInstance()
{
// Clone in this sense means be able to have a different current position so creating a new
// DOMXPathNavigator instance should be sufficient. There is no need to clone the current node.
return is_null( $this->domNode )
? $this
: new DOMXPathNavigator( $this->domNod... | [
"public",
"function",
"CloneInstance",
"(",
")",
"{",
"// Clone in this sense means be able to have a different current position so creating a new\r",
"// DOMXPathNavigator instance should be sufficient. There is no need to clone the current node.\r",
"return",
"is_null",
"(",
"$",
"this",
... | When overridden in a derived class, creates a new XPathNavigator
positioned at the same node as this XPathNavigator.
@return XPathNavigator A new XPathNavigator positioned at the same node as this XPathNavigator. | [
"When",
"overridden",
"in",
"a",
"derived",
"class",
"creates",
"a",
"new",
"XPathNavigator",
"positioned",
"at",
"the",
"same",
"node",
"as",
"this",
"XPathNavigator",
"."
] | 69882b6efffaa5470a819d5fdd2f6473ddeb046d | https://github.com/bseddon/XPath20/blob/69882b6efffaa5470a819d5fdd2f6473ddeb046d/DOM/DOMXPathNavigator.php#L585-L592 |
25,390 | bseddon/XPath20 | DOM/DOMXPathNavigator.php | DOMXPathNavigator.IsSamePosition | public function IsSamePosition( $other )
{
if ( is_null( $this->domNode ) || is_null( $other ) ) return false;
return $this->domNode->isSameNode( $other->getUnderlyingObject() );
} | php | public function IsSamePosition( $other )
{
if ( is_null( $this->domNode ) || is_null( $other ) ) return false;
return $this->domNode->isSameNode( $other->getUnderlyingObject() );
} | [
"public",
"function",
"IsSamePosition",
"(",
"$",
"other",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"this",
"->",
"domNode",
")",
"||",
"is_null",
"(",
"$",
"other",
")",
")",
"return",
"false",
";",
"return",
"$",
"this",
"->",
"domNode",
"->",
"is... | When overridden in a derived class, determines whether the current XPathNavigator
is at the same position as the specified XPathNavigator.
@param XPathNavigator $other : The XPathNavigator to compare to this XPathNavigator.
@return bool true if the two XPathNavigator objects have the same position; otherwise, false. | [
"When",
"overridden",
"in",
"a",
"derived",
"class",
"determines",
"whether",
"the",
"current",
"XPathNavigator",
"is",
"at",
"the",
"same",
"position",
"as",
"the",
"specified",
"XPathNavigator",
"."
] | 69882b6efffaa5470a819d5fdd2f6473ddeb046d | https://github.com/bseddon/XPath20/blob/69882b6efffaa5470a819d5fdd2f6473ddeb046d/DOM/DOMXPathNavigator.php#L602-L606 |
25,391 | bseddon/XPath20 | DOM/DOMXPathNavigator.php | DOMXPathNavigator.MoveTo | public function MoveTo( $other )
{
if ( is_null( $this->domNode ) || is_null( $other ) ) return false;
// Replace the domNode with a clone of the one from $other
$this->domNode = $other->getUnderlyingObject(); // ->cloneNode();
return true;
} | php | public function MoveTo( $other )
{
if ( is_null( $this->domNode ) || is_null( $other ) ) return false;
// Replace the domNode with a clone of the one from $other
$this->domNode = $other->getUnderlyingObject(); // ->cloneNode();
return true;
} | [
"public",
"function",
"MoveTo",
"(",
"$",
"other",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"this",
"->",
"domNode",
")",
"||",
"is_null",
"(",
"$",
"other",
")",
")",
"return",
"false",
";",
"// Replace the domNode with a clone of the one from $other\r",
"$"... | When overridden in a derived class, moves the XPathNavigator
to the same position as the specified XPathNavigator.
@param XPathNavigator $other : The XPathNavigator positioned on the node that you want to move to.
@return bool true if the XPathNavigator is successful moving to the same position as the specified
XPath... | [
"When",
"overridden",
"in",
"a",
"derived",
"class",
"moves",
"the",
"XPathNavigator",
"to",
"the",
"same",
"position",
"as",
"the",
"specified",
"XPathNavigator",
"."
] | 69882b6efffaa5470a819d5fdd2f6473ddeb046d | https://github.com/bseddon/XPath20/blob/69882b6efffaa5470a819d5fdd2f6473ddeb046d/DOM/DOMXPathNavigator.php#L630-L637 |
25,392 | bseddon/XPath20 | DOM/DOMXPathNavigator.php | DOMXPathNavigator.MoveToChild | public function MoveToChild( $kind )
{
if ( is_null( $this->domNode ) ||
is_null( $kind ) ||
! property_exists( $this->domNode, 'firstChild') // ||
// ! $this->domNode->hasChildNodes()
) return false;
// Create a list of the valid DOM node types based on the $kind value
$domNodeTypes =... | php | public function MoveToChild( $kind )
{
if ( is_null( $this->domNode ) ||
is_null( $kind ) ||
! property_exists( $this->domNode, 'firstChild') // ||
// ! $this->domNode->hasChildNodes()
) return false;
// Create a list of the valid DOM node types based on the $kind value
$domNodeTypes =... | [
"public",
"function",
"MoveToChild",
"(",
"$",
"kind",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"this",
"->",
"domNode",
")",
"||",
"is_null",
"(",
"$",
"kind",
")",
"||",
"!",
"property_exists",
"(",
"$",
"this",
"->",
"domNode",
",",
"'firstChild'",... | Moves the XPathNavigator to the child node of the XPathNodeType specified.
@param XPathNodeType $kind The XPathNodeType of the child node to move to.
@return bool Returns true if the XPathNavigator is successful moving to the child node; otherwise, false.
If false, the position of the XPathNavigator is unchanged. | [
"Moves",
"the",
"XPathNavigator",
"to",
"the",
"child",
"node",
"of",
"the",
"XPathNodeType",
"specified",
"."
] | 69882b6efffaa5470a819d5fdd2f6473ddeb046d | https://github.com/bseddon/XPath20/blob/69882b6efffaa5470a819d5fdd2f6473ddeb046d/DOM/DOMXPathNavigator.php#L646-L680 |
25,393 | bseddon/XPath20 | DOM/DOMXPathNavigator.php | DOMXPathNavigator.MoveToFirstAttribute | public function MoveToFirstAttribute()
{
// If the current node is already an attribute or there are no attributes return false
if ( is_null( $this->domNode ) || $this->domNode instanceof \DOMAttr || ! $this->domNode->hasAttributes() ) return false;
$this->domNode = $this->domNode->attributes->item(0);
... | php | public function MoveToFirstAttribute()
{
// If the current node is already an attribute or there are no attributes return false
if ( is_null( $this->domNode ) || $this->domNode instanceof \DOMAttr || ! $this->domNode->hasAttributes() ) return false;
$this->domNode = $this->domNode->attributes->item(0);
... | [
"public",
"function",
"MoveToFirstAttribute",
"(",
")",
"{",
"// If the current node is already an attribute or there are no attributes return false\r",
"if",
"(",
"is_null",
"(",
"$",
"this",
"->",
"domNode",
")",
"||",
"$",
"this",
"->",
"domNode",
"instanceof",
"\\",
... | When overridden in a derived class, moves the XPathNavigator to the first attribute of the current node.
@return bool Returns true if the XPathNavigator is successful moving to the first attribute of the current node;
otherwise, false. If false, the position of the XPathNavigator is unchanged. | [
"When",
"overridden",
"in",
"a",
"derived",
"class",
"moves",
"the",
"XPathNavigator",
"to",
"the",
"first",
"attribute",
"of",
"the",
"current",
"node",
"."
] | 69882b6efffaa5470a819d5fdd2f6473ddeb046d | https://github.com/bseddon/XPath20/blob/69882b6efffaa5470a819d5fdd2f6473ddeb046d/DOM/DOMXPathNavigator.php#L688-L695 |
25,394 | bseddon/XPath20 | DOM/DOMXPathNavigator.php | DOMXPathNavigator.MoveToAttribute | public function MoveToAttribute( $localName, $namespaceURI )
{
if ( ! $this->MoveToFirstAttribute() )
{
return false;
}
do
{
if ( $this->getLocalName() == $localName && ( ( is_null( $namespaceURI ) && empty( $this->getNamespaceURI() ) ) || $this->getNamespaceURI() == $namespaceURI ) )
{
... | php | public function MoveToAttribute( $localName, $namespaceURI )
{
if ( ! $this->MoveToFirstAttribute() )
{
return false;
}
do
{
if ( $this->getLocalName() == $localName && ( ( is_null( $namespaceURI ) && empty( $this->getNamespaceURI() ) ) || $this->getNamespaceURI() == $namespaceURI ) )
{
... | [
"public",
"function",
"MoveToAttribute",
"(",
"$",
"localName",
",",
"$",
"namespaceURI",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"MoveToFirstAttribute",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"do",
"{",
"if",
"(",
"$",
"this",
"->",
"... | Moves the XPathNavigator to the attribute with the matching local name and namespace URI.
@param string $localName : The local name of the attribute.
@param string $namespaceURI : The namespace URI of the attribute; null for an empty namespace.
@return bool Returns true if the XPathNavigator is successful moving to t... | [
"Moves",
"the",
"XPathNavigator",
"to",
"the",
"attribute",
"with",
"the",
"matching",
"local",
"name",
"and",
"namespace",
"URI",
"."
] | 69882b6efffaa5470a819d5fdd2f6473ddeb046d | https://github.com/bseddon/XPath20/blob/69882b6efffaa5470a819d5fdd2f6473ddeb046d/DOM/DOMXPathNavigator.php#L706-L725 |
25,395 | bseddon/XPath20 | DOM/DOMXPathNavigator.php | DOMXPathNavigator.MoveToFirstChild | public function MoveToFirstChild()
{
if (
is_null( $this->domNode ) ||
( ! $this->domNode instanceof \DOMDocument && ! $this->domNode instanceof \DOMElement ) ||
! $this->domNode->hasChildNodes()
) return false;
// if ( $this->domNode instanceof \DOMDocument )
// {
// $this->domNode = $t... | php | public function MoveToFirstChild()
{
if (
is_null( $this->domNode ) ||
( ! $this->domNode instanceof \DOMDocument && ! $this->domNode instanceof \DOMElement ) ||
! $this->domNode->hasChildNodes()
) return false;
// if ( $this->domNode instanceof \DOMDocument )
// {
// $this->domNode = $t... | [
"public",
"function",
"MoveToFirstChild",
"(",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"this",
"->",
"domNode",
")",
"||",
"(",
"!",
"$",
"this",
"->",
"domNode",
"instanceof",
"\\",
"DOMDocument",
"&&",
"!",
"$",
"this",
"->",
"domNode",
"instanceof",... | When overridden in a derived class, moves the XPathNavigator to the first child node of the current node.
@return bool Returns true if the XPathNavigator is successful moving to the first child node of the current node;
otherwise, false. If false, the position of the XPathNavigator is unchanged. | [
"When",
"overridden",
"in",
"a",
"derived",
"class",
"moves",
"the",
"XPathNavigator",
"to",
"the",
"first",
"child",
"node",
"of",
"the",
"current",
"node",
"."
] | 69882b6efffaa5470a819d5fdd2f6473ddeb046d | https://github.com/bseddon/XPath20/blob/69882b6efffaa5470a819d5fdd2f6473ddeb046d/DOM/DOMXPathNavigator.php#L733-L749 |
25,396 | bseddon/XPath20 | DOM/DOMXPathNavigator.php | DOMXPathNavigator.MoveToFirstNamespace | public function MoveToFirstNamespace( $namespaceScope = XPathNamespaceScope::Local )
{
if ( is_null( $this->domNode ) ) return false;
if ( $this->domNode->nodeType != XML_ELEMENT_NODE && $this->domNode->nodeType != XML_DOCUMENT_NODE ) return false;
$expression = $namespaceScope == XPathNamespaceScope::Loca... | php | public function MoveToFirstNamespace( $namespaceScope = XPathNamespaceScope::Local )
{
if ( is_null( $this->domNode ) ) return false;
if ( $this->domNode->nodeType != XML_ELEMENT_NODE && $this->domNode->nodeType != XML_DOCUMENT_NODE ) return false;
$expression = $namespaceScope == XPathNamespaceScope::Loca... | [
"public",
"function",
"MoveToFirstNamespace",
"(",
"$",
"namespaceScope",
"=",
"XPathNamespaceScope",
"::",
"Local",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"this",
"->",
"domNode",
")",
")",
"return",
"false",
";",
"if",
"(",
"$",
"this",
"->",
"domNode... | When overridden in a derived class, moves the XPathNavigator to the first namespace node that matches the
XPathNamespaceScope specified.
@param XPathNamespaceScope namespaceScope : An XPathNamespaceScope value describing the namespace scope.
@return bool Returns true if the XPathNavigator is successful moving to the ... | [
"When",
"overridden",
"in",
"a",
"derived",
"class",
"moves",
"the",
"XPathNavigator",
"to",
"the",
"first",
"namespace",
"node",
"that",
"matches",
"the",
"XPathNamespaceScope",
"specified",
"."
] | 69882b6efffaa5470a819d5fdd2f6473ddeb046d | https://github.com/bseddon/XPath20/blob/69882b6efffaa5470a819d5fdd2f6473ddeb046d/DOM/DOMXPathNavigator.php#L760-L776 |
25,397 | bseddon/XPath20 | DOM/DOMXPathNavigator.php | DOMXPathNavigator.MoveToFirst | public function MoveToFirst()
{
if ( ! isset( $this->domNode ) || ! $this->getIsNode() ) return false;
// The DOMDocument and document element are their own first siblings
if ( $this->domNode instanceof \DOMDocument || $this->domNode->parentNode instanceof \DOMDocument ) return true;
$this->domNode = ... | php | public function MoveToFirst()
{
if ( ! isset( $this->domNode ) || ! $this->getIsNode() ) return false;
// The DOMDocument and document element are their own first siblings
if ( $this->domNode instanceof \DOMDocument || $this->domNode->parentNode instanceof \DOMDocument ) return true;
$this->domNode = ... | [
"public",
"function",
"MoveToFirst",
"(",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"domNode",
")",
"||",
"!",
"$",
"this",
"->",
"getIsNode",
"(",
")",
")",
"return",
"false",
";",
"// The DOMDocument and document element are their own first ... | Moves the XPathNavigator to the first sibling node of the current node.
@return bool Returns true if the XPathNavigator is successful moving to the first sibling node of the current node;
false if there is no first sibling, or if the XPathNavigator is currently positioned on an attribute
node. If the XPathNavigator is... | [
"Moves",
"the",
"XPathNavigator",
"to",
"the",
"first",
"sibling",
"node",
"of",
"the",
"current",
"node",
"."
] | 69882b6efffaa5470a819d5fdd2f6473ddeb046d | https://github.com/bseddon/XPath20/blob/69882b6efffaa5470a819d5fdd2f6473ddeb046d/DOM/DOMXPathNavigator.php#L805-L814 |
25,398 | bseddon/XPath20 | DOM/DOMXPathNavigator.php | DOMXPathNavigator.MoveToFollowing | public function MoveToFollowing( $kind, $end = null )
{
if ( is_null( $this->domNode ) ||
is_null( $kind ) ||
$this->domNode instanceof \DOMAttr ||
$this->domNode instanceof \DOMNameSpaceNode
) return false;
if ( ! is_null( $end ) && $this->IsSamePosition( $end ) ) return false;
if ... | php | public function MoveToFollowing( $kind, $end = null )
{
if ( is_null( $this->domNode ) ||
is_null( $kind ) ||
$this->domNode instanceof \DOMAttr ||
$this->domNode instanceof \DOMNameSpaceNode
) return false;
if ( ! is_null( $end ) && $this->IsSamePosition( $end ) ) return false;
if ... | [
"public",
"function",
"MoveToFollowing",
"(",
"$",
"kind",
",",
"$",
"end",
"=",
"null",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"this",
"->",
"domNode",
")",
"||",
"is_null",
"(",
"$",
"kind",
")",
"||",
"$",
"this",
"->",
"domNode",
"instanceof",... | Moves the XPathNavigator to the following element of the XPathNodeType specified, to the boundary specified,
in document order.
@param XPathNodeType $kind : The XPathNodeType of the element. The XPathNodeType cannot be XPathNodeType.Attribute or
XPathNodeType.Namespace.
@param XPathNavigator $end : (optional) The XPat... | [
"Moves",
"the",
"XPathNavigator",
"to",
"the",
"following",
"element",
"of",
"the",
"XPathNodeType",
"specified",
"to",
"the",
"boundary",
"specified",
"in",
"document",
"order",
"."
] | 69882b6efffaa5470a819d5fdd2f6473ddeb046d | https://github.com/bseddon/XPath20/blob/69882b6efffaa5470a819d5fdd2f6473ddeb046d/DOM/DOMXPathNavigator.php#L827-L878 |
25,399 | bseddon/XPath20 | DOM/DOMXPathNavigator.php | DOMXPathNavigator.MoveToNext | public function MoveToNext( $kind = XPathNodeType::All )
{
if ( is_null( $this->domNode ) || is_null( $kind ) /* || ! $this->domNode instanceof \DOMElement */ ) return false;
// Create a list of the valid DOM node types based on the $kind value
$domNodeTypes = array_keys( array_filter(
DOMXPathNavigato... | php | public function MoveToNext( $kind = XPathNodeType::All )
{
if ( is_null( $this->domNode ) || is_null( $kind ) /* || ! $this->domNode instanceof \DOMElement */ ) return false;
// Create a list of the valid DOM node types based on the $kind value
$domNodeTypes = array_keys( array_filter(
DOMXPathNavigato... | [
"public",
"function",
"MoveToNext",
"(",
"$",
"kind",
"=",
"XPathNodeType",
"::",
"All",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"this",
"->",
"domNode",
")",
"||",
"is_null",
"(",
"$",
"kind",
")",
"/* || ! $this->domNode instanceof \\DOMElement */",
")",
... | Moves the XPathNavigator to the next sibling node of the current
node that matches the XPathNodeType specified.
@param XPathNodeType $kind : (optional) The XPathNodeType of the sibling node to move to.
@return bool true if the XPathNavigator is successful moving to the next sibling node; otherwise,
false if there are ... | [
"Moves",
"the",
"XPathNavigator",
"to",
"the",
"next",
"sibling",
"node",
"of",
"the",
"current",
"node",
"that",
"matches",
"the",
"XPathNodeType",
"specified",
"."
] | 69882b6efffaa5470a819d5fdd2f6473ddeb046d | https://github.com/bseddon/XPath20/blob/69882b6efffaa5470a819d5fdd2f6473ddeb046d/DOM/DOMXPathNavigator.php#L889-L915 |
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.