summaryrefslogtreecommitdiffstats
path: root/library/Director/Objects/IcingaTimePeriod.php
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:17:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:17:48 +0000
commite6d4dfc040bbe3cb80a2ce65b82493b557f751fc (patch)
tree40bd6366b01b06f4d96fc8638f23a772263cb5e9 /library/Director/Objects/IcingaTimePeriod.php
parentReleasing progress-linux version 1.10.2-2~progress7.99u1. (diff)
downloadicingaweb2-module-director-e6d4dfc040bbe3cb80a2ce65b82493b557f751fc.tar.xz
icingaweb2-module-director-e6d4dfc040bbe3cb80a2ce65b82493b557f751fc.zip
Merging upstream version 1.11.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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: