Horde_Kolab_Storage_Data_Base::move PHP Method

move() public method

Move the specified message from the current folder into a new folder.
public move ( string $object_id, string $new_folder )
$object_id string ID of the message to be moved.
$new_folder string Target folder.
    public function move($object_id, $new_folder)
    {
        if ($this->objectIdExists($object_id)) {
            $uid = $this->getBackendId($object_id);
        } else {
            throw new Horde_Kolab_Storage_Exception(sprintf('No such object %s!', $object_id));
        }
        $this->_driver->moveMessage($uid, $this->_folder->getPath(), $new_folder);
        $this->synchronize(array('changes' => array(Horde_Kolab_Storage_Folder_Stamp::ADDED => array(), Horde_Kolab_Storage_Folder_Stamp::DELETED => array($uid => $object_id))));
    }