protected function getAllRecordsMatchingQueryConditions(ReadQuery $query)
    {
        $records = [];
        foreach ($this->getIterator($query->getCollection()) as $record) {
            $records[] = $record;
        }

        if (!$query->getConditions()) {
            return $records;
        }

        foreach ($records as $key => $record) {
            if (!$this->recordMatchesQuery($record, $query)) {
                unset($records[$key]);
            }
        }

        return $records;
    }
protected function getAllRecordsMatchingQueryConditions(ReadQuery $query)
    {
        $records = [];
        foreach ($this->getIterator($query->getCollection()) as $record) {
            $records[] = $record;
        }

        if (!$query->getConditions()) {
            return $records;
        }

        foreach ($records as $key => $record) {
            if (!$this->recordMatchesQuery($record, $query)) {
                unset($records[$key]);
            }
        }

        return $records;
    }
protected function getAllRecordsMatchingQueryConditions ( ReadQuery $ query ) { $ records = [ ] ; foreach ( $ this -> getIterator ( $ query -> getCollection ( ) ) as $ record ) { $ records [ ] = $ record ; } if ( ! $ query -> getConditions ( ) ) { return $ records ; } foreach ( $ records as $ key => $ record ) { if ( ! $ this -> recordMatchesQuery ( $ record , $ query ) ) { unset ( $ records [ $ key ] ) ; } } return $ records ; }
Get all the records in a collection matching the Query conditions

@param ReadQuery $query
@return array
Get all the records in a collection matching the Query conditions