Doctrine\OXM\Proxy\ProxyFactory::__construct PHP Method

__construct() public method

Initializes a new instance of the ProxyFactory class that is connected to the given DocumentManager.
public __construct ( XmlEntityManager $xem, string $proxyDir, string $proxyNs, boolean $autoGenerate = false )
$xem Doctrine\OXM\XmlEntityManager The XmlEntityManager the new factory works for.
$proxyDir string The directory to use for the proxy classes. It must exist.
$proxyNs string The namespace to use for the proxy classes.
$autoGenerate boolean Whether to automatically generate proxy classes.
    public function __construct(XmlEntityManager $xem, $proxyDir, $proxyNs, $autoGenerate = false)
    {
        if (!$proxyDir) {
            throw ProxyException::proxyDirectoryRequired();
        }
        if (!$proxyNs) {
            throw ProxyException::proxyNamespaceRequired();
        }
        $this->xem = $xem;
        $this->proxyDir = $proxyDir;
        $this->autoGenerate = $autoGenerate;
        $this->proxyNamespace = $proxyNs;
    }