2019-08-07 06:12:56 -04:00
|
|
|
<?php
|
2019-12-03 13:57:53 -05:00
|
|
|
|
2019-08-07 06:12:56 -04:00
|
|
|
declare(strict_types=1);
|
2019-12-03 13:57:53 -05:00
|
|
|
|
2019-08-07 06:12:56 -04:00
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2019-08-07 06:12:56 -04:00
|
|
|
*/
|
|
|
|
|
namespace OCP\WorkflowEngine;
|
|
|
|
|
|
2019-08-22 05:00:59 -04:00
|
|
|
/**
|
2019-09-09 10:53:59 -04:00
|
|
|
* Interface IFileCheck
|
2019-08-22 05:00:59 -04:00
|
|
|
*
|
|
|
|
|
* @since 18.0.0
|
|
|
|
|
*/
|
2019-09-09 10:53:59 -04:00
|
|
|
interface IEntityCheck {
|
2019-08-07 06:12:56 -04:00
|
|
|
/**
|
2019-09-09 10:53:59 -04:00
|
|
|
* Equips the check with a subject fitting the Entity. For instance, an
|
|
|
|
|
* entity of File will receive an instance of OCP\Files\Node, or a comment
|
|
|
|
|
* entity might get an IComment.
|
|
|
|
|
*
|
|
|
|
|
* The implementing check must be aware of the incoming type.
|
|
|
|
|
*
|
|
|
|
|
* If an unsupported subject is passed the implementation MAY throw an
|
|
|
|
|
* \UnexpectedValueException.
|
|
|
|
|
*
|
|
|
|
|
* @param IEntity $entity
|
|
|
|
|
* @param mixed $subject
|
|
|
|
|
* @throws \UnexpectedValueException
|
2019-09-09 11:23:22 -04:00
|
|
|
* @since 18.0.0
|
2019-08-07 06:12:56 -04:00
|
|
|
*/
|
2019-09-09 10:53:59 -04:00
|
|
|
public function setEntitySubject(IEntity $entity, $subject): void;
|
2019-08-07 06:12:56 -04:00
|
|
|
}
|