title: Zend framework 2 \Zend\Db\ResultSet\ResultSet->toArray() doe not return records
body: <p>I'm simply trying to fetch all records in a given table by extending Zend <code>AbstractTableGateway</code> and making use of inherited <code>select()</code> function. this <code>select()</code> function returns type Zend <code>ResultSet</code> however I'm not able get an array of results using <code>toArray()</code>.</p>
  
  <p>I get the following message: </p>
  
  <blockquote>
    <p>Rows as part of this DataSource, with type object cannot be cast to an array</p>
  </blockquote>
  
  <h2>Update</h2>
  
  <p>I worked it out</p>
  
  <p>assuming you have extended AbstractTableGateway</p>
  
  <pre><code>$resultSet = $this-&gt;select();
  foreach($resultSet as $row) { echo $row-&gt;yourProperty }
  </code></pre>