Kdyby\Doctrine\ResultSet::toArray PHP Method

toArray() public method

public toArray ( integer $hydrationMode = ORM\AbstractQuery::HYDRATE_OBJECT ) : array
$hydrationMode integer
return array
    public function toArray($hydrationMode = ORM\AbstractQuery::HYDRATE_OBJECT)
    {
        return iterator_to_array(clone $this->getIterator($hydrationMode), TRUE);
    }

Usage Example

示例#1
0
 public function render()
 {
     $template = $this->getTemplate();
     $template->setFile(__DIR__ . '/overview.latte');
     $this->resultSet->applyPaginator($this['vs']->getPaginator(), $this->pagesPerPage);
     $this->pages = $this->resultSet->toArray();
     $template->pages = $this->pages;
     $template->pagesCount = count($this->pages);
     $template->render();
 }
All Usage Examples Of Kdyby\Doctrine\ResultSet::toArray