LegacyComponentHandler
in package
This handles exceptions for new Component structure. This is old code and should be replaced so that this class becomes unnecessary
Tags
Table of Contents
Properties
- $exceptions : array<string|int, mixed>
- This is the list of exceptions
Methods
- __construct() : mixed
- Pushes all the legacy code into our array of exceptions
- executeException() : mixed
- Executes an exception (if any) for a certain action and component
- hasExceptionFor() : bool
- Tells wheter there is an exception for a certain action and component or not
- isActive() : bool
- Checks if the component is active and in the list of legal components (license)
Properties
$exceptions
This is the list of exceptions
private
array<string|int, mixed>
$exceptions
= array()
array[ frontend| backend ][ preResolve| postResolve| preContentLoad| preContentParse| load| postContentParse| postContentLoad| preFinalize| postFinalize ] = {callable}
Methods
__construct()
Pushes all the legacy code into our array of exceptions
public
__construct() : mixed
Tags
executeException()
Executes an exception (if any) for a certain action and component
public
executeException(bool $frontend, string $action, string $componentName) : mixed
Parameters
- $frontend : bool
-
Are we in frontend mode or not
- $action : string
-
Name of action
- $componentName : string
-
Component name
Return values
mixed —Return value of called exception (most of them return null)
hasExceptionFor()
Tells wheter there is an exception for a certain action and component or not
public
hasExceptionFor(bool $frontend, string $action, string $componentName) : bool
Parameters
- $frontend : bool
-
Are we in frontend mode or not
- $action : string
-
Name of action
- $componentName : string
-
Component name
Return values
bool —True if there is an exception listed, false otherwise
isActive()
Checks if the component is active and in the list of legal components (license)
public
isActive(bool $frontend, string $componentName) : bool
Parameters
- $frontend : bool
-
Are we in frontend mode or not
- $componentName : string
-
Component name
Return values
bool —True if the component is active and legal, false otherwise