Either return an array from the result set using its toArray
method...
public function fetchAll($field, $order)
{
// ...
return $resultSet->toArray();
}
Or in your view, use the toArray
method in your foreach
<?php foreach($records->toArray() as $record) : ?>
<?php var_dump($record); ?> <br />
<?php endforeach;