App.class.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2009 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 AMF模式应用程序类
  13. */
  14. class App {
  15. /**
  16. * 应用程序初始化
  17. * @access public
  18. * @return void
  19. */
  20. static public function run() {
  21. //导入类库
  22. Vendor('Zend.Amf.Server');
  23. //实例化AMF
  24. $server = new Zend_Amf_Server();
  25. $actions = explode(',',C('APP_AMF_ACTIONS'));
  26. foreach ($actions as $action)
  27. $server -> setClass($action.'Action');
  28. echo $server -> handle();
  29. // 保存日志记录
  30. if(C('LOG_RECORD')) Log::save();
  31. return ;
  32. }
  33. };