PHP Класс PHPDaemon\Clients\IMAP\Connection

Наследование: extends PHPDaemon\Network\ClientConnection
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$EOL
$blob
$blobOctetsLeft
$lines
$searchFlags array IMAP flags to search criteria
$state

Открытые методы

Метод Описание
auth ( $cb, $login, $password )
countMessages ( $cb, null $flags = null ) Count messages all messages in current box
createFolder ( $cb, string $folder, $parentFolder = null ) : boolean create a new folder (and parent folders if needed)
getRawContent ( $cb, $uid, $byUid = true ) * Get raw content of message or part
getRawHeader ( $cb, $uid, $byUid = true ) * Get raw header of message or part
getRawMessage ( $cb, integer $uid, $byUid = true ) Fetch a message
getSize ( $cb, integer $uid = null ) get a list of messages with number and size
getUniqueId ( $cb, integer | null $id = null ) get unique id for one or all messages
listFolders ( $cb, string $reference = '', string $mailbox = '*' )
logout ( $cb = null ) logout of imap server
onFinish ( )
onRead ( )
onReady ( )
removeFolder ( $cb, $folder ) remove a folder
removeMessage ( $cb, integer $uid ) Remove a message from server.
renameFolder ( $cb, string $oldName, string $newName ) rename and/or move folder
selectBox ( $cb, string $box = 'INBOX' )

Защищенные методы

Метод Описание
decodeCount ( array $lines )
decodeGetUniqueId ( array $lines )
decodeLine ( string $line ) : array split a given line in tokens. a token is literal of any form or a list
decodeList ( array $lines )
decodeSize ( $lines ) *
escapeList ( array $list ) : string escape a list with literals or lists
escapeString ( $string ) : string escape a single literal
expunge ( string $tag = self::TAG_EXPUNGE )
fetch ( array $items, string $from, string $to = null, boolean $uid = false, string $tag = self::TAG_FETCH )
onCommand ( string $tag, string $type, string $line, array $lines, string $blob )
searchMessages ( array $params, string $tag = self::TAG_SEARCH )
startsWith ( string $haystack, string $needle )
store ( array $flags, string $from, string $to = null, string $mode = null, boolean $silent = true, string $tag = self::TAG_STORE )

Описание методов

auth() публичный Метод

public auth ( $cb, $login, $password )

countMessages() публичный Метод

Count messages all messages in current box
public countMessages ( $cb, null $flags = null )
$flags null

createFolder() публичный Метод

create a new folder (and parent folders if needed)
public createFolder ( $cb, string $folder, $parentFolder = null ) : boolean
$folder string folder name
Результат boolean success

decodeCount() защищенный Метод

protected decodeCount ( array $lines )
$lines array

decodeGetUniqueId() защищенный Метод

protected decodeGetUniqueId ( array $lines )
$lines array

decodeLine() защищенный Метод

split a given line in tokens. a token is literal of any form or a list
protected decodeLine ( string $line ) : array
$line string line to decode
Результат array tokens, literals are returned as string, lists as array

decodeList() защищенный Метод

protected decodeList ( array $lines )
$lines array

decodeSize() защищенный Метод

*
protected decodeSize ( $lines )
$lines

escapeList() защищенный Метод

escape a list with literals or lists
protected escapeList ( array $list ) : string
$list array list with literals or lists as PHP array
Результат string escaped list for imap

escapeString() защищенный Метод

escape a single literal
protected escapeString ( $string ) : string
$string
Результат string escaped list for imap

expunge() защищенный Метод

protected expunge ( string $tag = self::TAG_EXPUNGE )
$tag string

fetch() защищенный Метод

protected fetch ( array $items, string $from, string $to = null, boolean $uid = false, string $tag = self::TAG_FETCH )
$items array
$from string
$to string
$uid boolean
$tag string

getRawContent() публичный Метод

* Get raw content of message or part
public getRawContent ( $cb, $uid, $byUid = true )
$uid number of message

getRawHeader() публичный Метод

* Get raw header of message or part
public getRawHeader ( $cb, $uid, $byUid = true )
$uid unique number of message

getRawMessage() публичный Метод

Fetch a message
public getRawMessage ( $cb, integer $uid, $byUid = true )
$uid integer unique number of message

getSize() публичный Метод

get a list of messages with number and size
public getSize ( $cb, integer $uid = null )
$uid integer number of message

getUniqueId() публичный Метод

get unique id for one or all messages
public getUniqueId ( $cb, integer | null $id = null )
$id integer | null message number

listFolders() публичный Метод

public listFolders ( $cb, string $reference = '', string $mailbox = '*' )
$reference string
$mailbox string

logout() публичный Метод

logout of imap server
public logout ( $cb = null )

onCommand() защищенный Метод

protected onCommand ( string $tag, string $type, string $line, array $lines, string $blob )
$tag string response tag
$type string OK, NO, BAD
$line string last response line
$lines array full response
$blob string

onFinish() публичный Метод

public onFinish ( )

onRead() публичный Метод

public onRead ( )

onReady() публичный Метод

public onReady ( )

removeFolder() публичный Метод

remove a folder
public removeFolder ( $cb, $folder )

removeMessage() публичный Метод

Remove a message from server.
public removeMessage ( $cb, integer $uid )
$uid integer unique number of message

renameFolder() публичный Метод

rename and/or move folder
public renameFolder ( $cb, string $oldName, string $newName )
$oldName string name or instance of folder
$newName string new global name of folder

searchMessages() защищенный Метод

protected searchMessages ( array $params, string $tag = self::TAG_SEARCH )
$params array
$tag string

selectBox() публичный Метод

public selectBox ( $cb, string $box = 'INBOX' )
$box string

startsWith() защищенный Метод

protected startsWith ( string $haystack, string $needle )
$haystack string
$needle string

store() защищенный Метод

protected store ( array $flags, string $from, string $to = null, string $mode = null, boolean $silent = true, string $tag = self::TAG_STORE )
$flags array
$from string
$to string
$mode string (+/-)
$silent boolean
$tag string

Описание свойств

$EOL защищенное свойство

protected $EOL

$blob защищенное свойство

protected $blob

$blobOctetsLeft защищенное свойство

protected $blobOctetsLeft

$lines защищенное свойство

protected $lines

$searchFlags защищенное свойство

IMAP flags to search criteria
protected array $searchFlags
Результат array

$state защищенное свойство

protected $state