LegacyEnumShimTrait
Deprecated
This class is deprecated.
Offers a shim to make a native enum behave similarly to a legacy EnumTrait enum. Used to provide backwards compatibility for enums that have been migrated to native PHP 8.1 enums.
Methods
__callStatic()
php
public static function __callStatic(string $name, array $arguments) : selfequals()
php
public function equals(self $other) : boolDeprecated
Native enums can be safely compared with ===.
Returns whether the two objects are equivalent.
getAll()
php
public static function getAll() : arrayReturns a list of all cases, indexed by name.
id()
php
public function id() : intDeprecated
Deprecated.
Alias of spl_object_id($this).
name()
php
public function name() : stringDeprecated
Use the native enum's name property instead.
Shim for \UnitEnum::name.
