cvs: php4 /pear/Cache/Container msession.php
| From: | Ulf Wendel | Date: | Wed, 19 Dec 2001 14:01:19 +0000 |
| Subject: | cvs: php4 /pear/Cache/Container msession.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-1623@lists.php.net to get a copy of this message | ||
uw Wed Dec 19 09:01:19 2001 EDT
Modified files:
/php4/pear/Cache/Container msession.php
Log:
flag if to establish a msession connectio or reuse one
Index: php4/pear/Cache/Container/msession.php
diff -u php4/pear/Cache/Container/msession.php:1.1 php4/pear/Cache/Container/msession.php:1.2
--- php4/pear/Cache/Container/msession.php:1.1 Wed Dec 19 08:21:24 2001
+++ php4/pear/Cache/Container/msession.php Wed Dec 19 09:01:13 2001
@@ -15,7 +15,7 @@
// | Authors: Ulf Wendel <ulf.wendel@phpdoc.de> |
// +----------------------------------------------------------------------+
//
-// $Id: msession.php,v 1.1 2001/12/19 13:21:24 uw Exp $
+// $Id: msession.php,v 1.2 2001/12/19 14:01:13 uw Exp $
require_once('Cache/Container.php');
@@ -25,7 +25,7 @@
* WARNING: experimental, untested
*
* @author Ulf Wendel <ulf.wendel@phpdoc.de>
-* @version $Id: msession.php,v 1.1 2001/12/19 13:21:24 uw Exp $
+* @version $Id: msession.php,v 1.2 2001/12/19 14:01:13 uw Exp $
*/
class Cache_Container_msession extends Cache_Container {
@@ -48,6 +48,14 @@
* @var boolean
*/
var $uniq = true;
+
+
+ /**
+ * Establish a connection to a msession server?
+ *
+ * @var boolean
+ */
+ var $connect = true;
/**
@@ -76,17 +84,17 @@
function Cache_Container_msession($options = '') {
if (is_array($options))
- $this->setOptions($options, array_merge($this->allowed_options,
array('id_lenght', 'uniq', 'host', 'port')));
+ $this->setOptions($options, array_merge($this->allowed_options,
array('id_lenght', 'uniq', 'host', 'port',
'connect')));
- if (NULL == $this->host)
- new Cache_Error('No host specified.', __FILE__, __LINE__);
- if (NULL == $this->port)
- new Cache_Error('No port specified.', __FILE__, __LINE__);
+ if ($connect) {
+ if (NULL == $this->host)
+ new Cache_Error('No host specified.', __FILE__, __LINE__);
+ if (NULL == $this->port)
+ new Cache_Error('No port specified.', __FILE__, __LINE__);
-
- if (!($this->ms = msession_connect($this->host, $this->port)))
- new Cache_Error('Can not connect to the sever using host "' .
$this->host . '" on port "' . $this->port . '"', __FILE__,
__LINE__);
-
+ if (!($this->ms = msession_connect($this->host, $this->port)))
+ new Cache_Error('Can not connect to the sever using host "' .
$this->host . '" on port "' . $this->port . '"', __FILE__,
__LINE__);
+ }
} // end func contructor