/**
  * Method to load a PHP configuration class file based on convention and return the instantiated data object.  You
  * will extend this method in child classes to provide configuration data from whatever data source is relevant
  * for your specific application.
  *
  * @param   string  $file   The path and filename of the configuration file. If not provided, configuration.php
  *                          in JPATH_BASE will be used.
  * @param   string  $class  The class name to instantiate.
  *
  * @return  mixed   Either an array or object to be loaded into the configuration object.
  *
  * @since   11.1
  */
 protected function fetchConfigurationData($file = '', $class = 'JConfig')
 {
     // Instantiate variables.
     $config = array();
     if (empty($file) && defined('JPATH_BASE')) {
         $file = JPATH_BASE . '/configuration.php';
         // Applications can choose not to have any configuration data
         // by not implementing this method and not having a config file.
         if (!file_exists($file)) {
             $file = '';
         }
     }
     if (!empty($file)) {
         Loader::register($class, $file);
         if (class_exists($class)) {
             $config = new $class();
         } else {
             throw new RuntimeException('Configuration class does not exist.');
         }
     }
     return $config;
 }
 /**
  * JClientFtp object constructor
  *
  * @param   array  $options  Associative array of options to set
  *
  * @since   12.1
  */
 public function __construct(array $options = array())
 {
     // If default transfer type is not set, set it to autoascii detect
     if (!isset($options['type'])) {
         $options['type'] = FTP_BINARY;
     }
     $this->setOptions($options);
     if (FTP_NATIVE) {
         // Import the generic buffer stream handler
         jimport('joomla.utilities.buffer');
         // Autoloading fails for JBuffer as the class is used as a stream handler
         Loader::load('JBuffer');
     }
 }