@@ -154,125 +154,164 @@ private function fillTitle(): void
154
154
/**
155
155
* @param $propertyTitle
156
156
* @param $property
157
+ * @return Page
157
158
*/
158
- public function set (string $ propertyTitle , Property $ property ): void
159
+ public function set (string $ propertyTitle , Property $ property ): Page
159
160
{
160
161
$ property ->setTitle ($ propertyTitle );
161
162
$ this ->properties ->add ($ property );
162
163
163
164
if ($ property instanceof Title) {
164
165
$ this ->title = $ property ->getPlainText ();
165
166
}
167
+
168
+ return $ this ;
166
169
}
167
170
168
171
/**
169
172
* @param $propertyTitle
170
173
* @param $number
174
+ * @return Page
171
175
*/
172
- public function setNumber (string $ propertyTitle , float $ number ): void
176
+ public function setNumber (string $ propertyTitle , float $ number ): Page
173
177
{
174
178
$ this ->set ($ propertyTitle , Number::value ($ number ));
179
+
180
+ return $ this ;
175
181
}
176
182
177
183
/**
178
184
* @param $propertyTitle
179
185
* @param $text
186
+ * @return Page
180
187
*/
181
- public function setTitle (string $ propertyTitle , string $ text ): void
188
+ public function setTitle (string $ propertyTitle , string $ text ): Page
182
189
{
183
190
$ this ->set ($ propertyTitle , Title::value ($ text ));
191
+
192
+ return $ this ;
184
193
}
185
194
186
195
/**
187
196
* @param $propertyTitle
188
197
* @param $text
198
+ * @return Page
189
199
*/
190
- public function setText (string $ propertyTitle , string $ text ): void
200
+ public function setText (string $ propertyTitle , string $ text ): Page
191
201
{
192
202
$ this ->set ($ propertyTitle , Text::value ($ text ));
203
+
204
+ return $ this ;
193
205
}
194
206
195
207
/**
196
208
* @param $propertyTitle
197
209
* @param $name
210
+ * @return Page
198
211
*/
199
- public function setSelect (string $ propertyTitle , string $ name ): void
212
+ public function setSelect (string $ propertyTitle , string $ name ): Page
200
213
{
201
214
$ this ->set ($ propertyTitle , Select::value ($ name ));
215
+
216
+ return $ this ;
202
217
}
203
218
204
219
/**
205
220
* @param $propertyTitle
206
221
* @param $url
222
+ * @return Page
207
223
*/
208
- public function setUrl (string $ propertyTitle , string $ url ): void
224
+ public function setUrl (string $ propertyTitle , string $ url ): Page
209
225
{
210
226
$ this ->set ($ propertyTitle , Url::value ($ url ));
227
+
228
+ return $ this ;
211
229
}
212
230
213
231
/**
214
232
* @param $propertyTitle
215
233
* @param $phoneNumber
234
+ * @return Page
216
235
*/
217
- public function setPhoneNumber (string $ propertyTitle , string $ phoneNumber ): void
236
+ public function setPhoneNumber (string $ propertyTitle , string $ phoneNumber ): Page
218
237
{
219
238
$ this ->set ($ propertyTitle , PhoneNumber::value ($ phoneNumber ));
239
+
240
+ return $ this ;
220
241
}
221
242
222
243
/**
223
244
* @param $propertyTitle
224
245
* @param $email
246
+ * @return Page
225
247
*/
226
- public function setEmail (string $ propertyTitle , string $ email ): void
248
+ public function setEmail (string $ propertyTitle , string $ email ): Page
227
249
{
228
250
$ this ->set ($ propertyTitle , Email::value ($ email ));
251
+
252
+ return $ this ;
229
253
}
230
254
231
255
/**
232
256
* @param $propertyTitle
233
257
* @param $names
258
+ * @return Page
234
259
*/
235
- public function setMultiSelect (string $ propertyTitle , array $ names ): void
260
+ public function setMultiSelect (string $ propertyTitle , array $ names ): Page
236
261
{
237
262
$ this ->set ($ propertyTitle , MultiSelect::value ($ names ));
263
+
264
+ return $ this ;
238
265
}
239
266
240
267
/**
241
268
* @param $propertyTitle
242
269
* @param $checked
270
+ * @return Page
243
271
*/
244
- public function setCheckbox (string $ propertyTitle , bool $ checked ): void
272
+ public function setCheckbox (string $ propertyTitle , bool $ checked ): Page
245
273
{
246
274
$ this ->set ($ propertyTitle , Checkbox::value ($ checked ));
275
+
276
+ return $ this ;
247
277
}
248
278
249
279
250
280
/**
251
281
* @param $propertyTitle
252
282
* @param $start
253
283
* @param $end
284
+ * @return Page
254
285
*/
255
- public function setDate (string $ propertyTitle , ?DateTime $ start , ?DateTime $ end = null ): void
286
+ public function setDate (string $ propertyTitle , ?DateTime $ start , ?DateTime $ end = null ): Page
256
287
{
257
288
$ this ->set ($ propertyTitle , Date::value ($ start , $ end ));
289
+
290
+ return $ this ;
258
291
}
259
292
260
293
/**
261
294
* @param $propertyTitle
262
295
* @param $relationIds
296
+ * @return Page
263
297
*/
264
- public function setRelation (string $ propertyTitle , array $ relationIds ): void
298
+ public function setRelation (string $ propertyTitle , array $ relationIds ): Page
265
299
{
266
300
$ this ->set ($ propertyTitle , Relation::value ($ relationIds ));
301
+
302
+ return $ this ;
267
303
}
268
304
269
305
/**
270
306
* @param $propertyTitle
271
307
* @param $userIds
308
+ * @return Page
272
309
*/
273
- public function setPeople (string $ propertyTitle , array $ userIds ): void
310
+ public function setPeople (string $ propertyTitle , array $ userIds ): Page
274
311
{
275
312
$ this ->set ($ propertyTitle , People::value ($ userIds ));
313
+
314
+ return $ this ;
276
315
}
277
316
278
317
0 commit comments