1 | <?php |
||
14 | final class Chart |
||
15 | { |
||
16 | /** |
||
17 | * @var \DateTime |
||
18 | */ |
||
19 | private $from; |
||
20 | |||
21 | /** |
||
22 | * @var \DateTime |
||
23 | */ |
||
24 | private $to; |
||
25 | |||
26 | /** |
||
27 | * Chart constructor. |
||
28 | * |
||
29 | * @param \DateTime $from |
||
30 | * @param \DateTime $to |
||
31 | */ |
||
32 | public function __construct(\DateTime $from, \DateTime $to) |
||
37 | |||
38 | /** |
||
39 | * @return \DateTime |
||
40 | */ |
||
41 | public function getFrom(): \DateTime |
||
45 | |||
46 | /** |
||
47 | * @return \DateTime |
||
48 | */ |
||
49 | public function getTo(): \DateTime |
||
53 | |||
54 | /** |
||
55 | * @param array $data |
||
56 | * |
||
57 | * @return Chart |
||
58 | */ |
||
59 | public static function fromApi(array $data): self |
||
66 | } |
||
67 |