PHP 클래스 Gdn_Dispatcher, vanilla

상속: extends Gdn_Pluggable
파일 보기 프로젝트 열기: vanilla/vanilla 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$ControllerMethod method of the controller to be called.
$ControllerName The name of the controller to be dispatched.

공개 메소드들

메소드 설명
__construct ( AddonManager $addonManager = null ) Class constructor.
__get ( string $name ) : mixed Backwards compatible support for deprecated properties.
application ( )
cleanup ( )
controller ( )
controllerArguments ( $Value = null )
controllerMethod ( )
controllerName ( ) Return the properly formatted controller class name.
dispatch ( string | Gdn_Request | null $ImportRequest = null, boolean $Permanent = true ) Dispatch a request to a controller method.
enabledApplication ( $folder = '' ) Returns the name of the enabled application based on $ApplicationFolder.
enabledApplicationFolders ( string $EnabledApplications = '' )
passAsset ( string $AssetName, mixed $Asset ) Allows the passing of a string to the controller's asset collection.
passData ( $Name, $Value )
passProperty ( string $Name, mixed $Mixed ) Allows the passing of any variable to the controller as a property.
reset ( ) Reset the dispatchert to its default state.
start ( )

비공개 메소드들

메소드 설명
analyzeRequest ( Gdn_Request $request ) Parses the query string looking for supplied request parameters.
createController ( string $controllerName, Gdn_Request $request, &$routeArgs ) : Gdn_Controller Create a controller and initialize it with data from the dispatcher.
dispatchController ( Gdn_Request $request, array $routeArgs ) Dispatch to a controller that's already been found with {@link Gdn_Dispatcher::analyzeRequest()}.
dispatchNotFound ( $reason = 'notfound', $request = null ) * Dispatch a 404 with an event that can be handled.
findController ( array $parts ) : array Find the controller object corresponding to a request path.
findControllerMethod ( Gdn_Controller $controller, string[] $pathArgs ) : array Find the method to call on a controller, based on a path.
getCanBlock ( Gdn_Request $request ) : integer Figure out what kind of blocks are allowed for dispatches.
getEnabledApplicationFolders ( ) : array Get the enabled application folders.
methodExists ( string | Gdn_Controller $object, string $method ) : boolean Check to see if a controller has a method.
parseDeliveryMethod ( string[] $parts ) : array Parse the delivery method base on the file extension.
requestVal ( string $key, array $get, array $post, mixed $default = null ) : mixed A helper function to search through the get/post for a key.
rewriteRequest ( Gdn_Request $request ) Rewrite the request based on rewrite rules (currently called routes in Vanilla).

메소드 상세

__construct() 공개 메소드

Class constructor.
public __construct ( AddonManager $addonManager = null )
$addonManager Vanilla\AddonManager

__get() 공개 메소드

Backwards compatible support for deprecated properties.
public __get ( string $name ) : mixed
$name string The name of the property to get.
리턴 mixed Returns the property value.

application() 공개 메소드

public application ( )

cleanup() 공개 메소드

public cleanup ( )

controller() 공개 메소드

public controller ( )

controllerArguments() 공개 메소드

public controllerArguments ( $Value = null )

controllerMethod() 공개 메소드

public controllerMethod ( )

controllerName() 공개 메소드

Return the properly formatted controller class name.
public controllerName ( )

dispatch() 공개 메소드

This method analyzes a request and figures out which controller and method it maps to. It also instantiates the controller and calls the method.
public dispatch ( string | Gdn_Request | null $ImportRequest = null, boolean $Permanent = true )
$ImportRequest string | Gdn_Request | null The request to dispatch. This can be a string URL or a Gdn_Request object,
$Permanent boolean Whether or not to set {@link Gdn::request()} with the dispatched request.

enabledApplication() 공개 메소드

Returns the name of the enabled application based on $ApplicationFolder.
public enabledApplication ( $folder = '' )

enabledApplicationFolders() 공개 메소드

사용 중단:
public enabledApplicationFolders ( string $EnabledApplications = '' )
$EnabledApplications string

passAsset() 공개 메소드

Allows the passing of a string to the controller's asset collection.
public passAsset ( string $AssetName, mixed $Asset )
$AssetName string The name of the asset collection to add the string to.
$Asset mixed The string asset to be added. The asset can be one of two things. - string: The string will be rendered to the page. - Gdn_IModule: The Gdn_IModule::Render() method will be called when the asset is rendered.

passData() 공개 메소드

public passData ( $Name, $Value )
$Name
$Value

passProperty() 공개 메소드

Allows the passing of any variable to the controller as a property.
public passProperty ( string $Name, mixed $Mixed )
$Name string The name of the property to assign the variable to.
$Mixed mixed The variable to be passed as a property of the controller.

reset() 공개 메소드

Reset the dispatchert to its default state.
public reset ( )

start() 공개 메소드

public start ( )

프로퍼티 상세

$ControllerMethod 공개적으로 프로퍼티

method of the controller to be called.
public $ControllerMethod

$ControllerName 공개적으로 프로퍼티

The name of the controller to be dispatched.
public $ControllerName