You are here

public function ProxyGenerator::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php \Doctrine\Common\Proxy\ProxyGenerator::__construct()

Initializes a new instance of the <tt>ProxyFactory</tt> class that is connected to the given <tt>EntityManager</tt>.

Parameters

string $proxyDirectory The directory to use for the proxy classes. It must exist.:

string $proxyNamespace The namespace to use for the proxy classes.:

Throws

InvalidArgumentException

File

vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php, line 212

Class

ProxyGenerator
This factory is used to generate proxy classes. It builds proxies from given parameters, a template and class metadata.

Namespace

Doctrine\Common\Proxy

Code

public function __construct($proxyDirectory, $proxyNamespace) {
  if (!$proxyDirectory) {
    throw InvalidArgumentException::proxyDirectoryRequired();
  }
  if (!$proxyNamespace) {
    throw InvalidArgumentException::proxyNamespaceRequired();
  }
  $this->proxyDirectory = $proxyDirectory;
  $this->proxyNamespace = $proxyNamespace;
}