windomz/lottery-engine

彩票组件引擎 - 模块化和易于部署。

v0.5.0 2017-06-30 06:19 UTC

This package is not auto-updated.

Last update: 2024-09-26 07:35:27 UTC


README

彩票组件引擎 - 模块化和易于部署。

Latest Stable Version Build Status Minimum PHP Version Minimum MYSQL Version Platform

中文文档

特性

  • 玩法 - 如何玩
  • 规则 - 玩法规则
  • 奖励 - 玩法奖励
  • 记录 - 玩法记录

安装

在项目目录中打开终端

$ composer require windomz/lottery-engine

创建配置文件,例如 config.yml

database_host: 127.0.0.1
database_port: 3306
database_type: mysql
database_name: lotterydb
database_username: root
database_password: root
database_charset: utf8
database_logging: false
database_json: true # If the database supports JSON.

如果只是为了快速测试,您可以在 MySQL 中运行 ./sql/lotterydb.sql 以快速创建测试数据库。

当然,您也可以根据 ./sql/lotterydb.sql 自定义 数据库名,但请注意,表名 不能修改

在项目初始化时,通过以下实现加载指定的配置文件

Lottery::setConfigPath('./config.yml');

用法

有关详细信息,请参阅文档(目前只有中文)。

限制

没有内存缓存系统,如 MemcachedRedis,但通过 shmop 函数进行内存操作共享,这带来了一些性能瓶颈,如有必要,可以分叉并重写 \LotteryEngine\Model\Cache 类进行访问。

许可证

MIT 许可证