private function AbstractProxyFactory::getProxyDefinition in Plug 7
Get a proxy definition for the given class name.
Parameters
string $className:
Return value
2 calls to AbstractProxyFactory::getProxyDefinition()
- AbstractProxyFactory::getProxy in lib/
doctrine/ common/ lib/ Doctrine/ Common/ Proxy/ AbstractProxyFactory.php - Gets a reference proxy instance for the entity of the given type and identified by the given identifier.
- AbstractProxyFactory::resetUninitializedProxy in lib/
doctrine/ common/ lib/ Doctrine/ Common/ Proxy/ AbstractProxyFactory.php - Reset initialization/cloning logic for an un-initialized proxy
File
- lib/
doctrine/ common/ lib/ Doctrine/ Common/ Proxy/ AbstractProxyFactory.php, line 196
Class
- AbstractProxyFactory
- Abstract factory for proxy objects.
Namespace
Doctrine\Common\ProxyCode
private function getProxyDefinition($className) {
$classMetadata = $this->metadataFactory
->getMetadataFor($className);
$className = $classMetadata
->getName();
// aliases and case sensitivity
$this->definitions[$className] = $this
->createProxyDefinition($className);
$proxyClassName = $this->definitions[$className]->proxyClassName;
if (!class_exists($proxyClassName, false)) {
$fileName = $this->proxyGenerator
->getProxyFileName($className);
switch ($this->autoGenerate) {
case self::AUTOGENERATE_NEVER:
require $fileName;
break;
case self::AUTOGENERATE_FILE_NOT_EXISTS:
if (!file_exists($fileName)) {
$this->proxyGenerator
->generateProxyClass($classMetadata, $fileName);
}
require $fileName;
break;
case self::AUTOGENERATE_ALWAYS:
$this->proxyGenerator
->generateProxyClass($classMetadata, $fileName);
require $fileName;
break;
case self::AUTOGENERATE_EVAL:
$this->proxyGenerator
->generateProxyClass($classMetadata, false);
break;
}
}
return $this->definitions[$className];
}