CodeExplorer BaseGeneratorStrategy example
class ProxyDumper implements DumperInterface
{ private string
$salt;
private ProxyGenerator
$proxyGenerator;
private BaseGeneratorStrategy
$classGenerator;
public function __construct(string
$salt = ''
) { $this->salt =
$salt;
$this->proxyGenerator =
new ProxyGenerator();
$this->classGenerator =
new BaseGeneratorStrategy();
} public function isProxyCandidate(Definition
$definition, bool &
$asGhostObject = null, string
$id = null
): bool
{ $asGhostObject = false;
return ($definition->
isLazy() ||
$definition->
hasTag('proxy'
)) &&
$this->proxyGenerator->
getProxifiedClass($definition);
} public function getProxyFactoryCode(Definition
$definition, string
$id, string
$factoryCode): string
{