PHPackages                             dcrphp/container - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. dcrphp/container

ActiveLibrary

dcrphp/container
================

容器类，提供开箱即用的组件。

1.0.1(4y ago)04331MITPHPPHP ^7.0

Since Sep 3Pushed 4y ago1 watchersCompare

[ Source](https://github.com/dcrphp/container)[ Packagist](https://packagist.org/packages/dcrphp/container)[ RSS](/packages/dcrphp-container/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (3)Dependencies (3)Versions (4)Used By (1)

[![Build Status](https://camo.githubusercontent.com/aba803a56ff67d6119b30ca8ac02bd191312963feeb4d6edb0e3a447746d8b9a/68747470733a2f2f7472617669732d63692e6f72672f6463727068702f636f6e7461696e65722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/dcrphp/container)[![Latest Stable Version](https://camo.githubusercontent.com/b9dcf11350ab835eaa1d48394af59e8530aae0d8cda0de7d417eddf8e11a3667/68747470733a2f2f706f7365722e707567782e6f72672f6463727068702f636f6e7461696e65722f762f737461626c652e706e67)](https://packagist.org/packages/dcrphp/container)[![Latest Unstable Version](https://camo.githubusercontent.com/554f2c708dfdbe52822d8ae4efbd17bb2ec3dea7e0a30fbabd456dc532fb6558/68747470733a2f2f706f7365722e707567782e6f72672f6463727068702f636f6e7461696e65722f762f756e737461626c652e706e67)](https://packagist.org/packages/dcrphp/container)

DcrPHP/Container容器类
===================

[](#dcrphpcontainer容器类)

1、安装
----

[](#1安装)

 composer install dcrphp/container

2、说明
----

[](#2说明)

 容器类可以通过简单配置，获取某个组件的支持。Container只是做成了组件的开箱即用，而没有实现或提供任何组件功能。

3、使用
----

[](#3使用)

 cd example
 php index.php

4、添加组件流程标准
----------

[](#4添加组件流程标准)

 第一步：组件的实现类，如果想用Config配置可以在\_\_construct()加一个参数：DcrPHP\\Config\\Config，如：public function \_\_construct(DcrPHP\\Config\\Config $clsConfig)
 第二步：组件打成composer包形式
 第三步：src/Component新建个类且参考Elasticsearch.php添加组件的相关说明
 第四步：如果实现类改动涉及到容器，请容器也修改

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 79.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~168 days

Total

3

Last Release

1743d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5a3b371e27394bd968db9fe1df3d767971f67df3b9fc34aa18273da2792b7e3d?d=identicon)[dcrphp](/maintainers/dcrphp)

---

Top Contributors

[![dcrphp](https://avatars.githubusercontent.com/u/65381497?v=4)](https://github.com/dcrphp "dcrphp (19 commits)")[![junqing124](https://avatars.githubusercontent.com/u/6613893?v=4)](https://github.com/junqing124 "junqing124 (5 commits)")

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/dcrphp-container/health.svg)

```
[![Health](https://phpackages.com/badges/dcrphp-container/health.svg)](https://phpackages.com/packages/dcrphp-container)
```

###  Alternatives

[pimple/pimple

Pimple, a simple Dependency Injection Container

2.7k130.5M1.4k](/packages/pimple-pimple)[neos/flow

Flow Application Framework

862.0M451](/packages/neos-flow)[api-platform/state

API Platform state interfaces

223.4M57](/packages/api-platform-state)[internal/dload

Downloads binaries.

98142.7k10](/packages/internal-dload)[symfony/json-streamer

Provides powerful methods to read/write data structures from/into JSON streams.

14440.0k8](/packages/symfony-json-streamer)[rubix/server

Deploy your Rubix ML models to production with scalable stand-alone inference servers.

632.3k](/packages/rubix-server)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
