sae.php 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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: luofei614 <weibo.com/luofei614>
  10. // +----------------------------------------------------------------------
  11. /**
  12. * ThinkPHP SAE应用模式定义文件
  13. */
  14. return array(
  15. // 配置文件
  16. 'config' => array(
  17. THINK_PATH.'Conf/convention.php', // 系统惯例配置
  18. CONF_PATH.'config'.CONF_EXT, // 应用公共配置
  19. MODE_PATH.'Sae/convention.php',//[sae] sae的惯例配置
  20. ),
  21. // 别名定义
  22. 'alias' => array(
  23. 'Think\Log' => CORE_PATH . 'Log'.EXT,
  24. 'Think\Log\Driver\File' => CORE_PATH . 'Log/Driver/File'.EXT,
  25. 'Think\Exception' => CORE_PATH . 'Exception'.EXT,
  26. 'Think\Model' => CORE_PATH . 'Model'.EXT,
  27. 'Think\Db' => CORE_PATH . 'Db'.EXT,
  28. 'Think\Template' => CORE_PATH . 'Template'.EXT,
  29. 'Think\Cache' => CORE_PATH . 'Cache'.EXT,
  30. 'Think\Cache\Driver\File' => CORE_PATH . 'Cache/Driver/File'.EXT,
  31. 'Think\Storage' => CORE_PATH . 'Storage'.EXT,
  32. ),
  33. // 函数和类文件
  34. 'core' => array(
  35. THINK_PATH.'Common/functions.php',
  36. COMMON_PATH.'Common/function.php',
  37. CORE_PATH . 'Hook'.EXT,
  38. CORE_PATH . 'App'.EXT,
  39. CORE_PATH . 'Dispatcher'.EXT,
  40. //CORE_PATH . 'Log'.EXT,
  41. CORE_PATH . 'Route'.EXT,
  42. CORE_PATH . 'Controller'.EXT,
  43. CORE_PATH . 'View'.EXT,
  44. BEHAVIOR_PATH . 'ParseTemplateBehavior'.EXT,
  45. BEHAVIOR_PATH . 'ContentReplaceBehavior'.EXT,
  46. ),
  47. // 行为扩展定义
  48. 'tags' => array(
  49. 'app_begin' => array(
  50. 'Behavior\ReadHtmlCacheBehavior', // 读取静态缓存
  51. ),
  52. 'app_end' => array(
  53. 'Behavior\ShowPageTraceBehavior', // 页面Trace显示
  54. ),
  55. 'view_parse' => array(
  56. 'Behavior\ParseTemplateBehavior', // 模板解析 支持PHP、内置模板引擎和第三方模板引擎
  57. ),
  58. 'template_filter'=> array(
  59. 'Behavior\ContentReplaceBehavior', // 模板输出替换
  60. ),
  61. 'view_filter' => array(
  62. 'Behavior\WriteHtmlCacheBehavior', // 写入静态缓存
  63. ),
  64. ),
  65. );