Skip to content

Instantly share code, notes, and snippets.

@dg
Created August 19, 2014 21:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dg/00ae93962614dfcb7d41 to your computer and use it in GitHub Desktop.
Save dg/00ae93962614dfcb7d41 to your computer and use it in GitHub Desktop.
DI: Symfony versus Nette
services:
newsletter_factory: NewsletterFactory
newsletter_manager: @newsletter_factory::get(@templating)
parameters:
newsletter_manager.class: NewsletterManager
newsletter_factory.class: NewsletterFactory
services:
newsletter_factory:
class: "%newsletter_factory.class%"
newsletter_manager:
class: "%newsletter_manager.class%"
factory_service: newsletter_factory
factory_method: get
arguments:
- "@templating"
@TomasVotruba
Copy link

TomasVotruba commented Jan 1, 2019

Random visitor passing by in 2019...

# symfony
services:
    App\:
        resource: '../'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment