Documentation

Body
in package

MIME part body class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

Copyright (c) 2009-2021 NOLA Interactive, LLC. (http://www.nolainteractive.com)

license

http://www.popphp.org/license New BSD License

version
1.1.0

Table of Contents

BASE64  = 'BASE64'
Encoding constants
QUOTED  = 'QUOTED'
RAW_URL  = 'RAW_URL'
URL  = 'URL'
$content  : string
Content
$encoding  : string
Encoding
$isEncoded  : bool
Is encoded flag
$isFile  : bool
Is file flag
$split  : int|bool
Chunk split
__construct()  : mixed
Constructor
__toString()  : string
Render the body
getContent()  : string
Get the body content
getEncoding()  : string
Get the encoding
getSplit()  : int|bool
Get the split
hasContent()  : bool
Has body content
hasEncoding()  : bool
Has encoding
hasSplit()  : bool
Has split
isBase64Encoding()  : bool
Is encoding base64
isEncoded()  : bool
Is encoded
isFile()  : bool
Is file
isQuotedEncoding()  : bool
Is encoding quoted-printable
isRawUrlEncoding()  : bool
Is encoding raw URL
isUrlEncoding()  : bool
Is encoding URL
render()  : string
Render the body
setAsEncoded()  : Body
Set as encoded
setAsFile()  : Body
Set as file
setContent()  : Body
Set the body content
setContentFromFile()  : Body
Set the body content from file
setEncoding()  : Body
Set the encoding
setSplit()  : Body
Set the split

Constants

BASE64

Encoding constants

public string BASE64 = 'BASE64'

QUOTED

public mixed QUOTED = 'QUOTED'

RAW_URL

public mixed RAW_URL = 'RAW_URL'

URL

public mixed URL = 'URL'

Properties

$content

Content

protected string $content = null

$encoding

Encoding

protected string $encoding = null

$isEncoded

Is encoded flag

protected bool $isEncoded = false

$isFile

Is file flag

protected bool $isFile = false

$split

Chunk split

protected int|bool $split = null

Methods

__construct()

Constructor

public __construct([string $content = null ][, string $encoding = null ][, int $split = null ]) : mixed

Instantiate the body object

Parameters
$content : string = null
$encoding : string = null
$split : int = null
Return values
mixed

__toString()

Render the body

public __toString() : string
Return values
string

getContent()

Get the body content

public getContent() : string
Return values
string

getEncoding()

Get the encoding

public getEncoding() : string
Return values
string

getSplit()

Get the split

public getSplit() : int|bool
Return values
int|bool

hasContent()

Has body content

public hasContent() : bool
Return values
bool

hasEncoding()

Has encoding

public hasEncoding() : bool
Return values
bool

hasSplit()

Has split

public hasSplit() : bool
Return values
bool

isBase64Encoding()

Is encoding base64

public isBase64Encoding() : bool
Return values
bool

isEncoded()

Is encoded

public isEncoded() : bool
Return values
bool

isFile()

Is file

public isFile() : bool
Return values
bool

isQuotedEncoding()

Is encoding quoted-printable

public isQuotedEncoding() : bool
Return values
bool

isRawUrlEncoding()

Is encoding raw URL

public isRawUrlEncoding() : bool
Return values
bool

isUrlEncoding()

Is encoding URL

public isUrlEncoding() : bool
Return values
bool

render()

Render the body

public render() : string
Return values
string

setAsEncoded()

Set as encoded

public setAsEncoded(bool $isEncoded) : Body
Parameters
$isEncoded : bool
Return values
Body

setAsFile()

Set as file

public setAsFile(bool $isFile) : Body
Parameters
$isFile : bool
Return values
Body

setContent()

Set the body content

public setContent(string $content) : Body
Parameters
$content : string
Return values
Body

setContentFromFile()

Set the body content from file

public setContentFromFile(string $file[, string $encoding = null ][, string $split = null ]) : Body
Parameters
$file : string
$encoding : string = null
$split : string = null
Tags
throws
Exception
Return values
Body

setEncoding()

Set the encoding

public setEncoding(string $encoding) : Body
Parameters
$encoding : string
Return values
Body

setSplit()

Set the split

public setSplit(int|bool $split) : Body
Parameters
$split : int|bool
Return values
Body

Search results