PHP Класс ezcMailFileParser

Наследование: extends ezcMailPartParser
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$fileClass string Change this to your own file class with: $parser = new ezcMailParser(); $parser->options->fileClass = 'myCustomFileClass'; call $parser->parseMail( $set ); where myCustomFileClass extends ezcMailFile.

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

Метод Описание
__construct ( string $mainType, string $subType, ezcMailHeadersHolder $headers ) Constructs a new ezcMailFileParser with maintype $mainType subtype $subType and headers $headers.
__destruct ( ) Destructs the parser object.
finish ( ) : ezcMailFile Return the result of the parsed file part.
parseBody ( string $line ) Parse the body of a message line by line.

Приватные методы

Метод Описание
appendStreamFilters ( string $line ) Sets the correct stream filters for the attachment.
openFile ( string $fileName ) : resource Returns the filepointer of the opened file $fileName in a unique directory.

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

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

Constructs a new ezcMailFileParser with maintype $mainType subtype $subType and headers $headers.
public __construct ( string $mainType, string $subType, ezcMailHeadersHolder $headers )
$mainType string
$subType string
$headers ezcMailHeadersHolder

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

Closes and removes any open file.
public __destruct ( )

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

This method is called automatically by the parent part.
public finish ( ) : ezcMailFile
Результат ezcMailFile

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

This method is called by the parent part on a push basis. When there are no more lines the parent part will call finish() to retrieve the mailPart. The file will be decoded and saved to the given temporary directory within a directory based on the process ID and the time.
public parseBody ( string $line )
$line string

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

$fileClass публичное статическое свойство

Change this to your own file class with: $parser = new ezcMailParser(); $parser->options->fileClass = 'myCustomFileClass'; call $parser->parseMail( $set ); where myCustomFileClass extends ezcMailFile.
public static string $fileClass
Результат string