示例#1
0
 /**
  * Returns the global Event Dispatcher object, only creating it
  * if it doesn't already exist.
  *
  * @return  JDispatcher  The EventDispatcher object.
  *
  * @since   11.1
  */
 public static function getInstance()
 {
     if (self::$instance === null) {
         self::$instance = new JDispatcher();
     }
     return self::$instance;
 }
示例#2
0
 public static function getInstance()
 {
     if (is_null(JDispatcher::$instance)) {
         JDispatcher::$instance = new JDispatcher();
     }
     return JDispatcher::$instance;
 }
示例#3
0
 /**
  * Returns the global Event Dispatcher object, only creating it
  * if it doesn't already exist.
  *
  * @return  JDispatcher  The EventDispatcher object.
  *
  * @since   11.1
  */
 public static function getInstance()
 {
     // [!] Hubzero
     if (class_exists('\\Event')) {
         return \Event::getRoot();
     }
     if (self::$instance === null) {
         self::$instance = new JDispatcher();
     }
     return self::$instance;
 }