1 <?php
2 /**
3 * Widget.php
4 *
5 * @author Elvyrra SAS
6 * @license http://rem.mit-license.org/ MIT
7 */
8
9 namespace Hawk;
10
11 /**
12 * This abstract class describes the bahavior of widgets.
13 * Widgets can be a little part of your page you want to use several times.
14 * It can be another thing : a further feature that you call on a controller action.
15 *
16 * @package Core
17 */
18 abstract class Widget extends Controller{
19 /**
20 * Display the widget
21 *
22 * @return string The HTML result of the widget displaying
23 */
24 abstract public function display();
25
26 /**
27 * Display the widget
28 *
29 * @return string The HTML result of the widget displaying
30 */
31 public function __toString(){
32 return $this->display();
33 }
34 }
35