[TASK] Cleanup character after PHP closing tag
[Packages/TYPO3.CMS.git] / typo3 / sysext / linkvalidator / Classes / Linktype / LinktypeInterface.php
1 <?php
2 namespace TYPO3\CMS\Linkvalidator\Linktype;
3
4 /***************************************************************
5 * Copyright notice
6 *
7 * (c) 2010 - 2011 Michael Miousse (michael.miousse@infoglobe.ca)
8 * All rights reserved
9 *
10 * This script is part of the TYPO3 project. The TYPO3 project is
11 * free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * The GNU General Public License can be found at
17 * http://www.gnu.org/copyleft/gpl.html.
18 *
19 * This script is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * This copyright notice MUST APPEAR in all copies of the script!
25 ***************************************************************/
26 /**
27 * This class provides interface implementation.
28 *
29 * @author Michael Miousse <michael.miousse@infoglobe.ca>
30 * @package TYPO3
31 * @subpackage linkvalidator
32 */
33 interface LinktypeInterface
34 {
35 /**
36 * Checks a given link for validity
37 *
38 * @param string $url Url to check
39 * @param array $softRefEntry The soft reference entry which builds the context of that url
40 * @param \TYPO3\CMS\Linkvalidator\LinkAnalyzer $reference Parent instance of tx_linkvalidator_Processor
41 * @return string Validation error message or success code
42 */
43 public function checkLink($url, $softRefEntry, $reference);
44
45 /**
46 * Base type fetching method, based on the type that softRefParserObj returns.
47 *
48 * @param array $value Reference properties
49 * @param string $type Current type
50 * @param string $key Validator hook name
51 * @return string Fetched type
52 */
53 public function fetchType($value, $type, $key);
54
55 /**
56 * Get the value of the private property errorParams.
57 *
58 * @return array All parameters needed for the rendering of the error message
59 */
60 public function getErrorParams();
61
62 /**
63 * Construct a valid Url for browser output
64 *
65 * @param array $row Broken link record
66 * @return string Parsed broken url
67 */
68 public function getBrokenUrl($row);
69
70 /**
71 * Generate the localized error message from the error params saved from the parsing
72 *
73 * @param array $errorParams All parameters needed for the rendering of the error message
74 * @return string Validation error message
75 */
76 public function getErrorMessage($errorParams);
77
78 }
79 ?>