Manager
extends Component
in package
implements
ISingleton
Uses
TSingleton
FinalYes
Tags
Table of Contents
Interfaces
Constants
Properties
- $instance : ISingleton
- $models : array<string|int, mixed>
- $hashCode : int
- $hashCounter : int
Methods
- __call() : mixed
- __callStatic() : mixed
- __destruct() : mixed
- __get() : mixed
- create() : IModel|object
- delete() : bool
- exists() : bool
- Determines whether or not a model of a specific type and optional id exists within this manager
- extends() : bool
- get() : IModel
- getInstance() : ISingleton
- getPutState() : array<string|int, mixed>|null
- Gets a key/property-value array representation of a model as it was initially placed in this manager
- getReflection() : ReflectionClass
- put() : mixed
- replace() : bool
- Replaces a stored instance of a model within this manager with a provided one if it is currently stored
- __construct() : mixed
- init() : mixed
Constants
PROTOTYPE_MODEL_INSTANCE_KEY
public
int
PROTOTYPE_MODEL_INSTANCE_KEY
= -1
Properties
$instance
protected
static ISingleton
$instance
$models
protected
array<string|int, mixed>
$models
= []
$hashCode
private
int
$hashCode
$hashCounter
private
static int
$hashCounter
= 0
Methods
__call()
public
__call(string $method, array<string|int, mixed> $arguments) : mixed
Parameters
- $method : string
- $arguments : array<string|int, mixed>
Tags
__callStatic()
public
static __callStatic(mixed $method, array<string|int, mixed> $arguments) : mixed
Parameters
- $method : mixed
- $arguments : array<string|int, mixed>
__destruct()
public
__destruct() : mixed
__get()
public
__get(string $property) : mixed
Parameters
- $property : string
create()
public
create(string $type) : IModel|object
Parameters
- $type : string
Tags
Return values
IModel|objectdelete()
public
delete(string $type[, string|int $id = self::PROTOTYPE_MODEL_INSTANCE_KEY ]) : bool
Parameters
- $type : string
- $id : string|int = self::PROTOTYPE_MODEL_INSTANCE_KEY
Return values
boolexists()
Determines whether or not a model of a specific type and optional id exists within this manager
public
exists(string $type[, string|int $id = self::PROTOTYPE_MODEL_INSTANCE_KEY ]) : bool
Parameters
- $type : string
-
The type of the model to check if exists
- $id : string|int = self::PROTOTYPE_MODEL_INSTANCE_KEY
-
The id of the model to check if exists
Tags
Return values
boolextends()
public
extends(ReflectionClass $reflector) : bool
Parameters
- $reflector : ReflectionClass
Return values
boolget()
public
get(string $type[, string|int $id = self::PROTOTYPE_MODEL_INSTANCE_KEY ]) : IModel
Parameters
- $type : string
- $id : string|int = self::PROTOTYPE_MODEL_INSTANCE_KEY
Return values
IModel —| null
getInstance()
public
static getInstance() : ISingleton
Return values
ISingletongetPutState()
Gets a key/property-value array representation of a model as it was initially placed in this manager
public
getPutState(IModel $model) : array<string|int, mixed>|null
Parameters
- $model : IModel
Return values
array<string|int, mixed>|nullgetReflection()
public
getReflection() : ReflectionClass
Return values
ReflectionClassput()
public
put(IModel $model) : mixed
Parameters
- $model : IModel
Tags
replace()
Replaces a stored instance of a model within this manager with a provided one if it is currently stored
public
replace(IModel $model) : bool
Parameters
- $model : IModel
-
The model instance to use in replacing a possible stored model instance
Return values
bool —True if the model was sucessfully replaced, false otherwise
__construct()
protected
__construct() : mixed
init()
protected
init() : mixed