Note UUIDs that are not found will be ignored. Also, duplicate IDs
will be eliminated by nature of using the IDs as keys.
public getNodesByIdentifier ( array $identifiers, string $class = 'Node' ) : ArrayIterato\ArrayIterator | |
||
$identifiers | array | UUIDs of nodes to retrieve. |
$class | string | Optional class name for the factory. |
return | ArrayIterato\ArrayIterator | |
Iterator of the specified nodes keyed by their unique ids |
/** * {@inheritDoc} * * @api */ public function getNodesByIdentifier($ids) { if (!is_array($ids) && !$ids instanceof \Traversable) { $hint = is_object($ids) ? get_class($ids) : gettype($ids); throw new InvalidArgumentException("Not a valid array or Traversable: {$hint}"); } return $this->objectManager->getNodesByIdentifier($ids); }