Pickles Framework Documentation

Engine

Interface Engine

Defines the contract for a view rendering engine. Any implementing class must provide a render method capable of rendering a view with optional parameters and layout support.

Table of Contents

Methods

render()  : string
Renders a view with optional layout and dynamic parameters.

Methods

render()

Renders a view with optional layout and dynamic parameters.

public render(string $view[, array<string|int, mixed> $params = [] ][, string|null $layout = null ]) : string
Parameters
$view : string

The name of the view file to render (without the .php extension).

$params : array<string|int, mixed> = []

An associative array of variables to be extracted and made available to the view.

$layout : string|null = null

Optional name of the layout file to wrap the view. If null, a default may be used.

Return values
string

The fully rendered output as a string.


        
On this page

Search results