| 1 | <?php |
||
| 8 | abstract class AbstractCommand extends Command |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var \Assimtech\Tempo\Environment $env |
||
| 12 | */ |
||
| 13 | protected $env; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * {@inheritdoc} |
||
| 17 | * |
||
| 18 | * @param \Assimtech\Tempo\Environment $env |
||
| 19 | * |
||
| 20 | * The environment name will be prefixed to the command name, e.g. |
||
| 21 | * |
||
| 22 | * new MyCommand( |
||
| 23 | * new \Assimtech\Tempo\Environment('staging'), |
||
| 24 | * 'deploy' |
||
| 25 | * ); |
||
| 26 | * |
||
| 27 | * would result in a command: |
||
| 28 | * |
||
| 29 | * tempo staging:deploy |
||
| 30 | * |
||
| 31 | * if $name is ommited, it will default to the class name of the command, e.g. |
||
| 32 | * |
||
| 33 | * new MyCommand( |
||
| 34 | * new \Assimtech\Tempo\Environment('staging') |
||
| 35 | * ); |
||
| 36 | * |
||
| 37 | * would result in a command: |
||
| 38 | * |
||
| 39 | * tempo staging:mycommand |
||
| 40 | * |
||
| 41 | */ |
||
| 42 | 3 | public function __construct(Environment $env, $name = null) |
|
| 54 | } |
||
| 55 |