PHPackages                             renshan/tc - 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. [Security](/categories/security)
4. /
5. renshan/tc

ActiveLiblary[Security](/categories/security)

renshan/tc
==========

A PHP Injection liblary

1.0.0(9y ago)219MITPHP

Since Oct 15Pushed 9y ago1 watchersCompare

[ Source](https://github.com/renshan1990/tc)[ Packagist](https://packagist.org/packages/renshan/tc)[ RSS](/packages/renshan-tc/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

TC
==

[](#tc)

A PHP Injection Liblary.

Install
-------

[](#install)

```
composer require renshan/tc
```

Usage
-----

[](#usage)

### Define A Service Without Parameter

[](#define-a-service-without-parameter)

```
namespace Foo;

class Foo
{
	public function foo()
	{
		// Do anything here
	}
}
```

```
use Tc\Container;

$container = new Container;

$defKey = 'service.foo';
$defMap = 'Foo\Foo';

$container->register($defKey, $defMap);
```

### Define A Service With Parameters

[](#define-a-service-with-parameters)

```
namespace Bar;

use Foo\Foo;

class Bar
{
	/**
		* This class need a parameter whic a instance of Foo, and a parameter $bar
		*/
	public function constructor(Foo $foo, $bar)
	{
	}

	public function bar()
	{
		// Do anything here
	}
}
```

and you can define a service like this:

```
$container = new Container;

$defKey = 'service.bar';
$defMap = 'Bar\Bar';
$params = ['@service.foo', 'bar']; // Be sure the position of parameters

$container->register($defKey, $defMap, $params);
```

finally, you can use your services now:

```
$foo = $container->get('service.foo');
$bar = $container->get('service.bar');
```

and you can get a raw service:

```
$contnainer->raw('service.foo');
```

By default, a service will generate one and only a instance of the map class.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

3498d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b232ece07e3db4e6e5e697b0083f6acb6f1e0dd966e3a507e3e9794d46a36f2c?d=identicon)[renshan](/maintainers/renshan)

---

Top Contributors

[![ohmountain](https://avatars.githubusercontent.com/u/16421374?v=4)](https://github.com/ohmountain "ohmountain (1 commits)")

### Embed Badge

![Health badge](/badges/renshan-tc/health.svg)

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

###  Alternatives

[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/packages/defuse-php-encryption)[roave/security-advisories

Prevents installation of composer packages with known security vulnerabilities: no API, simply require it

2.9k97.3M6.4k](/packages/roave-security-advisories)[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k16.7M113](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

41278.1M118](/packages/robrichards-xmlseclibs)[bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

86917.5M63](/packages/bjeavons-zxcvbn-php)[enlightn/security-checker

A PHP dependency vulnerabilities scanner based on the Security Advisories Database.

33732.2M110](/packages/enlightn-security-checker)

PHPackages © 2026

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