File indexing completed on 2024-12-29 05:27:49
0001 <?php 0002 /** 0003 * Zend Framework 0004 * 0005 * LICENSE 0006 * 0007 * This source file is subject to the new BSD license that is bundled 0008 * with this package in the file LICENSE.txt. 0009 * It is also available through the world-wide-web at this URL: 0010 * http://framework.zend.com/license/new-bsd 0011 * If you did not receive a copy of the license and are unable to 0012 * obtain it through the world-wide-web, please send an email 0013 * to license@zend.com so we can send you a copy immediately. 0014 * 0015 * @category Zend 0016 * @package Zend_Mail 0017 * @subpackage Storage 0018 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0019 * @license http://framework.zend.com/license/new-bsd New BSD License 0020 * @version $Id$ 0021 */ 0022 0023 0024 /** 0025 * @category Zend 0026 * @package Zend_Mail 0027 * @subpackage Storage 0028 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0029 * @license http://framework.zend.com/license/new-bsd New BSD License 0030 */ 0031 0032 interface Zend_Mail_Storage_Writable_Interface 0033 { 0034 /** 0035 * create a new folder 0036 * 0037 * This method also creates parent folders if necessary. Some mail storages may restrict, which folder 0038 * may be used as parent or which chars may be used in the folder name 0039 * 0040 * @param string $name global name of folder, local name if $parentFolder is set 0041 * @param string|Zend_Mail_Storage_Folder $parentFolder parent folder for new folder, else root folder is parent 0042 * @return null 0043 * @throws Zend_Mail_Storage_Exception 0044 */ 0045 public function createFolder($name, $parentFolder = null); 0046 0047 /** 0048 * remove a folder 0049 * 0050 * @param string|Zend_Mail_Storage_Folder $name name or instance of folder 0051 * @return null 0052 * @throws Zend_Mail_Storage_Exception 0053 */ 0054 public function removeFolder($name); 0055 0056 /** 0057 * rename and/or move folder 0058 * 0059 * The new name has the same restrictions as in createFolder() 0060 * 0061 * @param string|Zend_Mail_Storage_Folder $oldName name or instance of folder 0062 * @param string $newName new global name of folder 0063 * @return null 0064 * @throws Zend_Mail_Storage_Exception 0065 */ 0066 public function renameFolder($oldName, $newName); 0067 0068 /** 0069 * append a new message to mail storage 0070 * 0071 * @param string|Zend_Mail_Message|Zend_Mime_Message $message message as string or instance of message class 0072 * @param null|string|Zend_Mail_Storage_Folder $folder folder for new message, else current folder is taken 0073 * @param null|array $flags set flags for new message, else a default set is used 0074 * @throws Zend_Mail_Storage_Exception 0075 */ 0076 public function appendMessage($message, $folder = null, $flags = null); 0077 0078 /** 0079 * copy an existing message 0080 * 0081 * @param int $id number of message 0082 * @param string|Zend_Mail_Storage_Folder $folder name or instance of targer folder 0083 * @return null 0084 * @throws Zend_Mail_Storage_Exception 0085 */ 0086 public function copyMessage($id, $folder); 0087 0088 /** 0089 * move an existing message 0090 * 0091 * @param int $id number of message 0092 * @param string|Zend_Mail_Storage_Folder $folder name or instance of targer folder 0093 * @return null 0094 * @throws Zend_Mail_Storage_Exception 0095 */ 0096 public function moveMessage($id, $folder); 0097 0098 /** 0099 * set flags for message 0100 * 0101 * NOTE: this method can't set the recent flag. 0102 * 0103 * @param int $id number of message 0104 * @param array $flags new flags for message 0105 * @throws Zend_Mail_Storage_Exception 0106 */ 0107 public function setFlags($id, $flags); 0108 }