6bd0c0ea0463addc1644b8fae1dc5d4f5cafbf14
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / lib / system / message / embedded / object / IMessageEmbeddedObjectHandler.class.php
1 <?php
2
3 namespace wcf\system\message\embedded\object;
4
5 use wcf\data\DatabaseObject;
6 use wcf\system\html\input\HtmlInputProcessor;
7
8 /**
9 * Default interface of embedded object handler.
10 *
11 * @author Marcel Werk
12 * @copyright 2001-2019 WoltLab GmbH
13 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
14 *
15 * @property-read int $objectTypeID id of the embedded object type
16 */
17 interface IMessageEmbeddedObjectHandler
18 {
19 /**
20 * Processes embedded data and optionally accesses the current
21 * document to extract additional data. Returns the IDs of found
22 * embedded objects.
23 *
24 * @param HtmlInputProcessor $htmlInputProcessor html input processor holding the current document
25 * @param mixed[] $embeddedData list of found embedded data with attributes
26 * @return int[] ids of found embedded objects
27 */
28 public function parse(HtmlInputProcessor $htmlInputProcessor, array $embeddedData);
29
30 /**
31 * Loads and returns embedded objects.
32 *
33 * @param array $objectIDs
34 * @return DatabaseObject[]
35 */
36 public function loadObjects(array $objectIDs);
37 }