本文整理汇总了PHP中JDatabaseDriver::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP JDatabaseDriver::__construct方法的具体用法?PHP JDatabaseDriver::__construct怎么用?PHP JDatabaseDriver::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JDatabaseDriver
的用法示例。
在下文中一共展示了JDatabaseDriver::__construct方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Database object constructor
*
* @param array $options List of options used to configure the connection
*
* @since 12.1
*/
public function __construct($options)
{
$options['host'] = isset($options['host']) ? $options['host'] : 'localhost';
$options['user'] = isset($options['user']) ? $options['user'] : '';
$options['password'] = isset($options['password']) ? $options['password'] : '';
$options['database'] = isset($options['database']) ? $options['database'] : '';
// Finalize initialization
parent::__construct($options);
}
示例2: __construct
/**
* Constructor.
*
* @param array $options List of options used to configure the connection
*
* @since 12.1
*/
public function __construct($options)
{
// Get some basic values from the options.
$options['host'] = isset($options['host']) ? $options['host'] : 'localhost';
$options['user'] = isset($options['user']) ? $options['user'] : '';
$options['password'] = isset($options['password']) ? $options['password'] : '';
$options['database'] = isset($options['database']) ? $options['database'] : '';
$options['select'] = isset($options['select']) ? (bool) $options['select'] : true;
// Finalize initialisation
parent::__construct($options);
}
示例3: __construct
/**
* Constructor.
*
* @param array $options List of options used to configure the connection
*
* @since 12.1
*/
public function __construct($options)
{
// Get some basic values from the options.
$options['driver'] = isset($options['driver']) ? $options['driver'] : 'odbc';
$options['dsn'] = isset($options['dsn']) ? $options['dsn'] : '';
$options['host'] = isset($options['host']) ? $options['host'] : 'localhost';
$options['database'] = isset($options['database']) ? $options['database'] : '';
$options['user'] = isset($options['user']) ? $options['user'] : '';
$options['password'] = isset($options['password']) ? $options['password'] : '';
$options['driverOptions'] = isset($options['driverOptions']) ? $options['driverOptions'] : array();
// Finalize initialisation
parent::__construct($options);
}
示例4: __construct
/**
* Constructor.
*
* @param array $options List of options used to configure the connection
*
* @since 12.1
*/
public function __construct($options)
{
// Get some basic values from the options.
$options['driver'] = isset($options['driver']) ? $options['driver'] : 'odbc';
$options['dsn'] = isset($options['dsn']) ? $options['dsn'] : '';
$options['host'] = isset($options['host']) ? $options['host'] : 'localhost';
$options['database'] = isset($options['database']) ? $options['database'] : '';
$options['user'] = isset($options['user']) ? $options['user'] : '';
$options['password'] = isset($options['password']) ? $options['password'] : '';
$options['driverOptions'] = isset($options['driverOptions']) ? $options['driverOptions'] : array();
$hostParts = explode(':', $options['host']);
if (!empty($hostParts[1])) {
$options['host'] = $hostParts[0];
$options['port'] = $hostParts[1];
}
// Finalize initialisation
parent::__construct($options);
}
示例5: __construct
/**
* Class init.
*/
public function __construct()
{
parent::__construct(array());
$this->name = \JFactory::getConfig()->get('driver', 'mysqli');
}