Completed
Branch EDTR/master (6bd139)
by
unknown
35:03 queued 26:41
created

AdminRoute::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 5
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
1
<?php
2
3
namespace EventEspresso\core\domain\entities\routing\handlers\admin;
4
5
use EE_Admin_Config;
6
use EE_Dependency_Map;
7
use EventEspresso\core\domain\entities\routing\handlers\Route;
8
use EventEspresso\core\domain\entities\routing\specifications\RouteMatchSpecificationInterface;
9
use EventEspresso\core\services\loaders\LoaderInterface;
10
use EventEspresso\core\services\request\RequestInterface;
11
12
/**
13
 * Class AdminRoute
14
 * - class for detecting and matching with incoming admin requests
15
 * (this can be done by directly examining the incoming Request
16
 * or via a Route Match Specification class for better SRP and sharing)
17
 * - registers dependencies for any classes that are required from that point forwards in the request
18
 * - loads additional classes for handling the request
19
 *
20
 * @package EventEspresso\core\services\routing
21
 * @author  Brent Christensen
22
 * @since   $VID:$
23
 */
24
abstract class AdminRoute extends Route
25
{
26
27
    /**
28
     * @var EE_Admin_Config $admin_config
29
     */
30
    protected $admin_config;
31
32
33
    /**
34
     * Route constructor.
35
     *
36
     * @param EE_Admin_Config $admin_config
37
     * @param EE_Dependency_Map                $dependency_map
38
     * @param LoaderInterface                  $loader
39
     * @param RequestInterface                 $request
40
     * @param RouteMatchSpecificationInterface $specification
41
     */
42
    public function __construct(
43
        EE_Admin_Config $admin_config,
44
        EE_Dependency_Map $dependency_map,
45
        LoaderInterface $loader,
46
        RequestInterface $request,
47
        RouteMatchSpecificationInterface $specification = null
48
    ) {
49
        $this->admin_config = $admin_config;
50
        parent::__construct($dependency_map, $loader, $request, $specification);
51
    }
52
}
53