Skip to content

Commit

Permalink
New library loader
Browse files Browse the repository at this point in the history
  • Loading branch information
cmen committed Nov 13, 2016
1 parent 1b0c614 commit 465e8ca
Show file tree
Hide file tree
Showing 31 changed files with 33 additions and 248 deletions.
2 changes: 1 addition & 1 deletion DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function getConfigTreeBuilder()

$rootNode
->children()
->scalarNode('version')->defaultValue('1')->end()
->scalarNode('version')->defaultValue('current')->end()
->scalarNode('language')->defaultValue('')->end()
->end()
;
Expand Down
9 changes: 1 addition & 8 deletions GoogleCharts/Chart.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,6 @@ public function getOptionsName()
*/
abstract protected function getType();

/**
* Returns library used by chart.
*
* @return string
*/
abstract protected function getLibrary();

/**
* Returns the chart package.
*
Expand Down Expand Up @@ -117,7 +110,7 @@ public function startDraw()
throw new GoogleChartsException('Container is not defined.');
}

$js = 'var ' . $this->getName() . ' = new google.' . $this->getLibrary() . '.' . $this->getType() .
$js = 'var ' . $this->getName() . ' = new google.visualization.' . $this->getType() .
'(document.getElementById("' . $this->elementID . '"));';

if (!$this instanceof DiffChart) {
Expand Down
8 changes: 0 additions & 8 deletions GoogleCharts/Charts/AnnotationChart.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ protected function getType()
return 'AnnotationChart';
}

/**
* @inheritdoc
*/
protected function getLibrary()
{
return 'visualization';
}

/**
* @inheritdoc
*/
Expand Down
10 changes: 0 additions & 10 deletions GoogleCharts/Charts/AreaChart.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,6 @@ protected function getType()
return 'AreaChart';
}

/**
* Returns library used by chart.
*
* @return string
*/
protected function getLibrary()
{
return 'visualization';
}

/**
* Returns the chart package.
*
Expand Down
8 changes: 0 additions & 8 deletions GoogleCharts/Charts/BarChart.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ protected function getType()
return 'BarChart';
}

/**
* @inheritdoc
*/
protected function getLibrary()
{
return 'visualization';
}

/**
* @inheritdoc
*/
Expand Down
8 changes: 0 additions & 8 deletions GoogleCharts/Charts/BubbleChart.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ protected function getType()
return 'BubbleChart';
}

/**
* @inheritdoc
*/
protected function getLibrary()
{
return 'visualization';
}

/**
* @inheritdoc
*/
Expand Down
8 changes: 0 additions & 8 deletions GoogleCharts/Charts/CalendarChart.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ protected function getType()
return 'Calendar';
}

/**
* @inheritdoc
*/
protected function getLibrary()
{
return 'visualization';
}

/**
* @inheritdoc
*/
Expand Down
8 changes: 0 additions & 8 deletions GoogleCharts/Charts/CandlestickChart.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ protected function getType()
return 'CandlestickChart';
}

/**
* @inheritdoc
*/
protected function getLibrary()
{
return 'visualization';
}

/**
* @inheritdoc
*/
Expand Down
8 changes: 0 additions & 8 deletions GoogleCharts/Charts/ColumnChart.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ protected function getType()
return 'ColumnChart';
}

/**
* @inheritdoc
*/
protected function getLibrary()
{
return 'visualization';
}

/**
* @inheritdoc
*/
Expand Down
8 changes: 0 additions & 8 deletions GoogleCharts/Charts/ComboChart.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ protected function getType()
return 'ComboChart';
}

/**
* @inheritdoc
*/
protected function getLibrary()
{
return 'visualization';
}

/**
* @inheritdoc
*/
Expand Down
10 changes: 1 addition & 9 deletions GoogleCharts/Charts/GanttChart.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,7 @@ public function __construct()
*/
protected function getType()
{
return 'GanttChart';
}

/**
* @inheritdoc
*/
protected function getLibrary()
{
return 'visualization';
return 'Gantt';
}

