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