@@ -42,16 +42,25 @@ discard block |
||
| 42 | 42 | return (isset(Yii::$app->charset) ? Yii::$app->charset : null) ?: mb_internal_encoding(); |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | + /** |
|
| 46 | + * @param string $prefix |
|
| 47 | + */ |
|
| 45 | 48 | public function renderH($title, $prefix) |
| 46 | 49 | { |
| 47 | 50 | return $prefix . ' ' . $title . "\n"; |
| 48 | 51 | } |
| 49 | 52 | |
| 53 | + /** |
|
| 54 | + * @param string $title |
|
| 55 | + */ |
|
| 50 | 56 | public function renderH1($title) |
| 51 | 57 | { |
| 52 | 58 | return $this->renderH($title, '#'); |
| 53 | 59 | } |
| 54 | 60 | |
| 61 | + /** |
|
| 62 | + * @param string $title |
|
| 63 | + */ |
|
| 55 | 64 | public function renderH2($title) |
| 56 | 65 | { |
| 57 | 66 | return $this->renderH($title, '##'); |
@@ -62,6 +71,9 @@ discard block |
||
| 62 | 71 | return $this->renderH($title, '###'); |
| 63 | 72 | } |
| 64 | 73 | |
| 74 | + /** |
|
| 75 | + * @param string $text |
|
| 76 | + */ |
|
| 65 | 77 | public function renderText($text) |
| 66 | 78 | { |
| 67 | 79 | $text = trim($text); |
@@ -86,6 +98,9 @@ discard block |
||
| 86 | 98 | return $text ? "\n## $section\n\n$text\n" : ''; |
| 87 | 99 | } |
| 88 | 100 | |
| 101 | + /** |
|
| 102 | + * @param string $file |
|
| 103 | + */ |
|
| 89 | 104 | public function getSection($file, $default = null) |
| 90 | 105 | { |
| 91 | 106 | $tpl = '@hidev/views/' . Helper::file2template($file); |