Documentation

View
in package

Class View

This class represents a view for rendering data using templates.

Table of Contents

Methods

__construct()  : void
Constructor
Create()  : View
Static constructor
Render()  : string
Renders data using a template.
RenderModel()  : string
Tries to render a model using the specified template.

Methods

__construct()

Constructor

public __construct() : void

Initializes a new instance of the View class.

Create()

Static constructor

public static Create() : View

Creates a new instance of the View class.

Return values
View

The created View instance.

Render()

Renders data using a template.

public Render(Template $template[, ExtendedObject|null $args = null ]) : string
Parameters
$template : Template

The template to use for rendering.

$args : ExtendedObject|null = null

Additional arguments for rendering.

Return values
string

The rendered output.

RenderModel()

Tries to render a model using the specified template.

public RenderModel(DataRow $model[, string $template = 'default' ][, mixed $args = [] ]) : string
Parameters
$model : DataRow

The model to render.

$template : string = 'default'

The template name.

$args : mixed = []

Additional arguments.

Return values
string

The rendered output.


        
On this page

Search results