queryForClass() public method

Takes the SQL and arguments (array of Criterion) and returns an array of objects of type $className.
public queryForClass ( SqlBuilder $builder, string $className ) : array($className)
$builder SqlBuilder
$className string the type to fill from query results.
return array($className)
Esempio n. 1
0
 /**
  * Once results are needed this method executes the accumulated query
  * on the data source.
  */
 protected function realize()
 {
     if (!$this->hasResults) {
         unset($this->results);
         $this->results = $this->source->queryForClass($this->sqlBuilder, $this->rowClass);
         $this->hasResults = true;
     }
 }