DirectAdmin\LetsEncrypt\Lib\Challenges::receiveChallenges PHP Метод

receiveChallenges() публичный Метод

Receive challanges from ACME
public receiveChallenges ( ) : string
Результат string Challenges
    public function receiveChallenges()
    {
        $domains = array_merge((array) $this->domain->getDomain(), $this->subdomains);
        foreach ($domains as $domain) {
            list($this->location[$domain], $response) = \amp\wait($this->domain->account->acme->requestChallenges($domain));
            $this->combinations[$domain] = $response->combinations;
            $this->status[$domain] = $response->status;
            $this->expires[$domain] = $response->expires;
            foreach ($response->challenges as $challenge) {
                $challengeClassName = '\\DirectAdmin\\LetsEncrypt\\Lib\\Challenges\\';
                $challengeClassName .= ucfirst(strtolower(preg_replace("/[^A-Za-z0-9 ]/", '', $challenge->type))) . 'Challenge';
                if (class_exists($challengeClassName)) {
                    $this->challenges[$domain][] = new $challengeClassName($challenge, $this->location[$domain], $this->domain, $domain);
                } else {
                    $this->challenges[$domain][] = new BaseChallenge($challenge, $this->location[$domain], $this->domain, $domain);
                }
            }
        }
        return $this->challenges;
    }