summaryrefslogtreecommitdiffstats
path: root/library/Director/Objects/IcingaTimePeriod.php
diff options
context:
space:
mode:
Diffstat (limited to 'library/Director/Objects/IcingaTimePeriod.php')
-rw-r--r--library/Director/Objects/IcingaTimePeriod.php44
1 files changed, 0 insertions, 44 deletions
diff --git a/library/Director/Objects/IcingaTimePeriod.php b/library/Director/Objects/IcingaTimePeriod.php
index 1232366..081cdd9 100644
--- a/library/Director/Objects/IcingaTimePeriod.php
+++ b/library/Director/Objects/IcingaTimePeriod.php
@@ -2,9 +2,7 @@
namespace Icinga\Module\Director\Objects;
-use Icinga\Module\Director\Db;
use Icinga\Module\Director\DirectorObject\Automation\ExportInterface;
-use Icinga\Module\Director\Exception\DuplicateKeyException;
class IcingaTimePeriod extends IcingaObject implements ExportInterface
{
@@ -56,48 +54,6 @@ class IcingaTimePeriod extends IcingaObject implements ExportInterface
}
/**
- * @deprecated please use \Icinga\Module\Director\Data\Exporter
- * @return object
- * @throws \Icinga\Exception\NotFoundError
- */
- public function export()
- {
- $props = (array) $this->toPlainObject();
- ksort($props);
-
- return (object) $props;
- }
-
- /**
- * @param $plain
- * @param Db $db
- * @param bool $replace
- * @return static
- * @throws DuplicateKeyException
- * @throws \Icinga\Exception\NotFoundError
- */
- public static function import($plain, Db $db, $replace = false)
- {
- $properties = (array) $plain;
- $name = $properties['object_name'];
- $key = $name;
-
- if ($replace && static::exists($key, $db)) {
- $object = static::load($key, $db);
- } elseif (static::exists($key, $db)) {
- throw new DuplicateKeyException(
- 'Time Period "%s" already exists',
- $name
- );
- } else {
- $object = static::create([], $db);
- }
- $object->setProperties($properties);
-
- return $object;
- }
-
- /**
* Render update property
*
* Avoid complaints for method names with underscore: