15 class PluginList extends Interception\PluginList\PluginList
26 private $pluginList = [
27 self::PLUGIN_TYPE_BEFORE => [],
28 self::PLUGIN_TYPE_AROUND => [],
29 self::PLUGIN_TYPE_AFTER => []
36 private $pluginTypeMapping = [
49 $this->_loadScopedData();
51 return $this->_inherited;
63 $this->_scopePriorityScheme = $areaCodes;
85 private function getPlugins(
$type)
87 $this->_loadScopedData();
88 if (!isset($this->_inherited[
$type]) && !array_key_exists(
$type, $this->_inherited)) {
89 $this->_inheritPlugins(
$type);
91 return $this->_inherited[
$type];
105 return $this->pluginList;
108 foreach ($this->_inherited[
$className] as $plugin) {
109 foreach ($this->_definitions->getMethodList($plugin[
'instance']) as $pluginMethod => $methodTypes) {
110 $this->addPluginToList(
116 $this->addPluginToList(
122 $this->addPluginToList(
130 return $this->pluginList;
142 private function addPluginToList($pluginInstance, $pluginMethod, $methodTypes, $typeCode)
144 if ($methodTypes & $typeCode) {
145 if (!array_key_exists($pluginInstance, $this->pluginList[$this->pluginTypeMapping[$typeCode]])) {
146 $this->pluginList[$this->pluginTypeMapping[$typeCode]][$pluginInstance] = [];
149 if (!in_array($pluginMethod, $this->pluginList[$this->pluginTypeMapping[$typeCode]][$pluginInstance])) {
150 $this->pluginList[$this->pluginTypeMapping[$typeCode]][$pluginInstance][] = $pluginMethod;
isCurrentScope($scopeCode)
getPluginsListByClass($className)
setScopePriorityScheme($areaCodes)