PHP Класс FOF30\Dispatcher\Dispatcher

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$defaultView The name of the default view, in case none is specified

Защищенные свойства (Protected)

Свойство Тип Описание
$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

Открытые методы

Метод Описание
__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

Защищенные методы

Метод Описание
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.

Описание методов

__construct() публичный Метод

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() публичный Метод

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
Результат mixed | null

dispatch() публичный Метод

The main code of the Dispatcher. It spawns the necessary controller and runs it.
public dispatch ( ) : void
Результат void

getController() публичный Метод

Returns a reference to the Controller object currently in use by the dispatcher
public getController ( ) : Controller
Результат FOF30\Controller\Controller

transparentAuthenticationLogin() защищенный Метод

Handles the transparent authentication log in

transparentAuthenticationLogout() защищенный Метод

Handles the transparent authentication log out

triggerEvent() защищенный Метод

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
Результат boolean

Описание свойств

$config защищенное свойство

Local cache of the dispatcher configuration
protected $config

$container защищенное свойство

The container we belong to
protected $container

$controller защищенное свойство

The controller which will be used
protected $controller

$defaultView публичное свойство

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

$isTransparentlyLoggedIn защищенное свойство

Is this user transparently logged in?
protected $isTransparentlyLoggedIn

$layout защищенное свойство

The layout for rendering the view
protected $layout

$view защищенное свойство

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