View
in package
View
Displays the templates
Table of Contents
Properties
- $_variables : array<string|int, mixed>
- variables available in the template
Methods
- assign() : mixed
- assign variables to be used inside of the template
- draw() : mixed
- render a template
- _getCacheBuster() : mixed
- get cache buster query string
- _getSri() : mixed
- get SRI hash for given file
- _linkTag() : mixed
- echo module preload link tag incl. SRI hash for given script file
- _scriptTag() : mixed
- echo script tag incl. SRI hash for given script file
Properties
$_variables
variables available in the template
private
array<string|int, mixed>
$_variables
= array()
Tags
Methods
assign()
assign variables to be used inside of the template
public
assign(string $name, mixed $value) : mixed
Parameters
- $name : string
- $value : mixed
Tags
draw()
render a template
public
draw(string $template) : mixed
Parameters
- $template : string
Tags
_getCacheBuster()
get cache buster query string
private
_getCacheBuster(string $file) : mixed
if the file isn't versioned (ends in a digit), adds our own version as a query string
Parameters
- $file : string
Tags
_getSri()
get SRI hash for given file
private
_getSri(string $file) : mixed
Parameters
- $file : string
Tags
_linkTag()
echo module preload link tag incl. SRI hash for given script file
private
_linkTag(string $file) : mixed
Parameters
- $file : string
Tags
_scriptTag()
echo script tag incl. SRI hash for given script file
private
_scriptTag(string $file[, string $attributes = '' ]) : mixed
Parameters
- $file : string
- $attributes : string = ''
-
additional attributes to add into the script tag