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