public function AbstractProxyFactory::resetUninitializedProxy in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php \Doctrine\Common\Proxy\AbstractProxyFactory::resetUninitializedProxy()
Reset initialization/cloning logic for an un-initialized proxy
Parameters
\Doctrine\Common\Proxy\Proxy $proxy:
Return value
Throws
\Doctrine\Common\Proxy\Exception\InvalidArgumentException
File
- vendor/
doctrine/ common/ lib/ Doctrine/ Common/ Proxy/ AbstractProxyFactory.php, line 172
Class
- AbstractProxyFactory
- Abstract factory for proxy objects.
Namespace
Doctrine\Common\ProxyCode
public function resetUninitializedProxy(Proxy $proxy) {
if ($proxy
->__isInitialized()) {
throw InvalidArgumentException::unitializedProxyExpected($proxy);
}
$className = ClassUtils::getClass($proxy);
$definition = isset($this->definitions[$className]) ? $this->definitions[$className] : $this
->getProxyDefinition($className);
$proxy
->__setInitializer($definition->initializer);
$proxy
->__setCloner($definition->cloner);
return $proxy;
}