You are here

public function AuthcacheP13nDefaultRequestRouter::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/includes/AuthcacheP13nDefaultRequestRouter.inc, line 31
Defines the interface for mapping URLs to requests and vice versa.

Class

AuthcacheP13nDefaultRequestRouter
Interface for mapping URLs to requests and vice versa.

Code

public function getHandler($route_id) {
  $handler = $this
    ->getHandlerStore()
    ->getOne($route_id);
  if (!$handler) {
    watchdog('AuthcacheP13nDefaultRequestRouter', 'Failed to find request handler for route %r', array(
      '%r' => $route_id,
    ), WATCHDOG_ERROR);
  }
  return $handler;
}