/** * Overrides the parent constructor to set the execution start time. * * @param mixed $input An optional argument to provide dependency injection for the application's * input object. If the argument is a JInput object that object will become * the application's input object, otherwise a default input object is created. * @param mixed $config An optional argument to provide dependency injection for the application's * config object. If the argument is a JRegistry object that object will become * the application's config object, otherwise a default config object is created. * @param mixed $client An optional argument to provide dependency injection for the application's * client object. If the argument is a JApplicationWebClient object that object will become * the application's client object, otherwise a default client object is created. * * @since 11.3 */ public function __construct(JInput $input = null, JRegistry $config = null, JApplicationWebClient $client = null) { $this->_startTime = microtime(true); parent::__construct($input, $config, $client); $this->errors = new WebServiceApplicationWebErrors($this, $this->input); $this->errors->checkSupressResponseCodes(); }
/** * Class constructor. * * @since 3.1 */ public function __construct() { // Run the parent constructor parent::__construct(); // Load and set the dispatcher $this->loadDispatcher(); // Enable sessions by default. if (is_null($this->config->get('session'))) { $this->config->set('session', true); } // Set the session default name. if (is_null($this->config->get('session_name'))) { $this->config->set('session_name', 'installation'); } // Create the session if a session name is passed. if ($this->config->get('session') !== false) { $this->loadSession(); // Register the session with JFactory JFactory::$session = $this->getSession(); } // Store the debug value to config based on the JDEBUG flag $this->config->set('debug', JDEBUG); // Register the config to JFactory JFactory::$config = $this->config; // Register the application to JFactory JFactory::$application = $this; // Set the root in the URI based on the application name JUri::root(null, str_ireplace('/installation', '', JUri::base(true))); }
/** * Class constructor. * * @param mixed $input An optional argument to provide dependency injection for the application's * input object. If the argument is a JInput object that object will become * the application's input object, otherwise a default input object is created. * @param mixed $config An optional argument to provide dependency injection for the application's * config object. If the argument is a JRegistry object that object will become * the application's config object, otherwise a default config object is created. * @param mixed $client An optional argument to provide dependency injection for the application's * client object. If the argument is a JApplicationWebClient object that object will become * the application's client object, otherwise a default client object is created. */ public function __construct(JInput $input = null, JRegistry $config = null, JApplicationWebClient $client = null) { parent::__construct($input, $config, $client); $this->config->set('session', false); // Inject the application into JFactory JFactory::$application = $this; }
public function __construct(JInput $input = null, JRegistry $config = null, JApplicationWebClient $client = null) { parent::__construct($input, $config, $client); // Load and set the dispatcher $this->loadDispatcher(); // Register the application to JFactory JFactory::$application = $this; // Enable sessions by default. if (is_null($this->config->get('session'))) { $this->config->set('session', true); } // Set the session default name. if (is_null($this->config->get('session_name'))) { $this->config->set('session_name', 'site'); } // Create the session if a session name is passed. if ($this->config->get('session') !== false) { $this->loadSession(); // Register the session with JFactory JFactory::$session = $this->getSession(); } }
/** * Overrides the parent constructor to set the execution start time. * * @param mixed $input An optional argument to provide dependency injection for the application's * input object. If the argument is a JInput object that object will become * the application's input object, otherwise a default input object is created. * @param mixed $config An optional argument to provide dependency injection for the application's * config object. If the argument is a JRegistry object that object will become * the application's config object, otherwise a default config object is created. * @param mixed $client An optional argument to provide dependency injection for the application's * client object. If the argument is a JApplicationWebClient object that object will become * the application's client object, otherwise a default client object is created. * * @since 3.2 */ public function __construct(JInput $input = null, JRegistry $config = null, JApplicationWebClient $client = null) { $this->_startTime = microtime(true); parent::__construct($input, $config, $client); // Load the Joomla CMS configuration object. $this->loadConfiguration($this->fetchConfigurationData()); // By default, assume response may be cached. $this->allowCache(true); }
/** * Class constructor. * * @param mixed $input An optional argument to provide dependency injection for the application's * input object. If the argument is a JInput object that object will become * the application's input object, otherwise a default input object is created. * @param mixed $config An optional argument to provide dependency injection for the application's * config object. If the argument is a JRegistry object that object will become * the application's config object, otherwise a default config object is created. * @param mixed $client An optional argument to provide dependency injection for the application's * client object. If the argument is a JApplicationWebClient object that object will become * the application's client object, otherwise a default client object is created. * * @since 3.2 */ public function __construct(JInput $input = null, JRegistry $config = null, JApplicationWebClient $client = null) { parent::__construct($input, $config, $client); // Load and set the dispatcher $this->loadDispatcher(); // If JDEBUG is defined, load the profiler instance if (defined('JDEBUG') && JDEBUG) { $this->profiler = JProfiler::getInstance('Application'); } // Enable sessions by default. if (is_null($this->config->get('session'))) { $this->config->set('session', true); } // Set the session default name. if (is_null($this->config->get('session_name'))) { $this->config->set('session_name', $this->getName()); } }
/** * Class constructor. * * @param mixed $input An optional argument to provide dependency injection for the application's * input object. If the argument is a JInput object that object will become * the application's input object, otherwise a default input object is created. * @param mixed $config An optional argument to provide dependency injection for the application's * config object. If the argument is a JRegistry object that object will become * the application's config object, otherwise a default config object is created. * @param mixed $client An optional argument to provide dependency injection for the application's * client object. If the argument is a JApplicationWebClient object that object will become * the application's client object, otherwise a default client object is created. * * @since 11.3 * @deprecated 12.3 (Platform) & 4.0 (CMS) Use JApplicationWeb instead. */ public function __construct(JInput $input = null, JRegistry $config = null, JApplicationWebClient $client = null) { JLog::add('JWeb is deprecated. Use JApplicationWeb instead.', JLog::WARNING, 'deprecated'); parent::__construct($input, $config, $client); }