| @@ 141-151 (lines=11) @@ | ||
| 138 | *  | 
                                |
| 139 | * @return bool  | 
                                |
| 140 | */  | 
                                |
| 141 | final public function setValueByMethod(string $name, $value): bool  | 
                                |
| 142 |     { | 
                                |
| 143 | $method = $this->getSetterMethod($name);  | 
                                |
| 144 |         if ($method !== null && Validator::new($this)->isValidSetterMethod($method, $value)) { | 
                                |
| 145 | $method->invoke($this->object, $value);  | 
                                |
| 146 | ||
| 147 | return true;  | 
                                |
| 148 | }  | 
                                |
| 149 | ||
| 150 | return false;  | 
                                |
| 151 | }  | 
                                |
| 152 | ||
| 153 | /**  | 
                                |
| 154 | * @param string $name  | 
                                |
| @@ 158-166 (lines=9) @@ | ||
| 155 | *  | 
                                |
| 156 | * @return mixed|null  | 
                                |
| 157 | */  | 
                                |
| 158 | final public function getValueByMethod(string $name)  | 
                                |
| 159 |     { | 
                                |
| 160 | $method = $this->getGetterMethod($name);  | 
                                |
| 161 |         if ($method !== null && Validator::new($this)->isValidGetterMethod($method)) { | 
                                |
| 162 | return $method->invoke($this->object);  | 
                                |
| 163 | }  | 
                                |
| 164 | ||
| 165 | return null;  | 
                                |
| 166 | }  | 
                                |
| 167 | ||
| 168 | /**  | 
                                |
| 169 | * @param string $name  | 
                                |