api.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 API模式定义
  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\Exception' => CORE_PATH . 'Exception'.EXT,
  23. 'Think\Model' => CORE_PATH . 'Model'.EXT,
  24. 'Think\Db' => CORE_PATH . 'Db'.EXT,
  25. 'Think\Cache' => CORE_PATH . 'Cache'.EXT,
  26. 'Think\Cache\Driver\File' => CORE_PATH . 'Cache/Driver/File'.EXT,
  27. 'Think\Storage' => CORE_PATH . 'Storage'.EXT,
  28. ),
  29. // 函数和类文件
  30. 'core' => array(
  31. MODE_PATH.'Api/functions.php',
  32. COMMON_PATH.'Common/function.php',
  33. MODE_PATH . 'Api/App'.EXT,
  34. MODE_PATH . 'Api/Dispatcher'.EXT,
  35. MODE_PATH . 'Api/Controller'.EXT,
  36. CORE_PATH . 'Behavior'.EXT,
  37. ),
  38. // 行为扩展定义
  39. 'tags' => array(
  40. ),
  41. );