00001 <?php
00002
00015 final class SMMapper {
00016
00020 protected $queryPrinter;
00021
00027 protected $isMapFormat;
00028
00035 public function __construct( $format, $inline ) {
00036 global $egMapsDefaultServices;
00037
00038 $this->isMapFormat = $format == 'map';
00039
00040
00041
00042 if ( $this->isMapFormat ) $format = $egMapsDefaultServices['qp'];
00043
00044
00045 $service = MapsMappingServices::getValidServiceInstance( $format, 'qp' );
00046
00047
00048 $QPClass = $service->getFeature( 'qp' );
00049 $this->queryPrinter = new $QPClass( $format, $inline, $service );
00050 }
00051
00059 public function getName() {
00060 return $this->isMapFormat ? wfMsg( 'maps_map' ) : $this->queryPrinter->getName();
00061 }
00062
00072 public function getParameters() {
00073 return $this->queryPrinter->getParameters();
00074 }
00075
00085 public function getValidatorParameters() {
00086 return $this->queryPrinter->getValidatorParameters();
00087 }
00088
00100 public function __call( $name, array $arguments ) {
00101 return call_user_func_array( array( $this->queryPrinter, $name ), $arguments );
00102 }
00103
00104 }