本文整理汇总了PHP中DBConnection::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP DBConnection::__construct方法的具体用法?PHP DBConnection::__construct怎么用?PHP DBConnection::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DBConnection
的用法示例。
在下文中一共展示了DBConnection::__construct方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor
*
* @param rdbms.DSN dsn
*/
public function __construct($dsn)
{
parent::__construct($dsn);
$this->formatter = new StatementFormatter($this, new MysqlDialect());
// Use local socket (unix socket on Un*x systems, named pipe on Windows)
// if "." is supplied as hostname
$host = $this->dsn->getHost();
if ('.' === $host) {
$sock = LocalSocket::forName(PHP_OS)->newInstance($this->dsn->getProperty('socket', NULL));
} else {
$sock = new Socket($host, $this->dsn->getPort(3306));
}
$this->handle = new MysqlxProtocol($sock);
}
示例2:
function __construct()
{
parent::__construct();
}
示例3: __construct
/**
* Constructor
*
* @param rdbms.DSN dsn
*/
public function __construct($dsn)
{
parent::__construct($dsn);
$this->formatter = new StatementFormatter($this, new InterBaseDialect());
}
示例4: __construct
/**
* Constructor
*
* @param rdbms.DSN dsn
*/
public function __construct($dsn)
{
parent::__construct($dsn);
$this->formatter = new StatementFormatter($this, $this->getDialect());
$this->handle = $this->getProtocol(new Socket($this->dsn->getHost(), $this->dsn->getPort(1433)));
}
示例5: __construct
/**
* Constructor
*
* @param rdbms.DSN dsn
*/
public function __construct($dsn)
{
parent::__construct($dsn);
$this->formatter = new StatementFormatter($this, new MockDialect());
$this->clearResultSets();
}
示例6: __construct
/**
* Constructor
*
* @param rdbms.DSN dsn
*/
public function __construct($dsn)
{
parent::__construct($dsn);
$this->transactionNesting = $dsn->getProperty('nesting') === 'true';
$this->formatter = new StatementFormatter($this, new MysqlDialect());
}
示例7: __construct
/**
* Constructor
*
* @param rdbms.DSN dsn
*/
public function __construct($dsn)
{
parent::__construct($dsn);
$this->formatter = new StatementFormatter($this, new PostgreSQLDialect());
}
示例8: __construct
private function __construct()
{
parent::__construct(APP_DB_READ_DSN, APP_DB_READ_USER, APP_DB_READ_PASSWORD);
}