Example #1
0
 /**
  * remove a folder
  *
  * @param string|Zend_Mail_Storage_Folder $name      name or instance of folder
  * @return null
  * @throw Zend_Mail_Storage_Exception
  */
 public function removeFolder($name)
 {
     if ($name instanceof Zend_Mail_Storage_Folder) {
         $name = $name->getGlobalName();
     }
     if (!$this->_protocol->delete($name)) {
         throw new Zend_Mail_Storage_Exception('cannot delete folder');
     }
 }
Example #2
0
 /**
  * remove a folder
  *
  * @param  string|Zend_Mail_Storage_Folder $name      name or instance of folder
  * @return null
  * @throws Zend_Mail_Storage_Exception
  */
 public function removeFolder($name)
 {
     if ($name instanceof Zend_Mail_Storage_Folder) {
         $name = $name->getGlobalName();
     }
     if (!$this->_protocol->delete($name)) {
         /**
          * @see Zend_Mail_Storage_Exception
          */
         require_once 'Zend/Mail/Storage/Exception.php';
         throw new Zend_Mail_Storage_Exception('cannot delete folder');
     }
 }