\erdiko\coreContainer

Container Class

Summary

Methods
Properties
Constants
__construct()
setTemplate()
setData()
getData()
getTemplateFolder()
getTemplateFile()
toHtml()
No public properties found
No constants found
No protected methods found
$_template
$_data
$_defaultTemplate
$_templateFolder
N/A
No private methods found
No private properties found
N/A

Properties

$_template

$_template : 

Template

Type

$_data

$_data : 

Data

Type

$_defaultTemplate

$_defaultTemplate : 

Default Template

Type

$_templateFolder

$_templateFolder : 

Template Folder

Type

Methods

__construct()

__construct(string $template, mixed $data)

Constructor

Parameters

string $template

, Theme Object (Contaier)

mixed $data

setTemplate()

setTemplate(string $template)

Set Container template

Parameters

string $template

setData()

setData(mixed $data)

Set data

Parameters

mixed $data

, data injected into the container

getData()

getData() : mixed

Get data

Returns

mixed —

$data , data injected into the container

getTemplateFolder()

getTemplateFolder()

Get Template folder

getTemplateFile()

getTemplateFile(string $filename, array $data)

Get rendered template file Accepts one of the types of template files in this order: php (.php), html/mustache (.html), markdown (.md)

Parameters

string $filename

, file without extension

array $data

, associative array of data

Throws

\Exception

, template file does not exist

toHtml()

toHtml() : string

Render container to HTML

Returns

string —

$html