Documentation

Template

Templates em .PHTML Ver arquivos em: "templates/"

Table of Contents

$app  : Application
$dir  : mixed
$data  : mixed
$file  : string
Endereço completo do arquivo .phtml
__construct()  : mixed
Cria um template com base no arquivo escolhido
__toString()  : string
Carrega e retorna o output
exists()  : bool
Retorna TRUE se o template existe
get()  : mixed|null
Retorna uma variável
toHtml()  : string
Carrega e retorna o output

Properties

$dir

public static mixed $dir = 'templates'

$file

Endereço completo do arquivo .phtml

protected string $file

Methods

__construct()

Cria um template com base no arquivo escolhido

public __construct(string $file[, array<string|int, mixed> $data = [] ]) : mixed
Parameters
$file : string

Nome do arquivo

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

Array de variáveis

Return values
mixed

__toString()

Carrega e retorna o output

public __toString() : string
Return values
string

exists()

Retorna TRUE se o template existe

public exists() : bool
Return values
bool

get()

Retorna uma variável

public get(string $name) : mixed|null
Parameters
$name : string
Return values
mixed|null

toHtml()

Carrega e retorna o output

protected toHtml() : string
Return values
string

Search results