protected function encode($data)
    {
        if ($this->getEncoding() === self::ENCODING_BASE64) {
            return base64_encode(serialize($data));
        } else {
            return serialize($data);
        }
    }
protected function encode($data)
    {
        if ($this->getEncoding() === self::ENCODING_BASE64) {
            return base64_encode(serialize($data));
        } else {
            return serialize($data);
        }
    }
protected function encode ( $ data ) { if ( $ this -> getEncoding ( ) === self :: ENCODING_BASE64 ) { return base64_encode ( serialize ( $ data ) ) ; } else { return serialize ( $ data ) ; } }
This method is intend to encode the data for the storage container.

@param string $data The dataset to encode

@author Benjamin Carl <opensource@clickalicious.de>
@return string Encoded data input
@access protected
This method is intend to encode the data for the storage container .