22 $this->data = new \SplObjectStorage();
35 $this->jsonContentType = $header;
42 if (isset($this->data[$command])) {
43 $json = $this->data[$command];
48 $this->data[$command] = $json;
53 if (isset($this->data[$command])) {
55 if ($this->jsonContentType && !$request->
hasHeader(
'Content-Type')) {
56 $request->
setHeader(
'Content-Type', $this->jsonContentType);
59 $request->setBody(json_encode($this->data[$command]));
60 unset($this->data[$command]);