當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。