CP437
CP437 = [[0, 2]]
Encapsulates a Character Set ECI, according to "Extended Channel Interpretations" 5.3.1.1 of ISO 18004.
$name : string
$ordinal : int
$values : int[]
$allValuesLoaded : array<string,bool>
$constants : array<string,array>
$otherEncodingNames : string[]
$valueToEci : array<int,self>|null
$nameToEci : array<string,self>|null
__construct(array $values, string ...$otherEncodingNames) : mixed
The constructor is private by default to avoid arbitrary enum creation.
When creating your own constructor for a parameterized enum, make sure to declare it as protected, so that the static methods are able to construct it. Avoid making it public, as that would allow creation of non-singleton enum instances.
array | $values | |
string | $otherEncodingNames variadic |
valueOf(string $name) : static
Returns an enum with the specified name.
The name must match exactly an identifier used to declare an enum in this type (extraneous whitespace characters are not permitted).
string | $name |
if the enum has no constant with the specified name
name() : string
Returns the name of this enum constant, exactly as declared in its enum declaration.
Most programmers should use the {@see \DASPRiD\Enum\self::__toString()} method in preference to this one, as the toString method may return a more user-friendly name. This method is designed primarily for use in specialized situations where correctness depends on getting the exact name, which will not vary from release to release.
ordinal() : int
Returns the ordinal of this enumeration constant (its position in its enum declaration, where the initial constant is assigned an ordinal of zero).
Most programmers will have no use for this method. It is designed for use by sophisticated enum-based data structures.
compareTo(self $other) : int
Compares this enum with the specified object for order.
Returns negative integer, zero or positive integer as this object is less than, equal to or greater than the specified object.
Enums are only comparable to other enums of the same type. The natural order implemented by this method is the order in which the constants are declared.
self | $other |
if the passed enum is not of the same type
getCharacterSetEciByValue(int $value) : ?self
Gets character set ECI by value.
Returns the representing ECI of a given value, or null if it is legal but unsupported.
int | $value |
if value is not between 0 and 900