/** * @inheritdoc */ protected function getSerializableAttributes() { $attributes = parent::getSerializableAttributes(); $attributes['method'] = $this->method; if ($this->params !== null) { $attributes['params'] = $this->params; } return $attributes; }
/** * @inheritdoc */ protected function getSerializableAttributes() { $attributes = parent::getSerializableAttributes(); if ($this->error !== null) { $attributes['error'] = $this->error; } else { $attributes['result'] = $this->result; } return $attributes; }