| @@ 65-75 (lines=11) @@ | ||
| 62 | * |
|
| 63 | * @return bool |
|
| 64 | */ |
|
| 65 | final public function setValueByProperty(string $name, $value): bool |
|
| 66 | { |
|
| 67 | $property = $this->getPropertyByName($name); |
|
| 68 | if ($property !== null && Validator::new($this)->validateProperty($property)) { |
|
| 69 | $property->setValue($this->object, $value); |
|
| 70 | ||
| 71 | return true; |
|
| 72 | } |
|
| 73 | ||
| 74 | return false; |
|
| 75 | } |
|
| 76 | ||
| 77 | /** |
|
| 78 | * @param string $name |
|
| @@ 115-123 (lines=9) @@ | ||
| 112 | * |
|
| 113 | * @return mixed|null |
|
| 114 | */ |
|
| 115 | final public function getValueByProperty(string $name) |
|
| 116 | { |
|
| 117 | $property = $this->getPropertyByName($name); |
|
| 118 | if ($property !== null && Validator::new($this)->validateProperty($property)) { |
|
| 119 | return $property->getValue($this->object); |
|
| 120 | } |
|
| 121 | ||
| 122 | return null; |
|
| 123 | } |
|
| 124 | ||
| 125 | /** |
|
| 126 | * @param string $postfix |
|