mirror of
https://github.com/xPaw/PHP-Source-Query.git
synced 2026-06-11 02:33:15 +02:00
Move the response array logic into classes.
This commit is contained in:
@@ -93,6 +93,22 @@ final class Buffer
|
||||
return ord($this->get(1));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get byte (boolean) from buffer.
|
||||
*/
|
||||
public function getBool(): bool
|
||||
{
|
||||
return 1 === $this->getByte();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get byte (character) from buffer.
|
||||
*/
|
||||
public function getChar(): string
|
||||
{
|
||||
return chr($this->getByte());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get short from buffer.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user