本文整理汇总了PHP中tools::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP tools::__construct方法的具体用法?PHP tools::__construct怎么用?PHP tools::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tools
的用法示例。
在下文中一共展示了tools::__construct方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor. Set DB Object and set {@link $return_statements return_statements}.
*
* @param \phpbb\db\driver\driver_interface $db Database connection
* @param bool $return_statements True if only statements should be returned and no SQL being executed
*/
public function __construct(\phpbb\db\driver\driver_interface $db, $return_statements = false)
{
parent::__construct($db, $return_statements);
// Determine mapping database type
$this->sql_layer = 'postgres';
$this->dbms_type_map = self::get_dbms_type_map();
}
示例2: __construct
/**
* Constructor. Set DB Object and set {@link $return_statements return_statements}.
*
* @param \phpbb\db\driver\driver_interface $db Database connection
* @param bool $return_statements True if only statements should be returned and no SQL being executed
*/
public function __construct(\phpbb\db\driver\driver_interface $db, $return_statements = false)
{
parent::__construct($db, $return_statements);
// Determine mapping database type
switch ($this->db->get_sql_layer()) {
case 'mssql_odbc':
$this->sql_layer = 'mssql';
break;
case 'mssqlnative':
$this->sql_layer = 'mssqlnative';
break;
}
$this->dbms_type_map = self::get_dbms_type_map();
}