Ground Sunlight

Windowsで作る - PHPプログラミングの開発環境

ユーザ用ツール

サイト用ツール


slim:4:routing

差分

このページの2つのバージョン間の差分を表示します。

この比較画面にリンクする

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
次のリビジョン 両方とも次のリビジョン
slim:4:routing [2020/10/10 17:50]
y2sunlight [コンテナ―ソリユーション]
slim:4:routing [2020/10/10 20:57]
y2sunlight [コントローラーをコンテナーに登録する]
行 491: 行 491:
  
  
-==== Registering a controller with the container ====+==== コントローラーをコンテナーに登録する ====
  
-Create a controller with the ''home'' action method. The constructor should accept the dependencies that are required. For example: +''home'' アクションメソッドを伴うコントローラーを作成します。コンストラクターは、必要な依存関係を受け入れる必要があります。 例えば:
- +
-''home'' アクションメソッドを使用してコントローラーを作成します。コンストラクターは、必要な依存関係を受け入れる必要があります。 例えば:+
  
 <code php> <code php>
行 523: 行 521:
 } }
 </code> </code>
- 
-Create a factory in the container that instantiates the controller with the dependencies: 
  
 依存関係を持つコントローラーをインスタンス化するファクトリをコンテナーに作成します。 依存関係を持つコントローラーをインスタンス化するファクトリをコンテナーに作成します。
行 541: 行 537:
 }); });
 </code> </code>
- 
-This allows you to leverage the container for dependency injection and so you can inject specific dependencies into the controller. 
  
 これにより、依存関係の注入にコンテナーを活用できるため、特定の依存関係をコントローラーに注入できます。 これにより、依存関係の注入にコンテナーを活用できるため、特定の依存関係をコントローラーに注入できます。
slim/4/routing.txt · 最終更新: 2020/10/10 21:27 by y2sunlight