getObject() public method

Return the specified object.
public getObject ( string $object_id ) : array
$object_id string The object id.
return array The object data as an array.
Example #1
0
 /**
  * Return the preferences for the specified application.
  *
  * @param string $application The application.
  *
  * @return array The preferences.
  */
 public function getApplicationPreferences($application)
 {
     $this->_initMapping();
     if (isset($this->_mapping[$application])) {
         return $this->_data->getObject($this->_mapping[$application]);
     } else {
         throw new Horde_Kolab_Storage_Exception(sprintf('No preferences for application %s available', $application));
     }
 }
Example #2
0
File: Log.php Project: horde/horde
 /**
  * Return the specified object.
  *
  * @param string $object_id The object id.
  *
  * @return array The object data as an array.
  */
 public function getObject($object_id)
 {
     return $this->_data->getObject($object_id);
 }
Example #3
0
 /**
  * Test storing attachments.
  *
  * @return NULL
  */
 public function testCacheAttachmentAsContent()
 {
     $data = new Horde_Kolab_Storage_Data('contact');
     $data->setFolder($this->folder);
     $object = array('uid' => '1', 'full-name' => 'User Name', 'email' => '*****@*****.**', 'inline-attachment' => array('test.txt'), '_attachments' => array('test.txt' => array('type' => 'text/plain', 'content' => 'test', 'name' => 'test.txt')));
     $result = $data->save($object);
     $this->assertNoError($result);
     $result = $data->getObject(1);
     $this->assertNoError($result);
     $this->assertTrue(isset($result['_attachments']['test.txt']));
     $this->assertEquals("test\r", $data->getAttachment($result['_attachments']['test.txt']['key']));
 }