Quittio 0.3 API

ValidationContext
in package

Read onlyYes
FinalYes

Information available to rules while validating an invoice.

Table of Contents

Properties

$countryPacks  : array<string|int, mixed>
$locale  : string
$messageLocale  : string|null
$options  : array<string|int, mixed>
$profile  : Profile
$translator  : Translator|null

Methods

__construct()  : mixed
hasCountry()  : bool
intOption()  : int
leadingCountry()  : string|null
messageLocale()  : string
Language of the messages: the configured one (validation.locale), otherwise the language of the run. Rules that check texts of the invoice use $locale instead.
option()  : mixed
profileIs()  : bool
translator()  : Translator

Properties

Methods

__construct()

public __construct(Profile $profile[, array<int, CountryPack> $countryPacks = [] ][, string $locale = 'en' ][, Translator|null $translator = null ][, array<string, mixed> $options = [] ][, string|null $messageLocale = null ]) : mixed
Parameters
$profile : Profile
$countryPacks : array<int, CountryPack> = []

leading pack first

$locale : string = 'en'
$translator : Translator|null = null
$options : array<string, mixed> = []

e.g. attachment_max_bytes, attachments_max_total_bytes

$messageLocale : string|null = null

hasCountry()

public hasCountry(string $code) : bool
Parameters
$code : string
Return values
bool

intOption()

public intOption(string $key, int $default) : int
Parameters
$key : string
$default : int
Return values
int

leadingCountry()

public leadingCountry() : string|null
Return values
string|null

messageLocale()

Language of the messages: the configured one (validation.locale), otherwise the language of the run. Rules that check texts of the invoice use $locale instead.

public messageLocale() : string
Return values
string

option()

public option(string $key[, mixed $default = null ]) : mixed
Parameters
$key : string
$default : mixed = null

profileIs()

public profileIs(string ...$keys) : bool
Parameters
$keys : string
Return values
bool
On this page

Search results