Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: possibility to call method during service initialization #8

Open
kocuj opened this issue Feb 13, 2018 · 0 comments
Open

Proposal: possibility to call method during service initialization #8

kocuj opened this issue Feb 13, 2018 · 0 comments
Assignees
Milestone

Comments

@kocuj
Copy link
Owner

kocuj commented Feb 13, 2018

There should be possibility to calling some method during service initialization. It can be array in the next argument for add() method.

For example:
$container->addShared('someService', SomeService::class, [], [ 'create', ]);

will call create() method after adding service to DI container.

@kocuj kocuj self-assigned this Mar 3, 2018
@kocuj kocuj added this to the Version 2.0.0 milestone May 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant