You are here

public function AuthcacheP13nTestRequestRouterStub::getHandler in Authenticated User Page Caching (Authcache) 7.2

Return an instance of AuthcacheP13nRequestHandlerInterface.

Parameters

String $route_id: The identifier of a request (e.g., frag/form-token).

Return value

AuthcacheP13nRequestHandlerInterface|FALSE An appropriate request handler.

Overrides AuthcacheP13nRequestRouterInterface::getHandler

File

modules/authcache_p13n/tests/authcache_p13n.stub.inc, line 547
Stub classes for testing.

Class

AuthcacheP13nTestRequestRouterStub
Stub router.

Code

public function getHandler($route_id) {
  switch ($route_id) {
    case 'test/good':
      return new AuthcacheP13nTestRequestHandlerStub();
    case 'test/bad':
      return new AuthcacheP13nTestRequestHandlerBadStub();
    default:
      return FALSE;
  }
}