Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Proxy.php
Go to the documentation of this file.
1 <?php
7 
12 class Proxy implements
13  \Magento\Config\Model\Config\Structure\SearchInterface,
15 {
20  protected $_objectManager;
21 
25  protected $_subject;
26 
30  public function __construct(\Magento\Framework\ObjectManagerInterface $objectManager)
31  {
32  $this->_objectManager = $objectManager;
33  }
34 
40  protected function _getSubject()
41  {
42  if (!$this->_subject) {
43  $this->_subject = $this->_objectManager->get(\Magento\Config\Model\Config\Structure::class);
44  }
45  return $this->_subject;
46  }
47 
54  public function getElement($path)
55  {
56  return $this->_getSubject()->getElement($path);
57  }
58 }
$objectManager
Definition: bootstrap.php:17
__construct(\Magento\Framework\ObjectManagerInterface $objectManager)
Definition: Proxy.php:30