1 | <?php |
||
26 | class Config extends Component implements BootstrapInterface, ConfigInterface |
||
27 | { |
||
28 | protected $_name; |
||
29 | |||
30 | protected $_authors = []; |
||
31 | |||
32 | public $configFile = 'chkipper.json'; |
||
33 | |||
34 | public $historyFile = 'history.md'; |
||
35 | |||
36 | protected $_changelog = [ |
||
37 | 'file' => 'CHANGELOG', |
||
38 | 'format' => 'markdown', |
||
39 | ]; |
||
40 | |||
41 | protected $_history = [ |
||
42 | 'file' => 'history', |
||
43 | 'format' => 'markdown', |
||
44 | ]; |
||
45 | |||
46 | public function bootstrap($app) |
||
54 | |||
55 | public function setName($name) |
||
59 | |||
60 | public function getName() |
||
64 | |||
65 | public function setChangelog(array $options) |
||
69 | |||
70 | public function getChangelog($key = null) |
||
78 | |||
79 | public function getDest($dest = null, $key = null) |
||
88 | |||
89 | public function setAuthors(array $authors) |
||
93 | |||
94 | public function getAuthors() |
||
98 | |||
99 | |||
100 | protected $_options = [ |
||
101 | 'markdown' => [ |
||
102 | 'extension' => 'md', |
||
103 | 'changelog' => [ |
||
104 | 'rendererClass' => \hiqdev\chkipper\lib\changelog\MarkdownRenderer::class, |
||
105 | 'parserClass' => \hiqdev\chkipper\lib\changelog\MarkdownParser::class, |
||
106 | ], |
||
107 | ], |
||
108 | 'keepachangelog' => [ |
||
109 | 'extension' => 'md', |
||
110 | 'changelog' => [ |
||
111 | 'rendererClass' => \hiqdev\chkipper\lib\changelog\KeepAChangelogRenderer::class, |
||
112 | ], |
||
113 | ], |
||
114 | ]; |
||
115 | |||
116 | public function setOptions(array $options) |
||
120 | |||
121 | public function getOptions() |
||
125 | |||
126 | public function getOption($key, $dest = null, $format = null) |
||
145 | |||
146 | public function createChangelogRenderer() |
||
152 | |||
153 | public function getChangelogFile() |
||
163 | } |
||
164 |
If you implement
__call
and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.This is often the case, when
__call
is implemented by a parent class and only the child class knows which methods exist: