Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 3 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
| Template | |
0.00% |
0 / 3 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| __get | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| __set | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace BuyerKiosk\Core; |
| 4 | |
| 5 | /** |
| 6 | * Template |
| 7 | * |
| 8 | * Simple template class with variable binding. |
| 9 | * |
| 10 | * @package BuyerKiosk\Core |
| 11 | */ |
| 12 | class Template |
| 13 | { |
| 14 | protected $template; |
| 15 | protected $variables = array(); |
| 16 | |
| 17 | public function __construct($template) |
| 18 | { |
| 19 | $this->template = $template; |
| 20 | } |
| 21 | |
| 22 | public function __get($key) |
| 23 | { |
| 24 | return $this->variables[$key]; |
| 25 | } |
| 26 | |
| 27 | public function __set($key, $value) |
| 28 | { |
| 29 | $this->variables[$key] = $value; |
| 30 | } |
| 31 | } |