Skip to content

Commit

Permalink
Merge pull request #7856 from cakephp/ja-update
Browse files Browse the repository at this point in the history
Update dependency-injection.rst (ja)
  • Loading branch information
othercorey authored May 22, 2024
2 parents 9c15543 + 63b2461 commit 01aaf37
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 01aaf37

Please sign in to comment.