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(7y ago)1236MITPHP

Since May 31Pushed 7y ago1 watchersCompare

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

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 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

2634d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8944962?v=4)[锅锅锅de1T](/maintainers/xiaoguo0426)[@xiaoguo0426](https://github.com/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

[iazaran/smart-cache

Smart Cache is a caching optimization package designed to enhance the way your Laravel application handles data caching. It intelligently manages large data sets by compressing, chunking, or applying other optimization strategies to keep your application performant and efficient.

21114.2k](/packages/iazaran-smart-cache)[phpfastcache/phpssdb

PHP SSDB Driver for phpFastCache

14736.9k1](/packages/phpfastcache-phpssdb)[rapidwebltd/rw-file-cache

RW File Cache is a PHP File-based Caching Library. Its syntax is designed to closely resemble the PHP memcache extension.

15196.8k7](/packages/rapidwebltd-rw-file-cache)[yuzuru-s/redis-recommend

Wrapping Redis's sorted set APIs for specializing recommending operations.

392.9k](/packages/yuzuru-s-redis-recommend)

PHPackages © 2026

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