1 | <?php namespace Packedge\Workbench\Generators; |
||
6 | class LicenceGenerator extends BaseGenerator implements GeneratorInterface |
||
7 | { |
||
8 | /* |
||
9 | * Composer Ids |
||
10 | * https://github.com/composer/composer/blob/master/res/spdx-identifier.json |
||
11 | */ |
||
12 | |||
13 | |||
14 | /** |
||
15 | * @var array |
||
16 | */ |
||
17 | protected static $licences = [ |
||
18 | 'MIT' => [ 'file' => 'MIT.txt', 'human' => 'MIT'], |
||
19 | 'Apache-2.0' => [ 'file' => 'Apache-2-0.txt', 'human' => 'Apache 2.0'], |
||
20 | 'GPL-3' => [ 'file' => 'GPL-3.txt', 'human' => 'GNU GPL v3.0'], |
||
21 | ]; |
||
22 | |||
23 | |||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $type = 'MIT'; |
||
28 | |||
29 | 21 | public function __construct(Filesystem $filesystem = null, Mustache_Engine $mustache = null) |
|
34 | |||
35 | public static function showList() |
||
43 | |||
44 | 6 | public static function getLicenceName($key) |
|
49 | |||
50 | 6 | public function setType($name) |
|
55 | |||
56 | 3 | public function create($packagePath) |
|
61 | } |