translateInline = $translateInline; } /** * Set json data * * @param mixed $data * @param boolean $cycleCheck Optional; whether or not to check for object recursion; off by default * @param array $options Additional options used during encoding * @return $this */ public function setData($data, $cycleCheck = false, $options = []) { $this->json = \Zend_Json::encode($data, $cycleCheck, $options); return $this; } /** * @param string $jsonData * @return $this */ public function setJsonData($jsonData) { $this->json = (string)$jsonData; return $this; } /** * {@inheritdoc} */ protected function render(ResponseInterface $response) { $this->translateInline->processResponseBody($this->json, true); $response->representJson($this->json); return $this; } }