public function serialize()
    {
        if (!$this->_useBuffering) {
            $msg = 'You cannot serialize an un-buffered ResultSet. Use Query::bufferResults() to get a buffered ResultSet.';
            throw new Exception($msg);
        }

        while ($this->valid()) {
            $this->next();
        }

        if ($this->_results instanceof SplFixedArray) {
            return serialize($this->_results->toArray());
        }

        return serialize($this->_results);
    }
public function serialize()
    {
        if (!$this->_useBuffering) {
            $msg = 'You cannot serialize an un-buffered ResultSet. Use Query::bufferResults() to get a buffered ResultSet.';
            throw new Exception($msg);
        }

        while ($this->valid()) {
            $this->next();
        }

        if ($this->_results instanceof SplFixedArray) {
            return serialize($this->_results->toArray());
        }

        return serialize($this->_results);
    }
public function serialize ( ) { if ( ! $ this -> _useBuffering ) { $ msg = 'You cannot serialize an un-buffered ResultSet. Use Query::bufferResults() to get a buffered ResultSet.' ; throw new Exception ( $ msg ) ; } while ( $ this -> valid ( ) ) { $ this -> next ( ) ; } if ( $ this -> _results instanceof SplFixedArray ) { return serialize ( $ this -> _results -> toArray ( ) ) ; } return serialize ( $ this -> _results ) ; }
Serializes a resultset.

Part of Serializable interface.

@return string Serialized object
Serializes a resultset .