PHP Class luya\base\ModuleReflection

Author: nadar
Inheritance: extends yii\base\Object
Datei anzeigen Open project: luyadev/luya Class Usage Examples

Public Properties

Property Type Description
$controller The controller paramter is null until the ModuleReflection::run method has been applied.
$request Request object from DI-Container.
$urlManager UrlManager object from DI-Container.

Public Methods

Method Description
__construct ( luya\web\Request $request, luya\web\UrlManager $urlManager, array $config = [] ) Class constructor in order to consum from DI Container.
defaultRoute ( string $controller, string $action = null, array $args = [] ) Inject a defaultRoute.
getModule ( ) : Module Getter for the module property.
getRequestRoute ( ) : array Determine the default route based on current defaultRoutes or parsedRequested by the UrlManager.
getSuffix ( ) : string Getter for the suffix property.
getUrlRule ( ) : array Returns the url rule parameters which are taken from the requested route.
init ( )
run ( ) : string | Response Run the route based on the values.
setModule ( Module $module ) Setter for the module property.
setSuffix ( string $suffix ) Setter for the suffix property.

Method Details

__construct() public method

Class constructor in order to consum from DI Container.
public __construct ( luya\web\Request $request, luya\web\UrlManager $urlManager, array $config = [] )
$request luya\web\Request
$urlManager luya\web\UrlManager
$config array

defaultRoute() public method

Inject a defaultRoute.
public defaultRoute ( string $controller, string $action = null, array $args = [] )
$controller string
$action string
$args array

getModule() public method

Getter for the module property.
public getModule ( ) : Module
return Module

getRequestRoute() public method

Determine the default route based on current defaultRoutes or parsedRequested by the UrlManager.
public getRequestRoute ( ) : array
return array

getSuffix() public method

Getter for the suffix property.
public getSuffix ( ) : string
return string

getUrlRule() public method

Returns the url rule parameters which are taken from the requested route.
public getUrlRule ( ) : array
return array

init() public method

public init ( )

run() public method

Run the route based on the values.
public run ( ) : string | Response
return string | yii\web\Response The response of the action, can be either a string or an object from response.

setModule() public method

Setter for the module property.
public setModule ( Module $module )
$module Module

setSuffix() public method

Setter for the suffix property.
public setSuffix ( string $suffix )
$suffix string

Property Details

$controller public_oe property

The controller paramter is null until the ModuleReflection::run method has been applied.
public $controller

$request public_oe property

Request object from DI-Container.
public $request

$urlManager public_oe property

UrlManager object from DI-Container.
public $urlManager