Completed
Push — master ( 017b80...dacaa0 )
by Vítor
02:05
created

RoutesController::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
/**
3
 * ZfDebugModule. Console commands and other utilities for debugging ZF2 apps.
4
 *
5
 * @license http://www.opensource.org/licenses/mit-license.html MIT License
6
 * @copyright 2016 Vítor Brandão <[email protected]>
7
 */
8
9
namespace Noiselabs\ZfDebugModule\Controller\Http;
10
11
use Noiselabs\ZfDebugModule\Module;
12
use Noiselabs\ZfDebugModule\Package;
13
use Noiselabs\ZfDebugModule\Util\RoutesInspector;
14
use Zend\Mvc\Controller\AbstractActionController;
15
use Zend\View\Model\ViewModel;
16
17
class RoutesController extends AbstractActionController
18
{
19
    /**
20
     * @var RoutesInspector
21
     */
22
    private $routesInspector;
23
24
    /**
25
     * RoutesController constructor.
26
     *
27
     * @param RoutesInspector $routesInspector
28
     */
29
    public function __construct(RoutesInspector $routesInspector)
30
    {
31
        $this->routesInspector = $routesInspector;
32
    }
33
34
    /**
35
     * @return ViewModel
36
     */
37
    public function listAllAction()
38
    {
39
        $this->layout(Module::DEFAULT_LAYOUT);
40
        $view = new ViewModel([]);
41
        $view->setTemplate(Package::FQPN . '/routes/list-all');
42
43
        return $view;
44
    }
45
}
46