Пример #1
0
 /**
  * Convert the results of a SQL query to
  * an array of entities.
  * 
  * @param DBEntity $fakeObj the entity.
  * @param array $rows the rows returned by the query.
  */
 public function sql2entities($fakeObj, $rows)
 {
     $entities = [];
     if ($rows) {
         foreach ($rows as $row) {
             $obj = $fakeObj->newInstance();
             $obj->setDAO($this);
             $entities[] = $this->sql2entity($obj, $row);
         }
     }
     return $entities;
 }