本文整理匯總了PHP中DboSource::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP DboSource::__construct方法的具體用法?PHP DboSource::__construct怎麽用?PHP DboSource::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DboSource
的用法示例。
在下文中一共展示了DboSource::__construct方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
/**
* construct method
*
* By default don't try to connect until you need to
*
* @param array $config Configuration array
* @param bool $autoConnect false
* @return void
* @access public
*/
function __construct($config = array(), $autoConnect = false) {
return parent::__construct($config, $autoConnect);
}
示例2:
/**
* MS SQL DBO driver constructor; sets SQL Server error reporting defaults
*
* @param array $config Configuration data from app/config/databases.php
* @return boolean True if connected successfully, false on error
*/
function __construct($config, $autoConnect = true)
{
if ($autoConnect) {
if (!function_exists('mssql_min_message_severity')) {
trigger_error("PHP SQL Server interface is not installed, cannot continue. For troubleshooting information, see http://php.net/mssql/", E_USER_WARNING);
}
mssql_min_message_severity(15);
mssql_min_error_severity(2);
}
return parent::__construct($config, $autoConnect);
}
示例3:
/**
* MS SQLSRV DBO driver constructor
*
* @param array $config Configuration data from app/config/databases.php
* @return boolean True if connected successfully, false on error
*/
function __construct($config, $autoConnect = true)
{
return parent::__construct($config, $autoConnect);
}
示例4: Folder
/**
* コンストラクタ
*
* @param array 接続設定
* @param boolean 自動接続の有無
* @return void
* @access private
*/
function __construct($config = null, $autoConnect = true)
{
// TODO 現在の仕様として、$connected は、配列にしてしまっているので、
// 次の処理を行うと処理がうまくいかなくなってしまう。
// 配列の接続データは別のプロパティに持たせるようにした方が?
/*if($autoConnect){
$folder = new Folder();
$this->connected = $folder->create($config['database']);
}*/
parent::__construct($config, false);
$this->appEncoding = Configure::read('App.encoding');
}
示例5:
/**
* construct method
*
* By default don't try to connect until you need to
*
* @param array $config Configuration array
* @param bool $autoConnect false
* @access public
*/
function __construct($config = [], $autoConnect = false)
{
parent::__construct($config, $autoConnect);
}
示例6:
/**
* SQLSRV DBO driver constructor; sets SQL Server error reporting defaults
*
* @param array $config Configuration data from app/config/databases.php
* @return boolean True if connected successfully, false on error
*/
function __construct($config, $autoConnect = true)
{
if ($autoConnect) {
if (!function_exists('sqlsrv_configure')) {
trigger_error(__("PHP SQL Server interface is not installed, cannot continue. For troubleshooting information, see http://msdn.microsoft.com/en-us/library/ee229551(v=SQL.10).aspx", true), E_USER_WARNING);
}
sqlsrv_configure('LogSeverity', 1);
}
return parent::__construct($config, $autoConnect);
}
示例7:
/**
* MS SQL DBO driver constructor; sets SQL Server error reporting defaults
*
* @param array $config Configuration data from app/config/databases.php
* @return boolean True if connected successfully, false on error
*/
function __construct($config, $autoConnect = true)
{
if ($autoConnect) {
if (!function_exists('sqlsrv_connect')) {
trigger_error(__("PHP SQL Server interface is not installed, cannot continue. For troubleshooting information, see MSDN", true), E_USER_WARNING);
}
}
return parent::__construct($config, $autoConnect);
}
示例8: __construct
/**
* Constructor
*
* @param array $config Configuration array
* @access public
*/
public function __construct($config = array())
{
parent::__construct($config);
$this->connect();
}