src/queries/ActiveQuery.php
public function requireAll($db = null)
    {
        $records = $this->all($db);

        if (empty($records)) {
            throw new RecordNotFoundException(
                sprintf(
                    "Records not found."
                )
            );
        }

        return $records;
    }
public function requireAll($db = null)
    {
        $records = $this->all($db);

        if (empty($records)) {
            throw new RecordNotFoundException(
                sprintf(
                    "Records not found."
                )
            );
        }

        return $records;
    }
public function requireAll ( $ db = null ) { $ records = $ this -> all ( $ db ) ; if ( empty ( $ records ) ) { throw new RecordNotFoundException ( sprintf ( "Records not found." ) ) ; } return $ records ; }
Executes query and returns all results as an array.  If results are not found, an exception is
thrown as we explicitly expect results.

@param Connection $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.
@throws RecordNotFoundException
Executes query and returns all results as an array . If results are not found an exception is thrown as we explicitly expect results .