1 | <?php |
||
51 | class tx_crawler_domain_events_dispatcher |
||
52 | { |
||
53 | |||
54 | /** |
||
55 | * @var array of tx_crawler_domain_events_observer objects; |
||
56 | */ |
||
57 | protected $observers; |
||
58 | |||
59 | /** |
||
60 | * @var tx_crawler_domain_events_dispatcher |
||
61 | */ |
||
62 | protected static $instance; |
||
63 | |||
64 | /** |
||
65 | * The __constructor is private because the dispatcher is a singleton |
||
66 | * |
||
67 | * @param void |
||
68 | * @return void |
||
69 | */ |
||
70 | protected function __construct() |
||
71 | { |
||
72 | $this->observers = []; |
||
73 | if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['crawler/domain/events/class.tx_crawler_domain_events_dispatcher.php']['registerObservers'])) { |
||
74 | foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['crawler/domain/events/class.tx_crawler_domain_events_dispatcher.php']['registerObservers'] as $classRef) { |
||
75 | $hookObj = &\TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($classRef); |
||
|
|||
76 | if (method_exists($hookObj, 'registerObservers')) { |
||
77 | $hookObj->registerObservers($this); |
||
78 | } |
||
79 | } |
||
80 | } |
||
81 | } |
||
82 | |||
83 | /** |
||
84 | * Returns all registered eventtypes. |
||
85 | * |
||
86 | * @param void |
||
87 | * @return array array with registered events. |
||
88 | */ |
||
89 | protected function getEvents() |
||
92 | } |
||
93 | |||
94 | /** |
||
95 | * This method can be used to add an observer for an event to the dispatcher |
||
96 | * |
||
97 | * @param tx_crawler_domain_events_observer $observer_object |
||
98 | * @param string $observer_method |
||
99 | * @param string $event |
||
100 | * @return void |
||
101 | */ |
||
102 | public function addObserver(tx_crawler_domain_events_observer $observer_object, $observer_method, $event) |
||
103 | { |
||
104 | $this->observers[$event][] = ['object' => $observer_object, 'method' => $observer_method]; |
||
105 | } |
||
106 | |||
107 | /** |
||
108 | * Enables checking whether a certain event is observed by anyone |
||
109 | * |
||
110 | * @param string $event |
||
111 | * @return boolean |
||
112 | */ |
||
113 | public function hasObserver($event) |
||
116 | } |
||
117 | |||
118 | /** |
||
119 | * This method should be used to post a event to the dispatcher. Each |
||
120 | * registered observer will be notified about the event. |
||
121 | * |
||
122 | * @param string $event |
||
123 | * @param string $group |
||
124 | * @param mixed $attachedData |
||
125 | * @return void |
||
126 | */ |
||
127 | public function post($event, $group, $attachedData) |
||
128 | { |
||
129 | if (is_array($this->observers[$event])) { |
||
130 | foreach ($this->observers[$event] as $eventObserver) { |
||
131 | call_user_func([$eventObserver['object'],$eventObserver['method']], $event, $group, $attachedData); |
||
132 | } |
||
133 | } |
||
134 | } |
||
135 | |||
136 | /** |
||
137 | * Returns the instance of the dispatcher singleton |
||
138 | * |
||
139 | * @param void |
||
140 | * @return tx_crawler_domain_events_dispatcher |
||
141 | */ |
||
142 | public static function getInstance() |
||
150 | } |
||
151 | } |
||
152 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths