| @@ 66-76 (lines=11) @@ | ||
| 63 | * |
|
| 64 | * @return bool |
|
| 65 | */ |
|
| 66 | final public function setValueByProperty(string $name, $value): bool |
|
| 67 | { |
|
| 68 | $property = $this->getPropertyByName($name); |
|
| 69 | if ($property !== null && $this->validateProperty($property)) { |
|
| 70 | $property->setValue($this->object, $value); |
|
| 71 | ||
| 72 | return true; |
|
| 73 | } |
|
| 74 | ||
| 75 | return false; |
|
| 76 | } |
|
| 77 | ||
| 78 | /** |
|
| 79 | * @param ReflectionProperty $property |
|
| @@ 206-214 (lines=9) @@ | ||
| 203 | * |
|
| 204 | * @return mixed|null |
|
| 205 | */ |
|
| 206 | final public function getValueByProperty(string $name) |
|
| 207 | { |
|
| 208 | $property = $this->getPropertyByName($name); |
|
| 209 | if ($property !== null && $this->validateProperty($property)) { |
|
| 210 | return $property->getValue($this->object); |
|
| 211 | } |
|
| 212 | ||
| 213 | return null; |
|
| 214 | } |
|
| 215 | ||
| 216 | /** |
|
| 217 | * @param string $postfix |
|