You are here

public function ProxyGenerator::__construct in Plug 7

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

lib/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;
}