Example #1
0
 /**
  * 最终执行入口
  * @param $arg_context
  * @return mixed
  * @throws
  */
 function doExecute(\Context $arg_context)
 {
     $exc = $arg_context->Params("exc");
     if ($exc == "echo_exc") {
         file_put_contents(dirname(dirname(dirname(__FILE__))) . "/temp/testForCmd.text", "echo_exc");
         $arg_context->json_echo(new test());
     }
     if ($exc == "exc") {
         file_put_contents(dirname(dirname(dirname(__FILE__))) . "/temp/testForCmd.text", "exc");
         throw new \Exception("test Exception");
     }
     file_put_contents(dirname(dirname(dirname(__FILE__))) . "/temp/testForCmd.text", "test.test");
 }
Example #2
0
 /**
  * 最终执行入口
  * @param $arg_context
  */
 function doExecute(\Context $arg_context)
 {
     $arg_context->json_echo(array("hello" => "hello world"));
     //   trigger_error("hello world", E_USER_ERROR);
 }