Example #1
0
 /**
  * Get a configuration object
  *
  * Returns a reference to the global {@link JRegistry} object, only creating it
  * if it doesn't already exist.
  *
  * @access public
  * @param string    The path to the configuration file
  * @param string    The type of the configuration file
  * @return object JRegistry
  */
 function &getConfig($file = null, $type = 'PHP')
 {
     static $instance;
     if (!is_object($instance)) {
         $instance = JFactory::_createConfig($file, $type);
     }
     return $instance;
 }
Example #2
0
 /**
  * Get a configuration object
  *
  * Returns the global {@link JRegistry} object, only creating it
  * if it doesn't already exist.
  *
  * @param string	The path to the configuration file
  * @param string	The type of the configuration file
  * @return object JRegistry
  */
 public static function getConfig($file = null, $type = 'PHP')
 {
     if (!is_object(JFactory::$config)) {
         if ($file === null) {
             $file = dirname(__FILE__) . DS . 'config.php';
         }
         JFactory::$config = JFactory::_createConfig($file, $type);
     }
     return JFactory::$config;
 }
Example #3
0
 /**
  * Get a configuration object
  *
  * Returns a reference to the global {@link JRegistry} object, only creating it
  * if it doesn't already exist.
  *
  * @access public
  * @param string	The path to the configuration file
  * @param string	The type of the configuration file
  * @return object JRegistry
  */
 public static function &getConfig($file = null, $type = 'PHP')
 {
     static $instance;
     if (!is_object($instance)) {
         if ($file === null) {
             $file = dirname(__FILE__) . DS . 'config.php';
         }
         $instance = JFactory::_createConfig($file, $type);
     }
     return $instance;
 }