kolemp/timecop-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

kolemp/timecop-bundle

最新稳定版本:0.4.1

Composer 安装命令:

composer require kolemp/timecop-bundle

包简介

Easy symfony integration with https://github.com/hnw/php-timecop

README 文档

README

This is a very tiny symfony (2&3) bundle that simplifies usage of php-timecop. To use this extension you need a php server with configured timecop.so extension. In case of troubles with compilation I can provide some extra instructions.

Warning!

Using this extension same as php-timecop alone can be very dangerous especially on production environment. Use it wisely.

Installation

composer require kolemp/timecop-bundle

Configuration

After installation add the bundle to app/AppKernel.php. By default the extension is disabled. To enable it add a section to config.yml for environments you want it to be enabled:

kolemp_timecop:
  enabled: true

Time sources

You can set the time by query parameter or the cookie. Both are named fakeTime. The value given must be compatibile with relative date formats. Example url: example.com?fakeTime=+3 days

Disabling time source

You can disable any of time sources in config. By default all are enabled:

kolemp_timecop:
  queryParameter: true
  cookie: true
  header: true

Source order

The time data is used in the following order: the header, the cookie, the query parameter.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-09-28