1. kernel
    1. $GLOBALS['system'] = &$this;
    2. 过滤: get post...参数过滤(unsafevar )
    3. 根据config 设置CORE_INCLUDE_DIR 外部插件目录
    4. 引入: defined.php
    5. 根据defined设置model_dir
    6. 设置缓存
      1. $kernel->cache = new secache( )
        1. 子主题 1
    7. 缓存: $kernel->__setting = new setmgr( );
    8. 设置时区:kernel->set_timezone()
  2. kernel
  3. cachemgr
  4. 返回数组 $request(访问首页时)
    1. "base_url"=http://localhost/zend/shopex4.85/
    2. "member_lv"=-1
    3. "query"=index.html
    4. "cur"=null
    5. "lang"=null
  5. 返回 array $page (访问首页时)
    1. 解析 $action
    2. shopCore->request['action'] = $action
    3. $controller = shopCore->&getController( $action['controller'] )
      1. 引入对应的mod文件: require CORE_DIR."/shop/controller/".dirname( $mod )."/ctl.".basename( $mod ).".php";
      2. 生成page对象 $object = new "ctl_".basename( $mod )
      3. return Object of: ctl_page
    4. $controller->action = &$action;
    5. $shopCore->ctl =& $controller;
    6. $controller->_header =&$page['header'];
    7. $kernel->callAction( $controller, $action['method'], $action['args'] )
      1. $protected = array_flip( get_class_methods( "pagefactory" ) );
      2. $ctlmap = $this->getConf( "system.ctlmap" );
      3. 执行对应的构造器
        1. 入口为首页时,执行 $ctl_page->show('index')
          1. $ident = urldecode( $ident );
          2. $page =& $this->system->loadModel( "content/systmpl" );
          3. $this->customer_template_type = "page";
          4. $this->customer_template_id = $ident;
          5. $this->pagedata['page'] = "page:".$ident;
          6. $this->pagedata['_MAIN_'] = "page/single-page.html";
          7. $title = $mdl_systmpl->getTitle( $ident );
          8. 数据库查询
          9. $shopPage ->output()
          10. $sitemap =& $this->system->loadModel( "content/sitemap" );
          11. 步骤.......
          12. $this->__tmpl = 'shop:index.html'
          13. $output = $pagefactory->fetch( $this->__tmpl, false )
          14. $this->_files = array ($file );
          15. $this->_get_resource ( $file )
          16. $this->__ident = "";
          17. $this->_resource_type = 'shop'
          18. $output = &$pagefactory->_fetch_compile ( $this->_get_resource ( $file ) );
          19. $pagefactory->&_fetch_compile($file)
          20. $this->_current_file = $file;
          21. return $output;
  6. pageFactory
  7. shopPage
  8. 入口为首页时 new ctl_page($this)
    1. 执行父 pageFactory::pagefactory( );
      1. $pageFactory->system = &$GLOBALS ['system']
      2. $pageFactory->_vars = &$this->pagedata;
      3. $pageFactory->compile_dir = HOME_DIR . "/cache/front_tmpl/"
      4. $pageFactory->memcache
      5. $pageFactory->versionTimeStamp = filemtime ( HOME_DIR . "/cache/cache.status" )
      6. $pageFactory->lang = & $this->system->lang
      7. $pageFactory->_register_resource ( "user", array (array ($this, "_get_user_template" ), array ($this, "_get_user_timestamp" ) ) );
      8. $pageFactory->_register_resource …………
        1. $pageFactory->_plugins ['resource'] [$type] = $functions;
      9. $pageFactory->_plugins ['function'] ['respath'] = array ($this, "_respath" );
    2. shopPage::shopPage();
      1. $shopPage->system = &$GLOBALS['system']
      2. $shopPage->setError( )
      3. $shopPage->header .= "<meta name=\"gene …………
      4. $this->enable_strip_whitespace = constant( "WITHOUT_STRIP_HTML" ) ?ture :false
      5. $this->_env_vars = array("base_url" => $this->system->_base_link);
    3. $ctl_page->title = $this->system->getConf( "site.homepage_title" );
      1. $setmgr->get
    4. $ctl_page->keywords = $this->system->getConf( "site.homepage_meta_key_words" );
    5. $ctl_page->desc = $this->system->getConf( "site.homepage_meta_desc" );
    6. $shopPage->getGlobal( $this->seoTag, $this->pagedata );
  9. mdl_tramsy->_parse_function
    1. compile_compile_custom_function
    2. compile.plugin_path.php
  10. 添加插件
    1. 修改:template/compile.plugin_path.php
  11. 修改过的文件
    1. 修改文件
    2. 插件目录: core\include_v5\templat\compile.plugin_path.php
    3. Header文件:\core\include_v5\smartyplugins\function.header.php
    4. Footer 文件:\core\include_v5\smartyplugins\function.footer.php
    5. config: config/config.php
      1. 禁用缓存: define('WITHOUT_CACHE',true);
      2. 禁用HTML格式化: define('WITHOUT_STRIP_HTML',true);
  12. 引入config
    1. ShopCore
      1. 初始化parent::kernel( )
        1. shopCore->run( );
          1. 请求过滤
          2. 请求过滤:shopCore->parseRequest( ) ....
          3. 默认语言:shopCore->lang
          4. 请求数组: shopCore->request = $request
          5. $page = shopCore->&_frontend( $request, $action = null )
          6. shopCore->display($page)
          7. $this->_succ = true;
          8. 输出头部 ........
          9. $header_sent = headers_sent( );
          10. cache
          11. Etag
          12. $page['header']
          13. 输出 $page['body']