1 | <?php |
||
7 | abstract class Presenter |
||
8 | { |
||
9 | /** |
||
10 | * Model. |
||
11 | * |
||
12 | * @var Model |
||
13 | */ |
||
14 | protected $model; |
||
15 | |||
16 | /** |
||
17 | * @param $model |
||
18 | */ |
||
19 | 2 | public function __construct($model) |
|
23 | |||
24 | /** |
||
25 | * Get model attribute. |
||
26 | * |
||
27 | * @param $key |
||
28 | * @return mixed |
||
29 | */ |
||
30 | 1 | public function getAttribute($key) |
|
34 | |||
35 | /** |
||
36 | * Allow for property-style retrieval. |
||
37 | * |
||
38 | * @param $property |
||
39 | * @return mixed |
||
40 | */ |
||
41 | 1 | public function __get($property) |
|
49 | } |
||
50 |