[BUGFIX] Fix several typos in php comments
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Classes / LinkHandling / LinkHandlingInterface.php
1 <?php
2 declare(strict_types = 1);
3 namespace TYPO3\CMS\Core\LinkHandling;
4
5 /*
6 * This file is part of the TYPO3 CMS project.
7 *
8 * It is free software; you can redistribute it and/or modify it under
9 * the terms of the GNU General Public License, either version 2
10 * of the License, or any later version.
11 *
12 * For the full copyright and license information, please read the
13 * LICENSE.txt file that was distributed with this source code.
14 *
15 * The TYPO3 project - inspiring people to share!
16 */
17
18 /**
19 * Interface for classes which are transforming a tag link hrefs to records or resources
20 * basically any URLs that should not be saved directly in the database on as is basis
21 * since they might be moved, changed by admin working in backend
22 */
23 interface LinkHandlingInterface
24 {
25
26 /**
27 * Returns a string interpretation of the link href query from objects, something like
28 *
29 * - t3://page?uid=23&my=value#cool
30 * - https://www.typo3.org/
31 * - t3://file?uid=13
32 * - t3://folder?storage=2&identifier=/my/folder/
33 * - mailto:mac@safe.com
34 *
35 * array of data -> string
36 *
37 * @param array $parameters
38 * @return string
39 */
40 public function asString(array $parameters): string;
41
42 /**
43 * Returns an array with data interpretation of the link href from parsed query parameters of urn
44 * representation.
45 *
46 * array of strings -> array of data
47 *
48 * @param array $data
49 * @return array
50 */
51 public function resolveHandlerData(array $data): array;
52 }