Пример #1
0
 /**
  * @param \Thru\ActiveRecord\DatabaseLayer\Passthru $thing
  * @return array
  * @throws \Thru\ActiveRecord\DatabaseLayer\Exception
  */
 public function processPassthru(DatabaseLayer\Passthru $thing)
 {
     $sql = $thing->getSqlToPassthru();
     $result = $this->query($sql, $thing->getModel());
     // TODO: Make this a Collection.
     $results = array();
     if ($result !== false && $result !== null) {
         foreach ($result as $result_item) {
             $results[] = $result_item;
         }
     }
     return $results;
 }