1a8475f29a160f60d6eff6f26e51c0e0efef54ea
[GitHub/WoltLab/WCF.git] /
1 <?php
2 declare(strict_types=1);
3 namespace wcf\system\message\embedded\object;
4
5 /**
6 * Default interface of simple embedded object handler.
7 *
8 * @author Alexander Ebert
9 * @copyright 2001-2018 WoltLab GmbH
10 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
11 * @package WoltLabSuite\Core\System\Message\Embedded\Object
12 */
13 interface ISimpleMessageEmbeddedObjectHandler extends IMessageEmbeddedObjectHandler {
14 /**
15 * Validates the provided values for existence and returns the filtered list.
16 *
17 * @param string $objectType object type identifier
18 * @param integer $objectID object id
19 * @param integer[] $values list of value ids
20 * @return integer[] filtered list
21 */
22 public function validateValues($objectType, $objectID, array $values);
23
24 /**
25 * Returns replacement string for simple placeholders. Must return `null`
26 * if no replacement should be performed due to invalid or missing arguments.
27 *
28 * @param string $objectType object type identifier
29 * @param integer $objectID object id
30 * @param integer $value value id
31 * @param array $attributes list of additional attributes
32 * @return string|null replacement string or null if value id is unknown
33 */
34 public function replaceSimple($objectType, $objectID, $value, array $attributes);
35 }