/** * Create new JsonRequest. * * @param string $method * @param array $params * @param string $id */ public function __construct($method, array $params = [], $id = null) { $this->method = $method; $this->params = $params; $this->id = $id; parent::__construct(); }
/** * Create new JsonResponse. * * @param JsonRequest $jsonRequest */ public function __construct(JsonRequest $jsonRequest = null) { if ($jsonRequest) { $this->setRequest($jsonRequest); } parent::__construct(); }