PHPackages                             onetech/sign - 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. [Caching](/categories/caching)
4. /
5. onetech/sign

ActiveLibrary[Caching](/categories/caching)

onetech/sign
============

基于Redis的bitmap实现的签到功能

0.0.1(6y ago)1234MITPHP

Since May 31Pushed 6y ago1 watchersCompare

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

READMEChangelog (1)DependenciesVersions (2)Used By (0)

 Onetech/sign
==============

[](#-onetechsign-)

 基于redis的bitmap实现的签到功能

Installing
----------

[](#installing)

```
$ composer require onetech/sign -vvv
```

Usage
-----

[](#usage)

```
require 'vendor/autoload.php';

use Onetech\Sign;

$redis = new Redis();

$redis->connect('127.0.0.1', 6379);

$config = [
    'prefix' => 'sign::'
];

$sign = new Sign($redis, $config);

$unique_id = 10087;

$key = $sign->getKey($unique_id);

$date = '2019-05-10';

echo $date . ' 签到成功';

echo '处于一年中的第' . date('z', strtotime($date)) . '天';

$sign->sign($key, $date);//签到

echo $sign->checkSign($key, $date);//检查指定日期是否有签到

echo '签到总次数为' . $sign->getSignCount($key);//获取总的签到次数

echo $sign->getFirstSignDate($key);//第一次签到的日期

echo $sign->getSign($key);//获取总共的签到情况

echo $sign->getRangeCount($key,'2019-01-01', '2019-01-10');//指定日期范围的签到情况

echo $sign->getWeek($key);//当前周的签到情况

echo $sign->getLastDays($key, 7);//过去7天的签到情况

echo $sign->getMonth($key);//获取当前月的签到情况
```

Contributing
------------

[](#contributing)

You can contribute in one of three ways:

1. File bug reports using the [issue tracker](https://github.com/xiaoguo0426/sign/issues).
2. Answer questions or fix bugs on the [issue tracker](https://github.com/xiaoguo0426/sign/issues).
3. Contribute new features or update the wiki.

*The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.*

License
-------

[](#license)

MIT

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 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

2541d ago

### Community

Maintainers

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

---

Top Contributors

[![xiaoguo0426](https://avatars.githubusercontent.com/u/8944962?v=4)](https://github.com/xiaoguo0426 "xiaoguo0426 (9 commits)")

---

Tags

bitmapredis

### Embed Badge

![Health badge](/badges/onetech-sign/health.svg)

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

###  Alternatives

[predis/predis

A flexible and feature-complete Redis/Valkey client for PHP.

7.8k305.7M2.4k](/packages/predis-predis)[snc/redis-bundle

A Redis bundle for Symfony

1.0k39.4M67](/packages/snc-redis-bundle)[react/cache

Async, Promise-based cache interface for ReactPHP

444112.4M40](/packages/react-cache)[wp-media/wp-rocket

Performance optimization plugin for WordPress

7431.3M3](/packages/wp-media-wp-rocket)[illuminate/cache

The Illuminate Cache package.

12835.6M1.4k](/packages/illuminate-cache)[colinmollenhour/php-redis-session-abstract

A Redis-based session handler with optimistic locking

6325.6M14](/packages/colinmollenhour-php-redis-session-abstract)

PHPackages © 2026

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