[!!!][TASK] Remove deprecated GeneralUtility functionality
[Packages/TYPO3.CMS.git] / typo3 / sysext / frontend / Classes / Http / UrlHandlerInterface.php
1 <?php
2 namespace TYPO3\CMS\Frontend\Http;
3
4 /*
5 * This file is part of the TYPO3 CMS project.
6 *
7 * It is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License, either version 2
9 * of the License, or any later version.
10 *
11 * For the full copyright and license information, please read the
12 * LICENSE.txt file that was distributed with this source code.
13 *
14 * The TYPO3 project - inspiring people to share!
15 */
16
17 /**
18 * This interface needs to be implemented by all classes that register for the hook in:
19 * $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['urlProcessing']['urlHandlers']
20 *
21 * It can be used to do custom URL processing during a Frontend request.
22 * @deprecated since TYPO3 v9.3, will be removed in TYPO3 v10.0 in favor of PSR-15 middlewares.
23 */
24 interface UrlHandlerInterface
25 {
26 /**
27 * Return TRUE if this hook handles the current URL.
28 * Warning! If TRUE is returned content rendering will be disabled!
29 * This method will be called in the constructor of the TypoScriptFrontendController
30 *
31 * @see \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::__construct()
32 * @see \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::initializeRedirectUrlHandlers()
33 * @return bool
34 */
35 public function canHandleCurrentUrl();
36
37 /**
38 * Custom processing of the current URL.
39 *
40 * If canHandle() has returned TRUE this method needs to take care of redirecting the user or generating custom output.
41 * This hook will be called BEFORE the user is redirected to an external URL configured in the page properties.
42 *
43 * @see \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::redirectToExternalUrl()
44 */
45 public function handle();
46 }