public getNodesByPath ( array $absPaths, string $class = 'Node', array | null $typeFilter = null ) : |
||
$absPaths | array | Array containing the absolute paths of the nodes to fetch. |
$class | string | The class of node to get. TODO: Is it sane to fetch data separately for Version and normal Node? |
$typeFilter | array | null | Node type list to skip some nodes |
return | Iterator that contains all found NodeInterface instances keyed by their path |
public function getNodesByPath($absPaths, $class = 'Node', $typeFilter = null)
{
$nodesPathIterator = new NodePathIterator($this, $absPaths, $class, $typeFilter);
return $nodesPathIterator;
}
/** * {@inheritDoc} * * @api */ public function getNodes($absPaths) { if (!is_array($absPaths) && !$absPaths instanceof \Traversable) { $hint = is_object($absPaths) ? get_class($absPaths) : gettype($absPaths); throw new InvalidArgumentException("Not a valid array or Traversable: {$hint}"); } return $this->objectManager->getNodesByPath($absPaths); }