| 1 | <?php |
||
| 15 | trait DefaultRenderMethod |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * Forced implementation to build a rendering closure |
||
| 19 | * |
||
| 20 | * @return \Closure |
||
| 21 | */ |
||
| 22 | abstract public function buildRenderChildrenClosure(); |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @return mixed |
||
| 26 | */ |
||
| 27 | abstract static function renderStatic( |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Default render method to render ViewHelper with |
||
| 35 | * first defined optional argument as content. |
||
| 36 | * |
||
| 37 | * @return string Rendered string |
||
| 38 | * @api |
||
| 39 | */ |
||
| 40 | public function render() |
||
| 48 | } |
||
| 49 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.