class ProxyFactory extends AbstractProxyFactory (View source)

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

Methods

__construct(EntityManagerInterface $em, string $proxyDir, string $proxyNs, boolean|int $autoGenerate = AbstractProxyFactory::AUTOGENERATE_NEVER)

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

skipClass(ClassMetadata $metadata)

{@inheritDoc}

createProxyDefinition($className)

{@inheritDoc}

Details

__construct(EntityManagerInterface $em, string $proxyDir, string $proxyNs, boolean|int $autoGenerate = AbstractProxyFactory::AUTOGENERATE_NEVER)

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

Parameters

EntityManagerInterface $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|int $autoGenerate The strategy for automatically generating proxy classes. Possible values are constants of Doctrine\Common\Proxy\AbstractProxyFactory.

protected skipClass(ClassMetadata $metadata)

{@inheritDoc}

Parameters

ClassMetadata $metadata

protected createProxyDefinition($className)

{@inheritDoc}

Parameters

$className