cvs: pear /Auth Auth.php

From: Date: Sun, 25 Aug 2002 09:20:54 +0000
Subject: cvs: pear /Auth Auth.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-5954@lists.php.net to get a copy of this message
markonen Sun Aug 25 05:20:54 2002 EDT Modified files: /pear/Auth Auth.php Log: Add the missing setIdle() method to complement setExpire() Index: pear/Auth/Auth.php diff -u pear/Auth/Auth.php:1.40 pear/Auth/Auth.php:1.41 --- pear/Auth/Auth.php:1.40 Sun Aug 25 04:15:56 2002 +++ pear/Auth/Auth.php Sun Aug 25 05:20:54 2002 @@ -16,7 +16,7 @@ // | Authors: Martin Jansen <mj@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Auth.php,v 1.40 2002/08/25 08:15:56 markonen Exp $ +// $Id: Auth.php,v 1.41 2002/08/25 09:20:54 markonen Exp $ // require_once "PEAR.php"; @@ -132,7 +132,7 @@ * * @author Martin Jansen <mj@php.net> * @package Auth - * @version $Revision: 1.40 $ + * @version $Revision: 1.41 $ */ define("AUTH_IDLED", -1); @@ -149,7 +149,7 @@ * If this variable is set to 0, auth never expires * * @var integer - * @see checkAuth() + * @see setExpire(), checkAuth() */ var $expire = 0; @@ -169,7 +169,7 @@ * variable is set to 0, idle time is never checked. * * @var integer - * @see checkAuth() + * @see setIdle(), checkAuth() */ var $idle = 0; @@ -401,6 +401,26 @@ } } + // }}} + // {{{ setIdle() + + /** + * Set the maximum idle time + * + * @access public + * @param integer time in seconds + * @param bool add time to current maximum idle time or not + * @return void + */ + function setIdle($time, $add = false) + { + if ($add) { + $this->idle += $time; + } else { + $this->idle = $time; + } + } + // }}} // {{{ setSessionname()

« previous php.pear.cvs (#5954) next »