Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Context.php
Go to the documentation of this file.
1 <?php
9 
22 {
26  protected $_moduleManager;
27 
31  protected $_eventManager;
32 
36  protected $_logger;
37 
41  protected $_httpRequest;
42 
46  protected $_cacheConfig;
47 
51  protected $_urlBuilder;
52 
56  protected $_httpHeader;
57 
61  protected $_remoteAddress;
62 
66  protected $urlEncoder;
67 
71  protected $urlDecoder;
72 
76  protected $scopeConfig;
77 
93  public function __construct(
94  \Magento\Framework\Url\EncoderInterface $urlEncoder,
95  \Magento\Framework\Url\DecoderInterface $urlDecoder,
96  \Psr\Log\LoggerInterface $logger,
97  \Magento\Framework\Module\Manager $moduleManager,
98  \Magento\Framework\App\RequestInterface $httpRequest,
99  \Magento\Framework\Cache\ConfigInterface $cacheConfig,
100  \Magento\Framework\Event\ManagerInterface $eventManager,
101  \Magento\Framework\UrlInterface $urlBuilder,
102  \Magento\Framework\HTTP\Header $httpHeader,
103  \Magento\Framework\HTTP\PhpEnvironment\RemoteAddress $remoteAddress,
105  ) {
106  $this->_moduleManager = $moduleManager;
107  $this->_httpRequest = $httpRequest;
108  $this->_cacheConfig = $cacheConfig;
109  $this->_eventManager = $eventManager;
110  $this->_logger = $logger;
111  $this->_urlBuilder = $urlBuilder;
112  $this->_httpHeader = $httpHeader;
113  $this->_remoteAddress = $remoteAddress;
114  $this->urlEncoder = $urlEncoder;
115  $this->urlDecoder = $urlDecoder;
116  $this->scopeConfig = $scopeConfig;
117  }
118 
122  public function getModuleManager()
123  {
124  return $this->_moduleManager;
125  }
126 
130  public function getUrlBuilder()
131  {
132  return $this->_urlBuilder;
133  }
134 
138  public function getRequest()
139  {
140  return $this->_httpRequest;
141  }
142 
146  public function getCacheConfig()
147  {
148  return $this->_cacheConfig;
149  }
150 
154  public function getEventManager()
155  {
156  return $this->_eventManager;
157  }
158 
162  public function getLogger()
163  {
164  return $this->_logger;
165  }
166 
170  public function getHttpHeader()
171  {
172  return $this->_httpHeader;
173  }
174 
178  public function getRemoteAddress()
179  {
180  return $this->_remoteAddress;
181  }
182 
186  public function getUrlEncoder()
187  {
188  return $this->urlEncoder;
189  }
190 
194  public function getUrlDecoder()
195  {
196  return $this->urlDecoder;
197  }
198 
202  public function getScopeConfig()
203  {
204  return $this->scopeConfig;
205  }
206 }
$logger
__construct(\Magento\Framework\Url\EncoderInterface $urlEncoder, \Magento\Framework\Url\DecoderInterface $urlDecoder, \Psr\Log\LoggerInterface $logger, \Magento\Framework\Module\Manager $moduleManager, \Magento\Framework\App\RequestInterface $httpRequest, \Magento\Framework\Cache\ConfigInterface $cacheConfig, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Framework\UrlInterface $urlBuilder, \Magento\Framework\HTTP\Header $httpHeader, \Magento\Framework\HTTP\PhpEnvironment\RemoteAddress $remoteAddress, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig)
Definition: Context.php:93
$moduleManager
Definition: products.php:75