Helper
Helper
Base class for view helpers.
class Helper implements \Hazaar\View\Interface\HelperImplements: Hazaar\View\Interface\Helper
Helper classes extend this abstraction to provide reusable presentation utilities for templates and views. It standardizes helper construction, string casting behavior, rendering entry points, and simple asset URL generation helpers used by derived helper implementations.
Properties
args
protected array $argsType: array
Methods
__construct
public __construct(array $args): voidParameters
| Parameter | Type | Description |
|---|---|---|
$args | array |
__toString
Cast helper output to string.
public __toString(): stringReturns: string
Delegates to Hazaar\View\Helper::render so helpers can be embedded directly in string contexts within templates.
render
Renders the view helper output.
public render(): stringReturns: string
getName
Retrieves the short class name of the current object.
public getName(): stringReturns: string
asset
Build an asset URL relative to the Hazaar asset namespace.
protected asset(string $path): URLReturns: Hazaar\Application\URL
Parameters
| Parameter | Type | Description |
|---|---|---|
$path | string | asset path segment |
Generated by Hazaar API Doc Generator on Fri, 04 Sep 2026 23:32:17 +0000