Front controller component.
More...
|
| | init () |
| |
| | done () |
| |
| | getSession () |
| |
| | publish ($property, $visibility=self::READABLE) |
| | Publish a property (or hide it again). More...
|
| |
| | alias ($alias, $property, $object=null) |
| | Define an alias for a property (of another object). More...
|
| |
| | configure ($config) |
| | Configure the object. More...
|
| |
| | _get ($key) |
| | Default getter if no specific setter is defined, and the property is also not published (readable). More...
|
| |
| | _set ($key, $value) |
| | Default setter if no specific setter is defined, and the property is also not published (writeable). More...
|
| |
| | $_fred = null |
| |
| | $_config = null |
| |
| | $_name = null |
| |
| | $_components = [] |
| | Local components (key = component name, value = component). More...
|
| |
| | $_session = null |
| |
| | $_published = [] |
| | Published properties (key = name of property, value = visibility). More...
|
| |
| | $_aliases = [] |
| | Alias properties (key = alias, value = [object,property]). More...
|
| |
Front controller component.
Definition at line 8 of file Front.php.
◆ controller()
| controller |
( |
|
$name, |
|
|
|
$redir = true |
|
) |
| |
Get controller by name.
- Parameters
-
| string | $name | Controller name. |
| bool | $redir | Redirect to the denied or login controller if the user is not authorized to execute the requested controller action. Otherwise return false. |
- Returns
- \Rsi\Fred\Controller|bool
Definition at line 74 of file Front.php.
◆ controllerAuthorized()
| controllerAuthorized |
( |
|
$name | ) |
|
Check if user is authorized for a controller.
- Parameters
-
- Returns
- bool True if the user is authorized for the controller.
Definition at line 62 of file Front.php.
◆ controllerClassName()
| controllerClassName |
( |
|
$name | ) |
|
Class name for a controller.
- Parameters
-
- Returns
- string Class name for the controller.
Definition at line 36 of file Front.php.
◆ controllerFactory()
| controllerFactory |
( |
|
$name, |
|
|
|
$class_name = null |
|
) |
| |
Construct a controller.
- Parameters
-
| string | $name | Controller name. |
| string | $class_name | Class name for the controller (derived from $name when empty). |
- Returns
- \Rsi\Fred\Controller
Definition at line 50 of file Front.php.
◆ controllerName()
| controllerName |
( |
|
$class_name | ) |
|
Name for a controller by class name.
- Parameters
-
| string | $class_name | Class name for the controller. |
- Returns
- string Controller name.
Definition at line 25 of file Front.php.
◆ execute()
Execute the request and render the view.
An optionally provided action will be executed, which will also complement the request component. Afterwards the view is rendered.
Definition at line 92 of file Front.php.
◆ $controllerNamespaces
| $controllerNamespaces = [] |
Namespace prefix (key) per controller name prefix (value).
Definition at line 13 of file Front.php.
◆ $defaultControllerName
| $defaultControllerName = 'Home' |
◆ $defaultType
◆ $deniedControllerName
| $deniedControllerName = 'Denied' |
◆ $unknownControllerName
| $unknownControllerName = 'Unknown' |
◆ $validControllerName
| $validControllerName = null |
Regex for valid controller names (empty = do not check).
Definition at line 14 of file Front.php.
◆ EVENT_RENDER
| const EVENT_RENDER = 'front:render' |
The documentation for this class was generated from the following file:
- /var/www/fred.local/vendor/rsi/fred/src/Rsi/Fred/Front.php