1 | <?php |
||
21 | class Readme extends \hidev\base\Component |
||
22 | { |
||
23 | /** |
||
24 | * @var \Twig_Environment |
||
25 | */ |
||
26 | protected $_twig; |
||
27 | |||
28 | /** |
||
29 | * @var array list of sections to render |
||
30 | */ |
||
31 | protected $_sections; |
||
32 | |||
33 | public $knownBadges = []; |
||
34 | |||
35 | public $badges; |
||
36 | |||
37 | public function save($path, $type) |
||
41 | |||
42 | public function getTemplate($type) |
||
46 | |||
47 | /** |
||
48 | * Get charset. |
||
49 | * @return string |
||
50 | */ |
||
51 | public function getCharset() |
||
55 | |||
56 | 2 | public function renderH($title, $prefix) |
|
60 | |||
61 | 1 | public function renderH1($title) |
|
65 | |||
66 | 1 | public function renderH2($title) |
|
70 | |||
71 | public function renderH3($title) |
||
75 | |||
76 | public function renderText($text) |
||
82 | |||
83 | public function renderBold($text) |
||
89 | |||
90 | public function renderSection($section, $default = null) |
||
99 | |||
100 | public function getSection($file, $default = null) |
||
111 | |||
112 | /** |
||
113 | * Set sections list. |
||
114 | * @param array $value |
||
115 | */ |
||
116 | public function setSections($value) |
||
120 | |||
121 | /** |
||
122 | * Returns sections list. Returns default list if not set. |
||
123 | * @return array |
||
124 | */ |
||
125 | public function getSections() |
||
133 | |||
134 | /** |
||
135 | * Render all configured sections. |
||
136 | * @return string |
||
137 | */ |
||
138 | public function renderSections($sections = null) |
||
150 | |||
151 | /** |
||
152 | * Render all configured badges. |
||
153 | * @return string |
||
154 | */ |
||
155 | public function renderBadges() |
||
178 | |||
179 | /** |
||
180 | * Render badge by given template. |
||
181 | * @param string $template string to render |
||
182 | * @return string |
||
183 | */ |
||
184 | public function renderBadge($template) |
||
190 | |||
191 | /** |
||
192 | * Twig getter. |
||
193 | * @return \Twig_Environment |
||
194 | */ |
||
195 | public function getTwig() |
||
203 | } |
||
204 |