CoreFiles by mySites.guru
ExtensionDescriptor.php68 lines, 1,193 bytes, from Joomla_4.2.2-Stable-Full_Package.zip
Raw History Compare with 4.2.1
md5
5d3070f62b6c8609ebf58c8b562fabf7
sha1
fdaf89706ea1d45648b2d74e77a7c8cf4540963f
sha256
33dd579a9ab0c04e8485bb62bd576c23a1b97a6e95249e176853558076c9b152
<?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;

class ExtensionDescriptor
{
    /**
     * @var string
     */
    private $id;

    /**
     * @var int|null
     */
    private $tag;

    /**
     * @var string|null
     */
    private $data;

    /**
     * @var bool
     */
    private $fail_if_unknown;

    public function getId(): string
    {
        return $this->id;
    }

    public function getTag(): ?int
    {
        return $this->tag;
    }

    public function getData(): ?string
    {
        return $this->data;
    }

    public function isFailIfUnknown(): bool
    {
        return $this->fail_if_unknown;
    }

    public static function createFromArray(array $data): self
    {
        $object = new self();
        $object->id = $data['id'] ?? null;
        $object->tag = $data['tag'] ?? null;
        $object->data = $data['data'] ?? null;
        $object->fail_if_unknown = $data['fail_if_unknown'] ?? null;

        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.