Documentation

LayerData implements DataInterface

Represents the data of a layer.

Tags
see
https://doc.mapeditor.org/en/stable/reference/tmx-map-format/#data

Documentation

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

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

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

Search results