setContent() public méthode

Set the content representing the object data.
public setContent ( resource $content )
$content resource The object content.
Exemple #1
0
 /**
  * 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;
     }
 }
Exemple #2
0
 public function testSetContent()
 {
     $object = new Horde_Kolab_Storage_Object();
     $object->setContent('A');
     $this->assertEquals('A', $object->getContent());
 }
Exemple #3
0
 /**
  * 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);
 }