jsonSerialize() public method

Convert the object into something JSON serializable.
public jsonSerialize ( ) : array
return array
Exemplo n.º 1
0
 function jsonSerialize()
 {
     return $this->model->jsonSerialize();
 }
Exemplo n.º 2
0
 public function jsonSerialize()
 {
     $serialized = parent::jsonSerialize();
     return array_merge($serialized, ['buyPrice' => $this->buyPrice(), 'upgradePrice' => $this->upgradePrice()]);
 }