Exemple #1
0
 /**
  * Loads OTBM map.
  * 
  * <p>
  * This method loads OTBM map from given file. You can create local instances of maps directly - calling this method will associate loaded map with POT class instance and will make it available everywhere in the code.
  * </p>
  * 
  * <p>
  * Note: This method will also load houses list associated with map.
  * </p>
  * 
  * <p>
  * Note: Since 0.2.0+SVN this field is protected instead of private.
  * </p>
  * 
  * @version 0.2.0+SVN
  * @since 0.1.0
  * @param string $path Map file path.
  */
 public static function loadMap($path)
 {
     self::$map = new OTS_OTBMFile();
     // sets items cache if any
     if (isset(self::$mapCache)) {
         self::$map->setCacheDriver(self::$mapCache);
     }
     self::$map->loadFile($path);
     self::$houses = self::$map->getHousesList();
 }