Route::getParameters()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
/**
4
 * This file is part of the Cervo package.
5
 *
6
 * Copyright (c) 2010-2019 Nevraxe inc. & Marc André Audet <[email protected]>.
7
 *
8
 * @package   Cervo
9
 * @author    Marc André Audet <[email protected]>
10
 * @copyright 2010 - 2019 Nevraxe inc. & Marc André Audet
11
 * @license   See LICENSE.md  MIT
12
 * @link      https://github.com/Nevraxe/Cervo
13
 * @since     5.0.0
14
 */
15
16
declare(strict_types=1);
17
18
namespace Cervo;
19
20
/**
21
 * Route for Cervo.
22
 *
23
 * @author Marc André Audet <[email protected]>
24
 */
25
class Route
26
{
27
    /** @var string The controller class */
28
    private $controllerClass;
29
30
    /** @var array The parameters to pass */
31
    private $parameters = [];
32
33
    /** @var array The arguments to pass */
34
    private $arguments = [];
35
36
    public function __construct(string $controllerClass, array $parameters = [], array $arguments = [])
37
    {
38
        $this->controllerClass = $controllerClass;
39
        $this->parameters = $parameters;
40
        $this->arguments = $arguments;
41
    }
42
43
    public function getControllerClass(): string
44
    {
45
        return $this->controllerClass;
46
    }
47
48
    public function getParameters(): array
49
    {
50
        return $this->parameters;
51
    }
52
53
    public function getArguments(): array
54
    {
55
        return $this->arguments;
56
    }
57
}
58