定制 arokettu/system-clock 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

arokettu/system-clock

最新稳定版本:2.1.0

Composer 安装命令:

composer require arokettu/system-clock

包简介

The smallest PSR-20 implementation (PHP 7.0 and later)

README 文档

README

Packagist PHP License Gitlab pipeline status Downloads

The smallest possible PSR-20 implementation for the case when you don't need all the fancy testing clock classes.

Installation

composer require 'arokettu/system-clock'

Example

<?php

$clock = new \Arokettu\Clock\SystemClock();
$clockPsrAwareValidator->isValid($clock);

For a specific example, lcobucci/jwt:

<?php

use Arokettu\Clock\SystemClock;
use Lcobucci\JWT\Configuration;
use Lcobucci\JWT\Signer\Hmac\Sha256;

$cfg = Configuration::forSymmetricSigner(new Sha256(), '...');
$token = $cfg->parser()->parse('...');

$cfg->validator()->assert(
    $token,
    new StrictValidAt(new SystemClock())
);

Read full documentation here: https://sandfox.dev/php/clock/system-clock.html

Also on Read the Docs: https://arokettu-clock.readthedocs.io/en/latest/system-clock.html

Support

Please file issues on our main repo at GitLab: https://gitlab.com/sandfox/php-system-clock/-/issues

Feel free to ask any questions in our room on Gitter: https://gitter.im/arokettu/community

License

The library is available as open source under the terms of the MIT No Attribution License.

统计信息

  • 总下载量: 8.75k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 6
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT-0
  • 更新时间: 2023-03-22