1 | <?php |
||
10 | abstract class Chart |
||
11 | { |
||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $elementID; |
||
16 | |||
17 | /** |
||
18 | * @var Data |
||
19 | */ |
||
20 | protected $data; |
||
21 | |||
22 | /** |
||
23 | * @var ChartOptionsInterface |
||
24 | */ |
||
25 | protected $options; |
||
26 | |||
27 | /** |
||
28 | * @var Events |
||
29 | */ |
||
30 | protected $events; |
||
31 | |||
32 | /** |
||
33 | * Chart constructor. |
||
34 | */ |
||
35 | public function __construct() |
||
40 | 3 | ||
41 | 3 | /** |
|
42 | 3 | * Returns chart's name. |
|
43 | * |
||
44 | * @return string |
||
45 | */ |
||
46 | public function getName() |
||
50 | 2 | ||
51 | /** |
||
52 | 2 | * Returns data chart's name. |
|
53 | * |
||
54 | * @return string |
||
55 | */ |
||
56 | public function getDataName() |
||
60 | 2 | ||
61 | /** |
||
62 | 2 | * Returns options chart's name. |
|
63 | * |
||
64 | * @return string |
||
65 | */ |
||
66 | public function getOptionsName() |
||
70 | 1 | ||
71 | /** |
||
72 | 1 | * Returns the chart type. |
|
73 | * |
||
74 | * @return string |
||
75 | */ |
||
76 | abstract public function getType(); |
||
77 | |||
78 | /** |
||
79 | * Returns library used by chart. |
||
80 | * |
||
81 | * @return string |
||
82 | */ |
||
83 | public function getLibrary() |
||
87 | 2 | ||
88 | /** |
||
89 | 2 | * Returns the chart package. |
|
90 | * |
||
91 | * @return string |
||
92 | */ |
||
93 | abstract public function getPackage(); |
||
94 | |||
95 | /** |
||
96 | * Returns the instance options. |
||
97 | */ |
||
98 | abstract public function getOptions(); |
||
99 | |||
100 | /** |
||
101 | * Sets the instance Options. |
||
102 | * |
||
103 | * @param ChartOptionsInterface $options |
||
104 | * |
||
105 | * @return ChartOptionsInterface |
||
106 | */ |
||
107 | abstract public function setOptions($options); |
||
108 | |||
109 | /** |
||
110 | * @param string $elementID |
||
111 | * |
||
112 | * @return $this |
||
113 | */ |
||
114 | public function setElementID($elementID) |
||
120 | 3 | ||
121 | /** |
||
122 | 3 | * @return string |
|
123 | 1 | */ |
|
124 | public function getElementID() |
||
128 | |||
129 | 2 | /** |
|
130 | 2 | * @return Data |
|
131 | 1 | */ |
|
132 | public function getData() |
||
136 | |||
137 | /** |
||
138 | * @return Events |
||
139 | 1 | */ |
|
140 | public function getEvents() |
||
144 | } |
||
145 |