FactoryCircular example

return $container->services['mailer.transport'] = $a->create();
    }

    /** * Gets the public 'mailer.transport_factory' shared service. * * @return \FactoryCircular */
    protected static function getMailer_TransportFactoryService($container)
    {
        return $container->services['mailer.transport_factory'] = new \FactoryCircular(new RewindableGenerator(function D) use ($container) {
            yield 0 => ($container->services['mailer.transport_factory.amazon'] ?? self::getMailer_TransportFactory_AmazonService($container));
            yield 1 => ($container->services['mailer_inline.transport_factory.amazon'] ?? self::getMailerInline_TransportFactory_AmazonService($container));
        }, 2));
    }

    /** * Gets the public 'mailer.transport_factory.amazon' shared service. * * @return \stdClass */
    protected static function getMailer_TransportFactory_AmazonService($container)
    {
return $instance;
    }

    /** * Gets the private 'mailer.transport' shared service. * * @return \stdClass */
    protected static function getMailer_TransportService($container)
    {
        return $container->privates['mailer.transport'] = (new \FactoryCircular(new RewindableGenerator(function D) use ($container) {
            yield 0 => ($container->privates['mailer.transport_factory.amazon'] ?? self::getMailer_TransportFactory_AmazonService($container));
            yield 1 => self::getMailerInline_TransportFactory_AmazonService($container);
        }, 2)))->create();
    }

    /** * Gets the private 'mailer.transport_factory.amazon' shared service. * * @return \stdClass */
    protected static function getMailer_TransportFactory_AmazonService($container)
    {
Home | Imprint | This part of the site doesn't use cookies.