2021-12-20 11:58:54 -05:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
2024-05-23 03:26:56 -04:00
|
|
|
/**
|
|
|
|
|
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2021-12-20 11:58:54 -05:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
namespace OC\Talk;
|
|
|
|
|
|
|
|
|
|
use OCP\Talk\IConversationOptions;
|
|
|
|
|
|
|
|
|
|
class ConversationOptions implements IConversationOptions {
|
2025-11-17 09:32:54 -05:00
|
|
|
private function __construct(
|
|
|
|
|
private bool $isPublic,
|
2026-04-02 11:30:07 -04:00
|
|
|
private ?\DateTimeInterface $meetingStartDate = null,
|
|
|
|
|
private ?\DateTimeInterface $meetingEndDate = null,
|
2025-11-17 09:32:54 -05:00
|
|
|
) {
|
2021-12-20 11:58:54 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static function default(): self {
|
|
|
|
|
return new self(false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function setPublic(bool $isPublic = true): IConversationOptions {
|
|
|
|
|
$this->isPublic = $isPublic;
|
|
|
|
|
return $this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function isPublic(): bool {
|
|
|
|
|
return $this->isPublic;
|
|
|
|
|
}
|
2026-04-02 11:30:07 -04:00
|
|
|
|
|
|
|
|
public function setMeetingDate(\DateTimeInterface $meetingStartDate, \DateTimeInterface $meetingEndDate): IConversationOptions {
|
|
|
|
|
$this->meetingStartDate = $meetingStartDate;
|
|
|
|
|
$this->meetingEndDate = $meetingEndDate;
|
|
|
|
|
return $this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getMeetingStartDate(): ?\DateTimeInterface {
|
|
|
|
|
return $this->meetingStartDate;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getMeetingEndDate(): ?\DateTimeInterface {
|
|
|
|
|
return $this->meetingEndDate;
|
|
|
|
|
}
|
2021-12-20 11:58:54 -05:00
|
|
|
}
|