|
PocketMine-MP 5.39.3 git-400eb2dddf91a9c112aa09f3b498ffc8c85e98ed
|
Inheritance diagram for pocketmine\data\bedrock\block\convert\property\IntFromRawStateMap:
Collaboration diagram for pocketmine\data\bedrock\block\convert\property\IntFromRawStateMap:Public Member Functions | |
| __construct (private array $serializeMap, array $deserializeAliases=[]) | |
| getRawToValueMap () | |
| printableValue (mixed $value) | |
| rawToValue (int|string $raw) | |
| valueToRaw (mixed $value) | |
Static Public Member Functions | |
| static | int (array $serializeMap, array $deserializeAliases=[]) |
| static | string (array $serializeMap, array $deserializeAliases=[]) |
@phpstan-template TRaw of int|string @phpstan-implements StateMap<int, TRaw>
Definition at line 33 of file IntFromRawStateMap.php.
| pocketmine\data\bedrock\block\convert\property\IntFromRawStateMap::__construct | ( | private array | $serializeMap, |
| array | $deserializeAliases = [] ) |
Constructs a bidirectional mapping, given a mapping of internal values -> serialized values, and an optional set of aliases per internal value (used for deserializing invalid serialized values).
| (int|string)[] | $serializeMap |
| (int|int[])|(string|string[]) | $deserializeAliases |
@phpstan-param array<int, TRaw> $serializeMap @phpstan-param array<int, TRaw|list<TRaw>> $deserializeAliases
Definition at line 51 of file IntFromRawStateMap.php.
| pocketmine\data\bedrock\block\convert\property\IntFromRawStateMap::getRawToValueMap | ( | ) |
@phpstan-return array<TRaw, TValue>
Implements pocketmine\data\bedrock\block\convert\property\StateMap.
Definition at line 89 of file IntFromRawStateMap.php.
|
static |
| int[] | $serializeMap | |
| (int|int[]) | $deserializeAliases |
@phpstan-param array<int, int> $serializeMap @phpstan-param array<int, int|list<int>> $deserializeAliases
@phpstan-return self<int>
@phpstan-var array<TRaw, int>
Definition at line 76 of file IntFromRawStateMap.php.
| pocketmine\data\bedrock\block\convert\property\IntFromRawStateMap::printableValue | ( | mixed | $value | ) |
@phpstan-param TValue $value
Implements pocketmine\data\bedrock\block\convert\property\StateMap.
Definition at line 101 of file IntFromRawStateMap.php.
@phpstan-param TRaw $raw @phpstan-return TValue|null
Implements pocketmine\data\bedrock\block\convert\property\StateMap.
Definition at line 97 of file IntFromRawStateMap.php.
|
static |
| string[] | $serializeMap | |
| (string|string[]) | $deserializeAliases |
@phpstan-param array<int, string> $serializeMap @phpstan-param array<int, string|list<string>> $deserializeAliases
@phpstan-return self<string>
Definition at line 87 of file IntFromRawStateMap.php.
| pocketmine\data\bedrock\block\convert\property\IntFromRawStateMap::valueToRaw | ( | mixed | $value | ) |
@phpstan-param TValue $value @phpstan-return TRaw
Implements pocketmine\data\bedrock\block\convert\property\StateMap.
Definition at line 93 of file IntFromRawStateMap.php.