| 1 | <?php |
||
| 10 | class CommandCreator |
||
| 11 | { |
||
| 12 | use Filesystem; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * Yarak config. |
||
| 16 | * |
||
| 17 | * @var Config |
||
| 18 | */ |
||
| 19 | protected $config; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Output strategy. |
||
| 23 | * |
||
| 24 | * @var Output |
||
| 25 | */ |
||
| 26 | protected $output; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Construct. |
||
| 30 | * |
||
| 31 | * @param Config $config |
||
| 32 | * @param Output $output |
||
| 33 | */ |
||
| 34 | public function __construct(Config $config, Output $output) |
||
| 39 | |||
| 40 | public function create($name) |
||
| 59 | |||
| 60 | /** |
||
| 61 | * Get the stub file and insert name. |
||
| 62 | * |
||
| 63 | * @param string $name |
||
| 64 | * |
||
| 65 | * @return string |
||
| 66 | */ |
||
| 67 | protected function getStub($name) |
||
| 73 | } |
||
| 74 |