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.
TIMEOUT_CONNECTION = '30'
Default timeout in seconds for initiating session
Detailsresource|null $_socket = ''socket to imap server
Detailsint $_tagCount = '0'counter for request tag
Details__construct(
string $host, int|null $port
=
null, bool $ssl
=
false
)
:
Public constructor
Details__destruct(
)
:
Public destructor
Details_assumedNextLine(
string $start
)
:
boolget next line and assume it starts with $start. some requests give a simple feedback so we can quickly check if we can go on.
Details_decodeLine(
string $line
)
:
arraysplit a given line in tokens. a token is literal of any form or a list
Details_nextLine(
)
:
stringget the next line from socket with error checking, but nothing else
Details_nextTaggedLine(
string $tag
)
:
stringget next line and split the tag. that's the normal case for a response line
Detailsappend(
string $folder, string $message, array $flags
=
null, string $date
=
null
)
:
boolappend a new message to given folder
Detailscapability(
)
:
arrayGet capabilities from IMAP server
Detailsconnect(
string $host, int|null $port
=
null, string|bool $ssl
=
false
)
:
stringOpen connection to IMAP server
Detailscopy(
string $folder, $from, int|null $to
=
null
)
:
boolcopy message set from current folder to other folder
Detailscreate(
string $folder
)
:
boolcreate a new folder (and parent folders if needed)
Detailsdelete(
string $folder
)
:
boolremove a folder
DetailsescapeList(
array $list
)
:
stringescape a list with literals or lists
DetailsescapeString(
string|array $string
)
:
string|arrayescape one or more literals i.e. for sendRequest
Detailsexamine(
string $box
=
INBOX
)
:
bool|arrayexamine folder
DetailsexamineOrSelect(
string $command
=
EXAMINE, string $box
=
INBOX
)
:
bool|arrayExamine and select have the same response. The common code for both is in this method
Detailsexpunge(
)
:
boolpermanently remove messages
Detailsfetch(
string|array $items, int $from, int|null $to
=
null
)
:
string|arrayfetch one or more items of one or more messages
DetailslistMailbox(
string $reference, string $mailbox
=
*
)
:
arrayget mailbox list
this method can't be named after the IMAP command 'LIST', as list is a reserved keyword
Detailslogin(
string $user, string $password
)
:
boolLogin to IMAP server.
Detailslogout(
)
:
boollogout of imap server
Detailsnoop(
)
:
boolsend noop
DetailsreadLine(
array|string $tokens
=
array, string $wantedTag
=
*, bool $dontParse
=
false
)
:
boolread a response "line" (could also be more than one real line if response has {..}<NL>) and do a simple decode
DetailsreadResponse(
string $tag, bool $dontParse
=
false
)
:
null|bool|arrayread all lines of response until given tag is found (last line of response)
Detailsrename(
string $old, string $new
)
:
boolrename an existing folder
DetailsrequestAndResponse(
string $command, array $tokens
=
array, bool $dontParse
=
false
)
:
mixedsend a request and get response at once
Detailssearch(
$params
)
:
arraydo a search request
This method is currently marked as internal as the API might change and is not safe if you don't take precautions.
Detailsselect(
string $box
=
INBOX
)
:
bool|arraychange folder
DetailssendRequest(
string $command, array $tokens
=
array, string $tag
=
null
)
:
nullsend a request
Detailsstore(
array $flags, int $from, int|null $to
=
null, string|null $mode
=
null, bool $silent
=
true
)
:
bool|arrayset flags
Details