Doctrine\ODM\OrientDB\UnitOfWork::getCollectionFor PHP Method

getCollectionFor() public method

public getCollectionFor ( array $rids, boolean $lazy = true, string $fetchPlan = null ) : Doctrine\ODM\OrientDB\Collections\ArrayCollection | null
$rids array
$lazy boolean
$fetchPlan string
return Doctrine\ODM\OrientDB\Collections\ArrayCollection | null
    public function getCollectionFor(array $rids, $lazy = true, $fetchPlan = null)
    {
        if ($lazy) {
            $proxies = array();
            foreach ($rids as $rid) {
                $proxies[] = $this->getProxyFor(new Rid($rid), $lazy);
            }
            return new ArrayCollection($proxies);
        }
        $results = $this->getHydrator()->load($rids, $fetchPlan);
        if (is_array($results)) {
            return $this->getHydrator()->hydrateCollection($results);
        }
        return null;
    }