Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct ($params) | |
createFolder ($name, $parentFolder=null) | |
removeFolder ($name) | |
renameFolder ($oldName, $newName) | |
appendMessage ($message, $folder=null, $flags=null, $recent=false) | |
copyMessage ($id, $folder) | |
moveMessage ($id, $folder) | |
setFlags ($id, $flags) | |
removeMessage ($id) | |
setQuota ($value) | |
getQuota ($fromStorage=false) | |
checkQuota ($detailedResponse=false, $forceRecalc=false) | |
![]() | |
__construct ($params) | |
getFolders ($rootFolder=null) | |
selectFolder ($globalName) | |
getCurrentFolder () | |
![]() | |
countMessages ($flags=null) | |
getSize ($id=null) | |
getMessage ($id) | |
getRawHeader ($id, $part=null, $topLines=0) | |
getRawContent ($id, $part=null) | |
__construct ($params) | |
close () | |
noop () | |
removeMessage ($id) | |
getUniqueId ($id=null) | |
getNumberByUniqueId ($id) | |
![]() | |
__get ($var) | |
getCapabilities () | |
countMessages () | |
getSize ($id=0) | |
getMessage ($id) | |
getRawHeader ($id, $part=null, $topLines=0) | |
getRawContent ($id, $part=null) | |
__construct ($params) | |
__destruct () | |
close () | |
noop () | |
removeMessage ($id) | |
getUniqueId ($id=null) | |
getNumberByUniqueId ($id) | |
count () | |
offsetExists ($id) | |
offsetGet ($id) | |
offsetSet ($id, $value) | |
offsetUnset ($id) | |
rewind () | |
current () | |
key () | |
next () | |
valid () | |
seek ($pos) | |
![]() | |
appendMessage ($message, $folder=null, $flags=null) | |
Static Public Member Functions | |
static | initMaildir ($dir) |
Protected Member Functions | |
_createUniqueId () | |
_createTmpFile ($folder='INBOX') | |
_getInfoString (&$flags) | |
_calculateMaildirsize () | |
_calculateQuota ($forceRecalc=false) | |
_addQuotaEntry ($size, $count=1) | |
![]() | |
_buildFolderTree () | |
![]() | |
_getFileData ($id, $field=null) | |
_isMaildir ($dirname) | |
_openMaildir ($dirname) | |
_getMaildirFiles ($dh, $dirname, $default_flags=array()) | |
Protected Attributes | |
$_quota | |
![]() | |
$_rootFolder | |
$_rootdir | |
$_currentFolder | |
$_delim | |
![]() | |
$_messageClass = 'Zend_Mail_Message_File' | |
$_files = array() | |
![]() | |
$_has | |
$_iterationPos = 0 | |
$_iterationMax = null | |
$_messageClass = 'Zend_Mail_Message' | |
Additional Inherited Members | |
![]() | |
static | $_knownFlags |
Definition at line 42 of file Maildir.php.
__construct | ( | $params | ) |
Create instance with parameters Additional parameters are (see parent for more):
array | $params | mail reader specific parameters |
Zend_Mail_Storage_Exception |
Definition at line 111 of file Maildir.php.
|
protected |
Definition at line 1030 of file Maildir.php.
|
protected |
Definition at line 865 of file Maildir.php.
|
protected |
Definition at line 961 of file Maildir.php.
|
protected |
open a temporary maildir file
makes sure tmp/ exists and create a file with a unique name you should close the returned filehandle!
string | $folder | name of current folder without leading . |
Zend_Mail_Storage_Exception |
Definition at line 433 of file Maildir.php.
|
protected |
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.
Definition at line 412 of file Maildir.php.
|
protected |
create an info string for filenames with given flags
array | $flags | wanted flags, with the reference you'll get the set flags with correct key (= char for flag) |
Zend_Mail_Storage_Exception |
Definition at line 495 of file Maildir.php.
appendMessage | ( | $message, | |
$folder = null , |
|||
$flags = null , |
|||
$recent = false |
|||
) |
append a new message to mail storage
string | stream | $message | message as string or stream resource |
null | string | Zend_Mail_Storage_Folder | $folder | folder for new message, else current folder is taken |
null | array | $flags | set flags for new message, else a default set is used |
bool | $recent | handle this mail as if recent flag has been set, should only be used in delivery |
Zend_Mail_Storage_Exception |
Definition at line 542 of file Maildir.php.
check if storage is currently over quota
bool | $detailedResponse | return known data of quota and current size and message count |
Definition at line 1045 of file Maildir.php.
copyMessage | ( | $id, | |
$folder | |||
) |
copy an existing message
int | $id | number of message |
string | Zend_Mail_Storage_Folder | $folder | name or instance of targer folder |
Zend_Mail_Storage_Exception |
Implements Zend_Mail_Storage_Writable_Interface.
Definition at line 615 of file Maildir.php.
createFolder | ( | $name, | |
$parentFolder = null |
|||
) |
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
string | $name | global name of folder, local name if $parentFolder is set |
string | Zend_Mail_Storage_Folder | $parentFolder | parent folder for new folder, else root folder is parent |
Zend_Mail_Storage_Exception |
Implements Zend_Mail_Storage_Writable_Interface.
Definition at line 134 of file Maildir.php.
getQuota | ( | $fromStorage = false | ) |
get currently set quota
Definition at line 835 of file Maildir.php.
|
static |
create a new maildir
If the given dir is already a valid maildir this will not fail.
string | $dir | directory for the new maildir (may already exist) |
Zend_Mail_Storage_Exception |
Definition at line 62 of file Maildir.php.
moveMessage | ( | $id, | |
$folder | |||
) |
move an existing message
int | $id | number of message |
string | Zend_Mail_Storage_Folder | $folder | name or instance of targer folder |
Zend_Mail_Storage_Exception |
Implements Zend_Mail_Storage_Writable_Interface.
Definition at line 694 of file Maildir.php.
removeFolder | ( | $name | ) |
remove a folder
string | Zend_Mail_Storage_Folder | $name | name or instance of folder |
Zend_Mail_Storage_Exception |
Implements Zend_Mail_Storage_Writable_Interface.
Definition at line 222 of file Maildir.php.
removeMessage | ( | $id | ) |
stub for not supported message deletion
Zend_Mail_Storage_Exception |
Definition at line 790 of file Maildir.php.
renameFolder | ( | $oldName, | |
$newName | |||
) |
rename and/or move folder
The new name has the same restrictions as in createFolder()
string | Zend_Mail_Storage_Folder | $oldName | name or instance of folder |
string | $newName | new global name of folder |
Zend_Mail_Storage_Exception |
Implements Zend_Mail_Storage_Writable_Interface.
Definition at line 326 of file Maildir.php.
setFlags | ( | $id, | |
$flags | |||
) |
set flags for message
NOTE: this method can't set the recent flag.
int | $id | number of message |
array | $flags | new flags for message |
Zend_Mail_Storage_Exception |
Implements Zend_Mail_Storage_Writable_Interface.
Definition at line 761 of file Maildir.php.
setQuota | ( | $value | ) |
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!
bool | array | $value | new quota value |
Definition at line 824 of file Maildir.php.
|
protected |
Definition at line 51 of file Maildir.php.