Ejemplo n.º 1
0
 /**
  * Get origin
  *
  * @return string
  */
 public function getOrigin()
 {
     if (!empty($this->subdomain)) {
         return $this->subdomain . '.' . $this->domain->getDomain();
     } else {
         return $this->domain->getDomain();
     }
 }
Ejemplo n.º 2
0
 /**
  * Get parent domain and set some properties
  * from alias domain.
  *
  * @param Domain $domain
  *
  * @return Domain
  */
 public static function transformAliasDomain(Domain $domain)
 {
     if ($domain->getParent() !== null) {
         $parent = clone $domain->getParent();
         $parent->setDomain($domain->getDomain())->setIpaddress($domain->getIpaddress())->setCertificate($domain->getCertificate());
         return $parent;
     }
     return $domain;
 }
Ejemplo n.º 3
0
 /**
  * ServerAlias
  *
  * @return array
  */
 public function getServerAlias()
 {
     if ($this->getIsWildcard()) {
         $serveralias = self::_serveralias_prefix_wildcard;
     } else {
         $serveralias = self::_serveralias_prefix_normal;
     }
     if ($this->isSubDomain()) {
         $serveralias .= $this->subdomain->getFullDomain();
     } else {
         $serveralias .= $this->domain->getDomain();
     }
     return array($serveralias);
 }
Ejemplo n.º 4
0
 /**
  * Get full address (user@domain.de)
  *
  * @return string
  */
 public function getFullAddress()
 {
     return $this->address . '@' . $this->domain->getDomain();
 }