[CLEANUP] Alwas put null at the last position
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Classes / Console / RequestHandlerInterface.php
1 <?php
2 namespace TYPO3\CMS\Core\Console;
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 use Symfony\Component\Console\Input\InputInterface;
17 use Symfony\Component\Console\Output\OutputInterface;
18
19 /**
20 * The interface for a request handler for a console-based application
21 *
22 * @api
23 */
24 interface RequestHandlerInterface
25 {
26 /**
27 * Handles a CLI request
28 *
29 * @param InputInterface $input
30 * @return OutputInterface|null
31 * @api
32 */
33 public function handleRequest(InputInterface $input);
34
35 /**
36 * Checks if the request handler can handle the given request.
37 *
38 * @param InputInterface $input
39 * @return bool TRUE if it can handle the request, otherwise FALSE
40 * @api
41 */
42 public function canHandleRequest(InputInterface $input);
43
44 /**
45 * Returns the priority - how eager the handler is to actually handle the
46 * request. An integer > 0 means "I want to handle this request" where
47 * "100" is default. "0" means "I am a fallback solution".
48 *
49 * @return int The priority of the request handler
50 * @api
51 */
52 public function getPriority();
53 }