Ejemplo n.º 1
0
 /**
  * Set request.
  *
  * @param JsonRequest|null $request
  * @return $this
  */
 public function setRequest(JsonRequest $request)
 {
     $this->id = $request->getId();
     $this->jsonrpc = $request->getJsonrpc();
     $this->method = $request->getMethod();
     $this->request = $request;
     if (!$request->getResponse()) {
         $request->setResponse($this);
     }
     return $this;
 }
Ejemplo n.º 2
0
 /**
  * @param string $method
  * @param array $params
  * @param string $id
  */
 public function __construct($method, $params = [], $id = null)
 {
     parent::__construct($method, (array) $params, $id);
     // Fix input params as mixed
     $this->params = $params;
 }