Constants

BASE64

BASE64 = 'BASE64' : string

Encoding constants

QUOTED

QUOTED = 'QUOTED'

URL

URL = 'URL'

RAW_URL

RAW_URL = 'RAW_URL'

Properties

$content

$content : string

Content

Type

string

$encoding

$encoding : string

Encoding

Type

string

$split

$split : integer|boolean

Chunk split

Type

integer|boolean

$isFile

$isFile : boolean

Is file flag

Type

boolean

$isEncoded

$isEncoded : boolean

Is encoded flag

Type

boolean

Methods

__construct()

__construct(string  $content = null, string  $encoding = null, integer  $split = null) 

Constructor

Instantiate the body object

Parameters

string $content
string $encoding
integer $split

setContent()

setContent(string  $content) : \Pop\Mime\Part\Body

Set the body content

Parameters

string $content

Returns

\Pop\Mime\Part\Body

setContentFromFile()

setContentFromFile(string  $file, string  $encoding = null, string  $split = null) : \Pop\Mime\Part\Body

Set the body content from file

Parameters

string $file
string $encoding
string $split

Throws

\Pop\Mime\Part\Exception

Returns

\Pop\Mime\Part\Body

getContent()

getContent() : string

Get the body content

Returns

string

hasContent()

hasContent() : boolean

Has body content

Returns

boolean

setEncoding()

setEncoding(string  $encoding) : \Pop\Mime\Part\Body

Set the encoding

Parameters

string $encoding

Returns

\Pop\Mime\Part\Body

getEncoding()

getEncoding() : string

Get the encoding

Returns

string

hasEncoding()

hasEncoding() : boolean

Has encoding

Returns

boolean

isBase64Encoding()

isBase64Encoding() : boolean

Is encoding base64

Returns

boolean

isQuotedEncoding()

isQuotedEncoding() : boolean

Is encoding quoted-printable

Returns

boolean

isUrlEncoding()

isUrlEncoding() : boolean

Is encoding URL

Returns

boolean

isRawUrlEncoding()

isRawUrlEncoding() : boolean

Is encoding raw URL

Returns

boolean

setSplit()

setSplit(integer|boolean  $split) : \Pop\Mime\Part\Body

Set the split

Parameters

integer|boolean $split

Returns

\Pop\Mime\Part\Body

getSplit()

getSplit() : integer|boolean

Get the split

Returns

integer|boolean

hasSplit()

hasSplit() : boolean

Has split

Returns

boolean

setAsFile()

setAsFile(boolean  $isFile) : \Pop\Mime\Part\Body

Set as file

Parameters

boolean $isFile

Returns

\Pop\Mime\Part\Body

isFile()

isFile() : boolean

Is file

Returns

boolean

setAsEncoded()

setAsEncoded(boolean  $isEncoded) : \Pop\Mime\Part\Body

Set as encoded

Parameters

boolean $isEncoded

Returns

\Pop\Mime\Part\Body

isEncoded()

isEncoded() : boolean

Is encoded

Returns

boolean

render()

render() : string

Render the body

Returns

string

__toString()

__toString() : string

Render the body

Returns

string