Header
in package
MIME part header class
Tags
Table of Contents
Properties
- $indent : string
- Header wrap indent
- $name : string|null
- Header name
- $values : array<string|int, mixed>
- Header values
- $wrap : int
- Header wrap
Methods
- __construct() : mixed
- Constructor
- __toString() : string
- Render the header string
- addValue() : Header
- Add a header value
- addValues() : Header
- Add header values
- getIndent() : string
- Get the header wrap indent
- getName() : string
- Get the header name
- getValue() : Value|null
- Get a header value object
- getValueAsString() : string|null
- Get a header value as a string
- getValueIndex() : bool
- Get index of header value
- getValues() : array<string|int, mixed>
- Get the header values
- getValuesAsStrings() : string|array<string|int, mixed>
- Get the header values as strings
- getWrap() : int
- Get the header wrap
- hasIndent() : bool
- Has header wrap indent
- hasValue() : bool
- Determine if the header has a value
- hasValueAtIndex() : bool
- Determine if the header has a value at index
- hasWrap() : bool
- Has header wrap
- isAttachment() : bool
- Is the header for an attachment
- parse() : Header
- Parse header
- render() : string
- Render the header string
- setIndent() : Header
- Set the header wrap indent
- setName() : Header
- Set the header name
- setWrap() : Header
- Set the header wrap
Properties
$indent
Header wrap indent
protected
string
$indent
= "\t"
$name
Header name
protected
string|null
$name
= null
$values
Header values
protected
array<string|int, mixed>
$values
= []
$wrap
Header wrap
protected
int
$wrap
= 0
Methods
__construct()
Constructor
public
__construct(string $name[, mixed $value = null ]) : mixed
Instantiate the header object
Parameters
- $name : string
- $value : mixed = null
__toString()
Render the header string
public
__toString() : string
Return values
stringaddValue()
Add a header value
public
addValue(Value|string $value[, string|null $scheme = null ][, array<string|int, mixed> $parameters = [] ]) : Header
Parameters
- $value : Value|string
- $scheme : string|null = null
- $parameters : array<string|int, mixed> = []
Return values
HeaderaddValues()
Add header values
public
addValues(array<string|int, mixed> $values) : Header
Parameters
- $values : array<string|int, mixed>
Return values
HeadergetIndent()
Get the header wrap indent
public
getIndent() : string
Return values
stringgetName()
Get the header name
public
getName() : string
Return values
stringgetValue()
Get a header value object
public
getValue([int $i = 0 ]) : Value|null
Parameters
- $i : int = 0
Return values
Value|nullgetValueAsString()
Get a header value as a string
public
getValueAsString([int $i = 0 ]) : string|null
Parameters
- $i : int = 0
Return values
string|nullgetValueIndex()
Get index of header value
public
getValueIndex(string $value) : bool
Parameters
- $value : string
Return values
boolgetValues()
Get the header values
public
getValues() : array<string|int, mixed>
Return values
array<string|int, mixed>getValuesAsStrings()
Get the header values as strings
public
getValuesAsStrings([string|null $delimiter = null ]) : string|array<string|int, mixed>
Parameters
- $delimiter : string|null = null
Return values
string|array<string|int, mixed>getWrap()
Get the header wrap
public
getWrap() : int
Return values
inthasIndent()
Has header wrap indent
public
hasIndent() : bool
Return values
boolhasValue()
Determine if the header has a value
public
hasValue(string $value) : bool
Parameters
- $value : string
Return values
boolhasValueAtIndex()
Determine if the header has a value at index
public
hasValueAtIndex(int $i) : bool
Parameters
- $i : int
Return values
boolhasWrap()
Has header wrap
public
hasWrap() : bool
Return values
boolisAttachment()
Is the header for an attachment
public
isAttachment() : bool
Return values
boolparse()
Parse header
public
static parse(string $header) : Header
Parameters
- $header : string
Return values
Headerrender()
Render the header string
public
render() : string
Return values
stringsetIndent()
Set the header wrap indent
public
setIndent(string $indent) : Header
Parameters
- $indent : string
Return values
HeadersetName()
Set the header name
public
setName(string $name) : Header
Parameters
- $name : string
Return values
HeadersetWrap()
Set the header wrap
public
setWrap(int $wrap) : Header
Parameters
- $wrap : int