mProxy = new proxy(); } protected function handle($msg) { if (empty($msg)) { Log::record('empty body', Log::DEBUG); } else { foreach ($msg as $key => $params) { Log::record("start one", Log::DEBUG); if (empty($params)) continue; $method = strtolower($key); try { if ($method == 'add') { $this->mProxy->add($params); } elseif ($method == 'notify') { $channel = $params['channel']; $input = $params['input']; $this->mProxy->notify($channel,$input); } else { Log::record("Error msg", Log::DEBUG); } } catch (Exception $x) { Log::record($x->getMessage(), Log::ERR); } } } } }