protected function Doubler::createDoubleClass in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php \Prophecy\Doubler\Doubler::createDoubleClass()
Creates double class and returns its FQN.
Parameters
ReflectionClass $class:
ReflectionClass[] $interfaces:
Return value
string
2 calls to Doubler::createDoubleClass()
- CachedDoubler::createDoubleClass in vendor/
phpspec/ prophecy/ src/ Prophecy/ Doubler/ CachedDoubler.php - Creates double class and returns its FQN.
- Doubler::double in vendor/
phpspec/ prophecy/ src/ Prophecy/ Doubler/ Doubler.php - Creates double from specific class or/and list of interfaces.
1 method overrides Doubler::createDoubleClass()
- CachedDoubler::createDoubleClass in vendor/
phpspec/ prophecy/ src/ Prophecy/ Doubler/ CachedDoubler.php - Creates double class and returns its FQN.
File
- vendor/
phpspec/ prophecy/ src/ Prophecy/ Doubler/ Doubler.php, line 131
Class
- Doubler
- Cached class doubler. Prevents mirroring/creation of the same structure twice.
Namespace
Prophecy\DoublerCode
protected function createDoubleClass(ReflectionClass $class = null, array $interfaces) {
$name = $this->namer
->name($class, $interfaces);
$node = $this->mirror
->reflect($class, $interfaces);
foreach ($this->patches as $patch) {
if ($patch
->supports($node)) {
$patch
->apply($node);
}
}
$this->creator
->create($name, $node);
return $name;
}