mirror of
https://github.com/nextcloud/spreed.git
synced 2025-12-17 21:12:20 +01:00
Signed-off-by: Anna Larch <anna@nextcloud.com> # The commit message #2 will be skipped: # fixup! feat(polls): allow editing of draft polls
33 lines
702 B
PHP
33 lines
702 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
/**
|
|
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
|
|
namespace OCA\Talk\Exceptions;
|
|
|
|
class PollPropertyException extends \InvalidArgumentException {
|
|
public const REASON_DRAFT = 'draft';
|
|
public const REASON_POLL = 'poll';
|
|
public const REASON_QUESTION = 'question';
|
|
public const REASON_OPTIONS = 'options';
|
|
public const REASON_ROOM = 'room';
|
|
|
|
/**
|
|
* @param self::REASON_* $reason
|
|
*/
|
|
public function __construct(
|
|
protected string $reason,
|
|
) {
|
|
parent::__construct($reason);
|
|
}
|
|
|
|
/**
|
|
* @return self::REASON_*
|
|
*/
|
|
public function getReason(): string {
|
|
return $this->reason;
|
|
}
|
|
}
|