Ejemplo n.º 1
0
 /**
  * Rebuilds the caches for the given class.
  *
  * @param string $className
  */
 private function rebuild($className)
 {
     $instance = new $className();
     if (method_exists($instance, 'countCaches')) {
         $this->info("Rebuilding [{$className}] count caches");
         $countCache = new CountCache($instance);
         $countCache->rebuild();
     }
     if (method_exists($instance, 'sumCaches')) {
         $this->info("Rebuilding [{$className}] sum caches");
         $sumCache = new SumCache($instance);
         $sumCache->rebuild();
     }
 }