Quittio next API

CallbackRule
in package
implements Rule

Read onlyYes
FinalYes

A rule defined by a closure. The closure receives the invoice and a reporter.

$fallback is the English message used when the message catalog has no entry.

Table of Contents

Interfaces

Rule
A business or plausibility rule checked in PHP (levels L1 to L3 and L7).

Methods

__construct()  : mixed
check()  : iterable<string|int, ValidationMessage>
code()  : string
Official rule code (e.g. BR-CO-25, BR-DE-1) or a package code (QUITTIO-…).
fallbackMessage()  : string
l3()  : self
l7()  : self
level()  : ValidationLevel
namespace()  : string

Methods

code()

Official rule code (e.g. BR-CO-25, BR-DE-1) or a package code (QUITTIO-…).

public code() : string
Return values
string

fallbackMessage()

public fallbackMessage() : string
Return values
string

l3()

public static l3(string $code, string $fallback, callable(InvoiceData, RuleReporter): void $check[, string $namespace = 'quittio' ]) : self
Parameters
$code : string
$fallback : string
$check : callable(InvoiceData, RuleReporter): void
$namespace : string = 'quittio'
Return values
self

l7()

public static l7(string $code, string $fallback, callable(InvoiceData, RuleReporter): void $check[, string $namespace = 'quittio' ]) : self
Parameters
$code : string
$fallback : string
$check : callable(InvoiceData, RuleReporter): void
$namespace : string = 'quittio'
Return values
self

namespace()

public namespace() : string
Return values
string
On this page

Search results