cvs: php4 /pear/Cache/Container dbx.php

From: Date: Thu, 22 Mar 2001 15:09:22 +0000
Subject: cvs: php4 /pear/Cache/Container dbx.php
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-4782@lists.php.net to get a copy of this message
uw Thu Mar 22 07:09:22 2001 EDT Modified files: /php4/pear/Cache/Container dbx.php Log: - added support for persistent connections Index: php4/pear/Cache/Container/dbx.php diff -u php4/pear/Cache/Container/dbx.php:1.2 php4/pear/Cache/Container/dbx.php:1.3 --- php4/pear/Cache/Container/dbx.php:1.2 Thu Mar 22 06:57:44 2001 +++ php4/pear/Cache/Container/dbx.php Thu Mar 22 07:09:21 2001 @@ -15,7 +15,7 @@ // | Authors: Christian Stocker <chregu@nomad.ch> | // +----------------------------------------------------------------------+ // -// $Id: dbx.php,v 1.2 2001/03/22 14:57:44 uw Exp $ +// $Id: dbx.php,v 1.3 2001/03/22 15:09:21 uw Exp $ require_once 'Cache/Container.php'; @@ -50,7 +50,7 @@ * ) * * @author Christian Stocker <chregu@nomad.ch> -* @version $Id: dbx.php,v 1.2 2001/03/22 14:57:44 uw Exp $ +* @version $Id: dbx.php,v 1.3 2001/03/22 15:09:21 uw Exp $ * @package Cache */ class Cache_Container_dbx extends Cache_Container { @@ -100,11 +100,20 @@ var $password = ''; /** - * PEAR DB object + * DBx handle object * - * @var object PEAR_DB + * @var object DBx handle */ var $db; + + + /** + * Establish a persistent connection? + * + * @var boolean + */ + var $persistent = true; + function Cache_Container_dbx($options) { @@ -112,12 +121,12 @@ return new Cache_Error('No options specified!', __FILE__, __LINE__); } - $this->setOptions($options, array('module','host','db','username','password', 'cache_table')); + $this->setOptions($options, array('module','host','db','username','password', 'cache_table', 'persistent')); if (!$this->module) return new Cache_Error('No module specified!', __FILE__, __LINE__); - $this->db = dbx_connect($this->module, $this->host, $this->db, $this->username, $this->password); + $this->db = dbx_connect($this->module, $this->host, $this->db, $this->username, $this->password, $this->persistent); if (dbx_error($this->db)) { return new Cache_Error('DBx connect failed: ' . dbx_error($this->db), __FILE__, __LINE__);

« previous php.cvs (#4782) next »