1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
|
4
|
|
|
namespace POData\ObjectModel; |
5
|
|
|
|
6
|
|
|
|
7
|
|
|
abstract class ODataContainerBase |
8
|
|
|
{ |
9
|
|
|
/** |
10
|
|
|
* Entry id. |
11
|
|
|
* |
12
|
|
|
* @var string|null |
13
|
|
|
*/ |
14
|
|
|
public $id; |
15
|
|
|
/** |
16
|
|
|
* Feed title. |
17
|
|
|
* |
18
|
|
|
* @var ODataTitle |
19
|
|
|
*/ |
20
|
|
|
public $title; |
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* Entry Self Link. |
24
|
|
|
* |
25
|
|
|
* @var ODataLink|null |
26
|
|
|
*/ |
27
|
|
|
private $selfLink; |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* Last updated timestamp. |
31
|
|
|
* |
32
|
|
|
* @var string|null |
33
|
|
|
*/ |
34
|
|
|
public $updated; |
35
|
|
|
|
36
|
|
|
/** |
37
|
|
|
* Service Base URI. |
38
|
|
|
* |
39
|
|
|
* @var string|null |
40
|
|
|
*/ |
41
|
|
|
public $baseURI; |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* ODataContainerBase constructor. |
45
|
|
|
* @param string|null $id |
46
|
|
|
* @param ODataTitle $title |
47
|
|
|
* @param string|null $updated |
48
|
|
|
* @param string|null $baseURI |
49
|
|
|
*/ |
50
|
|
|
public function __construct(?string $id, ?ODataTitle $title, ?ODataLink $selfLink, ?string $updated, ?string $baseURI) |
51
|
|
|
{ |
52
|
|
|
$this |
53
|
|
|
->setId($id) |
54
|
|
|
->setTitle($title) |
55
|
|
|
->setSelfLink($selfLink) |
56
|
|
|
->setUpdated($updated) |
57
|
|
|
->setBaseURI($baseURI); |
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
|
61
|
|
|
/** |
62
|
|
|
* @return string|null |
63
|
|
|
*/ |
64
|
|
|
public function getId(): ?string |
65
|
|
|
{ |
66
|
|
|
return $this->id; |
67
|
|
|
} |
68
|
|
|
|
69
|
|
|
/** |
70
|
|
|
* @param string|null $id |
71
|
|
|
* @return self |
72
|
|
|
*/ |
73
|
|
|
public function setId(?string $id): self |
74
|
|
|
{ |
75
|
|
|
$this->id = $id; |
76
|
|
|
return $this; |
77
|
|
|
} |
78
|
|
|
|
79
|
|
|
/** |
80
|
|
|
* @return ODataTitle|null |
81
|
|
|
*/ |
82
|
|
|
public function getTitle(): ?ODataTitle |
83
|
|
|
{ |
84
|
|
|
return $this->title; |
85
|
|
|
} |
86
|
|
|
|
87
|
|
|
/** |
88
|
|
|
* @param ODataTitle|null $title |
89
|
|
|
* @return self |
90
|
|
|
*/ |
91
|
|
|
public function setTitle(?ODataTitle $title): self |
92
|
|
|
{ |
93
|
|
|
$this->title = $title; |
94
|
|
|
return $this; |
95
|
|
|
} |
96
|
|
|
|
97
|
|
|
/** |
98
|
|
|
* @return ODataLink|null |
99
|
|
|
*/ |
100
|
|
|
public function getSelfLink(): ?ODataLink |
101
|
|
|
{ |
102
|
|
|
return $this->selfLink; |
103
|
|
|
} |
104
|
|
|
|
105
|
|
|
/** |
106
|
|
|
* @param string|null $selfLink |
107
|
|
|
* @return ODataEntry |
108
|
|
|
*/ |
109
|
|
|
public function setSelfLink(?ODataLink $selfLink): self |
110
|
|
|
{ |
111
|
|
|
$this->selfLink = $selfLink; |
112
|
|
|
return $this; |
113
|
|
|
} |
114
|
|
|
/** |
115
|
|
|
* @return string|null |
116
|
|
|
*/ |
117
|
|
|
public function getUpdated(): ?string |
118
|
|
|
{ |
119
|
|
|
return $this->updated; |
120
|
|
|
} |
121
|
|
|
|
122
|
|
|
/** |
123
|
|
|
* @param string|null $updated |
124
|
|
|
* @return ODataEntry |
125
|
|
|
*/ |
126
|
|
|
public function setUpdated(?string $updated): self |
127
|
|
|
{ |
128
|
|
|
$this->updated = $updated; |
129
|
|
|
return $this; |
130
|
|
|
} |
131
|
|
|
|
132
|
|
|
/** |
133
|
|
|
* @return string|null |
134
|
|
|
*/ |
135
|
|
|
public function getBaseURI(): ?string |
136
|
|
|
{ |
137
|
|
|
return $this->baseURI; |
138
|
|
|
} |
139
|
|
|
|
140
|
|
|
/** |
141
|
|
|
* @param string|null $baseURI |
142
|
|
|
* @return self |
143
|
|
|
*/ |
144
|
|
|
public function setBaseURI(?string $baseURI): self |
145
|
|
|
{ |
146
|
|
|
$this->baseURI = $baseURI; |
147
|
|
|
return $this; |
148
|
|
|
} |
149
|
|
|
} |