getData() public method

Fetch the object data.
public getData ( ) : array
return array The object data.
Beispiel #1
0
 public function testAutomaticUid()
 {
     $object = new Horde_Kolab_Storage_Object();
     $object->setData(array());
     $this->assertEquals(array('uid'), array_keys($object->getData()));
 }
Beispiel #2
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()));
     }
 }