Returns iterator.
public getIterator ( Nextras\Orm\Entity\IEntity $parent, Nextras\Orm\Collection\ICollection $collection ) : Traversable | ||
$parent | Nextras\Orm\Entity\IEntity | |
$collection | Nextras\Orm\Collection\ICollection | |
리턴 | Traversable |
public function getEntityIterator(IEntity $parent = NULL) { if ($this->relationshipMapper) { return $this->relationshipMapper->getIterator($parent, $this); } return $this->collectionMapper->getIterator(); }
public function getEntityIterator(IEntity $parent = NULL) { if ($this->relationshipMapper) { return $this->relationshipMapper->getIterator($parent, $this); } if ($this->result === NULL) { $this->execute(); } return new EntityIterator($this->result); }
public function getEntityIterator(IEntity $parent = NULL) { if ($parent && $this->relationshipMapper) { $collection = clone $this; $collection->relationshipMapper = NULL; $collection->relationshipParent = NULL; return $this->relationshipMapper->getIterator($parent, $collection); } else { $this->processData(); return new EntityIterator(array_values($this->data)); } }