コード例 #1
0
ファイル: controller.php プロジェクト: siddht1/abantecart-src
 public function getCacheKeyValues($controller)
 {
     //check if requested controller allows HTML caching
     //use dispatcher to get class and details
     $ds = new ADispatcher($controller, array("instance_id" => "0"));
     $rt_class = $ds->getClass();
     $rt_file = $ds->getFile();
     $rt_method = $ds->getMethod();
     if (!empty($rt_file) && !empty($rt_class) && !empty($rt_method)) {
         /** @noinspection PhpIncludeInspection */
         require_once $rt_file;
         if (class_exists($rt_class)) {
             $static_method = $rt_method . '_cache_keys';
             if (method_exists($rt_class, $static_method)) {
                 //finally get keys and build a cache key
                 $cache_keys = call_user_func($rt_class . '::' . $static_method);
                 return $cache_keys;
             }
         }
     }
     return false;
 }