PHP 클래스 PhpMimeMailParser\Attachment

Fully Tested Mailparse Extension Wrapper for PHP 5.4+
파일 보기 프로젝트 열기: exorus/php-mime-mail-parser

보호된 프로퍼티들

프로퍼티 타입 설명
$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