public function readObject($className = 'stdClass', $fields = [])
    {
        $this->next();
        if (!$this->valid()) {
            return false;
        }
        $obj = new $className($fields);
        foreach ($this->_row as $key => $value) {
            $obj->{$key} = $value;
        }
        return $obj;
    }
public function readObject($className = 'stdClass', $fields = [])
    {
        $this->next();
        if (!$this->valid()) {
            return false;
        }
        $obj = new $className($fields);
        foreach ($this->_row as $key => $value) {
            $obj->{$key} = $value;
        }
        return $obj;
    }
public function readObject ( $ className = 'stdClass' , $ fields = [ ] ) { $ this -> next ( ) ; if ( ! $ this -> valid ( ) ) { return false ; } $ obj = new $ className ( $ fields ) ; foreach ( $ this -> _row as $ key => $ value ) { $ obj -> { $ key } = $ value ; } return $ obj ; }
Returns an object populated with the next row of data.
@param string $className class name of the object to be created and populated
@param array $fields Elements of this array are passed to the constructor
@return mixed the populated object, false if no more row of data available
Returns an object populated with the next row of data .