100 $cacheId =
'interception',
103 $this->_omConfig = $omConfig;
104 $this->_relations = $relations;
105 $this->_classDefinitions = $classDefinitions;
107 $this->_cacheId = $cacheId;
108 $this->_reader = $reader;
109 $this->_scopeList = $scopeList;
111 ->get(Serialize::class);
112 $intercepted = $this->_cache->load($this->_cacheId);
113 if ($intercepted !==
false) {
114 $this->_intercepted = $this->serializer->unserialize($intercepted);
116 $this->
initialize($this->_classDefinitions->getClasses());
130 foreach ($this->_scopeList->getAllScopes() as $scope) {
131 $config = array_replace_recursive(
$config, $this->_reader->read($scope));
134 foreach (
$config as $typeName => $typeConfig) {
135 if (!empty($typeConfig[
'plugins'])) {
136 $this->_intercepted[ltrim($typeName,
'\\')] =
true;
139 foreach (
$config as $typeName => $typeConfig) {
142 foreach ($classDefinitions as
$class) {
145 $this->_cache->save($this->serializer->serialize($this->_intercepted),
$this->_cacheId);
157 if (!isset($this->_intercepted[
$type])) {
158 $realType = $this->_omConfig->getOriginalInstanceType(
$type);
159 if (
$type !== $realType) {
161 $this->_intercepted[
$type] =
true;
165 $parts = explode(
'\\',
$type);
166 if (!in_array(end($parts), $this->_serviceClassTypes) && $this->_relations->has(
$type)) {
167 $relations = $this->_relations->getParents(
$type);
168 foreach ($relations as $relation) {
170 $this->_intercepted[
$type] =
true;
176 $this->_intercepted[
$type] =
false;
178 return $this->_intercepted[
$type];
186 if (isset($this->_intercepted[
$type])) {
187 return $this->_intercepted[
$type];
_inheritInterception($type)
$_option $_optionId $class
initialize($classDefinitions=[])
const CLEANING_MODE_MATCHING_TAG
__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, $cacheId='interception', SerializerInterface $serializer=null)