function __construct(REQUEST $req = NULL, DATABASE $db, &$info, $flags = 0) { parent::__construct($props, $flags); if ($flags & GRAPHAxes::PRIVATE_AXES) { $prefix = "{$req->props['db_server']}__{$req->props['db_name']}__"; } else { $prefix = ""; } if (!$info['table']) { throw new ADEIException("The axes table is not specified in the reader configuration"); } if (!$info['id']) { throw new ADEIException("The id column for axes table is not specified in the reader configuration"); } $query = ""; if (is_array($info['properties'])) { foreach ($info['properties'] as $prop => $col) { $query .= ", {$col} AS {$prop}"; } } $axes = $db->Query("SELECT {$info['id']} AS axis_id{$query} FROM {$this->col_quote}{$info['table']}{$this->col_quote}"); foreach ($axes as $axis) { $this->axis_info[$prefix . $axis['axis_id']] = $axis; } }
function __construct(REQUEST $props = NULL, $munin_axes) { parent::__construct($props); $this->req = $props; $this->default_axis = false; $this->axes = array(); $this->aids = array(); foreach ($munin_axes as $axis_key => $axis) { $this->axis_info[$axis_key] = $axis; } }