TramwayJS

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

ArgumentCommand TypeTypeDefaultRequiredComments
nameargumentstringnoneyesThe name of the Provider class
diroptionstringconnectionsnoAn option to override the default folder the Provider class will be created in
add-dependency-injectionoptionbooleanfalsenoA flag to indicate that a service declaration should be created when making the Provider
keyoptionstringnonenoThe name of the key to use in dependency injection configuration
dependency-injection-diroptionstringservicesnoAn option to override the default folder where the service config will be placed
dependency-injection-filenameoptionstringservicesnoAn option to override the default filename of the service config
versionoptionnumberlatestnoAn option to specify which version of the class to use