CodeExplorer getImplementedInterfaces example
public function generate(\ReflectionClass
$originalClass, ClassGenerator
$classGenerator, array
$proxyOptions =
[]): void
{ (new LazyLoadingValueHolderGenerator())->
generate($originalClass,
$classGenerator,
$proxyOptions);
foreach ($classGenerator->
getMethods() as $method) { if (str_starts_with($originalClass->
getFilename(), __FILE__
)) { $method->
setBody(str_replace(var_export($originalClass->name, true
), '__CLASS__',
$method->
getBody()));
} } if (str_starts_with($originalClass->
getFilename(), __FILE__
)) { $interfaces =
$classGenerator->
getImplementedInterfaces();
array_pop($interfaces);
$classGenerator->
setImplementedInterfaces(array_merge($interfaces,
$originalClass->
getInterfaceNames()));
} } public function getProxifiedClass(Definition
$definition): ?string
{ if (!
$definition->
hasTag('proxy'
)) { if (!
($class =
$definition->
getClass()) || !
(class_exists($class) ||
interface_exists($class, false
))) { return null;
}