1 | <?php |
||
15 | class DataCollection |
||
16 | { |
||
17 | const DESTINATION_TOOLBAR = 'toolbar'; |
||
18 | const DESTINATION_PROFILER = 'profiler'; |
||
19 | const DESTINATION_BOTH = 'both'; |
||
20 | |||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | private $name; |
||
25 | |||
26 | /** |
||
27 | * @var mixed |
||
28 | */ |
||
29 | private $data; |
||
30 | |||
31 | /** |
||
32 | * @var string |
||
33 | */ |
||
34 | private $type; |
||
35 | |||
36 | /** |
||
37 | * @var string |
||
38 | */ |
||
39 | private $destination; |
||
40 | |||
41 | public function __construct($name, $data, $destination = self::DESTINATION_PROFILER, $type = null) |
||
48 | |||
49 | /** |
||
50 | * @return string |
||
51 | */ |
||
52 | public function getName() |
||
56 | |||
57 | /** |
||
58 | * @param string name |
||
59 | * |
||
60 | * @return self |
||
61 | */ |
||
62 | public function setName($name) |
||
68 | |||
69 | /** |
||
70 | * @return mixed |
||
71 | */ |
||
72 | public function getData() |
||
76 | |||
77 | /** |
||
78 | * @param mixed data |
||
79 | * |
||
80 | * @return self |
||
81 | */ |
||
82 | public function setData($data) |
||
88 | |||
89 | /** |
||
90 | * @return string |
||
91 | */ |
||
92 | public function getType() |
||
96 | |||
97 | /** |
||
98 | * @param string type |
||
99 | * |
||
100 | * @return self |
||
101 | */ |
||
102 | public function setType($type) |
||
108 | |||
109 | /** |
||
110 | * @return string |
||
111 | */ |
||
112 | public function getDestination() |
||
116 | |||
117 | /** |
||
118 | * @param string destination |
||
119 | * |
||
120 | * @return self |
||
121 | */ |
||
122 | public function setDestination($destination) |
||
128 | } |
||
129 |