1 | <?php |
||
23 | class InitController extends \yii\console\Controller |
||
24 | { |
||
25 | /** |
||
26 | * @var string package full name like: vendor/package |
||
27 | */ |
||
28 | public $name; |
||
29 | |||
30 | /** |
||
31 | * @var string package type e.g.: package, yii2-extension |
||
32 | */ |
||
33 | public $type; |
||
34 | |||
35 | public $title; |
||
36 | public $package; |
||
37 | public $license; |
||
38 | public $headline; |
||
39 | public $keywords; |
||
40 | public $namespace; |
||
41 | public $description; |
||
42 | |||
43 | public $vendor; |
||
44 | public $nick; |
||
45 | public $author; |
||
46 | public $email; |
||
47 | |||
48 | public $vendorRequire; |
||
49 | |||
50 | /** |
||
51 | * @var bool don't put vendor config |
||
52 | */ |
||
53 | public $noVendor; |
||
54 | /** |
||
55 | * @var bool don't put requires |
||
56 | */ |
||
57 | public $noRequire; |
||
58 | |||
59 | /** |
||
60 | * @var bool don't generate `composer.json` file |
||
61 | */ |
||
62 | public $noComposer; |
||
63 | |||
64 | 3 | public function options($actionId) |
|
71 | |||
72 | 3 | public function prepareData($name) |
|
96 | |||
97 | /** |
||
98 | * Creates initial configuration for hidev: `hidev.yml` and `composer.json`. |
||
99 | * @param string $name package full name like: vendor/package |
||
100 | */ |
||
101 | 3 | public function actionIndex($name = null) |
|
110 | |||
111 | public function actionComposer() |
||
115 | |||
116 | 3 | public function writeConfig($path = 'hidev.yml') |
|
141 | |||
142 | 2 | public function writeComposer($path = 'composer.json') |
|
154 | |||
155 | 3 | public function getType() |
|
159 | |||
160 | 3 | public function getTitle() |
|
164 | |||
165 | 3 | public function getKeywords() |
|
169 | |||
170 | /// TODO think of better getting nick |
||
171 | 1 | public function getNick() |
|
175 | |||
176 | 1 | public function getAuthor() |
|
180 | |||
181 | 1 | public function getEmail() |
|
185 | |||
186 | /** |
||
187 | * Returns list of plugins in composer requirements format: name => version. |
||
188 | * @return array |
||
189 | */ |
||
190 | 2 | public function getPlugins() |
|
204 | } |
||
205 |