當前位置: 首頁>>代碼示例>>PHP>>正文


PHP mysqlConnection::weak_locks方法代碼示例

本文整理匯總了PHP中mysqlConnection::weak_locks方法的典型用法代碼示例。如果您正苦於以下問題:PHP mysqlConnection::weak_locks方法的具體用法?PHP mysqlConnection::weak_locks怎麽用?PHP mysqlConnection::weak_locks使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在mysqlConnection的用法示例。


在下文中一共展示了mysqlConnection::weak_locks方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
 dcCore constructor inits everything related to Dotclear. It takes arguments
 to init database connection.
 
 @param	driver	<b>string</b>	Database driver name
 @param	host		<b>string</b>	Database hostname
 @param	db		<b>string</b>	Database name
 @param	user		<b>string</b>	Database username
 @param	password	<b>string</b>	Database password
 @param	prefix	<b>string</b>	DotClear tables prefix
 @param	persist	<b>boolean</b>	Persistent database connection
 */
 public function __construct($driver, $host, $db, $user, $password, $prefix, $persist)
 {
     $this->con = dbLayer::init($driver, $host, $db, $user, $password, $persist);
     # define weak_locks for mysql
     if ($this->con instanceof mysqlConnection) {
         mysqlConnection::$weak_locks = true;
     }
     $this->prefix = $prefix;
     $this->error = new dcError();
     $this->auth = $this->authInstance();
     $this->session = new sessionDB($this->con, $this->prefix . 'session', DC_SESSION_NAME, '', null, DC_ADMIN_SSL);
     $this->url = new urlHandler();
     $this->plugins = new dcModules($this);
     $this->rest = new dcRestServer($this);
     $this->addFormater('xhtml', create_function('$s', 'return $s;'));
     $this->addFormater('wiki', array($this, 'wikiTransform'));
 }
開發者ID:HackerMajor,項目名稱:root,代碼行數:29,代碼來源:class.dc.core.php

示例2: __construct

 /**
 dcCore constructor inits everything related to Dotclear. It takes arguments
 to init database connection.
 
 @param	driver	<b>string</b>	Database driver name
 @param	host		<b>string</b>	Database hostname
 @param	db		<b>string</b>	Database name
 @param	user		<b>string</b>	Database username
 @param	password	<b>string</b>	Database password
 @param	prefix	<b>string</b>	DotClear tables prefix
 @param	persist	<b>boolean</b>	Persistent database connection
 */
 public function __construct($driver, $host, $db, $user, $password, $prefix, $persist)
 {
     $this->con = dbLayer::init($driver, $host, $db, $user, $password, $persist);
     # define weak_locks for mysql
     if ($this->con instanceof mysqlConnection) {
         mysqlConnection::$weak_locks = true;
     }
     $this->prefix = $prefix;
     $this->error = new dcError();
     $this->auth = $this->authInstance();
     $this->session = new sessionDB($this->con, $this->prefix . 'session', BP_SESSION_NAME, '', null, false);
     $this->url = new urlHandler();
     $this->rest = new dcRestServer($this);
     # Create the Hyla_Tpl object
     $this->tpl = new Hyla_Tpl();
     $this->tpl->setL10nCallback('T_');
 }
開發者ID:archcidburnziso,項目名稱:Bilboplanet,代碼行數:29,代碼來源:class.bp.core.php

示例3: __construct

 /**
 dcCore constructor inits everything related to Dotclear. It takes arguments
 to init database connection.
 
 @param	driver	<b>string</b>	Database driver name
 @param	host		<b>string</b>	Database hostname
 @param	db		<b>string</b>	Database name
 @param	user		<b>string</b>	Database username
 @param	password	<b>string</b>	Database password
 @param	prefix	<b>string</b>	DotClear tables prefix
 @param	persist	<b>boolean</b>	Persistent database connection
 */
 public function __construct($driver, $host, $db, $user, $password, $prefix, $persist)
 {
     if (defined('DC_START_TIME')) {
         $this->stime = DC_START_TIME;
     } else {
         $this->stime = microtime(true);
     }
     $this->con = dbLayer::init($driver, $host, $db, $user, $password, $persist);
     # define weak_locks for mysql
     if ($this->con instanceof mysqlConnection) {
         mysqlConnection::$weak_locks = true;
     } elseif ($this->con instanceof mysqliConnection) {
         mysqliConnection::$weak_locks = true;
     }
     # define searchpath for postgresql
     if ($this->con instanceof pgsqlConnection) {
         $searchpath = explode('.', $prefix, 2);
         if (count($searchpath) > 1) {
             $prefix = $searchpath[1];
             $sql = 'SET search_path TO ' . $searchpath[0] . ',public;';
             $this->con->execute($sql);
         }
     }
     $this->prefix = $prefix;
     $ttl = DC_SESSION_TTL;
     if (!is_null($ttl)) {
         if (substr(trim($ttl), 0, 1) != '-') {
             // Clearbricks requires negative session TTL
             $ttl = '-' . trim($ttl);
         }
     }
     $this->error = new dcError();
     $this->auth = $this->authInstance();
     $this->session = new sessionDB($this->con, $this->prefix . 'session', DC_SESSION_NAME, '', null, DC_ADMIN_SSL, $ttl);
     $this->url = new dcUrlHandlers();
     $this->plugins = new dcPlugins($this);
     $this->rest = new dcRestServer($this);
     $this->meta = new dcMeta($this);
     $this->log = new dcLog($this);
 }
開發者ID:nikrou,項目名稱:dotclear,代碼行數:52,代碼來源:class.dc.core.php


注:本文中的mysqlConnection::weak_locks方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。