src/ActiveQuery.php
public function all($db = null)
    {
        if ($this->asArray) {
            return parent::all($db);
        }

        $rows = $this->searchAll($db);

        return $this->populate($rows);
    }
public function all($db = null)
    {
        if ($this->asArray) {
            return parent::all($db);
        }

        $rows = $this->searchAll($db);

        return $this->populate($rows);
    }
public function all ( $ db = null ) { if ( $ this -> asArray ) { return parent :: all ( $ db ) ; } $ rows = $ this -> searchAll ( $ db ) ; return $ this -> populate ( $ rows ) ; }
Executes query and returns all results as an array.
@param AbstractConnection $db the DB connection used to create the DB command.
If null, the DB connection returned by [[modelClass]] will be used.
@return array|ActiveRecord[] the query results. If the query results in nothing, an empty array will be returned.
Executes query and returns all results as an array .