| @@ 50-55 (lines=6) @@ | ||
| 47 | $targetInstance = new $call[ 'load' ]; |
|
| 48 | ||
| 49 | // イニシャライズメソッドをコール |
|
| 50 | if (method_exists( $targetInstance, 'init' )) { |
|
| 51 | $targetInstance->init( $call[ 'param' ] ); |
|
| 52 | } else { |
|
| 53 | // メソッドが存在しなければ例外をThrow |
|
| 54 | throw new \Exception( $this->coreError( 'error', 'notfound', 'Init()' ) ); |
|
| 55 | } |
|
| 56 | ||
| 57 | // HTTPのメソッドに応じて適切なコントローラをコール |
|
| 58 | switch ($_SERVER[ 'REQUEST_METHOD' ]) { |
|
| @@ 174-179 (lines=6) @@ | ||
| 171 | */ |
|
| 172 | private function playFuncCall( $targetInstance ) |
|
| 173 | { |
|
| 174 | if (method_exists( $targetInstance, 'play' )) { |
|
| 175 | $targetInstance->play(); |
|
| 176 | } else { |
|
| 177 | // メソッドが存在しなければ例外をThrow |
|
| 178 | throw new \Exception( $this->coreError( 'error', 'notfound', 'play*()' ) ); |
|
| 179 | } |
|
| 180 | } |
|
| 181 | ||
| 182 | /** |
|