/** * Convert the object content into a data structure and update the object * accordingly. * * @param resource $content The raw content from the object. * @param Horde_Kolab_Storage_Object $object The object that should receive the parsed data. */ public function load($content, Horde_Kolab_Storage_Object $object) { try { $object->setData($this->_getParser($object->getType())->load($content)); return true; } catch (Horde_Kolab_Format_Exception $e) { $object->setContent($content); return $e; } }
public function testSetContent() { $object = new Horde_Kolab_Storage_Object(); $object->setContent('A'); $this->assertEquals('A', $object->getContent()); }
/** * Convert the object content into a data structure and update the object * accordingly. * * @param resource $content The raw content from the object. * @param Horde_Kolab_Storage_Object $object The object that should receive the parsed data. */ public function load($content, Horde_Kolab_Storage_Object $object) { $object->setContent($content); }