当前位置: 首页>>代码示例>>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;未经允许,请勿转载。