@@ 64-78 (lines=15) @@ | ||
61 | /** |
|
62 | * {@inheritdoc} |
|
63 | */ |
|
64 | public function __get(string $property) |
|
65 | { |
|
66 | static $scopes = []; |
|
67 | $expectedMethod = 'Get' . ucfirst($property); |
|
68 | if (true !== method_exists($this, $expectedMethod)) { |
|
69 | throw new UndefinedPropertyException(static::class, $property); |
|
70 | } elseif (false === $this->CheckPublicScope($property, true)) { |
|
71 | throw new NotPublicGetterPropertyException( |
|
72 | static::class, |
|
73 | $property |
|
74 | ); |
|
75 | } |
|
76 | ||
77 | return $this->$expectedMethod(); |
|
78 | } |
|
79 | ||
80 | /** |
|
81 | * {@inheritdoc} |
|
@@ 83-99 (lines=17) @@ | ||
80 | /** |
|
81 | * {@inheritdoc} |
|
82 | */ |
|
83 | public function __set(string $property, $v) |
|
84 | { |
|
85 | static $scopes = []; |
|
86 | $expectedMethod = 'Set' . ucfirst($property); |
|
87 | if ( |
|
88 | true !== method_exists($this, $expectedMethod) |
|
89 | ) { |
|
90 | throw new PropertyNotWriteableException(static::class, $property); |
|
91 | } elseif (false === $this->CheckPublicScope($property, false)) { |
|
92 | throw new NotPublicSetterPropertyException( |
|
93 | static::class, |
|
94 | $property |
|
95 | ); |
|
96 | } |
|
97 | ||
98 | return $this->$expectedMethod($v); |
|
99 | } |
|
100 | ||
101 | /** |
|
102 | * {@inheritdoc} |