Horde_Kolab_Storage_Object::getCurrentContent PHP Method

getCurrentContent() public method

Return the current content value representing the object data. This call does not attempt to fetch the content from the backend.
public getCurrentContent ( ) : resource
return resource The raw object content.
    public function getCurrentContent()
    {
        return $this->_content;
    }

Usage Example

Example #1
0
 /**
  * Return the object data in a form that it can be stored in the backend.
  *
  * @param Horde_Kolab_Storage_Object $object The object that should receive the parsed data.
  *
  * @return string The encoded object data, ready to be written into the
  *                backend.
  */
 public function save(Horde_Kolab_Storage_Object $object)
 {
     try {
         return $this->_getParser($object->getType())->save($object->getData(), array('previous' => $object->getCurrentContent()));
     } catch (Horde_Kolab_Format_Exception $e) {
         throw new Horde_Kolab_Storage_Object_Exception(sprintf('Failed writing the Kolab object: %s', $e->getMessage()));
     }
 }