ICanBoogie
  • Documentation
  • API Reference
  • Routing 4.0.x
Namespaces
  • ICanBoogie
    • Routing
      • Controller
      • Route
      • RouteDispatcher
Classes
  • BeforeDispatchEvent
  • DispatchEvent

Class BeforeDispatchEvent

Event class for the ICanBoogie\Routing\RouteDispatcher::dispatch:before event.

Third parties may use this event to provide a response to the request before the route is mapped. The event is usually used by third parties to redirect requests or provide cached responses.

ICanBoogie\Event
┗ ICanBoogie\Routing\RouteDispatcher\BeforeDispatchEvent
Namespace: ICanBoogie\Routing\RouteDispatcher
Located at RouteDispatcher/BeforeDispatchEvent.php

Methods summary

protected get_route( void ) : ICanBoogie\Routing\Route

Returns

ICanBoogie\Routing\Route
protected get_request( void ) : ICanBoogie\HTTP\Request

Returns

ICanBoogie\HTTP\Request
protected get_response( void ) : ICanBoogie\HTTP\Response|null

Returns

ICanBoogie\HTTP\Response|null
protected set_response( ICanBoogie\HTTP\Response & $response = null )

Parameters

$response
public __construct( ICanBoogie\Routing\RouteDispatcher $target, ICanBoogie\Routing\Route $route, ICanBoogie\HTTP\Request $request, ICanBoogie\HTTP\Response & $response = null )

The event is constructed with the type self::TYPE.

The event is constructed with the type self::TYPE.

Parameters

$target
$route
$request
$response

Constants summary

TYPE : string
'dispatch:before'

Properties summary

Magic properties

public $response : ICanBoogie\HTTP\Response
public read-only $route : ICanBoogie\Routing\Route
public read-only $request : ICanBoogie\HTTP\Request
Routing 4.0.x – Check on GitHub – API documentation generated by ApiGen