API15:JApplication/ construct
From Joomla! Documentation
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.
Contents |
Description
Class constructor.
[<! removed edit link to red link >]
<! removed transcluded page call, red link never existed >
Syntax
__construct($config=array())
| Parameter Name | Default Value | Description |
|---|---|---|
| $config | array() | A client identifier. |
Defined in
libraries/joomla/application/application.php
Importing
jimport( 'joomla.application.application' );
Source Body
function __construct($config = array()) { jimport('joomla.utilities.utility'); //set the view name $this->_name = $this->getName(); $this->_clientId = $config['clientId']; //Enable sessions by default if(!isset($config['session'])) { $config['session'] = true; } //Set the session default name if(!isset($config['session_name'])) { $config['session_name'] = $this->_name; } //Set the default configuration file if(!isset($config['config_file'])) { $config['config_file'] = 'configuration.php'; } //create the configuration object $this->_createConfiguration(JPATH_CONFIGURATION.DS.$config['config_file']); //create the session if a session name is passed if($config['session'] !== false) { $this->_createSession(JUtility::getHash($config['session_name'])); } $this->set( 'requestTime', gmdate('Y-m-d H:i') ); }
[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >
Examples
<CodeExamplesForm />
