Completed
Push — master ( bd4c23...b341c0 )
by Filipe
10:29
created

ControllerDispatch   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 51
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getControllerClassName() 0 4 1
A getMethod() 0 4 1
A getArguments() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of slick/mvc
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace Slick\Mvc\Http\Dispatcher;
11
12
/**
13
 * Controller Dispatch
14
 *
15
 * @package Slick\Mvc\Http\Dispatcher
16
 * @author  Filipe Silva <[email protected]>
17
 */
18
class ControllerDispatch
19
{
20
21
    private $controllerClassName;
22
    private $method;
23
    private $arguments;
24
25
    /**
26
     * Creates a Controller Dispatch
27
     *
28
     * @param string $controllerClassName
29
     * @param string $method
30
     * @param array $arguments
31
     */
32
    public function __construct($controllerClassName, $method, array $arguments)
33
    {
34
        $this->controllerClassName = $controllerClassName;
35
        $this->method = $method;
36
        $this->arguments = $arguments;
37
    }
38
39
    /**
40
     * Get FQ class name of the controller
41
     *
42
     * @return string
43
     */
44
    public function getControllerClassName()
45
    {
46
        return $this->controllerClassName;
47
    }
48
49
    /**
50
     * Get controller method to call
51
     *
52
     * @return string
53
     */
54
    public function getMethod()
55
    {
56
        return $this->method;
57
    }
58
59
    /**
60
     * Get method arguments
61
     *
62
     * @return array
63
     */
64
    public function getArguments()
65
    {
66
        return $this->arguments;
67
    }
68
}
69