API reference / Quittio \ Core \ Pdf \ Qr
PaymentSlip
final readonly class in quittio/core
Quittio\Core\Pdf\Qr\PaymentSlip · Source
The texts of a payment slip with receipt (ProvidesPaymentSlip), laid out by the templates after the Swiss QR bill: receipt (62 mm) and payment part (148 mm) in a strip of 210 × 105 mm at the bottom of the page, with the code at 46 × 46 mm.
A section is a heading with its lines; a section without lines is printed as an empty field to be filled in by hand, as is a missing amount.
Properties#
| Property | Type | Description |
|---|---|---|
$acceptancePoint readonly | string | |
$amount readonly | string|null | formatted amount, null for an empty amount field |
$amountHeading readonly | string | |
$currency readonly | string | |
$currencyHeading readonly | string | |
$mark readonly | string|null | image (data URI) printed in the middle of the code, e.g. the Swiss cross |
$receiptSections readonly | list<array{heading: string, lines: list<string>}> | information section of the receipt |
$receiptTitle readonly | string | |
$sections readonly | list<array{heading: string, lines: list<string>}> | information section of the payment part, in order |
$separationNote readonly | string | |
$title readonly | string |
Methods#
| Method | Description |
|---|---|
->__construct() | |
->toArray() |
__construct()#
public function __construct(
string $title,
string $receiptTitle,
list<array{heading: string, lines: list<string>}> $sections,
list<array{heading: string, lines: list<string>}> $receiptSections,
string $currencyHeading,
string $amountHeading,
string $currency,
string|null $amount,
string $acceptancePoint,
string $separationNote,
string|null $mark = null,
)| Parameter | Type | Description |
|---|---|---|
$title | string | |
$receiptTitle | string | |
$sections | list<array{heading: string, lines: list<string>}> | information section of the payment part, in order |
$receiptSections | list<array{heading: string, lines: list<string>}> | information section of the receipt |
$currencyHeading | string | |
$amountHeading | string | |
$currency | string | |
$amount | string|null | formatted amount, null for an empty amount field |
$acceptancePoint | string | |
$separationNote | string | |
$mark | string|null = null | image (data URI) printed in the middle of the code, e.g. the Swiss cross |
toArray()#
public function toArray(): array{title: string, receiptTitle: string, sections: list<array{heading: string, lines: list<string>}>, receiptSections: list<array{heading: string, lines: list<string>}>, currencyHeading: string, amountHeading: string, currency: string, amount: ?string, acceptancePoint: string, separationNote: string, mark: ?string}- Returns
array{title: string, receiptTitle: string, sections: list<array{heading: string, lines: list<string>}>, receiptSections: list<array{heading: string, lines: list<string>}>, currencyHeading: string, amountHeading: string, currency: string, amount: ?string, acceptancePoint: string, separationNote: string, mark: ?string}