nextcloud/lib/public/Notification/IAction.php

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

115 lines
2.1 KiB
PHP
Raw Normal View History

2015-08-31 06:24:37 -04:00
<?php
declare(strict_types=1);
2015-08-31 06:24:37 -04:00
/**
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
2015-08-31 06:24:37 -04:00
*/
namespace OCP\Notification;
2015-08-31 06:24:37 -04:00
/**
* Interface IAction
*
2016-01-22 04:51:36 -05:00
* @since 9.0.0
2015-08-31 06:24:37 -04:00
*/
interface IAction {
/**
* @since 17.0.0
*/
public const TYPE_GET = 'GET';
/**
* @since 17.0.0
*/
public const TYPE_POST = 'POST';
/**
* @since 17.0.0
*/
public const TYPE_PUT = 'PUT';
/**
* @since 17.0.0
*/
public const TYPE_DELETE = 'DELETE';
/**
* @since 17.0.0
*/
public const TYPE_WEB = 'WEB';
2015-08-31 06:24:37 -04:00
/**
* @param string $label
* @return $this
* @throws InvalidValueException if the label is invalid
2016-01-22 04:51:36 -05:00
* @since 9.0.0
* @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
2015-08-31 06:24:37 -04:00
*/
public function setLabel(string $label): IAction;
2015-08-31 06:24:37 -04:00
/**
* @return string
2016-01-22 04:51:36 -05:00
* @since 9.0.0
2015-08-31 06:24:37 -04:00
*/
public function getLabel(): string;
2015-08-31 06:24:37 -04:00
/**
* @param string $label
* @return $this
* @throws InvalidValueException if the label is invalid
2016-01-22 04:51:36 -05:00
* @since 9.0.0
* @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
2015-08-31 06:24:37 -04:00
*/
public function setParsedLabel(string $label): IAction;
2015-08-31 06:24:37 -04:00
/**
* @return string
2016-01-22 04:51:36 -05:00
* @since 9.0.0
2015-08-31 06:24:37 -04:00
*/
public function getParsedLabel(): string;
2015-08-31 06:24:37 -04:00
2015-11-16 10:14:52 -05:00
/**
* @param bool $primary
* @return $this
2015-11-16 10:14:52 -05:00
* @since 9.0.0
*/
public function setPrimary(bool $primary): IAction;
2015-11-16 10:14:52 -05:00
/**
* @return bool
* @since 9.0.0
*/
public function isPrimary(): bool;
2015-11-16 10:14:52 -05:00
2015-08-31 06:24:37 -04:00
/**
* @param string $link
2015-09-01 04:46:08 -04:00
* @param string $requestType
2015-08-31 06:24:37 -04:00
* @return $this
* @throws InvalidValueException if the link is invalid
2016-01-22 04:51:36 -05:00
* @since 9.0.0
* @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
2015-08-31 06:24:37 -04:00
*/
public function setLink(string $link, string $requestType): IAction;
2015-08-31 06:24:37 -04:00
/**
* @return string
2016-01-22 04:51:36 -05:00
* @since 9.0.0
2015-08-31 06:24:37 -04:00
*/
public function getLink(): string;
2015-08-31 06:24:37 -04:00
2015-09-01 06:09:39 -04:00
/**
* @return string
2016-01-22 04:51:36 -05:00
* @since 9.0.0
2015-09-01 06:09:39 -04:00
*/
public function getRequestType(): string;
2015-09-01 06:09:39 -04:00
2015-08-31 06:24:37 -04:00
/**
* @return bool
2016-01-22 04:51:36 -05:00
* @since 9.0.0
2015-08-31 06:24:37 -04:00
*/
public function isValid(): bool;
2015-08-31 06:24:37 -04:00
/**
* @return bool
2016-01-22 04:51:36 -05:00
* @since 9.0.0
2015-08-31 06:24:37 -04:00
*/
public function isValidParsed(): bool;
2015-08-31 06:24:37 -04:00
}