Example #1
0
 function &getHeyuSched($reload = false)
 {
     if (isset($this->heyuSched) && !$reload) {
         if ($this->heyuSched->hasFileChanged()) {
             $reload = true;
         }
     }
     if (!isset($this->heyuSched) || $reload) {
         $_SESSION['load_count'] += 1;
         $schedfileloc = $this->heyuConf->getSchedFile();
         try {
             $heyuschedinstance = new heyuSched($schedfileloc);
         } catch (Exception $e) {
             //				prx($e);
             $theTrace = $e->getTrace();
             if ($theTrace[0]["function"] == "load_file") {
                 error_log("domus.Link: No sched file available, creating default with location [" . $schedfileloc . "]");
                 $heyuschedinstance = new heyuSched();
                 $heyuschedinstance->setFileName($schedfileloc);
             } else {
                 throw $e;
             }
         }
         $this->heyuSched =& $heyuschedinstance;
     }
     return $this->heyuSched;
 }