![]() |
Amanu
Projektmanagement für Selbstständige und Freelancer
|
Public Member Functions | |
| __construct ($path, array $data) | |
| getHTML () | |
This class handles our PDF Templates. Due to this extra class we can keep our variable scope clean
This file is part of the project codename "AMANUENSIS"
| __construct | ( | $path, | |
| array | $data | ||
| ) |
Constructor
| string | $path | - the path of the template to load |
| array | $data | - an array with variables that shall be accessible |
| Exception |
| getHTML | ( | ) |
Renders a template
Echoes an expression if a var is present
| $var | |
| $expression | - optional, v will be replaced by var |
Outputs something if it is existent, with a wrapper
| $var | - the variable | |
| null | $expression | - an expression to output, v will be replaced with the var |
Checks if an input is existent
| $var | - the variable |
Formats a date in format yyyy-MM-dd or a date object to dd.MM.yyyy
| mixed | $date | - the date as string in format yyyy-MM-dd or a DateO object |
Inserts a forced page Break, use only in pdfs
Echoes the value of the given key of the given array, or if not present, the value of the key '__default'
| mixed | $key | |
| array | $values | |
| $expression | - will be passed through the echoIf function |