Amanu
Projektmanagement für Selbstständige und Freelancer
amaTemplate Class Reference

Public Member Functions

 __construct ($path, array $data)
 
 getHTML ()
 

Detailed Description

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"

Author
Sebastian Antosch s.ant.nosp@m.osch.nosp@m.@i-sa.nosp@m.n.de

Constructor & Destructor Documentation

__construct (   $path,
array  $data 
)

Constructor

Parameters
string$path- the path of the template to load
array$data- an array with variables that shall be accessible
Exceptions
Exception

Member Function Documentation

getHTML ( )

Renders a template

Returns
string - the readymade html code

Echoes an expression if a var is present

Parameters
$var
$expression- optional, v will be replaced by var

Outputs something if it is existent, with a wrapper

Parameters
$var- the variable
null$expression- an expression to output, v will be replaced with the var

Checks if an input is existent

Parameters
$var- the variable
Returns
bool

Formats a date in format yyyy-MM-dd or a date object to dd.MM.yyyy

Parameters
mixed$date- the date as string in format yyyy-MM-dd or a DateO object
Returns
string

Inserts a forced page Break, use only in pdfs

Returns
string

Echoes the value of the given key of the given array, or if not present, the value of the key '__default'

Parameters
mixed$key
array$values
$expression- will be passed through the echoIf function
Returns
string

The documentation for this class was generated from the following file: