Projekt

Obecné

Profil

Stáhnout (839 Bajtů) Statistiky
| Větev: | Revize:
1
<?php
2

    
3
namespace App\Entity;
4

    
5
/**
6
 * Class wich represent From on heatmap page and is bind to that form.
7
 *
8
 * @see https://symfony.com/doc/current/forms.html
9
 */
10
class DataSet {
11
    protected $time;
12
    protected $date;
13
    protected $type;
14

    
15
    public function setTime($time) {
16
        $this->time = $time;
17
    }
18

    
19
    public function getTime() {
20
        return $this->time;
21
    }
22

    
23
    public function getFormattedTime() {
24
        return (strlen($this->time) <= 2) ? date('H:i', strtotime($this->time.':00')) : $this->time;
25
    }
26

    
27
    public function setDate($date) {
28
        $this->date = date('Y-m-d', strtotime($date));
29
    }
30

    
31
    public function getDate() {
32
        return $this->date;
33
    }
34

    
35
    public function setType($type) {
36
        $this->type = $type;
37
    }
38

    
39
    public function getType() {
40
        return $this->type;
41
    }
42
}
    (1-1/1)