From eb4b9b69f862df8ba23cafc8cd5e4a887baa02f0 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Mon, 6 May 2019 05:45:35 +0400 Subject: Added worked a class observer Signed-off-by: Valentin Popov --- classes/event_observer.php | 48 ---------------------------------------------- 1 file changed, 48 deletions(-) delete mode 100644 classes/event_observer.php (limited to 'classes/event_observer.php') diff --git a/classes/event_observer.php b/classes/event_observer.php deleted file mode 100644 index 983552a..0000000 --- a/classes/event_observer.php +++ /dev/null @@ -1,48 +0,0 @@ -. - -/** - * Handlers of observers for events. - * - * @copyright 2018 'Valentin Popov' - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - * @package local_webhooks - */ - -namespace local_webhooks; - -defined('MOODLE_INTERNAL') || die(); - -/** - * Defines event handlers. - * - * @copyright 2018 'Valentin Popov' - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - * @package local_webhooks - */ -class event_observer { - /** - * Handler of all the events. - * Each event is put into the job queue. - * - * @param object $event - */ - public static function observe_all($event) { - $task = new \local_webhooks\task\process_events_task(); - $task->set_custom_data($event->get_data()); - \core\task\manager::queue_adhoc_task($task); - } -} \ No newline at end of file -- cgit v1.2.3