Beispiel #1
0
 /**
  * Get a configuration object
  *
  * Returns the global {@link JConfig} object, only creating it if it doesn't already exist.
  *
  * @param   string  $file       The path to the configuration file
  * @param   string  $type       The type of the configuration file
  * @param   string  $namespace  The namespace of the configuration file
  *
  * @return  Registry
  *
  * @see     Registry
  * @since   11.1
  * @deprecated  5.0  Use the configuration object within the application.
  */
 public static function getConfig($file = null, $type = 'PHP', $namespace = '')
 {
     JLog::add(sprintf('%s() is deprecated. The configuration object should be read from the application.', __METHOD__), JLog::WARNING, 'deprecated');
     // If there is an application object, fetch the configuration from there
     if (self::$application) {
         return self::$application->getConfig();
     }
     if (!self::$config) {
         if ($file === null) {
             $file = JPATH_CONFIGURATION . '/configuration.php';
         }
         self::$config = self::createConfig($file, $type, $namespace);
     }
     return self::$config;
 }