/**
  * get the cache length for the given request
  *
  * @param $request Request to get the cache length for
  */
 public static function getCacheLength(Request $r)
 {
     if (array_key_exists($r->getKey(), self::$listeners)) {
         return self::$listeners[$r->getKey()]->getCacheLength();
     } else {
         return false;
     }
 }
Example #2
0
 /**
  * Get the Resource for the given Request
  * @param Request $request
  * @return Resource
  */
 public static function getFromRequest(Request $request)
 {
     return Dispatcher::getListener($request->getKey());
 }