/** * 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; }
public static function getInstance() { if (is_null(JDispatcher::$instance)) { JDispatcher::$instance = new JDispatcher(); } return JDispatcher::$instance; }
/** * 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; }