PHP Класс Phprest\Router\Strategy

Наследование: extends League\Route\Strategy\AbstractStrategy, implements League\Route\Strategy\StrategyInterface, use trait Phprest\Service\Hateoas\Util
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$container League\Container\ContainerInterface

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

Метод Описание
__construct ( League\Container\ContainerInterface $container )
dispatch ( string | array | Closure $controller, array $vars ) : mixed Dispatch the controller, the return value of this method will bubble out and be returned by \League\Route\Dispatcher::dispatch, it does not require a response, however, beware that there is no output buffering by default in the router.
getContainer ( ) : League\Container\ContainerInterface Returns the DI container.

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

Метод Описание
serviceHateoas ( ) : Hateoas\Hateoas

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

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

public __construct ( League\Container\ContainerInterface $container )
$container League\Container\ContainerInterface

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

$controller can be one of three types but based on the type you can infer what the controller actually is: - string (controller is a named function) - array (controller is a class method [0 => ClassName, 1 => MethodName]) - \Closure (controller is an anonymous function)
public dispatch ( string | array | Closure $controller, array $vars ) : mixed
$controller string | array | Closure
$vars array - named wildcard segments of the matched route
Результат mixed

getContainer() публичный метод

Returns the DI container.
public getContainer ( ) : League\Container\ContainerInterface
Результат League\Container\ContainerInterface

serviceHateoas() защищенный метод

protected serviceHateoas ( ) : Hateoas\Hateoas
Результат Hateoas\Hateoas

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

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

protected ContainerInterface,League\Container $container
Результат League\Container\ContainerInterface