do init template path struct
Showing
24 changed files
with
59 additions
and
62 deletions
1 | -<?php return function ($in, $debugopt = 1) { | ||
2 | - $cx = array( | ||
3 | - 'flags' => array( | ||
4 | - 'jstrue' => false, | ||
5 | - 'jsobj' => false, | ||
6 | - 'spvar' => true, | ||
7 | - 'prop' => false, | ||
8 | - 'method' => false, | ||
9 | - 'mustlok' => true, | ||
10 | - 'echo' => false, | ||
11 | - 'debug' => $debugopt, | ||
12 | - ), | ||
13 | - 'constants' => array(), | ||
14 | - 'helpers' => array(), | ||
15 | - 'blockhelpers' => array(), | ||
16 | - 'hbhelpers' => array(), | ||
17 | - 'partials' => array(), | ||
18 | - 'scopes' => array(), | ||
19 | - 'sp_vars' => array('root' => $in), | ||
20 | - 'lcrun' => 'Plugin\LCRun3', | ||
21 | - | ||
22 | - ); | ||
23 | - | ||
24 | - return ''.'<!DOCTYPE html> | ||
25 | -<html> | ||
26 | -<head> | ||
27 | - <meta charset="utf-8"> | ||
28 | - <title>'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('title')), ENT_QUOTES, 'UTF-8').'</title> | ||
29 | - <meta name="keywords" content="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('keywords')), ENT_QUOTES, 'UTF-8').'"> | ||
30 | - <meta name="description" content="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('description')), ENT_QUOTES, 'UTF-8').'"> | ||
31 | - <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"> | ||
32 | - <meta http-equiv="cleartype" content="on"> | ||
33 | - <meta name="apple-mobile-web-app-status-bar-style" content="black" /> | ||
34 | - <meta content="telephone=no" name="format-detection" /> | ||
35 | - <meta content="email=no" name="format-detection" /> | ||
36 | -</head> | ||
37 | -<body>'.' | ||
38 | -This is a test '.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('test')), ENT_QUOTES, 'UTF-8').' | ||
39 | - | ||
40 | -'.'</body> | ||
41 | -</html>'.''; | ||
42 | -} | ||
43 | -?> |
static/README.md
0 → 100644
1 | +存放静态资源 |
1 | <?php | 1 | <?php |
2 | /** | 2 | /** |
3 | + * 错误错误控制器 | ||
4 | + * | ||
3 | * @name ErrorController | 5 | * @name ErrorController |
4 | * @desc 错误控制器, 在发生未捕获的异常时刻被调用 | 6 | * @desc 错误控制器, 在发生未捕获的异常时刻被调用 |
5 | * @see http://www.php.net/manual/en/yaf-dispatcher.catchexception.php | 7 | * @see http://www.php.net/manual/en/yaf-dispatcher.catchexception.php |
6 | - * @author liuziyang | ||
7 | */ | 8 | */ |
8 | use Action\AbstractAction; | 9 | use Action\AbstractAction; |
9 | 10 | ||
10 | class ErrorController extends AbstractAction | 11 | class ErrorController extends AbstractAction |
11 | { | 12 | { |
12 | 13 | ||
13 | - public function indexAction($exception) | 14 | + public function indexAction() |
14 | { | 15 | { |
15 | header('HTTP/1.1 404 Not Found'); | 16 | header('HTTP/1.1 404 Not Found'); |
16 | header('Status: 404 Not Found'); | 17 | header('Status: 404 Not Found'); |
17 | - | ||
18 | - $this->_view->render('error'); | 18 | + } |
19 | + | ||
20 | + public function errorAction($exception) | ||
21 | + { | ||
22 | + header('HTTP/1.1 404 Not Found'); | ||
23 | + header('Status: 404 Not Found'); | ||
24 | + | ||
25 | + echo $exception->getMessage(); | ||
26 | + //$this->_view->render('error'); | ||
19 | } | 27 | } |
20 | 28 | ||
21 | } | 29 | } |
1 | <?php | 1 | <?php |
2 | use Action\AbstractAction; | 2 | use Action\AbstractAction; |
3 | /** | 3 | /** |
4 | - * 逛首页 | 4 | + * 搜索页 |
5 | */ | 5 | */ |
6 | -class LifestyleController extends AbstractAction | 6 | +class SearchController extends AbstractAction |
7 | { | 7 | { |
8 | public function indexAction() | 8 | public function indexAction() |
9 | { | 9 | { |
10 | - echo 'guang'; | 10 | + echo 'search'; |
11 | } | 11 | } |
12 | } | 12 | } |
1 | +<?php | ||
2 | +use Action\AbstractAction; | ||
3 | +/** | ||
4 | + * 明星品牌和原创品牌 | ||
5 | + */ | ||
6 | +class PlusstarController extends AbstractAction | ||
7 | +{ | ||
8 | + | ||
9 | + /** | ||
10 | + * 品牌列表页 | ||
11 | + */ | ||
12 | + public function listAction() | ||
13 | + { | ||
14 | + $this->_view->assign('title', 'YOHO!有货'); | ||
15 | + $this->_view->display('list', array('test' => 'hello world')); | ||
16 | + } | ||
17 | + | ||
18 | + /** | ||
19 | + * 品牌介绍页 | ||
20 | + */ | ||
21 | + public function detailAction() | ||
22 | + { | ||
23 | + | ||
24 | + } | ||
25 | + | ||
26 | +} |
@@ -3,8 +3,8 @@ | @@ -3,8 +3,8 @@ | ||
3 | application.directory = APPLICATION_PATH "/application" | 3 | application.directory = APPLICATION_PATH "/application" |
4 | ;;website library | 4 | ;;website library |
5 | application.library = ROOT_PATH "/library" | 5 | application.library = ROOT_PATH "/library" |
6 | -;;默认模块 | ||
7 | -application.modules = "Index" | 6 | +;;模块配置 |
7 | +application.modules = "Index,Category,Channel,Guang,Passport,Product" | ||
8 | ;;加载 | 8 | ;;加载 |
9 | application.bootstrap = APPLICATION_PATH "/application/Bootstrap.php" | 9 | application.bootstrap = APPLICATION_PATH "/application/Bootstrap.php" |
10 | ;;view文件的扩展名 | 10 | ;;view文件的扩展名 |
@@ -4,7 +4,7 @@ application.directory = APPLICATION_PATH "/application" | @@ -4,7 +4,7 @@ application.directory = APPLICATION_PATH "/application" | ||
4 | ;;website library | 4 | ;;website library |
5 | application.library = ROOT_PATH "/library" | 5 | application.library = ROOT_PATH "/library" |
6 | ;;默认模块 | 6 | ;;默认模块 |
7 | -application.modules = "Index" | 7 | +application.modules = "Index,Category,Channel,Guang,Passport,Product" |
8 | ;;加载 | 8 | ;;加载 |
9 | application.bootstrap = APPLICATION_PATH "/application/Bootstrap.php" | 9 | application.bootstrap = APPLICATION_PATH "/application/Bootstrap.php" |
10 | ;;view文件的扩展名 | 10 | ;;view文件的扩展名 |
@@ -4,7 +4,7 @@ application.directory = APPLICATION_PATH "/application" | @@ -4,7 +4,7 @@ application.directory = APPLICATION_PATH "/application" | ||
4 | ;;website library | 4 | ;;website library |
5 | application.library = ROOT_PATH "/library" | 5 | application.library = ROOT_PATH "/library" |
6 | ;;默认模块 | 6 | ;;默认模块 |
7 | -application.modules = "Index" | 7 | +application.modules = "Index,Category,Channel,Guang,Passport,Product" |
8 | ;;加载 | 8 | ;;加载 |
9 | application.bootstrap = APPLICATION_PATH "/application/Bootstrap.php" | 9 | application.bootstrap = APPLICATION_PATH "/application/Bootstrap.php" |
10 | ;;view文件的扩展名 | 10 | ;;view文件的扩展名 |
1 | ; default | 1 | ; default |
2 | -;routes.index.type = "rewrite" | ||
3 | -;routes.index.match = "/(index|index.html)$" | ||
4 | -;routes.index.route.module = Default | ||
5 | -;routes.index.route.controller = Index | ||
6 | -;routes.index.route.action = Index | 2 | +routes.index.type = "rewrite" |
3 | +routes.index.match = "/index.html$" | ||
4 | +routes.index.route.module = Index | ||
5 | +routes.index.route.controller = Index | ||
6 | +routes.index.route.action = Index | ||
7 | 7 | ||
8 | ; error | 8 | ; error |
9 | routes.notfound.type = "rewrite" | 9 | routes.notfound.type = "rewrite" |
10 | -routes.notfound.match = "/error.html" | ||
11 | -routes.notfound.route.module = Default | 10 | +routes.notfound.match = "/error.html$" |
11 | +routes.notfound.route.module = Index | ||
12 | routes.notfound.route.controller = Error | 12 | routes.notfound.route.controller = Error |
13 | -routes.notfound.route.action = notfound | ||
13 | +routes.notfound.route.action = Index |
-
Please register or login to post a comment