title | footer |
---|---|
\leantime\core\frontcontroller |
false |
- Full name:
\leantime\core\frontcontroller
__construct - Set the rootpath of the server
private frontcontroller::__construct( $rootPath, \leantime\core\IncomingRequest $incomingRequest): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
rootPath |
**** | |
incomingRequest |
\leantime\core\IncomingRequest |
Return Value:
getInstance - just one instance of the object is allowed (it makes no sense to have more)
public static frontcontroller::getInstance( $rootPath = null, \leantime\core\IncomingRequest $incomingRequest = null): object
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
rootPath |
**** | |
incomingRequest |
\leantime\core\IncomingRequest |
Return Value:
(instance)
run - executes the action depending on Request or firstAction
public static frontcontroller::dispatch(mixed $action = '', mixed $httpResponseCode = 200): void
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
action |
mixed | |
httpResponseCode |
mixed |
Return Value:
executeAction - includes the class in includes/modules by the Request
private static frontcontroller::executeAction(string $completeName, mixed $params = array()): void
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
completeName |
string | actionname.filename |
params |
mixed |
Return Value:
private static frontcontroller::getRequestMethod(): mixed
- This method is static.
Return Value:
private static frontcontroller::getRequestParams(mixed $method): mixed
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
method |
mixed |
Return Value:
includeAction - possible to include action from everywhere
public static frontcontroller::includeAction( $completeName, mixed $params = array()): void
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
completeName |
**** | |
params |
mixed |
Return Value:
getActionName - split string to get actionName
public static frontcontroller::getActionName( $completeName): string
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
completeName |
**** |
Return Value:
getModuleName - split string to get modulename
public static frontcontroller::getModuleName( $completeName): string
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
completeName |
**** |
Return Value:
getCurrentRoute - gets the current main action
public static frontcontroller::getCurrentRoute(): string
- This method is static.
Return Value:
public static frontcontroller::redirect(mixed $url, mixed $http_response_code = 303): void
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
url |
mixed | |
http_response_code |
mixed |
Return Value:
public static frontcontroller::setResponseCode(mixed $responseCode): mixed
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
responseCode |
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