Exemplo n.º 1
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;
 }
Exemplo n.º 2
0
 /**
  * Get Certificate
  *
  * @return Certificate
  */
 public function getCertificate()
 {
     $certificate = null;
     if ($this->getSSLEnabled()) {
         if ($this->isSubDomain()) {
             $certificate = $this->subdomain->getCertificate();
         } else {
             $certificate = $this->domain->getCertificate();
         }
     }
     return $certificate;
 }