Documentation

TileFactory
in package
Uses SingletonTrait

Table of Contents

$instance  : self|null
$knownTiles  : array<string|int, string>
$saveNames  : array<string|int, string>
__construct()  : mixed
getInstance()  : self
getSaveId()  : string
register()  : void
reset()  : void
setInstance()  : void
make()  : self

Properties

$knownTiles

private array<string|int, string> $knownTiles = []

classes that extend Tile

Tags
phpstan-var

array<string, class-string<Tile>>

$saveNames

private array<string|int, string> $saveNames = []
Tags
phpstan-var

array<class-string<Tile>, string>

Methods

__construct()

public __construct() : mixed
Return values
mixed

getInstance()

public static getInstance() : self
Return values
self

getSaveId()

public getSaveId(string $class) : string
Parameters
$class : string
Tags
phpstan-param

class-string<Tile> $class

Return values
string

register()

public register(string $className[, array<string|int, string> $saveNames = [] ]) : void
Parameters
$className : string
$saveNames : array<string|int, string> = []
Tags
phpstan-param

class-string<Tile> $className

Return values
void

setInstance()

public static setInstance(self $instance) : void
Parameters
$instance : self
Return values
void

Search results