View extends Template
View - Template da Página
Exibe as variáveis públicas do controller
Table of Contents
- $app : Application
- $dir : mixed
- $data : mixed
- $file : string
- Endereço completo do arquivo .phtml
- __construct() : mixed
- Cria uma View 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
$app
public
Application
$app
$dir
public
static mixed
$dir
= 'templates'
$data
protected
mixed
$data
= []
$file
Endereço completo do arquivo .phtml
protected
string
$file
Methods
__construct()
Cria uma View com base no arquivo escolhido
public
__construct(string $file[, mixed $data = [] ]) : mixed
Parameters
- $file : string
-
arquivo da View
- $data : 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