AcmePhp\Cli\Repository\RepositoryInterface::hasDomainCertificate PHP Method

hasDomainCertificate() public method

Check if there is a certificate associated to the given domain in the repository.
public hasDomainCertificate ( string $domain ) : boolean
$domain string
return boolean
    public function hasDomainCertificate($domain);

Usage Example

Example #1
0
 private function hasValidCertificate($domain, array $alternativeNames)
 {
     if (!$this->repository->hasDomainCertificate($domain)) {
         return false;
     }
     if (!$this->repository->hasDomainKeyPair($domain)) {
         return false;
     }
     if (!$this->repository->hasDomainDistinguishedName($domain)) {
         return false;
     }
     if ($this->repository->loadDomainDistinguishedName($domain)->getSubjectAlternativeNames() != $alternativeNames) {
         return false;
     }
     return true;
 }