Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Encoder.php
Go to the documentation of this file.
1 <?php
6 namespace Magento\Framework\Json;
7 
11 class Encoder implements EncoderInterface
12 {
18  protected $translateInline;
19 
23  public function __construct(\Magento\Framework\Translate\InlineInterface $translateInline)
24  {
25  $this->translateInline = $translateInline;
26  }
27 
34  public function encode($data)
35  {
36  $this->translateInline->processResponseBody($data);
37  return \Zend_Json::encode($data);
38  }
39 }
__construct(\Magento\Framework\Translate\InlineInterface $translateInline)
Definition: Encoder.php:23