![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/Ecombricks/Interception/Framework/Interception/Config/ |
<?php /** * Copyright © eComBricks. All rights reserved. * See COPYING.txt for license details. */ namespace Ecombricks\Interception\Framework\Interception\Config; /** * Interception configuration */ class Config extends \Magento\Framework\Interception\Config\Config { /** * Interception configuration * * @var \Ecombricks\Interception\Config\Config\Proxy */ protected $interceptionConfig; /** * Product metadata * * @var \Magento\Framework\App\ProductMetadata */ protected $productMetadata; /** * Constructor * * @param \Magento\Framework\Config\ReaderInterface $reader * @param \Magento\Framework\Config\ScopeListInterface $scopeList * @param \Magento\Framework\Cache\FrontendInterface $cache * @param \Magento\Framework\ObjectManager\RelationsInterface $relations * @param \Magento\Framework\Interception\ObjectManager\ConfigInterface $omConfig * @param \Magento\Framework\ObjectManager\DefinitionInterface $classDefinitions * @param \Ecombricks\Interception\Config\Config\Proxy $interceptionConfig * @param \Magento\Framework\Serialize\SerializerInterface $serializer * @param \Magento\Framework\App\ProductMetadata $productMetadata * @param string $cacheId * @return void */ public function __construct( \Magento\Framework\Config\ReaderInterface $reader, \Magento\Framework\Config\ScopeListInterface $scopeList, \Magento\Framework\Cache\FrontendInterface $cache, \Magento\Framework\ObjectManager\RelationsInterface $relations, \Magento\Framework\Interception\ObjectManager\ConfigInterface $omConfig, \Magento\Framework\ObjectManager\DefinitionInterface $classDefinitions, \Ecombricks\Interception\Config\Config\Proxy $interceptionConfig, \Magento\Framework\Serialize\SerializerInterface $serializer, \Magento\Framework\App\ProductMetadata $productMetadata, $cacheId = 'interception' ) { $this->interceptionConfig = $interceptionConfig; $this->productMetadata = $productMetadata; if (version_compare($this->productMetadata->getVersion(), '2.3.1', '>=')) { $cacheManager = \Magento\Framework\App\ObjectManager::getInstance()->get(\Magento\Framework\Interception\Config\CacheManager::class); $intercepted = $cacheManager->load($cacheId); if ($intercepted === null) { $this->preInitializeIntercepted(); } parent::__construct($reader, $scopeList, $cache, $relations, $omConfig, $classDefinitions, $cacheId, $serializer, $cacheManager); } else { parent::__construct($reader, $scopeList, $cache, $relations, $omConfig, $classDefinitions, $cacheId); } } /** * Pre-initialize intercepted * * @return $this */ protected function preInitializeIntercepted() { foreach ($this->interceptionConfig->getTypes() as $type) { $this->_intercepted[$type] = true; } return $this; } /** * Initialize * * @param array $classDefinitions * @return void */ public function initialize($classDefinitions = []) { $this->preInitializeIntercepted(); parent::initialize($classDefinitions); } }