1 | <?php |
||
17 | class Expression extends HtmlString |
||
18 | { |
||
19 | protected $widget; |
||
20 | |||
21 | /** |
||
22 | * Constructor |
||
23 | * Recieve necessary dependancies |
||
24 | * |
||
25 | * @param string $html |
||
26 | * @param BaseAbstractWidget $widget |
||
27 | */ |
||
28 | public function __construct($html, BaseAbstractWidget $widget) |
||
33 | |||
34 | /** |
||
35 | * Retrieve the instance of the widget this Expression Represents |
||
36 | * |
||
37 | * @return BaseAbstractWidget |
||
38 | */ |
||
39 | public function getWidget() |
||
43 | |||
44 | /** |
||
45 | * Magic method implementation |
||
46 | * Expose the methods of the widget through this expression |
||
47 | * |
||
48 | * @param string $method the method name to try and call |
||
49 | * @param array $params params the method requires |
||
50 | * @throws InvalidArgumentException |
||
51 | * @return mixed |
||
52 | */ |
||
53 | public function __call($method, array $params = []) |
||
66 | } |
||
67 |