ThreadLocalGeneratorContext
in package
Manages thread-local caches for generators and the things needed to support them
Table of Contents
- $contexts : array<string|int, self>
- $generator : Generator
- $worldMaxY : int
- $worldMinY : int
- __construct() : mixed
- fetch() : self|null
- getGenerator() : Generator
- getWorldMaxY() : int
- getWorldMinY() : int
- register() : void
- unregister() : void
Properties
$contexts
private
static array<string|int, self>
$contexts
= []
Tags
$generator
private
Generator
$generator
$worldMaxY
private
int
$worldMaxY
$worldMinY
private
int
$worldMinY
Methods
__construct()
public
__construct(Generator $generator, int $worldMinY, int $worldMaxY) : mixed
Parameters
- $generator : Generator
- $worldMinY : int
- $worldMaxY : int
Return values
mixed —fetch()
public
static fetch(int $worldId) : self|null
Parameters
- $worldId : int
Return values
self|null —getGenerator()
public
getGenerator() : Generator
Return values
Generator —getWorldMaxY()
public
getWorldMaxY() : int
Return values
int —getWorldMinY()
public
getWorldMinY() : int
Return values
int —register()
public
static register(self $context, int $worldId) : void
Parameters
- $context : self
- $worldId : int
Return values
void —unregister()
public
static unregister(int $worldId) : void
Parameters
- $worldId : int