Skip to content

Commit

Permalink
Update dependency-injection.rst (ja)
Browse files Browse the repository at this point in the history
  • Loading branch information
Arhell committed May 21, 2024
1 parent 9c15543 commit 63b2461
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ja/development/dependency-injection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ CakePHPはコントローラーでアクションを呼ぶ際サービスコン

// あなたのApplication::services()メソッド内で

$container->share(BillingService::class);
$container->addShared(BillingService::class);

定義の拡張
---------------------
Expand Down Expand Up @@ -163,7 +163,7 @@ CakePHPはコントローラーでアクションを呼ぶ際サービスコン
use Cake\Core\ServiceConfig;

// シェアされたインスタンスを使用する
$container->share(ServiceConfig::class);
$container->addShared(ServiceConfig::class);

``ServiceConfig`` クラスは ``Configure`` で利用可能な全データのread-onlyな一覧を提供します。
なので、誤って設定が変わる心配はありません。
Expand Down

0 comments on commit 63b2461

Please sign in to comment.