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

Class RescueEvent

Event class for the ICanBoogie\Routing\RouteDispatcher::rescue event.

Event hooks may use this event to rescue a route by providing a suitable response, or replace the exception to throw if the rescue fails.

ICanBoogie\Event
┗ ICanBoogie\Routing\Route\RescueEvent
Namespace: ICanBoogie\Routing\Route
Located at Route/RescueEvent.php

Methods summary

protected get_exception( void ) : Exception

Returns

Exception
protected set_exception( Exception $exception ) : Exception

Parameters

$exception

Returns

Exception
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\Route $target, Exception & $exception, 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
$exception
Reference to the exception thrown while dispatching the route.
$request
$response

Constants summary

TYPE : string
'rescue'

Properties summary

Magic properties

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