Bolt\Storage\Collection\Relations::offsetGet PHP Метод

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

public offsetGet ( $offset )
    public function offsetGet($offset)
    {
        if ($this->em === null) {
            throw new StorageException('Unable to load collection values. Ensure that EntityManager is set on ' . __CLASS__);
        }
        $collection = new LazyCollection();
        $proxies = $this->getField($offset);
        foreach ($proxies as $proxy) {
            $collection->add(new EntityProxy($proxy->to_contenttype, $proxy->to_id, $this->em));
        }
        return $collection;
    }