1 | <?php |
||
20 | class ReadmeController extends \hidev\controllers\TemplateController |
||
21 | { |
||
22 | protected $_twig; |
||
23 | |||
24 | 2 | public function getCharset() |
|
28 | |||
29 | 2 | public function renderH($title, $char) |
|
36 | |||
37 | 1 | public function renderH1($title) |
|
41 | |||
42 | 1 | public function renderH2($title) |
|
46 | |||
47 | public function renderText($text) |
||
53 | |||
54 | public function renderBold($text) |
||
60 | |||
61 | public function renderSection($section, $default = null) |
||
70 | |||
71 | public function getSection($file, $default = null) |
||
83 | |||
84 | public function getSections() |
||
88 | |||
89 | public function renderSections($sections = null) |
||
90 | { |
||
91 | if ($sections === null) { |
||
92 | $sections = $this->getSections(); |
||
93 | } |
||
94 | $res = ''; |
||
95 | foreach ($sections as $section) { |
||
96 | $res .= $this->renderSection($section); |
||
97 | } |
||
98 | |||
99 | return $res; |
||
100 | } |
||
101 | |||
102 | public function renderBadges() |
||
103 | { |
||
104 | $badges = $this->badges; |
||
105 | if (!$badges) { |
||
106 | return ''; |
||
107 | } |
||
108 | $pm = $this->takeGoal('package')->getPackageManager(); |
||
109 | if (!$pm || !$pm->getConfiguration()->getRequire()) { |
||
110 | unset($badges['versioneye.dependencies']); |
||
111 | } |
||
112 | $res = ''; |
||
113 | foreach ($badges as $badge => $tpl) { |
||
114 | if (!$tpl) { |
||
115 | $tpl = $this->markdownBadges[$badge]; |
||
116 | } |
||
117 | if ($tpl === 'disabled') { |
||
118 | continue; |
||
119 | } |
||
120 | $res .= $this->renderBadge($tpl) . "\n"; |
||
121 | } |
||
122 | |||
123 | return $res ? "\n$res" : ''; |
||
124 | } |
||
125 | |||
126 | public function renderBadge($tpl) |
||
130 | |||
131 | public function getTwig() |
||
132 | { |
||
139 | } |
||
140 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.