PocketMine-MP  1.4 - API 1.10.0
 All Classes Namespaces Functions Variables Pages
pocketmine\utils\Binary Class Reference
+ Collaboration diagram for pocketmine\utils\Binary:

Static Public Member Functions

static readTriad ($str)
 
static writeTriad ($value)
 
static readLTriad ($str)
 
static writeLTriad ($value)
 
static writeMetadata (array $data)
 
static readMetadata ($value, $types=false)
 
static readBool ($b)
 
static writeBool ($b)
 
static readByte ($c, $signed=true)
 
static writeByte ($c)
 
static readShort ($str)
 
static readSignedShort ($str)
 
static writeShort ($value)
 
static readLShort ($str)
 
static readSignedLShort ($str)
 
static writeLShort ($value)
 
static readInt ($str)
 
static writeInt ($value)
 
static readLInt ($str)
 
static writeLInt ($value)
 
static readFloat ($str)
 
static writeFloat ($value)
 
static readLFloat ($str)
 
static writeLFloat ($value)
 
static printFloat ($value)
 
static readDouble ($str)
 
static writeDouble ($value)
 
static readLDouble ($str)
 
static writeLDouble ($value)
 
static readLong ($x)
 
static writeLong ($value)
 
static readLLong ($str)
 
static writeLLong ($value)
 

Public Attributes

const BIG_ENDIAN = 0x00
 
const LITTLE_ENDIAN = 0x01
 

Detailed Description

WARNING: This class is available on the PocketMine-MP Zephir project. If this class is modified, remember to modify the PHP C extension.

Definition at line 31 of file Binary.php.

Member Function Documentation

static pocketmine\utils\Binary::readBool (   $b)
static

Reads a byte boolean

Parameters
$b
Returns
bool

Definition at line 204 of file Binary.php.

static pocketmine\utils\Binary::readByte (   $c,
  $signed = true 
)
static

Reads an unsigned/signed byte

Parameters
string$c
bool$signed
Returns
int

Definition at line 227 of file Binary.php.

static pocketmine\utils\Binary::readLShort (   $str)
static

Reads a 16-bit unsigned little-endian number

Parameters
$str
Returns
int

Definition at line 296 of file Binary.php.

static pocketmine\utils\Binary::readLTriad (   $str)
static

Reads a 3-byte little-endian number

Parameters
$str
Returns
mixed

Definition at line 65 of file Binary.php.

static pocketmine\utils\Binary::readMetadata (   $value,
  $types = false 
)
static

Reads a metadata coded string TODO: Change

Parameters
$value
bool$types
Returns
array

Definition at line 134 of file Binary.php.

static pocketmine\utils\Binary::readShort (   $str)
static

Reads a 16-bit unsigned big-endian number

Parameters
$str
Returns
int

Definition at line 259 of file Binary.php.

static pocketmine\utils\Binary::readSignedLShort (   $str)
static

Reads a 16-bit signed little-endian number

Parameters
$str
Returns
int

Definition at line 307 of file Binary.php.

static pocketmine\utils\Binary::readSignedShort (   $str)
static

Reads a 16-bit signed big-endian number

Parameters
$str
Returns
int

Definition at line 270 of file Binary.php.

static pocketmine\utils\Binary::readTriad (   $str)
static

Reads a 3-byte big-endian number

Parameters
$str
Returns
mixed

Definition at line 43 of file Binary.php.

static pocketmine\utils\Binary::writeBool (   $b)
static

Writes a byte boolean

Parameters
$b
Returns
bool|string

Definition at line 215 of file Binary.php.

static pocketmine\utils\Binary::writeByte (   $c)
static

Writes an unsigned/signed byte

Parameters
$c
Returns
string

Definition at line 248 of file Binary.php.

static pocketmine\utils\Binary::writeLShort (   $value)
static

Writes a 16-bit signed/unsigned little-endian number

Parameters
$value
Returns
string

Definition at line 322 of file Binary.php.

static pocketmine\utils\Binary::writeLTriad (   $value)
static

Writes a 3-byte little-endian number

Parameters
$value
Returns
string

Definition at line 76 of file Binary.php.

static pocketmine\utils\Binary::writeMetadata ( array  $data)
static

Writes a coded metadata string TODO: Replace and move this to entity

Parameters
array$data
Returns
string

Definition at line 88 of file Binary.php.

static pocketmine\utils\Binary::writeShort (   $value)
static

Writes a 16-bit signed/unsigned big-endian number

Parameters
$value
Returns
string

Definition at line 285 of file Binary.php.

Referenced by pocketmine\level\generator\GenerationRequestManager\openLevel().

+ Here is the caller graph for this function:

static pocketmine\utils\Binary::writeTriad (   $value)
static

Writes a 3-byte big-endian number

Parameters
$value
Returns
string

Definition at line 54 of file Binary.php.


The documentation for this class was generated from the following file: