Blast\Orm\Hydrator\EntityHydrator::hydrateCollection PHP Method

hydrateCollection() protected method

protected hydrateCollection ( $data ) : object | SplStack
$data
return object | SplStack
    protected function hydrateCollection($data)
    {
        $stack = $this->provider->getDefinition()->getEntityCollection();
        foreach ($data as $key => $value) {
            $stack->push($this->hydrateEntity($value));
        }
        $stack->rewind();
        return $stack;
    }