Passed
Push — master ( 1e0284...ce119a )
by
unknown
13:17
created

AbstractRequestHandler::injectRequestBuilder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file is part of the TYPO3 CMS project.
5
 *
6
 * It is free software; you can redistribute it and/or modify it under
7
 * the terms of the GNU General Public License, either version 2
8
 * of the License, or any later version.
9
 *
10
 * For the full copyright and license information, please read the
11
 * LICENSE.txt file that was distributed with this source code.
12
 *
13
 * The TYPO3 project - inspiring people to share!
14
 */
15
16
namespace TYPO3\CMS\Extbase\Mvc\Web;
17
18
use TYPO3\CMS\Extbase\Mvc\Dispatcher;
19
use TYPO3\CMS\Extbase\Mvc\RequestHandlerInterface;
20
use TYPO3\CMS\Extbase\Object\ObjectManagerInterface;
21
use TYPO3\CMS\Extbase\Service\EnvironmentService;
22
23
/**
24
 * A request handler which can handle web requests.
25
 * @internal only to be used within Extbase, not part of TYPO3 Core API.
26
 */
27
abstract class AbstractRequestHandler implements RequestHandlerInterface
28
{
29
    /**
30
     * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
31
     */
32
    protected $objectManager;
33
34
    /**
35
     * @var \TYPO3\CMS\Extbase\Mvc\Dispatcher
36
     */
37
    protected $dispatcher;
38
39
    /**
40
     * @var \TYPO3\CMS\Extbase\Service\EnvironmentService
41
     */
42
    protected $environmentService;
43
44
    /**
45
     * @param \TYPO3\CMS\Extbase\Mvc\Dispatcher $dispatcher
46
     */
47
    public function injectDispatcher(Dispatcher $dispatcher)
48
    {
49
        $this->dispatcher = $dispatcher;
50
    }
51
52
    /**
53
     * @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
54
     */
55
    public function injectObjectManager(ObjectManagerInterface $objectManager)
56
    {
57
        $this->objectManager = $objectManager;
58
    }
59
60
    /**
61
     * @param \TYPO3\CMS\Extbase\Service\EnvironmentService $environmentService
62
     */
63
    public function injectEnvironmentService(EnvironmentService $environmentService)
64
    {
65
        $this->environmentService = $environmentService;
66
    }
67
68
    /**
69
     * Returns the priority - how eager the handler is to actually handle the
70
     * request.
71
     *
72
     * @return int The priority of the request handler.
73
     */
74
    public function getPriority()
75
    {
76
        return 100;
77
    }
78
}
79