Change all the "new class" by "new Class"

This commit is contained in:
2021-05-07 13:10:37 +02:00
parent c8d275be31
commit c09fa961cd
39 changed files with 430 additions and 432 deletions

View File

@@ -66,13 +66,13 @@ class Graph
if (! function_exists ("imagecreatetruecolor"))
throw new \Exception (dgettext ("domframework",
"No GD support in PHP : can't create image"), 500);
$this->title = new graphTitle ();
$this->legend = new graphLegend ();
$this->data = new graphData ();
$this->series = new graphSeries ();
$this->axisX = new graphAxisX ();
$this->axisY1 = new graphAxisY1 ();
$this->axisY2 = new graphAxisY2 ();
$this->title = new GraphTitle ();
$this->legend = new GraphLegend ();
$this->data = new GraphData ();
$this->series = new GraphSeries ();
$this->axisX = new GraphAxisX ();
$this->axisY1 = new GraphAxisY1 ();
$this->axisY2 = new GraphAxisY2 ();
// Default values
$defaultTitleFontFile = "/usr/share/fonts/truetype/liberation/".
"LiberationSans-Bold.ttf";
@@ -165,7 +165,7 @@ class Graph
! in_array ($style, array ("line", "points", "linePoints")))
throw new \Exception (dgettext ("domframework",
"Invalid style provided to graph"), 406);
$styleClass = "graphStyle".$style;
$styleClass = "GraphStyle".$style;
if ($this->style === null || $this->style ()->name () !== $style)
{
$this->style = new $styleClass ();
@@ -407,7 +407,7 @@ class GraphSeries
"Can't get a serie if the name is not a string"),
406);
if (! array_key_exists ($name, $this->series))
$this->series[$name] = new graphSerie ($name);
$this->series[$name] = new GraphSerie ($name);
return $this->series[$name];
}
@@ -632,7 +632,7 @@ class GraphSerie
! in_array ($style, array ("line", "points", "linePoints")))
throw new \Exception (dgettext ("domframework",
"Invalid style provided to serie"), 406);
$styleClass = "graphStyle".$style;
$styleClass = "GraphStyle".$style;
if ($this->style === null)
$this->style = new $styleClass ();
return $this->style;