jommla架构
JOOMLA应用层
Application:
JApplicationWeb
>>>>>>>
继承自JApplicationBase
$charSet
$mimeType
$modifiedDate
$client
$document
$language
$session
$response
$instance
$responseMap
$singleValueResponseHeaders
公开public包含
$charSet,$mimeType,$modifiedDate,$client
保护protect:
$document,$language,$session,$response,静态:$instance
私有private:
$responseMap
$singleValueResponseHeaders
public function __construct
{
$this->input new JInput //来自AbstractApplication
$this->config new Registry //来自AbstractApplication
$this->client new JApplicationWebClient
$this->response new stdClass
插入:
JApplicationBase继承自AbstractApplication
public static function getInstance
{
self::$instance = new JApplicationWeb;
protected function render()
{
$options = array(
'template' => $this->get('theme'),
'file' => $this->get('themeFile', 'index.php'),
'params' => $this->get('themeParams'),
);
protected function respond()
{
echo $this->getBody();
protected function detectRequestUri()
{
protected function fetchConfigurationData($file = '', $class = 'JConfig')
{
$file = JPATH_CONFIGURATION . '/configuration.php';
public function flushAssets()
{
$version = new JVersion;
public function loadDocument(JDocument $document = null)
{
$this->document = ($document === null) ? JFactory::getDocument() : $document;
public function loadSession(JSession $session = null)
{
if ($session !== null)
{
$this->session = $session;
return $this;
}
// Generate a session name.
$name = md5($this->get('secret') . $this->get('session_name', get_class($this)));
// Calculate the session lifetime.
$lifetime = (($this->get('sess_lifetime')) ? $this->get('sess_lifetime') * 60 : 900);
// Get the session handler from the configuration.
$handler = $this->get('sess_handler', 'none');
// Initialize the options for JSession.
$options = array(
'name' => $name,
'expire' => $lifetime,
'force_ssl' => $this->get('force_ssl'),
);
public function execute()
{
$this->triggerEvent('onBeforeExecute'); ////来自JApplicationBase
////来自JApplicationBase
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[
public function registerEvent($event, $handler)
{
$this->dispatcher->register($event, $handler); ////来自JApplicationBase
浙公网安备 33010602011771号