예제 #1
0
파일: Map.php 프로젝트: jubinpatel/horde
 /**
  * Add new object data.
  *
  * @param string $guid The GUID of the object to be added.
  * @param array  $data The attributes of the object to be added.
  *
  * @return NULL
  *
  * @throws Horde_Kolab_Server_Exception
  */
 public function add(Horde_Kolab_Server_Object_Interface $object, array $data)
 {
     //@todo: This will not work this way as we need to map internal
     // attributes.
     $this->mapAttributes($data);
     $this->_server->add($object, $data);
 }
예제 #2
0
파일: Log.php 프로젝트: horde/horde
 /**
  * Add new object data.
  *
  * @param Horde_Kolab_Server_Object $object The object to be added.
  * @param array                     $data   The attributes of the object
  *                                          to be added.
  *
  * @return NULL
  *
  * @throws Horde_Kolab_Server_Exception
  */
 public function add(Horde_Kolab_Server_Object_Interface $object, array $data)
 {
     try {
         $this->_server->add($object, $data);
         $this->_logger->debug(sprintf("The object \"%s\" has been successfully added!", $object->getGuid()));
     } catch (Horde_Kolab_Server_Exception $e) {
         $this->_logger->warn(sprintf("Failed adding object \"%s\"! Error: %s", $object->getGuid(), $e->getMessage()));
     }
 }
예제 #3
0
파일: Count.php 프로젝트: horde/horde
 /**
  * Add new object data.
  *
  * @param Horde_Kolab_Server_Object $object The object to be added.
  * @param array                     $data   The attributes of the object
  *                                          to be added.
  *
  * @return NULL
  *
  * @throws Horde_Kolab_Server_Exception
  */
 public function add(Horde_Kolab_Server_Object_Interface $object, array $data)
 {
     $this->_server->add($object, $data);
     if (!isset($this->_count['add'])) {
         $this->_count['add'] = 1;
     } else {
         $this->_count['add']++;
     }
 }
예제 #4
0
파일: Clean.php 프로젝트: raz0rsdge/horde
 /**
  * Add new object data.
  *
  * @param Horde_Kolab_Server_Object $object The object to be added.
  * @param array                     $data   The attributes of the object
  *                                          to be added.
  *
  * @return NULL
  *
  * @throws Horde_Kolab_Server_Exception
  */
 public function add(Horde_Kolab_Server_Object_Interface $object, array $data)
 {
     $this->_server->add($object, $data);
     $this->_added[] = $object->getGuid();
 }
예제 #5
0
파일: Scenario.php 프로젝트: horde/horde
 /**
  * Assert that creating a new object operation yields some predictable
  * attribute results.
  *
  * @param Horde_Kolab_Server         $server The server the object resides on.
  * @param array                      $store  The information to save.
  * @param array                      $fetch  The expected results.
  *
  * @return NULL.
  */
 protected function assertAdd(Horde_Kolab_Server $server, array $store, array $fetch)
 {
     $object = $server->add($store);
     $this->assertNoError($object);
     $this->added[] = array($server, $object->getUid());
     $object = $server->fetch($object->getUid());
     foreach ($fetch as $attribute => $expect) {
         $this->assertEquals($expect, $object->get($attribute));
     }
     return $object;
 }