Skip to content

Commit

Permalink
add example code
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolashohm committed Jan 17, 2015
1 parent 36e8578 commit 59a2cbe
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions example.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

require_once 'vendor/autoload.php';

use MuninPlugin\Graph;
use MuninPlugin\Datasource;

$graph = (new Graph('MyGraph'))
->setVLabel('My Vlabel')
->setCategory('My Category');


$datasource = (new Datasource('mydata'))
->setLabel('My Data')
->setValue('foo');


$graph->getDatasourceSet()->append($datasource);


echo 'Config:'.PHP_EOL;
echo $graph->getConfig().PHP_EOL;
echo PHP_EOL;
echo 'Values:'.PHP_EOL;
echo $graph->getDatasourceSet()->getValues().PHP_EOL;

0 comments on commit 59a2cbe

Please sign in to comment.