You are here

public function Doubler::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php \Prophecy\Doubler\Doubler::__construct()

Initializes doubler.

Parameters

ClassMirror $mirror:

ClassCreator $creator:

NameGenerator $namer:

File

vendor/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php, line 50

Class

Doubler
Cached class doubler. Prevents mirroring/creation of the same structure twice.

Namespace

Prophecy\Doubler

Code

public function __construct(ClassMirror $mirror = null, ClassCreator $creator = null, NameGenerator $namer = null) {
  $this->mirror = $mirror ?: new ClassMirror();
  $this->creator = $creator ?: new ClassCreator();
  $this->namer = $namer ?: new NameGenerator();
}