Completed
Pull Request — develop (#579)
by
unknown
09:25
created

AnalyticModel::getRoute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
/**
3
 * Schema Class for output data.
4
 */
5
namespace Graviton\AnalyticsBundle\Model;
6
7
/**
8
 * Schema
9
 *
10
 * @author   List of contributors <https://github.com/libgraviton/graviton/graphs/contributors>
11
 * @license  http://opensource.org/licenses/gpl-license.php GNU Public License
12
 * @link     http://swisscom.ch
13
 */
14
class AnalyticModel
15
{
16
    protected $collection;
17
    protected $route;
18
    protected $aggregate;
19
    protected $schema;
20
    protected $type;
21
22
    /**
23
     * String collection
24
     * @return mixed
25
     */
26
    public function getCollection()
27
    {
28
        return $this->collection;
29
    }
30
31
    /**
32
     * Set value of collection
33
     * @param mixed $collection string name
34
     * @return void
35
     */
36
    public function setCollection($collection)
37
    {
38
        $this->collection = $collection;
39
    }
40
41
    /**
42
     * Route path
43
     * @return mixed
44
     */
45
    public function getRoute()
46
    {
47
        return $this->route;
48
    }
49
50
    /**
51
     * Set path
52
     * @param mixed $route string route
53
     * @return void
54
     */
55
    public function setRoute($route)
56
    {
57
        $this->route = $route;
58
    }
59
60
    /**
61
     * Mongodb Aggregates
62
     * @return mixed
63
     */
64
    public function getAggregate()
65
    {
66
        return $this->aggregate ?: [];
67
    }
68
69
    /**
70
     * Set mongodb query
71
     * @param mixed $aggregate object type for query data
72
     * @return void
73
     */
74
    public function setAggregate($aggregate)
75
    {
76
        $this->aggregate = $aggregate;
77
    }
78
79
    /**
80
     * Schema for response
81
     * @return mixed
82
     */
83
    public function getSchema()
84
    {
85
        return $this->schema;
86
    }
87
88
    /**
89
     * Schema data
90
     * @param mixed $schema object schema
91
     * @return void
92
     */
93
    public function setSchema($schema)
94
    {
95
        $this->schema = $schema;
96
    }
97
98
    /**
99
     * Type of response data
100
     * @return mixed
101
     */
102
    public function getType()
103
    {
104
        return $this->type;
105
    }
106
107
    /**
108
     * Type for representation
109
     * @param mixed $type string view
110
     * @return void
111
     */
112
    public function setType($type)
113
    {
114
        $this->type = $type;
115
    }
116
}
117