/** * Receives notification from plugin manager and processes it. * * @param SubjectInterface $lms_plugin_manager Plugin manager */ public function receiveUpdate(SubjectInterface $lms_plugin_manager) { $hook_name = $lms_plugin_manager->getHookName(); $hook_data = $lms_plugin_manager->getHookData(); $new_hook_data = $this->dispatcher($hook_name, $hook_data); $lms_plugin_manager->setHookData($new_hook_data); }
/** * {@inheritDoc} */ public function receiveUpdate(SubjectInterface $subject) { $this->order = self::$counter++; $this->subject = $subject; if ($this->double) { $subject->notifyObservers(); } if ($this->test) { $this->test->assertTrue(Property::get($subject, 'updating'), 'The subject should be updating.'); } if ($this->interrupt) { $this->reason = new ReasonException('Testing interruption.'); $subject->interruptUpdate($this->reason); } }
/** * {@inheritDoc} */ public function replaceObservers(SubjectInterface $subject) { $this->observers = $subject->getObservers(); }