_populate() protected method

Extract the next item from the result ressource and wraps it into a Document object.
protected _populate ( ) : mixed
return mixed Returns the next `Document` if exists. Returns `null` otherwise
 /**
  * Lazy-loads a document from a query using a reference to a database adapter and a query
  * result resource.
  *
  * @param array $data
  * @param mixed $key
  * @return array
  */
 protected function _populate($data = null, $key = null)
 {
     $item = parent::_populate($data, $key);
     $params = compact('data', 'key', 'item');
     return $this->_filter(__METHOD__, $params, function ($self, $params) {
         return $params['item'];
     });
 }