PHP Class FOF30\Dispatcher\Dispatcher

Afficher le fichier Open project: akeeba/fof Class Usage Examples

Méthodes publiques

Свойство Type Description
$defaultView The name of the default view, in case none is specified

Protected Properties

Свойство Type Description
$config Local cache of the dispatcher configuration
$container The container we belong to
$controller The controller which will be used
$isTransparentlyLoggedIn Is this user transparently logged in?
$layout The layout for rendering the view
$view The view which will be rendered by the dispatcher

Méthodes publiques

Méthode Description
__construct ( Container $container, array $config = [] ) Public constructor
__get ( string $name ) : mixed | null Magic get method. Handles magic properties: $this->input mapped to $this->container->input
dispatch ( ) : void The main code of the Dispatcher. It spawns the necessary controller and runs it.
getController ( ) : Controller Returns a reference to the Controller object currently in use by the dispatcher

Méthodes protégées

Méthode Description
transparentAuthenticationLogin ( ) Handles the transparent authentication log in
transparentAuthenticationLogout ( ) Handles the transparent authentication log out
triggerEvent ( string $event, array $arguments = [] ) : boolean Triggers an object-specific event. The event runs both locally –if a suitable method exists– and through the Joomla! plugin system. A true/false return value is expected. The first false return cancels the event.

Method Details

__construct() public méthode

The $config array can contain the following optional values: defaultView string The view to render if none is specified in $input Do note that $config is passed to the Controller and through it to the Model and View. Please see these classes for more information on the configuration variables they accept.
public __construct ( Container $container, array $config = [] )
$container FOF30\Container\Container
$config array

__get() public méthode

Magic get method. Handles magic properties: $this->input mapped to $this->container->input
public __get ( string $name ) : mixed | null
$name string The property to fetch
Résultat mixed | null

dispatch() public méthode

The main code of the Dispatcher. It spawns the necessary controller and runs it.
public dispatch ( ) : void
Résultat void

getController() public méthode

Returns a reference to the Controller object currently in use by the dispatcher
public getController ( ) : Controller
Résultat FOF30\Controller\Controller

transparentAuthenticationLogin() protected méthode

Handles the transparent authentication log in

transparentAuthenticationLogout() protected méthode

Handles the transparent authentication log out

triggerEvent() protected méthode

EXAMPLE Component: com_foobar, Object name: item, Event: onBeforeDispatch, Arguments: array(123, 456) The event calls: 1. $this->onBeforeDispatch(123, 456) 2. Joomla! plugin event onComFoobarDispatcherBeforeDispatch($this, 123, 456)
protected triggerEvent ( string $event, array $arguments = [] ) : boolean
$event string The name of the event, typically named onPredicateVerb e.g. onBeforeKick
$arguments array The arguments to pass to the event handlers
Résultat boolean

Property Details

$config protected_oe property

Local cache of the dispatcher configuration
protected $config

$container protected_oe property

The container we belong to
protected $container

$controller protected_oe property

The controller which will be used
protected $controller

$defaultView public_oe property

The name of the default view, in case none is specified
public $defaultView

$isTransparentlyLoggedIn protected_oe property

Is this user transparently logged in?
protected $isTransparentlyLoggedIn

$layout protected_oe property

The layout for rendering the view
protected $layout

$view protected_oe property

The view which will be rendered by the dispatcher
protected $view