当前位置: 首页>>代码示例>>PHP>>正文


PHP JDatabaseDriver::__construct方法代码示例

本文整理汇总了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);
 }
开发者ID:Rajiii4u,项目名称:joomla-cms,代码行数:16,代码来源:postgresql.php

示例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);
 }
开发者ID:klas,项目名称:joomla-cms,代码行数:18,代码来源:sqlsrv.php

示例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);
 }
开发者ID:n3t,项目名称:joomla-cms,代码行数:20,代码来源:pdo.php

示例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);
 }
开发者ID:grisoni77,项目名称:joomla-cms,代码行数:25,代码来源:pdo.php

示例5: __construct

 /**
  * Class init.
  */
 public function __construct()
 {
     parent::__construct(array());
     $this->name = \JFactory::getConfig()->get('driver', 'mysqli');
 }
开发者ID:Biromain,项目名称:windwalker-joomla-rad,代码行数:8,代码来源:MockDatabaseDriver.php


注:本文中的JDatabaseDriver::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。