<?php

use %a
class LazyServiceProjectServiceContainer extends Container
{%a
    protected static function getFooService($container, $lazyLoad = true)
    {
        if (true === $lazyLoad) {
            return $container->services['foo'] = $container->createProxy('stdClass_%s', static fn () => %S\stdClass_%s(
                static function (&$wrappedInstance, \ProxyManager\Proxy\LazyLoadingInterface $proxy) use ($container) {
                    $wrappedInstance = self::getFooService($container, false);

                    $proxy->setProxyInitializer(null);

                    return true;
                }
            ));
        }

        return new \stdClass();
    }
}

class stdClass_%s extends \stdClass implements \ProxyManager\%s
{%a}%A
