Methods summary
public static
MvcCore\Controller
|
|
public static
MvcCore\Controller |null
|
|
public
|
#
Dispatch( string $actionName = "IndexAction" )
Parameters
- $actionName
PHP code action name in PascalCase.
This value is used to call your desired function
in controller without any change.
Inheritdocs
|
public
|
|
protected
|
#
autoInitializeProperties( )
Automatically initialize all properties with PHP Docs tag @autoInit
or with PHP8+ attribute \MvcCore\ControllerAutoInit .
This method is always called inside \MvcCore\Controller::Init();
method, after session has been started.
If there is defined factory method name in PHP Docs tag, use that method to
initialize property or try to find method with name '[_]create' + upper
cased property name.
If there is no factory method found, try to get property type. First by
property type in PHP 7.4+, than by Php Docs tag @var . Than try to create
instance by calling property type static method CreateInstance() .
If there is no such static method, create instance by property type
constructor with no arguments. If property instance implements
\MvcCore\IController , add instance into child controllers.
Automatically initialize all properties with PHP Docs tag @autoInit
or with PHP8+ attribute \MvcCore\ControllerAutoInit .
This method is always called inside \MvcCore\Controller::Init();
method, after session has been started.
If there is defined factory method name in PHP Docs tag, use that method to
initialize property or try to find method with name '[_]create' + upper
cased property name.
If there is no factory method found, try to get property type. First by
property type in PHP 7.4+, than by Php Docs tag @var . Than try to create
instance by calling property type static method CreateInstance() .
If there is no such static method, create instance by property type
constructor with no arguments. If property instance implements
\MvcCore\IController , add instance into child controllers.
|
protected
boolean
|
#
autoInitializeProperty( ReflectionClass $ctrl, ReflectionProperty $prop, string|null $factoryMethodName )
Automatically initialize given class and property with PHP Docs tag @autoInit
or with PHP8+ attribute \MvcCore\ControllerAutoInit .
This method is always called inside \MvcCore\Controller::Init();
method, after session has been started.
If there is given $factoryMethodName , initialize property with calling
that method. If factory method is NULL , try to get property type. First by
property type in PHP 7.4+, than by Php Docs tag @var . Than try to create
instance by calling property type static method CreateInstance() .
If there is no such static method, create instance by property type
constructor with no arguments. If property instance implements
\MvcCore\IController , add instance into child controllers.
Automatically initialize given class and property with PHP Docs tag @autoInit
or with PHP8+ attribute \MvcCore\ControllerAutoInit .
This method is always called inside \MvcCore\Controller::Init();
method, after session has been started.
If there is given $factoryMethodName , initialize property with calling
that method. If factory method is NULL , try to get property type. First by
property type in PHP 7.4+, than by Php Docs tag @var . Than try to create
instance by calling property type static method CreateInstance() .
If there is no such static method, create instance by property type
constructor with no arguments. If property instance implements
\MvcCore\IController , add instance into child controllers.
Parameters
- $ctrl
- $prop
- $factoryMethodName
Returns
boolean
|
public
|
|
public
MvcCore\Controller
|
|
public
MvcCore\Session
|
#
GetSessionNamespace( mixed $name = \MvcCore\ISession::DEFAULT_NAMESPACE_NAME )
Parameters
Returns
Inheritdocs
|
public static
|
#
Redirect( string $location = '', integer $code = \MvcCore\IResponse::SEE_OTHER, string|null $reason = NULL )
Parameters
- $location
- $code
- $reason
- Any optional text header for reason why.
Inheritdocs
|
public
|
|
public
|
#
AssetAction( )
Throws
Exception If file path is not allowed (500) or file not found (404).
Inheritdocs
|