====== Apricot ベースコントローラ ====== --- //[[http://www.y2sunlight.com|y2sunlight]] 2020-05-08// [[apricot:top|Apricot に戻る]] 関連記事 * [[apricot:configuration|Apricot プロジェクトの作成]] * [[apricot:public|Apricot 公開フォルダ]] * Apricot コア * [[apricot:core:top|Apricot コア作成の準備]] * [[apricot:core:application-class|Apricot アプリケーションクラス]] * [[apricot:core:basic-class|Apricot 各種基本コアクラス]] * [[apricot:core:request-class|Apricot リクエストクラス]] * [[apricot:core:response-class|Apricot レスポンスクラス]] * Apricot ベースコントローラ * [[apricot:core:completion|Apricot コアの完成]] * [[apricot:app:top|Apricot アプリ]] * [[apricot:ext:middleware|Apricot 拡張]] レスポンスクラスが実装できたので、次にコントローラのベースクラスを作成します。 ---- ===== BaseControllerクラス ===== コントローラのアクションメソッドはアプリケーションの中核です。アクションの周辺にはミドルウェアなどの様々な前後処理が行われるので、直接アクションを呼び出すことは止めて間接的に呼び出す事を考えます。 アクションの間接呼び出しを実装した全てのコントローラのベースとなるクラスを以下に示します。 {{fa>folder-open-o}} ** /apricot/core/Foundation ** callAction($actionName, $params); } } * protected function callAction() --- 実際にアクションを呼びだす * public function invokeAction() --- アクションを起動する際にApplicationクラスから使用する \\