MushroomBlockTypeIdMap
in package
Uses
SingletonTrait
Table of Contents
- $enumToId : array<string|int, mixed>
- $idToEnum : array<string|int, mixed>
- $instance : self|null
- __construct() : mixed
- fromId() : MushroomBlockType|null
- getInstance() : self
- register() : void
- reset() : void
- setInstance() : void
- toId() : int
- make() : self
Properties
$enumToId
private
array<string|int, mixed>
$enumToId
= []
Tags
$idToEnum
private
array<string|int, mixed>
$idToEnum
= []
Tags
$instance
private
static self|null
$instance
= null
Methods
__construct()
public
__construct() : mixed
Return values
mixed —fromId()
public
fromId(int $id) : MushroomBlockType|null
Parameters
- $id : int
Return values
MushroomBlockType|null —getInstance()
public
static getInstance() : self
Return values
self —register()
public
register(int $id, MushroomBlockType $type) : void
Parameters
- $id : int
- $type : MushroomBlockType
Return values
void —reset()
public
static reset() : void
Return values
void —setInstance()
public
static setInstance(self $instance) : void
Parameters
- $instance : self
Return values
void —toId()
public
toId(MushroomBlockType $type) : int
Parameters
- $type : MushroomBlockType
Return values
int —make()
private
static make() : self