| @@ 294-303 (lines=10) @@ | ||
| 291 | * @throws InvalidConfigException |
|
| 292 | * @return mixed |
|
| 293 | */ |
|
| 294 | public function getResourceValue($type) |
|
| 295 | { |
|
| 296 | $method = 'getResourceValue_' . $type; |
|
| 297 | ||
| 298 | if (method_exists($this, $method)) { |
|
| 299 | return call_user_func([$this, $method]); |
|
| 300 | } |
|
| 301 | ||
| 302 | throw new InvalidConfigException("Resource type \"$type\" is not described in the Package"); |
|
| 303 | } |
|
| 304 | ||
| 305 | /** |
|
| 306 | * @param string $type |
|
| @@ 310-318 (lines=9) @@ | ||
| 307 | * @throws InvalidConfigException |
|
| 308 | * @return string |
|
| 309 | */ |
|
| 310 | public function getResourceTitle($type) |
|
| 311 | { |
|
| 312 | $method = 'getResourceTitle_' . $type; |
|
| 313 | if (method_exists($this, $method)) { |
|
| 314 | return call_user_func([$this, $method]); |
|
| 315 | } |
|
| 316 | ||
| 317 | throw new InvalidConfigException("Resource type \"$type\" is not described in the Package"); |
|
| 318 | } |
|
| 319 | ||
| 320 | /** |
|
| 321 | * @param $type |
|
| @@ 325-334 (lines=10) @@ | ||
| 322 | * @throws InvalidConfigException |
|
| 323 | * @return array|null |
|
| 324 | */ |
|
| 325 | public function getOverusePrice($type) |
|
| 326 | { |
|
| 327 | $method = 'getResourceOveruse_' . $type; |
|
| 328 | if (method_exists($this, $method)) { |
|
| 329 | return call_user_func([$this, $method]); |
|
| 330 | } |
|
| 331 | ||
| 332 | throw new InvalidConfigException("Overuse getter for resource type \"$type\" is not described in the Package"); |
|
| 333 | } |
|
| 334 | ||
| 335 | /** |
|
| 336 | * @param string $type |
|
| 337 | * @return Part|null |
|