<?php

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

                    $proxy->setProxyInitializer(null);

                    return true;
                });
            });
        }

        return new \stdClass();
    }
}

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