Bitset
class Bitset implements IntegerRepresentation, StringRepresentation, ArrayRepresentation, ArrayAccess (View source)
Bit storage and manipulation
Constants
| BIT_NONE |
|
| BIT_01 |
|
| BIT_02 |
|
| BIT_03 |
|
| BIT_04 |
|
| BIT_05 |
|
| BIT_06 |
|
| BIT_07 |
|
| BIT_08 |
|
| BYTE_01 |
|
| BIT_09 |
|
| BIT_10 |
|
| BIT_11 |
|
| BIT_12 |
|
| BIT_13 |
|
| BIT_14 |
|
| BIT_15 |
|
| BIT_16 |
|
| BYTE_02 |
|
| BIT_17 |
|
| BIT_18 |
|
| BIT_19 |
|
| BIT_20 |
|
| BIT_21 |
|
| BIT_22 |
|
| BIT_23 |
|
| BIT_24 |
|
| BYTE_03 |
|
| BIT_25 |
|
| BIT_26 |
|
| BIT_27 |
|
| BIT_28 |
|
| BIT_29 |
|
| BIT_30 |
|
| BIT_31 |
|
| BIT_32 |
|
| BYTE_04 |
|
| BIT_ALL |
|
Methods
static number
getMaxIntegerValue(integer $bitCount, boolean $signed = false)
Get the maximum integer value that can be stored with the given number of bits.
__construct(integer|string|array $value = 0)
No description
boolean.
match(integer|IntegerRepresentation $bits, boolean $strict = false)
Indicates if the bitset contains at least one or all bit flags of another bit set.
integer
getIntegerValue()
Get integer value of the bitset flags
string
__toString()
No description
array
getArrayCopy()
No description
string
getBinaryString(string $pad = '', number $padLength = 0, integer $padDirection = -1)
No description
offsetExists($offset)
No description
offsetGet($offset)
No description
offsetSet($offset, $value)
No description
offsetUnset($offset)
No description
Details
at line 31
static number
getMaxIntegerValue(integer $bitCount, boolean $signed = false)
Get the maximum integer value that can be stored with the given number of bits.
at line 42
__construct(integer|string|array $value = 0)
at line 78
boolean.
match(integer|IntegerRepresentation $bits, boolean $strict = false)
Indicates if the bitset contains at least one or all bit flags of another bit set.
at line 92
Bitset
add(integer|IntegerRepresentation $value)
Binary OR
at line 106
Bitset
remove(integer|IntegerRepresentation $value)
Remove bit flags
at line 119
integer
getIntegerValue()
Get integer value of the bitset flags