You are here

function charts_graphs_chart_id_generator in Charts and Graphs 7

Same name and namespace in other branches
  1. 6.2 charts_graphs.module \charts_graphs_chart_id_generator()
  2. 7.2 charts_graphs.module \charts_graphs_chart_id_generator()

Sequential generator of IDs, guaranteeing unique value per HTTP request.

@staticvar <int> $id

Return value

<int>

2 calls to charts_graphs_chart_id_generator()
ChartsGraphsBluff::get_chart in apis/charts_graphs_bluff/charts_graphs_bluff.class.inc
Function that renders data.
ChartsGraphsCanvas::__construct in ./charts_graphs_canvas.class.inc
Constructor function.

File

./charts_graphs.module, line 215

Code

function charts_graphs_chart_id_generator() {
  static $id = 0;
  $id++;
  return $id;
}