Part of MDL-55611 epic.
defined('MOODLE_INTERNAL') || die();
use core_calendar\action_factory;
+use core_calendar\local\event\data_access\event_vault;
use core_calendar\local\event\factories\action_event_factory;
use core_calendar\local\event\factories\event_factory;
-use core_calendar\local\event\factories\event_vault_factory;
use core_calendar\local\event\mappers\event_mapper;
use core_calendar\local\interfaces\action_event_interface;
use core_calendar\local\interfaces\event_interface;
}
if (empty(self::$eventvault)) {
- $vaultfactory = new event_vault_factory();
- self::$eventvault = $vaultfactory->create_instance(self::$eventfactory);
+ self::$eventvault = new event_vault(self::$eventfactory, self::$eventretrievalstrategy);
}
}
+++ /dev/null
-<?php
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
-/**
- * Event vault factory class
- *
- * @package core_calendar
- * @copyright 2017 Ryan Wyllie <ryan@moodle.com>
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-namespace core_calendar\local\event\factories;
-
-use core_calendar\local\event\data_access\event_vault;
-use core_calendar\local\interfaces\event_factory_interface;
-use core_calendar\local\interfaces\event_vault_factory_interface;
-
-/**
- * Event vault factory class
- *
- * @copyright 2017 Ryan Wyllie <ryan@moodle.com>
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-class event_vault_factory implements event_vault_factory_interface {
- /**
- * Creates an instance of an event vault
- *
- * @param event_factory_interface $eventfactory The event factory
- * @return event_vault_interface
- */
- public function create_instance(event_factory_interface $eventfactory) {
- return new event_vault($eventfactory);
- }
-}
+++ /dev/null
-<?php
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
-/**
- * Event vault factory interface
- *
- * @package core_calendar
- * @copyright 2017 Ryan Wyllie <ryan@moodle.com>
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-namespace core_calendar\local\interfaces;
-
-/**
- * Interface for an event vault factory class
- *
- * @copyright 2017 Ryan Wyllie <ryan@moodle.com>
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-interface event_vault_factory_interface {
- /**
- * Creates an instance of an event vault
- *
- * @param event_factory_interface $eventfactory The event factory
- * @return event_vault_interface
- */
- public function create_instance(event_factory_interface $eventfactory);
-}