class ProxyFactory extends AbstractProxyFactory (View source)

This factory is used to create proxy objects for entities at runtime.

Methods

__construct(DocumentManagerInterface $documentManager, string $proxyDir, string $proxyNamespace, bool $autoGenerate = false)

Initializes a new instance of the ProxyFactory class that is connected to the given DocumentManager.

skipClass(ClassMetadata $metadata)

{@inheritdoc}

createProxyDefinition($className)

{@inheritdoc}

Details

__construct(DocumentManagerInterface $documentManager, string $proxyDir, string $proxyNamespace, bool $autoGenerate = false)

Initializes a new instance of the ProxyFactory class that is connected to the given DocumentManager.

Parameters

DocumentManagerInterface $documentManager The DocumentManager the new factory works for.
string $proxyDir The directory to use for the proxy classes. It must exist.
string $proxyNamespace The namespace to use for the proxy classes.
bool $autoGenerate Whether to automatically generate proxy classes.

protected skipClass(ClassMetadata $metadata)

{@inheritdoc}

Parameters

ClassMetadata $metadata

protected createProxyDefinition($className)

{@inheritdoc}

Parameters

$className