1 | <?php |
||
11 | abstract class AbstractChartOutput implements ChartOutputInterface |
||
12 | { |
||
13 | /** |
||
14 | * Version of Google Charts used. |
||
15 | * |
||
16 | * @var string |
||
17 | */ |
||
18 | protected $version; |
||
19 | |||
20 | /** |
||
21 | * Locale to customize currencies, dates, and numbers. |
||
22 | * |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $language; |
||
26 | |||
27 | /** |
||
28 | * AbstractChartOutput constructor. |
||
29 | * |
||
30 | * @param string $version |
||
31 | * @param string $language |
||
32 | */ |
||
33 | public function __construct($version, $language) |
||
38 | |||
39 | /** |
||
40 | * @param string $language |
||
41 | * |
||
42 | * @return $this |
||
43 | */ |
||
44 | public function setLanguage($language) |
||
50 | |||
51 | /** |
||
52 | * Checks if all elements ID are string and same number as charts. |
||
53 | * |
||
54 | * @param Chart[] $charts |
||
55 | * @param string[] $elementsID |
||
56 | * |
||
57 | * @throws GoogleChartsException |
||
58 | */ |
||
59 | protected function checkElementsId(array $charts, array $elementsID) |
||
73 | |||
74 | /** |
||
75 | * Checks if all elements of an array are instances of Chart. Throws an exception if not. |
||
76 | * |
||
77 | * @param Chart[] $charts |
||
78 | * |
||
79 | * @throws GoogleChartsException |
||
80 | */ |
||
81 | protected function checkChartsTypes(array $charts) |
||
89 | } |
||
90 |