LayerData implements DataInterface
Represents the data of a layer.
Tags
Interfaces, Classes and Traits
- DataInterface
- DataInterfaces are all objects, which can contain data.
Table of Contents
- $chunks : array<string|int, mixed>
- If map is infinite, this holds all the chunks of the layer.
- $compression : string|null
- The compression used to compress the tile layer data.
- $data : string|null
- The actual data of this data layer.
- $encoding : string|null
- The encoding used to encode the tile layer data.
- $layer : Layer|null
- To which layer does this data layer belong.
- addChunk() : self
- getChunks() : array<string|int, Chunk>
- getCompression() : string|null
- getData() : string|null
- getEncoding() : string|null
- getLayer() : Layer|null
- removeChunk() : self
- setCompression() : LayerData
- setData() : LayerData
- setEncoding() : LayerData
- setLayer() : LayerData
Properties
$chunks
If map is infinite, this holds all the chunks of the layer.
private
array<string|int, mixed>
$chunks
= []
Tags
$compression
The compression used to compress the tile layer data.
private
string|null
$compression
= null
Tags
$data
The actual data of this data layer.
private
string|null
$data
= null
Tags
$encoding
The encoding used to encode the tile layer data.
private
string|null
$encoding
= null
Tags
$layer
To which layer does this data layer belong.
private
Layer|null
$layer
Tags
Methods
addChunk()
public
addChunk(Chunk $chunk) : self
Parameters
- $chunk : Chunk
Return values
self —getChunks()
public
getChunks() : array<string|int, Chunk>
Return values
array<string|int, Chunk> —getCompression()
public
getCompression() : string|null
Return values
string|null —getData()
public
getData() : string|null
Return values
string|null —getEncoding()
public
getEncoding() : string|null
Return values
string|null —getLayer()
public
getLayer() : Layer|null
Return values
Layer|null —removeChunk()
public
removeChunk(Chunk $chunk) : self
Parameters
- $chunk : Chunk
Return values
self —setCompression()
public
setCompression(string|null $compression) : LayerData
Parameters
- $compression : string|null
Return values
LayerData —setData()
public
setData(string $data) : LayerData
Parameters
- $data : string
Return values
LayerData —setEncoding()
public
setEncoding(string|null $encoding) : LayerData
Parameters
- $encoding : string|null
Return values
LayerData —setLayer()
public
setLayer(Layer|null $layer) : LayerData
Parameters
- $layer : Layer|null