CoreFiles by mySites.guru
CountryNameValue.php35 lines, 919 bytes, from Joomla_5.3.2-Stable-Full_Package.zip
Raw History Compare with 5.3.1
md5
7bfd56b35acd0bf498eb8b6fe8392312
sha1
a42d91da1b037933b18439d18fa962b2b5e1f0f1
sha256
a6ff2eca6d7201f1a3ad879dc7db134ec59ddbd11931094c22f4349926603d1a
<?php

declare(strict_types=1);

namespace SpomkyLabs\Pki\X501\ASN1\AttributeValue;

use SpomkyLabs\Pki\ASN1\Type\UnspecifiedType;
use SpomkyLabs\Pki\X501\ASN1\AttributeType;
use SpomkyLabs\Pki\X501\ASN1\AttributeValue\Feature\PrintableStringValue;

/**
 * 'countryName' attribute value.
 *
 * @see https://www.itu.int/ITU-T/formal-language/itu-t/x/x520/2012/SelectedAttributeTypes.html#SelectedAttributeTypes.countryName
 */
final class CountryNameValue extends PrintableStringValue
{
    /**
     * @param string $value String value
     */
    protected function __construct(string $value)
    {
        parent::__construct(AttributeType::OID_COUNTRY_NAME, $value);
    }

    public static function create(string $value): self
    {
        return new self($value);
    }

    public static function fromASN1(UnspecifiedType $el): self
    {
        return self::create($el->asPrintableString()->string());
    }
}

The same content is in 158 releases, Joomla 5.0.0-alpha1 to 6.3.0-alpha1. See them all, or every version of this file.