PendingInvoice
in package
uses
Macroable
Fluent render call: Quittio::make($data)->profile()->format()->locale()->render().
Table of Contents
Properties
- $data : InvoiceData
- $macros : array<string, callable>
- $quittio : Quittio
Methods
- __call() : mixed
- __construct() : mixed
- check() : ValidationResult
- Validates without rendering a PDF (XML levels run if the format writes or embeds XML).
- country() : static
- Leading country pack of this call (ISO 3166-1 alpha-2), instead of the seller's country.
- data() : InvoiceData
- The invoice data of this call, as passed (not calculated).
- flushMacros() : void
- format() : static
- Output format of this call, e.g. "zugferd", "xrechnung-cii", "pdf"; replaces earlier formats.
- formats() : static
- Several formats from one calculation, e.g. ['zugferd', 'xrechnung-cii'].
- hasMacro() : bool
- locale() : static
- Locale of this call; wins over the invoice locale and the configuration.
- macro() : void
- option() : static
- Output option of this call, e.g. option('fold_marks', false); see the output configuration.
- options() : RenderOptions
- The options collected so far, as passed to the render run.
- prepare() : PreparedInvoice
- Calculates and validates without rendering, whatever the validation mode; see {@see PreparedInvoice} and {@see Quittio::prepare()}.
- presentation() : static
- Presentation defaults (design, texts) for this call; the invoice's own values win.
- profile() : static
- Profile of the XML for this call, as key, alias or Profile object, e.g. "xrechnung"; the format must support it. Wins over the configured profile.
- render() : RenderedInvoice
- Renders the formats of this call; the result is the first format, the others are reachable with as(). See Quittio::render().
- template() : static
- Template of this call (a shipped or a configured template); wins over the invoice presentation and the configuration.
- validate() : static
- Switches validation on (errors throw) or to warnings only.
- withoutValidation() : static
- Validation mode "off" for this call: nothing is validated, no ValidationException.
Properties
$data read-only
protected
InvoiceData
$data
$macros
protected
static array<string, callable>
$macros
= []
$quittio read-only
protected
Quittio
$quittio
Methods
__call()
public
__call(string $method, array<string|int, mixed> $parameters) : mixed
Parameters
- $method : string
- $parameters : array<string|int, mixed>
__construct()
public
final __construct(Quittio $quittio, InvoiceData $data) : mixed
Parameters
- $quittio : Quittio
- $data : InvoiceData
check()
Validates without rendering a PDF (XML levels run if the format writes or embeds XML).
public
check() : ValidationResult
An explicit validation request: validate() and withoutValidation() do not apply, the result is returned and never thrown; see Quittio::prepare().
Return values
ValidationResultcountry()
Leading country pack of this call (ISO 3166-1 alpha-2), instead of the seller's country.
public
country(string $country) : static
Parameters
- $country : string
Return values
staticdata()
The invoice data of this call, as passed (not calculated).
public
data() : InvoiceData
Return values
InvoiceDataflushMacros()
public
static flushMacros() : void
format()
Output format of this call, e.g. "zugferd", "xrechnung-cii", "pdf"; replaces earlier formats.
public
format(string $format) : static
Parameters
- $format : string
Return values
staticformats()
Several formats from one calculation, e.g. ['zugferd', 'xrechnung-cii'].
public
formats(array<int, string> $formats) : static
Parameters
- $formats : array<int, string>
Return values
statichasMacro()
public
static hasMacro(string $name) : bool
Parameters
- $name : string
Return values
boollocale()
Locale of this call; wins over the invoice locale and the configuration.
public
locale(string $locale) : static
Parameters
- $locale : string
Return values
staticmacro()
public
static macro(string $name, callable $macro) : void
Parameters
- $name : string
- $macro : callable
Tags
option()
Output option of this call, e.g. option('fold_marks', false); see the output configuration.
public
option(string $key, mixed $value) : static
Parameters
- $key : string
- $value : mixed
Return values
staticoptions()
The options collected so far, as passed to the render run.
public
options() : RenderOptions
Return values
RenderOptionsprepare()
Calculates and validates without rendering, whatever the validation mode; see {@see PreparedInvoice} and {@see Quittio::prepare()}.
public
prepare() : PreparedInvoice
Return values
PreparedInvoicepresentation()
Presentation defaults (design, texts) for this call; the invoice's own values win.
public
presentation(Presentation $presentation) : static
Parameters
- $presentation : Presentation
Return values
staticprofile()
Profile of the XML for this call, as key, alias or Profile object, e.g. "xrechnung"; the format must support it. Wins over the configured profile.
public
profile(Profile|string $profile) : static
Parameters
- $profile : Profile|string
Return values
staticrender()
Renders the formats of this call; the result is the first format, the others are reachable with as(). See Quittio::render().
public
render() : RenderedInvoice
Tags
Return values
RenderedInvoicetemplate()
Template of this call (a shipped or a configured template); wins over the invoice presentation and the configuration.
public
template(string $template) : static
Parameters
- $template : string
Return values
staticvalidate()
Switches validation on (errors throw) or to warnings only.
public
validate([bool $throwOnError = true ]) : static
Parameters
- $throwOnError : bool = true
Return values
staticwithoutValidation()
Validation mode "off" for this call: nothing is validated, no ValidationException.
public
withoutValidation() : static