marcosadantas / expressive-provider
Is a abstract provider for fluent and declarative providers on service manager
1.0
2017-12-10 18:55 UTC
Requires
- php: >=7
- zendframework/zend-servicemanager: ^3.3@dev
This package is auto-updated.
Last update: 2025-03-15 12:33:38 UTC
README
How use:
When create provider class, extend ExpressiveProvider/BaseProvider
class extend ExpressiveProvider\BaseProvider
{
// This method are needed
protected function register()
{
}
}
BaseProvide have five methods above:
protected function invokables(string $contract, $service)
protected function factory(string $contract, $service)
protected function aliases(string $name, $service)
protected function config(string $name, $configs)
protected function abstractService(string $contract, $service)
You register a factories or someone with declarative functions.