Documentation

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

$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.
createDoubleClass()  : string
Creates double class and returns its FQN.

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

createDoubleClass()

Creates double class and returns its FQN.

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

Search results