kilte / silex-mysqli
1.1.1
2016-07-05 21:41 UTC
Requires
- php: >=5.3.3
Requires (Dev)
- phpunit/phpunit: ~4.7
- pimple/pimple: ~3.0
This package is not auto-updated.
Last update: 2019-02-20 17:44:28 UTC
README
MySQLi服务提供商,用于Pimple 3
要求
- PHP >= 5.3.3
使用方法
use Kilte\MySQLi\MySQLiServiceProvider; use Pimple\Container; $c = new Container(); $c->register( new MySQLiServiceProvider, array( 'mysqli.configuration' => array( 'host' => 'localhost', 'username' => 'root', 'password' => '1234', 'database' => 'mysql', 'charset' => 'utf8', ), ) );
现在服务作为$c['mysqli']
可用。
此提供程序提供扩展的内部\mysqli
类。
唯一的区别是query()
方法默认使用MYSQLI_USE_RESULT
而不是MYSQLI_STORE_RESULT
。
测试
$ composer install
$ vendor/bin/phpunit
变更日志
1.1.0 [31.08.2014]
- 使服务符合Pimple 2.1和Silex 2.0(由Alexander Kudryashov完成)
- 将Pimple依赖改为Silex(由Alexander Kudryashov完成)
- 删除异常。使用mysqli_report代替
1.0.1 [03.07.2014]
- 如果配置不存在,则抛出\LogicException
- 添加单元测试
- PSR-4自动加载
1.0.0 [30.12.2013]
- 首次发布
贡献
- 分支它
- 创建你的功能分支(git checkout -b awesome-feature)
- 做出你的更改
- 如果有必要,编写/更新测试
- 如果有必要,更新README.md
- 将你的分支推送到origin(git push origin awesome-feature)
- 发送拉取请求
- ???
- 利润!!!
不要忘记合并上游更改
git remote add upstream https://github.com/AmsTaFFix/silex-mysqli
git checkout master
git pull upstream
git push origin master
现在你可以删除你的分支
git branch -d awesome-feature
git push origin :awesome-feature
许可证
MIT许可证(MIT)