Body
in package
MIME part body class
Tags
Table of Contents
Constants
Properties
- $content : string|null
- Content
- $encoding : string|null
- Encoding
- $isEncoded : bool
- Is encoded flag
- $isFile : bool
- Is file flag
- $split : int|bool|null
- Chunk split
Methods
- __construct() : mixed
- Constructor
- __toString() : string
- Render the body
- getContent() : string
- Get the body content
- getEncoding() : string|null
- 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|null
$content
= null
$encoding
Encoding
protected
string|null
$encoding
= null
$isEncoded
Is encoded flag
protected
bool
$isEncoded
= false
$isFile
Is file flag
protected
bool
$isFile
= false
$split
Chunk split
protected
int|bool|null
$split
= null
Methods
__construct()
Constructor
public
__construct([string|null $content = null ][, string|null $encoding = null ][, int|bool|null $split = null ]) : mixed
Instantiate the body object
Parameters
- $content : string|null = null
- $encoding : string|null = null
- $split : int|bool|null = null
__toString()
Render the body
public
__toString() : string
Return values
stringgetContent()
Get the body content
public
getContent() : string
Return values
stringgetEncoding()
Get the encoding
public
getEncoding() : string|null
Return values
string|nullgetSplit()
Get the split
public
getSplit() : int|bool
Return values
int|boolhasContent()
Has body content
public
hasContent() : bool
Return values
boolhasEncoding()
Has encoding
public
hasEncoding() : bool
Return values
boolhasSplit()
Has split
public
hasSplit() : bool
Return values
boolisBase64Encoding()
Is encoding base64
public
isBase64Encoding() : bool
Return values
boolisEncoded()
Is encoded
public
isEncoded() : bool
Return values
boolisFile()
Is file
public
isFile() : bool
Return values
boolisQuotedEncoding()
Is encoding quoted-printable
public
isQuotedEncoding() : bool
Return values
boolisRawUrlEncoding()
Is encoding raw URL
public
isRawUrlEncoding() : bool
Return values
boolisUrlEncoding()
Is encoding URL
public
isUrlEncoding() : bool
Return values
boolrender()
Render the body
public
render() : string
Return values
stringsetAsEncoded()
Set as encoded
public
setAsEncoded(bool $isEncoded) : Body
Parameters
- $isEncoded : bool
Return values
BodysetAsFile()
Set as file
public
setAsFile(bool $isFile) : Body
Parameters
- $isFile : bool
Return values
BodysetContent()
Set the body content
public
setContent(string $content) : Body
Parameters
- $content : string
Return values
BodysetContentFromFile()
Set the body content from file
public
setContentFromFile(string $file[, string|null $encoding = null ][, int|bool|null $split = null ]) : Body
Parameters
- $file : string
- $encoding : string|null = null
- $split : int|bool|null = null
Tags
Return values
BodysetEncoding()
Set the encoding
public
setEncoding(string $encoding) : Body
Parameters
- $encoding : string
Return values
BodysetSplit()
Set the split
public
setSplit(int|bool $split) : Body
Parameters
- $split : int|bool