These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace Maps\Elements; |
||
4 | |||
5 | /** |
||
6 | * Class that holds metadata on WMS overlay layers on map |
||
7 | * |
||
8 | * @since 3.0 |
||
9 | * |
||
10 | * @licence GNU GPL v2+ |
||
11 | * @author Mathias Lidal < [email protected] > |
||
12 | */ |
||
13 | class WmsOverlay extends BaseElement { |
||
14 | |||
15 | /** |
||
16 | * @var String Base url to WMS server |
||
17 | */ |
||
18 | private $wmsServerUrl; |
||
19 | |||
20 | /** |
||
21 | * @var String WMS Layer name |
||
22 | */ |
||
23 | private $wmsLayerName; |
||
24 | |||
25 | /** |
||
26 | * @var String WMS Style name (default value: 'default') |
||
27 | */ |
||
28 | private $wmsStyleName; |
||
29 | |||
30 | /** |
||
31 | * @since 3.0 |
||
32 | * |
||
33 | * @param string $wmsServerUrl |
||
34 | * @param string $wmsLayerName |
||
35 | * @param string $wmsStyleName |
||
36 | */ |
||
37 | public function __construct( $wmsServerUrl, $wmsLayerName, $wmsStyleName="default" ) { |
||
38 | parent::__construct(); |
||
39 | $this->setWmsServerUrl( $wmsServerUrl ); |
||
40 | $this->setWmsLayerName( $wmsLayerName ); |
||
41 | $this->setWmsStyleName( $wmsStyleName ); |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * @since 3.0 |
||
46 | * |
||
47 | * @param String $wmsLayerName |
||
48 | */ |
||
49 | public function setWmsLayerName( $wmsLayerName ) { |
||
50 | $this->wmsLayerName = $wmsLayerName; |
||
51 | } |
||
52 | |||
53 | /** |
||
54 | * @since 3.0 |
||
55 | * |
||
56 | * @return String |
||
57 | */ |
||
58 | public function getWmsLayerName() { |
||
59 | return $this->wmsLayerName; |
||
60 | } |
||
61 | |||
62 | /** |
||
63 | * @since 3.0 |
||
64 | * |
||
65 | * @param String $wmsServerUrl |
||
66 | */ |
||
67 | public function setWmsServerUrl( $wmsServerUrl ) { |
||
68 | $this->wmsServerUrl = $wmsServerUrl; |
||
69 | } |
||
70 | |||
71 | /** |
||
72 | * @since 3.0 |
||
73 | * |
||
74 | * @return String |
||
75 | */ |
||
76 | public function getWmsServerUrl() { |
||
77 | return $this->wmsServerUrl; |
||
78 | } |
||
79 | |||
80 | /** |
||
81 | * @since 3.0 |
||
82 | * |
||
83 | * @param String $wmsStyleName |
||
84 | */ |
||
85 | public function setWmsStyleName( $wmsStyleName ) { |
||
86 | $this->wmsStyleName = $wmsStyleName; |
||
87 | } |
||
88 | |||
89 | /** |
||
90 | * @return String |
||
91 | */ |
||
92 | public function getWmsStyleName() { |
||
93 | return $this->wmsStyleName; |
||
94 | } |
||
95 | |||
96 | public function getJSONObject ( $defText = "", $defTitle = "" ) { |
||
97 | $parentArray = parent::getJSONObject( $defText , $defTitle ); |
||
0 ignored issues
–
show
|
|||
98 | |||
99 | $array = [ |
||
100 | 'wmsServerUrl' => $this->getWmsServerUrl() , |
||
101 | 'wmsLayerName' => $this->getWmsLayerName() , |
||
102 | 'wmsStyleName' => $this->getWmsStyleName() |
||
103 | ]; |
||
104 | return array_merge( $parentArray, $array ); |
||
105 | } |
||
106 | |||
107 | } |
||
108 |
This method has been deprecated.