PHP Class FOF30\Dispatcher\Dispatcher

Datei anzeigen Open project: akeeba/fof Class Usage Examples

Public Properties

Property Type Description
$defaultView The name of the default view, in case none is specified

Protected Properties

Property 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

Public Methods

Method 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

Protected Methods

Method 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 method

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 method

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
return mixed | null

dispatch() public method

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

getController() public method

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

transparentAuthenticationLogin() protected method

Handles the transparent authentication log in

transparentAuthenticationLogout() protected method

Handles the transparent authentication log out

triggerEvent() protected method

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
return 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