Guest User

NeOn example

a guest
Dec 22nd, 2015
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. ======================= NeOn / Nette format =======================
  2. parameters:
  3. odbc:
  4. dns: "some dsn"
  5. username: "some username"
  6. password: "some password"
  7.  
  8. mailer
  9. transport: smtp
  10. host: some.smtp.server
  11. user: null
  12. password: null
  13.  
  14. services:
  15. sage:
  16. myMailer: SomeMailer(%mailer.transport%, %mailer.host%)
  17. # ^-- note that this is impossible in YAML and you have to devise your classes around it
  18. # (= config.yml has to respect the class design, and cannot be flexibile)
  19.  
  20. # DibiConnection for accessing sage database
  21. database: Dibi\Connection(%odbc%)
  22.  
  23. # Models
  24. models:
  25. customer_order_model: Bundles\SageBundle\Model\Db\CustomerOrderModel(@sage.database)
  26. invoice_model: Bundles\SageBundle\Model\Db\InvoiceModel(@sage.database)
  27. product_model: Bundles\SageBundle\Model\Db\ProductModel(@sage.database)
  28. purchase_order_model: Bundles\SageBundle\Model\Db\PurchaseOrderModel(@sage.database)
  29.  
  30. # Generators
  31. generators:
  32. odbc_entities: Bundles\SageBundle\Generators\OdbcEntitiesGenerator("@sage.database", "@twig")
  33.  
  34. # DIC Controllers
  35. controllers:
  36. lookup:
  37. class: Bundles\SageBundle\Controller\LookupController
  38. arguments: [@sage.models.invoice_model, @sage.models.customer_order_model, @sage.generators.odbc_entities]
  39. startup:
  40. - setContainer(@service_container)
  41.  
  42. reporting:
  43. class: Bundles\SageBundle\Controller\ReportingController
  44. arguments: []
  45. startup:
  46. - setContainer(@service_container)
Add Comment
Please, Sign In to add comment