• ActiveWAFL 1766 API Reference Documentation
  • Search
  • Version

DblEj \ Communication \ Http \ Routing

The Routing namespace.

Server-side (PHP) classes that represent HTTP routes and abstractions for Routers and Destinations.

 
DblEj\Communication\Http\Routing

Classes

Route

Represents a route to a destination that can handle HTTP requests.

The destination can be any callable or IDestination.

Interfaces

IDestination

A Route's destination.

IInternalRouter

Routers that are part of ActiveWAFL, and that play an integral part in it's basic functionality, implement this method.

It is for ActiveWAFL internal use only.

IRoute

An IRoute defines a destination, and provides a mechanism for sending information to that destination.

An HTTP IRoute expects the destination to be an IDestination and provides additional information specifying the name of the IDestination class implementation the the Route's destination is an instance of.

IRouter

A Router's job is to find a suitable route for a given request.

An HTTP Router exposes an additional method, GetHttpRoute, for consumers that are aware of the router's type and are able to resolve this interface.

For consumers only aware of the base interface, they will call the base interfacses GetRoute method, which implementors of this interface should redirect to GetHttpRoute.

Exceptions

InvalidRouteException

Thrown when a router returns an invalid route or when a routes destination is invalid or unreachable.

InvalidRouterRequestException

Thrown when a router doesn't know how to find an appropriate route for a request because the request is invalid or corrupt.

RouteNotFoundException

Thrown when a router cannot find an appropriate route for a request because there isn't one.

Throwing this exception sets the HTTP response code to 404.

Child Namespaces

There are no namespaces beneath Routing