Wither example

'Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\Foo' => true,
        ];
    }

    /** * Gets the public 'wither' shared autowired service. * * @return \Symfony\Component\DependencyInjection\Tests\Compiler\Wither */
    protected static function getWitherService($container)
    {
        $instance = new \Symfony\Component\DependencyInjection\Tests\Compiler\Wither();

        $a = new \Symfony\Component\DependencyInjection\Tests\Compiler\Foo();
        $a = $a->cloneFoo();

        $instance = $instance->withFoo1($a);
        $container->services['wither'] = $instance = $instance->withFoo2($a);
        $instance->setFoo($a);

        return $instance;
    }
}

    protected static function getWitherService($container$lazyLoad = true)
    {
        $container->factories['wither'] ??= fn () => self::getWitherService($container);

        if (true === $lazyLoad) {
            return $container->createProxy('WitherProxyDd381be', static fn () => \WitherProxyDd381be::createLazyProxy(static fn () => self::getWitherService($container, false)));
        }

        $instance = new \Symfony\Component\DependencyInjection\Tests\Compiler\Wither();

        $a = ($container->privates['Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\Foo'] ??= new \Symfony\Component\DependencyInjection\Tests\Compiler\Foo());

        $instance = $instance->withFoo1($a);
        $instance = $instance->withFoo2($a);
        $instance->setFoo($a);

        return $instance;
    }
}

/** * Gets the public 'wither' shared autowired service. * * @return \Symfony\Component\DependencyInjection\Tests\Compiler\Wither */
    protected static function getWitherService($container$lazyLoad = true)
    {
        if (true === $lazyLoad) {
            return $container->services['wither'] = $container->createProxy('WitherProxy580fe0f', static fn () => \WitherProxy580fe0f::createLazyProxy(static fn () => self::getWitherService($container, false)));
        }

        $instance = new \Symfony\Component\DependencyInjection\Tests\Compiler\Wither();

        $a = new \Symfony\Component\DependencyInjection\Tests\Compiler\Foo();

        $instance = $instance->withFoo1($a);
        $instance = $instance->withFoo2($a);
        $instance->setFoo($a);

        return $instance;
    }
}

Home | Imprint | This part of the site doesn't use cookies.