|
|
|
@@ -95,6 +95,15 @@ abstract class WebController extends BaseController |
|
|
|
*/ |
|
|
|
protected function getParam(): IParam |
|
|
|
{ |
|
|
|
if (!property_exists(static::class, 'param')) { |
|
|
|
throw new LogicException("param未定義"); |
|
|
|
} |
|
|
|
|
|
|
|
$param = $this->param; |
|
|
|
|
|
|
|
if (!is_subclass_of($param, IParam::class)) { |
|
|
|
throw new LogicException("param型不正"); |
|
|
|
} |
|
|
|
return $this->param; |
|
|
|
} |
|
|
|
|
|
|
|
|