You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
2.8 KiB

3 years ago
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2006-2014 http://thinkphp.cn All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  8. // +----------------------------------------------------------------------
  9. // | Author: liu21st <liu21st@gmail.com>
  10. // +----------------------------------------------------------------------
  11. /**
  12. * ThinkPHP 普通模式定义
  13. */
  14. return array(
  15. // 配置文件
  16. 'config' => array(
  17. THINK_PATH.'Conf/convention.php', // 系统惯例配置
  18. CONF_PATH.'config'.CONF_EXT, // 应用公共配置
  19. ),
  20. // 别名定义
  21. 'alias' => array(
  22. 'Think\Log' => CORE_PATH . 'Log'.EXT,
  23. 'Think\Log\Driver\File' => CORE_PATH . 'Log/Driver/File'.EXT,
  24. 'Think\Exception' => CORE_PATH . 'Exception'.EXT,
  25. 'Think\Model' => CORE_PATH . 'Model'.EXT,
  26. 'Think\Db' => CORE_PATH . 'Db'.EXT,
  27. 'Think\Template' => CORE_PATH . 'Template'.EXT,
  28. 'Think\Cache' => CORE_PATH . 'Cache'.EXT,
  29. 'Think\Cache\Driver\File' => CORE_PATH . 'Cache/Driver/File'.EXT,
  30. 'Think\Storage' => CORE_PATH . 'Storage'.EXT,
  31. ),
  32. // 函数和类文件
  33. 'core' => array(
  34. THINK_PATH.'Common/functions.php',
  35. COMMON_PATH.'Common/function.php',
  36. CORE_PATH . 'Hook'.EXT,
  37. CORE_PATH . 'App'.EXT,
  38. CORE_PATH . 'Dispatcher'.EXT,
  39. //CORE_PATH . 'Log'.EXT,
  40. CORE_PATH . 'Route'.EXT,
  41. CORE_PATH . 'Controller'.EXT,
  42. CORE_PATH . 'View'.EXT,
  43. BEHAVIOR_PATH . 'BuildLiteBehavior'.EXT,
  44. BEHAVIOR_PATH . 'ParseTemplateBehavior'.EXT,
  45. BEHAVIOR_PATH . 'ContentReplaceBehavior'.EXT,
  46. ),
  47. // 行为扩展定义
  48. 'tags' => array(
  49. 'app_init' => array(
  50. 'Behavior\BuildLiteBehavior', // 生成运行Lite文件
  51. ),
  52. 'app_begin' => array(
  53. 'Behavior\ReadHtmlCacheBehavior', // 读取静态缓存
  54. ),
  55. 'app_end' => array(
  56. 'Behavior\ShowPageTraceBehavior', // 页面Trace显示
  57. ),
  58. 'view_parse' => array(
  59. 'Behavior\ParseTemplateBehavior', // 模板解析 支持PHP、内置模板引擎和第三方模板引擎
  60. ),
  61. 'template_filter'=> array(
  62. 'Behavior\ContentReplaceBehavior', // 模板输出替换
  63. ),
  64. 'view_filter' => array(
  65. 'Behavior\WriteHtmlCacheBehavior', // 写入静态缓存
  66. ),
  67. ),
  68. );