Skip to content

Method for getting specific definition#192

Open
Spamercz wants to merge 10 commits intonette:masterfrom
Spamercz:get-specific-definition
Open

Method for getting specific definition#192
Spamercz wants to merge 10 commits intonette:masterfrom
Spamercz:get-specific-definition

Conversation

@Spamercz
Copy link
Copy Markdown

@Spamercz Spamercz commented Mar 22, 2019

  • new feature
  • BC break? no
  • doc PR:

There are specific addDefinition methods for each type of Definition but no getDefinition for getting specific definitions. You can only use \Nette\DI\ContainerBuilder::getDefinition with abstract return type \Nette\DI\Definitions\Definition so in your extensions you have to every time assert that you are getting right type of Definition so you can use Definition specific methods.

So I added specific Getters like \Nette\DI\ContainerBuilder::getServiceDefinition.

dg and others added 9 commits March 22, 2019 05:50
… service (nette#39)

for BC compatibility, 'class' will override 'factory'
- getServiceDefinition
- getAccessorDefinition
- getFactoryDefinition
- getLocatorDefinition
- getImportedDefinition
- in places where are specifically used methods from ServiceDefinition
- getServiceDefinition
- getAccessorDefinition
- getFactoryDefinition
- getLocatorDefinition
- getImportedDefinition
@Spamercz Spamercz force-pushed the get-specific-definition branch from 1f50a37 to 62c74fa Compare March 22, 2019 13:42
@dg dg force-pushed the master branch 7 times, most recently from 2d173ea to f6cd1c6 Compare March 26, 2019 14:49
@dg dg force-pushed the master branch 12 times, most recently from 90c07f8 to dd3170c Compare April 3, 2019 15:46
@dg dg force-pushed the master branch 3 times, most recently from b780eca to 7ae47da Compare December 17, 2019 04:38
@dg dg force-pushed the master branch 7 times, most recently from 577360f to da70799 Compare January 10, 2020 16:38
@dg dg force-pushed the master branch 4 times, most recently from 807c468 to 9e6be87 Compare January 20, 2020 20:32
@dg dg force-pushed the master branch 4 times, most recently from 5ddfaf1 to d41e22c Compare August 7, 2020 11:47
@dg dg force-pushed the master branch 4 times, most recently from 38608a6 to 766e818 Compare August 13, 2020 13:04
@dg dg force-pushed the master branch 5 times, most recently from 1c50bf6 to 8eaccb2 Compare November 2, 2020 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants