1
0
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:
Anthony Birkett
2021-05-31 18:52:56 +01:00
parent 96a875c881
commit 5d54dc8929
14 changed files with 383 additions and 207 deletions
+16
View File
@@ -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.
*