cvs: pear /Image_GIS/GIS Parser.php
| From: | Sebastian Bergmann | Date: | Sun, 19 Jan 2003 12:19:14 +0000 |
| Subject: | cvs: pear /Image_GIS/GIS Parser.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-8410@lists.php.net to get a copy of this message | ||
sebastian Sun Jan 19 07:19:14 2003 EDT
Modified files:
/pear/Image_GIS/GIS Parser.php
Log:
Fix cache handling.
Index: pear/Image_GIS/GIS/Parser.php
diff -u pear/Image_GIS/GIS/Parser.php:1.6 pear/Image_GIS/GIS/Parser.php:1.7
--- pear/Image_GIS/GIS/Parser.php:1.6 Sun Jan 19 06:28:14 2003
+++ pear/Image_GIS/GIS/Parser.php Sun Jan 19 07:19:14 2003
@@ -13,7 +13,7 @@
// | license@php.net so we can mail you a copy immediately. |
// +------------------------------------------------------------------------+
//
-// $Id: Parser.php,v 1.6 2003/01/19 11:28:14 sebastian Exp $
+// $Id: Parser.php,v 1.7 2003/01/19 12:19:14 sebastian Exp $
//
require_once 'Cache/Lite.php';
@@ -22,7 +22,7 @@
/**
* Parser Base Class.
*
-* @version $Revision: 1.6 $
+* @version $Revision: 1.7 $
* @since Image_GIS 1.0.0
*/
class Image_GIS_Parser {
@@ -31,7 +31,7 @@
*
* @var Cache_Lite $cache
*/
- var $cache;
+ var $cache = NULL;
/**
* Data Files.
@@ -106,7 +106,8 @@
foreach ($this->dataFiles as $dataFile => $color) {
$cacheID = md5($dataFile . '_' . $color);
- if ($lineSet = $this->cache->get($cacheID, 'Image_GIS')) {
+ if (is_object($this->cache) &&
+ $lineSet = $this->cache->get($cacheID, 'Image_GIS')) {
$lineSet = unserialize($lineSet);
} else {
$lineSet = $this->parseFile($dataFile, $color);