Quittio next API

RenderOptions
in package

Read onlyYes
FinalYes

Per call options of a render run; unset values fall back to the configuration.

Table of Contents

Constants

ARRAY_VERSION  : int = 1
Version of the array format of toArray().

Properties

$country  : string|null
$formats  : array<string|int, mixed>
$locale  : string|null
$options  : array<string|int, mixed>
$presentation  : Presentation|null
$profile  : Profile|string|null
$template  : string|null
$validation  : string|null

Methods

__construct()  : mixed
fromArray()  : self
toArray()  : array{_version: int, formats: list, profile: ?string, template: ?string, locale: ?string, country: ?string, validation: ?string, presentation: ?array, options: array}
The options as array of scalars, e.g. for a queued job; fromArray() restores them.

Constants

ARRAY_VERSION

Version of the array format of toArray().

public int ARRAY_VERSION = 1

Properties

Methods

__construct()

public __construct([array<int, string> $formats = [] ][, Profile|string|null $profile = null ][, string|null $template = null ][, string|null $locale = null ][, string|null $country = null ][, string|null $validation = null ][, Presentation|null $presentation = null ][, array<string, mixed> $options = [] ]) : mixed
Parameters
$formats : array<int, string> = []

empty = configured or automatically chosen format

$profile : Profile|string|null = null
$template : string|null = null
$locale : string|null = null
$country : string|null = null
$validation : string|null = null
$presentation : Presentation|null = null
$options : array<string, mixed> = []

fromArray()

public static fromArray(array<string|int, mixed> $data) : self
Parameters
$data : array<string|int, mixed>

an array of toArray()

Tags
throws
InvalidArgumentException

for an unknown version or invalid values

Return values
self

toArray()

The options as array of scalars, e.g. for a queued job; fromArray() restores them.

public toArray() : array{_version: int, formats: list, profile: ?string, template: ?string, locale: ?string, country: ?string, validation: ?string, presentation: ?array, options: array}

A profile object is stored by its key, so it must be registered where the array is read.

Tags
throws
InvalidArgumentException

when an option is not a scalar, null or an array of them

Return values
array{_version: int, formats: list, profile: ?string, template: ?string, locale: ?string, country: ?string, validation: ?string, presentation: ?array, options: array}
On this page

Search results