1: <?php
2:
3: namespace Mapbender\CoreBundle\Entity;
4:
5: use Doctrine\Common\Collections\ArrayCollection;
6: use Doctrine\ORM\EntityManager;
7: use Doctrine\ORM\Mapping as ORM;
8:
9: /**
10: * Source entity
11: *
12: * @author Paul Schmidt
13: *
14: * @#ORM\Entity
15: * @#ORM\Table(name="mb_core_applicationstate")
16: * @#ORM\InheritanceType("JOINED")
17: * @#ORM\DiscriminatorColumn(name="discr", type="string")
18: * #ORM\DiscriminatorMap({"mb_core_source" = "Source"})
19: */
20: class ApplicationState
21: {
22:
23: /**
24: * @var integer $id
25: * @ORM\Id
26: * @ORM\Column(type="integer")
27: * @ORM\GeneratedValue(strategy="AUTO")
28: */
29: protected $id;
30:
31: /**
32: * @var string $title The source title
33: * @ORM\Column(type="string", nullable=true)
34: */
35: protected $window;
36:
37: /**
38: * @var string $bboxMax the max bbox
39: * @ORM\Column(type="string", nullable=true)
40: */
41: protected $bboxMax;
42:
43: /**
44: * @var string $bbox the max bbox
45: * @ORM\Column(type="string", nullable=true)
46: */
47: protected $bbox;
48:
49: public function __construct()
50: {
51: $this->window = new Size();
52: }
53:
54: /**
55: * Get id
56: *
57: * @return integer
58: */
59: public function getId()
60: {
61: return $this->id;
62: }
63:
64: /**
65: * Set a window
66: *
67: * @param Size $size
68: * @return ApplicationState
69: */
70: public function setWindow($size)
71: {
72: $this->window = $size;
73: return $this;
74: }
75:
76: /**
77: * Returns a window
78: *
79: * @return Size
80: */
81: public function getWindow()
82: {
83: return $this->window;
84: }
85:
86: /**
87: * Set a bbox
88: *
89: * @param BoundingBox $bbox
90: * @return ApplicationState
91: */
92: public function setBbox($bbox)
93: {
94: $this->bbox = $bbox;
95: return $this;
96: }
97:
98: /**
99: * Returns a bbox
100: *
101: * @return BoundingBox
102: */
103: public function getBbox()
104: {
105: return $this->bbox;
106: }
107:
108: /**
109: * Set a bboxMax
110: *
111: * @param BoundingBox $bbox
112: * @return ApplicationState
113: */
114: public function setBboxMax($bbox)
115: {
116: $this->bboxMax = $bbox;
117: return $this;
118: }
119:
120: /**
121: * Returns a bboxMax
122: *
123: * @return BoundingBox
124: */
125: public function getBboxMax()
126: {
127: return $this->bboxMax;
128: }
129:
130: /**
131: * Returns a Source as String
132: *
133: * @return String Source as String
134: */
135: public function __toString()
136: {
137: return (string) $this->id;
138: }
139:
140: }
141: