__construct() __construct(int $size) : mixed Creates a new bit array with a given size. Parameters int $size Returns mixed —
ensureCapacity() ensureCapacity(int $size) : void Ensures that the array has a minimum capacity. Parameters int $size
getNextSet() getNextSet(int $from) : int Gets the next set bit position from a given position. Parameters int $from Returns int —
getNextUnset() getNextUnset(int $from) : int Gets the next unset bit position from a given position. Parameters int $from Returns int —
setRange() setRange(int $start, int $end) : void Sets a range of bits. Parameters int $start int $end Throws \BaconQrCode\Exception\InvalidArgumentException if end is smaller than start
isRange() isRange(int $start, int $end, bool $value) : bool Checks if a range of bits is set or not set. Parameters int $start int $end bool $value Throws \BaconQrCode\Exception\InvalidArgumentException if end is smaller than start Returns bool —
appendBits() appendBits(int $value, int $numBits) : void Appends a number of bits (up to 32) to the array. Parameters int $value int $numBits Throws \BaconQrCode\Exception\InvalidArgumentException if num bits is not between 0 and 32
appendBitArray() appendBitArray(self $other) : void Appends another bit array to this array. Parameters self $other
xorBits() xorBits(self $other) : void Makes an exclusive-or comparision on the current bit array. Parameters self $other Throws \BaconQrCode\Exception\InvalidArgumentException if sizes don't match
toBytes() toBytes(int $bitOffset, int $numBytes) : \SplFixedArray<int> Converts the bit array to a byte array. Parameters int $bitOffset int $numBytes Returns \SplFixedArray —
getBitArray() getBitArray() : \SplFixedArray<int> Gets the internal bit array. Returns \SplFixedArray —
__toString() __toString() : string Returns a string representation of the bit array. Returns string —