LicenseDomainCollection example

$domains = array_map(static function D$data) use ($currentLicenseDomain) {
            $domain = idn_to_utf8($data['domain']);

            return (new LicenseDomainStruct())->assign([
                'domain' => $domain,
                'edition' => $data['edition']['label'],
                'verified' => $data['verified'] ?? false,
                'active' => $domain === $currentLicenseDomain,
            ]);
        }$licenseDomains);

        return new LicenseDomainCollection($domains);
    }

    public function verifyLicenseDomain(string $domain, Context $context, bool $testEnvironment = false): LicenseDomainStruct
    {
        $domains = $this->getLicenseDomains($context);

        $existing = $domains->get($domain);
        if (!$existing || !$existing->isVerified()) {
            $secretResponse = $this->frwClient->fetchVerificationInfo($domain$context);
            $secret = new DomainVerificationRequestStruct($secretResponse['content']$secretResponse['fileName']);
            $this->storeVerificationSecret($domain$secret);
            
Home | Imprint | This part of the site doesn't use cookies.