Exemplo n.º 1
0
 /**
  *
  * @param string $sql
  * @param array $params
  * @return array 
  */
 public function findAllBySql($sql, $params = array())
 {
     if (CStubActiveRecord::isUnittests()) {
         return CallFactory::call($this, 'findAllBySql');
     }
     return parent::findAllBySql($sql, $params);
 }
Exemplo n.º 2
0
 /**
  * @param null $db
  *
  * @return array|\CActiveRecord[]
  */
 public function all($db = null)
 {
     $cmd = $this->createCommand($db);
     $rows = $this->finder->findAllBySql($cmd->getSql(), $cmd->params);
     return $this->populate($rows);
 }
 public function findAllBySql($sql, $params = array())
 {
     return $this->prepareRecords(parent::findAllBySql($sql, $params));
 }