Phpcraft
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | List of all members
Phpcraft\NBT\NBT Class Reference
Inheritance diagram for Phpcraft\NBT\NBT:
Inheritance graph
[legend]

Public Member Functions

 write (Connection $con, bool $inList=false)
 
 copy ()
 
 __toString ()
 
 toSNBT (bool $fancy=false, bool $inList=false)
 

Static Public Member Functions

static fromString (string $nbt)
 
static fromSNBT (string $snbt, bool $inList=false)
 
static stringFromSNBT (string $snbt)
 
static isValidBareString (string $string)
 
static stringToSNBT (string $string)
 

Public Attributes

const ORD = null
 
 $name
 

Protected Member Functions

 _write (Connection $con)
 

Static Protected Member Functions

static parseSNBTArray (string $snbt, bool $list)
 
static indentString (string $string)
 

Detailed Description

The base class for NBT (named binary tag).

See also
Connection::readNBT

Member Function Documentation

◆ __toString()

Phpcraft\NBT\NBT::__toString ( )
abstract

◆ _write()

Phpcraft\NBT\NBT::_write ( Connection  $con)
protected

◆ copy()

Phpcraft\NBT\NBT::copy ( )
abstract

◆ fromSNBT()

static Phpcraft\NBT\NBT::fromSNBT ( string  $snbt,
bool  $inList = false 
)
static

Reads NBT data from an SNBT string.

Parameters
string$snbt
bool$inListIgnore this parameter.
Returns
NBT

◆ fromString()

static Phpcraft\NBT\NBT::fromString ( string  $nbt)
static

Reads NBT data from a binary string.

Parameters
string$nbt
Returns
NBT
Exceptions
IOException

◆ indentString()

static Phpcraft\NBT\NBT::indentString ( string  $string)
staticprotected
Parameters
string$string
Returns
string

◆ isValidBareString()

static Phpcraft\NBT\NBT::isValidBareString ( string  $string)
static
Parameters
string$string
Returns
bool

◆ parseSNBTArray()

static Phpcraft\NBT\NBT::parseSNBTArray ( string  $snbt,
bool  $list 
)
staticprotected
Parameters
string$snbt
bool$list
Returns
array

◆ stringFromSNBT()

static Phpcraft\NBT\NBT::stringFromSNBT ( string  $snbt)
static
Parameters
string$snbt
Returns
string

◆ stringToSNBT()

static Phpcraft\NBT\NBT::stringToSNBT ( string  $string)
static
Parameters
string$string
Returns
string

◆ toSNBT()

Phpcraft\NBT\NBT::toSNBT ( bool  $fancy = false,
bool  $inList = false 
)
abstract

◆ write()

Phpcraft\NBT\NBT::write ( Connection  $con,
bool  $inList = false 
)
abstract

Member Data Documentation

◆ $name

string Phpcraft\NBT\NBT::$name

The name of this tag.

◆ ORD

const Phpcraft\NBT\NBT::ORD = null