Exemple #1
0
 /**
  * Initialize from a list of PEMs.
  *
  * @param PEM ...$pems
  * @return self
  */
 public static function fromPEMs(PEM ...$pems)
 {
     $certs = array_map(function (PEM $pem) {
         return Certificate::fromPEM($pem);
     }, $pems);
     return new self(...$certs);
 }
Exemple #2
0
 /**
  * Get self with single certificate from PEM added.
  *
  * @param PEM $pem
  * @return self
  */
 public function withPEM(PEM $pem)
 {
     $certs = $this->_certs;
     $certs[] = Certificate::fromPEM($pem);
     return new self(...$certs);
 }