EnumFromRawStateMap
Implements StateMap
Methods
__construct()
php
public function __construct(string $class, \Closure $mapper, ?\Closure $aliasMapper = null)getRawToValueMap()
php
public function getRawToValueMap() : arrayint()
php
public static function int(string $class, \Closure $mapper, ?\Closure $aliasMapper = null) : selfWorkaround PHPStan too-specific literal type inference - if it ever gets fixed we can get rid of these functions
printableValue()
php
public function printableValue(mixed $value) : stringrawToValue()
php
public function rawToValue(int|string $raw) : ?\UnitEnumstring()
php
public static function string(string $class, \Closure $mapper, ?\Closure $aliasMapper = null) : selfWorkaround PHPStan too-specific literal type inference - if it ever gets fixed we can get rid of these functions
valueToRaw()
php
public function valueToRaw(mixed $value) : int|string