Last active
March 9, 2018 11:22
-
-
Save Kcko/fdfd2bb15f49f60c3c491d2c2de0bbad to your computer and use it in GitHub Desktop.
Získávání a pojmenovávání služeb (neon)
@link: https://forum.nette.org/cs/20216-config-neon-rozdil-v-zapisu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
- \App\Model\NejakeRepository | |
services: | |
nejakeRopository: \App\Model\NejakeRepository | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
baz: Foo\Baz (pro prvni pripad) | |
- Foo\Baz (pro druhy pripad) | |
services: | |
- Foo\Bar(@baz) | |
- Foo\Bar(@Foo\Baz) | |
#multiple | |
foo1: Foo | |
foo2: Foo | |
bar: Bar(@foo1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$container->getByType('App\Model\NejakeRepository'); | |
$container->getService('nejakeRopository'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment