field = $field; $this->handler = $field->getHandler($entity); } /** * Implements Iterator::current(). */ public function current() { return $this->field->child()->getHandler($this->handler->current()); } /** * Implements Iterator::key(). */ public function key() { return $this->handler->key(); } /** * Implements Iterator::next(). */ public function next() { $this->handler->next(); } /** * Implements Iterator::rewind(). */ public function rewind() { $this->handler->rewind(); } /** * Implements Iterator::handler(). */ public function valid() { return $this->handler->valid(); } /** * Implements RecursiveIterator::hasChildren(). */ public function hasChildren() { return ($this->field->child() instanceof CerEntityContainerInterface); } /** * Implements RecursiveIterator::getChildren(). */ public function getChildren() { return new CerEndPointIterator($this->field->child(), $this->handler->current()); } }