Skip to content
linchpin edited this page Feb 22, 2023 · 10 revisions

View

View Class

  • Full name: \CourierNotices\Core\View

Properties

variables

Variables for substitution in templates

protected array $variables

Methods

__construct

View constructor

public __construct(null $config = null): mixed

Parameters:

Parameter Type Description
$config null The configuration.

load_assets

Load all assets on boot-up

public load_assets(): void

render

Render HTML file

public render(string $file, string $view_dir = null): void

Parameters:

Parameter Type Description
$file string File to get HTML string.
$view_dir string View directory.

assign

Assign variable for substitution in templates.

public assign(string $variable, mixed $value): void

Parameters:

Parameter Type Description
$variable string Name variable to assign.
$value mixed Value variable for assign.

get_text_view

Get HTML from file

public get_text_view(string $file, string $view_dir = null): string

Parameters:

Parameter Type Description
$file string File to get HTML string.
$view_dir string View directory.

Return Value:

$html HTML output as string


init_assignments

Reset the variables

protected init_assignments(): mixed


Automatically generated from source code comments on 2023-02-22 using phpDocumentor and saggre/phpdocumentor-markdown