Value
in package
MIME part header value class
Tags
Table of Contents
Properties
- $delimiter : string
- Header value delimiter
- $forceQuote : bool
- Force quotes for parameter values
- $parameters : array<string|int, mixed>
- Header value parameters
- $scheme : string|null
- Header value scheme
- $value : string|null
- Header value
Methods
- __construct() : mixed
- Constructor
- __toString() : string
- Render the header value string
- addParameter() : Value
- Set a header value parameter
- addParameters() : Value
- Add the header value parameters
- getDelimiter() : string
- Get the header value delimiter
- getParameter() : string|null
- Get a header value parameter
- getParameters() : array<string|int, mixed>
- Get the header value parameters
- getParametersAsString() : string
- Get the header value parameters as string
- getScheme() : string|null
- Get the header value scheme
- getValue() : string|null
- Get the header value
- hasDelimiter() : bool
- Has a header value delimiter
- hasParameter() : bool
- Has a header value parameter
- hasParameters() : bool
- Has header value parameters
- hasScheme() : bool
- Has a header value scheme
- isForceQuote() : bool
- Is set to force quote
- parse() : Value
- Parse header value
- parseParameter() : array<string|int, mixed>
- Parse a parameter value
- render() : string
- Render the header value string
- setDelimiter() : Value
- Set the header value delimiter
- setForceQuote() : Value
- Set the header value delimiter
- setScheme() : Value
- Set the header value scheme
- setValue() : Value
- Set the header value
Properties
$delimiter
Header value delimiter
protected
string
$delimiter
= ';'
$forceQuote
Force quotes for parameter values
protected
bool
$forceQuote
= false
$parameters
Header value parameters
protected
array<string|int, mixed>
$parameters
= []
$scheme
Header value scheme
protected
string|null
$scheme
= null
$value
Header value
protected
string|null
$value
= null
Methods
__construct()
Constructor
public
__construct([string|null $value = null ][, string|null $scheme = null ][, array<string|int, mixed> $parameters = [] ][, bool $forceQuote = false ]) : mixed
Instantiate the header value object
Parameters
- $value : string|null = null
- $scheme : string|null = null
- $parameters : array<string|int, mixed> = []
- $forceQuote : bool = false
__toString()
Render the header value string
public
__toString() : string
Return values
stringaddParameter()
Set a header value parameter
public
addParameter(string $name, string $value) : Value
Parameters
- $name : string
- $value : string
Return values
ValueaddParameters()
Add the header value parameters
public
addParameters(array<string|int, mixed> $parameters) : Value
Parameters
- $parameters : array<string|int, mixed>
Return values
ValuegetDelimiter()
Get the header value delimiter
public
getDelimiter() : string
Return values
stringgetParameter()
Get a header value parameter
public
getParameter(string $name) : string|null
Parameters
- $name : string
Return values
string|nullgetParameters()
Get the header value parameters
public
getParameters() : array<string|int, mixed>
Return values
array<string|int, mixed>getParametersAsString()
Get the header value parameters as string
public
getParametersAsString() : string
Tags
Return values
stringgetScheme()
Get the header value scheme
public
getScheme() : string|null
Return values
string|nullgetValue()
Get the header value
public
getValue() : string|null
Return values
string|nullhasDelimiter()
Has a header value delimiter
public
hasDelimiter() : bool
Return values
boolhasParameter()
Has a header value parameter
public
hasParameter(string $name) : bool
Parameters
- $name : string
Return values
boolhasParameters()
Has header value parameters
public
hasParameters() : bool
Return values
boolhasScheme()
Has a header value scheme
public
hasScheme() : bool
Return values
boolisForceQuote()
Is set to force quote
public
isForceQuote() : bool
Return values
boolparse()
Parse header value
public
static parse(string $value) : Value
Parameters
- $value : string
Return values
ValueparseParameter()
Parse a parameter value
public
static parseParameter(string $parameter) : array<string|int, mixed>
Parameters
- $parameter : string
Return values
array<string|int, mixed>render()
Render the header value string
public
render() : string
Tags
Return values
stringsetDelimiter()
Set the header value delimiter
public
setDelimiter(string $delimiter) : Value
Parameters
- $delimiter : string
Return values
ValuesetForceQuote()
Set the header value delimiter
public
setForceQuote([bool $forceQuote = false ]) : Value
Parameters
- $forceQuote : bool = false
Return values
ValuesetScheme()
Set the header value scheme
public
setScheme(string $scheme) : Value
Parameters
- $scheme : string
Return values
ValuesetValue()
Set the header value
public
setValue(string $value) : Value
Parameters
- $value : string