class ProxyFactory extends AbstractProxyFactory (View source)

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

Methods

__construct(EntityManager $em, string $proxyDir, string $proxyNs, boolean $autoGenerate = false)

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

skipClass(ClassMetadata $metadata)

{@inheritDoc}

createProxyDefinition($className)

{@inheritDoc}

Details

__construct(EntityManager $em, string $proxyDir, string $proxyNs, boolean $autoGenerate = false)

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

Parameters

EntityManager $em The EntityManager the new factory works for.
string $proxyDir The directory to use for the proxy classes. It must exist.
string $proxyNs The namespace to use for the proxy classes.
boolean $autoGenerate Whether to automatically generate proxy classes.

protected skipClass(ClassMetadata $metadata)

{@inheritDoc}

Parameters

ClassMetadata $metadata

protected createProxyDefinition($className)

{@inheritDoc}

Parameters

$className