class ContentDisposition implements Arrayable, JsonSerializable (View source)

Methods

__construct(ContentDispositionType $type, array $parameters = [])

Constructor.

static ContentDisposition|null
parse(array $tokens)

Parse the disposition from tokens.

ContentDispositionType
type()

Get the disposition type.

array
parameters()

Get the disposition parameters.

string|null
parameter(string $name)

Get a specific parameter value.

string|null
filename()

Get the filename parameter.

bool
isAttachment()

Determine if this is an attachment disposition.

bool
isInline()

Determine if this is an inline disposition.

array
toArray()

Get the array representation.

array
jsonSerialize()

Get the JSON representation.

Details

__construct(ContentDispositionType $type, array $parameters = [])

Constructor.

Parameters

ContentDispositionType $type
array $parameters

static ContentDisposition|null parse(array $tokens)

Parse the disposition from tokens.

Parameters

array $tokens

Return Value

ContentDisposition|null

ContentDispositionType type()

Get the disposition type.

Return Value

ContentDispositionType

array parameters()

Get the disposition parameters.

Return Value

array

string|null parameter(string $name)

Get a specific parameter value.

Parameters

string $name

Return Value

string|null

string|null filename()

Get the filename parameter.

Return Value

string|null

bool isAttachment()

Determine if this is an attachment disposition.

Return Value

bool

bool isInline()

Determine if this is an inline disposition.

Return Value

bool

array toArray()

Get the array representation.

Return Value

array

array jsonSerialize()

Get the JSON representation.

Return Value

array