PlatesRenderer

Extends AbstractRenderer Implements AddTemplateFolderInterface, ConfigurableFileExtensionInterface

Plates class for rendering output.

since

2.0.0

package

Joomla Framework

Methods

__construct

Constructor.

__construct(\League\Plates\Engine renderer = null) : mixed
since

2.0.0

Arguments

renderer

\League\Plates\EngineRendering engine

Response

mixed

addFolder

Add a folder with alias to the renderer

addFolder(string directory, string alias = '') : $this
since

2.0.0

throws

\InvalidArgumentException

Arguments

directory

stringThe folder path

alias

stringThe folder alias

Response

$this

getRenderer

Get the rendering engine

getRenderer() : \League\Plates\Engine
since

2.0.0

Response

\League\Plates\Engine

pathExists

Checks if folder, folder alias, template or template path exists

pathExists(string path) : bool
since

2.0.0

Arguments

path

stringFull path or part of a path

Response

boolTrue if the path exists

render

Render and return compiled data.

render(string template, array data = []) : string
since

2.0.0

Arguments

template

stringThe template file name

data

arrayThe data to pass to the template

Response

stringCompiled data

set

Sets a piece of data

set(string key, string value) : $this
inherited
since

2.0.0

Arguments

key

stringName of variable

value

stringValue of variable

Response

$this

setData

Loads data from array into the renderer

setData(array data) : $this
inherited
since

2.0.0

Arguments

data

arrayArray of variables

Response

$this

setFileExtension

Sets file extension for template loader

setFileExtension(string extension) : $this
since

2.0.0

Arguments

extension

stringTemplate files extension

Response

$this

unsetData

Unloads data from renderer

unsetData() : $this
inherited
since

2.0.0

Response

$this

Properties

renderer

Rendering engine

since

2.0.0

Type(s)

\League\Plates\Engine

data

Data for output by the renderer

inherited
since

2.0.0

Type(s)

array