| 1 | <?php |
||
| 10 | abstract class PrintableAscii extends BaseImplementation |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * {@inheritdoc} |
||
| 14 | */ |
||
| 15 | 34 | public function __construct(array $options = []) |
|
| 19 | |||
| 20 | /** |
||
| 21 | * Escape given ASCII codepoint |
||
| 22 | * |
||
| 23 | * @param integer $cp |
||
| 24 | * @return string |
||
| 25 | */ |
||
| 26 | 6 | protected function escapeAscii($cp) |
|
| 30 | |||
| 31 | /** |
||
| 32 | * Escape given control code |
||
| 33 | * |
||
| 34 | * @param integer $cp |
||
| 35 | * @return string |
||
| 36 | */ |
||
| 37 | 6 | protected function escapeControlCode($cp) |
|
| 43 | |||
| 44 | /** |
||
| 45 | * Output the representation of a unicode character |
||
| 46 | * |
||
| 47 | * @param integer $cp Unicode codepoint |
||
| 48 | * @return string |
||
| 49 | */ |
||
| 50 | abstract protected function escapeUnicode($cp); |
||
| 51 | |||
| 52 | /** |
||
| 53 | * {@inheritdoc} |
||
| 54 | */ |
||
| 55 | 32 | protected function outputValidValue($value) |
|
| 69 | } |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: