Joomla!-开源天空

2008-12-05
首页 专栏热点 Joomla! 源代码分析 绝对好文章,Joomla! API在前台程序执行顺序


绝对好文章,Joomla! API在前台程序执行顺序

E-mail

这是一篇真的好文,原文地址:http://docs.joomla.org/API_Execution_Order,文中指出了前台程序API的关键的执行顺序。

Initialisation 初始化

  • Load once: defines.php
  • Load once: framework.php
    • Modify configuration options for magic quotes and Zend compatibility
    • Check for configuration.php. Redirect to installation if present or halt.
    • Load once: import.php
    • Load once: configuration.php
    • Set error reporting
    • Load PHP compatibility functions and classes
    • Initialise profiler (if debug on)
    • Import joomla.application.menu
    • Import joomla.user.user
    • Import joomla.environment.uri
    • Import joomla.html.html
    • Import joomla.utilities.utility
    • Import joomla.event.event
    • Import joomla.event.dispatcher
    • Import joomla.language.language
    • Import joomla.utilities.string
  • Profile mark: afterLoad
  • Set global $mainframe. Call to JFactory::getApplication('site')
    • Create and return instance. Call to JApplication::getInstance
  • Initialise the application. Call to JSite::initialise
    • Load base language files
    • Call to parent::initialise
      • First call to JFactory::getUser (initialises user)
        • Import joomla.user.user
        • Create session. Call to JFactory::getSession
      • Set editor based on user preference if available
  • Import the system plugins. Call to JPluginHelper::importPlugin('system')
  • Profile mark: afterInitialise
  • Trigger events: onAfterInitialise

Routing and Authorisation

  • Route the URI: Call to JSite::route
  • Call to JSite::authorize
    • Check current menu item access level. Redirect if not logged in. Halt if logged in and not authorised.
  • Profile mark: afterRoute
  • Trigger events: onAfterRoute

Dispatching 分派

  • Dispatch the component: Call to JSite::dispatch
  • Profile mark: afterDispatch
  • Trigger events: onAfterDispatch

Rendering 渲染

  • Render the page: Call to JSite::render
  • Profile mark: afterRender
  • Trigger events: onAfterRender
  • Echo output: Call to JResponse::toString with option for compressed output

学习Joomla!一定看看这篇文章,提纲挈领指出了Joomla!所涉及的各个方面。

相关文章:
linux下如何查找当前目录中含有BOM的文件
两个Joomla!即时通讯工具的扩展
收藏一篇关于Joomla! 1.5 routing的文章
Joomla中如何完整截取文章的部分内容
Joomla插件开发规范
Joomla源代码解析系列文章汇总
Joomla开发中怎样连接外部数据库
新增英文原版怎样用Joomla打造网站书籍
Joomla数据库中几个重要的数据表


收藏此文章:
Digg! Reddit! Del.icio.us! JoomlaVote! Google! Live! Facebook! StumbleUpon! Yahoo! Free social bookmarking plugins and extensions for Joomla! websites!

发表您的文章评论

您的姓名 (昵称)
标题:
评分: 很差一般较好很好
评论:
验证码:
请输入验证码