Documentation

Manager extends Component
in package
implements ISingleton Uses TSingleton

FinalYes
Tags
author

Ramone Burrell ramone@ramoneburrell.com

since

Version 0.1.0

Table of Contents

Interfaces

ISingleton

Constants

PROTOTYPE_MODEL_INSTANCE_KEY  = -1

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

Methods

__callStatic()

public static __callStatic(mixed $method, array<string|int, mixed> $arguments) : mixed
Parameters
$method : mixed
$arguments : array<string|int, mixed>

__get()

public __get(string $property) : mixed
Parameters
$property : string

delete()

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
bool

exists()

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
throws
InvalidArgumentException

Throws an instance of InvalidArgumentException if the model type is not provided

Return values
bool

extends()

public extends(ReflectionClass $reflector) : bool
Parameters
$reflector : ReflectionClass
Return values
bool

get()

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

getPutState()

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>|null

getReflection()

public getReflection() : ReflectionClass
Return values
ReflectionClass

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


        
On this page

Search results