public function encodeUsing(\MSF\EncoderInterface $encoder) { $data = new \stdClass(); $data->rpc = $this->rpc; $data->args = $this->args; $this->encoded = $encoder->encode($data); }
public function encodeUsing(\MSF\EncoderInterface $encoder) { $data = new \stdClass(); if ($this->errors) { $data->errors = $this->errors; } else { $data->body = $this->body; } $this->encoded = $encoder->encode($data); }