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
{ $instantiation = 'return';
if ($definition->
isShared()) { $instantiation .=
sprintf(' $container->%s[%s] =',
$definition->
isPublic() && !
$definition->
isPrivate() ? 'services' : 'privates',
var_export($id, true
));
} $proxifiedClass =
new \
ReflectionClass($this->proxyGenerator->
getProxifiedClass($definition));