/**
Expand Down
8 changes: 0 additions & 8 deletions GoogleCharts/Charts/GaugeChart.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ protected function getType()
return 'Gauge';
}

/**
* @inheritdoc
*/
protected function getLibrary()
{
return 'visualization';
}

/**
* @inheritdoc
*/
Expand Down
8 changes: 0 additions & 8 deletions GoogleCharts/Charts/GeoChart.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ protected function getType()
return 'GeoChart';
}

/**
* @inheritdoc
*/
protected function getLibrary()
{
return 'visualization';
}

/**
* @inheritdoc
*/
Expand Down
8 changes: 0 additions & 8 deletions GoogleCharts/Charts/Histogram.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ protected function getType()
return 'Histogram';
}

/**
* @inheritdoc
*/
protected function getLibrary()
{
return 'visualization';
}

/**
* @inheritdoc
*/
Expand Down
8 changes: 0 additions & 8 deletions GoogleCharts/Charts/LineChart.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ protected function getType()
return 'LineChart';
}

/**
* @inheritdoc
*/
protected function getLibrary()
{
return 'visualization';
}

/**
* @inheritdoc
*/
Expand Down
10 changes: 0 additions & 10 deletions GoogleCharts/Charts/Map.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,6 @@ protected function getType()
return 'Map';
}

/**
* Returns library used by chart.
*
* @return string
*/
protected function getLibrary()
{
return 'visualization';
}

/**
* Returns the chart package.
*
Expand Down
10 changes: 0 additions & 10 deletions GoogleCharts/Charts/OrgChart.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,6 @@ protected function getType()
return 'OrgChart';
}

/**
* Returns library used by chart.
*
* @return string
*/
protected function getLibrary()
{
return 'visualization';
}

/**
* Returns the chart package.
*
Expand Down
8 changes: 0 additions & 8 deletions GoogleCharts/Charts/PieChart.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ protected function getType()
return 'PieChart';
}

/**
* @inheritdoc
*/
protected function getLibrary()
{
return 'visualization';
}

/**
* @inheritdoc
*/
Expand Down
10 changes: 0 additions & 10 deletions GoogleCharts/Charts/SankeyDiagram.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,6 @@ protected function getType()
return 'Sankey';
}

/**
* Returns library used by chart.
*
* @return string
*/
protected function getLibrary()
{
return 'visualization';
}

/**
* Returns the chart package.
*
Expand Down
8 changes: 0 additions & 8 deletions GoogleCharts/Charts/ScatterChart.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ protected function getType()
return 'ScatterChart';
}

/**
* @inheritdoc
*/
protected function getLibrary()
{
return 'visualization';
}

/**
* @inheritdoc
*/
Expand Down
10 changes: 0 additions & 10 deletions GoogleCharts/Charts/SteppedAreaChart.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,6 @@ protected function getType()
return 'SteppedAreaChart';
}

/**
* Returns library used by chart.
*
* @return string
*/
protected function getLibrary()
{
return 'visualization';
}

/**
* Returns the chart package.
*
Expand Down
8 changes: 0 additions & 8 deletions GoogleCharts/Charts/TableChart.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ protected function getType()
return 'Table';
}

/**
* @inheritdoc
*/
protected function getLibrary()
{
return 'visualization';
}

/**
* @inheritdoc
*/
Expand Down
8 changes: 0 additions & 8 deletions GoogleCharts/Charts/Timeline.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ protected function getType()
return 'Timeline';
}

/**
* @inheritdoc
*/
protected function getLibrary()
{
return 'visualization';
}

/**
* @inheritdoc
*/
Expand Down
8 changes: 0 additions & 8 deletions GoogleCharts/Charts/TreeMapChart.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ protected function getType()
return 'TreeMap';
}

/**
* @inheritdoc
*/
protected function getLibrary()
{
return 'visualization';
}

/**
* @inheritdoc
*/
Expand Down
8 changes: 0 additions & 8 deletions GoogleCharts/Charts/WordTree.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ protected function getType()
return 'WordTree';
}

/**
* @inheritdoc
*/
protected function getLibrary()
{
return 'visualization';
}

/**
* @inheritdoc
*/
Expand Down
Loading

0 comments on commit 465e8ca

Please sign in to comment.