Documentation

LazyDouble
in package

Lazy double.

Gives simple interface to describe double before creating it.

Tags
author

Konstantin Kudryashov ever.zet@gmail.com

Table of Contents

$arguments  : mixed
$class  : mixed
$double  : mixed
$doubler  : mixed
$interfaces  : mixed
__construct()  : mixed
Initializes lazy double.
addInterface()  : mixed
Tells doubler to implement specific interface with double.
getInstance()  : DoubleInterface
Creates double instance or returns already created one.
setArguments()  : mixed
Sets constructor arguments.
setParentClass()  : mixed
Tells doubler to use specific class as parent one for double.

Properties

Methods

__construct()

Initializes lazy double.

public __construct(Doubler $doubler) : mixed
Parameters
$doubler : Doubler
Return values
mixed

addInterface()

Tells doubler to implement specific interface with double.

public addInterface(string|ReflectionClass $interface) : mixed
Parameters
$interface : string|ReflectionClass
Tags
throws
InterfaceNotFoundException
throws
DoubleException
Return values
mixed

setArguments()

Sets constructor arguments.

public setArguments([array<string|int, mixed> $arguments = null ]) : mixed
Parameters
$arguments : array<string|int, mixed> = null
Return values
mixed

setParentClass()

Tells doubler to use specific class as parent one for double.

public setParentClass(string|ReflectionClass $class) : mixed
Parameters
$class : string|ReflectionClass
Tags
throws
ClassNotFoundException
throws
DoubleException
Return values
mixed

Search results