public function serialize($skipObjects = false)
    {
        $this->_prepareData();
        $temporaryData  = $this->toArray();
        $data           = '';

        if ($skipObjects) {
            $temporaryData = $this->traveler(
                'self::_skipObject',
                null,
                $temporaryData,
                true
            );
        }

        try {
            $data = Serializer::serialize($temporaryData);
        } catch (ExceptionInterface $exception) {
            $this->_addException($exception);
        }

        return $data;
    }
public function serialize($skipObjects = false)
    {
        $this->_prepareData();
        $temporaryData  = $this->toArray();
        $data           = '';

        if ($skipObjects) {
            $temporaryData = $this->traveler(
                'self::_skipObject',
                null,
                $temporaryData,
                true
            );
        }

        try {
            $data = Serializer::serialize($temporaryData);
        } catch (ExceptionInterface $exception) {
            $this->_addException($exception);
        }

        return $data;
    }
public function serialize ( $ skipObjects = false ) { $ this -> _prepareData ( ) ; $ temporaryData = $ this -> toArray ( ) ; $ data = '' ; if ( $ skipObjects ) { $ temporaryData = $ this -> traveler ( 'self::_skipObject' , null , $ temporaryData , true ) ; } try { $ data = Serializer :: serialize ( $ temporaryData ) ; } catch ( ExceptionInterface $ exception ) { $ this -> _addException ( $ exception ) ; } return $ data ; }
return serialized object data

@param boolean $skipObjects
@return string
return serialized object data