PHP Class PhpMimeMailParser\Attachment

Fully Tested Mailparse Extension Wrapper for PHP 5.4+
Afficher le fichier Open project: exorus/php-mime-mail-parser

Protected Properties

Свойство Type Description
$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

Méthodes publiques

Méthode Description
__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

Method Details

__construct() public méthode

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() public méthode

Retrieve the file content in one go Once you retrieve the content you cannot use MimeMailParser_attachment::read()
public getContent ( ) : string
Résultat string

getContentDisposition() public méthode

Retrieve the Attachment Content-Disposition
public getContentDisposition ( ) : string
Résultat string

getContentID() public méthode

Retrieve the Attachment Content-ID
public getContentID ( ) : string
Résultat string

getContentType() public méthode

Retrieve the Attachment Content-Type
public getContentType ( ) : string
Résultat string

getFilename() public méthode

retrieve the attachment filename
public getFilename ( ) : string
Résultat string

getHeaders() public méthode

Retrieve the Attachment Headers
public getHeaders ( ) : array
Résultat array

getMimePartStr() public méthode

Get mime part string for this attachment
public getMimePartStr ( ) : string
Résultat string

getStream() public méthode

Get a handle to the stream
public getStream ( ) : stream
Résultat stream

read() public méthode

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)
Résultat string | boolean

Property Details

$content protected_oe property

File Content
protected string $content
Résultat string

$contentDisposition protected_oe property

Content-Disposition (attachment or inline)
protected string $contentDisposition
Résultat string

$contentId protected_oe property

Content-ID
protected string $contentId
Résultat string

$contentType protected_oe property

Mime Type
protected string $contentType
Résultat string

$filename protected_oe property

Filename
protected string $filename
Résultat string

$headers protected_oe property

An Array of the attachment headers
protected array $headers
Résultat array

$mimePartStr protected_oe property

protected string $mimePartStr
Résultat string

$stream protected_oe property

protected resource $stream
Résultat resource