Skip to content

Commit

Permalink
di-configuration: info about passing params
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Mar 6, 2018
1 parent 6f49525 commit 6babe05
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cs/di-configuration.texy
Expand Up @@ -59,6 +59,10 @@ services:
database:
factory: PDO(%dsn%, %user%, %password%)

# s názvy parametrů (na pořadí nezáleží)
database:
factory: PDO(dsn: %dsn%, username: %user%)

# nebo ve třech řádcích :-)
database:
factory: PDO
Expand Down
4 changes: 4 additions & 0 deletions en/di-configuration.texy
Expand Up @@ -59,6 +59,10 @@ services:
database:
factory: PDO(%dsn%, %user%, %password%)

# with parameter names (the order does not matter)
database:
factory: PDO(dsn: %dsn%, username: %user%)

# or more multi-lines :-)
database:
factory: PDO
Expand Down

0 comments on commit 6babe05

Please sign in to comment.