Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
bool|int $_quota = ''
use quota and size of quota if given
__construct(
$params $params
)
:
Create instance with parameters Additional parameters are (see parent for more): - create if true a new maildir is create if none exists
_addQuotaEntry(
$size, $count
=
1
)
:
_calculateMaildirsize(
)
:
_calculateQuota(
$forceRecalc
=
false
)
:
_createTmpFile(
string $folder
=
INBOX
)
:
array
open a temporary maildir file
makes sure tmp/ exists and create a file with a unique name you should close the returned filehandle!
_createUniqueId(
)
:
string
create a uniqueid for maildir filename
This is nearly the format defined in the maildir standard. The microtime() call should already create a uniqueid, the pid is for multicore/-cpu machine that manage to call this function at the exact same time, and uname() gives us the hostname for multiple machines accessing the same storage.
If someone disables posix we create a random number of the same size, so this method should also work on Windows - if you manage to get maildir working on Windows. Microtime could also be disabled, altough I've never seen it.
_getInfoString(
array $flags
)
:
string
create an info string for filenames with given flags
appendMessage(
string|stream $message, null|string|Zend_Mail_Storage_Folder $folder
=
null, null|array $flags
=
null, bool $recent
=
false
)
:
append a new message to mail storage
checkQuota(
bool $detailedResponse
=
false, $forceRecalc
=
false
)
:
bool|array
check if storage is currently over quota
copyMessage(
int $id, string|Zend_Mail_Storage_Folder $folder
)
:
null
copy an existing message
createFolder(
string $name, string|Zend_Mail_Storage_Folder $parentFolder
=
null
)
:
string
create a new folder
This method also creates parent folders if necessary. Some mail storages may restrict, which folder may be used as parent or which chars may be used in the folder name
getQuota(
$fromStorage
=
false
)
:
bool|array
get currently set quota
initMaildir(
string $dir
)
:
null
create a new maildir
If the given dir is already a valid maildir this will not fail.
moveMessage(
int $id, string|Zend_Mail_Storage_Folder $folder
)
:
null
move an existing message
removeFolder(
string|Zend_Mail_Storage_Folder $name
)
:
null
remove a folder
removeMessage(
$id
)
:
null
stub for not supported message deletion
renameFolder(
string|Zend_Mail_Storage_Folder $oldName, string $newName
)
:
null
rename and/or move folder
The new name has the same restrictions as in createFolder()
setFlags(
int $id, array $flags
)
:
set flags for message
NOTE: this method can't set the recent flag.
setQuota(
bool|array $value
)
:
null
enable/disable quota and set a quota value if wanted or needed
You can enable/disable quota with true/false. If you don't have a MDA or want to enforce a quota value you can also set this value here. Use array('size' => SIZE_QUOTA, 'count' => MAX_MESSAGE) do define your quota. Order of these fields does matter!