\CodeIgniter\ViewRendererInterface

Interface RendererInterface

The interface used for displaying Views and/or theme files.

Summary

Methods
Constants
render()
renderString()
setData()
setVar()
resetData()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

render()

render(string  $view, array  $options = null, boolean  $saveData = false) : string

Builds the output based upon a file name and any data that has already been set.

Parameters

string $view
array $options

Reserved for 3rd-party uses since it might be needed to pass additional info to other template engines.

boolean $saveData

If true, will save data for use with any other calls, if false, will clean the data after displaying the view, if not specified, use the config setting.

Returns

string

renderString()

renderString(string  $view, array  $options = null, boolean  $saveData = false) : string

Builds the output based upon a string and any data that has already been set.

Parameters

string $view

The view contents

array $options

Reserved for 3rd-party uses since it might be needed to pass additional info to other template engines.

boolean $saveData

If true, will save data for use with any other calls, if false, will clean the data after displaying the view, if not specified, use the config setting.

Returns

string

setData()

setData(array  $data = array(), string  $context = null) : \CodeIgniter\View\RendererInterface

Sets several pieces of view data at once.

Parameters

array $data
string $context

The context to escape it for: html, css, js, url If 'raw', no escaping will happen

Returns

\CodeIgniter\View\RendererInterface

setVar()

setVar(string  $name, mixed  $value = null, string  $context = null) : \CodeIgniter\View\RendererInterface

Sets a single piece of view data.

Parameters

string $name
mixed $value
string $context

The context to escape it for: html, css, js, url If 'raw' no escaping will happen

Returns

\CodeIgniter\View\RendererInterface