Constants

Properties

$defaultTheme

$defaultTheme : string

The default theme to use for $theme

Type

string

$cssURLs

$cssURLs : array

List of CSS Urls to load

Type

array

$jsURLs

$jsURLs : array

List of JS Urls to load

Type

array

$metaprop

$metaprop : array

List of meta-properties to send

Type

array

$cssPath

$cssPath : string

Path to css folder

Type

string

$jsPath

$jsPath : string

Path to js folder

Type

string

$layoutsPath

$layoutsPath : string

Path to layouts folder

Type

string

$SHOWMODEL

$SHOWMODEL : string

The default model to show

Type

string

$menusConf

$menusConf : array

The configuration of the menu

Type

array

$renderingStack

$renderingStack : array

The current rendering stack

Type

array

$layoutStack

$layoutStack : array

The rendering layout stack

Type

array

$theme

$theme : string

The theme to use to render HTML layouts

Type

string

Methods

render()

render(string  $layout = null, array  $env = array()) : string

Render the model

Parameters

string $layout

The model to use, default use is defined by child

array $env

An environment variable, commonly an array but depends on the rendering class used

Returns

string —

The generated rendering.

Render the model using $env. This function does not display the result, see display().

display()

display(string  $layout = null, array  $env = array()) 

Display the model, allow an absolute path to the template file.

Parameters

string $layout

The model to use

array $env

An environment variable

getMenuItems()

getMenuItems(string  $menu) : array<mixed,string>

Get menu items

Parameters

string $menu

The menu to get items

Returns

array<mixed,string> —

The menu items

showMenu()

showMenu(string  $menu, string  $layout = null, string  $active = null) 

Show the $menu

Parameters

string $menu

The menu name

string $layout

the layout to use

string $active

Active item

doShow()

doShow() 

Call the show function

doRender()

doRender(string  $layout = null, array  $env = array()) : string

Call the render function

Parameters

string $layout

The model to use

array $env

An environment variable

Returns

string —

The generated rendering

doDisplay()

doDisplay(string  $layout = null, array  $env = null) : boolean

Call the display function

Parameters

string $layout

The model to use. Default value is null (behavior depending on renderer)

array $env

An array containing environment variables. Default value is null ($GLOBALS)

Returns

boolean

getDefaultRendering()

getDefaultRendering() 

endCurrentLayout()

endCurrentLayout(array  $env = array()) : boolean

End the current layout

Parameters

array $env

The environement to render the layout

Returns

boolean —

False if there is no current layout

__construct()

__construct() 

setDefaultTheme()

setDefaultTheme(string  $theme) 

Set the default theme used to render layouts

Parameters

string $theme

getDefaultTheme()

getDefaultTheme() : string

Get the default theme used to render layouts

Returns

string —

$theme

getLayoutPath()

getLayoutPath(string  $layout) : string

Get the path to the $layout

Parameters

string $layout

Returns

string

existsLayoutPath()

existsLayoutPath(string  $layout) : string

Test if the layout exists

Parameters

string $layout

Returns

string

renderReport()

renderReport(string  $report, string  $domain, string  $type, string  $stream) : string

Render the given report as HTML

Parameters

string $report
string $domain
string $type
string $stream

Returns

string

addThemeCSSFile()

addThemeCSSFile(string  $filename, string  $type = null) 

Add a theme css file to the list

Parameters

string $filename
string $type

addCSSFile()

addCSSFile(string  $filename, string  $type = null) 

Add a global css file to the list

Parameters

string $filename
string $type

addCSSURL()

addCSSURL(string  $url, string  $type = null) 

Add a css url to the list

Parameters

string $url
string $type

addThemeJSFile()

addThemeJSFile(string  $filename, string  $type = null) 

Add a theme js file to the list

Parameters

string $filename
string $type

addJSFile()

addJSFile(string  $filename, string  $type = null) 

Add a global js file to the list

Parameters

string $filename
string $type

addJSURL()

addJSURL(string  $url, string  $type = null) 

Add a js url to the list

Parameters

string $url
string $type

addMetaProperty()

addMetaProperty(string  $property, string  $content) 

Add a meta-propertie to the list

Parameters

string $property
string $content

listCSSURLs()

listCSSURLs(string  $type = null) : array

List all registered css URLs

Parameters

string $type

Returns

array

listJSURLs()

listJSURLs(string  $type = null) : array

List all registered js URLs

Parameters

string $type

Returns

array

listMetaProperties()

listMetaProperties() : array

List all registered html meta properties

Returns

array

setTheme()

setTheme(string  $theme) 

Set the theme used to render layouts

Parameters

string $theme

getThemePath()

getThemePath() : string

Get the theme path.

Returns

string —

The theme path

Get the path to the current theme.

getAbsThemePath()

getAbsThemePath() : string

Get the absolute theme path.

Returns

string —

The theme path.

Get the absolute path to the current theme.

getModelsPath()

getModelsPath() : string

Get the models theme path

Returns

string —

The models theme path

getLayoutsPath()

getLayoutsPath() : string

Get the layout theme path

Returns

string —

The models theme path

getCSSPath()

getCSSPath() : string

Get the css theme path

Returns

string —

The css theme path

getJSPath()

getJSPath() : string

Get the js theme path

Returns

string —

The JS theme path

getThemeURL()

getThemeURL() : string

Get the theme url

Returns

string

getCSSURL()

getCSSURL() : string

Get the CSS files url

Returns

string —

The CSS url

getJSURL()

getJSURL() : string

Get the JS files url

Returns

string —

The JS url

pushToStack()

pushToStack(string  $layout, array  $env) 

Push rendering to stack

Parameters

string $layout
array $env

getCurrentRendering()

getCurrentRendering() : array

Get current rendering

Returns

array —

array($layout, $env);

pullFromStack()

pullFromStack() 

Remove current rendering and get to previous one

addTypedURL()

addTypedURL(array  $array, string  $url, string  $type = null) 

Add an $url by $type in $array

Parameters

array $array
string $url
string $type

listTypedURL()

listTypedURL(array  $array, string  $type = null) : array

List urls by $type in $array

Parameters

array $array
string $type

Returns

array

show()

show(array  $env = null) 

Show the rendering using a child rendering class

Parameters

array $env

An environment variable

checkRendering()

checkRendering() : string

Ensure the current rendering

Returns

string —

The rendering class name

Check the rendering and try to create a valid one if not found.