Nextras\Orm\Relationships\HasMany::getIterator PHP Метод

getIterator() публичный Метод

public getIterator ( ) : Nextras\Orm\Collection\ICollection | Nextras\Orm\Entity\IEntity[] | Traversable
Результат Nextras\Orm\Collection\ICollection | Nextras\Orm\Entity\IEntity[] | Traversable
    public function getIterator()
    {
        /** @var ICollection $collection */
        $collection = $this->collection === null && !$this->toAdd && !$this->toRemove && !$this->added && !$this->removed && $this->parent->isPersisted() && $this->parent->getPreloadContainer() ? $this->getCachedCollection() : $this->getCollection();
        return $collection->getEntityIterator($this->parent);
    }