1: <?php
2: namespace Mapbender\WmtsBundle\Entity;
3:
4: use Doctrine\Common\Collections\ArrayCollection;
5:
6:
7: /**
8: * TileMatrix class
9: *
10: * @author Paul Schmidt
11: */
12: class TileMatrix {
13: /** @var string identifier */
14: protected $identifier;
15: /** @var string scaledenominator */
16: protected $scaledenominator;
17: /** @var string topleftcorner */
18: protected $topleftcorner;
19: /** @var string tilewidth */
20: protected $tilewidth;
21: /** @var string tileheight */
22: protected $tileheight;
23: /** @var string matrixwidth */
24: protected $matrixwidth;
25: /** @var string matrixheight */
26: protected $matrixheight;
27: /**
28: * Create an instance of TileMatrix
29: *
30: * @param array $tilematrix
31: */
32: public function __construct($tilematrix=null){
33: if($tilematrix!=null && is_array($tilematrix)){
34: $this->setIdentifier($tilematrix["identifier"]);
35: $this->setScaledenominator($tilematrix["scaledenominator"]);
36: $this->setTopleftcorner($tilematrix["topleftcorner"]);
37: $this->setTilewidth($tilematrix["tilewidth"]);
38: $this->setTileheight($tilematrix["tileheight"]);
39: $this->setMatrixwidth($tilematrix["matrixwidth"]);
40: $this->setMatrixheight($tilematrix["matrixheight"]);
41: }
42: }
43: /**
44: * Get identifier
45: *
46: * @return string
47: */
48: public function getIdentifier() {
49: return $this->identifier;
50: }
51: /**
52: * Set identifier
53: *
54: * @param string $value
55: */
56: public function setIdentifier($value) {
57: $this->identifier = $value;
58: }
59: /**
60: * Get scaledenominator
61: *
62: * @return string
63: */
64: public function getScaledenominator() {
65: return $this->scaledenominator;
66: }
67: /**
68: * Set scaledenominator
69: * @param string $value
70: */
71: public function setScaledenominator($value) {
72: $this->scaledenominator = $value;
73: }
74: /**
75: * Get topleftcorner
76: *
77: * @return string
78: */
79: public function getTopleftcorner() {
80: return $this->topleftcorner;
81: }
82: /**
83: * Set topleftcorner
84: *
85: * @param string $value
86: */
87: public function setTopleftcorner($value) {
88: $this->topleftcorner = $value;
89: }
90: /**
91: * Get tilewidth
92: *
93: * @return string
94: */
95: public function getTilewidth() {
96: return $this->tilewidth;
97: }
98: /**
99: * Set tilewidth
100: *
101: * @param string $value
102: */
103: public function setTilewidth($value) {
104: $this->tilewidth = $value;
105: }
106: /**
107: * Get tileheight
108: *
109: * @return string
110: */
111: public function getTileheight() {
112: return $this->tileheight;
113: }
114: /**
115: * Set tileheight
116: *
117: * @param string $value
118: */
119: public function setTileheight($value) {
120: $this->tileheight = $value;
121: }
122: /**
123: * Get matrixwidth
124: *
125: * @return string
126: */
127: public function getMatrixwidth() {
128: return $this->matrixwidth;
129: }
130: /**
131: * Set matrixwidth
132: *
133: * @param string $value
134: */
135: public function setMatrixwidth($value) {
136: $this->matrixwidth = $value;
137: }
138: /**
139: * Get matrixheight
140: * @return string
141: */
142: public function getMatrixheight() {
143: return $this->matrixheight;
144: }
145: /**
146: * Set matrixheight
147: *
148: * @param string $value
149: */
150: public function setMatrixheight($value) {
151: $this->matrixheight = $value;
152: }
153: /**
154: * Get Tilematrix as array of string
155: *
156: * @return array
157: */
158: public function getAsArray() {
159: $tilematrix = array();
160: $tilematrix["identifier"] = $this->getIdentifier();
161: $tilematrix["scaledenominator"] = $this->getScaledenominator();
162: $tilematrix["topleftcorner"] = $this->getTopleftcorner();
163: $tilematrix["tilewidth"] = $this->getTilewidth();
164: $tilematrix["tileheight"] = $this->getTileheight();
165: $tilematrix["matrixwidth"] = $this->getMatrixwidth();
166: $tilematrix["matrixheight"] = $this->getMatrixheight();
167: return $tilematrix;
168: }
169: }
170: