Метод |
Описание |
|
__construct ( Config $configuration ) |
|
|
delete ( string $route, mixed $action ) : void |
Add a DELETE route. |
|
get ( string $route, mixed $action ) : void |
Add a GET route. |
|
getConfiguration ( ) : Config |
|
|
getEventEmitter ( ) : League\Event\EmitterInterface |
Return the event emitter. |
|
getRouter ( ) : RouteCollection |
|
|
handle ( Request $request, integer $type = self::MASTER_REQUEST, boolean $catch = true ) : Response |
Handle the request. |
|
head ( string $route, mixed $action ) : void |
Add a HEAD route |
|
options ( string $route, mixed $action ) : void |
Add a OPTIONS route |
|
patch ( string $route, mixed $action ) : void |
Add a PATCH route. |
|
post ( string $route, mixed $action ) : void |
Add a POST route. |
|
put ( string $route, mixed $action ) : void |
Add a PUT route. |
|
registerController ( string $class ) : void |
|
|
registerMiddleware ( string $classPath, array $arguments = [] ) |
|
|
registerService ( Phprest\Service\Serviceable $service, Phprest\Service\Configurable $config ) : void |
|
|
run ( Request $request = null ) : string |
Run the application |
|
setExceptionDecorator ( callable $func ) : void |
Set the exception decorator. |
|
subscribe ( string $event, callable $listener, integer $priority = ListenerAcceptorInterface::P_NORMAL ) |
Subscribe to an event. |
|
terminate ( Request $request, Response $response ) : void |
Terminates a request/response cycle. |
|