/**
  * Ensure that we always have but one instance of this Controller
  * @return Dispatcher object
  */
 public static function Instance()
 {
     if (self::$_instance == null) {
         self::$_instance = new Dispatcher();
     }
     return self::$_instance;
 }
Exemple #2
0
 public static function getInstance()
 {
     if (self::$_instance == null) {
         self::$_instance = new DisPatcher();
         return self::$_instance;
     } else {
         return self::$_instance;
     }
 }
Exemple #3
0
 /**
  * @static
  * @return Dispatcher
  */
 public static function getInstance($pPath = null)
 {
     if (self::$_instance == null) {
         self::$_instance = new Dispatcher();
     }
     if ($pPath != null) {
         self::$_instance->_path = $pPath;
     }
     return self::$_instance;
 }
Exemple #4
0
 public static function getInstance()
 {
     try {
         if (defined('BENCHMARK_TIMER') && BENCHMARK_TIMER == 'on') {
             self::startTimer();
         }
         if (!self::$_instance) {
             self::$_instance = new self();
             self::$_modelAndFlow = ModelAndFlow::getInstance();
         }
         if (!self::$_session) {
             self::$_session = Session::getInstance();
         }
     } catch (Exception $ex) {
         if (self::$_logger) {
             self::$_logger->error('Can not get a instance of the dispatcher', $ex);
         }
         // also throw it to the container
         throw new Exception($ex->getMessage());
     }
     return self::$_instance;
 }
Exemple #5
0
 public static function getInstance($initConfig = null)
 {
     if (!self::$_instance) {
         self::$_instance = new Dispatcher($initConfig);
     }
     return self::$_instance;
 }