/** * Builds a query object from a share object. * * @param Horde_Share_Object $share A share object representing a query. * * @return Whups_Query The query object built from the share. */ protected function _getQuery(Horde_Share_Object $share) { $queryDetails = $GLOBALS['whups_driver']->getQuery($share->getId()); $queryDetails['query_id'] = $share->getId(); $queryDetails['query_name'] = $share->get('name'); $queryDetails['query_slug'] = $share->get('slug'); return new Whups_Query($this, $queryDetails); }
/** * Helper for accessing the gallery id * * @param string $property The property * * @return mixed */ public function __get($property) { switch ($property) { case 'id': return $this->_share->getId(); default: return null; } }
/** * Removes a share from the shares system permanently. * * @param Horde_Share_Object $share The share to remove. */ protected function _removeShare(Horde_Share_Object $share) { try { $this->getList()->getListManipulation()->deleteFolder($this->_idDecode($share->getId())); } catch (Horde_Kolab_Storage_Exception $e) { throw new Horde_Share_Exception($e); } }
/** * Renames a share in the shares system. * * @param Horde_Share_Object $share The share to rename. * @param string $name The share's new name. * * @throws Horde_Share_Exception */ protected function _renameShare(Horde_Share_Object $share, $name) { try { $this->_db->update('UPDATE ' . $this->_table . ' SET share_name = ? WHERE share_id = ?', array($name, $share->getId())); } catch (Horde_Db_Exception $e) { throw new Horde_Share_Exception($e); } }
/** * Const'r * * @param array $params * * @return Kronolith_Resource_Base */ public function __construct(array $params = array()) { $this->_share = $params['share']; $this->_id = $this->_share->getId(); }
/** * Removes a share from the shares system permanently. * * @param Horde_Share_Object $share The share to remove. * * @throws Horde_Share_Exception */ public function removeShare(Horde_Share_Object $share) { // Run the results through the callback, if configured. $this->runCallback('remove', array($share)); /* Remove share from the caches. */ $id = $share->getId(); unset($this->_shareMap[$id]); unset($this->_cache[$share->getName()]); /* Reset caches that depend on unknown criteria. */ $this->expireListCache(); $this->_removeShare($share); }