Horde_Kolab_Storage_List_Cache::getListId PHP Метод

getListId() публичный Метод

Return the ID for the list cache.
public getListId ( ) : string
Результат string The unique ID for the list used when caching it.
    public function getListId()
    {
        if ($this->_list_id === null) {
            throw new Horde_Kolab_Storage_Exception('You must set the ID of the list cache!');
        }
        return $this->_list_id;
    }

Usage Example

Пример #1
0
 public function testID()
 {
     $cache = $this->getMockCache();
     $list_cache = new Horde_Kolab_Storage_List_Cache($cache, array('host' => 'test', 'port' => '0', 'user' => 'test'));
     //$list_cache->setListId('test');
     $list_cache->store(array(), array());
     $list_cache->save();
     $data = unserialize($cache->loadList($list_cache->getListId()));
     $this->assertEquals('a:3:{s:4:"host";s:4:"test";s:4:"port";s:1:"0";s:4:"user";s:4:"test";}', $data['I']);
 }