Repository
Will add a new Repository file with supported stubs and the option of adding to dependency injection with linked connection.
Example
tramway create:repository ProductRepository --add-dependency-injection --connection provider.product --key repository.products
Options
Argument | Command Type | Type | Default | Required | Comments |
---|---|---|---|---|---|
name | argument | string | none | yes | The name of the Repository class |
dir | option | string | repositories | no | An option to override the default folder the Repository 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 Repository |
key | option | string | none | no | The name of the key to use in dependency injection configuration |
connection | option | string | none | no | The key of the connection in the service declaration |
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 |