windomz / lottery-engine
彩票组件引擎 - 模块化和易于部署。
v0.5.0
2017-06-30 06:19 UTC
Requires
- php: >=7.0
- catfan/medoo: ^1.4
- hassankhan/config: ^0.10.0
- malkusch/lock: ^1.0
- ramsey/uuid: ^3.6
- symfony/yaml: ^3.3
- windomz/shmcache: *
Requires (Dev)
- jakub-onderka/php-console-highlighter: ^0.3.2
- jakub-onderka/php-parallel-lint: ^0.9.2
- phpunit/phpunit: ^6.2
README
彩票组件引擎 - 模块化和易于部署。
特性
- 玩法 - 如何玩
- 规则 - 玩法规则
- 奖励 - 玩法奖励
- 记录 - 玩法记录
安装
在项目目录中打开终端
$ 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');
用法
有关详细信息,请参阅文档(目前只有中文)。
限制
没有内存缓存系统,如
Memcached,Redis,但通过shmop函数进行内存操作共享,这带来了一些性能瓶颈,如有必要,可以分叉并重写\LotteryEngine\Model\Cache类进行访问。