| 1 | <?php |
||
| 12 | abstract class Accesor |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * Set protected/private property |
||
| 16 | * |
||
| 17 | * @param object $target |
||
| 18 | * @param string $propertyName |
||
| 19 | * @param mixed $value |
||
| 20 | * |
||
| 21 | * @return void |
||
| 22 | */ |
||
| 23 | public static function set($target, $propertyName, $value) |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Get protected/private property |
||
| 32 | * |
||
| 33 | * @param object $target |
||
| 34 | * @param string $propertyName |
||
| 35 | * |
||
| 36 | * @return mixed |
||
| 37 | */ |
||
| 38 | public static function get($target, $propertyName) |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Creates a new instance without using constructor |
||
| 48 | * |
||
| 49 | * @param string $class |
||
| 50 | * |
||
| 51 | * @return mixed |
||
| 52 | */ |
||
| 53 | public static function newInstanceWithoutConstructor($class) |
||
| 59 | } |