CoreFiles by mySites.guru
VerificationMethodANDCombinations.php44 lines, 970 bytes, from Joomla_4.4.13-Stable-Full_Package.zip
Raw History Compare with 4.4.12
md5
0b7b4a4ca49285364711f7fb064d27b5
sha1
8c18a49448f36f5be3880ba005b576c4882ac070
sha256
aff29a174449a7a50f2d36e7047ca01442032ff07c431b03369f85dc219c0e4f
<?php

declare(strict_types=1);

/*
 * The MIT License (MIT)
 *
 * Copyright (c) 2014-2019 Spomky-Labs
 *
 * This software may be modified and distributed under the terms
 * of the MIT license.  See the LICENSE file for details.
 */

namespace Webauthn\MetadataService;

use Assert\Assertion;

class VerificationMethodANDCombinations
{
    /**
     * @var VerificationMethodDescriptor[]
     */
    private $verificationMethods = [];

    /**
     * @return VerificationMethodDescriptor[]
     */
    public function getVerificationMethods(): array
    {
        return $this->verificationMethods;
    }

    public static function createFromArray(array $data): self
    {
        $object = new self();

        foreach ($data as $datum) {
            Assertion::isArray($datum, 'Invalid verificationMethod and combinations');
            $object->verificationMethods[] = VerificationMethodDescriptor::createFromArray($datum);
        }

        return $object;
    }
}

The same content is in 131 releases, Joomla 4.0.0-beta to 4.4.14. See them all, or every version of this file.