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