PHP Класс PhpMimeMailParser\Attachment

Fully Tested Mailparse Extension Wrapper for PHP 5.4+
Показать файл Открыть проект

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

Свойство Тип Описание
$content string File Content
$contentDisposition string Content-Disposition (attachment or inline)
$contentId string Content-ID
$contentType string Mime Type
$filename string Filename
$headers array An Array of the attachment headers
$mimePartStr string
$stream resource

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

Метод Описание
__construct ( string $filename, string $contentType, resource $stream, string $contentDisposition = 'attachment', string $contentId = '', array $headers = [], string $mimePartStr = '' ) Attachment constructor.
getContent ( ) : string Retrieve the file content in one go Once you retrieve the content you cannot use MimeMailParser_attachment::read()
getContentDisposition ( ) : string Retrieve the Attachment Content-Disposition
getContentID ( ) : string Retrieve the Attachment Content-ID
getContentType ( ) : string Retrieve the Attachment Content-Type
getFilename ( ) : string retrieve the attachment filename
getHeaders ( ) : array Retrieve the Attachment Headers
getMimePartStr ( ) : string Get mime part string for this attachment
getStream ( ) : stream Get a handle to the stream
read ( integer $bytes = 2082 ) : string | boolean Read the contents a few bytes at a time until completed Once read to completion, it always returns false

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

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

Attachment constructor.
public __construct ( string $filename, string $contentType, resource $stream, string $contentDisposition = 'attachment', string $contentId = '', array $headers = [], string $mimePartStr = '' )
$filename string
$contentType string
$stream resource
$contentDisposition string
$contentId string
$headers array
$mimePartStr string

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

Retrieve the file content in one go Once you retrieve the content you cannot use MimeMailParser_attachment::read()
public getContent ( ) : string
Результат string

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

Retrieve the Attachment Content-Disposition
public getContentDisposition ( ) : string
Результат string

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

Retrieve the Attachment Content-ID
public getContentID ( ) : string
Результат string

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

Retrieve the Attachment Content-Type
public getContentType ( ) : string
Результат string

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

retrieve the attachment filename
public getFilename ( ) : string
Результат string

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

Retrieve the Attachment Headers
public getHeaders ( ) : array
Результат array

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

Get mime part string for this attachment
public getMimePartStr ( ) : string
Результат string

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

Get a handle to the stream
public getStream ( ) : stream
Результат stream

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

Read the contents a few bytes at a time until completed Once read to completion, it always returns false
public read ( integer $bytes = 2082 ) : string | boolean
$bytes integer (default: 2082)
Результат string | boolean

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

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

File Content
protected string $content
Результат string

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

Content-Disposition (attachment or inline)
protected string $contentDisposition
Результат string

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

Content-ID
protected string $contentId
Результат string

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

Mime Type
protected string $contentType
Результат string

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

Filename
protected string $filename
Результат string

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

An Array of the attachment headers
protected array $headers
Результат array

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

protected string $mimePartStr
Результат string

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

protected resource $stream
Результат resource