cvs: pear /HTTP_Header/Header Cache.php
| From: | Michael Wallner | Date: | Sat, 12 Jun 2004 18:57:40 +0000 |
| Subject: | cvs: pear /HTTP_Header/Header Cache.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-20567@lists.php.net to get a copy of this message | ||
mike Sat Jun 12 14:57:40 2004 EDT
Modified files:
/pear/HTTP_Header/Header Cache.php
Log:
* fixing some doc typos
* allow last-modified to be updated
-> add setLastModified()
http://cvs.php.net/diff.php/pear/HTTP_Header/Header/Cache.php?r1=1.5&r2=1.6&ty=u
Index: pear/HTTP_Header/Header/Cache.php
diff -u pear/HTTP_Header/Header/Cache.php:1.5 pear/HTTP_Header/Header/Cache.php:1.6
--- pear/HTTP_Header/Header/Cache.php:1.5 Sat Jun 12 14:51:25 2004
+++ pear/HTTP_Header/Header/Cache.php Sat Jun 12 14:57:40 2004
@@ -16,7 +16,7 @@
// | Michael Wallner <mike@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: Cache.php,v 1.5 2004/06/12 18:51:25 mike Exp $
+// $Id: Cache.php,v 1.6 2004/06/12 18:57:40 mike Exp $
require_once 'HTTP/Header.php';
@@ -34,7 +34,7 @@
*
* @package HTTP_Header
* @category HTTP
- * @version $Revision: 1.5 $
+ * @version $Revision: 1.6 $
*/
class HTTP_Header_Cache extends HTTP_Header
{
@@ -97,8 +97,8 @@
* $httpCache->isOlderThan(15);
* </code>
*
- * If you sepcify something greater than "weeks" as untit, it just works
- * approximatley, because a mount is taken to consist of 4.3 weeks.
+ * If you specify something greater than "weeks" as time untit, it just
+ * works approximatly, because a month is taken to consist of 4.3 weeks.
*
* @access public
* @return bool Returns true if requested page is older than specified.
@@ -176,6 +176,18 @@
$this->sendStatusCode(304);
exit;
}
+ }
+
+ /**
+ * Set Last Modified
+ *
+ * @access public
+ * @return void
+ * @param int $lastModified The unix timestamp of last modification.
+ */
+ function setLastModified($lastModifed = null)
+ {
+ $this->setHeader('Last-Modified', $lastModified);
}
}
?>