|
@@ -98,19 +98,19 @@ class Resp extends Object_ext {
|
|
|
public function AfterProc() {
|
|
|
// $this->tag = arr2obj(array_merge((array) $this->tag, (array) self::$ext_tag)); # 合并附加tags
|
|
|
// self::$ext_tag = ObjectInit();
|
|
|
-// $this->events = self::$ext_events; # 合并附加events
|
|
|
-// self::$ext_events = array();
|
|
|
-// if (count($this->events) > 0) { # 对于出现event的情况下自动附带store到客户端.
|
|
|
-// if (is_array($this->result)) {
|
|
|
-// if (!array_key_exists('store', (array) $this->result)) {
|
|
|
-// //$this->result['store'] = ctx()->store;
|
|
|
-// }
|
|
|
-// } else {
|
|
|
-// if (!array_key_exists('store', (array) $this->result)) {
|
|
|
-// //$this->result->store = ctx()->store;
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
+ $this->events = self::$ext_events; # 合并附加events
|
|
|
+ self::$ext_events = array();
|
|
|
+ if (count($this->events) > 0) { # 对于出现event的情况下自动附带store到客户端.
|
|
|
+ if (is_array($this->result)) {
|
|
|
+ if (!array_key_exists('task', (array) $this->result)) {
|
|
|
+ $this->result['task'] = ctx()->task;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (!array_key_exists('task', (array) $this->result)) {
|
|
|
+ $this->result->task = ctx()->task;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// <editor-fold defaultstate="collapsed" desc="附加event带回">
|