rustphp/youzan

zanphp/zan support swoole1.8.8

v0.1 2016-08-17 02:47 UTC

This package is not auto-updated.

Last update: 2024-12-21 21:14:11 UTC


README

  1. composer global require rustphp/youzan
  2. 修改 src/Store/Database/Flow.php 文件

在下面的代码 中

private $engineMap = [
    'Mysqli' => 'Zan\Framework\Store\Database\Mysql\Mysqli',
];

新增一行配置

Swoole_mysql'=>'com\imcjj\youzan\SwooleMysqlDriver
  1. 修改 src/Network/Connection/ConnectionInitiator.php 文件

在 initPool 方法中 增加下面的代码

case 'Swoole_mysql':
    $factory = new SwooleMysqlFactory($config);
    break;
  1. Mysql连接配置文件中 使用

    'engine' => 'swoole_mysql'