API reference / Quittio \ Core \ Rendering
RenderedDocument
final readonly class in quittio/core
Quittio\Core\Rendering\RenderedDocument · Source
Rendered quote, delivery note, reminder or other document (PDF and HTML, never XML).
Methods#
| Method | Description |
|---|---|
->__construct() | |
->contents() | |
->data() | |
->filename() | |
->hasPdf() | |
->html() | |
->mimeType() | |
->notices() | Plausibility hints on the document, in the language of the run, e.g. a reminder that claims reminder fees besides the flat rate (DocumentData::notices()). |
->pdf() | |
->save() | Writes the output to a file, or into a directory (an existing one or a path ending in "/") with filename(); creates missing directories. |
__construct()#
public function __construct(
DocumentData $data,
string $html,
string $filenamePattern,
?string $pdf = null,
list<ValidationMessage> $notices = [],
)| Parameter | Type | Description |
|---|---|---|
$data | DocumentData | |
$html | string | |
$filenamePattern | string | |
$pdf | ?string = null | |
$notices | list<ValidationMessage> = [] | plausibility hints on the document (DocumentData::notices()) |
contents()#
public function contents(): string- Returns
string
data()#
public function data(): DocumentData- Returns
DocumentData
filename()#
public function filename(?string $extension = null): string| Parameter | Type | Description |
|---|---|---|
$extension | ?string = null |
- Returns
string
hasPdf()#
public function hasPdf(): bool- Returns
bool
html()#
public function html(): string- Returns
string
mimeType()#
public function mimeType(): string- Returns
string
notices()#
public function notices(): list<ValidationMessage>Plausibility hints on the document, in the language of the run, e.g. a reminder that claims reminder fees besides the flat rate (DocumentData::notices()).
- Returns
list<ValidationMessage>
pdf()#
public function pdf(): string- Returns
string
save()#
public function save(string $path): stringWrites the output to a file, or into a directory (an existing one or a path ending in "/") with filename(); creates missing directories.
| Parameter | Type | Description |
|---|---|---|
$path | string |
- Returns
string– the written path