/** * Initializes a new instance of the <tt>ProxyFactory</tt> class that is * connected to the given <tt>DocumentManager</tt>. * * @param XmlEntityManager $xem The XmlEntityManager the new factory works for. * @param string $proxyDir The directory to use for the proxy classes. It must exist. * @param string $proxyNs The namespace to use for the proxy classes. * @param boolean $autoGenerate 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; }