Completed
Push — 4.0 ( ed2d0a...2bab8b )
by Marco
15:57
created

Model::location()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 5
rs 9.4285
cc 1
eloc 2
nc 1
nop 0
1
<?php namespace Comodojo\Dispatcher\Response;
2
3
use \Comodojo\Components\Model as DispatcherClassModel;
4
use \Comodojo\Dispatcher\Response\Headers;
5
use \Comodojo\Dispatcher\Response\Status;
6
use \Comodojo\Dispatcher\Response\Content;
7
use \Comodojo\Dispatcher\Response\Location;
8
use \Comodojo\Cookies\CookieManager;
9
10
/**
11
 *
12
 * @package     Comodojo dispatcher
13
 * @author      Marco Giovinazzi <[email protected]>
14
 * @license     GPL-3.0+
15
 *
16
 * LICENSE:
17
 *
18
 * This program is free software: you can redistribute it and/or modify
19
 * it under the terms of the GNU Affero General Public License as
20
 * published by the Free Software Foundation, either version 3 of the
21
 * License, or (at your option) any later version.
22
 *
23
 * This program is distributed in the hope that it will be useful,
24
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26
 * GNU Affero General Public License for more details.
27
 *
28
 * You should have received a copy of the GNU Affero General Public License
29
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
30
 */
31
32
class Model extends DispatcherClassModel {
33
34
    private $headers = null;
35
36
    private $cookies = null;
37
38
    private $status = null;
39
40
    private $content = null;
41
42
    private $location = null;
43
44
    private $content_type = "text/plain";
0 ignored issues
show
Unused Code introduced by
The property $content_type is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
45
46
    private $charset = null;
0 ignored issues
show
Unused Code introduced by
The property $charset is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
47
48
    public function __construct(Configuration $configuration, Logger $logger) {
49
50
        parent::__construct($configuration, $logger);
51
52
        $this->headers = new Headers();
53
54
        $this->cookies = new CookieManager();
55
56
        $this->status = new Status();
57
58
        $this->content = new Content();
59
60
        $this->location = new Location();
61
62
    }
63
64
    public function headers() {
65
66
        return $this->headers;
67
68
    }
69
70
    public function cookies() {
71
72
        return $this->cookies;
73
74
    }
75
76
    public function status() {
77
78
        return $this->status;
79
80
    }
81
82
    public function content() {
83
84
        return $this->content;
85
86
    }
87
88
    public function location() {
89
90
        return $this->location;
91
92
    }
93
94
}
95