https://github.com/phpactor/container
Simple DI Container with parameters and tags
https://github.com/phpactor/container
Last synced: 3 months ago
JSON representation
Simple DI Container with parameters and tags
- Host: GitHub
- URL: https://github.com/phpactor/container
- Owner: phpactor
- License: mit
- Created: 2018-08-25T13:56:10.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-11-16T22:22:17.000Z (about 1 year ago)
- Last Synced: 2025-09-16T14:48:41.425Z (4 months ago)
- Language: PHP
- Size: 43 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Phpactor Container
==================
Phpactor's minimal PSR-compliant dependency injection container, featuring tags and parameters
```php
$container = new PhpactorContainer([
'param1' => 'value1',
'param2' => 'value2',
// ...
]);
$container->register('Foobar', function (Container $container) {
return new MyClass(
$container->get(SomeOtherClass::class),
$container->getParameter('param1')
);
};
```
Contributing
------------
This package is open source and welcomes contributions! Feel free to open a
pull request on this repository.
Support
-------
- Create an issue on the main [Phpactor](https://github.com/phpactor/phpactor) repository.
- Join the `#phpactor` channel on the Slack [Symfony Devs](https://symfony.com/slack-invite) channel.