Horde_Kolab_Storage_List_Query_List_Cache_Synchronization::updateAfterCreateFolder PHP Method

updateAfterCreateFolder() public method

Update the listener after creating a new folder.
public updateAfterCreateFolder ( string $folder, string $type = null ) : null
$folder string The path of the folder that has been created.
$type string An optional type for the folder.
return null
    public function updateAfterCreateFolder($folder, $type = null)
    {
        if (!$this->_cache->hasNamespace()) {
            // Cache not synchronized yet.
            return;
        }
        $folder_list = $this->_cache->getFolders();
        $folder_list[] = $folder;
        $annotations = $this->_cache->getFolderTypes();
        if ($type !== null) {
            $annotations[$folder] = $type;
        }
        $namespace = unserialize($this->_cache->getNamespace());
        $this->_synchronize($namespace, $folder_list, $annotations);
    }

Usage Example

Example #1
0
 /**
  * Update the listener after creating a new folder.
  *
  * @param string $folder The path of the folder that has been created.
  * @param string $type   An optional type for the folder.
  *
  * @return NULL
  */
 public function updateAfterCreateFolder($folder, $type = null)
 {
     $this->_sync->updateAfterCreateFolder($folder, $type);
 }
All Usage Examples Of Horde_Kolab_Storage_List_Query_List_Cache_Synchronization::updateAfterCreateFolder