title | footer |
---|---|
\leantime\core\language |
false |
- Full name:
\leantime\core\language
Constant | Type | Value |
---|---|---|
\leantime\core\language::DEFAULT_LANG_FOLDER |
string | '../app/language/' |
\leantime\core\language::CUSTOM_LANG_FOLDER |
'../custom/language/' |
__construct - Check standard language otherwise get language from browser
private language::__construct(): array
Return Value:
getInstance - singleton, get same instance of language class
public static language::getInstance(): object
- This method is static.
Return Value:
setLanguage - set the language (format: de-DE, languageCode-CountryCode)
public language::setLanguage( $lang): array
Parameters:
Parameter | Type | Description |
---|---|---|
lang |
**** |
Return Value:
getLanguage - set the language (format: de-DE, languageCode-CountryCode)
public language::getCurrentLanguage(): array
Return Value:
public language::isValidLanguage(mixed $langCode): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
langCode |
mixed |
Return Value:
readIni - read File and return values
public language::readIni(): array
Return Value:
getLanguageList - gets the list of possible languages
public language::getLanguageList(): array|bool
Return Value:
getBrowserLanguage - gets the language that is setted in the browser
public language::getBrowserLanguage(): string
Return Value:
public language::__(string $index): string
Parameters:
Parameter | Type | Description |
---|---|---|
index |
string |
Return Value:
getFormattedDateString - returns a language specific formatted date string
public language::getFormattedDateString( $date): string
Parameters:
Parameter | Type | Description |
---|---|---|
date |
**** | string |
Return Value:
getFormattedTimeString - returns a language specific formatted time string
public language::getFormattedTimeString( $date): string
Parameters:
Parameter | Type | Description |
---|---|---|
date |
**** | string |
Return Value:
public language::get24HourTimestring(mixed $date): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
date |
mixed |
Return Value:
getISODateString - returns an ISO date string (hours, minutes seconds zeroed out) based on language specific format
public language::getISODateString( $date): string|bool
Parameters:
Parameter | Type | Description |
---|---|---|
date |
**** | string |
Return Value:
getISODateString - returns an ISO date string (hours, minutes seconds zeroed out) based on language specific format
public language::getISODateTimeString( $date, mixed $time): string|bool
Parameters:
Parameter | Type | Description |
---|---|---|
date |
**** | string |
time |
mixed |
Return Value:
getISOTimeString - returns an ISO time string (hours, minutes seconds zeroed out) based on language specific format
public language::getISOTimeString( $time): string|bool
Parameters:
Parameter | Type | Description |
---|---|---|
time |
**** | string |
Return Value:
public language::extractTime(mixed $dateTime): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
dateTime |
mixed |
Return Value:
dispatches an event with context
public static eventhelpers::dispatch_event(string $hook, mixed $available_params = [], string|int $function = null): void
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
hook |
string | |
available_params |
mixed | |
function |
**string | int** |
Return Value:
dispatches a filter with context
public static eventhelpers::dispatch_filter(string $hook, mixed $payload, mixed $available_params = [], string|int $function = null): mixed
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
hook |
string | |
payload |
mixed | |
available_params |
mixed | |
function |
**string | int** |
Return Value:
Gets the context of the event
private static eventhelpers::get_event_context(mixed $function): string
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
function |
mixed |
Return Value:
Gets the class context based on path, this uses the same method as the autoloader Helps create unique strings for events/filters
private static eventhelpers::set_class_context(): string
- This method is static.
Return Value:
Gets the caller function name
private static eventhelpers::get_function_context(mixed $functionInt = null): string
This way we don't have to use much memory by using debug_backtrace
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
functionInt |
mixed |
Return Value:
Automatically generated from source code comments on 2023-02-28 using phpDocumentor