Provider
Will add a new Provider file with supported stubs and the option of adding to dependency injection.
Example
tramway create:provider MySQLProvider --add-dependency-injection --key provider.mysql
Prerequisites
- Requires
tramway-core-connection
v 2.0.0^
Options
Argument | Command Type | Type | Default | Required | Comments |
---|---|---|---|---|---|
name | argument | string | none | yes | The name of the Provider class |
dir | option | string | connections | no | An option to override the default folder the Provider class will be created in |
add-dependency-injection | option | boolean | false | no | A flag to indicate that a service declaration should be created when making the Provider |
key | option | string | none | no | The name of the key to use in dependency injection configuration |
dependency-injection-dir | option | string | services | no | An option to override the default folder where the service config will be placed |
dependency-injection-filename | option | string | services | no | An option to override the default filename of the service config |
version | option | number | latest | no | An option to specify which version of the class to use |