lib/Doctrine/ORM/Configuration.php
public function setAutoGenerateProxyClasses($autoGenerate) : void
    {
        $proxyManagerConfig = $this->getProxyManagerConfiguration();

        switch ((int) $autoGenerate) {
            case ProxyFactory::AUTOGENERATE_ALWAYS:
            case ProxyFactory::AUTOGENERATE_FILE_NOT_EXISTS:
                $proxyManagerConfig->setGeneratorStrategy(new FileWriterGeneratorStrategy(
                    new FileLocator($proxyManagerConfig->getProxiesTargetDir())
                ));

                return;
            case ProxyFactory::AUTOGENERATE_NEVER:
            case ProxyFactory::AUTOGENERATE_EVAL:
            default:
                $proxyManagerConfig->setGeneratorStrategy(new EvaluatingGeneratorStrategy());

                return;
        }
    }
public function setAutoGenerateProxyClasses($autoGenerate) : void
    {
        $proxyManagerConfig = $this->getProxyManagerConfiguration();

        switch ((int) $autoGenerate) {
            case ProxyFactory::AUTOGENERATE_ALWAYS:
            case ProxyFactory::AUTOGENERATE_FILE_NOT_EXISTS:
                $proxyManagerConfig->setGeneratorStrategy(new FileWriterGeneratorStrategy(
                    new FileLocator($proxyManagerConfig->getProxiesTargetDir())
                ));

                return;
            case ProxyFactory::AUTOGENERATE_NEVER:
            case ProxyFactory::AUTOGENERATE_EVAL:
            default:
                $proxyManagerConfig->setGeneratorStrategy(new EvaluatingGeneratorStrategy());

                return;
        }
    }
public function setAutoGenerateProxyClasses ( $ autoGenerate ) : void { $ proxyManagerConfig = $ this -> getProxyManagerConfiguration ( ) ; switch ( ( int ) $ autoGenerate ) { case ProxyFactory :: AUTOGENERATE_ALWAYS : case ProxyFactory :: AUTOGENERATE_FILE_NOT_EXISTS : $ proxyManagerConfig -> setGeneratorStrategy ( new FileWriterGeneratorStrategy ( new FileLocator ( $ proxyManagerConfig -> getProxiesTargetDir ( ) ) ) ) ; return ; case ProxyFactory :: AUTOGENERATE_NEVER : case ProxyFactory :: AUTOGENERATE_EVAL : default : $ proxyManagerConfig -> setGeneratorStrategy ( new EvaluatingGeneratorStrategy ( ) ) ; return ; } }
Sets the strategy for automatically generating proxy classes.

@param bool|int $autoGenerate Possible values are constants of Doctrine\ORM\Proxy\Factory\ProxyFactory.
True is converted to AUTOGENERATE_ALWAYS, false to AUTOGENERATE_NEVER.
Sets the strategy for automatically generating proxy classes .