Since: PECL rrd >= 0.9.0

class RRDGraph (View source)

Class for exporting data from RRD database to image file.

Methods

__construct(string $path)

Creates new RRDGraph instance. This instance is responsible for rendering the result of RRD database query into image.

array|false
save()

Saves the result of RRD database query into image defined by RRDGraph::__construct().

array|false
saveVerbose()

Saves the RRD database query into image and returns the verbose information about generated graph.

If "-" is used as image filename, image data are also returned in result array.

void
setOptions(array $options)

Sets the options for rrd graph export

Details

__construct(string $path)

Since: PECL rrd >= 0.9.0

Creates new RRDGraph instance. This instance is responsible for rendering the result of RRD database query into image.

Parameters

string $path

Full path for the newly created image.

array|false save()

Since: PECL rrd >= 0.9.0

Saves the result of RRD database query into image defined by RRDGraph::__construct().

Return Value

array|false

Array with information about generated image is returned, FALSE if error occurs.

array|false saveVerbose()

Since: PECL rrd >= 0.9.0

Saves the RRD database query into image and returns the verbose information about generated graph.

If "-" is used as image filename, image data are also returned in result array.

Return Value

array|false

Array with detailed information about generated image is returned, optionally with image data, FALSE if error occurs.

void setOptions(array $options)

Since: PECL rrd >= 0.9.0

Sets the options for rrd graph export

Parameters

array $options

List of options for the image generation from the RRD database file. It can be list of strings or list of strings with keys for better readability. Read the rrd graph man pages for list of available options.

Return Value

void