log = Logger::getLogger(__CLASS__); Logger::configure('./js/log4php/log4php.xml'); $this->log->info("Calling scripts to promote Cache...."); $this->log->info("Script Mode:".$action); if ($action=='promoteNums') {$this->promoteNums();} else if ($action=='promoteCharts') {$this->promoteCharts();} else if ($action=='promoteAll') { $this->promoteAll(); } else if ($action=='help') { $this->log->info("Availiable options: promoteNums-> Promotes Stats Numbers Only; promoteCharts -> Promote Chart Queries ; promoteAll->Promote every entry in the cache."); } else { $this->log->info("Wrong argument given. Availiable are: promoteNums, promoteCharts , promoteAll.");} } public function promoteNums(){ $this->log->info(" Promoting Numbers..."); $csn = new PromoteShadowNums(); $csn->replace(); $this->log->info("Done!"); } public function promoteCharts() { $this->log->info("Promoting Charts..."); $csn = new PromoteCharts();$csn->replace(); $this->log->info("Done!"); } public function refreshAll() { $this->promoteNums(); $this->promoteCharts(); } } if ($_GET) { $argument1 = $_GET['action']; } else { $argument1 = $argv[1]; } $rc = new PromoteCache($argument1); ?>