NoteInstrument
in package
Uses
EnumTrait
This doc-block is generated automatically, do not modify it manually.
This must be regenerated whenever registry members are added, removed or changed.
Tags
Table of Contents
- $enumName : string
- $magicNumber : int
- $nextId : int|null
- $runtimeId : int
- BASS_DRUM() : NoteInstrument
- CLICKS_AND_STICKS() : NoteInstrument
- DOUBLE_BASS() : NoteInstrument
- equals() : bool
- Returns whether the two objects are equivalent.
- getAll() : array<string|int, self>
- Returns all members of the enum.
- getMagicNumber() : int
- id() : int
- Returns a runtime-only identifier for this enum member. This will be different with each run, so don't try to hardcode it.
- name() : string
- PIANO() : NoteInstrument
- SNARE() : NoteInstrument
- register() : void
- Registers the given object as an enum member.
- registerAll() : void
- setup() : void
- __construct() : mixed
Properties
$enumName
private
string
$enumName
$magicNumber
private
int
$magicNumber
$nextId
private
static int|null
$nextId
= null
$runtimeId
private
int
$runtimeId
Methods
BASS_DRUM()
public
static BASS_DRUM() : NoteInstrument
Return values
NoteInstrument —CLICKS_AND_STICKS()
public
static CLICKS_AND_STICKS() : NoteInstrument
Return values
NoteInstrument —DOUBLE_BASS()
public
static DOUBLE_BASS() : NoteInstrument
Return values
NoteInstrument —equals()
Returns whether the two objects are equivalent.
public
equals(self $other) : bool
Parameters
- $other : self
Return values
bool —getAll()
Returns all members of the enum.
public
static getAll() : array<string|int, self>
This is overridden to change the return typehint.
Return values
array<string|int, self> —getMagicNumber()
public
getMagicNumber() : int
Return values
int —id()
Returns a runtime-only identifier for this enum member. This will be different with each run, so don't try to hardcode it.
public
id() : int
This can be useful for switches or array indexing.
Return values
int —name()
public
name() : string
Return values
string —PIANO()
public
static PIANO() : NoteInstrument
Return values
NoteInstrument —SNARE()
public
static SNARE() : NoteInstrument
Return values
NoteInstrument —register()
Registers the given object as an enum member.
protected
static register(self $member) : void
Parameters
- $member : self
Tags
Return values
void —registerAll()
protected
static registerAll(self ...$members) : void
Parameters
- $members : self
Return values
void —setup()
protected
static setup() : void
Return values
void —__construct()
private
__construct(string $name, int $magicNumber) : mixed
Parameters
- $name : string
- $magicNumber : int