Skip to content

Instantly share code, notes, and snippets.

@stojg
Last active August 29, 2015 14:01
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 stojg/0f75c7195e8e9f6df28d to your computer and use it in GitHub Desktop.
Save stojg/0f75c7195e8e9f6df28d to your computer and use it in GitHub Desktop.
Obfuscated DI
## _config/myconfig.yml
name: OrderController
---
OrderController:
dependencies:
mailerService: %$MailerService
Injector:
MailerService:
factory: MailerFactory
MailerFactory:
class: MailerFactoryImplementation
MailLogger:
properties:
database: %$MySQLDatabase
MySQLDatabase:
constructor:
0:
server: 'localhost'
username: 'root'
password: ''
database: 'test'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment