Documentation

CachedDoubler extends Doubler
in package

Cached class doubler.

Prevents mirroring/creation of the same structure twice.

Tags
author

Konstantin Kudryashov ever.zet@gmail.com

Table of Contents

$classes  : mixed
$creator  : mixed
$instantiator  : Instantiator
$mirror  : mixed
$namer  : mixed
$patches  : array<string|int, ClassPatchInterface>
__construct()  : mixed
Initializes doubler.
double()  : DoubleInterface
Creates double from specific class or/and list of interfaces.
getClassPatches()  : array<string|int, ClassPatchInterface>
Returns list of registered class patches.
registerClassPatch()  : mixed
Registers new class patch.
resetCache()  : mixed
createDoubleClass()  : string
Creates double class and returns its FQN.
generateClassId()  : string

Properties

Methods

double()

Creates double from specific class or/and list of interfaces.

public double([ReflectionClass $class = null ], array<string|int, ReflectionClass$interfaces[, array<string|int, mixed> $args = null ]) : DoubleInterface
Parameters
$class : ReflectionClass = null
$interfaces : array<string|int, ReflectionClass>

Array of ReflectionClass instances

$args : array<string|int, mixed> = null

Constructor arguments

Tags
throws
InvalidArgumentException
Return values
DoubleInterface

resetCache()

public resetCache() : mixed
Return values
mixed

createDoubleClass()

Creates double class and returns its FQN.

protected createDoubleClass([ReflectionClass $class = null ], array<string|int, mixed> $interfaces) : string
Parameters
$class : ReflectionClass = null
$interfaces : array<string|int, mixed>
Return values
string

generateClassId()

private generateClassId([ReflectionClass $class = null ], array<string|int, ReflectionClass$interfaces) : string
Parameters
$class : ReflectionClass = null
$interfaces : array<string|int, ReflectionClass>
Return values
string

Search results