设置连接类型
$use_connection_type 默认不传为自动判断,可传true/false,若传字符串(只支持a-z0-9的字符串),则可以切换到另外一个连接,比如传other,则可以连接到$this->_connection_other_id所对应的ID的连接
null Module_Database_Driver::_set_connection_type( boolean|string $use_connection_type )
参数列表
参数 类型 描述 默认值 $use_connection_typeboolean|string$use_connection_type
protected function _set_connection_type($use_connection_type)
{
if (true===$use_connection_type)
{
$use_connection_type = 'master';
}
elseif (false===$use_connection_type)
{
$use_connection_type = 'slaver';
}
elseif (!$use_connection_type)
{
return;
}
$this->_connection_type = $use_connection_type;
}