function Utils::getExpandedNodeProperties
Returns an expanded version of the traversable node properties. The return of the function is an array of node properties values with arrays flattened
Parameters
Node\Node $node Node:
Return value
array
3 calls to Utils::getExpandedNodeProperties()
- Combinator::exec in vendor/
mck89/ peast/ lib/ Peast/ Selector/ Node/ Combinator.php - Executes the current group on the given matches
- PseudoIndex::check in vendor/
mck89/ peast/ lib/ Peast/ Selector/ Node/ Part/ PseudoIndex.php - Returns true if the selector part matches the given node, false otherwise
- PseudoSimple::check in vendor/
mck89/ peast/ lib/ Peast/ Selector/ Node/ Part/ PseudoSimple.php - Returns true if the selector part matches the given node, false otherwise
File
-
vendor/
mck89/ peast/ lib/ Peast/ Syntax/ Utils.php, line 287
Class
- Utils
- Utilities class.
Namespace
Peast\SyntaxCode
public static function getExpandedNodeProperties(Node\Node $node) {
$ret = array();
$props = self::getNodeProperties($node, true);
foreach ($props as $prop) {
$val = $node->{$prop["getter"]}();
if (is_array($val)) {
$ret = array_merge($ret, $val);
}
else {
$ret[] = $val;
}
}
return $ret;
}