map() public method

Create an instance of $this->_classname from a set of data.
public map ( array $fields = [] ) : Horde_Rdo_Base
$fields array Field names/default values for the new object.
return Horde_Rdo_Base An instance of $this->_classname with $fields as initial data.
Example #1
0
 /**
  * Implementation of the next() method.
  *
  * @return Horde_Rdo_Base|null The next Rdo object in the set or
  * null if no more results.
  */
 public function next()
 {
     if (is_null($this->_result)) {
         $this->rewind();
     }
     if ($this->_result) {
         $row = $this->_result->fetch();
         if (!$row) {
             $this->_eof = true;
         } else {
             $this->_eof = false;
             if (is_null($this->_index)) {
                 $this->_index = 0;
             } else {
                 ++$this->_index;
             }
             $this->_current = $this->_mapper->map($row);
         }
     }
     return $this->_current;
 }