Blame view

plugins/content/embed_google_map/embedGoogleMapParameters.php 4.95 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209
<?php
/**
* @version		$Id: Embed Google Map v2.0.1 2015-03-28 16:06 $
* @package		Joomla 1.6
* @copyright	Copyright (C) 2014-2015 Petteri Kivimäki. All rights reserved.
* @author		Petteri Kivimäki
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
*/

  class EmbedGoogleMapParameters {
	private $version = "new";
    private $embedAPIKey = "";
    private $address = "";
    private $mapType = "normal";
    private $zoomLevel = 14;
    private $language = "en";
    private $addLink =  1;
    private $linkLabel = "";
    private $linkFull = 1;
    private $showInfo =  0;
    private $height = 300;
    private $width =  400;
    private $border =  0;
    private $borderStyle =  "solid";
    private $borderColor =  "#000000";
    private $https = 1;
    private $infoLabel = "";	
	
    public function setVersion($value) {
      $this->version = $value;
    }

    public function getVersion() {
      return $this->version;
    }
	
	public function setEmbedAPIKey($value) {
      $this->embedAPIKey = $value;
    }

    public function getEmbedAPIKey() {
      return $this->embedAPIKey;
    }
	
    public function setAddress($value) {
      $this->address = $value;
    }

    public function getAddress() {
      return $this->address;
    }

    public function setMapType($value) {
      $this->mapType = $value;
    }

    public function getMapType() {
      return $this->mapType;
    }

    public function setZoomLevel($value) {
      $this->zoomLevel = $value;
    }

    public function getZoomLevel() {
      return $this->zoomLevel;
    }
    public function setLanguage($value) {
      $this->language = $value;
    }

    public function getLanguage() {
      return $this->language;
    }

    public function setAddLink($value) {
      $this->addLink = $value;
    }

    public function getAddLink() {
      return $this->addLink;
    }

    public function setLinkLabel($value) {
      $this->linkLabel = $value;
    }

    public function getLinkLabel() {
      return $this->linkLabel;
    }

    public function setLinkFull($value) {
      $this->linkFull = $value;
    }

    public function getLinkFull() {
      return $this->linkFull;
    }

    public function setShowInfo($value) {
      $this->showInfo = $value;
    }

    public function getShowInfo() {
      return $this->showInfo ;
    }

    public function setHeight($value) {
      $this->height = $value;
    }

    public function getHeight() {
      return $this->height;
    }

    public function setWidth($value) {
      $this->width = $value;
    }

    public function getWidth() {
      return $this->width;
    }

    public function setBorder($value) {
      $this->border = $value;
    }

    public function getBorder() {
      return $this->border;
    }

    public function setBorderStyle($value) {
      $this->borderStyle = $value;
    }

    public function getBorderStyle() {
      return $this->borderStyle;
    }


    public function setBorderColor($value) {
      $this->borderColor = $value;
    }

    public function getBorderColor() {
      return $this->borderColor;
    }

    public function setHttps($value) {
      $this->https = $value;
    }

    public function getHttps() {
      return $this->https;
    }

    public function setInfoLabel($value) {
      $this->infoLabel = $value;
    }

    public function getInfoLabel() {
      return $this->infoLabel;
    }

    public function setIsGoogleMapsEngine($value) {
      $this->isGoogleMapsEngine = $value;
    }

    public function isGoogleMapsEngine() {
      if(preg_match('/^http(s|):\/\/mapsengine\.google\.com/i', $this->address)) {
        return 0;
      }
      return 1;
    }

    public function isLink() {
      if(preg_match('/^http(s|):\/\//i', $this->address)) {
        return 0;
      }
      return 1;				
    }

    public function toString() {
	  $str = "version:\t\t\"$this->version\"\n";
	  $str .= "embedAPIKey:\t\t\"$this->embedAPIKey\"\n";
      $str .= "address:\t\t\"$this->address\"\n";
      $str .= "mapType:\t\t\"$this->mapType\"\n";
      $str .= "zoomLevel:\t\t$this->zoomLevel\n";
      $str .= "language:\t\t\"$this->language\"\n";
      $str .= "addLink:\t\t$this->addLink\n";
      $str .= "linkLabel:\t\t\"$this->linkLabel\"\n";
      $str .= "linkFull:\t\t$this->linkFull\n";
      $str .= "showInfo:\t\t$this->showInfo\n";
      $str .= "height:\t\t\t$this->height\n";
      $str .= "width:\t\t\t$this->width\n";
      $str .= "border:\t\t\t$this->border\n";
      $str .= "borderStyle:\t\t\"$this->borderStyle\"\n";
      $str .= "borderColor:\t\t\"$this->borderColor\"\n";
      $str .= "https:\t\t\t$this->https\n";
      $str .= "infoLabel:\t\t\"$this->infoLabel\"\n";
      $str .= "isGoogleMapsEngine:\t".$this->isGoogleMapsEngine()."\n";
      $str .= "isLink:\t\t\t".$this->isLink()."\n"; 
      return $str;
    }
  }
?>