@@ 117-127 (lines=11) @@ | ||
114 | * |
|
115 | * @return bool |
|
116 | */ |
|
117 | final public function setValueByProperty(string $name, $value): bool |
|
118 | { |
|
119 | $property = $this->getPropertyByName($name); |
|
120 | if ($property !== null && Validator::new($this)->isValidProperty($property)) { |
|
121 | $property->setValue($this->object, $value); |
|
122 | ||
123 | return true; |
|
124 | } |
|
125 | ||
126 | return false; |
|
127 | } |
|
128 | ||
129 | /** |
|
130 | * @param string $name |
|
@@ 167-175 (lines=9) @@ | ||
164 | * |
|
165 | * @return mixed|null |
|
166 | */ |
|
167 | final public function getValueByProperty(string $name) |
|
168 | { |
|
169 | $property = $this->getPropertyByName($name); |
|
170 | if ($property !== null && Validator::new($this)->isValidProperty($property)) { |
|
171 | return $property->getValue($this->object); |
|
172 | } |
|
173 | ||
174 | return null; |
|
175 | } |
|
176 | ||
177 | /** |
|
178 | * @param string $postfix |