API Documentation
Table of Contents
Namespaces
Functions
- url() : string
- Generate a URL with the application base path prepended.
- __() : string
- Translate a key using the i18n translator.
- __e() : string
- Translate a key and HTML-escape the result for safe output in templates.
- base_path() : string
- Get the configured application base path.
Functions
url()
Generate a URL with the application base path prepended.
url([string $path = '/' ]) : string
Use this for all internal links to ensure they work correctly when the application is installed in a subdirectory.
Parameters
- $path : string = '/'
-
The path to generate URL for (should start with /)
Tags
Return values
string —The full URL path with base path prepended
__()
Translate a key using the i18n translator.
__(string $key[, array<string, string|int> $params = [] ]) : string
Parameters
- $key : string
-
Dot-notated translation key (e.g. "common.save")
- $params : array<string, string|int> = []
-
Interpolation parameters
Return values
string —Translated string, or the raw key if translator is unavailable
__e()
Translate a key and HTML-escape the result for safe output in templates.
__e(string $key[, array<string, string|int> $params = [] ]) : string
Parameters
- $key : string
-
Dot-notated translation key
- $params : array<string, string|int> = []
-
Interpolation parameters
Return values
string —HTML-escaped translated string
base_path()
Get the configured application base path.
base_path() : string
Return values
string —The base path (e.g., '/lwt') or empty string for root