Parser
Service class for parsing tmx files.
The parser deserialize the tmx file into an object graph
Table of Contents
- $serializer : Serializer
- __construct() : mixed
- Parser constructor.
- parse() : Map
- Parses a file and returns the map object representation.
- parseTileSet() : TileSet
- Parses a tileSet file (tsx) and returns the corresponding element.
Properties
$serializer
private
Serializer
$serializer
Methods
__construct()
Parser constructor.
public
__construct() : mixed
Return values
mixed —parse()
Parses a file and returns the map object representation.
public
parse(string $file) : Map
Parameters
- $file : string
-
Path to the tmx file
Return values
Map —parseTileSet()
Parses a tileSet file (tsx) and returns the corresponding element.
public
parseTileSet(string $file[, TileSet|null $tileSet = null ]) : TileSet
Parameters
- $file : string
-
the path to the tile set file
- $tileSet : TileSet|null = null
-
TileSet object which will be populated. if null, a new tileset object will be made