getSession()->get('user'); $id = ($instance instanceof User) ? $instance->id : 0; } return JemUser::getInstance($id); } /** * Get the JEM configuration object. * * Returns the global {@link JemConfig} object, only creating it if it doesn't already exist. * * @return JemConfig object * * @note Because parent's getConfig() is limited to php files we don't override this function. * * @see JemConfig * @since 2.1.6 */ public static function getJemConfig() { return JemConfig::getInstance(); } /** * Get the dispatcher. * * Returns the static {@link JDispatcher} or {@link JEventDispatcher} object, depending on Joomla version. * * @return JDispatcher or JEventDispatcher object * * @see JDispatcher, JEventDispatcher * @since 2.1.7 */ public static function getDispatcher() { return Factory::getApplication(); } }