| 1 | <?php |
||
| 22 | class B extends A |
||
| 23 | { |
||
| 24 | public function __construct() |
||
| 32 | |||
| 33 | // This is a wrapper for attribute2 |
||
| 34 | public $property2; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Sets attribute of parent class directly |
||
| 38 | */ |
||
| 39 | public function setProperty2($value) |
||
| 43 | |||
| 44 | public $property4; |
||
| 45 | protected function getProperty4() |
||
| 49 | |||
| 50 | # ERRORS ######################################### |
||
|
|
|||
| 51 | /** |
||
| 52 | * Try to make read-only property accesible in this parent class |
||
| 53 | * @throws \BadMethodCallException |
||
| 54 | */ |
||
| 55 | protected function setProperty1($value) |
||
| 59 | } |
||
| 60 |