git subrepo commit (merge) mailcow/src/mailcow-dockerized
subrepo: subdir: "mailcow/src/mailcow-dockerized"
merged: "02ae5285"
upstream: origin: "https://github.com/mailcow/mailcow-dockerized.git"
branch: "master"
commit: "649a5c01"
git-subrepo: version: "0.4.3"
origin: "???"
commit: "???"
Change-Id: I870ad468fba026cc5abf3c5699ed1e12ff28b32b
diff --git a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/RootDse.php b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/RootDse.php
new file mode 100644
index 0000000..31156c1
--- /dev/null
+++ b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/RootDse.php
@@ -0,0 +1,85 @@
+<?php
+
+namespace Adldap\Models;
+
+use DateTime;
+
+/**
+ * Class RootDse.
+ *
+ * Represents the LDAP connections Root DSE record.
+ */
+class RootDse extends Model
+{
+ /**
+ * Returns the hosts current time in unix timestamp format.
+ *
+ * @return int
+ */
+ public function getCurrentTime()
+ {
+ $time = $this->getFirstAttribute($this->schema->currentTime());
+
+ return DateTime::createFromFormat($this->timestampFormat, $time)->getTimestamp();
+ }
+
+ /**
+ * Returns the hosts current time in the models date format.
+ *
+ * @return string
+ */
+ public function getCurrentTimeDate()
+ {
+ return (new DateTime())->setTimestamp($this->getCurrentTime())->format($this->dateFormat);
+ }
+
+ /**
+ * Returns the hosts configuration naming context.
+ *
+ * @return string
+ */
+ public function getConfigurationNamingContext()
+ {
+ return $this->getFirstAttribute($this->schema->configurationNamingContext());
+ }
+
+ /**
+ * Returns the hosts schema naming context.
+ *
+ * @return string
+ */
+ public function getSchemaNamingContext()
+ {
+ return $this->getFirstAttribute($this->schema->schemaNamingContext());
+ }
+
+ /**
+ * Returns the hosts DNS name.
+ *
+ * @return string
+ */
+ public function getDnsHostName()
+ {
+ return $this->getFirstAttribute($this->schema->dnsHostName());
+ }
+
+ /**
+ * Returns the current hosts server name.
+ *
+ * @return string
+ */
+ public function getServerName()
+ {
+ return $this->getFirstAttribute($this->schema->serverName());
+ }
+
+ /**
+ * Returns the DN of the root domain NC for this DC's forest.
+ *
+ * @return mixed
+ */
+ public function getRootDomainNamingContext()
+ {
+ return $this->getFirstAttribute($this->schema->rootDomainNamingContext());
+ }
+}