<?php
/*=====================================================================*
|| ###################################################################
|| # WebFreeChart
|| # Copyright (c)2002-2007 Blue Static
|| #
|| # This program is free software; you can redistribute it and/or modify
|| # it under the terms of the GNU General Public License as published by
|| # the Free Software Foundation; version 2 of the License.
|| #
|| # This program is distributed in the hope that it will be useful, but
|| # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|| # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|| # more details.
|| #
|| # You should have received a copy of the GNU General Public License along
|| # with this program; if not, write to the Free Software Foundation, Inc.,
|| # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|| ###################################################################
\*=====================================================================*/
include_once WFCDIR . '/Data/Abstract/DataSet.php';
/**
* This data set represents a single value with a description and key. This
* can be used for things like pie charts.
*
* @author rsesek
* @copyright Copyright (c)2002 - 2007, Blue Static
* @package WebFreeChart
*
*/
class ValueDataSet implements DataSet
{
/**
* The key name
* @var string
*/
private $key;
/**
* Description for this series
* @var string
*/
private $description;
/**
* The actual data for the chart
* @var mixed
*/
private $value;
// ###################################################################
/**
* Constructor
*
* @param string $key
* @param string $description
* @param mixed $value
*/
public function __construct($key = null, $description = null, $value = null)
{
$this->key = $key;
$this->description = $description;
$this->value = $value;
}
// ###################################################################
/**
* Returns the key for the data set
*
* @return string
*/
public function getKey()
{
return $this->key;
}
// ###################################################################
/**
* Sets the key
*
* @param string $key
*/
public function setKey($key)
{
$this->key = $key;
}
// ###################################################################
/**
* Returns the description
*
* @return string
*/
public function getDescription()
{
return $this->description;
}
// ###################################################################
/**
* Sets the description
*
* @param string $description
*/
public function setDescription($description)
{
$this->description = $description;
}
// ###################################################################
/**
* Returns the value
*
* @return mixed
*/
public function getValue()
{
return $this->value;
}
// ###################################################################
/**
* Sets the value
*
* @param mixed $value
*/
public function setValue($value)
{
$this->value = $value;
}
}
?>