Exemple #1
0
 /**
  * @return AbstractModel[]
  */
 public function execute()
 {
     if ($this->getRepo()->getInherited()) {
         $this->select->prependColumn($this->getTable() . '.class');
         return $this->select->execute()->fetchAll(PDO::FETCH_CLASS | PDO::FETCH_CLASSTYPE);
     } else {
         return $this->select->execute()->fetchAll(PDO::FETCH_CLASS, $this->getRepo()->getModelClass());
     }
 }