| 1 | <?php |
||
| 8 | abstract class ProtoHandler |
||
| 9 | { |
||
| 10 | public $name; |
||
| 11 | public $type; |
||
| 12 | public $defaultParam = null; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * |
||
| 16 | */ |
||
| 17 | 17 | public function initialize() |
|
| 21 | |||
| 22 | /** |
||
| 23 | * |
||
| 24 | */ |
||
| 25 | abstract public function draw(array $data); |
||
| 26 | |||
| 27 | /** |
||
| 28 | * |
||
| 29 | * @param array $sourceData |
||
| 30 | * @param string $key |
||
| 31 | * @param mixed $defaultValue |
||
| 32 | * @return mixed |
||
| 33 | */ |
||
| 34 | 10 | protected function fillParam(array $sourceData, $key, $defaultValue = null) |
|
| 40 | |||
| 41 | /** |
||
| 42 | * |
||
| 43 | * @param string $s |
||
| 44 | * @return string |
||
| 45 | */ |
||
| 46 | 9 | protected function e($s) |
|
| 50 | |||
| 51 | /** |
||
| 52 | * |
||
| 53 | * @param string $s |
||
| 54 | * @param array $data |
||
| 55 | * @return string |
||
| 56 | */ |
||
| 57 | 16 | public function postProcess($s, array $data) |
|
| 61 | } |
||
| 62 |