stellarwp/container-contract
最新稳定版本:1.1.1
Composer 安装命令:
composer require stellarwp/container-contract
包简介
StellarWP Container Interface
README 文档
README
Service Container interface for use in StellarWP libraries.
Note that this is not a Container implementation of its own. It is merely abstractions that describe the components of a Dependency Injection Container.
Installation
It's recommended that you install this contract as a project dependency via Composer:
composer require stellarwp/container-contract
Note: If you typically use a tool like Strauss, you should not customize the namespace of this library in order to have proper compatibility with StellarWP libraries.
Usage
Simply use the ContainerInterface and implement it or use it as a type hint.
use StellarWP\ContainerContract\ContainerInterface; class Container implements ContainerInterface { public function bind( string $id, $implementation ) {} public function get( string $id ) {} public function has( string $id ) {} public function singleton( string $id, $implementation ) {} }
Example wrappers of other containers
统计信息
- 总下载量: 1.39M
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 2
- 依赖项目数: 6
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2022-11-16