Controller::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
nc 1
nop 0
dl 0
loc 4
c 0
b 0
f 0
cc 1
rs 10
1
<?php
2
3
namespace BfwController;
4
5
/**
6
 * Class to extends for controller object format
7
 * Extends is optional.
8
 */
9
abstract class Controller
10
{
11
    /**
12
     * @var \BFW\Application $app BFW Application instance
13
     */
14
    protected $app;
15
    
16
    /**
17
     * @var \BFW\Request $request : Request instance to get informations
18
     *      on the http request
19
     */
20
    protected $request;
21
    
22
    /**
23
     * Constructor
24
     * Get \BFW\Request instance.
25
     */
26
    public function __construct()
27
    {
28
        $this->app     = \BFW\Application::getInstance();
29
        $this->request = \BFW\Request::getInstance();
30
    }
31
}
32