Source for file Parser.php
Documentation is available at Parser.php
// +------------------------------------------------------------------------+
// | PEAR :: Image :: GIS :: Parser Base Class |
// +------------------------------------------------------------------------+
// | Copyright (c) 2002-2005 Jan Kneschke <jan@kneschke.de> and |
// | Sebastian Bergmann <sb@sebastian-bergmann.de>. |
// +------------------------------------------------------------------------+
// | This source file is subject to version 3.00 of the PHP License, |
// | that is available at http://www.php.net/license/3_0.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +------------------------------------------------------------------------+
require_once 'Cache/Lite.php';
require_once 'Image/GIS2/LineSet.php';
* @author Sebastian Bergmann <sb@sebastian-bergmann.de>
* @copyright Copyright © 2002-2005 Jan Kneschke <jan@kneschke.de> and Sebastian Bergmann <sb@sebastian-bergmann.de>
* @license http://www.php.net/license/3_0.txt The PHP License, Version 3.0
* Set to TRUE to enable debugging.
$this->cache = new Cache_Lite;
public static function factory($parser, $cache, $debug) {
include_once 'Image/GIS2/Parser/' . $parser . '.php';
$class = 'Image_GIS2_Parser_' . $parser;
$object = new $class($cache, $debug);
* Adds a datafile to the map.
* @param string $dataFile
* Parses the data files of the map.
public function parse() {
foreach ($this->dataFiles as $dataFile => $color) {
$cacheID = md5($dataFile . '_' . $color);
$lineSet = $this->cache->get ($cacheID, 'Image_GIS')) {
if ($lineSet === false ) {
$lineSet = $this->parseFile($dataFile, $color);
* @param string $dataFile
public abstract function parseFile($dataFile, $color);
Documentation generated on Mon, 11 Mar 2019 15:48:42 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|