| 1 | <?php namespace Packedge\Workbench\Generators; |
||
| 6 | class BaseGenerator |
||
| 7 | { |
||
| 8 | /** |
||
| 9 | * @var Filesystem |
||
| 10 | */ |
||
| 11 | protected $filesystem; |
||
| 12 | /** |
||
| 13 | * @var Mustache_Engine |
||
| 14 | */ |
||
| 15 | protected $mustache; |
||
| 16 | /** |
||
| 17 | * @var array |
||
| 18 | */ |
||
| 19 | protected $data = []; |
||
| 20 | /** |
||
| 21 | * @var string |
||
| 22 | */ |
||
| 23 | protected $templatePath; |
||
| 24 | /** |
||
| 25 | * @var string |
||
| 26 | */ |
||
| 27 | protected $outputPath; |
||
| 28 | /** |
||
| 29 | * @param Filesystem $filesystem |
||
| 30 | * @param Mustache_Engine $mustache |
||
| 31 | */ |
||
| 32 | 36 | public function __construct(Filesystem $filesystem = null, Mustache_Engine $mustache = null) |
|
| 37 | |||
| 38 | /** |
||
| 39 | * @param array $vars |
||
| 40 | */ |
||
| 41 | 6 | public function setData(array $vars) |
|
| 45 | |||
| 46 | /** |
||
| 47 | * @param $packagePath |
||
| 48 | * @throws \Illuminate\Filesystem\FileNotFoundException |
||
| 49 | */ |
||
| 50 | 6 | public function create($packagePath) |
|
| 58 | |||
| 59 | 6 | protected function getTemplatePath() |
|
| 63 | |||
| 64 | /** |
||
| 65 | * Provides an array of directories to be made in the package directory. |
||
| 66 | * |
||
| 67 | * @return array |
||
| 68 | */ |
||
| 69 | 9 | public function getDirectories() |
|
| 73 | } |