DiscordPHP-Voice Documentation

BufferArrayAccessTrait uses trait:short

Table of Contents

Methods

offsetExists()  : bool
Checks if an attribute exists via key. Used for \ArrayAccess.
offsetGet()  : mixed
Gets an attribute via key. Used for \ArrayAccess.
offsetSet()  : void
Sets an attribute via key. Used for \ArrayAccess.
offsetUnset()  : void
Unsets an attribute via key. Used for \ArrayAccess.
readChar()  : string
Reads a signed char.
readInt()  : int
Reads a signed integer.
readShort()  : int
Reads an unsigned big endian short.
readUChar()  : string
Reads an unsigned char.
readUInt()  : int
Reads a signed integer.
readUIntLE()  : int
Reads a unsigned integer with little endian.
writeChar()  : self
Writes a char.
writeInt()  : self
Writes a signed integer.
writeRaw()  : void
Writes raw binary to the buffer.
writeRawString()  : void
Writes a binary string to the buffer.
writeShort()  : self
Writes an unsigned big endian short.
writeUInt()  : self
Writes an unsigned 32-bit integer in big-endian byte order so that {@see self::readUInt()} round-trips the same value.
writeUInt32BE()  : self
Writes a 32-bit unsigned integer with big endian.
writeUInt64LE()  : self
Writes a 64-bit unsigned integer with little endian.

Methods

offsetExists()

Checks if an attribute exists via key. Used for \ArrayAccess.

public offsetExists(mixed $key) : bool
Parameters
$key : mixed

The attribute key.

Return values
bool —

Whether the offset exists.

offsetGet()

Gets an attribute via key. Used for \ArrayAccess.

public offsetGet(mixed $key) : mixed
Parameters
$key : mixed

The attribute key.

Attributes
#[ReturnTypeWillChange]

offsetSet()

Sets an attribute via key. Used for \ArrayAccess.

public offsetSet(mixed $key, mixed $value) : void
Parameters
$key : mixed

The attribute key.

$value : mixed

The attribute value.

offsetUnset()

Unsets an attribute via key. Used for \ArrayAccess.

public offsetUnset(string $key) : void
Parameters
$key : string

The attribute key.

readChar()

Reads a signed char.

public readChar(int $offset) : string
Parameters
$offset : int

The offset to read from.

Return values
string —

The byte read.

readInt()

Reads a signed integer.

public readInt(int $offset) : int
Parameters
$offset : int

The offset to read from.

Return values
int —

The data read.

readShort()

Reads an unsigned big endian short.

public readShort(int $offset) : int
Parameters
$offset : int

The offset to read from.

Return values
int —

The data read.

readUChar()

Reads an unsigned char.

public readUChar(int $offset) : string
Parameters
$offset : int

The offset to read from.

Return values
string —

The byte read.

readUInt()

Reads a signed integer.

public readUInt(int $offset) : int
Parameters
$offset : int

The offset to read from.

Return values
int —

The data read.

readUIntLE()

Reads a unsigned integer with little endian.

public readUIntLE(int $offset) : int
Parameters
$offset : int

The offset that will be read.

Return values
int —

The value that is at the specified offset.

writeChar()

Writes a char.

public writeChar(string $value, int $offset) : self
Parameters
$value : string

The value that will be written.

$offset : int

The offset that the value will be written.

Return values
self

writeInt()

Writes a signed integer.

public writeInt(int $value, int $offset) : self
Parameters
$value : int

The value that will be written.

$offset : int

The offset that the value will be written.

Return values
self

writeRaw()

Writes raw binary to the buffer.

public writeRaw(int $value, int $offset) : void
Parameters
$value : int

The value that will be written.

$offset : int

The offset that the value will be written at.

writeRawString()

Writes a binary string to the buffer.

public writeRawString(string $value, int $offset) : void
Parameters
$value : string

The value that will be written.

$offset : int

The offset that the value will be written at.

writeShort()

Writes an unsigned big endian short.

public writeShort(int $value, int $offset) : self
Parameters
$value : int

The value that will be written.

$offset : int

The offset that the value will be written.

Return values
self

writeUInt()

Writes an unsigned 32-bit integer in big-endian byte order so that {@see self::readUInt()} round-trips the same value.

public writeUInt(int $value, int $offset) : self
Parameters
$value : int

The value that will be written.

$offset : int

The offset that the value will be written.

Return values
self

writeUInt32BE()

Writes a 32-bit unsigned integer with big endian.

public writeUInt32BE(int $value, int $offset) : self
Parameters
$value : int

The value that will be written.

$offset : int

The offset that the value will be written.

Return values
self

writeUInt64LE()

Writes a 64-bit unsigned integer with little endian.

public writeUInt64LE(int $value, int $offset) : self
Parameters
$value : int

The value that will be written.

$offset : int

The offset that the value will be written.

Return values
self
On this page

Search results