Swoole\Model::__construct PHP Method

__construct() public method

构造函数
public __construct ( Swoole $swoole, string $db_key = 'master' )
$swoole Swoole
$db_key string 选择哪个数据库
    function __construct(\Swoole $swoole, $db_key = 'master')
    {
        $this->db = $swoole->db($db_key);
        $this->dbs = new SelectDB($this->db);
        $this->swoole = $swoole;
    }