Method | Description | |
---|---|---|
__construct ( |
Initializes a new instance of the ProxyFactory class that is connected to the given DocumentManager. | |
generateProxyClasses ( array $classes, string $toDir = null ) | Generates proxy classes for all given classes. | |
getProxy ( string $className, mixed $identifier ) : object | Gets a reference proxy instance for the entity of the given type and identified by the given identifier. |
Method | Description | |
---|---|---|
generateMethods ( |
Generates the methods of a proxy class. | |
generateProxyClass ( $class, $fileName, $template ) | Generates a proxy class file. | |
generateSleep ( |
Generates the code for the __sleep method for a proxy class. | |
getProxyFileName ( string $className, string $baseDir = null ) : string | Generate the Proxy file name |
public __construct ( |
||
$dm | The DocumentManager 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 generateProxyClasses ( array $classes, string $toDir = null ) | ||
$classes | array | The classes (ClassMetadata instances) for which to generate proxies. |
$toDir | string | The target directory of the proxy classes. If not specified, the directory configured on the Configuration of the DocumentManager used by this factory is used. |